ccxt 4.3.11 → 4.3.13

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 (82) hide show
  1. package/README.md +3 -3
  2. package/dist/cjs/ccxt.js +1 -1
  3. package/dist/cjs/src/base/Exchange.js +15 -0
  4. package/dist/cjs/src/bigone.js +22 -22
  5. package/dist/cjs/src/binance.js +5 -5
  6. package/dist/cjs/src/bingx.js +2 -2
  7. package/dist/cjs/src/bitget.js +7 -4
  8. package/dist/cjs/src/bitmart.js +3 -8
  9. package/dist/cjs/src/bitmex.js +2 -2
  10. package/dist/cjs/src/bybit.js +82 -71
  11. package/dist/cjs/src/coinbase.js +8 -8
  12. package/dist/cjs/src/coinbaseinternational.js +2 -2
  13. package/dist/cjs/src/coinex.js +513 -449
  14. package/dist/cjs/src/coinlist.js +12 -12
  15. package/dist/cjs/src/coinmetro.js +2 -2
  16. package/dist/cjs/src/cryptocom.js +16 -16
  17. package/dist/cjs/src/gate.js +2 -2
  18. package/dist/cjs/src/hitbtc.js +3 -3
  19. package/dist/cjs/src/htx.js +3 -7
  20. package/dist/cjs/src/indodax.js +2 -2
  21. package/dist/cjs/src/kraken.js +3 -1
  22. package/dist/cjs/src/kucoin.js +4 -4
  23. package/dist/cjs/src/kucoinfutures.js +6 -6
  24. package/dist/cjs/src/mexc.js +5 -5
  25. package/dist/cjs/src/okx.js +6 -6
  26. package/dist/cjs/src/poloniexfutures.js +4 -4
  27. package/dist/cjs/src/pro/bitget.js +140 -89
  28. package/dist/cjs/src/pro/bybit.js +196 -11
  29. package/dist/cjs/src/pro/coinbase.js +107 -29
  30. package/dist/cjs/src/pro/mexc.js +21 -1
  31. package/dist/cjs/src/probit.js +2 -2
  32. package/dist/cjs/src/whitebit.js +76 -1
  33. package/dist/cjs/src/woo.js +2 -2
  34. package/js/ccxt.d.ts +1 -1
  35. package/js/ccxt.js +1 -1
  36. package/js/src/abstract/bybit.d.ts +1 -0
  37. package/js/src/base/Exchange.d.ts +10 -6
  38. package/js/src/base/Exchange.js +15 -0
  39. package/js/src/base/types.d.ts +17 -2
  40. package/js/src/bigone.js +22 -22
  41. package/js/src/binance.d.ts +2 -9
  42. package/js/src/binance.js +5 -5
  43. package/js/src/bingx.js +2 -2
  44. package/js/src/bitget.d.ts +4 -31
  45. package/js/src/bitget.js +7 -4
  46. package/js/src/bitmart.d.ts +4 -24
  47. package/js/src/bitmart.js +3 -8
  48. package/js/src/bitmex.js +2 -2
  49. package/js/src/bybit.d.ts +7 -9
  50. package/js/src/bybit.js +82 -71
  51. package/js/src/coinbase.js +8 -8
  52. package/js/src/coinbaseinternational.js +2 -2
  53. package/js/src/coinex.d.ts +4 -24
  54. package/js/src/coinex.js +513 -449
  55. package/js/src/coinlist.js +12 -12
  56. package/js/src/coinmetro.js +2 -2
  57. package/js/src/cryptocom.js +16 -16
  58. package/js/src/digifinex.d.ts +3 -10
  59. package/js/src/gate.js +2 -2
  60. package/js/src/hitbtc.js +3 -3
  61. package/js/src/htx.d.ts +3 -13
  62. package/js/src/htx.js +3 -7
  63. package/js/src/indodax.js +2 -2
  64. package/js/src/kraken.js +3 -1
  65. package/js/src/kucoin.js +4 -4
  66. package/js/src/kucoinfutures.js +6 -6
  67. package/js/src/mexc.js +5 -5
  68. package/js/src/okx.d.ts +3 -10
  69. package/js/src/okx.js +6 -6
  70. package/js/src/poloniexfutures.js +4 -4
  71. package/js/src/pro/bitget.js +140 -89
  72. package/js/src/pro/bybit.d.ts +5 -1
  73. package/js/src/pro/bybit.js +196 -11
  74. package/js/src/pro/coinbase.d.ts +4 -0
  75. package/js/src/pro/coinbase.js +107 -29
  76. package/js/src/pro/mexc.js +21 -1
  77. package/js/src/probit.js +2 -2
  78. package/js/src/whitebit.d.ts +1 -0
  79. package/js/src/whitebit.js +76 -1
  80. package/js/src/woo.js +2 -2
  81. package/package.json +6 -5
  82. package/dist/cjs/src/flowbtc.js +0 -35
@@ -28,10 +28,12 @@ export default class coinbase extends coinbaseRest {
28
28
  'watchMyTrades': false,
29
29
  'watchOHLCV': false,
30
30
  'watchOrderBook': true,
31
+ 'watchOrderBookForSymbols': true,
31
32
  'watchOrders': true,
32
33
  'watchTicker': true,
33
34
  'watchTickers': true,
34
35
  'watchTrades': true,
36
+ 'watchTradesForSymbols': true,
35
37
  },
36
38
  'urls': {
37
39
  'api': {
@@ -76,8 +78,7 @@ export default class coinbase extends coinbaseRest {
76
78
  productIds = [market['id']];
77
79
  }
78
80
  const url = this.urls['api']['ws'];
79
- const timestamp = this.numberToString(this.seconds());
80
- const subscribe = {
81
+ let subscribe = {
81
82
  'type': 'subscribe',
82
83
  'product_ids': productIds,
83
84
  'channel': name,
@@ -86,36 +87,75 @@ export default class coinbase extends coinbaseRest {
86
87
  // 'signature': this.hmac (this.encode (auth), this.encode (this.secret), sha256),
87
88
  };
88
89
  if (isPrivate) {
89
- this.checkRequiredCredentials();
90
- const isCloudAPiKey = (this.apiKey.indexOf('organizations/') >= 0) || (this.secret.startsWith('-----BEGIN'));
91
- const auth = timestamp + name + productIds.join(',');
92
- if (!isCloudAPiKey) {
93
- subscribe['api_key'] = this.apiKey;
94
- subscribe['timestamp'] = timestamp;
95
- subscribe['signature'] = this.hmac(this.encode(auth), this.encode(this.secret), sha256);
90
+ subscribe = this.extend(subscribe, this.createWSAuth(name, productIds));
91
+ }
92
+ return await this.watch(url, messageHash, subscribe, messageHash);
93
+ }
94
+ async subscribeMultiple(name, isPrivate, symbols = undefined, params = {}) {
95
+ /**
96
+ * @ignore
97
+ * @method
98
+ * @description subscribes to a websocket channel
99
+ * @see https://docs.cloud.coinbase.com/advanced-trade-api/docs/ws-overview#subscribe
100
+ * @param {string} name the name of the channel
101
+ * @param {string[]} [symbols] unified market symbol
102
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
103
+ * @returns {object} subscription to a websocket channel
104
+ */
105
+ await this.loadMarkets();
106
+ const productIds = [];
107
+ const messageHashes = [];
108
+ symbols = this.marketSymbols(symbols, undefined, false);
109
+ for (let i = 0; i < symbols.length; i++) {
110
+ const symbol = symbols[i];
111
+ const market = this.market(symbol);
112
+ const marketId = market['id'];
113
+ productIds.push(marketId);
114
+ messageHashes.push(name + '::' + marketId);
115
+ }
116
+ const url = this.urls['api']['ws'];
117
+ let subscribe = {
118
+ 'type': 'subscribe',
119
+ 'product_ids': productIds,
120
+ 'channel': name,
121
+ };
122
+ if (isPrivate) {
123
+ subscribe = this.extend(subscribe, this.createWSAuth(name, productIds));
124
+ }
125
+ return await this.watchMultiple(url, messageHashes, subscribe, messageHashes);
126
+ }
127
+ createWSAuth(name, productIds) {
128
+ const subscribe = {};
129
+ const timestamp = this.numberToString(this.seconds());
130
+ this.checkRequiredCredentials();
131
+ const isCloudAPiKey = (this.apiKey.indexOf('organizations/') >= 0) || (this.secret.startsWith('-----BEGIN'));
132
+ const auth = timestamp + name + productIds.join(',');
133
+ if (!isCloudAPiKey) {
134
+ subscribe['api_key'] = this.apiKey;
135
+ subscribe['timestamp'] = timestamp;
136
+ subscribe['signature'] = this.hmac(this.encode(auth), this.encode(this.secret), sha256);
137
+ }
138
+ else {
139
+ if (this.apiKey.startsWith('-----BEGIN')) {
140
+ throw new ArgumentsRequired(this.id + ' apiKey should contain the name (eg: organizations/3b910e93....) and not the public key');
96
141
  }
97
- else {
98
- if (this.apiKey.startsWith('-----BEGIN')) {
99
- throw new ArgumentsRequired(this.id + ' apiKey should contain the name (eg: organizations/3b910e93....) and not the public key');
100
- }
101
- const currentToken = this.safeString(this.options, 'wsToken');
102
- const tokenTimestamp = this.safeInteger(this.options, 'wsTokenTimestamp', 0);
103
- const seconds = this.seconds();
104
- if (currentToken === undefined || tokenTimestamp + 120 < seconds) {
105
- // we should generate new token
106
- const token = this.createAuthToken(seconds);
107
- this.options['wsToken'] = token;
108
- this.options['wsTokenTimestamp'] = seconds;
109
- }
110
- subscribe['jwt'] = this.safeString(this.options, 'wsToken');
142
+ const currentToken = this.safeString(this.options, 'wsToken');
143
+ const tokenTimestamp = this.safeInteger(this.options, 'wsTokenTimestamp', 0);
144
+ const seconds = this.seconds();
145
+ if (currentToken === undefined || tokenTimestamp + 120 < seconds) {
146
+ // we should generate new token
147
+ const token = this.createAuthToken(seconds);
148
+ this.options['wsToken'] = token;
149
+ this.options['wsTokenTimestamp'] = seconds;
111
150
  }
151
+ subscribe['jwt'] = this.safeString(this.options, 'wsToken');
112
152
  }
113
- return await this.watch(url, messageHash, subscribe, messageHash);
153
+ return subscribe;
114
154
  }
115
155
  async watchTicker(symbol, params = {}) {
116
156
  /**
117
157
  * @method
118
- * @name coinbasepro#watchTicker
158
+ * @name coinbase#watchTicker
119
159
  * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
120
160
  * @see https://docs.cloud.coinbase.com/advanced-trade-api/docs/ws-channels#ticker-channel
121
161
  * @param {string} [symbol] unified symbol of the market to fetch the ticker for
@@ -128,7 +168,7 @@ export default class coinbase extends coinbaseRest {
128
168
  async watchTickers(symbols = undefined, params = {}) {
129
169
  /**
130
170
  * @method
131
- * @name coinbasepro#watchTickers
171
+ * @name coinbase#watchTickers
132
172
  * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
133
173
  * @see https://docs.cloud.coinbase.com/advanced-trade-api/docs/ws-channels#ticker-batch-channel
134
174
  * @param {string[]} [symbols] unified symbol of the market to fetch the ticker for
@@ -291,7 +331,7 @@ export default class coinbase extends coinbaseRest {
291
331
  async watchTrades(symbol, since = undefined, limit = undefined, params = {}) {
292
332
  /**
293
333
  * @method
294
- * @name coinbasepro#watchTrades
334
+ * @name coinbase#watchTrades
295
335
  * @description get the list of most recent trades for a particular symbol
296
336
  * @see https://docs.cloud.coinbase.com/advanced-trade-api/docs/ws-channels#market-trades-channel
297
337
  * @param {string} symbol unified symbol of the market to fetch trades for
@@ -309,10 +349,32 @@ export default class coinbase extends coinbaseRest {
309
349
  }
310
350
  return this.filterBySinceLimit(trades, since, limit, 'timestamp', true);
311
351
  }
352
+ async watchTradesForSymbols(symbols, since = undefined, limit = undefined, params = {}) {
353
+ /**
354
+ * @method
355
+ * @name coinbase#watchTradesForSymbols
356
+ * @description get the list of most recent trades for a particular symbol
357
+ * @see https://docs.cloud.coinbase.com/advanced-trade-api/docs/ws-channels#market-trades-channel
358
+ * @param {string[]} symbols unified symbol of the market to fetch trades for
359
+ * @param {int} [since] timestamp in ms of the earliest trade to fetch
360
+ * @param {int} [limit] the maximum amount of trades to fetch
361
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
362
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
363
+ */
364
+ await this.loadMarkets();
365
+ const name = 'market_trades';
366
+ const trades = await this.subscribeMultiple(name, false, symbols, params);
367
+ if (this.newUpdates) {
368
+ const first = this.safeDict(trades, 0);
369
+ const tradeSymbol = this.safeString(first, 'symbol');
370
+ limit = trades.getLimit(tradeSymbol, limit);
371
+ }
372
+ return this.filterBySinceLimit(trades, since, limit, 'timestamp', true);
373
+ }
312
374
  async watchOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
313
375
  /**
314
376
  * @method
315
- * @name coinbasepro#watchOrders
377
+ * @name coinbase#watchOrders
316
378
  * @description watches information on multiple orders made by the user
317
379
  * @see https://docs.cloud.coinbase.com/advanced-trade-api/docs/ws-channels#user-channel
318
380
  * @param {string} [symbol] unified market symbol of the market orders were made in
@@ -332,7 +394,7 @@ export default class coinbase extends coinbaseRest {
332
394
  async watchOrderBook(symbol, limit = undefined, params = {}) {
333
395
  /**
334
396
  * @method
335
- * @name coinbasepro#watchOrderBook
397
+ * @name coinbase#watchOrderBook
336
398
  * @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
337
399
  * @see https://docs.cloud.coinbase.com/advanced-trade-api/docs/ws-channels#level2-channel
338
400
  * @param {string} symbol unified symbol of the market to fetch the order book for
@@ -347,6 +409,22 @@ export default class coinbase extends coinbaseRest {
347
409
  const orderbook = await this.subscribe(name, false, symbol, params);
348
410
  return orderbook.limit();
349
411
  }
412
+ async watchOrderBookForSymbols(symbols, limit = undefined, params = {}) {
413
+ /**
414
+ * @method
415
+ * @name coinbase#watchOrderBookForSymbols
416
+ * @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
417
+ * @see https://docs.cloud.coinbase.com/advanced-trade-api/docs/ws-channels#level2-channel
418
+ * @param {string[]} symbols unified array of symbols
419
+ * @param {int} [limit] the maximum amount of order book entries to return
420
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
421
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
422
+ */
423
+ await this.loadMarkets();
424
+ const name = 'level2';
425
+ const orderbook = await this.subscribeMultiple(name, false, symbols, params);
426
+ return orderbook.limit();
427
+ }
350
428
  handleTrade(client, message) {
351
429
  //
352
430
  // {
@@ -707,6 +707,21 @@ export default class mexc extends mexcRest {
707
707
  // "v": "5"
708
708
  // }
709
709
  //
710
+ //
711
+ // d: {
712
+ // p: '1.0005',
713
+ // v: '5.71',
714
+ // a: '5.712855',
715
+ // S: 1,
716
+ // T: 1714325698237,
717
+ // t: 'edafcd9fdc2f426e82443d114691f724',
718
+ // c: '',
719
+ // i: 'C02__413321238354677760043',
720
+ // m: 0,
721
+ // st: 0,
722
+ // n: '0.005712855',
723
+ // N: 'USDT'
724
+ // }
710
725
  let timestamp = this.safeInteger(trade, 'T');
711
726
  let tradeId = this.safeString(trade, 't');
712
727
  if (timestamp === undefined) {
@@ -718,6 +733,8 @@ export default class mexc extends mexcRest {
718
733
  const rawSide = this.safeString(trade, 'S');
719
734
  const side = (rawSide === '1') ? 'buy' : 'sell';
720
735
  const isMaker = this.safeInteger(trade, 'm');
736
+ const feeAmount = this.safeNumber(trade, 'n');
737
+ const feeCurrencyId = this.safeString(trade, 'N');
721
738
  return this.safeTrade({
722
739
  'info': trade,
723
740
  'id': tradeId,
@@ -731,7 +748,10 @@ export default class mexc extends mexcRest {
731
748
  'price': priceString,
732
749
  'amount': amountString,
733
750
  'cost': undefined,
734
- 'fee': undefined,
751
+ 'fee': {
752
+ 'cost': feeAmount,
753
+ 'currency': this.safeCurrencyCode(feeCurrencyId),
754
+ },
735
755
  }, market);
736
756
  }
737
757
  async watchOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
package/js/src/probit.js CHANGED
@@ -1519,10 +1519,10 @@ export default class probit extends Exchange {
1519
1519
  else {
1520
1520
  request['start_time'] = this.iso8601(1);
1521
1521
  }
1522
- const until = this.safeInteger2(params, 'till', 'until');
1522
+ const until = this.safeInteger(params, 'until');
1523
1523
  if (until !== undefined) {
1524
1524
  request['end_time'] = this.iso8601(until);
1525
- params = this.omit(params, ['until', 'till']);
1525
+ params = this.omit(params, ['until']);
1526
1526
  }
1527
1527
  else {
1528
1528
  request['end_time'] = this.iso8601(this.milliseconds());
@@ -103,6 +103,7 @@ export default class whitebit extends Exchange {
103
103
  previousFundingTimestamp: any;
104
104
  previousFundingDatetime: any;
105
105
  };
106
+ fetchDepositsWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
106
107
  isFiat(currency: any): boolean;
107
108
  nonce(): number;
108
109
  sign(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any): {
@@ -50,6 +50,7 @@ export default class whitebit extends Exchange {
50
50
  'fetchDeposit': true,
51
51
  'fetchDepositAddress': true,
52
52
  'fetchDeposits': true,
53
+ 'fetchDepositsWithdrawals': true,
53
54
  'fetchDepositWithdrawFee': 'emulated',
54
55
  'fetchDepositWithdrawFees': true,
55
56
  'fetchFundingHistory': false,
@@ -1982,6 +1983,7 @@ export default class whitebit extends Exchange {
1982
1983
  // {
1983
1984
  // "address": "3ApEASLcrQtZpg1TsssFgYF5V5YQJAKvuE", // deposit address
1984
1985
  // "uniqueId": null, // unique Id of deposit
1986
+ // "transactionId": "a6d71d69-2b17-4ad8-8b15-2d686c54a1a5",
1985
1987
  // "createdAt": 1593437922, // timestamp of deposit
1986
1988
  // "currency": "Bitcoin", // deposit currency
1987
1989
  // "ticker": "BTC", // deposit currency ticker
@@ -2005,6 +2007,7 @@ export default class whitebit extends Exchange {
2005
2007
  // "actual": 1, // current block confirmations
2006
2008
  // "required": 2 // required block confirmation for successful deposit
2007
2009
  // }
2010
+ // "centralized": false,
2008
2011
  // }
2009
2012
  //
2010
2013
  currency = this.safeCurrency(undefined, currency);
@@ -2015,7 +2018,7 @@ export default class whitebit extends Exchange {
2015
2018
  const method = this.safeString(transaction, 'method');
2016
2019
  return {
2017
2020
  'id': this.safeString(transaction, 'uniqueId'),
2018
- 'txid': this.safeString(transaction, 'transactionHash'),
2021
+ 'txid': this.safeString(transaction, 'transactionId'),
2019
2022
  'timestamp': timestamp,
2020
2023
  'datetime': this.iso8601(timestamp),
2021
2024
  'network': this.safeString(transaction, 'network'),
@@ -2407,6 +2410,78 @@ export default class whitebit extends Exchange {
2407
2410
  'previousFundingDatetime': undefined,
2408
2411
  };
2409
2412
  }
2413
+ async fetchDepositsWithdrawals(code = undefined, since = undefined, limit = undefined, params = {}) {
2414
+ /**
2415
+ * @method
2416
+ * @name whitebit#fetchDepositsWithdrawals
2417
+ * @description fetch history of deposits and withdrawals
2418
+ * @see https://github.com/whitebit-exchange/api-docs/blob/main/pages/private/http-main-v4.md#get-depositwithdraw-history
2419
+ * @param {string} [code] unified currency code for the currency of the deposit/withdrawals, default is undefined
2420
+ * @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
2421
+ * @param {int} [limit] max number of deposit/withdrawals to return, default = 50, Min: 1, Max: 100
2422
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2423
+ *
2424
+ * EXCHANGE SPECIFIC PARAMETERS
2425
+ * @param {number} [params.transactionMethod] Method. Example: 1 to display deposits / 2 to display withdraws. Do not send this parameter in order to receive both deposits and withdraws.
2426
+ * @param {string} [params.address] Can be used for filtering transactions by specific address or memo.
2427
+ * @param {string[]} [params.addresses] Can be used for filtering transactions by specific addresses or memos (max: 20).
2428
+ * @param {string} [params.uniqueId] Can be used for filtering transactions by specific unique id
2429
+ * @param {int} [params.offset] If you want the request to return entries starting from a particular line, you can use OFFSET clause to tell it where it should start. Default: 0, Min: 0, Max: 10000
2430
+ * @param {string[]} [params.status] Can be used for filtering transactions by status codes. Caution: You must use this parameter with appropriate transactionMethod and use valid status codes for this method. You can find them below. Example: "status": [3,7]
2431
+ * @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
2432
+ */
2433
+ await this.loadMarkets();
2434
+ const request = {};
2435
+ let currency = undefined;
2436
+ if (code !== undefined) {
2437
+ currency = this.currency(code);
2438
+ request['ticker'] = currency['id'];
2439
+ }
2440
+ if (limit !== undefined) {
2441
+ request['limit'] = limit; // default 1000
2442
+ }
2443
+ const response = await this.v4PrivatePostMainAccountHistory(this.extend(request, params));
2444
+ //
2445
+ // {
2446
+ // "limit": 100,
2447
+ // "offset": 0,
2448
+ // "records": [
2449
+ // {
2450
+ // "address": "3ApEASLcrQtZpg1TsssFgYF5V5YQJAKvuE", // deposit address
2451
+ // "uniqueId": null, // unique Id of deposit
2452
+ // "createdAt": 1593437922, // timestamp of deposit
2453
+ // "currency": "Bitcoin", // deposit currency
2454
+ // "ticker": "BTC", // deposit currency ticker
2455
+ // "method": 1, // called method 1 - deposit, 2 - withdraw
2456
+ // "amount": "0.0006", // amount of deposit
2457
+ // "description": "", // deposit description
2458
+ // "memo": "", // deposit memo
2459
+ // "fee": "0", // deposit fee
2460
+ // "status": 15, // transactions status
2461
+ // "network": null, // if currency is multinetwork
2462
+ // "transactionHash": "a275a514013e4e0f927fd0d1bed215e7f6f2c4c6ce762836fe135ec22529d886", // deposit transaction hash
2463
+ // "transactionId": "5e112b38-9652-11ed-a1eb-0242ac120002", // transaction id
2464
+ // "details": {
2465
+ // "partial": { // details about partially successful withdrawals
2466
+ // "requestAmount": "50000", // requested withdrawal amount
2467
+ // "processedAmount": "39000", // processed withdrawal amount
2468
+ // "processedFee": "273", // fee for processed withdrawal amount
2469
+ // "normalizeTransaction": "" // deposit id
2470
+ // }
2471
+ // },
2472
+ // "confirmations": { // if transaction status == 15 (Pending) you can see this object
2473
+ // "actual": 1, // current block confirmations
2474
+ // "required": 2 // required block confirmation for successful deposit
2475
+ // }
2476
+ // },
2477
+ // {...},
2478
+ // ],
2479
+ // "total": 300 // total number of transactions, use this for calculating ‘limit’ and ‘offset'
2480
+ // }
2481
+ //
2482
+ const records = this.safeList(response, 'records');
2483
+ return this.parseTransactions(records, currency, since, limit);
2484
+ }
2410
2485
  isFiat(currency) {
2411
2486
  const fiatCurrencies = this.safeValue(this.options, 'fiatCurrencies', []);
2412
2487
  return this.inArray(currency, fiatCurrencies);
package/js/src/woo.js CHANGED
@@ -2322,8 +2322,8 @@ export default class woo extends Exchange {
2322
2322
  if (since !== undefined) {
2323
2323
  request['start_t'] = since;
2324
2324
  }
2325
- const until = this.safeInteger2(params, 'until', 'till'); // unified in milliseconds
2326
- params = this.omit(params, ['until', 'till']);
2325
+ const until = this.safeInteger(params, 'until'); // unified in milliseconds
2326
+ params = this.omit(params, ['until']);
2327
2327
  if (until !== undefined) {
2328
2328
  request['end_t'] = until;
2329
2329
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccxt",
3
- "version": "4.3.11",
3
+ "version": "4.3.13",
4
4
  "description": "A JavaScript / TypeScript / Python / C# / PHP cryptocurrency trading library with support for 100+ exchanges",
5
5
  "unpkg": "dist/ccxt.browser.js",
6
6
  "type": "module",
@@ -51,8 +51,8 @@
51
51
  "test-ws": "npm run build && node run-tests --ws --useProxy",
52
52
  "test": "npm run build && npm run commonjs-test && npm run static-tests && node run-tests --useProxy",
53
53
  "fast-test": "npm run commonjs-test && node run-tests --js --useProxy",
54
- "commonjs-test": "node test-commonjs.cjs",
55
- "package-test": "./package-test.sh",
54
+ "commonjs-test": "node ./utils/test-commonjs.cjs",
55
+ "package-test": "./utils/package-test.sh",
56
56
  "fast-test-ws": "node run-tests --ws --js",
57
57
  "test-base": "npm run test-js-base && npm run test-python-base && npm run test-php-base && npm run test-cs-base && npm run id-tests && npm run static-tests",
58
58
  "test-base-ws": "npm run test-js-base-ws && npm run test-python-base-ws && npm run test-php-base-ws && npm run test-cs-base-ws",
@@ -72,6 +72,7 @@
72
72
  "test-php-base-ws": "npm run test-php-cache && npm run test-php-orderbook",
73
73
  "test-cs-base": "dotnet run --project cs/tests/tests.csproj --base",
74
74
  "test-cs-base-ws": "dotnet run --project cs/tests/tests.csproj --cache && dotnet run --project cs/tests/tests.csproj --orderbook",
75
+ "test-freshness": "tsx ./utils/test-freshness.ts",
75
76
  "cli.js": "node ./examples/js/cli.js",
76
77
  "cli.py": "python3 ./examples/py/cli.py",
77
78
  "cli.php": "php ./examples/php/cli.php",
@@ -90,9 +91,9 @@
90
91
  "force-transpile-fast": "npm run dev-force-transpile",
91
92
  "dev-force-transpile": "npm run fast-force-transpileRest && npm run fast-force-transpileWs",
92
93
  "force-transpileRest": "node build/transpile --force",
93
- "fast-force-transpileRest": "node build/transpile.js --multiprocess",
94
+ "fast-force-transpileRest": "node build/transpile.js --multiprocess --force",
94
95
  "force-transpileWs": "node build/transpileWS --force",
95
- "fast-force-transpileWs": "node build/transpileWS.js --multiprocess",
96
+ "fast-force-transpileWs": "node build/transpileWS.js --multiprocess --force",
96
97
  "test-js-cache": "node js/src/pro/test/base/test.Cache.js",
97
98
  "test-js-orderbook": "node js/src/pro/test/base/test.OrderBook.js",
98
99
  "test-python-cache": "python python/ccxt/pro/test/base/test_cache.py",
@@ -1,35 +0,0 @@
1
- 'use strict';
2
-
3
- var ndax = require('./ndax.js');
4
-
5
- // ---------------------------------------------------------------------------
6
- // ---------------------------------------------------------------------------
7
- class flowbtc extends ndax {
8
- describe() {
9
- return this.deepExtend(super.describe(), {
10
- 'id': 'flowbtc',
11
- 'name': 'flowBTC',
12
- 'countries': ['BR'],
13
- 'rateLimit': 1000,
14
- 'urls': {
15
- 'logo': 'https://user-images.githubusercontent.com/51840849/87443317-01c0d080-c5fe-11ea-95c2-9ebe1a8fafd9.jpg',
16
- 'api': {
17
- 'public': 'https://api.flowbtc.com.br:8443/ap/',
18
- 'private': 'https://api.flowbtc.com.br:8443/ap/',
19
- },
20
- 'www': 'https://www.flowbtc.com.br',
21
- 'doc': 'https://www.flowbtc.com.br/api.html',
22
- },
23
- 'fees': {
24
- 'trading': {
25
- 'tierBased': false,
26
- 'percentage': true,
27
- 'maker': 0.0025,
28
- 'taker': 0.005,
29
- },
30
- },
31
- });
32
- }
33
- }
34
-
35
- module.exports = flowbtc;