Skip to content

Commit 0a46fc9

Browse files
committed
Merge branch 'release/4.13.0'
2 parents 5e7b5e9 + 3853f2a commit 0a46fc9

26 files changed

+1307
-47
lines changed

README.md

Lines changed: 8 additions & 2 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.12.0
7-
- Package version: 4.12.0
6+
- API version: 4.13.0
7+
- Package version: 4.13.0
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

@@ -151,8 +151,12 @@ Class | Method | HTTP request | Description
151151
*SpotApi* | [**list_spot_accounts**](docs/SpotApi.md#list_spot_accounts) | **GET** /spot/accounts | List spot accounts
152152
*SpotApi* | [**list_tickers**](docs/SpotApi.md#list_tickers) | **GET** /spot/tickers | Retrieve ticker information
153153
*SpotApi* | [**list_trades**](docs/SpotApi.md#list_trades) | **GET** /spot/trades | Retrieve market trades
154+
*WalletApi* | [**get_deposit_address**](docs/WalletApi.md#get_deposit_address) | **GET** /wallet/deposit_address | Generate currency deposit address
155+
*WalletApi* | [**list_deposits**](docs/WalletApi.md#list_deposits) | **GET** /wallet/deposits | Retrieve deposit records. Time range cannot exceed 30 days
156+
*WalletApi* | [**list_withdrawals**](docs/WalletApi.md#list_withdrawals) | **GET** /wallet/withdrawals | Retrieve withdrawal records. Time range cannot exceed 30 days
154157
*WalletApi* | [**transfer**](docs/WalletApi.md#transfer) | **POST** /wallet/transfers | Transfer between accounts
155158
*WalletApi* | [**transfer_with_sub_account**](docs/WalletApi.md#transfer_with_sub_account) | **POST** /wallet/sub_account_transfers | Transfer between main and sub accounts
159+
*WithdrawalApi* | [**withdraw**](docs/WithdrawalApi.md#withdraw) | **POST** /withdrawals | Withdraw
156160

157161

158162
## Documentation For Models
@@ -162,6 +166,7 @@ Class | Method | HTTP request | Description
162166
- [CancelOrderResult](docs/CancelOrderResult.md)
163167
- [Contract](docs/Contract.md)
164168
- [CurrencyPair](docs/CurrencyPair.md)
169+
- [DepositAddress](docs/DepositAddress.md)
165170
- [FundingAccount](docs/FundingAccount.md)
166171
- [FundingBookItem](docs/FundingBookItem.md)
167172
- [FundingRateRecord](docs/FundingRateRecord.md)
@@ -178,6 +183,7 @@ Class | Method | HTTP request | Description
178183
- [FuturesTicker](docs/FuturesTicker.md)
179184
- [FuturesTrade](docs/FuturesTrade.md)
180185
- [InsuranceRecord](docs/InsuranceRecord.md)
186+
- [LedgerRecord](docs/LedgerRecord.md)
181187
- [Loan](docs/Loan.md)
182188
- [LoanPatch](docs/LoanPatch.md)
183189
- [LoanRecord](docs/LoanRecord.md)

docs/BatchOrder.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Name | Type | Description | Notes
1717
**side** | **str** | Order side | [optional]
1818
**amount** | **str** | Trade amount | [optional]
1919
**price** | **str** | Order price | [optional]
20-
**time_in_force** | **str** | Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, reduce only | [optional] [default to 'gtc']
20+
**time_in_force** | **str** | Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee | [optional] [default to 'gtc']
2121
**auto_borrow** | **bool** | Used in margin trading(i.e. `account` is `margin`) to allow automatic loan of insufficient part if balance is not enough. | [optional]
2222
**left** | **str** | Amount left to fill | [optional]
2323
**fill_price** | **str** | Total filled in quote currency. Deprecated in favor of `filled_total` | [optional]

docs/Contract.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Name | Type | Description | Notes
3131
**trade_size** | **int** | Historical accumulation trade size | [optional]
3232
**position_size** | **int** | Current total long position size | [optional]
3333
**config_change_time** | **float** | Configuration's last changed time | [optional]
34+
**in_delisting** | **bool** | Contract is delisting | [optional]
3435

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

docs/DepositAddress.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# DepositAddress
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**currency** | **str** | Currency detail |
7+
**address** | **str** | Deposit address |
8+
9+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
10+
11+

docs/FuturesApi.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ Authentication with API key and secret is required
447447
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
448448

449449
# **get_my_trades**
450-
> list[MyFuturesTrade] get_my_trades(settle, contract=contract, order=order, limit=limit, last_id=last_id)
450+
> list[MyFuturesTrade] get_my_trades(settle, contract=contract, order=order, limit=limit, offset=offset, last_id=last_id, count_total=count_total)
451451
452452
List personal trading history
453453

@@ -468,11 +468,13 @@ settle = 'btc' # str | Settle currency (default to 'btc')
468468
contract = 'BTC_USD' # str | Futures contract, return related data only if specified (optional)
469469
order = 12345 # int | Futures order ID, return related data only if specified (optional)
470470
limit = 100 # int | Maximum number of record returned in one list (optional) (default to 100)
471+
offset = 0 # int | List offset, starting from 0 (optional) (default to 0)
471472
last_id = '12345' # str | Specify list staring point using the `id` of last record in previous list-query results (optional)
473+
count_total = 0 # int | Whether to return total number matched. Default to 0(no return) (optional) (default to 0)
472474

473475
try:
474476
# List personal trading history
475-
api_response = api_instance.get_my_trades(settle, contract=contract, order=order, limit=limit, last_id=last_id)
477+
api_response = api_instance.get_my_trades(settle, contract=contract, order=order, limit=limit, offset=offset, last_id=last_id, count_total=count_total)
476478
print(api_response)
477479
except ApiException as e:
478480
print("Exception when calling FuturesApi->get_my_trades: %s\n" % e)
@@ -486,7 +488,9 @@ Name | Type | Description | Notes
486488
**contract** | **str**| Futures contract, return related data only if specified | [optional]
487489
**order** | **int**| Futures order ID, return related data only if specified | [optional]
488490
**limit** | **int**| Maximum number of record returned in one list | [optional] [default to 100]
491+
**offset** | **int**| List offset, starting from 0 | [optional] [default to 0]
489492
**last_id** | **str**| Specify list staring point using the `id` of last record in previous list-query results | [optional]
493+
**count_total** | **int**| Whether to return total number matched. Default to 0(no return) | [optional] [default to 0]
490494

491495
### Return type
492496

@@ -963,7 +967,7 @@ No authorization required
963967
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
964968

965969
# **list_futures_orders**
966-
> list[FuturesOrder] list_futures_orders(settle, contract, status, limit=limit, last_id=last_id)
970+
> list[FuturesOrder] list_futures_orders(settle, contract, status, limit=limit, offset=offset, last_id=last_id, count_total=count_total)
967971
968972
List futures orders
969973

@@ -986,11 +990,13 @@ settle = 'btc' # str | Settle currency (default to 'btc')
986990
contract = 'BTC_USD' # str | Futures contract
987991
status = 'open' # str | List orders based on status
988992
limit = 100 # int | Maximum number of record returned in one list (optional) (default to 100)
993+
offset = 0 # int | List offset, starting from 0 (optional) (default to 0)
989994
last_id = '12345' # str | Specify list staring point using the `id` of last record in previous list-query results (optional)
995+
count_total = 0 # int | Whether to return total number matched. Default to 0(no return) (optional) (default to 0)
990996

991997
try:
992998
# List futures orders
993-
api_response = api_instance.list_futures_orders(settle, contract, status, limit=limit, last_id=last_id)
999+
api_response = api_instance.list_futures_orders(settle, contract, status, limit=limit, offset=offset, last_id=last_id, count_total=count_total)
9941000
print(api_response)
9951001
except ApiException as e:
9961002
print("Exception when calling FuturesApi->list_futures_orders: %s\n" % e)
@@ -1004,7 +1010,9 @@ Name | Type | Description | Notes
10041010
**contract** | **str**| Futures contract |
10051011
**status** | **str**| List orders based on status |
10061012
**limit** | **int**| Maximum number of record returned in one list | [optional] [default to 100]
1013+
**offset** | **int**| List offset, starting from 0 | [optional] [default to 0]
10071014
**last_id** | **str**| Specify list staring point using the `id` of last record in previous list-query results | [optional]
1015+
**count_total** | **int**| Whether to return total number matched. Default to 0(no return) | [optional] [default to 0]
10081016

10091017
### Return type
10101018

docs/LedgerRecord.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# LedgerRecord
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**id** | **str** | Record ID | [optional]
7+
**txid** | **str** | Hash record of the withdrawal | [optional]
8+
**timestamp** | **str** | Record time | [optional]
9+
**amount** | **str** | Trade amount |
10+
**currency** | **str** | Record currency |
11+
**address** | **str** | Withdrawal address. Required for withdrawals | [optional]
12+
**memo** | **str** | Extra withdrawal memo | [optional]
13+
**status** | **str** | Record status. - DONE: done - CANCEL: cancelled - REQUEST: requesting - MANUAL: waiting for manual approval - BCODE: GateCode operation | [optional]
14+
15+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
16+
17+

docs/Order.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Name | Type | Description | Notes
1414
**side** | **str** | Order side |
1515
**amount** | **str** | Trade amount |
1616
**price** | **str** | Order price |
17-
**time_in_force** | **str** | Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, reduce only | [optional] [default to 'gtc']
17+
**time_in_force** | **str** | Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee | [optional] [default to 'gtc']
1818
**auto_borrow** | **bool** | Used in margin trading(i.e. `account` is `margin`) to allow automatic loan of insufficient part if balance is not enough. | [optional]
1919
**left** | **str** | Amount left to fill | [optional]
2020
**fill_price** | **str** | Total filled in quote currency. Deprecated in favor of `filled_total` | [optional]

docs/Transfer.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
## Properties
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**currency** | **str** | Transfer currency name |
7-
**_from** | **str** | Account transferred from. `spot` - spot account. `margin` - margin account |
8-
**to** | **str** | Account transferred to. `spot` - spot account. `margin` - margin account |
6+
**currency** | **str** | Transfer currency. For futures account, `currency` can be set to `POINT` or settle currency |
7+
**_from** | **str** | Account transferred from. `spot` - spot account. `margin` - margin account, `futures` - futures account |
8+
**to** | **str** | Account transferred to. `spot` - spot account. `margin` - margin account, `futures` - futures account |
99
**amount** | **str** | Transfer amount |
10-
**currency_pair** | **str** | Required if transfer from or to margin account |
10+
**currency_pair** | **str** | Margin currency pair. Required if transfer from or to margin account | [optional]
11+
**settle** | **str** | Futures settle currency. Required if `currency` is `POINT` | [optional]
1112

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

docs/WalletApi.md

Lines changed: 167 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,182 @@ All URIs are relative to *https://api.gateio.ws/api/v4*
44

55
Method | HTTP request | Description
66
------------- | ------------- | -------------
7+
[**get_deposit_address**](WalletApi.md#get_deposit_address) | **GET** /wallet/deposit_address | Generate currency deposit address
8+
[**list_deposits**](WalletApi.md#list_deposits) | **GET** /wallet/deposits | Retrieve deposit records. Time range cannot exceed 30 days
9+
[**list_withdrawals**](WalletApi.md#list_withdrawals) | **GET** /wallet/withdrawals | Retrieve withdrawal records. Time range cannot exceed 30 days
710
[**transfer**](WalletApi.md#transfer) | **POST** /wallet/transfers | Transfer between accounts
811
[**transfer_with_sub_account**](WalletApi.md#transfer_with_sub_account) | **POST** /wallet/sub_account_transfers | Transfer between main and sub accounts
912

1013

14+
# **get_deposit_address**
15+
> DepositAddress get_deposit_address(currency)
16+
17+
Generate currency deposit address
18+
19+
### Example
20+
21+
```python
22+
from __future__ import print_function
23+
import gate_api
24+
from gate_api.rest import ApiException
25+
26+
configuration = gate_api.Configuration()
27+
configuration.key = 'YOUR_API_KEY'
28+
configuration.secret = 'YOUR_API_SECRET'
29+
30+
# create an instance of the API class
31+
api_instance = gate_api.WalletApi(gate_api.ApiClient(configuration))
32+
currency = 'currency_example' # str | Currency name
33+
34+
try:
35+
# Generate currency deposit address
36+
api_response = api_instance.get_deposit_address(currency)
37+
print(api_response)
38+
except ApiException as e:
39+
print("Exception when calling WalletApi->get_deposit_address: %s\n" % e)
40+
```
41+
42+
### Parameters
43+
44+
Name | Type | Description | Notes
45+
------------- | ------------- | ------------- | -------------
46+
**currency** | **str**| Currency name |
47+
48+
### Return type
49+
50+
[**DepositAddress**](DepositAddress.md)
51+
52+
### Authorization
53+
54+
Authentication with API key and secret is required
55+
56+
### HTTP request headers
57+
58+
- **Content-Type**: Not defined
59+
- **Accept**: application/json
60+
61+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
62+
63+
# **list_deposits**
64+
> list[LedgerRecord] list_deposits(currency=currency, _from=_from, to=to, limit=limit, offset=offset)
65+
66+
Retrieve deposit records. Time range cannot exceed 30 days
67+
68+
### Example
69+
70+
```python
71+
from __future__ import print_function
72+
import gate_api
73+
from gate_api.rest import ApiException
74+
75+
configuration = gate_api.Configuration()
76+
configuration.key = 'YOUR_API_KEY'
77+
configuration.secret = 'YOUR_API_SECRET'
78+
79+
# create an instance of the API class
80+
api_instance = gate_api.WalletApi(gate_api.ApiClient(configuration))
81+
currency = 'BTC' # str | Filter by currency. Return all currency records if not specified (optional)
82+
_from = 56 # int | Time range beginning, default to 7 days before current time (optional)
83+
to = 56 # int | Time range ending, default to current time (optional)
84+
limit = 100 # int | Maximum number of record returned in one list (optional) (default to 100)
85+
offset = 0 # int | List offset, starting from 0 (optional) (default to 0)
86+
87+
try:
88+
# Retrieve deposit records. Time range cannot exceed 30 days
89+
api_response = api_instance.list_deposits(currency=currency, _from=_from, to=to, limit=limit, offset=offset)
90+
print(api_response)
91+
except ApiException as e:
92+
print("Exception when calling WalletApi->list_deposits: %s\n" % e)
93+
```
94+
95+
### Parameters
96+
97+
Name | Type | Description | Notes
98+
------------- | ------------- | ------------- | -------------
99+
**currency** | **str**| Filter by currency. Return all currency records if not specified | [optional]
100+
**_from** | **int**| Time range beginning, default to 7 days before current time | [optional]
101+
**to** | **int**| Time range ending, default to current time | [optional]
102+
**limit** | **int**| Maximum number of record returned in one list | [optional] [default to 100]
103+
**offset** | **int**| List offset, starting from 0 | [optional] [default to 0]
104+
105+
### Return type
106+
107+
[**list[LedgerRecord]**](LedgerRecord.md)
108+
109+
### Authorization
110+
111+
Authentication with API key and secret is required
112+
113+
### HTTP request headers
114+
115+
- **Content-Type**: Not defined
116+
- **Accept**: application/json
117+
118+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
119+
120+
# **list_withdrawals**
121+
> list[LedgerRecord] list_withdrawals(currency=currency, _from=_from, to=to, limit=limit, offset=offset)
122+
123+
Retrieve withdrawal records. Time range cannot exceed 30 days
124+
125+
### Example
126+
127+
```python
128+
from __future__ import print_function
129+
import gate_api
130+
from gate_api.rest import ApiException
131+
132+
configuration = gate_api.Configuration()
133+
configuration.key = 'YOUR_API_KEY'
134+
configuration.secret = 'YOUR_API_SECRET'
135+
136+
# create an instance of the API class
137+
api_instance = gate_api.WalletApi(gate_api.ApiClient(configuration))
138+
currency = 'BTC' # str | Filter by currency. Return all currency records if not specified (optional)
139+
_from = 56 # int | Time range beginning, default to 7 days before current time (optional)
140+
to = 56 # int | Time range ending, default to current time (optional)
141+
limit = 100 # int | Maximum number of record returned in one list (optional) (default to 100)
142+
offset = 0 # int | List offset, starting from 0 (optional) (default to 0)
143+
144+
try:
145+
# Retrieve withdrawal records. Time range cannot exceed 30 days
146+
api_response = api_instance.list_withdrawals(currency=currency, _from=_from, to=to, limit=limit, offset=offset)
147+
print(api_response)
148+
except ApiException as e:
149+
print("Exception when calling WalletApi->list_withdrawals: %s\n" % e)
150+
```
151+
152+
### Parameters
153+
154+
Name | Type | Description | Notes
155+
------------- | ------------- | ------------- | -------------
156+
**currency** | **str**| Filter by currency. Return all currency records if not specified | [optional]
157+
**_from** | **int**| Time range beginning, default to 7 days before current time | [optional]
158+
**to** | **int**| Time range ending, default to current time | [optional]
159+
**limit** | **int**| Maximum number of record returned in one list | [optional] [default to 100]
160+
**offset** | **int**| List offset, starting from 0 | [optional] [default to 0]
161+
162+
### Return type
163+
164+
[**list[LedgerRecord]**](LedgerRecord.md)
165+
166+
### Authorization
167+
168+
Authentication with API key and secret is required
169+
170+
### HTTP request headers
171+
172+
- **Content-Type**: Not defined
173+
- **Accept**: application/json
174+
175+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
176+
11177
# **transfer**
12178
> transfer(transfer)
13179
14180
Transfer between accounts
15181

16-
Transfer between different accounts. Currently support transfers between the following: 1. spot - margin
182+
Transfer between different accounts. Currently support transfers between the following: 1. spot - margin 2. spot - futures
17183

18184
### Example
19185

0 commit comments

Comments
 (0)