Skip to content

Commit 54f310c

Browse files
committed
upgrade codegen cli to v4
1 parent d184e8c commit 54f310c

File tree

94 files changed

+7290
-3416
lines changed

Some content is hidden

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

94 files changed

+7290
-3416
lines changed

README.md

Lines changed: 36 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,19 @@ 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.14.0
7-
- Package version: 4.14.0
6+
- API version: 4.15.0
7+
- Package version: 4.15.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

11-
## Specific note for 4.8.0
12-
13-
**BREAKING** change:
14-
15-
4.8.0 add new support with different settle currency for futures API(BTC is the only one allowed before), which makes ALL methods in FuturesApi REQUIRE an additional `settle` parameter.
16-
17-
But previous `/futures/xxx` APIs are still preserved for compatibility usage(will be treated as BTC), so if one of the following condition is met:
18-
19-
- Changing all your futures method call to include `settle` is not a big issue for you
20-
- You need to use futures settled in non-BTC currency
21-
22-
then you'd better move to 4.8.0 and changes all your futures method call to pass in `settle` parameter. Otherwise, you can stick to version<=4.7.3,
23-
but will not receive any future API upgrade support
24-
2511
## Requirements.
2612

2713
Python 2.7 and 3.4+
2814

2915
## Installation & Usage
3016
### pip install
3117

32-
If the python package is hosted on Github, you can install directly from Github
18+
If the python package is hosted on a repository, you can install directly using:
3319

3420
```sh
3521
pip install git+https://github.com/gateio/gateapi-python.git
@@ -38,7 +24,7 @@ pip install git+https://github.com/gateio/gateapi-python.git
3824

3925
Then import the package:
4026
```python
41-
import gate_api
27+
import gate_api
4228
```
4329

4430
### Setuptools
@@ -61,20 +47,28 @@ Please follow the [installation procedure](#installation--usage) and then run th
6147

6248
```python
6349
from __future__ import print_function
50+
6451
import gate_api
65-
from gate_api.rest import ApiException
66-
67-
configuration = gate_api.Configuration()
68-
configuration.key = 'YOUR_API_KEY'
69-
configuration.secret = 'YOUR_API_SECRET'
70-
# uncomment the next line if using the API with another host
71-
# configuration.host = 'https://some-other-host'
72-
# configuration.proxy = 'http://localhost:1080' # uncomment to proxy through a http proxy
73-
# configuration.verify_ssl = False # uncomment to turn off ssl verification
74-
# More connection configuration is available in `Configuration` model.
75-
76-
# create an instance of the API class
77-
api_instance = gate_api.DeliveryApi(gate_api.ApiClient(configuration))
52+
from gate_api.exceptions import ApiException
53+
54+
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
55+
# See configuration.py for a list of all supported configuration parameters.
56+
# The client must configure the authentication and authorization parameters
57+
# in accordance with the API server security policy.
58+
# Examples for each auth method are provided below, use the example that
59+
# satisfies your auth use case.
60+
61+
# Configure APIv4 key authorization
62+
configuration = gate_api.Configuration(
63+
host = "https://api.gateio.ws/api/v4",
64+
key = "YOU_API_KEY",
65+
secret = "YOUR_API_SECRET"
66+
)
67+
68+
69+
api_client = gate_api.ApiClient(configuration)
70+
# Create an instance of the API class
71+
api_instance = gate_api.DeliveryApi(api_client)
7872
settle = 'usdt' # str | Settle currency
7973
order_id = '12345' # str | ID returned on order successfully being created
8074

@@ -238,6 +232,17 @@ Class | Method | HTTP request | Description
238232
- [TriggerOrderResponse](docs/TriggerOrderResponse.md)
239233

240234

235+
## Documentation For Authorization
236+
237+
238+
## apiv4
239+
240+
Authentication with APIv4 key and secret
241+
242+
For details, refer to:
243+
[APIv4 signed request requirements](https://www.gate.io/docs/apiv4/en/index.html#apiv4-signed-request-requirements)
244+
245+
241246
## Author
242247

243248
support@mail.gate.io

docs/BatchOrder.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
# BatchOrder
22

3+
Batch order details
34
## Properties
45
Name | Type | Description | Notes
56
------------ | ------------- | ------------- | -------------
6-
**text** | **str** | User defined information. If not empty, must follow the rules below: 1. prefixed with &#x60;t-&#x60; 2. no longer than 16 bytes without &#x60;t-&#x60; prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) | [optional]
7+
**text** | **str** | User defined information. If not empty, must follow the rules below: 1. prefixed with &#x60;t-&#x60; 2. no longer than 28 bytes without &#x60;t-&#x60; prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) | [optional]
78
**succeeded** | **bool** | Whether order succeeds | [optional]
89
**label** | **str** | Error label, empty string if order succeeds | [optional]
910
**message** | **str** | Detailed error message, empty string if order succeeds | [optional]
10-
**id** | **str** | Order ID | [optional]
11-
**create_time** | **str** | Order creation time | [optional]
12-
**update_time** | **str** | Order last modification time | [optional]
13-
**status** | **str** | Order status - &#x60;open&#x60;: to be filled - &#x60;closed&#x60;: filled - &#x60;cancelled&#x60;: cancelled | [optional]
11+
**id** | **str** | Order ID | [optional] [readonly]
12+
**create_time** | **str** | Order creation time | [optional] [readonly]
13+
**update_time** | **str** | Order last modification time | [optional] [readonly]
14+
**status** | **str** | Order status - &#x60;open&#x60;: to be filled - &#x60;closed&#x60;: filled - &#x60;cancelled&#x60;: cancelled | [optional] [readonly]
1415
**currency_pair** | **str** | Currency pair | [optional]
1516
**type** | **str** | Order type. limit - limit order | [optional] [default to 'limit']
1617
**account** | **str** | Account type. spot - use spot account; margin - use margin account | [optional] [default to 'spot']
@@ -19,16 +20,16 @@ Name | Type | Description | Notes
1920
**price** | **str** | Order price | [optional]
2021
**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']
2122
**auto_borrow** | **bool** | Used in margin trading(i.e. &#x60;account&#x60; is &#x60;margin&#x60;) to allow automatic loan of insufficient part if balance is not enough. | [optional]
22-
**left** | **str** | Amount left to fill | [optional]
23-
**fill_price** | **str** | Total filled in quote currency. Deprecated in favor of &#x60;filled_total&#x60; | [optional]
24-
**filled_total** | **str** | Total filled in quote currency | [optional]
25-
**fee** | **str** | Fee deducted | [optional]
26-
**fee_currency** | **str** | Fee currency unit | [optional]
27-
**point_fee** | **str** | Point used to deduct fee | [optional]
28-
**gt_fee** | **str** | GT used to deduct fee | [optional]
29-
**gt_discount** | **bool** | Whether GT fee discount is used | [optional]
30-
**rebated_fee** | **str** | Rebated fee | [optional]
31-
**rebated_fee_currency** | **str** | Rebated fee currency unit | [optional]
23+
**left** | **str** | Amount left to fill | [optional] [readonly]
24+
**fill_price** | **str** | Total filled in quote currency. Deprecated in favor of &#x60;filled_total&#x60; | [optional] [readonly]
25+
**filled_total** | **str** | Total filled in quote currency | [optional] [readonly]
26+
**fee** | **str** | Fee deducted | [optional] [readonly]
27+
**fee_currency** | **str** | Fee currency unit | [optional] [readonly]
28+
**point_fee** | **str** | Point used to deduct fee | [optional] [readonly]
29+
**gt_fee** | **str** | GT used to deduct fee | [optional] [readonly]
30+
**gt_discount** | **bool** | Whether GT fee discount is used | [optional] [readonly]
31+
**rebated_fee** | **str** | Rebated fee | [optional] [readonly]
32+
**rebated_fee_currency** | **str** | Rebated fee currency unit | [optional] [readonly]
3233

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

docs/CancelOrder.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# CancelOrder
22

3+
Info of order to be cancelled
34
## Properties
45
Name | Type | Description | Notes
56
------------ | ------------- | ------------- | -------------

docs/CancelOrderResult.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# CancelOrderResult
22

3+
Order cancellation result
34
## Properties
45
Name | Type | Description | Notes
56
------------ | ------------- | ------------- | -------------

docs/Contract.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Contract
22

3+
Futures contract details
34
## Properties
45
Name | Type | Description | Notes
56
------------ | ------------- | ------------- | -------------

docs/CurrencyPair.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# CurrencyPair
22

3+
Spot currency pair
34
## Properties
45
Name | Type | Description | Notes
56
------------ | ------------- | ------------- | -------------

0 commit comments

Comments
 (0)