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
String currency ="currency_example"; // String | List records related to specified currency only. If specified, `currency_pair` is also required.
329
329
String currencyPair ="currencyPair_example"; // String | List records related to specified currency pair. Used in combination with `currency`. Ignored if `currency` is not provided
330
-
Long from =56L; // Long | Time range beginning, default to 7 days before current time
331
-
Long to =56L; // Long | Time range ending, default to current time
330
+
Long from =1627706330L; // Long | Start timestamp of the query
331
+
Long to =1635329650L; // Long | Time range ending, default to current time
332
332
Integer page =1; // Integer | Page number
333
333
Integer limit =100; // Integer | Maximum number of records to be returned in a single list
334
334
try {
@@ -360,7 +360,7 @@ Name | Type | Description | Notes
**currency** | **String**| List records related to specified currency only. If specified, `currency_pair` is also required. | [optional]
362
362
**currencyPair** | **String**| List records related to specified currency pair. Used in combination with `currency`. Ignored if `currency` is not provided | [optional]
363
-
**from** | **Long**| Time range beginning, default to 7 days before current time | [optional]
363
+
**from** | **Long**| Start timestamp of the query | [optional]
364
364
**to** | **Long**| Time range ending, default to current time | [optional]
365
365
**page** | **Integer**| Page number | [optional][default to 1]
366
366
**limit** | **Integer**| Maximum number of records to be returned in a single list | [optional][default to 100]
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.
432
+
431
433
### Example
432
434
433
435
```java
@@ -449,11 +451,17 @@ public class Example {
449
451
Integer limit =100; // Integer | Maximum number of records to be returned in a single list
450
452
String lastId ="12345"; // String | Specify list staring point using the `id` of last record in previous list-query results
451
453
Boolean reverse =false; // Boolean | 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.
454
+
Long from =1627706330L; // Long | Start timestamp of the query
455
+
Long to =1635329650L; // Long | Time range ending, default to current time
456
+
Integer page =1; // Integer | Page number
452
457
try {
453
458
List<Trade> result = apiInstance.listTrades(currencyPair)
454
459
.limit(limit)
455
460
.lastId(lastId)
456
461
.reverse(reverse)
462
+
.from(from)
463
+
.to(to)
464
+
.page(page)
457
465
.execute();
458
466
System.out.println(result);
459
467
} catch (GateApiException e) {
@@ -477,6 +485,9 @@ Name | Type | Description | Notes
477
485
**limit** | **Integer**| Maximum number of records to be returned in a single list | [optional][default to 100]
478
486
**lastId** | **String**| Specify list staring point using the `id` of last record in previous list-query results | [optional]
479
487
**reverse** | **Boolean**| 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]
488
+
**from** | **Long**| Start timestamp of the query | [optional]
489
+
**to** | **Long**| Time range ending, default to current time | [optional]
490
+
**page** | **Integer**| Page number | [optional][default to 1]
480
491
481
492
### Return type
482
493
@@ -899,8 +910,8 @@ public class Example {
899
910
Integer page =1; // Integer | Page number
900
911
Integer limit =100; // Integer | Maximum number of records to be returned. If `status` is `open`, maximum of `limit` is 100
901
912
String account ="cross_margin"; // String | Specify operation account. Default to spot and margin account if not specified. Set to `cross_margin` to operate against margin account
902
-
Long from =56L; // Long | Time range beginning, default to 7 days before current time
903
-
Long to =56L; // Long | Time range ending, default to current time
913
+
Long from =1627706330L; // Long | Start timestamp of the query
914
+
Long to =1635329650L; // Long | Time range ending, default to current time
904
915
String side ="sell"; // String | All bids or asks. Both included if not specified
905
916
try {
906
917
List<Order> result = apiInstance.listOrders(currencyPair, status)
@@ -934,7 +945,7 @@ Name | Type | Description | Notes
934
945
**page** | **Integer**| Page number | [optional][default to 1]
935
946
**limit** | **Integer**| Maximum number of records to be returned. If `status` is `open`, maximum of `limit` is 100 | [optional][default to 100]
936
947
**account** | **String**| Specify operation account. Default to spot and margin account if not specified. Set to `cross_margin` to operate against margin account | [optional]
937
-
**from** | **Long**| Time range beginning, default to 7 days before current time | [optional]
948
+
**from** | **Long**| Start timestamp of the query | [optional]
938
949
**to** | **Long**| Time range ending, default to current time | [optional]
939
950
**side** | **String**| All bids or asks. Both included if not specified | [optional][enum: buy, sell]
940
951
@@ -1352,8 +1363,8 @@ public class Example {
1352
1363
Integer page =1; // Integer | Page number
1353
1364
String orderId ="12345"; // String | Filter trades with specified order ID. `currency_pair` is also required if this field is present
1354
1365
String account ="cross_margin"; // String | Specify operation account. Default to spot and margin account if not specified. Set to `cross_margin` to operate against margin account
1355
-
Long from =56L; // Long | Time range beginning, default to 7 days before current time
1356
-
Long to =56L; // Long | Time range ending, default to current time
1366
+
Long from =1627706330L; // Long | Start timestamp of the query
1367
+
Long to =1635329650L; // Long | Time range ending, default to current time
1357
1368
try {
1358
1369
List<Trade> result = apiInstance.listMyTrades(currencyPair)
1359
1370
.limit(limit)
@@ -1386,7 +1397,7 @@ Name | Type | Description | Notes
1386
1397
**page** | **Integer**| Page number | [optional][default to 1]
1387
1398
**orderId** | **String**| Filter trades with specified order ID. `currency_pair` is also required if this field is present | [optional]
1388
1399
**account** | **String**| Specify operation account. Default to spot and margin account if not specified. Set to `cross_margin` to operate against margin account | [optional]
1389
-
**from** | **Long**| Time range beginning, default to 7 days before current time | [optional]
1400
+
**from** | **Long**| Start timestamp of the query | [optional]
1390
1401
**to** | **Long**| Time range ending, default to current time | [optional]
0 commit comments