ccxt 4.3.86 → 4.3.88

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 (91) hide show
  1. package/README.md +6 -5
  2. package/dist/ccxt.browser.min.js +3 -3
  3. package/dist/cjs/ccxt.js +2 -1
  4. package/dist/cjs/src/base/Exchange.js +2 -2
  5. package/dist/cjs/src/base/errors.js +8 -1
  6. package/dist/cjs/src/bingx.js +7 -1
  7. package/dist/cjs/src/hashkey.js +3 -4
  8. package/dist/cjs/src/kraken.js +37 -6
  9. package/dist/cjs/src/kucoin.js +2 -0
  10. package/dist/cjs/src/pro/bitfinex.js +1 -0
  11. package/dist/cjs/src/pro/bitfinex2.js +1 -0
  12. package/dist/cjs/src/pro/bitget.js +164 -19
  13. package/dist/cjs/src/pro/bitopro.js +1 -0
  14. package/dist/cjs/src/pro/bitstamp.js +1 -0
  15. package/dist/cjs/src/pro/blockchaincom.js +1 -0
  16. package/dist/cjs/src/pro/cex.js +1 -0
  17. package/dist/cjs/src/pro/coincheck.js +1 -0
  18. package/dist/cjs/src/pro/coinone.js +1 -0
  19. package/dist/cjs/src/pro/hashkey.js +1 -0
  20. package/dist/cjs/src/pro/hitbtc.js +1 -0
  21. package/dist/cjs/src/pro/hollaex.js +1 -0
  22. package/dist/cjs/src/pro/htx.js +1 -0
  23. package/dist/cjs/src/pro/huobijp.js +1 -0
  24. package/dist/cjs/src/pro/hyperliquid.js +7 -0
  25. package/dist/cjs/src/pro/independentreserve.js +1 -0
  26. package/dist/cjs/src/pro/lbank.js +1 -0
  27. package/dist/cjs/src/pro/luno.js +1 -0
  28. package/dist/cjs/src/pro/ndax.js +5 -0
  29. package/dist/cjs/src/pro/okcoin.js +7 -0
  30. package/dist/cjs/src/pro/onetrading.js +1 -0
  31. package/dist/cjs/src/pro/p2b.js +34 -7
  32. package/dist/cjs/src/pro/paradex.js +1 -0
  33. package/dist/cjs/src/pro/poloniex.js +36 -3
  34. package/dist/cjs/src/pro/poloniexfutures.js +1 -0
  35. package/dist/cjs/src/pro/probit.js +2 -0
  36. package/dist/cjs/src/pro/upbit.js +48 -3
  37. package/dist/cjs/src/pro/vertex.js +1 -0
  38. package/dist/cjs/src/pro/wazirx.js +3 -0
  39. package/dist/cjs/src/pro/whitebit.js +9 -0
  40. package/dist/cjs/src/upbit.js +1 -1
  41. package/js/ccxt.d.ts +3 -3
  42. package/js/ccxt.js +3 -3
  43. package/js/src/abstract/kucoin.d.ts +1 -0
  44. package/js/src/abstract/kucoinfutures.d.ts +1 -0
  45. package/js/src/base/Exchange.d.ts +1 -1
  46. package/js/src/base/Exchange.js +2 -2
  47. package/js/src/base/errorHierarchy.d.ts +1 -0
  48. package/js/src/base/errorHierarchy.js +1 -0
  49. package/js/src/base/errors.d.ts +5 -1
  50. package/js/src/base/errors.js +8 -2
  51. package/js/src/bingx.js +7 -1
  52. package/js/src/coinex.d.ts +1 -1
  53. package/js/src/hashkey.js +3 -4
  54. package/js/src/kraken.js +37 -6
  55. package/js/src/kucoin.js +2 -0
  56. package/js/src/pro/bitfinex.js +1 -0
  57. package/js/src/pro/bitfinex2.js +1 -0
  58. package/js/src/pro/bitget.d.ts +8 -0
  59. package/js/src/pro/bitget.js +165 -20
  60. package/js/src/pro/bitopro.js +1 -0
  61. package/js/src/pro/bitstamp.js +1 -0
  62. package/js/src/pro/blockchaincom.js +1 -0
  63. package/js/src/pro/cex.js +1 -0
  64. package/js/src/pro/coincheck.js +1 -0
  65. package/js/src/pro/coinone.js +1 -0
  66. package/js/src/pro/hashkey.js +1 -0
  67. package/js/src/pro/hitbtc.js +1 -0
  68. package/js/src/pro/hollaex.js +1 -0
  69. package/js/src/pro/htx.js +1 -0
  70. package/js/src/pro/huobijp.js +1 -0
  71. package/js/src/pro/hyperliquid.js +7 -0
  72. package/js/src/pro/independentreserve.js +1 -0
  73. package/js/src/pro/lbank.js +1 -0
  74. package/js/src/pro/luno.js +1 -0
  75. package/js/src/pro/ndax.js +5 -0
  76. package/js/src/pro/okcoin.js +7 -0
  77. package/js/src/pro/onetrading.js +1 -0
  78. package/js/src/pro/p2b.d.ts +1 -0
  79. package/js/src/pro/p2b.js +34 -7
  80. package/js/src/pro/paradex.js +1 -0
  81. package/js/src/pro/poloniex.d.ts +1 -0
  82. package/js/src/pro/poloniex.js +36 -3
  83. package/js/src/pro/poloniexfutures.js +1 -0
  84. package/js/src/pro/probit.js +2 -0
  85. package/js/src/pro/upbit.d.ts +1 -0
  86. package/js/src/pro/upbit.js +48 -3
  87. package/js/src/pro/vertex.js +1 -0
  88. package/js/src/pro/wazirx.js +3 -0
  89. package/js/src/pro/whitebit.js +9 -0
  90. package/js/src/upbit.js +1 -1
  91. package/package.json +1 -1
@@ -15,6 +15,7 @@ export default class ndax extends ndaxRest {
15
15
  'ws': true,
16
16
  'watchOrderBook': true,
17
17
  'watchTrades': true,
18
+ 'watchTradesForSymbols': false,
18
19
  'watchTicker': true,
19
20
  'watchOHLCV': true,
20
21
  },
@@ -43,6 +44,7 @@ export default class ndax extends ndaxRest {
43
44
  * @method
44
45
  * @name ndax#watchTicker
45
46
  * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
47
+ * @see https://apidoc.ndax.io/#subscribelevel1
46
48
  * @param {string} symbol unified symbol of the market to fetch the ticker for
47
49
  * @param {object} [params] extra parameters specific to the exchange API endpoint
48
50
  * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
@@ -108,6 +110,7 @@ export default class ndax extends ndaxRest {
108
110
  * @method
109
111
  * @name ndax#watchTrades
110
112
  * @description get the list of most recent trades for a particular symbol
113
+ * @see https://apidoc.ndax.io/#subscribetrades
111
114
  * @param {string} symbol unified symbol of the market to fetch trades for
112
115
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
113
116
  * @param {int} [limit] the maximum amount of trades to fetch
@@ -189,6 +192,7 @@ export default class ndax extends ndaxRest {
189
192
  * @method
190
193
  * @name ndax#watchOHLCV
191
194
  * @description watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
195
+ * @see https://apidoc.ndax.io/#subscribeticker
192
196
  * @param {string} symbol unified symbol of the market to fetch OHLCV data for
193
197
  * @param {string} timeframe the length of time each candle represents
194
198
  * @param {int} [since] timestamp in ms of the earliest candle to fetch
@@ -321,6 +325,7 @@ export default class ndax extends ndaxRest {
321
325
  * @method
322
326
  * @name ndax#watchOrderBook
323
327
  * @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
328
+ * @see https://apidoc.ndax.io/#subscribelevel2
324
329
  * @param {string} symbol unified symbol of the market to fetch the order book for
325
330
  * @param {int} [limit] the maximum amount of order book entries to return
326
331
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -20,6 +20,7 @@ export default class okcoin extends okcoinRest {
20
20
  'watchOrderBook': true,
21
21
  'watchOrders': true,
22
22
  'watchTrades': true,
23
+ 'watchTradesForSymbols': false,
23
24
  'watchBalance': true,
24
25
  'watchOHLCV': true,
25
26
  },
@@ -70,6 +71,7 @@ export default class okcoin extends okcoinRest {
70
71
  * @method
71
72
  * @name okcoin#watchTrades
72
73
  * @description get the list of most recent trades for a particular symbol
74
+ * @see https://www.okcoin.com/docs-v5/en/#websocket-api-public-channel-trades-channel
73
75
  * @param {string} symbol unified symbol of the market to fetch trades for
74
76
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
75
77
  * @param {int} [limit] the maximum amount of trades to fetch
@@ -89,6 +91,7 @@ export default class okcoin extends okcoinRest {
89
91
  * @method
90
92
  * @name okcoin#watchOrders
91
93
  * @description watches information on multiple orders made by the user
94
+ * @see https://www.okcoin.com/docs-v5/en/#websocket-api-private-channel-order-channel
92
95
  * @param {string} symbol unified market symbol of the market orders were made in
93
96
  * @param {int} [since] the earliest time in ms to fetch orders for
94
97
  * @param {int} [limit] the maximum number of order structures to retrieve
@@ -175,6 +178,7 @@ export default class okcoin extends okcoinRest {
175
178
  * @method
176
179
  * @name okcoin#watchTicker
177
180
  * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
181
+ * @see https://www.okcoin.com/docs-v5/en/#websocket-api-public-channel-tickers-channel
178
182
  * @param {string} symbol unified symbol of the market to fetch the ticker for
179
183
  * @param {object} [params] extra parameters specific to the exchange API endpoint
180
184
  * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
@@ -255,6 +259,7 @@ export default class okcoin extends okcoinRest {
255
259
  * @method
256
260
  * @name okcoin#watchOHLCV
257
261
  * @description watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
262
+ * @see https://www.okcoin.com/docs-v5/en/#websocket-api-public-channel-candlesticks-channel
258
263
  * @param {string} symbol unified symbol of the market to fetch OHLCV data for
259
264
  * @param {string} timeframe the length of time each candle represents
260
265
  * @param {int} [since] timestamp in ms of the earliest candle to fetch
@@ -322,6 +327,7 @@ export default class okcoin extends okcoinRest {
322
327
  * @method
323
328
  * @name okcoin#watchOrderBook
324
329
  * @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
330
+ * @see https://www.okcoin.com/docs-v5/en/#websocket-api-public-channel-order-book-channel
325
331
  * @param {string} symbol unified symbol of the market to fetch the order book for
326
332
  * @param {int} [limit] the maximum amount of order book entries to return
327
333
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -485,6 +491,7 @@ export default class okcoin extends okcoinRest {
485
491
  * @method
486
492
  * @name okcoin#watchBalance
487
493
  * @description watch balance and get the amount of funds available for trading or funds locked in orders
494
+ * @see https://www.okcoin.com/docs-v5/en/#websocket-api-private-channel-account-channel
488
495
  * @param {object} [params] extra parameters specific to the exchange API endpoint
489
496
  * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
490
497
  */
@@ -19,6 +19,7 @@ export default class onetrading extends onetradingRest {
19
19
  'watchTicker': true,
20
20
  'watchTickers': true,
21
21
  'watchTrades': false,
22
+ 'watchTradesForSymbols': false,
22
23
  'watchMyTrades': true,
23
24
  'watchOrders': true,
24
25
  'watchOrderBook': true,
@@ -7,6 +7,7 @@ export default class p2b extends p2bRest {
7
7
  watchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
8
8
  watchTicker(symbol: string, params?: {}): Promise<Ticker>;
9
9
  watchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
10
+ watchTradesForSymbols(symbols: string[], since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
10
11
  watchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
11
12
  handleOHLCV(client: Client, message: any): any;
12
13
  handleTrade(client: Client, message: any): any;
package/js/src/pro/p2b.js CHANGED
@@ -32,6 +32,7 @@ export default class p2b extends p2bRest {
32
32
  'watchTicker': true,
33
33
  'watchTickers': false,
34
34
  'watchTrades': true,
35
+ 'watchTradesForSymbols': true,
35
36
  },
36
37
  'urls': {
37
38
  'api': {
@@ -147,15 +148,41 @@ export default class p2b extends p2bRest {
147
148
  * @param {object} [params] extra parameters specific to the exchange API endpoint
148
149
  * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
149
150
  */
151
+ return await this.watchTradesForSymbols([symbol], since, limit, params);
152
+ }
153
+ async watchTradesForSymbols(symbols, since = undefined, limit = undefined, params = {}) {
154
+ /**
155
+ * @method
156
+ * @name p2b#watchTradesForSymbols
157
+ * @description get the list of most recent trades for a list of symbols
158
+ * @see https://github.com/P2B-team/P2B-WSS-Public/blob/main/wss_documentation.md#deals
159
+ * @param {string[]} symbols unified symbol of the market to fetch trades for
160
+ * @param {int} [since] timestamp in ms of the earliest trade to fetch
161
+ * @param {int} [limit] the maximum amount of trades to fetch
162
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
163
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
164
+ */
150
165
  await this.loadMarkets();
151
- const market = this.market(symbol);
152
- const request = [
153
- market['id'],
154
- ];
155
- const messageHash = 'deals::' + market['symbol'];
156
- const trades = await this.subscribe('deals.subscribe', messageHash, request, params);
166
+ symbols = this.marketSymbols(symbols, undefined, false, true, true);
167
+ const messageHashes = [];
168
+ if (symbols !== undefined) {
169
+ for (let i = 0; i < symbols.length; i++) {
170
+ messageHashes.push('deals::' + symbols[i]);
171
+ }
172
+ }
173
+ const marketIds = this.marketIds(symbols);
174
+ const url = this.urls['api']['ws'];
175
+ const subscribe = {
176
+ 'method': 'deals.subscribe',
177
+ 'params': marketIds,
178
+ 'id': this.milliseconds(),
179
+ };
180
+ const query = this.extend(subscribe, params);
181
+ const trades = await this.watchMultiple(url, messageHashes, query, messageHashes);
157
182
  if (this.newUpdates) {
158
- limit = trades.getLimit(symbol, limit);
183
+ const first = this.safeValue(trades, 0);
184
+ const tradeSymbol = this.safeString(first, 'symbol');
185
+ limit = trades.getLimit(tradeSymbol, limit);
159
186
  }
160
187
  return this.filterBySinceLimit(trades, since, limit, 'timestamp', true);
161
188
  }
@@ -18,6 +18,7 @@ export default class paradex extends paradexRest {
18
18
  'watchOrderBook': true,
19
19
  'watchOrders': false,
20
20
  'watchTrades': true,
21
+ 'watchTradesForSymbols': false,
21
22
  'watchBalance': false,
22
23
  'watchOHLCV': false,
23
24
  },
@@ -15,6 +15,7 @@ export default class poloniex extends poloniexRest {
15
15
  watchTicker(symbol: string, params?: {}): Promise<Ticker>;
16
16
  watchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
17
17
  watchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
18
+ watchTradesForSymbols(symbols: string[], since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
18
19
  watchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
19
20
  watchOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
20
21
  watchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
@@ -21,6 +21,7 @@ export default class poloniex extends poloniexRest {
21
21
  'watchTicker': true,
22
22
  'watchTickers': true,
23
23
  'watchTrades': true,
24
+ 'watchTradesForSymbols': true,
24
25
  'watchBalance': true,
25
26
  'watchStatus': false,
26
27
  'watchOrders': true,
@@ -398,12 +399,44 @@ export default class poloniex extends poloniexRest {
398
399
  * @param {object} [params] extra parameters specific to the exchange API endpoint
399
400
  * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
400
401
  */
402
+ return await this.watchTradesForSymbols([symbol], since, limit, params);
403
+ }
404
+ async watchTradesForSymbols(symbols, since = undefined, limit = undefined, params = {}) {
405
+ /**
406
+ * @method
407
+ * @name poloniex#watchTradesForSymbols
408
+ * @description get the list of most recent trades for a list of symbols
409
+ * @see https://api-docs.poloniex.com/spot/websocket/market-data#trades
410
+ * @param {string[]} symbols unified symbol of the market to fetch trades for
411
+ * @param {int} [since] timestamp in ms of the earliest trade to fetch
412
+ * @param {int} [limit] the maximum amount of trades to fetch
413
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
414
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
415
+ */
401
416
  await this.loadMarkets();
402
- symbol = this.symbol(symbol);
417
+ symbols = this.marketSymbols(symbols, undefined, false, true, true);
403
418
  const name = 'trades';
404
- const trades = await this.subscribe(name, name, false, [symbol], params);
419
+ const url = this.urls['api']['ws']['public'];
420
+ const marketIds = this.marketIds(symbols);
421
+ const subscribe = {
422
+ 'event': 'subscribe',
423
+ 'channel': [
424
+ name,
425
+ ],
426
+ 'symbols': marketIds,
427
+ };
428
+ const request = this.extend(subscribe, params);
429
+ const messageHashes = [];
430
+ if (symbols !== undefined) {
431
+ for (let i = 0; i < symbols.length; i++) {
432
+ messageHashes.push(name + '::' + symbols[i]);
433
+ }
434
+ }
435
+ const trades = await this.watchMultiple(url, messageHashes, request, messageHashes);
405
436
  if (this.newUpdates) {
406
- limit = trades.getLimit(symbol, limit);
437
+ const first = this.safeValue(trades, 0);
438
+ const tradeSymbol = this.safeString(first, 'symbol');
439
+ limit = trades.getLimit(tradeSymbol, limit);
407
440
  }
408
441
  return this.filterBySinceLimit(trades, since, limit, 'timestamp', true);
409
442
  }
@@ -28,6 +28,7 @@ export default class poloniexfutures extends poloniexfuturesRest {
28
28
  'watchTicker': true,
29
29
  'watchTickers': false,
30
30
  'watchTrades': true,
31
+ 'watchTradesForSymbols': false,
31
32
  'watchBalance': true,
32
33
  'watchOrders': true,
33
34
  'watchMyTrades': false,
@@ -18,6 +18,7 @@ export default class probit extends probitRest {
18
18
  'watchTicker': true,
19
19
  'watchTickers': false,
20
20
  'watchTrades': true,
21
+ 'watchTradesForSymbols': false,
21
22
  'watchMyTrades': true,
22
23
  'watchOrders': true,
23
24
  'watchOrderBook': true,
@@ -225,6 +226,7 @@ export default class probit extends probitRest {
225
226
  * @method
226
227
  * @name probit#watchMyTrades
227
228
  * @description get the list of trades associated with the user
229
+ * @see https://docs-en.probit.com/reference/trade_history
228
230
  * @param {string} symbol unified symbol of the market to fetch trades for
229
231
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
230
232
  * @param {int} [limit] the maximum amount of trades to fetch
@@ -6,6 +6,7 @@ export default class upbit extends upbitRest {
6
6
  watchPublic(symbol: string, channel: any, params?: {}): Promise<any>;
7
7
  watchTicker(symbol: string, params?: {}): Promise<Ticker>;
8
8
  watchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
9
+ watchTradesForSymbols(symbols: string[], since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
9
10
  watchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
10
11
  handleTicker(client: Client, message: any): void;
11
12
  handleOrderBook(client: Client, message: any): void;
@@ -18,6 +18,7 @@ export default class upbit extends upbitRest {
18
18
  'watchOrderBook': true,
19
19
  'watchTicker': true,
20
20
  'watchTrades': true,
21
+ 'watchTradesForSymbols': true,
21
22
  'watchOrders': true,
22
23
  'watchMyTrades': true,
23
24
  'watchBalance': true,
@@ -82,11 +83,55 @@ export default class upbit extends upbitRest {
82
83
  * @param {object} [params] extra parameters specific to the exchange API endpoint
83
84
  * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
84
85
  */
86
+ return await this.watchTradesForSymbols([symbol], since, limit, params);
87
+ }
88
+ async watchTradesForSymbols(symbols, since = undefined, limit = undefined, params = {}) {
89
+ /**
90
+ * @method
91
+ * @name upbit#watchTradesForSymbols
92
+ * @description get the list of most recent trades for a list of symbols
93
+ * @see https://global-docs.upbit.com/reference/websocket-trade
94
+ * @param {string[]} symbols unified symbol of the market to fetch trades for
95
+ * @param {int} [since] timestamp in ms of the earliest trade to fetch
96
+ * @param {int} [limit] the maximum amount of trades to fetch
97
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
98
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
99
+ */
85
100
  await this.loadMarkets();
86
- symbol = this.symbol(symbol);
87
- const trades = await this.watchPublic(symbol, 'trade');
101
+ symbols = this.marketSymbols(symbols, undefined, false, true, true);
102
+ const channel = 'trade';
103
+ const messageHashes = [];
104
+ const url = this.implodeParams(this.urls['api']['ws'], {
105
+ 'hostname': this.hostname,
106
+ });
107
+ if (symbols !== undefined) {
108
+ for (let i = 0; i < symbols.length; i++) {
109
+ const market = this.market(symbols[i]);
110
+ const marketId = market['id'];
111
+ const symbol = market['symbol'];
112
+ this.options[channel] = this.safeValue(this.options, channel, {});
113
+ this.options[channel][symbol] = true;
114
+ messageHashes.push(channel + ':' + marketId);
115
+ }
116
+ }
117
+ const optionSymbols = Object.keys(this.options[channel]);
118
+ const marketIds = this.marketIds(optionSymbols);
119
+ const request = [
120
+ {
121
+ 'ticket': this.uuid(),
122
+ },
123
+ {
124
+ 'type': channel,
125
+ 'codes': marketIds,
126
+ // 'isOnlySnapshot': false,
127
+ // 'isOnlyRealtime': false,
128
+ },
129
+ ];
130
+ const trades = await this.watchMultiple(url, messageHashes, request, messageHashes);
88
131
  if (this.newUpdates) {
89
- limit = trades.getLimit(symbol, limit);
132
+ const first = this.safeValue(trades, 0);
133
+ const tradeSymbol = this.safeString(first, 'symbol');
134
+ limit = trades.getLimit(tradeSymbol, limit);
90
135
  }
91
136
  return this.filterBySinceLimit(trades, since, limit, 'timestamp', true);
92
137
  }
@@ -23,6 +23,7 @@ export default class vertex extends vertexRest {
23
23
  'watchTicker': true,
24
24
  'watchTickers': false,
25
25
  'watchTrades': true,
26
+ 'watchTradesForSymbols': false,
26
27
  'watchPositions': true,
27
28
  },
28
29
  'urls': {
@@ -18,6 +18,7 @@ export default class wazirx extends wazirxRest {
18
18
  'watchTicker': true,
19
19
  'watchTickers': true,
20
20
  'watchTrades': true,
21
+ 'watchTradesForSymbols': false,
21
22
  'watchMyTrades': true,
22
23
  'watchOrders': true,
23
24
  'watchOrderBook': true,
@@ -287,6 +288,7 @@ export default class wazirx extends wazirxRest {
287
288
  * @method
288
289
  * @name wazirx#watchTrades
289
290
  * @description get the list of most recent trades for a particular symbol
291
+ * @see https://docs.wazirx.com/#trade-streams
290
292
  * @param {string} symbol unified symbol of the market to fetch trades for
291
293
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
292
294
  * @param {int} [limit] the maximum amount of trades to fetch
@@ -384,6 +386,7 @@ export default class wazirx extends wazirxRest {
384
386
  * @method
385
387
  * @name wazirx#watchOHLCV
386
388
  * @description watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
389
+ * @see https://docs.wazirx.com/#kline-candlestick-stream
387
390
  * @param {string} symbol unified symbol of the market to fetch OHLCV data for
388
391
  * @param {string} timeframe the length of time each candle represents
389
392
  * @param {int} [since] timestamp in ms of the earliest candle to fetch
@@ -22,6 +22,7 @@ export default class whitebit extends whitebitRest {
22
22
  'watchOrders': true,
23
23
  'watchTicker': true,
24
24
  'watchTrades': true,
25
+ 'watchTradesForSymbols': false,
25
26
  },
26
27
  'urls': {
27
28
  'api': {
@@ -64,6 +65,7 @@ export default class whitebit extends whitebitRest {
64
65
  * @method
65
66
  * @name whitebit#watchOHLCV
66
67
  * @description watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
68
+ * @see https://docs.whitebit.com/public/websocket/#kline
67
69
  * @param {string} symbol unified symbol of the market to fetch OHLCV data for
68
70
  * @param {string} timeframe the length of time each candle represents
69
71
  * @param {int} [since] timestamp in ms of the earliest candle to fetch
@@ -138,6 +140,7 @@ export default class whitebit extends whitebitRest {
138
140
  * @method
139
141
  * @name whitebit#watchOrderBook
140
142
  * @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
143
+ * @see https://docs.whitebit.com/public/websocket/#market-depth
141
144
  * @param {string} symbol unified symbol of the market to fetch the order book for
142
145
  * @param {int} [limit] the maximum amount of order book entries to return
143
146
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -243,6 +246,7 @@ export default class whitebit extends whitebitRest {
243
246
  * @method
244
247
  * @name whitebit#watchTicker
245
248
  * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
249
+ * @see https://docs.whitebit.com/public/websocket/#market-statistics
246
250
  * @param {string} symbol unified symbol of the market to fetch the ticker for
247
251
  * @param {object} [params] extra parameters specific to the exchange API endpoint
248
252
  * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
@@ -309,6 +313,7 @@ export default class whitebit extends whitebitRest {
309
313
  * @method
310
314
  * @name whitebit#watchTrades
311
315
  * @description get the list of most recent trades for a particular symbol
316
+ * @see https://docs.whitebit.com/public/websocket/#market-trades
312
317
  * @param {string} symbol unified symbol of the market to fetch trades for
313
318
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
314
319
  * @param {int} [limit] the maximum amount of trades to fetch
@@ -375,6 +380,7 @@ export default class whitebit extends whitebitRest {
375
380
  * @method
376
381
  * @name whitebit#watchMyTrades
377
382
  * @description watches trades made by the user
383
+ * @see https://docs.whitebit.com/private/websocket/#deals
378
384
  * @param {str} symbol unified market symbol
379
385
  * @param {int} [since] the earliest time in ms to fetch trades for
380
386
  * @param {int} [limit] the maximum number of trades structures to retrieve
@@ -474,6 +480,7 @@ export default class whitebit extends whitebitRest {
474
480
  * @method
475
481
  * @name whitebit#watchOrders
476
482
  * @description watches information on multiple orders made by the user
483
+ * @see https://docs.whitebit.com/private/websocket/#orders-pending
477
484
  * @param {string} symbol unified market symbol of the market orders were made in
478
485
  * @param {int} [since] the earliest time in ms to fetch orders for
479
486
  * @param {int} [limit] the maximum number of order structures to retrieve
@@ -649,6 +656,8 @@ export default class whitebit extends whitebitRest {
649
656
  * @method
650
657
  * @name whitebit#watchBalance
651
658
  * @description watch balance and get the amount of funds available for trading or funds locked in orders
659
+ * @see https://docs.whitebit.com/private/websocket/#balance-spot
660
+ * @see https://docs.whitebit.com/private/websocket/#balance-margin
652
661
  * @param {object} [params] extra parameters specific to the exchange API endpoint
653
662
  * @param {str} [params.type] spot or contract if not provided this.options['defaultType'] is used
654
663
  * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
package/js/src/upbit.js CHANGED
@@ -2004,7 +2004,7 @@ export default class upbit extends Exchange {
2004
2004
  headers['Content-Type'] = 'application/json';
2005
2005
  }
2006
2006
  if (hasQuery) {
2007
- auth = this.urlencode(query);
2007
+ auth = this.rawencode(query);
2008
2008
  }
2009
2009
  if (auth !== undefined) {
2010
2010
  const hash = this.hash(this.encode(auth), sha512);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccxt",
3
- "version": "4.3.86",
3
+ "version": "4.3.88",
4
4
  "description": "A JavaScript / TypeScript / Python / C# / PHP cryptocurrency trading library with support for 100+ exchanges",
5
5
  "unpkg": "dist/ccxt.browser.min.js",
6
6
  "type": "module",