ccxt 4.2.12 → 4.2.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/README.md +3 -3
  2. package/dist/ccxt.browser.js +1338 -366
  3. package/dist/ccxt.browser.min.js +7 -7
  4. package/dist/cjs/ccxt.js +1 -1
  5. package/dist/cjs/js/ccxt.js +1 -1
  6. package/dist/cjs/js/src/base/Exchange.js +148 -1
  7. package/dist/cjs/js/src/bigone.js +125 -54
  8. package/dist/cjs/js/src/binance.js +142 -27
  9. package/dist/cjs/js/src/binanceus.js +8 -0
  10. package/dist/cjs/js/src/bingx.js +110 -36
  11. package/dist/cjs/js/src/bitget.js +17 -6
  12. package/dist/cjs/js/src/bitmart.js +3 -3
  13. package/dist/cjs/js/src/bybit.js +5 -1
  14. package/dist/cjs/js/src/coinbase.js +176 -26
  15. package/dist/cjs/js/src/coinex.js +3 -0
  16. package/dist/cjs/js/src/coinlist.js +1 -1
  17. package/dist/cjs/js/src/coinone.js +1 -1
  18. package/dist/cjs/js/src/delta.js +7 -1
  19. package/dist/cjs/js/src/deribit.js +1 -1
  20. package/dist/cjs/js/src/gate.js +79 -56
  21. package/dist/cjs/js/src/gemini.js +1 -1
  22. package/dist/cjs/js/src/htx.js +151 -1
  23. package/dist/cjs/js/src/independentreserve.js +7 -5
  24. package/dist/cjs/js/src/kraken.js +22 -14
  25. package/dist/cjs/js/src/kucoin.js +5 -0
  26. package/dist/cjs/js/src/kucoinfutures.js +131 -77
  27. package/dist/cjs/js/src/lbank.js +59 -33
  28. package/dist/cjs/js/src/oceanex.js +1 -1
  29. package/dist/cjs/js/src/okx.js +11 -9
  30. package/dist/cjs/js/src/phemex.js +9 -2
  31. package/dist/cjs/js/src/pro/kraken.js +1 -1
  32. package/dist/cjs/js/src/pro/okx.js +52 -2
  33. package/dist/cjs/js/src/probit.js +4 -2
  34. package/dist/cjs/js/src/wavesexchange.js +1 -1
  35. package/dist/cjs/js/src/woo.js +56 -2
  36. package/js/ccxt.d.ts +1 -1
  37. package/js/ccxt.js +1 -1
  38. package/js/src/abstract/bigone.d.ts +1 -0
  39. package/js/src/abstract/bingx.d.ts +2 -0
  40. package/js/src/abstract/kucoin.d.ts +4 -0
  41. package/js/src/abstract/kucoinfutures.d.ts +4 -0
  42. package/js/src/abstract/okx.d.ts +1 -0
  43. package/js/src/base/Exchange.d.ts +8 -0
  44. package/js/src/base/Exchange.js +148 -1
  45. package/js/src/bigone.d.ts +2 -0
  46. package/js/src/bigone.js +125 -54
  47. package/js/src/binance.d.ts +9 -0
  48. package/js/src/binance.js +142 -27
  49. package/js/src/binanceus.js +8 -0
  50. package/js/src/bingx.js +110 -36
  51. package/js/src/bitget.js +17 -6
  52. package/js/src/bitmart.js +3 -3
  53. package/js/src/bybit.js +5 -1
  54. package/js/src/coinbase.d.ts +26 -3
  55. package/js/src/coinbase.js +176 -26
  56. package/js/src/coinex.js +3 -0
  57. package/js/src/coinlist.js +1 -1
  58. package/js/src/coinone.js +1 -1
  59. package/js/src/delta.js +7 -1
  60. package/js/src/deribit.js +1 -1
  61. package/js/src/gate.js +79 -56
  62. package/js/src/gemini.js +1 -1
  63. package/js/src/htx.d.ts +10 -0
  64. package/js/src/htx.js +151 -1
  65. package/js/src/independentreserve.js +7 -5
  66. package/js/src/kraken.js +22 -14
  67. package/js/src/kucoin.js +5 -0
  68. package/js/src/kucoinfutures.d.ts +4 -2
  69. package/js/src/kucoinfutures.js +131 -77
  70. package/js/src/lbank.js +59 -33
  71. package/js/src/oceanex.js +1 -1
  72. package/js/src/okx.js +11 -9
  73. package/js/src/phemex.js +9 -2
  74. package/js/src/pro/kraken.js +1 -1
  75. package/js/src/pro/okx.d.ts +1 -0
  76. package/js/src/pro/okx.js +52 -2
  77. package/js/src/probit.js +4 -2
  78. package/js/src/wavesexchange.js +1 -1
  79. package/js/src/woo.d.ts +2 -0
  80. package/js/src/woo.js +56 -2
  81. package/package.json +1 -1
@@ -102,7 +102,7 @@ class coinbase extends coinbase$1 {
102
102
  'setLeverage': false,
103
103
  'setMarginMode': false,
104
104
  'setPositionMode': false,
105
- 'withdraw': undefined,
105
+ 'withdraw': true,
106
106
  },
107
107
  'urls': {
108
108
  'logo': 'https://user-images.githubusercontent.com/1294454/40811661-b6eceae2-653a-11e8-829e-10bfadb078cf.jpg',
@@ -773,46 +773,102 @@ class coinbase extends coinbase$1 {
773
773
  // "next_step": null
774
774
  // }
775
775
  //
776
- const subtotalObject = this.safeValue(transaction, 'subtotal', {});
777
- const feeObject = this.safeValue(transaction, 'fee', {});
778
- const id = this.safeString(transaction, 'id');
779
- const timestamp = this.parse8601(this.safeValue(transaction, 'created_at'));
780
- const updated = this.parse8601(this.safeValue(transaction, 'updated_at'));
781
- const type = this.safeString(transaction, 'resource');
782
- const amount = this.safeNumber(subtotalObject, 'amount');
783
- const currencyId = this.safeString(subtotalObject, 'currency');
784
- const code = this.safeCurrencyCode(currencyId, currency);
785
- const feeCost = this.safeNumber(feeObject, 'amount');
786
- const feeCurrencyId = this.safeString(feeObject, 'currency');
787
- const feeCurrency = this.safeCurrencyCode(feeCurrencyId);
788
- const fee = {
789
- 'cost': feeCost,
790
- 'currency': feeCurrency,
791
- };
776
+ // withdraw
777
+ //
778
+ // {
779
+ // "id": "a1794ecf-5693-55fa-70cf-ef731748ed82",
780
+ // "type": "send",
781
+ // "status": "pending",
782
+ // "amount": {
783
+ // "amount": "-14.008308",
784
+ // "currency": "USDC"
785
+ // },
786
+ // "native_amount": {
787
+ // "amount": "-18.74",
788
+ // "currency": "CAD"
789
+ // },
790
+ // "description": null,
791
+ // "created_at": "2024-01-12T01:27:31Z",
792
+ // "updated_at": "2024-01-12T01:27:31Z",
793
+ // "resource": "transaction",
794
+ // "resource_path": "/v2/accounts/a34bgfad-ed67-538b-bffc-730c98c10da0/transactions/a1794ecf-5693-55fa-70cf-ef731748ed82",
795
+ // "instant_exchange": false,
796
+ // "network": {
797
+ // "status": "pending",
798
+ // "status_description": "Pending (est. less than 10 minutes)",
799
+ // "transaction_fee": {
800
+ // "amount": "4.008308",
801
+ // "currency": "USDC"
802
+ // },
803
+ // "transaction_amount": {
804
+ // "amount": "10.000000",
805
+ // "currency": "USDC"
806
+ // },
807
+ // "confirmations": 0
808
+ // },
809
+ // "to": {
810
+ // "resource": "ethereum_address",
811
+ // "address": "0x9...",
812
+ // "currency": "USDC",
813
+ // "address_info": {
814
+ // "address": "0x9..."
815
+ // }
816
+ // },
817
+ // "idem": "748d8591-dg9a-7831-a45b-crd61dg78762",
818
+ // "details": {
819
+ // "title": "Sent USDC",
820
+ // "subtitle": "To USDC address on Ethereum network",
821
+ // "header": "Sent 14.008308 USDC ($18.74)",
822
+ // "health": "warning"
823
+ // },
824
+ // "hide_native_amount": false
825
+ // }
826
+ //
827
+ const transactionType = this.safeString(transaction, 'type');
828
+ let amountAndCurrencyObject = undefined;
829
+ let feeObject = undefined;
830
+ if (transactionType === 'send') {
831
+ const network = this.safeValue(transaction, 'network', {});
832
+ amountAndCurrencyObject = this.safeValue(network, 'transaction_amount', {});
833
+ feeObject = this.safeValue(network, 'transaction_fee', {});
834
+ }
835
+ else {
836
+ amountAndCurrencyObject = this.safeValue(transaction, 'subtotal', {});
837
+ feeObject = this.safeValue(transaction, 'fee', {});
838
+ }
792
839
  let status = this.parseTransactionStatus(this.safeString(transaction, 'status'));
793
840
  if (status === undefined) {
794
841
  const committed = this.safeValue(transaction, 'committed');
795
842
  status = committed ? 'ok' : 'pending';
796
843
  }
844
+ const id = this.safeString(transaction, 'id');
845
+ const currencyId = this.safeString(amountAndCurrencyObject, 'currency');
846
+ const feeCurrencyId = this.safeString(feeObject, 'currency');
847
+ const datetime = this.safeValue(transaction, 'created_at');
848
+ const toObject = this.safeValue(transaction, 'to', {});
849
+ const toAddress = this.safeString(toObject, 'address');
797
850
  return {
798
851
  'info': transaction,
799
852
  'id': id,
800
853
  'txid': id,
801
- 'timestamp': timestamp,
802
- 'datetime': this.iso8601(timestamp),
854
+ 'timestamp': this.parse8601(datetime),
855
+ 'datetime': datetime,
803
856
  'network': undefined,
804
- 'address': undefined,
805
- 'addressTo': undefined,
857
+ 'address': toAddress,
858
+ 'addressTo': toAddress,
806
859
  'addressFrom': undefined,
807
860
  'tag': undefined,
808
861
  'tagTo': undefined,
809
862
  'tagFrom': undefined,
810
- 'type': type,
811
- 'amount': amount,
812
- 'currency': code,
863
+ 'type': this.safeString(transaction, 'resource'),
864
+ 'amount': this.safeNumber(amountAndCurrencyObject, 'amount'),
865
+ 'currency': this.safeCurrencyCode(currencyId, currency),
813
866
  'status': status,
814
- 'updated': updated,
815
- 'fee': fee,
867
+ 'updated': this.parse8601(this.safeValue(transaction, 'updated_at')),
868
+ 'fee': {
869
+ 'cost': this.safeNumber(feeObject, 'amount'),
870
+ 'currency': this.safeCurrencyCode(feeCurrencyId),
871
+ },
816
872
  };
817
873
  }
818
874
  parseTrade(trade, market = undefined) {
@@ -3166,6 +3222,100 @@ class coinbase extends coinbase$1 {
3166
3222
  const tickers = this.safeValue(response, 'pricebooks', []);
3167
3223
  return this.parseTickers(tickers, symbols);
3168
3224
  }
3225
+ async withdraw(code, amount, address, tag = undefined, params = {}) {
3226
+ /**
3227
+ * @method
3228
+ * @name coinbase#withdraw
3229
+ * @description make a withdrawal
3230
+ * @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-transactions#send-money
3231
+ * @param {string} code unified currency code
3232
+ * @param {float} amount the amount to withdraw
3233
+ * @param {string} address the address to withdraw to
3234
+ * @param {string} [tag] an optional tag for the withdrawal
3235
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3236
+ * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
3237
+ */
3238
+ [tag, params] = this.handleWithdrawTagAndParams(tag, params);
3239
+ this.checkAddress(address);
3240
+ await this.loadMarkets();
3241
+ const currency = this.currency(code);
3242
+ let accountId = this.safeString2(params, 'account_id', 'accountId');
3243
+ params = this.omit(params, ['account_id', 'accountId']);
3244
+ if (accountId === undefined) {
3245
+ if (code === undefined) {
3246
+ throw new errors.ArgumentsRequired(this.id + ' withdraw() requires an account_id (or accountId) parameter OR a currency code argument');
3247
+ }
3248
+ accountId = await this.findAccountId(code);
3249
+ if (accountId === undefined) {
3250
+ throw new errors.ExchangeError(this.id + ' withdraw() could not find account id for ' + code);
3251
+ }
3252
+ }
3253
+ const request = {
3254
+ 'account_id': accountId,
3255
+ 'type': 'send',
3256
+ 'to': address,
3257
+ 'amount': amount,
3258
+ 'currency': currency['id'],
3259
+ };
3260
+ if (tag !== undefined) {
3261
+ request['destination_tag'] = tag;
3262
+ }
3263
+ const response = await this.v2PrivatePostAccountsAccountIdTransactions(this.extend(request, params));
3264
+ //
3265
+ // {
3266
+ // "data": {
3267
+ // "id": "a1794ecf-5693-55fa-70cf-ef731748ed82",
3268
+ // "type": "send",
3269
+ // "status": "pending",
3270
+ // "amount": {
3271
+ // "amount": "-14.008308",
3272
+ // "currency": "USDC"
3273
+ // },
3274
+ // "native_amount": {
3275
+ // "amount": "-18.74",
3276
+ // "currency": "CAD"
3277
+ // },
3278
+ // "description": null,
3279
+ // "created_at": "2024-01-12T01:27:31Z",
3280
+ // "updated_at": "2024-01-12T01:27:31Z",
3281
+ // "resource": "transaction",
3282
+ // "resource_path": "/v2/accounts/a34bgfad-ed67-538b-bffc-730c98c10da0/transactions/a1794ecf-5693-55fa-70cf-ef731748ed82",
3283
+ // "instant_exchange": false,
3284
+ // "network": {
3285
+ // "status": "pending",
3286
+ // "status_description": "Pending (est. less than 10 minutes)",
3287
+ // "transaction_fee": {
3288
+ // "amount": "4.008308",
3289
+ // "currency": "USDC"
3290
+ // },
3291
+ // "transaction_amount": {
3292
+ // "amount": "10.000000",
3293
+ // "currency": "USDC"
3294
+ // },
3295
+ // "confirmations": 0
3296
+ // },
3297
+ // "to": {
3298
+ // "resource": "ethereum_address",
3299
+ // "address": "0x9...",
3300
+ // "currency": "USDC",
3301
+ // "address_info": {
3302
+ // "address": "0x9..."
3303
+ // }
3304
+ // },
3305
+ // "idem": "748d8591-dg9a-7831-a45b-crd61dg78762",
3306
+ // "details": {
3307
+ // "title": "Sent USDC",
3308
+ // "subtitle": "To USDC address on Ethereum network",
3309
+ // "header": "Sent 14.008308 USDC ($18.74)",
3310
+ // "health": "warning"
3311
+ // },
3312
+ // "hide_native_amount": false
3313
+ // }
3314
+ // }
3315
+ //
3316
+ const data = this.safeValue(response, 'data', {});
3317
+ return this.parseTransaction(data, currency);
3318
+ }
3169
3319
  sign(path, api = [], method = 'GET', params = {}, headers = undefined, body = undefined) {
3170
3320
  const version = api[0];
3171
3321
  const signed = api[1] === 'private';
@@ -48,6 +48,9 @@ class coinex extends coinex$1 {
48
48
  'createMarketBuyOrderWithCost': true,
49
49
  'createMarketOrderWithCost': false,
50
50
  'createMarketSellOrderWithCost': false,
51
+ 'createTriggerOrder': true,
52
+ 'createTakeProfitOrder': true,
53
+ 'createStopLossOrder': true,
51
54
  'createOrder': true,
52
55
  'createOrders': true,
53
56
  'createReduceOnlyOrder': true,
@@ -750,7 +750,7 @@ class coinlist extends coinlist$1 {
750
750
  request['start_time'] = this.iso8601(since);
751
751
  }
752
752
  if (limit !== undefined) {
753
- request['count'] = limit;
753
+ request['count'] = Math.min(limit, 500);
754
754
  }
755
755
  const until = this.safeInteger2(params, 'till', 'until');
756
756
  if (until !== undefined) {
@@ -709,7 +709,7 @@ class coinone extends coinone$1 {
709
709
  'target_currency': market['base'],
710
710
  };
711
711
  if (limit !== undefined) {
712
- request['size'] = limit; // only support 10, 50, 100, 150, 200
712
+ request['size'] = Math.min(limit, 200);
713
713
  }
714
714
  const response = await this.v2PublicGetTradesQuoteCurrencyTargetCurrency(this.extend(request, params));
715
715
  //
@@ -2071,7 +2071,13 @@ class delta extends delta$1 {
2071
2071
  if (limit !== undefined) {
2072
2072
  request['page_size'] = limit;
2073
2073
  }
2074
- const response = await this[method](this.extend(request, params));
2074
+ let response = undefined;
2075
+ if (method === 'privateGetOrders') {
2076
+ response = await this.privateGetOrders(this.extend(request, params));
2077
+ }
2078
+ else if (method === 'privateGetOrdersHistory') {
2079
+ response = await this.privateGetOrdersHistory(this.extend(request, params));
2080
+ }
2075
2081
  //
2076
2082
  // {
2077
2083
  // "success": true,
@@ -36,11 +36,11 @@ class deribit extends deribit$1 {
36
36
  'cancelOrder': true,
37
37
  'cancelOrders': false,
38
38
  'createDepositAddress': true,
39
- 'createTrailingAmountOrder': true,
40
39
  'createOrder': true,
41
40
  'createStopLimitOrder': true,
42
41
  'createStopMarketOrder': true,
43
42
  'createStopOrder': true,
43
+ 'createTrailingAmountOrder': true,
44
44
  'editOrder': true,
45
45
  'fetchAccounts': true,
46
46
  'fetchBalance': true,
@@ -90,6 +90,9 @@ class gate extends gate$1 {
90
90
  'createReduceOnlyOrder': true,
91
91
  'createStopLimitOrder': true,
92
92
  'createStopMarketOrder': false,
93
+ 'createTriggerOrder': true,
94
+ 'createTakeProfitOrder': true,
95
+ 'createStopLossOrder': true,
93
96
  'createStopOrder': true,
94
97
  'editOrder': true,
95
98
  'fetchBalance': true,
@@ -3120,7 +3123,7 @@ class gate extends gate$1 {
3120
3123
  request['to'] = this.parseToInt(until / 1000);
3121
3124
  }
3122
3125
  if (limit !== undefined) {
3123
- request['limit'] = limit; // default 100, max 1000
3126
+ request['limit'] = Math.min(limit, 1000); // default 100, max 1000
3124
3127
  }
3125
3128
  if (since !== undefined && (market['contract'])) {
3126
3129
  request['from'] = this.parseToInt(since / 1000);
@@ -3766,6 +3769,8 @@ class gate extends gate$1 {
3766
3769
  * @param {object} [params] extra parameters specific to the exchange API endpoint
3767
3770
  * @param {float} [params.stopPrice] The price at which a trigger order is triggered at
3768
3771
  * @param {string} [params.timeInForce] "GTC", "IOC", or "PO"
3772
+ * @param {float} [params.stopLossPrice] The price at which a stop loss order is triggered at
3773
+ * @param {float} [params.takeProfitPrice] The price at which a take profit order is triggered at
3769
3774
  * @param {string} [params.marginMode] 'cross' or 'isolated' - marginMode for margin trading if not provided this.options['defaultMarginMode'] is used
3770
3775
  * @param {int} [params.iceberg] Amount to display for the iceberg order, Null or 0 for normal orders, Set to -1 to hide the order completely
3771
3776
  * @param {string} [params.text] User defined information
@@ -5260,29 +5265,35 @@ class gate extends gate$1 {
5260
5265
  // swap and future
5261
5266
  //
5262
5267
  // {
5263
- // "value": "12.475572",
5268
+ // "value": "4.60516",
5264
5269
  // "leverage": "0",
5265
5270
  // "mode": "single",
5266
5271
  // "realised_point": "0",
5267
5272
  // "contract": "BTC_USDT",
5268
- // "entry_price": "62422.6",
5269
- // "mark_price": "62377.86",
5273
+ // "entry_price": "46030.3",
5274
+ // "mark_price": "46051.6",
5270
5275
  // "history_point": "0",
5271
- // "realised_pnl": "-0.00624226",
5272
- // "close_order": null,
5273
- // "size": "2",
5274
- // "cross_leverage_limit": "25",
5275
- // "pending_orders": "0",
5276
- // "adl_ranking": "5",
5277
- // "maintenance_rate": "0.005",
5278
- // "unrealised_pnl": "-0.008948",
5279
- // "user": "663337",
5280
- // "leverage_max": "100",
5281
- // "history_pnl": "14.98868396636",
5276
+ // "realised_pnl": "-0.002301515",
5277
+ // "close_order": null,
5278
+ // "size": 1,
5279
+ // "cross_leverage_limit": "0",
5280
+ // "pending_orders": 0,
5281
+ // "adl_ranking": 5,
5282
+ // "maintenance_rate": "0.004",
5283
+ // "unrealised_pnl": "0.00213",
5284
+ // "user": 5691076,
5285
+ // "leverage_max": "125",
5286
+ // "history_pnl": "0",
5282
5287
  // "risk_limit": "1000000",
5283
- // "margin": "0.740721495056",
5284
- // "last_close_pnl": "-0.041996015",
5285
- // "liq_price": "59058.58"
5288
+ // "margin": "8.997698485",
5289
+ // "last_close_pnl": "0",
5290
+ // "liq_price": "0",
5291
+ // "update_time": 1705034246,
5292
+ // "update_id": 1,
5293
+ // "initial_margin": "0",
5294
+ // "maintenance_margin": "0",
5295
+ // "open_time": 1705034246,
5296
+ // "trade_max_size": "0"
5286
5297
  // }
5287
5298
  //
5288
5299
  // option
@@ -5333,14 +5344,14 @@ class gate extends gate$1 {
5333
5344
  const takerFee = '0.00075';
5334
5345
  const feePaid = Precise["default"].stringMul(takerFee, notional);
5335
5346
  const initialMarginString = Precise["default"].stringAdd(Precise["default"].stringDiv(notional, leverage), feePaid);
5336
- const timestamp = this.safeInteger(position, 'time_ms');
5347
+ const timestamp = this.safeTimestamp(position, 'open_time');
5337
5348
  return this.safePosition({
5338
5349
  'info': position,
5339
5350
  'id': undefined,
5340
5351
  'symbol': this.safeString(market, 'symbol'),
5341
- 'timestamp': undefined,
5342
- 'datetime': undefined,
5343
- 'lastUpdateTimestamp': timestamp,
5352
+ 'timestamp': timestamp,
5353
+ 'datetime': this.iso8601(timestamp),
5354
+ 'lastUpdateTimestamp': this.safeTimestamp(position, 'update_time'),
5344
5355
  'initialMargin': this.parseNumber(initialMarginString),
5345
5356
  'initialMarginPercentage': this.parseNumber(Precise["default"].stringDiv(initialMarginString, notional)),
5346
5357
  'maintenanceMargin': this.parseNumber(Precise["default"].stringMul(maintenanceRate, notional)),
@@ -5399,29 +5410,35 @@ class gate extends gate$1 {
5399
5410
  // swap and future
5400
5411
  //
5401
5412
  // {
5402
- // "value": "12.475572",
5413
+ // "value": "4.60516",
5403
5414
  // "leverage": "0",
5404
5415
  // "mode": "single",
5405
5416
  // "realised_point": "0",
5406
5417
  // "contract": "BTC_USDT",
5407
- // "entry_price": "62422.6",
5408
- // "mark_price": "62377.86",
5418
+ // "entry_price": "46030.3",
5419
+ // "mark_price": "46051.6",
5409
5420
  // "history_point": "0",
5410
- // "realised_pnl": "-0.00624226",
5411
- // "close_order": null,
5412
- // "size": "2",
5413
- // "cross_leverage_limit": "25",
5414
- // "pending_orders": "0",
5415
- // "adl_ranking": "5",
5416
- // "maintenance_rate": "0.005",
5417
- // "unrealised_pnl": "-0.008948",
5418
- // "user": "6693577",
5419
- // "leverage_max": "100",
5420
- // "history_pnl": "14.98868396636",
5421
+ // "realised_pnl": "-0.002301515",
5422
+ // "close_order": null,
5423
+ // "size": 1,
5424
+ // "cross_leverage_limit": "0",
5425
+ // "pending_orders": 0,
5426
+ // "adl_ranking": 5,
5427
+ // "maintenance_rate": "0.004",
5428
+ // "unrealised_pnl": "0.00213",
5429
+ // "user": 5691076,
5430
+ // "leverage_max": "125",
5431
+ // "history_pnl": "0",
5421
5432
  // "risk_limit": "1000000",
5422
- // "margin": "0.740721495056",
5423
- // "last_close_pnl": "-0.041996015",
5424
- // "liq_price": "59058.58"
5433
+ // "margin": "8.997698485",
5434
+ // "last_close_pnl": "0",
5435
+ // "liq_price": "0",
5436
+ // "update_time": 1705034246,
5437
+ // "update_id": 1,
5438
+ // "initial_margin": "0",
5439
+ // "maintenance_margin": "0",
5440
+ // "open_time": 1705034246,
5441
+ // "trade_max_size": "0"
5425
5442
  // }
5426
5443
  //
5427
5444
  // option
@@ -5501,29 +5518,35 @@ class gate extends gate$1 {
5501
5518
  //
5502
5519
  // [
5503
5520
  // {
5504
- // "value": "12.475572",
5521
+ // "value": "4.602828",
5505
5522
  // "leverage": "0",
5506
5523
  // "mode": "single",
5507
5524
  // "realised_point": "0",
5508
5525
  // "contract": "BTC_USDT",
5509
- // "entry_price": "62422.6",
5510
- // "mark_price": "62377.86",
5526
+ // "entry_price": "46030.3",
5527
+ // "mark_price": "46028.28",
5511
5528
  // "history_point": "0",
5512
- // "realised_pnl": "-0.00624226",
5513
- // "close_order": null,
5514
- // "size": "2",
5515
- // "cross_leverage_limit": "25",
5516
- // "pending_orders": "0",
5517
- // "adl_ranking": "5",
5518
- // "maintenance_rate": "0.005",
5519
- // "unrealised_pnl": "-0.008948",
5520
- // "user": "6693577",
5521
- // "leverage_max": "100",
5522
- // "history_pnl": "14.98868396636",
5529
+ // "realised_pnl": "-0.002301515",
5530
+ // "close_order": null,
5531
+ // "size": 1,
5532
+ // "cross_leverage_limit": "0",
5533
+ // "pending_orders": 0,
5534
+ // "adl_ranking": 5,
5535
+ // "maintenance_rate": "0.004",
5536
+ // "unrealised_pnl": "-0.000202",
5537
+ // "user": 5691076,
5538
+ // "leverage_max": "125",
5539
+ // "history_pnl": "0",
5523
5540
  // "risk_limit": "1000000",
5524
- // "margin": "0.740721495056",
5525
- // "last_close_pnl": "-0.041996015",
5526
- // "liq_price": "59058.58"
5541
+ // "margin": "8.997698485",
5542
+ // "last_close_pnl": "0",
5543
+ // "liq_price": "0",
5544
+ // "update_time": 1705034246,
5545
+ // "update_id": 1,
5546
+ // "initial_margin": "0",
5547
+ // "maintenance_margin": "0",
5548
+ // "open_time": 1705034246,
5549
+ // "trade_max_size": "0"
5527
5550
  // }
5528
5551
  // ]
5529
5552
  //
@@ -951,7 +951,7 @@ class gemini extends gemini$1 {
951
951
  'symbol': market['id'],
952
952
  };
953
953
  if (limit !== undefined) {
954
- request['limit_trades'] = limit;
954
+ request['limit_trades'] = Math.min(limit, 500);
955
955
  }
956
956
  if (since !== undefined) {
957
957
  request['timestamp'] = since;