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
currency ='currency_example'# str | List records related to specified currency only. If specified, `currency_pair` is also required. (optional)
310
310
currency_pair ='currency_pair_example'# str | List records related to specified currency pair. Used in combination with `currency`. Ignored if `currency` is not provided (optional)
311
-
_from =56# int | Time range beginning, default to 7 days before current time (optional)
312
-
to =56# int | Time range ending, default to current time (optional)
311
+
_from =1627706330# int | Start timestamp of the query (optional)
312
+
to =1635329650# int | Time range ending, default to current time (optional)
313
313
page =1# int | Page number (optional) (default to 1)
314
314
limit =100# int | Maximum number of records to be returned in a single list (optional) (default to 100)
315
315
@@ -329,7 +329,7 @@ Name | Type | Description | Notes
**currency** | **str**| List records related to specified currency only. If specified, `currency_pair` is also required. | [optional]
331
331
**currency_pair** | **str**| List records related to specified currency pair. Used in combination with `currency`. Ignored if `currency` is not provided | [optional]
332
-
**_from** | **int**| Time range beginning, default to 7 days before current time | [optional]
332
+
**_from** | **int**| Start timestamp of the query | [optional]
333
333
**to** | **int**| Time range ending, default to current time | [optional]
334
334
**page** | **int**| Page number | [optional][default to 1]
335
335
**limit** | **int**| Maximum number of records to be returned in a single list | [optional][default to 100]
Copy file name to clipboardExpand all lines: docs/SpotApi.md
+16-8Lines changed: 16 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -381,10 +381,12 @@ No authorization required
381
381
[[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)
You can use `from` and `to` to query by time range, or use `last_id` by scrolling page. The default behavior is by time range. Scrolling query using `last_id` is not recommended any more. If `last_id` is specified, time range query parameters will be ignored.
limit =100# int | Maximum number of records to be returned in a single list (optional) (default to 100)
405
407
last_id ='12345'# str | Specify list staring point using the `id` of last record in previous list-query results (optional)
406
408
reverse =False# bool | Whether the id of records to be retrieved should be smaller than the last_id specified- true: Retrieve records where id is smaller than the specified last_id- false: Retrieve records where id is larger than the specified last_idDefault to false. When `last_id` is specified. Set `reverse` to `true` to trace back trading history; `false` to retrieve latest tradings. No effect if `last_id` is not specified. (optional) (default to False)
409
+
_from =1627706330# int | Start timestamp of the query (optional)
410
+
to =1635329650# int | Time range ending, default to current time (optional)
411
+
page =1# int | Page number (optional) (default to 1)
print("Gate api exception, label: %s, message: %s\n"% (ex.label, ex.message))
@@ -423,6 +428,9 @@ Name | Type | Description | Notes
423
428
**limit** | **int**| Maximum number of records to be returned in a single list | [optional][default to 100]
424
429
**last_id** | **str**| Specify list staring point using the `id` of last record in previous list-query results | [optional]
425
430
**reverse** | **bool**| Whether the id of records to be retrieved should be smaller than the last_id specified- true: Retrieve records where id is smaller than the specified last_id- false: Retrieve records where id is larger than the specified last_idDefault to false. When `last_id` is specified. Set `reverse` to `true` to trace back trading history; `false` to retrieve latest tradings. No effect if `last_id` is not specified. | [optional][default to False]
431
+
**_from** | **int**| Start timestamp of the query | [optional]
432
+
**to** | **int**| Time range ending, default to current time | [optional]
433
+
**page** | **int**| Page number | [optional][default to 1]
426
434
427
435
### Return type
428
436
@@ -826,8 +834,8 @@ status = 'open' # str | List orders based on status `open` - order is waiting t
826
834
page =1# int | Page number (optional) (default to 1)
827
835
limit =100# int | Maximum number of records to be returned. If `status` is `open`, maximum of `limit` is 100 (optional) (default to 100)
828
836
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 (optional)
829
-
_from =56# int | Time range beginning, default to 7 days before current time (optional)
830
-
to =56# int | Time range ending, default to current time (optional)
837
+
_from =1627706330# int | Start timestamp of the query (optional)
838
+
to =1635329650# int | Time range ending, default to current time (optional)
831
839
side ='sell'# str | All bids or asks. Both included if not specified (optional)
832
840
833
841
try:
@@ -849,7 +857,7 @@ Name | Type | Description | Notes
849
857
**page** | **int**| Page number | [optional][default to 1]
850
858
**limit** | **int**| Maximum number of records to be returned. If `status` is `open`, maximum of `limit` is 100 | [optional][default to 100]
851
859
**account** | **str**| Specify operation account. Default to spot and margin account if not specified. Set to `cross_margin` to operate against margin account | [optional]
852
-
**_from** | **int**| Time range beginning, default to 7 days before current time | [optional]
860
+
**_from** | **int**| Start timestamp of the query | [optional]
853
861
**to** | **int**| Time range ending, default to current time | [optional]
854
862
**side** | **str**| All bids or asks. Both included if not specified | [optional]
855
863
@@ -1266,8 +1274,8 @@ limit = 100 # int | Maximum number of records to be returned in a single list (o
1266
1274
page =1# int | Page number (optional) (default to 1)
1267
1275
order_id ='12345'# str | Filter trades with specified order ID. `currency_pair` is also required if this field is present (optional)
1268
1276
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 (optional)
1269
-
_from =56# int | Time range beginning, default to 7 days before current time (optional)
1270
-
to =56# int | Time range ending, default to current time (optional)
1277
+
_from =1627706330# int | Start timestamp of the query (optional)
1278
+
to =1635329650# int | Time range ending, default to current time (optional)
1271
1279
1272
1280
try:
1273
1281
# List personal trading history
@@ -1288,7 +1296,7 @@ Name | Type | Description | Notes
1288
1296
**page** | **int**| Page number | [optional][default to 1]
1289
1297
**order_id** | **str**| Filter trades with specified order ID. `currency_pair` is also required if this field is present | [optional]
1290
1298
**account** | **str**| Specify operation account. Default to spot and margin account if not specified. Set to `cross_margin` to operate against margin account | [optional]
1291
-
**_from** | **int**| Time range beginning, default to 7 days before current time | [optional]
1299
+
**_from** | **int**| Start timestamp of the query | [optional]
1292
1300
**to** | **int**| Time range ending, default to current time | [optional]
0 commit comments