Skip to content

Commit 89ff3d4

Browse files
committed
Merge branch 'hotfix/4.5.1' into develop
2 parents 9b912f3 + 7da9874 commit 89ff3d4

47 files changed

Lines changed: 251 additions & 135 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 2 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.5.0
7-
- Package version: 4.5.0
6+
- API version: 4.5.1
7+
- Package version: 4.5.1
88
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
99
For more information, please visit [https://gate.io/page/contacts](https://gate.io/page/contacts)
1010

docs/MarginApi.md

Lines changed: 31 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Method | HTTP request | Description
2222

2323

2424
# **cancel_loan**
25-
> Loan cancel_loan(currency)
25+
> Loan cancel_loan(loan_id, currency)
2626
2727
Cancel lending loan
2828

@@ -41,11 +41,12 @@ configuration.secret = 'YOUR_API_SECRET'
4141

4242
# create an instance of the API class
4343
api_instance = gate_api.MarginApi(gate_api.ApiClient(configuration))
44+
loan_id = 'loan_id_example' # str | Loan ID
4445
currency = 'BTC' # str | Retrieved specified currency related data
4546

4647
try:
4748
# Cancel lending loan
48-
api_response = api_instance.cancel_loan(currency)
49+
api_response = api_instance.cancel_loan(loan_id, currency)
4950
print(api_response)
5051
except ApiException as e:
5152
print("Exception when calling MarginApi->cancel_loan: %s\n" % e)
@@ -55,6 +56,7 @@ except ApiException as e:
5556

5657
Name | Type | Description | Notes
5758
------------- | ------------- | ------------- | -------------
59+
**loan_id** | **str**| Loan ID |
5860
**currency** | **str**| Retrieved specified currency related data |
5961

6062
### Return type
@@ -122,7 +124,7 @@ Authentication with API key and secret is required
122124
[[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)
123125

124126
# **get_loan**
125-
> Loan get_loan(side)
127+
> Loan get_loan(loan_id, side)
126128
127129
Retrieve one single loan detail
128130

@@ -139,11 +141,12 @@ configuration.secret = 'YOUR_API_SECRET'
139141

140142
# create an instance of the API class
141143
api_instance = gate_api.MarginApi(gate_api.ApiClient(configuration))
144+
loan_id = 'loan_id_example' # str | Loan ID
142145
side = 'lend' # str | Lend or borrow
143146

144147
try:
145148
# Retrieve one single loan detail
146-
api_response = api_instance.get_loan(side)
149+
api_response = api_instance.get_loan(loan_id, side)
147150
print(api_response)
148151
except ApiException as e:
149152
print("Exception when calling MarginApi->get_loan: %s\n" % e)
@@ -153,6 +156,7 @@ except ApiException as e:
153156

154157
Name | Type | Description | Notes
155158
------------- | ------------- | ------------- | -------------
159+
**loan_id** | **str**| Loan ID |
156160
**side** | **str**| Lend or borrow |
157161

158162
### Return type
@@ -171,7 +175,7 @@ Authentication with API key and secret is required
171175
[[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)
172176

173177
# **get_loan_record**
174-
> LoanRecord get_loan_record(loan_id)
178+
> LoanRecord get_loan_record(loan_record_id, loan_id)
175179
176180
Get one single loan record
177181

@@ -188,11 +192,12 @@ configuration.secret = 'YOUR_API_SECRET'
188192

189193
# create an instance of the API class
190194
api_instance = gate_api.MarginApi(gate_api.ApiClient(configuration))
195+
loan_record_id = 'loan_record_id_example' # str | Loan record ID
191196
loan_id = 'loan_id_example' # str | Loan ID
192197

193198
try:
194199
# Get one single loan record
195-
api_response = api_instance.get_loan_record(loan_id)
200+
api_response = api_instance.get_loan_record(loan_record_id, loan_id)
196201
print(api_response)
197202
except ApiException as e:
198203
print("Exception when calling MarginApi->get_loan_record: %s\n" % e)
@@ -202,6 +207,7 @@ except ApiException as e:
202207

203208
Name | Type | Description | Notes
204209
------------- | ------------- | ------------- | -------------
210+
**loan_record_id** | **str**| Loan record ID |
205211
**loan_id** | **str**| Loan ID |
206212

207213
### Return type
@@ -369,7 +375,7 @@ Authentication with API key and secret is required
369375
[[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)
370376

371377
# **list_loan_repayments**
372-
> list[Repayment] list_loan_repayments()
378+
> list[Repayment] list_loan_repayments(loan_id)
373379
374380
List loan repayment records
375381

@@ -386,17 +392,21 @@ configuration.secret = 'YOUR_API_SECRET'
386392

387393
# create an instance of the API class
388394
api_instance = gate_api.MarginApi(gate_api.ApiClient(configuration))
395+
loan_id = 'loan_id_example' # str | Loan ID
389396

390397
try:
391398
# List loan repayment records
392-
api_response = api_instance.list_loan_repayments()
399+
api_response = api_instance.list_loan_repayments(loan_id)
393400
print(api_response)
394401
except ApiException as e:
395402
print("Exception when calling MarginApi->list_loan_repayments: %s\n" % e)
396403
```
397404

398405
### Parameters
399-
This endpoint does not need any parameter.
406+
407+
Name | Type | Description | Notes
408+
------------- | ------------- | ------------- | -------------
409+
**loan_id** | **str**| Loan ID |
400410

401411
### Return type
402412

@@ -612,7 +622,7 @@ Authentication with API key and secret is required
612622
[[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)
613623

614624
# **repay_loan**
615-
> Loan repay_loan(repay_request)
625+
> Loan repay_loan(loan_id, repay_request)
616626
617627
Repay a loan
618628

@@ -629,11 +639,12 @@ configuration.secret = 'YOUR_API_SECRET'
629639

630640
# create an instance of the API class
631641
api_instance = gate_api.MarginApi(gate_api.ApiClient(configuration))
642+
loan_id = 'loan_id_example' # str | Loan ID
632643
repay_request = gate_api.RepayRequest() # RepayRequest |
633644

634645
try:
635646
# Repay a loan
636-
api_response = api_instance.repay_loan(repay_request)
647+
api_response = api_instance.repay_loan(loan_id, repay_request)
637648
print(api_response)
638649
except ApiException as e:
639650
print("Exception when calling MarginApi->repay_loan: %s\n" % e)
@@ -643,6 +654,7 @@ except ApiException as e:
643654

644655
Name | Type | Description | Notes
645656
------------- | ------------- | ------------- | -------------
657+
**loan_id** | **str**| Loan ID |
646658
**repay_request** | [**RepayRequest**](RepayRequest.md)| |
647659

648660
### Return type
@@ -661,7 +673,7 @@ Authentication with API key and secret is required
661673
[[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)
662674

663675
# **update_loan**
664-
> Loan update_loan(loan_patch)
676+
> Loan update_loan(loan_id, loan_patch)
665677
666678
Modify a loan
667679

@@ -680,11 +692,12 @@ configuration.secret = 'YOUR_API_SECRET'
680692

681693
# create an instance of the API class
682694
api_instance = gate_api.MarginApi(gate_api.ApiClient(configuration))
695+
loan_id = 'loan_id_example' # str | Loan ID
683696
loan_patch = gate_api.LoanPatch() # LoanPatch |
684697

685698
try:
686699
# Modify a loan
687-
api_response = api_instance.update_loan(loan_patch)
700+
api_response = api_instance.update_loan(loan_id, loan_patch)
688701
print(api_response)
689702
except ApiException as e:
690703
print("Exception when calling MarginApi->update_loan: %s\n" % e)
@@ -694,6 +707,7 @@ except ApiException as e:
694707

695708
Name | Type | Description | Notes
696709
------------- | ------------- | ------------- | -------------
710+
**loan_id** | **str**| Loan ID |
697711
**loan_patch** | [**LoanPatch**](LoanPatch.md)| |
698712

699713
### Return type
@@ -712,7 +726,7 @@ Authentication with API key and secret is required
712726
[[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)
713727

714728
# **update_loan_record**
715-
> LoanRecord update_loan_record(loan_patch)
729+
> LoanRecord update_loan_record(loan_record_id, loan_patch)
716730
717731
Modify a loan record
718732

@@ -731,11 +745,12 @@ configuration.secret = 'YOUR_API_SECRET'
731745

732746
# create an instance of the API class
733747
api_instance = gate_api.MarginApi(gate_api.ApiClient(configuration))
748+
loan_record_id = 'loan_record_id_example' # str | Loan record ID
734749
loan_patch = gate_api.LoanPatch() # LoanPatch |
735750

736751
try:
737752
# Modify a loan record
738-
api_response = api_instance.update_loan_record(loan_patch)
753+
api_response = api_instance.update_loan_record(loan_record_id, loan_patch)
739754
print(api_response)
740755
except ApiException as e:
741756
print("Exception when calling MarginApi->update_loan_record: %s\n" % e)
@@ -745,6 +760,7 @@ except ApiException as e:
745760

746761
Name | Type | Description | Notes
747762
------------- | ------------- | ------------- | -------------
763+
**loan_record_id** | **str**| Loan record ID |
748764
**loan_patch** | [**LoanPatch**](LoanPatch.md)| |
749765

750766
### Return type

docs/SpotApi.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Method | HTTP request | Description
2020

2121

2222
# **cancel_order**
23-
> Order cancel_order()
23+
> Order cancel_order(order_id, currency_pair)
2424
2525
Cancel a single order
2626

@@ -37,17 +37,23 @@ configuration.secret = 'YOUR_API_SECRET'
3737

3838
# create an instance of the API class
3939
api_instance = gate_api.SpotApi(gate_api.ApiClient(configuration))
40+
order_id = '12345' # str | ID returned on order successfully being created
41+
currency_pair = 'BTC_USDT' # str | Currency pair
4042

4143
try:
4244
# Cancel a single order
43-
api_response = api_instance.cancel_order()
45+
api_response = api_instance.cancel_order(order_id, currency_pair)
4446
print(api_response)
4547
except ApiException as e:
4648
print("Exception when calling SpotApi->cancel_order: %s\n" % e)
4749
```
4850

4951
### Parameters
50-
This endpoint does not need any parameter.
52+
53+
Name | Type | Description | Notes
54+
------------- | ------------- | ------------- | -------------
55+
**order_id** | **str**| ID returned on order successfully being created |
56+
**currency_pair** | **str**| Currency pair |
5157

5258
### Return type
5359

@@ -212,7 +218,7 @@ No authorization required
212218
[[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)
213219

214220
# **get_order**
215-
> Order get_order()
221+
> Order get_order(order_id, currency_pair)
216222
217223
Get a single order
218224

@@ -229,17 +235,23 @@ configuration.secret = 'YOUR_API_SECRET'
229235

230236
# create an instance of the API class
231237
api_instance = gate_api.SpotApi(gate_api.ApiClient(configuration))
238+
order_id = '12345' # str | ID returned on order successfully being created
239+
currency_pair = 'BTC_USDT' # str | Currency pair
232240

233241
try:
234242
# Get a single order
235-
api_response = api_instance.get_order()
243+
api_response = api_instance.get_order(order_id, currency_pair)
236244
print(api_response)
237245
except ApiException as e:
238246
print("Exception when calling SpotApi->get_order: %s\n" % e)
239247
```
240248

241249
### Parameters
242-
This endpoint does not need any parameter.
250+
251+
Name | Type | Description | Notes
252+
------------- | ------------- | ------------- | -------------
253+
**order_id** | **str**| ID returned on order successfully being created |
254+
**currency_pair** | **str**| Currency pair |
243255

244256
### Return type
245257

gate_api/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
88
APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
99
10-
OpenAPI spec version: 4.5.0
10+
OpenAPI spec version: 4.5.1
1111
Contact: support@mail.gate.io
1212
Generated by: https://openapi-generator.tech
1313
"""
1414

1515

1616
from __future__ import absolute_import
1717

18-
__version__ = "4.5.0"
18+
__version__ = "4.5.1"
1919

2020
# import apis into sdk package
2121
from gate_api.api.futures_api import FuturesApi

gate_api/api/futures_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
77
8-
OpenAPI spec version: 4.5.0
8+
OpenAPI spec version: 4.5.1
99
Contact: support@mail.gate.io
1010
Generated by: https://openapi-generator.tech
1111
"""

0 commit comments

Comments
 (0)