ccxt 4.3.53 → 4.3.55

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 (231) hide show
  1. package/README.md +4 -4
  2. package/dist/ccxt.browser.min.js +3 -3
  3. package/dist/cjs/ccxt.js +1 -1
  4. package/dist/cjs/src/ace.js +1 -1
  5. package/dist/cjs/src/alpaca.js +1 -1
  6. package/dist/cjs/src/ascendex.js +6 -4
  7. package/dist/cjs/src/bigone.js +1 -1
  8. package/dist/cjs/src/binance.js +6 -6
  9. package/dist/cjs/src/bingx.js +4 -4
  10. package/dist/cjs/src/bit2c.js +1 -1
  11. package/dist/cjs/src/bitbank.js +1 -1
  12. package/dist/cjs/src/bitbns.js +1 -1
  13. package/dist/cjs/src/bitfinex.js +1 -1
  14. package/dist/cjs/src/bitfinex2.js +1 -1
  15. package/dist/cjs/src/bitflyer.js +1 -1
  16. package/dist/cjs/src/bitget.js +2 -2
  17. package/dist/cjs/src/bithumb.js +1 -1
  18. package/dist/cjs/src/bitmart.js +3 -3
  19. package/dist/cjs/src/bitmex.js +1 -1
  20. package/dist/cjs/src/bitopro.js +1 -1
  21. package/dist/cjs/src/bitrue.js +1 -1
  22. package/dist/cjs/src/bitso.js +1 -1
  23. package/dist/cjs/src/bitstamp.js +1 -1
  24. package/dist/cjs/src/bitteam.js +1 -1
  25. package/dist/cjs/src/bitvavo.js +2 -2
  26. package/dist/cjs/src/bl3p.js +1 -1
  27. package/dist/cjs/src/blockchaincom.js +28 -28
  28. package/dist/cjs/src/blofin.js +1 -1
  29. package/dist/cjs/src/btcalpha.js +4 -12
  30. package/dist/cjs/src/btcbox.js +1 -1
  31. package/dist/cjs/src/btcmarkets.js +1 -1
  32. package/dist/cjs/src/btcturk.js +1 -1
  33. package/dist/cjs/src/bybit.js +2 -2
  34. package/dist/cjs/src/cex.js +2 -2
  35. package/dist/cjs/src/coinbase.js +33 -33
  36. package/dist/cjs/src/coinbaseexchange.js +1 -1
  37. package/dist/cjs/src/coinbaseinternational.js +1 -1
  38. package/dist/cjs/src/coincheck.js +1 -1
  39. package/dist/cjs/src/coinex.js +2 -2
  40. package/dist/cjs/src/coinlist.js +2 -2
  41. package/dist/cjs/src/coinmate.js +1 -1
  42. package/dist/cjs/src/coinmetro.js +1 -1
  43. package/dist/cjs/src/coinone.js +1 -1
  44. package/dist/cjs/src/coinsph.js +1 -1
  45. package/dist/cjs/src/coinspot.js +1 -1
  46. package/dist/cjs/src/cryptocom.js +1 -1
  47. package/dist/cjs/src/currencycom.js +1 -1
  48. package/dist/cjs/src/delta.js +2 -2
  49. package/dist/cjs/src/deribit.js +4 -4
  50. package/dist/cjs/src/digifinex.js +2 -2
  51. package/dist/cjs/src/exmo.js +2 -2
  52. package/dist/cjs/src/gate.js +2 -2
  53. package/dist/cjs/src/gemini.js +1 -1
  54. package/dist/cjs/src/hitbtc.js +1 -1
  55. package/dist/cjs/src/hollaex.js +1 -1
  56. package/dist/cjs/src/htx.js +3 -3
  57. package/dist/cjs/src/huobijp.js +1 -1
  58. package/dist/cjs/src/hyperliquid.js +2 -2
  59. package/dist/cjs/src/idex.js +1 -1
  60. package/dist/cjs/src/independentreserve.js +1 -1
  61. package/dist/cjs/src/indodax.js +1 -1
  62. package/dist/cjs/src/kraken.js +2 -2
  63. package/dist/cjs/src/kucoin.js +136 -47
  64. package/dist/cjs/src/kucoinfutures.js +1 -1
  65. package/dist/cjs/src/kuna.js +1 -1
  66. package/dist/cjs/src/latoken.js +1 -1
  67. package/dist/cjs/src/lbank.js +1 -1
  68. package/dist/cjs/src/luno.js +1 -1
  69. package/dist/cjs/src/lykke.js +1 -1
  70. package/dist/cjs/src/mercado.js +1 -1
  71. package/dist/cjs/src/mexc.js +1 -1
  72. package/dist/cjs/src/ndax.js +1 -1
  73. package/dist/cjs/src/novadax.js +1 -1
  74. package/dist/cjs/src/oceanex.js +1 -1
  75. package/dist/cjs/src/okcoin.js +1 -1
  76. package/dist/cjs/src/okx.js +3 -3
  77. package/dist/cjs/src/onetrading.js +1 -1
  78. package/dist/cjs/src/oxfun.js +2 -2
  79. package/dist/cjs/src/p2b.js +1 -1
  80. package/dist/cjs/src/paymium.js +1 -1
  81. package/dist/cjs/src/phemex.js +30 -3
  82. package/dist/cjs/src/poloniex.js +6 -4
  83. package/dist/cjs/src/poloniexfutures.js +1 -1
  84. package/dist/cjs/src/pro/binance.js +3 -3
  85. package/dist/cjs/src/pro/bitvavo.js +2 -2
  86. package/dist/cjs/src/pro/bybit.js +22 -14
  87. package/dist/cjs/src/pro/cex.js +3 -3
  88. package/dist/cjs/src/pro/coinbase.js +23 -1
  89. package/dist/cjs/src/pro/cryptocom.js +1 -1
  90. package/dist/cjs/src/pro/gate.js +2 -2
  91. package/dist/cjs/src/pro/hitbtc.js +1 -1
  92. package/dist/cjs/src/pro/kraken.js +2 -2
  93. package/dist/cjs/src/pro/kucoin.js +66 -28
  94. package/dist/cjs/src/pro/okx.js +2 -2
  95. package/dist/cjs/src/pro/oxfun.js +2 -2
  96. package/dist/cjs/src/pro/poloniex.js +1 -1
  97. package/dist/cjs/src/pro/vertex.js +2 -2
  98. package/dist/cjs/src/probit.js +1 -1
  99. package/dist/cjs/src/timex.js +1 -1
  100. package/dist/cjs/src/tokocrypto.js +1 -1
  101. package/dist/cjs/src/tradeogre.js +1 -1
  102. package/dist/cjs/src/upbit.js +1 -1
  103. package/dist/cjs/src/vertex.js +2 -2
  104. package/dist/cjs/src/wavesexchange.js +1 -1
  105. package/dist/cjs/src/wazirx.js +1 -1
  106. package/dist/cjs/src/whitebit.js +2 -2
  107. package/dist/cjs/src/woo.js +34 -26
  108. package/dist/cjs/src/woofipro.js +3 -3
  109. package/dist/cjs/src/yobit.js +1 -1
  110. package/dist/cjs/src/zaif.js +1 -1
  111. package/dist/cjs/src/zonda.js +1 -1
  112. package/js/ccxt.d.ts +1 -1
  113. package/js/ccxt.js +1 -1
  114. package/js/src/abstract/kucoin.d.ts +3 -0
  115. package/js/src/abstract/kucoinfutures.d.ts +3 -0
  116. package/js/src/ace.js +1 -1
  117. package/js/src/alpaca.js +1 -1
  118. package/js/src/ascendex.d.ts +1 -1
  119. package/js/src/ascendex.js +6 -4
  120. package/js/src/base/types.d.ts +4 -0
  121. package/js/src/bigone.js +1 -1
  122. package/js/src/binance.js +6 -6
  123. package/js/src/bingx.js +4 -4
  124. package/js/src/bit2c.js +1 -1
  125. package/js/src/bitbank.js +1 -1
  126. package/js/src/bitbns.js +1 -1
  127. package/js/src/bitfinex.js +1 -1
  128. package/js/src/bitfinex2.js +1 -1
  129. package/js/src/bitflyer.js +1 -1
  130. package/js/src/bitget.js +2 -2
  131. package/js/src/bithumb.js +1 -1
  132. package/js/src/bitmart.js +3 -3
  133. package/js/src/bitmex.js +1 -1
  134. package/js/src/bitopro.js +1 -1
  135. package/js/src/bitrue.js +1 -1
  136. package/js/src/bitso.js +1 -1
  137. package/js/src/bitstamp.js +1 -1
  138. package/js/src/bitteam.js +1 -1
  139. package/js/src/bitvavo.js +2 -2
  140. package/js/src/bl3p.js +1 -1
  141. package/js/src/blockchaincom.js +28 -28
  142. package/js/src/blofin.js +1 -1
  143. package/js/src/btcalpha.js +5 -13
  144. package/js/src/btcbox.js +1 -1
  145. package/js/src/btcmarkets.js +1 -1
  146. package/js/src/btcturk.js +1 -1
  147. package/js/src/bybit.js +2 -2
  148. package/js/src/cex.js +2 -2
  149. package/js/src/coinbase.js +33 -33
  150. package/js/src/coinbaseexchange.js +1 -1
  151. package/js/src/coinbaseinternational.js +1 -1
  152. package/js/src/coincheck.js +1 -1
  153. package/js/src/coinex.js +2 -2
  154. package/js/src/coinlist.js +2 -2
  155. package/js/src/coinmate.js +1 -1
  156. package/js/src/coinmetro.js +1 -1
  157. package/js/src/coinone.js +1 -1
  158. package/js/src/coinsph.js +1 -1
  159. package/js/src/coinspot.js +1 -1
  160. package/js/src/cryptocom.js +1 -1
  161. package/js/src/currencycom.js +1 -1
  162. package/js/src/delta.js +2 -2
  163. package/js/src/deribit.js +4 -4
  164. package/js/src/digifinex.js +2 -2
  165. package/js/src/exmo.js +2 -2
  166. package/js/src/gate.js +2 -2
  167. package/js/src/gemini.js +1 -1
  168. package/js/src/hitbtc.js +1 -1
  169. package/js/src/hollaex.js +1 -1
  170. package/js/src/htx.js +3 -3
  171. package/js/src/huobijp.js +1 -1
  172. package/js/src/hyperliquid.js +2 -2
  173. package/js/src/idex.js +1 -1
  174. package/js/src/independentreserve.js +1 -1
  175. package/js/src/indodax.js +1 -1
  176. package/js/src/kraken.js +2 -2
  177. package/js/src/kucoin.d.ts +1 -0
  178. package/js/src/kucoin.js +136 -47
  179. package/js/src/kucoinfutures.js +1 -1
  180. package/js/src/kuna.js +1 -1
  181. package/js/src/latoken.js +1 -1
  182. package/js/src/lbank.js +1 -1
  183. package/js/src/luno.js +1 -1
  184. package/js/src/lykke.js +1 -1
  185. package/js/src/mercado.js +1 -1
  186. package/js/src/mexc.js +1 -1
  187. package/js/src/ndax.js +1 -1
  188. package/js/src/novadax.js +1 -1
  189. package/js/src/oceanex.js +1 -1
  190. package/js/src/okcoin.js +1 -1
  191. package/js/src/okx.js +3 -3
  192. package/js/src/onetrading.js +1 -1
  193. package/js/src/oxfun.js +2 -2
  194. package/js/src/p2b.js +1 -1
  195. package/js/src/paymium.js +1 -1
  196. package/js/src/phemex.d.ts +1 -1
  197. package/js/src/phemex.js +30 -3
  198. package/js/src/poloniex.js +6 -4
  199. package/js/src/poloniexfutures.js +1 -1
  200. package/js/src/pro/binance.js +3 -3
  201. package/js/src/pro/bitvavo.js +2 -2
  202. package/js/src/pro/bybit.d.ts +1 -1
  203. package/js/src/pro/bybit.js +22 -14
  204. package/js/src/pro/cex.js +3 -3
  205. package/js/src/pro/coinbase.d.ts +1 -0
  206. package/js/src/pro/coinbase.js +23 -1
  207. package/js/src/pro/cryptocom.js +1 -1
  208. package/js/src/pro/gate.js +2 -2
  209. package/js/src/pro/hitbtc.js +1 -1
  210. package/js/src/pro/kraken.js +2 -2
  211. package/js/src/pro/kucoin.js +66 -28
  212. package/js/src/pro/okx.js +2 -2
  213. package/js/src/pro/oxfun.js +2 -2
  214. package/js/src/pro/poloniex.js +1 -1
  215. package/js/src/pro/vertex.js +2 -2
  216. package/js/src/probit.js +1 -1
  217. package/js/src/timex.js +1 -1
  218. package/js/src/tokocrypto.js +1 -1
  219. package/js/src/tradeogre.js +1 -1
  220. package/js/src/upbit.js +1 -1
  221. package/js/src/vertex.js +2 -2
  222. package/js/src/wavesexchange.js +1 -1
  223. package/js/src/wazirx.js +1 -1
  224. package/js/src/whitebit.js +2 -2
  225. package/js/src/woo.d.ts +1 -0
  226. package/js/src/woo.js +34 -26
  227. package/js/src/woofipro.js +3 -3
  228. package/js/src/yobit.js +1 -1
  229. package/js/src/zaif.js +1 -1
  230. package/js/src/zonda.js +1 -1
  231. package/package.json +54 -52
@@ -2347,7 +2347,7 @@ export default class binance extends binanceRest {
2347
2347
  * @param {string} type 'market' or 'limit'
2348
2348
  * @param {string} side 'buy' or 'sell'
2349
2349
  * @param {float} amount how much of currency you want to trade in units of base currency
2350
- * @param {float|undefined} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
2350
+ * @param {float|undefined} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
2351
2351
  * @param {object} [params] extra parameters specific to the exchange API endpoint
2352
2352
  * @param {boolean} params.test test order, default false
2353
2353
  * @param {boolean} params.returnRateLimits set to true to return rate limit information, default false
@@ -2496,7 +2496,7 @@ export default class binance extends binanceRest {
2496
2496
  * @param {string} type 'market' or 'limit'
2497
2497
  * @param {string} side 'buy' or 'sell'
2498
2498
  * @param {float} amount how much of the currency you want to trade in units of the base currency
2499
- * @param {float|undefined} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
2499
+ * @param {float|undefined} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
2500
2500
  * @param {object} [params] extra parameters specific to the exchange API endpoint
2501
2501
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2502
2502
  */
@@ -3733,7 +3733,7 @@ export default class binance extends binanceRest {
3733
3733
  rejected = true;
3734
3734
  // private endpoint uses id as messageHash
3735
3735
  client.reject(e, id);
3736
- // public endpoint stores messageHash in subscriptios
3736
+ // public endpoint stores messageHash in subscriptions
3737
3737
  const subscriptionKeys = Object.keys(client.subscriptions);
3738
3738
  for (let i = 0; i < subscriptionKeys.length; i++) {
3739
3739
  const subscriptionHash = subscriptionKeys[i];
@@ -541,7 +541,7 @@ export default class bitvavo extends bitvavoRest {
541
541
  * @param {string} type 'market' or 'limit'
542
542
  * @param {string} side 'buy' or 'sell'
543
543
  * @param {float} amount how much of currency you want to trade in units of base currency
544
- * @param {float} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
544
+ * @param {float} price the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
545
545
  * @param {object} [params] extra parameters specific to the bitvavo api endpoint
546
546
  * @param {string} [params.timeInForce] "GTC", "IOC", or "PO"
547
547
  * @param {float} [params.stopPrice] The price at which a trigger order is triggered at
@@ -572,7 +572,7 @@ export default class bitvavo extends bitvavoRest {
572
572
  * @param {string} type 'market' or 'limit'
573
573
  * @param {string} side 'buy' or 'sell'
574
574
  * @param {float} [amount] how much of currency you want to trade in units of base currency
575
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the base currency, ignored in market orders
575
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
576
576
  * @param {object} [params] extra parameters specific to the bitvavo api endpoint
577
577
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
578
578
  */
@@ -4,7 +4,7 @@ import Client from '../base/ws/Client.js';
4
4
  export default class bybit extends bybitRest {
5
5
  describe(): any;
6
6
  requestId(): any;
7
- getUrlByMarketType(symbol?: Str, isPrivate?: boolean, method?: Str, params?: {}): any;
7
+ getUrlByMarketType(symbol?: Str, isPrivate?: boolean, method?: Str, params?: {}): Promise<any>;
8
8
  cleanParams(params: any): any;
9
9
  createOrderWs(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
10
10
  editOrderWs(id: string, symbol: string, type: OrderType, side: OrderSide, amount?: Num, price?: Num, params?: {}): Promise<Order>;
@@ -135,7 +135,7 @@ export default class bybit extends bybitRest {
135
135
  this.options['requestId'] = requestId;
136
136
  return requestId;
137
137
  }
138
- getUrlByMarketType(symbol = undefined, isPrivate = false, method = undefined, params = {}) {
138
+ async getUrlByMarketType(symbol = undefined, isPrivate = false, method = undefined, params = {}) {
139
139
  const accessibility = isPrivate ? 'private' : 'public';
140
140
  let isUsdcSettled = undefined;
141
141
  let isSpot = undefined;
@@ -155,7 +155,15 @@ export default class bybit extends bybitRest {
155
155
  }
156
156
  isSpot = (type === 'spot');
157
157
  if (isPrivate) {
158
- url = (isUsdcSettled) ? url[accessibility]['usdc'] : url[accessibility]['contract'];
158
+ const unified = await this.isUnifiedEnabled();
159
+ const isUnifiedMargin = this.safeBool(unified, 0, false);
160
+ const isUnifiedAccount = this.safeBool(unified, 1, false);
161
+ if (isUsdcSettled && !isUnifiedMargin && !isUnifiedAccount) {
162
+ url = url[accessibility]['usdc'];
163
+ }
164
+ else {
165
+ url = url[accessibility]['contract'];
166
+ }
159
167
  }
160
168
  else {
161
169
  if (isSpot) {
@@ -189,7 +197,7 @@ export default class bybit extends bybitRest {
189
197
  * @param {string} type 'market' or 'limit'
190
198
  * @param {string} side 'buy' or 'sell'
191
199
  * @param {float} amount how much of currency you want to trade in units of base currency
192
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
200
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
193
201
  * @param {object} [params] extra parameters specific to the exchange API endpoint
194
202
  * @param {string} [params.timeInForce] "GTC", "IOC", "FOK"
195
203
  * @param {bool} [params.postOnly] true or false whether the order is post-only
@@ -240,7 +248,7 @@ export default class bybit extends bybitRest {
240
248
  * @param {string} type 'market' or 'limit'
241
249
  * @param {string} side 'buy' or 'sell'
242
250
  * @param {float} amount how much of currency you want to trade in units of base currency
243
- * @param {float} price the price at which the order is to be fullfilled, in units of the base currency, ignored in market orders
251
+ * @param {float} price the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
244
252
  * @param {object} [params] extra parameters specific to the exchange API endpoint
245
253
  * @param {float} [params.triggerPrice] The price that a trigger order is triggered at
246
254
  * @param {float} [params.stopLossPrice] The price that a stop loss order is triggered at
@@ -322,7 +330,7 @@ export default class bybit extends bybitRest {
322
330
  const market = this.market(symbol);
323
331
  symbol = market['symbol'];
324
332
  const messageHash = 'ticker:' + symbol;
325
- const url = this.getUrlByMarketType(symbol, false, 'watchTicker', params);
333
+ const url = await this.getUrlByMarketType(symbol, false, 'watchTicker', params);
326
334
  params = this.cleanParams(params);
327
335
  const options = this.safeValue(this.options, 'watchTicker', {});
328
336
  let topic = this.safeString(options, 'name', 'tickers');
@@ -347,7 +355,7 @@ export default class bybit extends bybitRest {
347
355
  await this.loadMarkets();
348
356
  symbols = this.marketSymbols(symbols, undefined, false);
349
357
  const messageHashes = [];
350
- const url = this.getUrlByMarketType(symbols[0], false, 'watchTickers', params);
358
+ const url = await this.getUrlByMarketType(symbols[0], false, 'watchTickers', params);
351
359
  params = this.cleanParams(params);
352
360
  const options = this.safeValue(this.options, 'watchTickers', {});
353
361
  const topic = this.safeString(options, 'name', 'tickers');
@@ -528,7 +536,7 @@ export default class bybit extends bybitRest {
528
536
  await this.loadMarkets();
529
537
  const market = this.market(symbol);
530
538
  symbol = market['symbol'];
531
- const url = this.getUrlByMarketType(symbol, false, 'watchOHLCV', params);
539
+ const url = await this.getUrlByMarketType(symbol, false, 'watchOHLCV', params);
532
540
  params = this.cleanParams(params);
533
541
  let ohlcv = undefined;
534
542
  const timeframeId = this.safeString(this.timeframes, timeframe, timeframe);
@@ -646,7 +654,7 @@ export default class bybit extends bybitRest {
646
654
  throw new ArgumentsRequired(this.id + ' watchOrderBookForSymbols() requires a non-empty array of symbols');
647
655
  }
648
656
  symbols = this.marketSymbols(symbols);
649
- const url = this.getUrlByMarketType(symbols[0], false, 'watchOrderBook', params);
657
+ const url = await this.getUrlByMarketType(symbols[0], false, 'watchOrderBook', params);
650
658
  params = this.cleanParams(params);
651
659
  const market = this.market(symbols[0]);
652
660
  if (limit === undefined) {
@@ -778,7 +786,7 @@ export default class bybit extends bybitRest {
778
786
  throw new ArgumentsRequired(this.id + ' watchTradesForSymbols() requires a non-empty array of symbols');
779
787
  }
780
788
  params = this.cleanParams(params);
781
- const url = this.getUrlByMarketType(symbols[0], false, 'watchTrades', params);
789
+ const url = await this.getUrlByMarketType(symbols[0], false, 'watchTrades', params);
782
790
  const topics = [];
783
791
  const messageHashes = [];
784
792
  for (let i = 0; i < symbols.length; i++) {
@@ -941,7 +949,7 @@ export default class bybit extends bybitRest {
941
949
  symbol = this.symbol(symbol);
942
950
  messageHash += ':' + symbol;
943
951
  }
944
- const url = this.getUrlByMarketType(symbol, true, method, params);
952
+ const url = await this.getUrlByMarketType(symbol, true, method, params);
945
953
  await this.authenticate(url);
946
954
  const topicByMarket = {
947
955
  'spot': 'ticketInfo',
@@ -1070,7 +1078,7 @@ export default class bybit extends bybitRest {
1070
1078
  messageHash = '::' + symbols.join(',');
1071
1079
  }
1072
1080
  const firstSymbol = this.safeString(symbols, 0);
1073
- const url = this.getUrlByMarketType(firstSymbol, true, method, params);
1081
+ const url = await this.getUrlByMarketType(firstSymbol, true, method, params);
1074
1082
  messageHash = 'positions' + messageHash;
1075
1083
  const client = this.client(url);
1076
1084
  await this.authenticate(url);
@@ -1221,7 +1229,7 @@ export default class bybit extends bybitRest {
1221
1229
  await this.loadMarkets();
1222
1230
  const market = this.market(symbol);
1223
1231
  symbol = market['symbol'];
1224
- const url = this.getUrlByMarketType(symbol, false, 'watchLiquidations', params);
1232
+ const url = await this.getUrlByMarketType(symbol, false, 'watchLiquidations', params);
1225
1233
  params = this.cleanParams(params);
1226
1234
  const messageHash = 'liquidations::' + symbol;
1227
1235
  const topic = 'liquidation.' + market['id'];
@@ -1305,7 +1313,7 @@ export default class bybit extends bybitRest {
1305
1313
  symbol = this.symbol(symbol);
1306
1314
  messageHash += ':' + symbol;
1307
1315
  }
1308
- const url = this.getUrlByMarketType(symbol, true, method, params);
1316
+ const url = await this.getUrlByMarketType(symbol, true, method, params);
1309
1317
  await this.authenticate(url);
1310
1318
  const topicsByMarket = {
1311
1319
  'spot': ['order', 'stopOrder'],
@@ -1617,7 +1625,7 @@ export default class bybit extends bybitRest {
1617
1625
  const unified = await this.isUnifiedEnabled();
1618
1626
  const isUnifiedMargin = this.safeBool(unified, 0, false);
1619
1627
  const isUnifiedAccount = this.safeBool(unified, 1, false);
1620
- const url = this.getUrlByMarketType(undefined, true, method, params);
1628
+ const url = await this.getUrlByMarketType(undefined, true, method, params);
1621
1629
  await this.authenticate(url);
1622
1630
  const topicByMarket = {
1623
1631
  'spot': 'outboundAccountInfo',
package/js/src/pro/cex.js CHANGED
@@ -674,7 +674,7 @@ export default class cex extends cexRest {
674
674
  // }
675
675
  // }
676
676
  // }
677
- // fullfilledOrder
677
+ // fulfilledOrder
678
678
  // {
679
679
  // "e": "order",
680
680
  // "data": {
@@ -1258,7 +1258,7 @@ export default class cex extends cexRest {
1258
1258
  * @param {string} type 'market' or 'limit'
1259
1259
  * @param {string} side 'buy' or 'sell'
1260
1260
  * @param {float} amount how much of currency you want to trade in units of base currency
1261
- * @param {float} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
1261
+ * @param {float} price the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
1262
1262
  * @param {object} [params] extra parameters specific to the kraken api endpoint
1263
1263
  * @param {boolean} [params.maker_only] Optional, maker only places an order only if offers best sell (<= max) or buy(>= max) price for this pair, if not order placement will be rejected with an error - "Order is not maker"
1264
1264
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
@@ -1296,7 +1296,7 @@ export default class cex extends cexRest {
1296
1296
  * @param {string} type 'market' or 'limit'
1297
1297
  * @param {string} side 'buy' or 'sell'
1298
1298
  * @param {float} amount how much of the currency you want to trade in units of the base currency
1299
- * @param {float|undefined} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
1299
+ * @param {float|undefined} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
1300
1300
  * @param {object} [params] extra parameters specific to the cex api endpoint
1301
1301
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
1302
1302
  */
@@ -20,5 +20,6 @@ export default class coinbase extends coinbaseRest {
20
20
  handleOrderBookHelper(orderbook: any, updates: any): void;
21
21
  handleOrderBook(client: any, message: any): void;
22
22
  handleSubscriptionStatus(client: any, message: any): any;
23
+ handleHeartbeats(client: any, message: any): any;
23
24
  handleMessage(client: any, message: any): void;
24
25
  }
@@ -710,6 +710,25 @@ export default class coinbase extends coinbaseRest {
710
710
  //
711
711
  return message;
712
712
  }
713
+ handleHeartbeats(client, message) {
714
+ // although the subscription takes a product_ids parameter (i.e. symbol),
715
+ // there is no (clear) way of mapping the message back to the symbol.
716
+ //
717
+ // {
718
+ // "channel": "heartbeats",
719
+ // "client_id": "",
720
+ // "timestamp": "2023-06-23T20:31:26.122969572Z",
721
+ // "sequence_num": 0,
722
+ // "events": [
723
+ // {
724
+ // "current_time": "2023-06-23 20:31:56.121961769 +0000 UTC m=+91717.525857105",
725
+ // "heartbeat_counter": "3049"
726
+ // }
727
+ // ]
728
+ // }
729
+ //
730
+ return message;
731
+ }
713
732
  handleMessage(client, message) {
714
733
  const channel = this.safeString(message, 'channel');
715
734
  const methods = {
@@ -719,6 +738,7 @@ export default class coinbase extends coinbaseRest {
719
738
  'market_trades': this.handleTrade,
720
739
  'user': this.handleOrder,
721
740
  'l2_data': this.handleOrderBook,
741
+ 'heartbeats': this.handleHeartbeats,
722
742
  };
723
743
  const type = this.safeString(message, 'type');
724
744
  if (type === 'error') {
@@ -726,6 +746,8 @@ export default class coinbase extends coinbaseRest {
726
746
  throw new ExchangeError(errorMessage);
727
747
  }
728
748
  const method = this.safeValue(methods, channel);
729
- method.call(this, client, message);
749
+ if (method) {
750
+ method.call(this, client, message);
751
+ }
730
752
  }
731
753
  }
@@ -738,7 +738,7 @@ export default class cryptocom extends cryptocomRest {
738
738
  * @param {string} type 'market' or 'limit'
739
739
  * @param {string} side 'buy' or 'sell'
740
740
  * @param {float} amount how much of currency you want to trade in units of base currency
741
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
741
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
742
742
  * @param {object} [params] extra parameters specific to the exchange API endpoint
743
743
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
744
744
  */
@@ -132,7 +132,7 @@ export default class gate extends gateRest {
132
132
  * @param {string} type 'limit' or 'market' *"market" is contract only*
133
133
  * @param {string} side 'buy' or 'sell'
134
134
  * @param {float} amount the amount of currency to trade
135
- * @param {float} [price] *ignored in "market" orders* the price at which the order is to be fullfilled at in units of the quote currency
135
+ * @param {float} [price] *ignored in "market" orders* the price at which the order is to be fulfilled at in units of the quote currency
136
136
  * @param {object} [params] extra parameters specific to the exchange API endpoint
137
137
  * @param {float} [params.stopPrice] The price at which a trigger order is triggered at
138
138
  * @param {string} [params.timeInForce] "GTC", "IOC", or "PO"
@@ -252,7 +252,7 @@ export default class gate extends gateRest {
252
252
  * @param {string} type 'market' or 'limit'
253
253
  * @param {string} side 'buy' or 'sell'
254
254
  * @param {float} amount how much of the currency you want to trade in units of the base currency
255
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the base currency, ignored in market orders
255
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
256
256
  * @param {object} [params] extra parameters specific to the exchange API endpoint
257
257
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
258
258
  */
@@ -1008,7 +1008,7 @@ export default class hitbtc extends hitbtcRest {
1008
1008
  * @param {string} type 'market' or 'limit'
1009
1009
  * @param {string} side 'buy' or 'sell'
1010
1010
  * @param {float} amount how much of currency you want to trade in units of base currency
1011
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
1011
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
1012
1012
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1013
1013
  * @param {string} [params.marginMode] 'cross' or 'isolated' only 'isolated' is supported for spot-margin, swap supports both, default is 'cross'
1014
1014
  * @param {bool} [params.margin] true for creating a margin order
@@ -118,7 +118,7 @@ export default class kraken extends krakenRest {
118
118
  * @param {string} type 'market' or 'limit'
119
119
  * @param {string} side 'buy' or 'sell'
120
120
  * @param {float} amount how much of currency you want to trade in units of base currency
121
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
121
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
122
122
  * @param {object} [params] extra parameters specific to the exchange API endpoint
123
123
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
124
124
  */
@@ -175,7 +175,7 @@ export default class kraken extends krakenRest {
175
175
  * @param {string} type 'market' or 'limit'
176
176
  * @param {string} side 'buy' or 'sell'
177
177
  * @param {float} amount how much of the currency you want to trade in units of the base currency
178
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
178
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
179
179
  * @param {object} [params] extra parameters specific to the exchange API endpoint
180
180
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
181
181
  */
@@ -159,6 +159,7 @@ export default class kucoin extends kucoinRest {
159
159
  * @method
160
160
  * @name kucoin#watchTicker
161
161
  * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
162
+ * @see https://www.kucoin.com/docs/websocket/spot-trading/public-channels/market-snapshot
162
163
  * @param {string} symbol unified symbol of the market to fetch the ticker for
163
164
  * @param {object} [params] extra parameters specific to the exchange API endpoint
164
165
  * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
@@ -391,6 +392,7 @@ export default class kucoin extends kucoinRest {
391
392
  * @method
392
393
  * @name kucoin#watchOHLCV
393
394
  * @description watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
395
+ * @see https://www.kucoin.com/docs/websocket/spot-trading/public-channels/klines
394
396
  * @param {string} symbol unified symbol of the market to fetch OHLCV data for
395
397
  * @param {string} timeframe the length of time each candle represents
396
398
  * @param {int} [since] timestamp in ms of the earliest candle to fetch
@@ -459,6 +461,7 @@ export default class kucoin extends kucoinRest {
459
461
  * @method
460
462
  * @name kucoin#watchTrades
461
463
  * @description get the list of most recent trades for a particular symbol
464
+ * @see https://www.kucoin.com/docs/websocket/spot-trading/public-channels/match-execution-data
462
465
  * @param {string} symbol unified symbol of the market to fetch trades for
463
466
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
464
467
  * @param {int} [limit] the maximum amount of trades to fetch
@@ -472,6 +475,7 @@ export default class kucoin extends kucoinRest {
472
475
  * @method
473
476
  * @name kucoin#watchTrades
474
477
  * @description get the list of most recent trades for a particular symbol
478
+ * @see https://www.kucoin.com/docs/websocket/spot-trading/public-channels/match-execution-data
475
479
  * @param {string} symbol unified symbol of the market to fetch trades for
476
480
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
477
481
  * @param {int} [limit] the maximum amount of trades to fetch
@@ -806,6 +810,8 @@ export default class kucoin extends kucoinRest {
806
810
  * @method
807
811
  * @name kucoin#watchOrders
808
812
  * @description watches information on multiple orders made by the user
813
+ * @see https://www.kucoin.com/docs/websocket/spot-trading/private-channels/private-order-change
814
+ * @see https://www.kucoin.com/docs/websocket/spot-trading/private-channels/stop-order-event
809
815
  * @param {string} symbol unified market symbol of the market orders were made in
810
816
  * @param {int} [since] the earliest time in ms to fetch orders for
811
817
  * @param {int} [limit] the maximum number of order structures to retrieve
@@ -942,6 +948,10 @@ export default class kucoin extends kucoinRest {
942
948
  //
943
949
  const messageHash = 'orders';
944
950
  const data = this.safeValue(message, 'data');
951
+ const tradeId = this.safeString(data, 'tradeId');
952
+ if (tradeId !== undefined) {
953
+ this.handleMyTrade(client, message);
954
+ }
945
955
  const parsed = this.parseWsOrder(data);
946
956
  const symbol = this.safeString(parsed, 'symbol');
947
957
  const orderId = this.safeString(parsed, 'id');
@@ -971,6 +981,7 @@ export default class kucoin extends kucoinRest {
971
981
  * @method
972
982
  * @name kucoin#watchMyTrades
973
983
  * @description watches information on multiple trades made by the user
984
+ * @see https://www.kucoin.com/docs/websocket/spot-trading/private-channels/private-order-change
974
985
  * @param {string} symbol unified market symbol of the market trades were made in
975
986
  * @param {int} [since] the earliest time in ms to fetch trades for
976
987
  * @param {int} [limit] the maximum number of trade structures to retrieve
@@ -979,7 +990,7 @@ export default class kucoin extends kucoinRest {
979
990
  */
980
991
  await this.loadMarkets();
981
992
  const url = await this.negotiate(true);
982
- const topic = '/spot/tradeFills';
993
+ const topic = '/spotMarket/tradeOrders';
983
994
  const request = {
984
995
  'privateChannel': true,
985
996
  };
@@ -996,6 +1007,34 @@ export default class kucoin extends kucoinRest {
996
1007
  return this.filterBySymbolSinceLimit(trades, symbol, since, limit, true);
997
1008
  }
998
1009
  handleMyTrade(client, message) {
1010
+ //
1011
+ // {
1012
+ // "type": "message",
1013
+ // "topic": "/spotMarket/tradeOrders",
1014
+ // "subject": "orderChange",
1015
+ // "channelType": "private",
1016
+ // "data": {
1017
+ // "symbol": "KCS-USDT",
1018
+ // "orderType": "limit",
1019
+ // "side": "sell",
1020
+ // "orderId": "5efab07953bdea00089965fa",
1021
+ // "liquidity": "taker",
1022
+ // "type": "match",
1023
+ // "feeType": "takerFee",
1024
+ // "orderTime": 1670329987026,
1025
+ // "size": "0.1",
1026
+ // "filledSize": "0.1",
1027
+ // "price": "0.938",
1028
+ // "matchPrice": "0.96738",
1029
+ // "matchSize": "0.1",
1030
+ // "tradeId": "5efab07a4ee4c7000a82d6d9",
1031
+ // "clientOid": "1593487481000313",
1032
+ // "remainSize": "0",
1033
+ // "status": "match",
1034
+ // "ts": 1670329987311000000
1035
+ // }
1036
+ // }
1037
+ //
999
1038
  if (this.myTrades === undefined) {
1000
1039
  const limit = this.safeInteger(this.options, 'tradesLimit', 1000);
1001
1040
  this.myTrades = new ArrayCacheBySymbolById(limit);
@@ -1010,19 +1049,26 @@ export default class kucoin extends kucoinRest {
1010
1049
  }
1011
1050
  parseWsTrade(trade, market = undefined) {
1012
1051
  //
1013
- // {
1014
- // "fee": 0.00262148,
1015
- // "feeCurrency": "USDT",
1016
- // "feeRate": 0.001,
1017
- // "orderId": "62417436b29df8000183df2f",
1018
- // "orderType": "market",
1019
- // "price": 131.074,
1020
- // "side": "sell",
1021
- // "size": 0.02,
1022
- // "symbol": "LTC-USDT",
1023
- // "time": "1648456758734571745",
1024
- // "tradeId": "624174362e113d2f467b3043"
1025
- // }
1052
+ // {
1053
+ // "symbol": "KCS-USDT",
1054
+ // "orderType": "limit",
1055
+ // "side": "sell",
1056
+ // "orderId": "5efab07953bdea00089965fa",
1057
+ // "liquidity": "taker",
1058
+ // "type": "match",
1059
+ // "feeType": "takerFee",
1060
+ // "orderTime": 1670329987026,
1061
+ // "size": "0.1",
1062
+ // "filledSize": "0.1",
1063
+ // "price": "0.938",
1064
+ // "matchPrice": "0.96738",
1065
+ // "matchSize": "0.1",
1066
+ // "tradeId": "5efab07a4ee4c7000a82d6d9",
1067
+ // "clientOid": "1593487481000313",
1068
+ // "remainSize": "0",
1069
+ // "status": "match",
1070
+ // "ts": 1670329987311000000
1071
+ // }
1026
1072
  //
1027
1073
  const marketId = this.safeString(trade, 'symbol');
1028
1074
  market = this.safeMarket(marketId, market, '-');
@@ -1030,18 +1076,10 @@ export default class kucoin extends kucoinRest {
1030
1076
  const type = this.safeString(trade, 'orderType');
1031
1077
  const side = this.safeString(trade, 'side');
1032
1078
  const tradeId = this.safeString(trade, 'tradeId');
1033
- const price = this.safeString(trade, 'price');
1034
- const amount = this.safeString(trade, 'size');
1079
+ const price = this.safeString(trade, 'matchPrice');
1080
+ const amount = this.safeString(trade, 'matchSize');
1035
1081
  const order = this.safeString(trade, 'orderId');
1036
- const timestamp = this.safeIntegerProduct(trade, 'time', 0.000001);
1037
- const feeCurrency = market['quote'];
1038
- const feeRate = this.safeString(trade, 'feeRate');
1039
- const feeCost = this.safeString(trade, 'fee');
1040
- const fee = {
1041
- 'cost': feeCost,
1042
- 'rate': feeRate,
1043
- 'currency': feeCurrency,
1044
- };
1082
+ const timestamp = this.safeIntegerProduct(trade, 'ts', 0.000001);
1045
1083
  return this.safeTrade({
1046
1084
  'info': trade,
1047
1085
  'timestamp': timestamp,
@@ -1050,12 +1088,12 @@ export default class kucoin extends kucoinRest {
1050
1088
  'id': tradeId,
1051
1089
  'order': order,
1052
1090
  'type': type,
1053
- 'takerOrMaker': undefined,
1091
+ 'takerOrMaker': this.safeString(trade, 'liquidity'),
1054
1092
  'side': side,
1055
1093
  'price': price,
1056
1094
  'amount': amount,
1057
1095
  'cost': undefined,
1058
- 'fee': fee,
1096
+ 'fee': undefined,
1059
1097
  }, market);
1060
1098
  }
1061
1099
  async watchBalance(params = {}) {
@@ -1063,6 +1101,7 @@ export default class kucoin extends kucoinRest {
1063
1101
  * @method
1064
1102
  * @name kucoin#watchBalance
1065
1103
  * @description watch balance and get the amount of funds available for trading or funds locked in orders
1104
+ * @see https://www.kucoin.com/docs/websocket/spot-trading/private-channels/account-balance-change
1066
1105
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1067
1106
  * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
1068
1107
  */
@@ -1161,7 +1200,6 @@ export default class kucoin extends kucoinRest {
1161
1200
  'trade.l3match': this.handleTrade,
1162
1201
  'trade.candles.update': this.handleOHLCV,
1163
1202
  'account.balance': this.handleBalance,
1164
- '/spot/tradeFills': this.handleMyTrade,
1165
1203
  'orderChange': this.handleOrder,
1166
1204
  'stopOrder': this.handleOrder,
1167
1205
  };
package/js/src/pro/okx.js CHANGED
@@ -1632,7 +1632,7 @@ export default class okx extends okxRest {
1632
1632
  * @param {string} type 'market' or 'limit'
1633
1633
  * @param {string} side 'buy' or 'sell'
1634
1634
  * @param {float} amount how much of currency you want to trade in units of base currency
1635
- * @param {float|undefined} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
1635
+ * @param {float|undefined} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
1636
1636
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1637
1637
  * @param {boolean} params.test test order, default false
1638
1638
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
@@ -1703,7 +1703,7 @@ export default class okx extends okxRest {
1703
1703
  * @param {string} type 'market' or 'limit'
1704
1704
  * @param {string} side 'buy' or 'sell'
1705
1705
  * @param {float} amount how much of the currency you want to trade in units of the base currency
1706
- * @param {float|undefined} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
1706
+ * @param {float|undefined} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
1707
1707
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1708
1708
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1709
1709
  */
@@ -769,7 +769,7 @@ export default class oxfun extends oxfunRest {
769
769
  * @param {string} type 'market', 'limit', 'STOP_LIMIT' or 'STOP_MARKET'
770
770
  * @param {string} side 'buy' or 'sell'
771
771
  * @param {float} amount how much of currency you want to trade in units of base currency
772
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
772
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
773
773
  * @param {object} [params] extra parameters specific to the exchange API endpoint
774
774
  * @param {int} [params.clientOrderId] a unique id for the order
775
775
  * @param {int} [params.timestamp] in milliseconds. If an order reaches the matching engine and the current timestamp exceeds timestamp + recvWindow, then the order will be rejected.
@@ -811,7 +811,7 @@ export default class oxfun extends oxfunRest {
811
811
  * @param {string} type 'market' or 'limit'
812
812
  * @param {string} side 'buy' or 'sell'
813
813
  * @param {float} amount how much of the currency you want to trade in units of the base currency
814
- * @param {float|undefined} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
814
+ * @param {float|undefined} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
815
815
  * @param {int} [params.timestamp] in milliseconds. If an order reaches the matching engine and the current timestamp exceeds timestamp + recvWindow, then the order will be rejected.
816
816
  * @param {int} [params.recvWindow] in milliseconds. If an order reaches the matching engine and the current timestamp exceeds timestamp + recvWindow, then the order will be rejected. If timestamp is provided without recvWindow, then a default recvWindow of 1000ms is used.
817
817
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -193,7 +193,7 @@ export default class poloniex extends poloniexRest {
193
193
  * @param {string} type 'market' or 'limit'
194
194
  * @param {string} side 'buy' or 'sell'
195
195
  * @param {float} amount how much of currency you want to trade in units of base currency
196
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
196
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
197
197
  * @param {object} [params] extra parameters specific to the poloniex api endpoint
198
198
  * @param {string} [params.timeInForce] GTC (default), IOC, FOK
199
199
  * @param {string} [params.clientOrderId] Maximum 64-character length.*
@@ -260,7 +260,7 @@ export default class vertex extends vertexRest {
260
260
  const price = this.convertFromX18(this.safeString(trade, 'price'));
261
261
  const amount = this.convertFromX18(this.safeString2(trade, 'taker_qty', 'filled_qty'));
262
262
  const cost = Precise.stringMul(price, amount);
263
- const timestamp = Precise.stringDiv(this.safeString(trade, 'timestamp'), '1000000');
263
+ const timestamp = this.safeIntegerProduct(trade, 'timestamp', 0.000001);
264
264
  let takerOrMaker = undefined;
265
265
  const isTaker = this.safeBool(trade, 'is_taker');
266
266
  if (isTaker !== undefined) {
@@ -325,7 +325,7 @@ export default class vertex extends vertexRest {
325
325
  // "ask_qty": "1000" // quantity at the lowest ask
326
326
  // }
327
327
  //
328
- const timestamp = Precise.stringDiv(this.safeString(ticker, 'timestamp'), '1000000');
328
+ const timestamp = this.safeIntegerProduct(ticker, 'timestamp', 0.000001);
329
329
  return this.safeTicker({
330
330
  'symbol': this.safeSymbol(undefined, market),
331
331
  'timestamp': timestamp,
package/js/src/probit.js CHANGED
@@ -1187,7 +1187,7 @@ export default class probit extends Exchange {
1187
1187
  * @param {string} type 'market' or 'limit'
1188
1188
  * @param {string} side 'buy' or 'sell'
1189
1189
  * @param {float} amount how much you want to trade in units of the base currency
1190
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
1190
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
1191
1191
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1192
1192
  * @param {float} [params.cost] the quote quantity that can be used as an alternative for the amount for market buy orders
1193
1193
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
package/js/src/timex.js CHANGED
@@ -748,7 +748,7 @@ export default class timex extends Exchange {
748
748
  * @param {string} type 'market' or 'limit'
749
749
  * @param {string} side 'buy' or 'sell'
750
750
  * @param {float} amount how much of currency you want to trade in units of base currency
751
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
751
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
752
752
  * @param {object} [params] extra parameters specific to the exchange API endpoint
753
753
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
754
754
  */
@@ -1600,7 +1600,7 @@ export default class tokocrypto extends Exchange {
1600
1600
  * @param {string} type 'market' or 'limit'
1601
1601
  * @param {string} side 'buy' or 'sell'
1602
1602
  * @param {float} amount how much of currency you want to trade in units of base currency
1603
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
1603
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
1604
1604
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1605
1605
  * @param {float} [params.triggerPrice] the price at which a trigger order would be triggered
1606
1606
  * @param {float} [params.cost] for spot market buy orders, the quote quantity that can be used as an alternative for the amount