Skip to content

Commit 2899d9d

Browse files
committed
Merge branch 'release/4.15.3'
2 parents 5376c69 + 0037310 commit 2899d9d

18 files changed

+390
-111
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ APIv4 provides spot, margin and futures trading operations. There are public API
33

44
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
55

6-
- API version: 4.15.2
7-
- Package version: 4.15.2
6+
- API version: 4.15.3
7+
- Package version: 4.15.3
88
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
99
For more information, please visit [https://www.gate.io/page/contacts](https://www.gate.io/page/contacts)
1010

@@ -73,7 +73,7 @@ Please follow the [installation procedure](#installation--usage) and then run th
7373
from __future__ import print_function
7474

7575
import gate_api
76-
from gate_api.exceptions import ApiException
76+
from gate_api.exceptions import ApiException, GateApiException
7777

7878
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
7979
# See configuration.py for a list of all supported configuration parameters.
@@ -91,6 +91,8 @@ try:
9191
# List all futures contracts
9292
api_response = api_instance.list_delivery_contracts(settle)
9393
print(api_response)
94+
except GateApiException as ex:
95+
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
9496
except ApiException as e:
9597
print("Exception when calling DeliveryApi->list_delivery_contracts: %s\n" % e)
9698

docs/Contract.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Name | Type | Description | Notes
3535
**position_size** | **int** | Current total long position size | [optional]
3636
**config_change_time** | **float** | Configuration's last changed time | [optional]
3737
**in_delisting** | **bool** | Contract is delisting | [optional]
38+
**orders_limit** | **int** | Maximum number of open orders | [optional]
3839

3940
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
4041

docs/DeliveryApi.md

Lines changed: 84 additions & 28 deletions
Large diffs are not rendered by default.

docs/DeliveryContract.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ Name | Type | Description | Notes
4141
**position_size** | **int** | Current total long position size | [optional]
4242
**config_change_time** | **float** | Configuration's last changed time | [optional]
4343
**in_delisting** | **bool** | Contract is delisting | [optional]
44+
**orders_limit** | **int** | Maximum number of open orders | [optional]
4445

4546
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
4647

docs/FuturesApi.md

Lines changed: 84 additions & 28 deletions
Large diffs are not rendered by default.

docs/FuturesOrder.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Name | Type | Description | Notes
1111
**finish_as** | **str** | How the order is finished. - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - reduce_only: cancelled because of increasing position while `reduce-only` set | [optional] [readonly]
1212
**status** | **str** | Order status - `open`: waiting to be traded - `finished`: finished | [optional] [readonly]
1313
**contract** | **str** | Futures contract |
14-
**size** | **int** | Order size. Specify positive number to make a bid, and negative number to ask | [optional]
14+
**size** | **int** | Order size. Specify positive number to make a bid, and negative number to ask |
1515
**iceberg** | **int** | Display size for iceberg order. 0 for non-iceberg. Note that you would pay the taker fee for the hidden size | [optional]
1616
**price** | **str** | Order price. 0 for market order with `tif` set as `ioc` | [optional]
1717
**close** | **bool** | Set as `true` to close the position, with `size` set to 0 | [optional] [default to False]

docs/MarginApi.md

Lines changed: 48 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ List all supported currency pairs supported in margin trading
3232
```python
3333
from __future__ import print_function
3434
import gate_api
35-
from gate_api.exceptions import ApiException
35+
from gate_api.exceptions import ApiException, GateApiException
3636
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
3737
# See configuration.py for a list of all supported configuration parameters.
3838
configuration = gate_api.Configuration(
@@ -47,6 +47,8 @@ try:
4747
# List all supported currency pairs supported in margin trading
4848
api_response = api_instance.list_margin_currency_pairs()
4949
print(api_response)
50+
except GateApiException as ex:
51+
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
5052
except ApiException as e:
5153
print("Exception when calling MarginApi->list_margin_currency_pairs: %s\n" % e)
5254
```
@@ -84,7 +86,7 @@ Order book of lending loans
8486
```python
8587
from __future__ import print_function
8688
import gate_api
87-
from gate_api.exceptions import ApiException
89+
from gate_api.exceptions import ApiException, GateApiException
8890
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
8991
# See configuration.py for a list of all supported configuration parameters.
9092
configuration = gate_api.Configuration(
@@ -100,6 +102,8 @@ try:
100102
# Order book of lending loans
101103
api_response = api_instance.list_funding_book(currency)
102104
print(api_response)
105+
except GateApiException as ex:
106+
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
103107
except ApiException as e:
104108
print("Exception when calling MarginApi->list_funding_book: %s\n" % e)
105109
```
@@ -141,7 +145,7 @@ Margin account list
141145
```python
142146
from __future__ import print_function
143147
import gate_api
144-
from gate_api.exceptions import ApiException
148+
from gate_api.exceptions import ApiException, GateApiException
145149
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
146150
# See configuration.py for a list of all supported configuration parameters.
147151
# The client must configure the authentication and authorization parameters
@@ -165,6 +169,8 @@ try:
165169
# Margin account list
166170
api_response = api_instance.list_margin_accounts(currency_pair=currency_pair)
167171
print(api_response)
172+
except GateApiException as ex:
173+
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
168174
except ApiException as e:
169175
print("Exception when calling MarginApi->list_margin_accounts: %s\n" % e)
170176
```
@@ -208,7 +214,7 @@ Only transferring from or to margin account are provided for now. Time range all
208214
```python
209215
from __future__ import print_function
210216
import gate_api
211-
from gate_api.exceptions import ApiException
217+
from gate_api.exceptions import ApiException, GateApiException
212218
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
213219
# See configuration.py for a list of all supported configuration parameters.
214220
# The client must configure the authentication and authorization parameters
@@ -237,6 +243,8 @@ try:
237243
# List margin account balance change history
238244
api_response = api_instance.list_margin_account_book(currency=currency, currency_pair=currency_pair, _from=_from, to=to, page=page, limit=limit)
239245
print(api_response)
246+
except GateApiException as ex:
247+
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
240248
except ApiException as e:
241249
print("Exception when calling MarginApi->list_margin_account_book: %s\n" % e)
242250
```
@@ -283,7 +291,7 @@ Funding account list
283291
```python
284292
from __future__ import print_function
285293
import gate_api
286-
from gate_api.exceptions import ApiException
294+
from gate_api.exceptions import ApiException, GateApiException
287295
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
288296
# See configuration.py for a list of all supported configuration parameters.
289297
# The client must configure the authentication and authorization parameters
@@ -307,6 +315,8 @@ try:
307315
# Funding account list
308316
api_response = api_instance.list_funding_accounts(currency=currency)
309317
print(api_response)
318+
except GateApiException as ex:
319+
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
310320
except ApiException as e:
311321
print("Exception when calling MarginApi->list_funding_accounts: %s\n" % e)
312322
```
@@ -348,7 +358,7 @@ List all loans
348358
```python
349359
from __future__ import print_function
350360
import gate_api
351-
from gate_api.exceptions import ApiException
361+
from gate_api.exceptions import ApiException, GateApiException
352362
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
353363
# See configuration.py for a list of all supported configuration parameters.
354364
# The client must configure the authentication and authorization parameters
@@ -379,6 +389,8 @@ try:
379389
# List all loans
380390
api_response = api_instance.list_loans(status, side, currency=currency, currency_pair=currency_pair, sort_by=sort_by, reverse_sort=reverse_sort, page=page, limit=limit)
381391
print(api_response)
392+
except GateApiException as ex:
393+
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
382394
except ApiException as e:
383395
print("Exception when calling MarginApi->list_loans: %s\n" % e)
384396
```
@@ -427,7 +439,7 @@ Lend or borrow
427439
```python
428440
from __future__ import print_function
429441
import gate_api
430-
from gate_api.exceptions import ApiException
442+
from gate_api.exceptions import ApiException, GateApiException
431443
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
432444
# See configuration.py for a list of all supported configuration parameters.
433445
# The client must configure the authentication and authorization parameters
@@ -451,6 +463,8 @@ try:
451463
# Lend or borrow
452464
api_response = api_instance.create_loan(loan)
453465
print(api_response)
466+
except GateApiException as ex:
467+
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
454468
except ApiException as e:
455469
print("Exception when calling MarginApi->create_loan: %s\n" % e)
456470
```
@@ -492,7 +506,7 @@ Merge multiple lending loans
492506
```python
493507
from __future__ import print_function
494508
import gate_api
495-
from gate_api.exceptions import ApiException
509+
from gate_api.exceptions import ApiException, GateApiException
496510
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
497511
# See configuration.py for a list of all supported configuration parameters.
498512
# The client must configure the authentication and authorization parameters
@@ -517,6 +531,8 @@ try:
517531
# Merge multiple lending loans
518532
api_response = api_instance.merge_loans(currency, ids)
519533
print(api_response)
534+
except GateApiException as ex:
535+
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
520536
except ApiException as e:
521537
print("Exception when calling MarginApi->merge_loans: %s\n" % e)
522538
```
@@ -559,7 +575,7 @@ Retrieve one single loan detail
559575
```python
560576
from __future__ import print_function
561577
import gate_api
562-
from gate_api.exceptions import ApiException
578+
from gate_api.exceptions import ApiException, GateApiException
563579
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
564580
# See configuration.py for a list of all supported configuration parameters.
565581
# The client must configure the authentication and authorization parameters
@@ -584,6 +600,8 @@ try:
584600
# Retrieve one single loan detail
585601
api_response = api_instance.get_loan(loan_id, side)
586602
print(api_response)
603+
except GateApiException as ex:
604+
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
587605
except ApiException as e:
588606
print("Exception when calling MarginApi->get_loan: %s\n" % e)
589607
```
@@ -628,7 +646,7 @@ Only lending loans can be cancelled
628646
```python
629647
from __future__ import print_function
630648
import gate_api
631-
from gate_api.exceptions import ApiException
649+
from gate_api.exceptions import ApiException, GateApiException
632650
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
633651
# See configuration.py for a list of all supported configuration parameters.
634652
# The client must configure the authentication and authorization parameters
@@ -653,6 +671,8 @@ try:
653671
# Cancel lending loan
654672
api_response = api_instance.cancel_loan(loan_id, currency)
655673
print(api_response)
674+
except GateApiException as ex:
675+
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
656676
except ApiException as e:
657677
print("Exception when calling MarginApi->cancel_loan: %s\n" % e)
658678
```
@@ -697,7 +717,7 @@ Only `auto_renew` modification is supported currently
697717
```python
698718
from __future__ import print_function
699719
import gate_api
700-
from gate_api.exceptions import ApiException
720+
from gate_api.exceptions import ApiException, GateApiException
701721
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
702722
# See configuration.py for a list of all supported configuration parameters.
703723
# The client must configure the authentication and authorization parameters
@@ -722,6 +742,8 @@ try:
722742
# Modify a loan
723743
api_response = api_instance.update_loan(loan_id, loan_patch)
724744
print(api_response)
745+
except GateApiException as ex:
746+
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
725747
except ApiException as e:
726748
print("Exception when calling MarginApi->update_loan: %s\n" % e)
727749
```
@@ -764,7 +786,7 @@ List loan repayment records
764786
```python
765787
from __future__ import print_function
766788
import gate_api
767-
from gate_api.exceptions import ApiException
789+
from gate_api.exceptions import ApiException, GateApiException
768790
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
769791
# See configuration.py for a list of all supported configuration parameters.
770792
# The client must configure the authentication and authorization parameters
@@ -788,6 +810,8 @@ try:
788810
# List loan repayment records
789811
api_response = api_instance.list_loan_repayments(loan_id)
790812
print(api_response)
813+
except GateApiException as ex:
814+
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
791815
except ApiException as e:
792816
print("Exception when calling MarginApi->list_loan_repayments: %s\n" % e)
793817
```
@@ -829,7 +853,7 @@ Repay a loan
829853
```python
830854
from __future__ import print_function
831855
import gate_api
832-
from gate_api.exceptions import ApiException
856+
from gate_api.exceptions import ApiException, GateApiException
833857
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
834858
# See configuration.py for a list of all supported configuration parameters.
835859
# The client must configure the authentication and authorization parameters
@@ -854,6 +878,8 @@ try:
854878
# Repay a loan
855879
api_response = api_instance.repay_loan(loan_id, repay_request)
856880
print(api_response)
881+
except GateApiException as ex:
882+
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
857883
except ApiException as e:
858884
print("Exception when calling MarginApi->repay_loan: %s\n" % e)
859885
```
@@ -896,7 +922,7 @@ List repayment records of specified loan
896922
```python
897923
from __future__ import print_function
898924
import gate_api
899-
from gate_api.exceptions import ApiException
925+
from gate_api.exceptions import ApiException, GateApiException
900926
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
901927
# See configuration.py for a list of all supported configuration parameters.
902928
# The client must configure the authentication and authorization parameters
@@ -923,6 +949,8 @@ try:
923949
# List repayment records of specified loan
924950
api_response = api_instance.list_loan_records(loan_id, status=status, page=page, limit=limit)
925951
print(api_response)
952+
except GateApiException as ex:
953+
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
926954
except ApiException as e:
927955
print("Exception when calling MarginApi->list_loan_records: %s\n" % e)
928956
```
@@ -967,7 +995,7 @@ Get one single loan record
967995
```python
968996
from __future__ import print_function
969997
import gate_api
970-
from gate_api.exceptions import ApiException
998+
from gate_api.exceptions import ApiException, GateApiException
971999
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
9721000
# See configuration.py for a list of all supported configuration parameters.
9731001
# The client must configure the authentication and authorization parameters
@@ -992,6 +1020,8 @@ try:
9921020
# Get one single loan record
9931021
api_response = api_instance.get_loan_record(loan_record_id, loan_id)
9941022
print(api_response)
1023+
except GateApiException as ex:
1024+
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
9951025
except ApiException as e:
9961026
print("Exception when calling MarginApi->get_loan_record: %s\n" % e)
9971027
```
@@ -1036,7 +1066,7 @@ Only `auto_renew` modification is supported currently
10361066
```python
10371067
from __future__ import print_function
10381068
import gate_api
1039-
from gate_api.exceptions import ApiException
1069+
from gate_api.exceptions import ApiException, GateApiException
10401070
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
10411071
# See configuration.py for a list of all supported configuration parameters.
10421072
# The client must configure the authentication and authorization parameters
@@ -1061,6 +1091,8 @@ try:
10611091
# Modify a loan record
10621092
api_response = api_instance.update_loan_record(loan_record_id, loan_patch)
10631093
print(api_response)
1094+
except GateApiException as ex:
1095+
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
10641096
except ApiException as e:
10651097
print("Exception when calling MarginApi->update_loan_record: %s\n" % e)
10661098
```

0 commit comments

Comments
 (0)