ccxt 4.4.47 → 4.4.48

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 (77) hide show
  1. package/README.md +3 -3
  2. package/dist/ccxt.browser.min.js +16 -16
  3. package/dist/cjs/ccxt.js +1 -1
  4. package/dist/cjs/src/ace.js +1 -1
  5. package/dist/cjs/src/binance.js +18 -14
  6. package/dist/cjs/src/bitget.js +4 -2
  7. package/dist/cjs/src/bitmart.js +7 -2
  8. package/dist/cjs/src/bitmex.js +8 -5
  9. package/dist/cjs/src/bybit.js +7 -2
  10. package/dist/cjs/src/coinbase.js +11 -1
  11. package/dist/cjs/src/coincatch.js +86 -2
  12. package/dist/cjs/src/coincheck.js +52 -0
  13. package/dist/cjs/src/coinlist.js +77 -0
  14. package/dist/cjs/src/coinmate.js +63 -0
  15. package/dist/cjs/src/coinmetro.js +68 -0
  16. package/dist/cjs/src/coinone.js +56 -0
  17. package/dist/cjs/src/coinsph.js +67 -1
  18. package/dist/cjs/src/coinspot.js +47 -0
  19. package/dist/cjs/src/currencycom.js +72 -0
  20. package/dist/cjs/src/defx.js +93 -6
  21. package/dist/cjs/src/delta.js +83 -1
  22. package/dist/cjs/src/gate.js +10 -1
  23. package/dist/cjs/src/htx.js +10 -2
  24. package/dist/cjs/src/hyperliquid.js +6 -1
  25. package/dist/cjs/src/independentreserve.js +60 -0
  26. package/dist/cjs/src/kraken.js +1 -1
  27. package/dist/cjs/src/krakenfutures.js +4 -4
  28. package/dist/cjs/src/okx.js +9 -1
  29. package/dist/cjs/src/paradex.js +5 -2
  30. package/dist/cjs/src/phemex.js +103 -0
  31. package/dist/cjs/src/poloniex.js +61 -0
  32. package/dist/cjs/src/poloniexfutures.js +74 -0
  33. package/dist/cjs/src/upbit.js +61 -0
  34. package/dist/cjs/src/woo.js +6 -1
  35. package/js/ccxt.d.ts +1 -1
  36. package/js/ccxt.js +1 -1
  37. package/js/src/abstract/independentreserve.d.ts +6 -0
  38. package/js/src/ace.js +1 -1
  39. package/js/src/binance.d.ts +7 -0
  40. package/js/src/binance.js +18 -14
  41. package/js/src/bitget.js +4 -2
  42. package/js/src/bitmart.js +7 -2
  43. package/js/src/bitmex.js +8 -5
  44. package/js/src/bybit.d.ts +1 -1
  45. package/js/src/bybit.js +7 -2
  46. package/js/src/coinbase.d.ts +1 -0
  47. package/js/src/coinbase.js +11 -1
  48. package/js/src/coincatch.d.ts +1 -2
  49. package/js/src/coincatch.js +86 -2
  50. package/js/src/coincheck.js +52 -0
  51. package/js/src/coinlist.js +77 -0
  52. package/js/src/coinmate.js +63 -0
  53. package/js/src/coinmetro.js +68 -0
  54. package/js/src/coinone.js +56 -0
  55. package/js/src/coinsph.d.ts +1 -1
  56. package/js/src/coinsph.js +67 -1
  57. package/js/src/coinspot.js +47 -0
  58. package/js/src/currencycom.js +72 -0
  59. package/js/src/defx.js +93 -6
  60. package/js/src/delta.js +83 -1
  61. package/js/src/gate.d.ts +1 -0
  62. package/js/src/gate.js +10 -1
  63. package/js/src/htx.d.ts +1 -0
  64. package/js/src/htx.js +10 -2
  65. package/js/src/hyperliquid.js +6 -1
  66. package/js/src/independentreserve.js +60 -0
  67. package/js/src/kraken.js +1 -1
  68. package/js/src/krakenfutures.js +4 -4
  69. package/js/src/okx.d.ts +1 -0
  70. package/js/src/okx.js +9 -1
  71. package/js/src/paradex.js +5 -2
  72. package/js/src/phemex.js +103 -0
  73. package/js/src/poloniex.js +61 -0
  74. package/js/src/poloniexfutures.js +74 -0
  75. package/js/src/upbit.js +61 -0
  76. package/js/src/woo.js +6 -1
  77. package/package.json +1 -1
@@ -106,6 +106,9 @@ class independentreserve extends independentreserve$1 {
106
106
  'GetFxRates',
107
107
  'GetOrderMinimumVolumes',
108
108
  'GetCryptoWithdrawalFees',
109
+ 'GetCryptoWithdrawalFees2',
110
+ 'GetNetworks',
111
+ 'GetPrimaryCurrencyConfig2',
109
112
  ],
110
113
  },
111
114
  'private': {
@@ -118,7 +121,9 @@ class independentreserve extends independentreserve$1 {
118
121
  'GetTransactions',
119
122
  'GetFiatBankAccounts',
120
123
  'GetDigitalCurrencyDepositAddress',
124
+ 'GetDigitalCurrencyDepositAddress2',
121
125
  'GetDigitalCurrencyDepositAddresses',
126
+ 'GetDigitalCurrencyDepositAddresses2',
122
127
  'GetTrades',
123
128
  'GetBrokerageFees',
124
129
  'GetDigitalCurrencyWithdrawal',
@@ -129,6 +134,7 @@ class independentreserve extends independentreserve$1 {
129
134
  'RequestFiatWithdrawal',
130
135
  'WithdrawFiatCurrency',
131
136
  'WithdrawDigitalCurrency',
137
+ 'WithdrawCrypto',
132
138
  ],
133
139
  },
134
140
  },
@@ -144,6 +150,60 @@ class independentreserve extends independentreserve$1 {
144
150
  'PLA': 'PlayChip',
145
151
  },
146
152
  'precisionMode': number.TICK_SIZE,
153
+ 'options': {
154
+ 'defaultNetworks': {
155
+ 'USDT': 'Ethereum',
156
+ 'USDC': 'Ethereum',
157
+ 'BTC': 'Bitcoin',
158
+ 'BCH': 'BitcoinCash',
159
+ 'ETH': 'Ethereum',
160
+ 'LTC': 'Litecoin',
161
+ 'XRP': 'XrpLedger',
162
+ 'ZRX': 'Ethereum',
163
+ 'EOS': 'EosIo',
164
+ 'XLM': 'Stellar',
165
+ 'BAT': 'Ethereum',
166
+ 'ETC': 'EthereumClassic',
167
+ 'LINK': 'Ethereum',
168
+ 'MKR': 'Ethereum',
169
+ 'DAI': 'Ethereum',
170
+ 'COMP': 'Ethereum',
171
+ 'SNX': 'Ethereum',
172
+ 'YFI': 'Ethereum',
173
+ 'AAVE': 'Ethereum',
174
+ 'GRT': 'Ethereum',
175
+ 'DOT': 'Polkadot',
176
+ 'UNI': 'Ethereum',
177
+ 'ADA': 'Cardano',
178
+ 'MATIC': 'Ethereum',
179
+ 'DOGE': 'Dogecoin',
180
+ 'SOL': 'Solana',
181
+ 'MANA': 'Ethereum',
182
+ 'SAND': 'Ethereum',
183
+ 'SHIB': 'Ethereum',
184
+ 'TRX': 'Tron',
185
+ 'RENDER': 'Solana',
186
+ 'WIF': 'Solana',
187
+ 'RLUSD': 'Ethereum',
188
+ 'PEPE': 'Ethereum',
189
+ },
190
+ 'networks': {
191
+ 'BTC': 'Bitcoin',
192
+ 'ETH': 'Ethereum',
193
+ 'BCH': 'BitcoinCash',
194
+ 'LTC': 'Litecoin',
195
+ 'XRP': 'XrpLedger',
196
+ 'EOS': 'EosIo',
197
+ 'XLM': 'Stellar',
198
+ 'ETC': 'EthereumClassic',
199
+ 'BSV': 'BitcoinSV',
200
+ 'DOGE': 'Dogecoin',
201
+ 'DOT': 'Polkadot',
202
+ 'ADA': 'Cardano',
203
+ 'SOL': 'Solana',
204
+ 'TRX': 'Tron',
205
+ },
206
+ },
147
207
  });
148
208
  }
149
209
  /**
@@ -692,7 +692,7 @@ class kraken extends kraken$1 {
692
692
  if (currencyId !== undefined) {
693
693
  if (currencyId.length > 3) {
694
694
  if ((currencyId.indexOf('X') === 0) || (currencyId.indexOf('Z') === 0)) {
695
- if (!(currencyId.indexOf('.') > 0)) {
695
+ if (!(currencyId.indexOf('.') > 0) && (currencyId !== 'ZEUS')) {
696
696
  currencyId = currencyId.slice(1);
697
697
  }
698
698
  }
@@ -2585,18 +2585,18 @@ class krakenfutures extends krakenfutures$1 {
2585
2585
  for (let i = 0; i < marginLevels.length; i++) {
2586
2586
  const tier = marginLevels[i];
2587
2587
  const initialMargin = this.safeString(tier, 'initialMargin');
2588
- const notionalFloor = this.safeNumber(tier, 'contracts');
2588
+ const minNotional = this.safeNumber(tier, 'numNonContractUnits');
2589
2589
  if (i !== 0) {
2590
2590
  const tiersLength = tiers.length;
2591
2591
  const previousTier = tiers[tiersLength - 1];
2592
- previousTier['notionalCap'] = notionalFloor;
2592
+ previousTier['maxNotional'] = minNotional;
2593
2593
  }
2594
2594
  tiers.push({
2595
2595
  'tier': this.sum(i, 1),
2596
2596
  'symbol': this.safeSymbol(marketId, market),
2597
2597
  'currency': market['quote'],
2598
- 'notionalFloor': notionalFloor,
2599
- 'notionalCap': undefined,
2598
+ 'minNotional': minNotional,
2599
+ 'maxNotional': undefined,
2600
2600
  'maintenanceMarginRate': this.safeNumber(tier, 'maintenanceMargin'),
2601
2601
  'maxLeverage': this.parseNumber(Precise["default"].stringDiv('1', initialMargin)),
2602
2602
  'info': tier,
@@ -1113,6 +1113,8 @@ class okx extends okx$1 {
1113
1113
  'createOrder': 'privatePostTradeBatchOrders',
1114
1114
  'createMarketBuyOrderRequiresPrice': false,
1115
1115
  'fetchMarkets': ['spot', 'future', 'swap', 'option'],
1116
+ 'timeDifference': 0,
1117
+ 'adjustForTimeDifference': false,
1116
1118
  'defaultType': 'spot',
1117
1119
  // 'fetchBalance': {
1118
1120
  // 'type': 'spot', // 'funding', 'trading', 'spot'
@@ -1487,6 +1489,9 @@ class okx extends okx$1 {
1487
1489
  }
1488
1490
  return result;
1489
1491
  }
1492
+ nonce() {
1493
+ return this.milliseconds() - this.options['timeDifference'];
1494
+ }
1490
1495
  /**
1491
1496
  * @method
1492
1497
  * @name okx#fetchMarkets
@@ -1496,6 +1501,9 @@ class okx extends okx$1 {
1496
1501
  * @returns {object[]} an array of objects representing market data
1497
1502
  */
1498
1503
  async fetchMarkets(params = {}) {
1504
+ if (this.options['adjustForTimeDifference']) {
1505
+ await this.loadTimeDifference();
1506
+ }
1499
1507
  const types = this.safeList(this.options, 'fetchMarkets', []);
1500
1508
  let promises = [];
1501
1509
  let result = [];
@@ -6179,7 +6187,7 @@ class okx extends okx$1 {
6179
6187
  }
6180
6188
  }
6181
6189
  }
6182
- const timestamp = this.iso8601(this.milliseconds());
6190
+ const timestamp = this.iso8601(this.nonce());
6183
6191
  headers = {
6184
6192
  'OK-ACCESS-KEY': this.apiKey,
6185
6193
  'OK-ACCESS-PASSPHRASE': this.password,
@@ -266,7 +266,9 @@ class paradex extends paradex$1 {
266
266
  '40111': errors.AuthenticationError,
267
267
  '40112': errors.PermissionDenied, // Geo IP blocked
268
268
  },
269
- 'broad': {},
269
+ 'broad': {
270
+ 'missing or malformed jwt': errors.AuthenticationError,
271
+ },
270
272
  },
271
273
  'precisionMode': number.TICK_SIZE,
272
274
  'commonCurrencies': {},
@@ -1029,7 +1031,8 @@ class paradex extends paradex$1 {
1029
1031
  }
1030
1032
  }
1031
1033
  const account = await this.retrieveAccount();
1032
- const expires = now + 86400 * 7;
1034
+ // https://docs.paradex.trade/api-reference/general-information/authentication
1035
+ const expires = now + 180;
1033
1036
  const req = {
1034
1037
  'method': 'POST',
1035
1038
  'path': '/v1/auth',
@@ -290,6 +290,109 @@ class phemex extends phemex$1 {
290
290
  'maker': this.parseNumber('0.001'),
291
291
  },
292
292
  },
293
+ 'features': {
294
+ 'default': {
295
+ 'sandbox': true,
296
+ 'createOrder': {
297
+ 'marginMode': false,
298
+ 'triggerPrice': true,
299
+ // todo
300
+ 'triggerPriceType': {
301
+ 'mark': true,
302
+ 'last': true,
303
+ 'index': true,
304
+ },
305
+ 'triggerDirection': false,
306
+ 'stopLossPrice': false,
307
+ 'takeProfitPrice': false,
308
+ 'attachedStopLossTakeProfit': undefined,
309
+ 'timeInForce': {
310
+ 'IOC': true,
311
+ 'FOK': true,
312
+ 'PO': true,
313
+ 'GTD': false,
314
+ },
315
+ 'hedged': false,
316
+ 'leverage': false,
317
+ 'marketBuyByCost': true,
318
+ 'marketBuyRequiresPrice': false,
319
+ 'selfTradePrevention': false,
320
+ 'trailing': false,
321
+ 'iceberg': false,
322
+ },
323
+ 'createOrders': undefined,
324
+ 'fetchMyTrades': {
325
+ 'marginMode': false,
326
+ 'limit': 200,
327
+ 'daysBack': 100000,
328
+ 'untilDays': 2, // todo implement
329
+ },
330
+ 'fetchOrder': {
331
+ 'marginMode': false,
332
+ 'trigger': false,
333
+ 'trailing': false,
334
+ },
335
+ 'fetchOpenOrders': {
336
+ 'marginMode': false,
337
+ 'limit': undefined,
338
+ 'trigger': false,
339
+ 'trailing': false,
340
+ },
341
+ 'fetchOrders': {
342
+ 'marginMode': false,
343
+ 'limit': undefined,
344
+ 'daysBack': undefined,
345
+ 'untilDays': undefined,
346
+ 'trigger': false,
347
+ 'trailing': false,
348
+ },
349
+ 'fetchClosedOrders': {
350
+ 'marginMode': false,
351
+ 'limit': 200,
352
+ 'daysBack': 100000,
353
+ 'daysBackCanceled': 100000,
354
+ 'untilDays': 2,
355
+ 'trigger': false,
356
+ 'trailing': false,
357
+ },
358
+ 'fetchOHLCV': {
359
+ 'limit': 1000,
360
+ },
361
+ },
362
+ 'spot': {
363
+ 'extends': 'default',
364
+ },
365
+ 'forDerivatives': {
366
+ 'extends': 'default',
367
+ 'createOrder': {
368
+ 'triggerDirection': true,
369
+ 'attachedStopLossTakeProfit': {
370
+ 'triggerPriceType': {
371
+ 'mark': true,
372
+ 'last': true,
373
+ 'index': true,
374
+ },
375
+ 'price': true,
376
+ },
377
+ 'hedged': true,
378
+ },
379
+ 'fetchOHLCV': {
380
+ 'limit': 2000,
381
+ },
382
+ },
383
+ 'swap': {
384
+ 'linear': {
385
+ 'extends': 'forDerivatives',
386
+ },
387
+ 'inverse': {
388
+ 'extends': 'forDerivatives',
389
+ },
390
+ },
391
+ 'future': {
392
+ 'linear': undefined,
393
+ 'inverse': undefined,
394
+ },
395
+ },
293
396
  'requiredCredentials': {
294
397
  'apiKey': true,
295
398
  'secret': true,
@@ -271,6 +271,67 @@ class poloniex extends poloniex$1 {
271
271
  'futures': 'future',
272
272
  },
273
273
  },
274
+ 'features': {
275
+ 'default': {
276
+ 'sandbox': true,
277
+ 'createOrder': {
278
+ 'marginMode': true,
279
+ 'triggerPrice': true,
280
+ 'triggerPriceType': undefined,
281
+ 'triggerDirection': false,
282
+ 'stopLossPrice': false,
283
+ 'takeProfitPrice': false,
284
+ 'attachedStopLossTakeProfit': undefined,
285
+ 'timeInForce': {
286
+ 'IOC': true,
287
+ 'FOK': true,
288
+ 'PO': false,
289
+ 'GTD': false,
290
+ },
291
+ 'hedged': false,
292
+ 'leverage': false,
293
+ 'marketBuyByCost': true,
294
+ 'marketBuyRequiresPrice': false,
295
+ 'selfTradePrevention': true,
296
+ 'trailing': false,
297
+ 'iceberg': false,
298
+ },
299
+ 'createOrders': undefined,
300
+ 'fetchMyTrades': {
301
+ 'marginMode': false,
302
+ 'limit': 1000,
303
+ 'daysBack': 100000,
304
+ 'untilDays': 100000,
305
+ },
306
+ 'fetchOrder': {
307
+ 'marginMode': false,
308
+ 'trigger': false,
309
+ 'trailing': false,
310
+ },
311
+ 'fetchOpenOrders': {
312
+ 'marginMode': false,
313
+ 'limit': 2000,
314
+ 'trigger': false,
315
+ 'trailing': false,
316
+ },
317
+ 'fetchOrders': undefined,
318
+ 'fetchClosedOrders': undefined,
319
+ 'fetchOHLCV': {
320
+ 'limit': 500,
321
+ },
322
+ },
323
+ 'spot': {
324
+ 'extends': 'default',
325
+ },
326
+ 'swap': {
327
+ 'linear': undefined,
328
+ 'inverse': undefined,
329
+ },
330
+ 'future': {
331
+ 'linear': undefined,
332
+ 'inverse': undefined,
333
+ },
334
+ },
274
335
  'precisionMode': number.TICK_SIZE,
275
336
  'exceptions': {
276
337
  'exact': {
@@ -178,6 +178,80 @@ class poloniexfutures extends poloniexfutures$1 {
178
178
  },
179
179
  },
180
180
  },
181
+ 'features': {
182
+ 'default': {
183
+ 'sandbox': false,
184
+ 'createOrder': {
185
+ 'marginMode': false,
186
+ 'triggerPrice': true,
187
+ // todo implementation
188
+ 'triggerPriceType': {
189
+ 'last': true,
190
+ 'mark': true,
191
+ 'index': true,
192
+ },
193
+ 'triggerDirection': true,
194
+ 'stopLossPrice': false,
195
+ 'takeProfitPrice': false,
196
+ 'attachedStopLossTakeProfit': undefined,
197
+ 'timeInForce': {
198
+ 'IOC': true,
199
+ 'FOK': false,
200
+ 'PO': true,
201
+ 'GTD': false,
202
+ },
203
+ 'hedged': false,
204
+ 'leverage': true,
205
+ 'marketBuyByCost': true,
206
+ 'marketBuyRequiresPrice': false,
207
+ 'selfTradePrevention': false,
208
+ 'trailing': false,
209
+ 'iceberg': true, // deprecated?
210
+ },
211
+ 'createOrders': undefined,
212
+ 'fetchMyTrades': {
213
+ 'marginMode': false,
214
+ 'limit': undefined,
215
+ 'daysBack': 100000,
216
+ 'untilDays': 7,
217
+ },
218
+ 'fetchOrder': {
219
+ 'marginMode': false,
220
+ 'trigger': false,
221
+ 'trailing': false,
222
+ },
223
+ 'fetchOpenOrders': {
224
+ 'marginMode': true,
225
+ 'limit': undefined,
226
+ 'trigger': false,
227
+ 'trailing': false,
228
+ },
229
+ 'fetchOrders': undefined,
230
+ 'fetchClosedOrders': {
231
+ 'marginMode': false,
232
+ 'limit': 100,
233
+ 'daysBack': 100000,
234
+ 'daysBackCanceled': 1,
235
+ 'untilDays': 100000,
236
+ 'trigger': false,
237
+ 'trailing': false,
238
+ },
239
+ 'fetchOHLCV': {
240
+ 'limit': 200, // todo implement
241
+ },
242
+ },
243
+ 'spot': undefined,
244
+ 'swap': {
245
+ 'linear': {
246
+ 'extends': 'default',
247
+ },
248
+ 'inverse': undefined,
249
+ },
250
+ 'future': {
251
+ 'linear': undefined,
252
+ 'inverse': undefined,
253
+ },
254
+ },
181
255
  'exceptions': {
182
256
  'exact': {
183
257
  '400': errors.BadRequest,
@@ -164,6 +164,67 @@ class upbit extends upbit$1 {
164
164
  'deposit': {},
165
165
  },
166
166
  },
167
+ 'features': {
168
+ 'spot': {
169
+ 'sandbox': false,
170
+ 'createOrder': {
171
+ 'marginMode': false,
172
+ 'triggerPrice': false,
173
+ 'triggerPriceType': undefined,
174
+ 'triggerDirection': false,
175
+ 'stopLossPrice': false,
176
+ 'takeProfitPrice': false,
177
+ 'attachedStopLossTakeProfit': undefined,
178
+ 'timeInForce': {
179
+ 'IOC': true,
180
+ 'FOK': true,
181
+ 'PO': false,
182
+ 'GTD': false,
183
+ },
184
+ 'hedged': false,
185
+ 'leverage': false,
186
+ 'marketBuyByCost': false,
187
+ 'marketBuyRequiresPrice': false,
188
+ 'selfTradePrevention': false,
189
+ 'trailing': false,
190
+ 'iceberg': false,
191
+ },
192
+ 'createOrders': undefined,
193
+ 'fetchMyTrades': undefined,
194
+ 'fetchOrder': {
195
+ 'marginMode': false,
196
+ 'trigger': false,
197
+ 'trailing': false,
198
+ },
199
+ 'fetchOpenOrders': {
200
+ 'marginMode': true,
201
+ 'limit': 100,
202
+ 'trigger': false,
203
+ 'trailing': false,
204
+ },
205
+ 'fetchOrders': undefined,
206
+ 'fetchClosedOrders': {
207
+ 'marginMode': false,
208
+ 'limit': 1000,
209
+ 'daysBack': 100000,
210
+ 'daysBackCanceled': 1,
211
+ 'untilDays': 7,
212
+ 'trigger': false,
213
+ 'trailing': false,
214
+ },
215
+ 'fetchOHLCV': {
216
+ 'limit': 200,
217
+ },
218
+ },
219
+ 'swap': {
220
+ 'linear': undefined,
221
+ 'inverse': undefined,
222
+ },
223
+ 'future': {
224
+ 'linear': undefined,
225
+ 'inverse': undefined,
226
+ },
227
+ },
167
228
  'precisionMode': number.TICK_SIZE,
168
229
  'exceptions': {
169
230
  'exact': {
@@ -285,6 +285,8 @@ class woo extends woo$1 {
285
285
  },
286
286
  },
287
287
  'options': {
288
+ 'timeDifference': 0,
289
+ 'adjustForTimeDifference': false,
288
290
  'sandboxMode': false,
289
291
  'createMarketBuyOrderRequiresPrice': true,
290
292
  // these network aliases require manual mapping here
@@ -500,6 +502,9 @@ class woo extends woo$1 {
500
502
  * @returns {object[]} an array of objects representing market data
501
503
  */
502
504
  async fetchMarkets(params = {}) {
505
+ if (this.options['adjustForTimeDifference']) {
506
+ await this.loadTimeDifference();
507
+ }
503
508
  const response = await this.v1PublicGetInfo(params);
504
509
  //
505
510
  // {
@@ -2640,7 +2645,7 @@ class woo extends woo$1 {
2640
2645
  };
2641
2646
  }
2642
2647
  nonce() {
2643
- return this.milliseconds();
2648
+ return this.milliseconds() - this.options['timeDifference'];
2644
2649
  }
2645
2650
  sign(path, section = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
2646
2651
  const version = section[0];
package/js/ccxt.d.ts CHANGED
@@ -4,7 +4,7 @@ import * as functions from './src/base/functions.js';
4
4
  import * as errors from './src/base/errors.js';
5
5
  import type { Int, int, Str, Strings, Num, Bool, IndexType, OrderSide, OrderType, MarketType, SubType, Dict, NullableDict, List, NullableList, Fee, OHLCV, OHLCVC, implicitReturnType, Market, Currency, Dictionary, MinMax, FeeInterface, TradingFeeInterface, MarketInterface, Trade, Order, OrderBook, Ticker, Transaction, Tickers, CurrencyInterface, Balance, BalanceAccount, Account, PartialBalances, Balances, DepositAddress, WithdrawalResponse, DepositAddressResponse, FundingRate, FundingRates, Position, BorrowInterest, LeverageTier, LedgerEntry, DepositWithdrawFeeNetwork, DepositWithdrawFee, TransferEntry, CrossBorrowRate, IsolatedBorrowRate, FundingRateHistory, OpenInterest, Liquidation, OrderRequest, CancellationRequest, FundingHistory, MarketMarginModes, MarginMode, Greeks, Conversion, Option, LastPrice, Leverage, MarginModification, Leverages, LastPrices, Currencies, TradingFees, MarginModes, OptionChain, IsolatedBorrowRates, CrossBorrowRates, LeverageTiers, LongShortRatio, OpenInterests } from './src/base/types.js';
6
6
  import { BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, ManualInteractionNeeded, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, InvalidProxySettings, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, ChecksumError, RequestTimeout, BadResponse, NullResponse, CancelPending, UnsubscribeError } from './src/base/errors.js';
7
- declare const version = "4.4.46";
7
+ declare const version = "4.4.47";
8
8
  import ace from './src/ace.js';
9
9
  import alpaca from './src/alpaca.js';
10
10
  import ascendex from './src/ascendex.js';
package/js/ccxt.js CHANGED
@@ -38,7 +38,7 @@ import * as errors from './src/base/errors.js';
38
38
  import { BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, ManualInteractionNeeded, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, InvalidProxySettings, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, ChecksumError, RequestTimeout, BadResponse, NullResponse, CancelPending, UnsubscribeError } from './src/base/errors.js';
39
39
  //-----------------------------------------------------------------------------
40
40
  // this is updated by vss.js when building
41
- const version = '4.4.47';
41
+ const version = '4.4.48';
42
42
  Exchange.ccxtVersion = version;
43
43
  //-----------------------------------------------------------------------------
44
44
  import ace from './src/ace.js';
@@ -15,6 +15,9 @@ interface Exchange {
15
15
  publicGetGetFxRates(params?: {}): Promise<implicitReturnType>;
16
16
  publicGetGetOrderMinimumVolumes(params?: {}): Promise<implicitReturnType>;
17
17
  publicGetGetCryptoWithdrawalFees(params?: {}): Promise<implicitReturnType>;
18
+ publicGetGetCryptoWithdrawalFees2(params?: {}): Promise<implicitReturnType>;
19
+ publicGetGetNetworks(params?: {}): Promise<implicitReturnType>;
20
+ publicGetGetPrimaryCurrencyConfig2(params?: {}): Promise<implicitReturnType>;
18
21
  privatePostGetOpenOrders(params?: {}): Promise<implicitReturnType>;
19
22
  privatePostGetClosedOrders(params?: {}): Promise<implicitReturnType>;
20
23
  privatePostGetClosedFilledOrders(params?: {}): Promise<implicitReturnType>;
@@ -23,7 +26,9 @@ interface Exchange {
23
26
  privatePostGetTransactions(params?: {}): Promise<implicitReturnType>;
24
27
  privatePostGetFiatBankAccounts(params?: {}): Promise<implicitReturnType>;
25
28
  privatePostGetDigitalCurrencyDepositAddress(params?: {}): Promise<implicitReturnType>;
29
+ privatePostGetDigitalCurrencyDepositAddress2(params?: {}): Promise<implicitReturnType>;
26
30
  privatePostGetDigitalCurrencyDepositAddresses(params?: {}): Promise<implicitReturnType>;
31
+ privatePostGetDigitalCurrencyDepositAddresses2(params?: {}): Promise<implicitReturnType>;
27
32
  privatePostGetTrades(params?: {}): Promise<implicitReturnType>;
28
33
  privatePostGetBrokerageFees(params?: {}): Promise<implicitReturnType>;
29
34
  privatePostGetDigitalCurrencyWithdrawal(params?: {}): Promise<implicitReturnType>;
@@ -34,6 +39,7 @@ interface Exchange {
34
39
  privatePostRequestFiatWithdrawal(params?: {}): Promise<implicitReturnType>;
35
40
  privatePostWithdrawFiatCurrency(params?: {}): Promise<implicitReturnType>;
36
41
  privatePostWithdrawDigitalCurrency(params?: {}): Promise<implicitReturnType>;
42
+ privatePostWithdrawCrypto(params?: {}): Promise<implicitReturnType>;
37
43
  }
38
44
  declare abstract class Exchange extends _Exchange {
39
45
  }
package/js/src/ace.js CHANGED
@@ -478,7 +478,7 @@ export default class ace extends Exchange {
478
478
  // }
479
479
  //
480
480
  const orderBook = this.safeDict(response, 'attachment');
481
- return this.parseOrderBook(orderBook, market['symbol'], undefined, 'bids', 'asks');
481
+ return this.parseOrderBook(orderBook, market['symbol'], undefined, 'bids', 'asks', 1, 0);
482
482
  }
483
483
  parseOHLCV(ohlcv, market = undefined) {
484
484
  //
@@ -872,6 +872,13 @@ export default class binance extends Exchange {
872
872
  * @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
873
873
  */
874
874
  fetchFundingRateHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<FundingRateHistory[]>;
875
+ parseFundingRateHistory(contract: any, market?: Market): {
876
+ info: any;
877
+ symbol: string;
878
+ fundingRate: number;
879
+ timestamp: number;
880
+ datetime: string;
881
+ };
875
882
  /**
876
883
  * @method
877
884
  * @name binance#fetchFundingRates
package/js/src/binance.js CHANGED
@@ -9873,20 +9873,24 @@ export default class binance extends Exchange {
9873
9873
  // "fundingTime": "1621267200000",
9874
9874
  // }
9875
9875
  //
9876
- const rates = [];
9877
- for (let i = 0; i < response.length; i++) {
9878
- const entry = response[i];
9879
- const timestamp = this.safeInteger(entry, 'fundingTime');
9880
- rates.push({
9881
- 'info': entry,
9882
- 'symbol': this.safeSymbol(this.safeString(entry, 'symbol'), undefined, undefined, 'swap'),
9883
- 'fundingRate': this.safeNumber(entry, 'fundingRate'),
9884
- 'timestamp': timestamp,
9885
- 'datetime': this.iso8601(timestamp),
9886
- });
9887
- }
9888
- const sorted = this.sortBy(rates, 'timestamp');
9889
- return this.filterBySymbolSinceLimit(sorted, symbol, since, limit);
9876
+ return this.parseFundingRateHistories(response, market, since, limit);
9877
+ }
9878
+ parseFundingRateHistory(contract, market = undefined) {
9879
+ //
9880
+ // {
9881
+ // "symbol": "BTCUSDT",
9882
+ // "fundingRate": "0.00063521",
9883
+ // "fundingTime": "1621267200000",
9884
+ // }
9885
+ //
9886
+ const timestamp = this.safeInteger(contract, 'fundingTime');
9887
+ return {
9888
+ 'info': contract,
9889
+ 'symbol': this.safeSymbol(this.safeString(contract, 'symbol'), undefined, undefined, 'swap'),
9890
+ 'fundingRate': this.safeNumber(contract, 'fundingRate'),
9891
+ 'timestamp': timestamp,
9892
+ 'datetime': this.iso8601(timestamp),
9893
+ };
9890
9894
  }
9891
9895
  /**
9892
9896
  * @method