Skip to content

Commit d7c2485

Browse files
committed
update to version 1.1.0 release
1 parent 92d0879 commit d7c2485

39 files changed

Lines changed: 1807 additions & 677 deletions

README.md

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
# gate-client
2-
APIv4 futures provides all sorts of futures trading operations. There are public APIs to retrieve the real-time market statistics,
3-
and private APIs which needs authentication to trade on user's behalf.
1+
# gate-api
2+
APIv4 futures provides all sorts of 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.
43

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

7-
- API version: 1.0.0
8-
- Package version: 1.0.0
6+
- API version: 1.1.0
7+
- Package version: 1.1.0
98
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
109
For more information, please visit [https://gate.io/page/contacts](https://gate.io/page/contacts)
1110

@@ -51,22 +50,22 @@ from __future__ import print_function
5150
import gate_api
5251
from gate_api.rest import ApiException
5352

54-
# Configure API key authorization: api_key
5553
configuration = gate_api.Configuration()
56-
configuration.key = "YOUR_API_KEY"
57-
configuration.secret = "YOUR_API_SECRET"
58-
# uncomment the next line if you are testing the API with TestNet
59-
# configuration.host = "https://fx-api-testnet.gateio.io/api/v4"
54+
configuration.key = 'YOUR_API_KEY'
55+
configuration.secret = 'YOUR_API_SECRET'
56+
# uncomment the next line if using the API with another host
57+
configuration.host = 'https://some-other-host'
6058

6159
# create an instance of the API class
6260
api_instance = gate_api.FuturesApi(gate_api.ApiClient(configuration))
61+
order_id = '12345' # str | ID returned on order successfully being created
6362

6463
try:
65-
order = gate_api.FuturesOrder(contract='BTC_USD', size=100, price="4000")
66-
order = api_instance.create_order(futures_order=order)
67-
print(order.id)
64+
# Cancel a single order
65+
api_response = api_instance.cancel_order(order_id)
66+
print(api_response)
6867
except ApiException as e:
69-
print("Exception when calling FuturesApi->create_order: %s\n" % e)
68+
print("Exception when calling FuturesApi->cancel_order: %s\n" % e)
7069

7170
```
7271

@@ -90,10 +89,11 @@ Class | Method | HTTP request | Description
9089
*FuturesApi* | [**list_futures_tickers**](docs/FuturesApi.md#list_futures_tickers) | **GET** /futures/tickers | List futures tickers
9190
*FuturesApi* | [**list_futures_trades**](docs/FuturesApi.md#list_futures_trades) | **GET** /futures/trades | Futures trading history
9291
*FuturesApi* | [**list_orders**](docs/FuturesApi.md#list_orders) | **GET** /futures/orders | List futures orders
93-
*FuturesApi* | [**list_positions**](docs/FuturesApi.md#list_positions) | **GET** /futures/positions | List all positions
92+
*FuturesApi* | [**list_position_close**](docs/FuturesApi.md#list_position_close) | **GET** /futures/position_close | List position close history
93+
*FuturesApi* | [**list_positions**](docs/FuturesApi.md#list_positions) | **GET** /futures/positions | List all positions of a user
9494
*FuturesApi* | [**update_position_leverage**](docs/FuturesApi.md#update_position_leverage) | **POST** /futures/positions/{contract}/leverage | Update position leverage
9595
*FuturesApi* | [**update_position_margin**](docs/FuturesApi.md#update_position_margin) | **POST** /futures/positions/{contract}/margin | Update position margin
96-
*FuturesApi* | [**update_position_risk_limit**](docs/FuturesApi.md#update_position_risk_limit) | **POST** /futures/positions/{contract}/risk_limit | Update poisition risk limit
96+
*FuturesApi* | [**update_position_risk_limit**](docs/FuturesApi.md#update_position_risk_limit) | **POST** /futures/positions/{contract}/risk_limit | Update position risk limit
9797

9898

9999
## Documentation For Models
@@ -102,7 +102,6 @@ Class | Method | HTTP request | Description
102102
- [FundingRateRecord](docs/FundingRateRecord.md)
103103
- [FuturesAccount](docs/FuturesAccount.md)
104104
- [FuturesCandlestick](docs/FuturesCandlestick.md)
105-
- [FuturesErrorResponse](docs/FuturesErrorResponse.md)
106105
- [FuturesOrder](docs/FuturesOrder.md)
107106
- [FuturesOrderBook](docs/FuturesOrderBook.md)
108107
- [FuturesOrderBookItem](docs/FuturesOrderBookItem.md)
@@ -111,6 +110,8 @@ Class | Method | HTTP request | Description
111110
- [InsuranceRecord](docs/InsuranceRecord.md)
112111
- [MyFuturesTrade](docs/MyFuturesTrade.md)
113112
- [Position](docs/Position.md)
113+
- [PositionClose](docs/PositionClose.md)
114+
- [PositionCloseOrder](docs/PositionCloseOrder.md)
114115

115116

116117
## Author

docs/Contract.md

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,33 @@
33
## Properties
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**name** | **str** | Futures name | [optional]
7-
**type** | **str** | Futures type | [optional]
6+
**name** | **str** | Futures contract name | [optional]
7+
**type** | **str** | Futures contract type | [optional]
88
**quanto_multiplier** | **str** | Multiplier used in converting from invoicing to settlement currency in quanto futures | [optional]
9-
**leverage_min** | **str** | minimum leverage | [optional]
10-
**leverage_max** | **str** | maximum leverage | [optional]
11-
**mark_type** | **str** | mark price type, internal - based on internal trading, index - based on external index price | [optional]
12-
**mark_price** | **str** | latest mark price | [optional]
13-
**index_price** | **str** | latest index price | [optional]
14-
**maintenance_rate** | **str** | maintenance rate of margin | [optional]
15-
**funding_rate** | **str** | funding rate | [optional]
16-
**funding_interval** | **int** | funding application interval, unit in seconds | [optional]
17-
**funding_next_apply** | **float** | next funding time | [optional]
18-
**risk_limit_base** | **str** | risk limit base | [optional]
19-
**risk_limit_step** | **str** | step of adjusting risk limit | [optional]
20-
**risk_limit_max** | **str** | maximum risk limit the contract allowed | [optional]
21-
**order_size_min** | **int** | minimum order size the contract allowed | [optional]
22-
**order_size_max** | **int** | maximum order size the contract allowed | [optional]
23-
**order_price_deviate** | **str** | deviation between order price and current index price. If price of an order is denoted as `order_price`, it must meet the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate | [optional]
9+
**leverage_min** | **str** | Minimum leverage | [optional]
10+
**leverage_max** | **str** | Maximum leverage | [optional]
11+
**maintenance_rate** | **str** | Maintenance rate of margin | [optional]
12+
**mark_type** | **str** | Mark price type, internal - based on internal trading, index - based on external index price | [optional]
13+
**mark_price** | **str** | Current mark price | [optional]
14+
**index_price** | **str** | Current index price | [optional]
15+
**last_price** | **str** | Last trading price | [optional]
16+
**maker_fee_rate** | **str** | Maker fee rate, where negative means rebate | [optional]
17+
**taker_fee_rate** | **str** | Taker fee rate | [optional]
18+
**order_price_round** | **str** | Minimum order price increment | [optional]
19+
**mark_price_round** | **str** | Minimum mark price increment | [optional]
20+
**funding_rate** | **str** | Current funding rate | [optional]
21+
**funding_interval** | **int** | Funding application interval, unit in seconds | [optional]
22+
**funding_next_apply** | **float** | Next funding time | [optional]
23+
**risk_limit_base** | **str** | Risk limit base | [optional]
24+
**risk_limit_step** | **str** | Step of adjusting risk limit | [optional]
25+
**risk_limit_max** | **str** | Maximum risk limit the contract allowed | [optional]
26+
**order_size_min** | **int** | Minimum order size the contract allowed | [optional]
27+
**order_size_max** | **int** | Maximum order size the contract allowed | [optional]
28+
**order_price_deviate** | **str** | deviation between order price and current index price. If price of an order is denoted as order_price, it must meet the following condition: abs(order_price - mark_price) <= mark_price * order_price_deviate | [optional]
29+
**orderbook_id** | **int** | Current orderbook ID | [optional]
30+
**trade_id** | **int** | Current trade ID | [optional]
31+
**trade_size** | **int** | Historical accumulation trade size | [optional]
32+
**position_size** | **int** | Current total long position size | [optional]
2433

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

docs/FundingRateRecord.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
66
**t** | **int** | Unix timestamp in seconds | [optional]
7-
**r** | **str** | funding rate | [optional]
7+
**r** | **str** | Funding rate | [optional]
88

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

docs/FuturesAccount.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
## Properties
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**total** | **str** | total assets, total = position_margin + order_margin + available | [optional]
7-
**unrealised_pnl** | **str** | unrealized pnl | [optional]
8-
**position_margin** | **str** | position margin | [optional]
9-
**order_margin** | **str** | order margin of unfinished orders | [optional]
10-
**available** | **str** | available balance to transfer out or trade | [optional]
6+
**total** | **str** | Total assets, total = position_margin + order_margin + available | [optional]
7+
**unrealised_pnl** | **str** | Unrealized PNL | [optional]
8+
**position_margin** | **str** | Position margin | [optional]
9+
**order_margin** | **str** | Order margin of unfinished orders | [optional]
10+
**available** | **str** | Available balance to transfer out or trade | [optional]
1111

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

0 commit comments

Comments
 (0)