You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*SpotApi* | [**list_currencies**](docs/SpotApi.md#list_currencies) | **GET** /spot/currencies | List all currencies' details
257
257
*SpotApi* | [**get_currency**](docs/SpotApi.md#get_currency) | **GET** /spot/currencies/{currency} | Get details of a specific currency
258
258
*SpotApi* | [**list_currency_pairs**](docs/SpotApi.md#list_currency_pairs) | **GET** /spot/currency_pairs | List all currency pairs supported
259
-
*SpotApi* | [**get_currency_pair**](docs/SpotApi.md#get_currency_pair) | **GET** /spot/currency_pairs/{currency_pair} | Get details of a specifc order
259
+
*SpotApi* | [**get_currency_pair**](docs/SpotApi.md#get_currency_pair) | **GET** /spot/currency_pairs/{currency_pair} | Get details of a specifc currency pair
260
260
*SpotApi* | [**list_tickers**](docs/SpotApi.md#list_tickers) | **GET** /spot/tickers | Retrieve ticker information
261
261
*SpotApi* | [**list_order_book**](docs/SpotApi.md#list_order_book) | **GET** /spot/order_book | Retrieve order book
*SpotApi* | [**cancel_batch_orders**](docs/SpotApi.md#cancel_batch_orders) | **POST** /spot/cancel_batch_orders | Cancel a batch of orders with an ID list
273
273
*SpotApi* | [**get_order**](docs/SpotApi.md#get_order) | **GET** /spot/orders/{order_id} | Get a single order
274
274
*SpotApi* | [**cancel_order**](docs/SpotApi.md#cancel_order) | **DELETE** /spot/orders/{order_id} | Cancel a single order
275
+
*SpotApi* | [**amend_order**](docs/SpotApi.md#amend_order) | **PATCH** /spot/orders/{order_id} | Amend an order
275
276
*SpotApi* | [**list_my_trades**](docs/SpotApi.md#list_my_trades) | **GET** /spot/my_trades | List personal trading history
276
277
*SpotApi* | [**get_system_time**](docs/SpotApi.md#get_system_time) | **GET** /spot/time | Get server current time
Copy file name to clipboardExpand all lines: docs/BatchOrder.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ Name | Type | Description | Notes
15
15
**update_time_ms** | **int** | Last modification time of order (in milliseconds) | [optional][readonly]
16
16
**status** | **str** | Order status - `open`: to be filled - `closed`: filled - `cancelled`: cancelled | [optional][readonly]
Copy file name to clipboardExpand all lines: docs/CrossMarginAccount.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,7 @@ Name | Type | Description | Notes
16
16
**total_initial_margin_rate** | **str** | Total initial margin rate | [optional]
17
17
**total_maintenance_margin_rate** | **str** | Total maintenance margin rate | [optional]
18
18
**total_available_margin** | **str** | Total available margin | [optional]
19
+
**portfolio_margin_total** | **str** | Total amount of the portfolio margin account | [optional]
19
20
20
21
[[Back to Model list]](../README.md#documentation-for-models)[[Back to API list]](../README.md#documentation-for-api-endpoints)[[Back to README]](../README.md)
**id** | **str** | Order ID | [optional][readonly]
8
-
**text** | **str** | User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) | [optional]
8
+
**text** | **str** | User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) Besides user defined information, reserved contents are listed below, denoting how the order is created: - 101: from android - 102: from IOS - 103: from IPAD - 104: from webapp - 3: from web - 2: from apiv2 - apiv4: from apiv4 | [optional]
9
9
**create_time** | **str** | Creation time of order | [optional][readonly]
10
10
**update_time** | **str** | Last modification time of order | [optional][readonly]
11
11
**create_time_ms** | **int** | Creation time of order (in milliseconds) | [optional][readonly]
12
12
**update_time_ms** | **int** | Last modification time of order (in milliseconds) | [optional][readonly]
13
13
**status** | **str** | Order status - `open`: to be filled - `closed`: filled - `cancelled`: cancelled | [optional][readonly]
14
14
**currency_pair** | **str** | Currency pair |
15
-
**type** | **str** | Order Type - limit : Limit Order - market : Market Order | [optional][default to 'limit']
15
+
**type** | **str** | Order Type - limit : Limit Order - market : Market Order | [optional][default to 'limit']
16
16
**account** | **str** | Account type. spot - use spot account; margin - use margin account; cross_margin - use cross margin account. Portfolio margin account must set to `cross-margin` | [optional][default to 'spot']
17
17
**side** | **str** | Order side |
18
18
**amount** | **str** | When `type` is limit, it refers to base currency. For instance, `BTC_USDT` means `BTC` When `type` is `market`, it refers to different currency according to `side` - `side` : `buy` means quote currency, `BTC_USDT` means `USDT` - `side` : `sell` means base currency,`BTC_USDT` means `BTC` |
@@ -24,6 +24,7 @@ Name | Type | Description | Notes
24
24
**left** | **str** | Amount left to fill | [optional][readonly]
25
25
**fill_price** | **str** | Total filled in quote currency. Deprecated in favor of `filled_total` | [optional][readonly]
26
26
**filled_total** | **str** | Total filled in quote currency | [optional][readonly]
27
+
**avg_deal_price** | **str** | Average fill price | [optional][readonly]
**amount** | **str** | New order amount. `amount` and `price` must specify one of them | [optional]
8
+
**price** | **str** | New order price. `amount` and `Price` must specify one of them\" | [optional]
9
+
10
+
[[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,6 +1315,81 @@ Name | Type | Description | Notes
1314
1315
1315
1316
[[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)
1316
1317
1318
+
# **amend_order**
1319
+
> Order amend_order(order_id, currency_pair, order_patch, account=account)
1320
+
1321
+
Amend an order
1322
+
1323
+
By default, the orders of spot and margin account are updated. If you need to modify orders of the `cross-margin` account, you must specify account as `cross_margin`. For portfolio margin account, only `cross_margin` account is supported. Currently, only supports modification of `price` or `amount` fields. Regarding rate limiting: modify order and create order sharing rate limiting rules. Regarding matching priority: only modifying the amount does not affect the priority. If the price is modified, the priority will be adjusted to the last of the new price. Note: If the modified amount is less than the fill amount, the order will be cancelled.
1324
+
1325
+
### Example
1326
+
1327
+
* Api Key Authentication (apiv4):
1328
+
```python
1329
+
from__future__import print_function
1330
+
import gate_api
1331
+
from gate_api.exceptions import ApiException, GateApiException
1332
+
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
1333
+
# See configuration.py for a list of all supported configuration parameters.
1334
+
# The client must configure the authentication and authorization parameters
1335
+
# in accordance with the API server security policy.
1336
+
# Examples for each auth method are provided below, use the example that
1337
+
# satisfies your auth use case.
1338
+
1339
+
# Configure APIv4 key authorization
1340
+
configuration = gate_api.Configuration(
1341
+
host="https://api.gateio.ws/api/v4",
1342
+
key="YOU_API_KEY",
1343
+
secret="YOUR_API_SECRET"
1344
+
)
1345
+
1346
+
api_client = gate_api.ApiClient(configuration)
1347
+
# Create an instance of the API class
1348
+
api_instance = gate_api.SpotApi(api_client)
1349
+
order_id ='12345'# str | Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 1 hour after the end of the order. After that, only order ID is accepted.
account ='cross_margin'# str | Specify operation account. Default to spot and margin account if not specified. Set to `cross_margin` to operate against margin account. Portfolio margin account must set to `cross_margin` only (optional)
**order_id** | **str**| Order ID returned, or user custom ID(i.e., `text` field). Operations based on custom ID can only be checked when the order is in orderbook. When the order is finished, it can be checked within 1 hour after the end of the order. After that, only order ID is accepted. |
**account** | **str**| Specify operation account. Default to spot and margin account if not specified. Set to `cross_margin` to operate against margin account. Portfolio margin account must set to `cross_margin` only | [optional]
1372
+
1373
+
### Return type
1374
+
1375
+
[**Order**](Order.md)
1376
+
1377
+
### Authorization
1378
+
1379
+
[apiv4](../README.md#apiv4)
1380
+
1381
+
### HTTP request headers
1382
+
1383
+
-**Content-Type**: application/json
1384
+
-**Accept**: application/json
1385
+
1386
+
### HTTP response details
1387
+
| Status code | Description | Response headers |
1388
+
|-------------|-------------|------------------|
1389
+
**200** | Updated | - |
1390
+
1391
+
[[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)
Copy file name to clipboardExpand all lines: docs/SubAccountApi.md
+6-10Lines changed: 6 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -557,7 +557,7 @@ void (empty response body)
557
557
[[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)
**user_id** | **int**| The user id of the sub-account |
605
-
**body** | **object**| |
606
604
607
605
### Return type
608
606
@@ -614,7 +612,7 @@ void (empty response body)
614
612
615
613
### HTTP request headers
616
614
617
-
-**Content-Type**: application/json
615
+
-**Content-Type**: Not defined
618
616
-**Accept**: Not defined
619
617
620
618
### HTTP response details
@@ -625,7 +623,7 @@ void (empty response body)
625
623
[[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)
0 commit comments