ccxt 4.4.33 → 4.4.35

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 (122) hide show
  1. package/README.md +8 -7
  2. package/dist/ccxt.browser.min.js +6 -6
  3. package/dist/cjs/ccxt.js +4 -1
  4. package/dist/cjs/src/abstract/ellipx.js +9 -0
  5. package/dist/cjs/src/alpaca.js +2 -0
  6. package/dist/cjs/src/base/Exchange.js +32 -6
  7. package/dist/cjs/src/binance.js +19 -14
  8. package/dist/cjs/src/bingx.js +495 -153
  9. package/dist/cjs/src/bitbank.js +5 -0
  10. package/dist/cjs/src/bitbns.js +2 -0
  11. package/dist/cjs/src/bitfinex2.js +2 -1
  12. package/dist/cjs/src/bitget.js +177 -44
  13. package/dist/cjs/src/bitmex.js +3 -1
  14. package/dist/cjs/src/bitopro.js +3 -0
  15. package/dist/cjs/src/bitrue.js +3 -2
  16. package/dist/cjs/src/btcmarkets.js +5 -3
  17. package/dist/cjs/src/btcturk.js +19 -19
  18. package/dist/cjs/src/bybit.js +14 -11
  19. package/dist/cjs/src/cex.js +13 -4
  20. package/dist/cjs/src/coinbase.js +3 -2
  21. package/dist/cjs/src/coinex.js +1 -0
  22. package/dist/cjs/src/coinone.js +7 -7
  23. package/dist/cjs/src/coinsph.js +7 -7
  24. package/dist/cjs/src/coinspot.js +39 -39
  25. package/dist/cjs/src/cryptocom.js +36 -34
  26. package/dist/cjs/src/ellipx.js +1871 -0
  27. package/dist/cjs/src/gate.js +145 -41
  28. package/dist/cjs/src/hyperliquid.js +75 -11
  29. package/dist/cjs/src/idex.js +3 -3
  30. package/dist/cjs/src/kraken.js +71 -54
  31. package/dist/cjs/src/krakenfutures.js +3 -1
  32. package/dist/cjs/src/kucoin.js +1 -1
  33. package/dist/cjs/src/okcoin.js +2 -0
  34. package/dist/cjs/src/okx.js +16 -11
  35. package/dist/cjs/src/onetrading.js +34 -396
  36. package/dist/cjs/src/paradex.js +2 -0
  37. package/dist/cjs/src/phemex.js +23 -0
  38. package/dist/cjs/src/poloniex.js +3 -1
  39. package/dist/cjs/src/poloniexfutures.js +3 -1
  40. package/dist/cjs/src/pro/bitrue.js +13 -11
  41. package/dist/cjs/src/pro/idex.js +5 -0
  42. package/dist/cjs/src/pro/probit.js +62 -68
  43. package/dist/cjs/src/pro/woo.js +15 -15
  44. package/dist/cjs/src/vertex.js +2 -0
  45. package/dist/cjs/src/woo.js +69 -69
  46. package/dist/cjs/src/xt.js +5 -5
  47. package/examples/js/cli.js +1 -1
  48. package/js/ccxt.d.ts +5 -2
  49. package/js/ccxt.js +4 -2
  50. package/js/src/abstract/bingx.d.ts +17 -0
  51. package/js/src/abstract/bitbank.d.ts +5 -0
  52. package/js/src/abstract/bitfinex2.d.ts +1 -0
  53. package/js/src/abstract/bitpanda.d.ts +0 -12
  54. package/js/src/abstract/bitrue.d.ts +3 -3
  55. package/js/src/abstract/ellipx.d.ts +28 -0
  56. package/js/src/abstract/ellipx.js +11 -0
  57. package/js/src/abstract/okx.d.ts +1 -0
  58. package/js/src/abstract/onetrading.d.ts +0 -12
  59. package/js/src/alpaca.js +2 -0
  60. package/js/src/base/Exchange.d.ts +8 -0
  61. package/js/src/base/Exchange.js +32 -6
  62. package/js/src/binance.js +19 -14
  63. package/js/src/bingx.d.ts +11 -1
  64. package/js/src/bingx.js +495 -153
  65. package/js/src/bitbank.js +5 -0
  66. package/js/src/bitbns.js +2 -0
  67. package/js/src/bitfinex2.js +2 -1
  68. package/js/src/bitget.d.ts +4 -4
  69. package/js/src/bitget.js +177 -44
  70. package/js/src/bitmex.js +3 -1
  71. package/js/src/bitopro.d.ts +1 -0
  72. package/js/src/bitopro.js +3 -0
  73. package/js/src/bitrue.js +3 -2
  74. package/js/src/btcmarkets.d.ts +1 -0
  75. package/js/src/btcmarkets.js +5 -3
  76. package/js/src/btcturk.js +19 -19
  77. package/js/src/bybit.d.ts +3 -2
  78. package/js/src/bybit.js +14 -11
  79. package/js/src/cex.d.ts +1 -0
  80. package/js/src/cex.js +13 -4
  81. package/js/src/coinbase.d.ts +2 -1
  82. package/js/src/coinbase.js +3 -2
  83. package/js/src/coinex.js +1 -0
  84. package/js/src/coinone.js +7 -7
  85. package/js/src/coinsph.js +7 -7
  86. package/js/src/coinspot.js +39 -39
  87. package/js/src/cryptocom.d.ts +1 -1
  88. package/js/src/cryptocom.js +36 -34
  89. package/js/src/ellipx.d.ts +236 -0
  90. package/js/src/ellipx.js +1874 -0
  91. package/js/src/gate.d.ts +7 -7
  92. package/js/src/gate.js +145 -41
  93. package/js/src/hyperliquid.d.ts +10 -0
  94. package/js/src/hyperliquid.js +77 -13
  95. package/js/src/idex.js +4 -4
  96. package/js/src/kraken.d.ts +11 -8
  97. package/js/src/kraken.js +71 -54
  98. package/js/src/krakenfutures.js +3 -1
  99. package/js/src/kucoin.js +1 -1
  100. package/js/src/okcoin.js +2 -0
  101. package/js/src/okx.d.ts +1 -1
  102. package/js/src/okx.js +16 -11
  103. package/js/src/onetrading.d.ts +20 -67
  104. package/js/src/onetrading.js +35 -397
  105. package/js/src/paradex.js +2 -0
  106. package/js/src/phemex.js +23 -0
  107. package/js/src/poloniex.d.ts +1 -1
  108. package/js/src/poloniex.js +3 -1
  109. package/js/src/poloniexfutures.d.ts +1 -1
  110. package/js/src/poloniexfutures.js +3 -1
  111. package/js/src/pro/bitrue.js +13 -11
  112. package/js/src/pro/idex.d.ts +5 -0
  113. package/js/src/pro/idex.js +5 -0
  114. package/js/src/pro/probit.d.ts +2 -1
  115. package/js/src/pro/probit.js +62 -68
  116. package/js/src/pro/woo.d.ts +11 -11
  117. package/js/src/pro/woo.js +15 -15
  118. package/js/src/vertex.js +2 -0
  119. package/js/src/woo.d.ts +60 -60
  120. package/js/src/woo.js +69 -69
  121. package/js/src/xt.js +5 -5
  122. package/package.json +4 -3
@@ -36,6 +36,8 @@ class poloniex extends poloniex$1 {
36
36
  'createMarketOrderWithCost': false,
37
37
  'createMarketSellOrderWithCost': false,
38
38
  'createOrder': true,
39
+ 'createStopOrder': true,
40
+ 'createTriggerOrder': true,
39
41
  'editOrder': true,
40
42
  'fetchBalance': true,
41
43
  'fetchClosedOrder': false,
@@ -1266,7 +1268,7 @@ class poloniex extends poloniex$1 {
1266
1268
  * @param {float} amount how much of currency you want to trade in units of base currency
1267
1269
  * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
1268
1270
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1269
- * @param {float} [params.triggerPrice] *spot only* The price at which a trigger order is triggered at
1271
+ * @param {float} [params.triggerPrice] the price at which a trigger order is triggered at
1270
1272
  * @param {float} [params.cost] *spot market buy only* the quote quantity that can be used as an alternative for the amount
1271
1273
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1272
1274
  */
@@ -31,6 +31,8 @@ class poloniexfutures extends poloniexfutures$1 {
31
31
  'future': false,
32
32
  'option': undefined,
33
33
  'createOrder': true,
34
+ 'createStopOrder': true,
35
+ 'createTriggerOrder': true,
34
36
  'fetchBalance': true,
35
37
  'fetchClosedOrders': true,
36
38
  'fetchCurrencies': false,
@@ -835,7 +837,7 @@ class poloniexfutures extends poloniexfutures$1 {
835
837
  * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
836
838
  * @param {object} [params] extra parameters specific to the exchange API endpoint
837
839
  * @param {float} [params.leverage] Leverage size of the order
838
- * @param {float} [params.stopPrice] The price at which a trigger order is triggered at
840
+ * @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
839
841
  * @param {bool} [params.reduceOnly] A mark to reduce the position size only. Set to false by default. Need to set the position size when reduceOnly is true.
840
842
  * @param {string} [params.timeInForce] GTC, GTT, IOC, or FOK, default is GTC, limit orders only
841
843
  * @param {string} [params.postOnly] Post only flag, invalid when timeInForce is IOC or FOK
@@ -30,15 +30,17 @@ class bitrue extends bitrue$1 {
30
30
  },
31
31
  'api': {
32
32
  'open': {
33
- 'private': {
34
- 'post': {
35
- 'poseidon/api/v1/listenKey': 1,
36
- },
37
- 'put': {
38
- 'poseidon/api/v1/listenKey/{listenKey}': 1,
39
- },
40
- 'delete': {
41
- 'poseidon/api/v1/listenKey/{listenKey}': 1,
33
+ 'v1': {
34
+ 'private': {
35
+ 'post': {
36
+ 'poseidon/api/v1/listenKey': 1,
37
+ },
38
+ 'put': {
39
+ 'poseidon/api/v1/listenKey/{listenKey}': 1,
40
+ },
41
+ 'delete': {
42
+ 'poseidon/api/v1/listenKey/{listenKey}': 1,
43
+ },
42
44
  },
43
45
  },
44
46
  },
@@ -411,7 +413,7 @@ class bitrue extends bitrue$1 {
411
413
  async authenticate(params = {}) {
412
414
  const listenKey = this.safeValue(this.options, 'listenKey');
413
415
  if (listenKey === undefined) {
414
- const response = await this.openPrivatePostPoseidonApiV1ListenKey(params);
416
+ const response = await this.openV1PrivatePostPoseidonApiV1ListenKey(params);
415
417
  //
416
418
  // {
417
419
  // "msg": "succ",
@@ -436,7 +438,7 @@ class bitrue extends bitrue$1 {
436
438
  'listenKey': listenKey,
437
439
  };
438
440
  try {
439
- await this.openPrivatePutPoseidonApiV1ListenKeyListenKey(this.extend(request, params));
441
+ await this.openV1PrivatePutPoseidonApiV1ListenKeyListenKey(this.extend(request, params));
440
442
  //
441
443
  // ಠ_ಠ
442
444
  // {
@@ -67,6 +67,7 @@ class idex extends idex$1 {
67
67
  * @method
68
68
  * @name idex#watchTicker
69
69
  * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
70
+ * @see https://api-docs-v4.idex.io/#tickers
70
71
  * @param {string} symbol unified symbol of the market to fetch the ticker for
71
72
  * @param {object} [params] extra parameters specific to the exchange API endpoint
72
73
  * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
@@ -139,6 +140,7 @@ class idex extends idex$1 {
139
140
  * @method
140
141
  * @name idex#watchTrades
141
142
  * @description get the list of most recent trades for a particular symbol
143
+ * @see https://api-docs-v4.idex.io/#trades
142
144
  * @param {string} symbol unified symbol of the market to fetch trades for
143
145
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
144
146
  * @param {int} [limit] the maximum amount of trades to fetch
@@ -233,6 +235,7 @@ class idex extends idex$1 {
233
235
  * @method
234
236
  * @name idex#watchOHLCV
235
237
  * @description watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
238
+ * @see https://api-docs-v4.idex.io/#candles
236
239
  * @param {string} symbol unified symbol of the market to fetch OHLCV data for
237
240
  * @param {string} timeframe the length of time each candle represents
238
241
  * @param {int} [since] timestamp in ms of the earliest candle to fetch
@@ -403,6 +406,7 @@ class idex extends idex$1 {
403
406
  * @method
404
407
  * @name idex#watchOrderBook
405
408
  * @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
409
+ * @see https://api-docs-v4.idex.io/#l2-order-book
406
410
  * @param {string} symbol unified symbol of the market to fetch the order book for
407
411
  * @param {int} [limit] the maximum amount of order book entries to return
408
412
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -506,6 +510,7 @@ class idex extends idex$1 {
506
510
  * @method
507
511
  * @name idex#watchOrders
508
512
  * @description watches information on multiple orders made by the user
513
+ * @see https://api-docs-v4.idex.io/#orders
509
514
  * @param {string} symbol unified market symbol of the market orders were made in
510
515
  * @param {int} [since] the earliest time in ms to fetch orders for
511
516
  * @param {int} [limit] the maximum number of order structures to retrieve
@@ -34,15 +34,6 @@ class probit extends probit$1 {
34
34
  'filter': 'order_books_l2',
35
35
  'interval': 100, // or 500
36
36
  },
37
- 'watchTrades': {
38
- 'filter': 'recent_trades',
39
- },
40
- 'watchTicker': {
41
- 'filter': 'ticker',
42
- },
43
- 'watchOrders': {
44
- 'channel': 'open_order',
45
- },
46
37
  },
47
38
  'streaming': {},
48
39
  });
@@ -58,13 +49,7 @@ class probit extends probit$1 {
58
49
  async watchBalance(params = {}) {
59
50
  await this.authenticate(params);
60
51
  const messageHash = 'balance';
61
- const url = this.urls['api']['ws'];
62
- const subscribe = {
63
- 'type': 'subscribe',
64
- 'channel': 'balance',
65
- };
66
- const request = this.extend(subscribe, params);
67
- return await this.watch(url, messageHash, request, messageHash);
52
+ return await this.subscribePrivate(messageHash, 'balance', params);
68
53
  }
69
54
  handleBalance(client, message) {
70
55
  //
@@ -124,9 +109,8 @@ class probit extends probit$1 {
124
109
  * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
125
110
  */
126
111
  async watchTicker(symbol, params = {}) {
127
- let filter = undefined;
128
- [filter, params] = this.handleOptionAndParams(params, 'watchTicker', 'filter', 'ticker');
129
- return await this.subscribeOrderBook(symbol, 'ticker', filter, params);
112
+ const channel = 'ticker';
113
+ return await this.subscribePublic('watchTicker', symbol, 'ticker', channel, params);
130
114
  }
131
115
  handleTicker(client, message) {
132
116
  //
@@ -169,9 +153,8 @@ class probit extends probit$1 {
169
153
  * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
170
154
  */
171
155
  async watchTrades(symbol, since = undefined, limit = undefined, params = {}) {
172
- let filter = undefined;
173
- [filter, params] = this.handleOptionAndParams(params, 'watchTrades', 'filter', 'recent_trades');
174
- const trades = await this.subscribeOrderBook(symbol, 'trades', filter, params);
156
+ const channel = 'recent_trades';
157
+ const trades = await this.subscribePublic('watchTrades', symbol, 'trades', channel, params);
175
158
  if (this.newUpdates) {
176
159
  limit = trades.getLimit(symbol, limit);
177
160
  }
@@ -202,10 +185,12 @@ class probit extends probit$1 {
202
185
  const symbol = this.safeSymbol(marketId);
203
186
  const market = this.safeMarket(marketId);
204
187
  const trades = this.safeValue(message, 'recent_trades', []);
205
- const reset = this.safeBool(message, 'reset', false);
188
+ if (this.safeBool(message, 'reset', false)) {
189
+ return; // see comment in handleMessage
190
+ }
206
191
  const messageHash = 'trades:' + symbol;
207
192
  let stored = this.safeValue(this.trades, symbol);
208
- if (stored === undefined || reset) {
193
+ if (stored === undefined) {
209
194
  const limit = this.safeInteger(this.options, 'tradesLimit', 1000);
210
195
  stored = new Cache.ArrayCache(limit);
211
196
  this.trades[symbol] = stored;
@@ -232,20 +217,12 @@ class probit extends probit$1 {
232
217
  async watchMyTrades(symbol = undefined, since = undefined, limit = undefined, params = {}) {
233
218
  await this.loadMarkets();
234
219
  await this.authenticate(params);
235
- let messageHash = 'myTrades';
220
+ let messageHash = 'trades';
236
221
  if (symbol !== undefined) {
237
- const market = this.market(symbol);
238
- symbol = market['symbol'];
222
+ symbol = this.safeSymbol(symbol);
239
223
  messageHash = messageHash + ':' + symbol;
240
224
  }
241
- const url = this.urls['api']['ws'];
242
- const channel = 'trade_history';
243
- const message = {
244
- 'type': 'subscribe',
245
- 'channel': channel,
246
- };
247
- const request = this.extend(message, params);
248
- const trades = await this.watch(url, messageHash, request, channel);
225
+ const trades = await this.subscribePrivate(messageHash, 'trade_history', params);
249
226
  if (this.newUpdates) {
250
227
  limit = trades.getLimit(symbol, limit);
251
228
  }
@@ -276,10 +253,12 @@ class probit extends probit$1 {
276
253
  if (length === 0) {
277
254
  return;
278
255
  }
279
- const reset = this.safeBool(message, 'reset', false);
280
- const messageHash = 'myTrades';
256
+ if (this.safeBool(message, 'reset', false)) {
257
+ return; // see comment in handleMessage
258
+ }
259
+ const messageHash = 'trades';
281
260
  let stored = this.myTrades;
282
- if ((stored === undefined) || reset) {
261
+ if (stored === undefined) {
283
262
  const limit = this.safeInteger(this.options, 'tradesLimit', 1000);
284
263
  stored = new Cache.ArrayCacheBySymbolById(limit);
285
264
  this.myTrades = stored;
@@ -288,10 +267,18 @@ class probit extends probit$1 {
288
267
  const tradeSymbols = {};
289
268
  for (let j = 0; j < trades.length; j++) {
290
269
  const trade = trades[j];
270
+ // don't include 'executed' state, because it's just blanket state of the trade, emited before actual trade event
271
+ if (this.safeString(trade['info'], 'status') === 'executed') {
272
+ continue;
273
+ }
291
274
  tradeSymbols[trade['symbol']] = true;
292
275
  stored.append(trade);
293
276
  }
294
277
  const unique = Object.keys(tradeSymbols);
278
+ const uniqueLength = unique.length;
279
+ if (uniqueLength === 0) {
280
+ return;
281
+ }
295
282
  for (let i = 0; i < unique.length; i++) {
296
283
  const symbol = unique[i];
297
284
  const symbolSpecificMessageHash = messageHash + ':' + symbol;
@@ -313,21 +300,12 @@ class probit extends probit$1 {
313
300
  */
314
301
  async watchOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
315
302
  await this.authenticate(params);
316
- const url = this.urls['api']['ws'];
317
303
  let messageHash = 'orders';
318
304
  if (symbol !== undefined) {
319
- const market = this.market(symbol);
320
- symbol = market['symbol'];
305
+ symbol = this.safeSymbol(symbol);
321
306
  messageHash = messageHash + ':' + symbol;
322
307
  }
323
- let channel = undefined;
324
- [channel, params] = this.handleOptionAndParams(params, 'watchOrders', 'channel', 'open_order');
325
- const subscribe = {
326
- 'type': 'subscribe',
327
- 'channel': channel,
328
- };
329
- const request = this.extend(subscribe, params);
330
- const orders = await this.watch(url, messageHash, request, channel);
308
+ const orders = await this.subscribePrivate(messageHash, 'open_order', params);
331
309
  if (this.newUpdates) {
332
310
  limit = orders.getLimit(symbol, limit);
333
311
  }
@@ -397,41 +375,51 @@ class probit extends probit$1 {
397
375
  * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
398
376
  */
399
377
  async watchOrderBook(symbol, limit = undefined, params = {}) {
400
- let filter = undefined;
401
- [filter, params] = this.handleOptionAndParams(params, 'watchOrderBook', 'filter', 'order_books');
402
- const orderbook = await this.subscribeOrderBook(symbol, 'orderbook', filter, params);
378
+ let channel = undefined;
379
+ [channel, params] = this.handleOptionAndParams(params, 'watchOrderBook', 'filter', 'order_books');
380
+ const orderbook = await this.subscribePublic('watchOrderBook', symbol, 'orderbook', channel, params);
403
381
  return orderbook.limit();
404
382
  }
405
- async subscribeOrderBook(symbol, messageHash, filter, params = {}) {
383
+ async subscribePrivate(messageHash, channel, params) {
384
+ const url = this.urls['api']['ws'];
385
+ const subscribe = {
386
+ 'type': 'subscribe',
387
+ 'channel': channel,
388
+ };
389
+ const request = this.extend(subscribe, params);
390
+ const subscribeHash = messageHash;
391
+ return await this.watch(url, messageHash, request, subscribeHash);
392
+ }
393
+ async subscribePublic(methodName, symbol, dataType, filter, params = {}) {
406
394
  await this.loadMarkets();
407
395
  const market = this.market(symbol);
408
396
  symbol = market['symbol'];
409
397
  const url = this.urls['api']['ws'];
410
398
  const client = this.client(url);
411
- let interval = undefined;
412
- [interval, params] = this.handleOptionAndParams(params, 'watchOrderBook', 'interval', 100);
413
- const subscriptionHash = 'marketdata:' + symbol;
414
- messageHash = messageHash + ':' + symbol;
399
+ const subscribeHash = 'marketdata:' + symbol;
400
+ const messageHash = dataType + ':' + symbol;
415
401
  let filters = {};
416
- if (subscriptionHash in client.subscriptions) {
402
+ if (subscribeHash in client.subscriptions) {
417
403
  // already subscribed
418
- filters = client.subscriptions[subscriptionHash];
404
+ filters = client.subscriptions[subscribeHash];
419
405
  if (!(filter in filters)) {
420
406
  // resubscribe
421
- delete client.subscriptions[subscriptionHash];
407
+ delete client.subscriptions[subscribeHash];
422
408
  }
423
409
  }
424
410
  filters[filter] = true;
425
411
  const keys = Object.keys(filters);
426
- const message = {
412
+ let interval = undefined;
413
+ [interval, params] = this.handleOptionAndParams(params, methodName, 'interval', 100);
414
+ let request = {
415
+ 'type': 'subscribe',
427
416
  'channel': 'marketdata',
428
- 'interval': interval,
429
417
  'market_id': market['id'],
430
- 'type': 'subscribe',
431
418
  'filter': keys,
419
+ 'interval': interval,
432
420
  };
433
- const request = this.extend(message, params);
434
- return await this.watch(url, messageHash, request, messageHash, filters);
421
+ request = this.extend(request, params);
422
+ return await this.watch(url, messageHash, request, subscribeHash, filters);
435
423
  }
436
424
  handleOrderBook(client, message, orderBook) {
437
425
  //
@@ -510,7 +498,8 @@ class probit extends probit$1 {
510
498
  const result = this.safeString(message, 'result');
511
499
  const future = client.subscriptions['authenticated'];
512
500
  if (result === 'ok') {
513
- future.resolve(true);
501
+ const messageHash = 'authenticated';
502
+ client.resolve(message, messageHash);
514
503
  }
515
504
  else {
516
505
  future.reject(message);
@@ -523,11 +512,13 @@ class probit extends probit$1 {
523
512
  this.handleTicker(client, message);
524
513
  }
525
514
  const trades = this.safeValue(message, 'recent_trades', []);
526
- if (trades.length) {
515
+ const tradesLength = trades.length;
516
+ if (tradesLength) {
527
517
  this.handleTrades(client, message);
528
518
  }
529
519
  const orderBook = this.safeValueN(message, ['order_books', 'order_books_l1', 'order_books_l2', 'order_books_l3', 'order_books_l4'], []);
530
- if (orderBook.length) {
520
+ const orderBookLength = orderBook.length;
521
+ if (orderBookLength) {
531
522
  this.handleOrderBook(client, message, orderBook);
532
523
  }
533
524
  }
@@ -541,6 +532,9 @@ class probit extends probit$1 {
541
532
  // }
542
533
  // }
543
534
  //
535
+ // Note about 'reset' field
536
+ // 'reset': true field - it happens once after initial subscription, which just returns old items by the moment of subscription (like "fetchMyTrades" does)
537
+ //
544
538
  const errorCode = this.safeString(message, 'errorCode');
545
539
  if (errorCode !== undefined) {
546
540
  this.handleErrorMessage(client, message);
@@ -28,14 +28,14 @@ class woo extends woo$1 {
28
28
  'urls': {
29
29
  'api': {
30
30
  'ws': {
31
- 'public': 'wss://wss.woo.org/ws/stream',
32
- 'private': 'wss://wss.woo.org/v2/ws/private/stream',
31
+ 'public': 'wss://wss.woox.io/ws/stream',
32
+ 'private': 'wss://wss.woox.io/v2/ws/private/stream',
33
33
  },
34
34
  },
35
35
  'test': {
36
36
  'ws': {
37
- 'public': 'wss://wss.staging.woo.org/ws/stream',
38
- 'private': 'wss://wss.staging.woo.org/v2/ws/private/stream',
37
+ 'public': 'wss://wss.staging.woox.io/ws/stream',
38
+ 'private': 'wss://wss.staging.woox.io/v2/ws/private/stream',
39
39
  },
40
40
  },
41
41
  },
@@ -86,8 +86,8 @@ class woo extends woo$1 {
86
86
  /**
87
87
  * @method
88
88
  * @name woo#watchOrderBook
89
- * @see https://docs.woo.org/#orderbookupdate
90
- * @see https://docs.woo.org/#orderbook
89
+ * @see https://docs.woox.io/#orderbookupdate
90
+ * @see https://docs.woox.io/#orderbook
91
91
  * @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
92
92
  * @param {string} symbol unified symbol of the market to fetch the order book for
93
93
  * @param {int} [limit] the maximum amount of order book entries to return.
@@ -340,7 +340,7 @@ class woo extends woo$1 {
340
340
  /**
341
341
  * @method
342
342
  * @name woo#watchTickers
343
- * @see https://docs.woo.org/#24h-tickers
343
+ * @see https://docs.woox.io/#24h-tickers
344
344
  * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
345
345
  * @param {string[]} symbols unified symbol of the market to fetch the ticker for
346
346
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -477,7 +477,7 @@ class woo extends woo$1 {
477
477
  * @method
478
478
  * @name woo#watchOHLCV
479
479
  * @description watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
480
- * @see https://docs.woo.org/#k-line
480
+ * @see https://docs.woox.io/#k-line
481
481
  * @param {string} symbol unified symbol of the market to fetch OHLCV data for
482
482
  * @param {string} timeframe the length of time each candle represents
483
483
  * @param {int} [since] timestamp in ms of the earliest candle to fetch
@@ -553,7 +553,7 @@ class woo extends woo$1 {
553
553
  * @method
554
554
  * @name woo#watchTrades
555
555
  * @description watches information on multiple trades made in a market
556
- * @see https://docs.woo.org/#trade
556
+ * @see https://docs.woox.io/#trade
557
557
  * @param {string} symbol unified market symbol of the market trades were made in
558
558
  * @param {int} [since] the earliest time in ms to fetch trades for
559
559
  * @param {int} [limit] the maximum number of trade structures to retrieve
@@ -743,8 +743,8 @@ class woo extends woo$1 {
743
743
  /**
744
744
  * @method
745
745
  * @name woo#watchOrders
746
- * @see https://docs.woo.org/#executionreport
747
- * @see https://docs.woo.org/#algoexecutionreportv2
746
+ * @see https://docs.woox.io/#executionreport
747
+ * @see https://docs.woox.io/#algoexecutionreportv2
748
748
  * @description watches information on multiple orders made by the user
749
749
  * @param {string} symbol unified market symbol of the market orders were made in
750
750
  * @param {int} [since] the earliest time in ms to fetch orders for
@@ -778,8 +778,8 @@ class woo extends woo$1 {
778
778
  /**
779
779
  * @method
780
780
  * @name woo#watchMyTrades
781
- * @see https://docs.woo.org/#executionreport
782
- * @see https://docs.woo.org/#algoexecutionreportv2
781
+ * @see https://docs.woox.io/#executionreport
782
+ * @see https://docs.woox.io/#algoexecutionreportv2
783
783
  * @description watches information on multiple trades made by the user
784
784
  * @param {string} symbol unified market symbol of the market orders were made in
785
785
  * @param {int} [since] the earliest time in ms to fetch orders for
@@ -1018,7 +1018,7 @@ class woo extends woo$1 {
1018
1018
  /**
1019
1019
  * @method
1020
1020
  * @name woo#watchPositions
1021
- * @see https://docs.woo.org/#position-push
1021
+ * @see https://docs.woox.io/#position-push
1022
1022
  * @description watch all open positions
1023
1023
  * @param {string[]|undefined} symbols list of unified market symbols
1024
1024
  * @param since
@@ -1135,7 +1135,7 @@ class woo extends woo$1 {
1135
1135
  }
1136
1136
  /**
1137
1137
  * @method
1138
- * @see https://docs.woo.org/#balance
1138
+ * @see https://docs.woox.io/#balance
1139
1139
  * @name woo#watchBalance
1140
1140
  * @description watch balance and get the amount of funds available for trading or funds locked in orders
1141
1141
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -48,6 +48,8 @@ class vertex extends vertex$1 {
48
48
  'createOrder': true,
49
49
  'createOrders': true,
50
50
  'createReduceOnlyOrder': true,
51
+ 'createStopOrder': true,
52
+ 'createTriggerOrder': true,
51
53
  'editOrder': false,
52
54
  'fetchAccounts': false,
53
55
  'fetchBalance': true,