ccxt 4.4.49 → 4.4.53

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 (158) hide show
  1. package/README.md +6 -3
  2. package/dist/ccxt.browser.min.js +3 -3
  3. package/dist/cjs/ccxt.js +1 -1
  4. package/dist/cjs/src/alpaca.js +65 -2
  5. package/dist/cjs/src/base/Exchange.js +112 -3
  6. package/dist/cjs/src/binance.js +42 -19
  7. package/dist/cjs/src/bitfinex1.js +22 -22
  8. package/dist/cjs/src/blofin.js +6 -2
  9. package/dist/cjs/src/bybit.js +2 -2
  10. package/dist/cjs/src/coinex.js +5 -5
  11. package/dist/cjs/src/coinmetro.js +21 -4
  12. package/dist/cjs/src/defx.js +1 -1
  13. package/dist/cjs/src/deribit.js +23 -4
  14. package/dist/cjs/src/ellipx.js +1 -0
  15. package/dist/cjs/src/gate.js +2 -2
  16. package/dist/cjs/src/hollaex.js +15 -20
  17. package/dist/cjs/src/htx.js +6 -4
  18. package/dist/cjs/src/hyperliquid.js +4 -4
  19. package/dist/cjs/src/krakenfutures.js +1 -1
  20. package/dist/cjs/src/kucoin.js +52 -74
  21. package/dist/cjs/src/kuna.js +1 -1
  22. package/dist/cjs/src/mexc.js +29 -8
  23. package/dist/cjs/src/okcoin.js +13 -5
  24. package/dist/cjs/src/okx.js +1 -1
  25. package/dist/cjs/src/onetrading.js +1 -1
  26. package/dist/cjs/src/paradex.js +2 -2
  27. package/dist/cjs/src/paymium.js +42 -0
  28. package/dist/cjs/src/pro/binance.js +2 -0
  29. package/dist/cjs/src/pro/bitfinex1.js +4 -4
  30. package/dist/cjs/src/pro/bitvavo.js +1 -1
  31. package/dist/cjs/src/pro/blofin.js +9 -1
  32. package/dist/cjs/src/pro/bybit.js +1 -1
  33. package/dist/cjs/src/pro/coincatch.js +2 -2
  34. package/dist/cjs/src/pro/coinex.js +4 -1
  35. package/dist/cjs/src/pro/cryptocom.js +2 -2
  36. package/dist/cjs/src/pro/defx.js +1 -1
  37. package/dist/cjs/src/pro/exmo.js +1 -1
  38. package/dist/cjs/src/pro/gemini.js +1 -1
  39. package/dist/cjs/src/pro/hashkey.js +2 -2
  40. package/dist/cjs/src/pro/htx.js +8 -8
  41. package/dist/cjs/src/pro/hyperliquid.js +2 -2
  42. package/dist/cjs/src/pro/kucoin.js +1 -1
  43. package/dist/cjs/src/pro/okx.js +1 -1
  44. package/dist/cjs/src/pro/oxfun.js +1 -1
  45. package/dist/cjs/src/probit.js +77 -9
  46. package/dist/cjs/src/timex.js +67 -0
  47. package/dist/cjs/src/tokocrypto.js +82 -5
  48. package/dist/cjs/src/tradeogre.js +55 -2
  49. package/dist/cjs/src/vertex.js +65 -2
  50. package/dist/cjs/src/wavesexchange.js +73 -0
  51. package/dist/cjs/src/wazirx.js +59 -3
  52. package/dist/cjs/src/whitebit.js +80 -4
  53. package/dist/cjs/src/xt.js +112 -0
  54. package/dist/cjs/src/yobit.js +56 -0
  55. package/dist/cjs/src/zaif.js +55 -0
  56. package/dist/cjs/src/zonda.js +56 -0
  57. package/examples/README.md +6 -0
  58. package/js/ccxt.d.ts +1 -1
  59. package/js/ccxt.js +1 -1
  60. package/js/src/abstract/binance.d.ts +1 -0
  61. package/js/src/abstract/binancecoinm.d.ts +1 -0
  62. package/js/src/abstract/binanceus.d.ts +1 -0
  63. package/js/src/abstract/binanceusdm.d.ts +1 -0
  64. package/js/src/alpaca.d.ts +35 -0
  65. package/js/src/alpaca.js +65 -2
  66. package/js/src/base/Exchange.d.ts +2 -0
  67. package/js/src/base/Exchange.js +112 -3
  68. package/js/src/binance.d.ts +4 -1
  69. package/js/src/binance.js +42 -19
  70. package/js/src/bitfinex1.d.ts +22 -22
  71. package/js/src/bitfinex1.js +22 -22
  72. package/js/src/blofin.d.ts +1 -1
  73. package/js/src/blofin.js +6 -2
  74. package/js/src/bybit.d.ts +2 -2
  75. package/js/src/bybit.js +2 -2
  76. package/js/src/coinex.js +5 -5
  77. package/js/src/coinmetro.d.ts +1 -1
  78. package/js/src/coinmetro.js +21 -4
  79. package/js/src/defx.d.ts +1 -1
  80. package/js/src/defx.js +1 -1
  81. package/js/src/deribit.d.ts +1 -1
  82. package/js/src/deribit.js +23 -4
  83. package/js/src/ellipx.d.ts +1 -0
  84. package/js/src/ellipx.js +1 -0
  85. package/js/src/gate.d.ts +1 -1
  86. package/js/src/gate.js +2 -2
  87. package/js/src/hollaex.d.ts +2 -1
  88. package/js/src/hollaex.js +15 -20
  89. package/js/src/htx.d.ts +1 -1
  90. package/js/src/htx.js +6 -4
  91. package/js/src/hyperliquid.d.ts +3 -3
  92. package/js/src/hyperliquid.js +4 -4
  93. package/js/src/krakenfutures.d.ts +1 -1
  94. package/js/src/krakenfutures.js +1 -1
  95. package/js/src/kucoin.js +52 -74
  96. package/js/src/kuna.d.ts +1 -1
  97. package/js/src/kuna.js +1 -1
  98. package/js/src/mexc.d.ts +1 -1
  99. package/js/src/mexc.js +29 -8
  100. package/js/src/okcoin.js +13 -5
  101. package/js/src/okx.d.ts +1 -1
  102. package/js/src/okx.js +1 -1
  103. package/js/src/onetrading.d.ts +1 -1
  104. package/js/src/onetrading.js +1 -1
  105. package/js/src/paradex.d.ts +1 -1
  106. package/js/src/paradex.js +2 -2
  107. package/js/src/paymium.js +42 -0
  108. package/js/src/pro/binance.js +2 -0
  109. package/js/src/pro/bitfinex1.d.ts +4 -4
  110. package/js/src/pro/bitfinex1.js +4 -4
  111. package/js/src/pro/bitvavo.d.ts +1 -1
  112. package/js/src/pro/bitvavo.js +1 -1
  113. package/js/src/pro/blofin.d.ts +1 -1
  114. package/js/src/pro/blofin.js +9 -1
  115. package/js/src/pro/bybit.d.ts +1 -1
  116. package/js/src/pro/bybit.js +1 -1
  117. package/js/src/pro/coincatch.d.ts +2 -2
  118. package/js/src/pro/coincatch.js +2 -2
  119. package/js/src/pro/coinex.js +4 -1
  120. package/js/src/pro/cryptocom.d.ts +2 -2
  121. package/js/src/pro/cryptocom.js +2 -2
  122. package/js/src/pro/defx.d.ts +1 -1
  123. package/js/src/pro/defx.js +1 -1
  124. package/js/src/pro/exmo.d.ts +1 -1
  125. package/js/src/pro/exmo.js +1 -1
  126. package/js/src/pro/gemini.d.ts +1 -1
  127. package/js/src/pro/gemini.js +1 -1
  128. package/js/src/pro/hashkey.d.ts +2 -2
  129. package/js/src/pro/hashkey.js +2 -2
  130. package/js/src/pro/htx.d.ts +8 -8
  131. package/js/src/pro/htx.js +8 -8
  132. package/js/src/pro/hyperliquid.d.ts +2 -2
  133. package/js/src/pro/hyperliquid.js +2 -2
  134. package/js/src/pro/kucoin.d.ts +1 -1
  135. package/js/src/pro/kucoin.js +1 -1
  136. package/js/src/pro/okx.d.ts +1 -1
  137. package/js/src/pro/okx.js +1 -1
  138. package/js/src/pro/oxfun.d.ts +1 -1
  139. package/js/src/pro/oxfun.js +1 -1
  140. package/js/src/probit.d.ts +1 -0
  141. package/js/src/probit.js +77 -9
  142. package/js/src/timex.js +67 -0
  143. package/js/src/tokocrypto.d.ts +2 -3
  144. package/js/src/tokocrypto.js +82 -5
  145. package/js/src/tradeogre.d.ts +4 -2
  146. package/js/src/tradeogre.js +55 -2
  147. package/js/src/vertex.js +65 -2
  148. package/js/src/wavesexchange.js +73 -0
  149. package/js/src/wazirx.js +59 -3
  150. package/js/src/whitebit.js +80 -4
  151. package/js/src/xt.js +112 -0
  152. package/js/src/yobit.js +56 -0
  153. package/js/src/zaif.js +55 -0
  154. package/js/src/zonda.d.ts +1 -0
  155. package/js/src/zonda.js +56 -0
  156. package/package.json +2 -2
  157. package/js/src/hitbtc3.d.ts +0 -8
  158. package/js/src/hitbtc3.js +0 -20
@@ -173,7 +173,7 @@ export default class bitvavo extends bitvavoRest {
173
173
  }
174
174
  /**
175
175
  * @method
176
- * @name mexc#watchBidsAsks
176
+ * @name bitvavo#watchBidsAsks
177
177
  * @description watches best bid & ask for symbols
178
178
  * @see https://docs.bitvavo.com/#tag/Market-data-subscription-WebSocket/paths/~1subscribeTicker24h/post
179
179
  * @param {string[]} symbols unified symbol of the market to fetch the ticker for
@@ -127,7 +127,7 @@ export default class blofin extends blofinRest {
127
127
  parseWsBalance(message: any): Balances;
128
128
  /**
129
129
  * @method
130
- * @name alpaca#watchOrders
130
+ * @name biofin#watchOrders
131
131
  * @description watches information on multiple orders made by the user
132
132
  * @param {string} symbol unified market symbol of the market orders were made in
133
133
  * @param {int} [since] the earliest time in ms to fetch orders for
@@ -37,6 +37,14 @@ export default class blofin extends blofinRest {
37
37
  },
38
38
  },
39
39
  },
40
+ 'test': {
41
+ 'ws': {
42
+ 'swap': {
43
+ 'public': 'wss://demo-trading-openapi.blofin.com/ws/public',
44
+ 'private': 'wss://demo-trading-openapi.blofin.com/ws/private',
45
+ },
46
+ },
47
+ },
40
48
  },
41
49
  'options': {
42
50
  'defaultType': 'swap',
@@ -475,7 +483,7 @@ export default class blofin extends blofinRest {
475
483
  }
476
484
  /**
477
485
  * @method
478
- * @name alpaca#watchOrders
486
+ * @name biofin#watchOrders
479
487
  * @description watches information on multiple orders made by the user
480
488
  * @param {string} symbol unified market symbol of the market orders were made in
481
489
  * @param {int} [since] the earliest time in ms to fetch orders for
@@ -199,7 +199,7 @@ export default class bybit extends bybitRest {
199
199
  watchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
200
200
  /**
201
201
  * @method
202
- * @name bybit#watchOrderBook
202
+ * @name bybit#watchOrderBookForSymbols
203
203
  * @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
204
204
  * @see https://bybit-exchange.github.io/docs/v5/websocket/public/orderbook
205
205
  * @param {string[]} symbols unified array of symbols
@@ -830,7 +830,7 @@ export default class bybit extends bybitRest {
830
830
  }
831
831
  /**
832
832
  * @method
833
- * @name bybit#watchOrderBook
833
+ * @name bybit#watchOrderBookForSymbols
834
834
  * @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
835
835
  * @see https://bybit-exchange.github.io/docs/v5/websocket/public/orderbook
836
836
  * @param {string[]} symbols unified array of symbols
@@ -98,7 +98,7 @@ export default class coincatch extends coincatchRest {
98
98
  unWatchOrderBook(symbol: string, params?: {}): Promise<any>;
99
99
  /**
100
100
  * @method
101
- * @name coincatch#watchOrderBook
101
+ * @name coincatch#watchOrderBookForSymbols
102
102
  * @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
103
103
  * @see https://coincatch.github.io/github.io/en/spot/#depth-channel
104
104
  * @param symbols
@@ -125,7 +125,7 @@ export default class coincatch extends coincatchRest {
125
125
  watchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
126
126
  /**
127
127
  * @method
128
- * @name coincatch#watchTrades
128
+ * @name coincatch#watchTradesForSymbols
129
129
  * @description watches information on multiple trades made in a market
130
130
  * @see https://coincatch.github.io/github.io/en/spot/#trades-channel
131
131
  * @param symbols
@@ -561,7 +561,7 @@ export default class coincatch extends coincatchRest {
561
561
  }
562
562
  /**
563
563
  * @method
564
- * @name coincatch#watchOrderBook
564
+ * @name coincatch#watchOrderBookForSymbols
565
565
  * @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
566
566
  * @see https://coincatch.github.io/github.io/en/spot/#depth-channel
567
567
  * @param symbols
@@ -699,7 +699,7 @@ export default class coincatch extends coincatchRest {
699
699
  }
700
700
  /**
701
701
  * @method
702
- * @name coincatch#watchTrades
702
+ * @name coincatch#watchTradesForSymbols
703
703
  * @description watches information on multiple trades made in a market
704
704
  * @see https://coincatch.github.io/github.io/en/spot/#trades-channel
705
705
  * @param symbols
@@ -256,7 +256,10 @@ export default class coinex extends coinexRest {
256
256
  [type, params] = this.handleMarketTypeAndParams('watchBalance', undefined, params, 'spot');
257
257
  await this.authenticate(type);
258
258
  const url = this.urls['api']['ws'][type];
259
- let currencies = Object.keys(this.currencies_by_id);
259
+ // coinex throws a closes the websocket when subscribing over 1422 currencies, therefore we filter out inactive currencies
260
+ const activeCurrencies = this.filterBy(this.currencies_by_id, 'active', true);
261
+ const activeCurrenciesById = this.indexBy(activeCurrencies, 'id');
262
+ let currencies = Object.keys(activeCurrenciesById);
260
263
  if (currencies === undefined) {
261
264
  currencies = [];
262
265
  }
@@ -31,7 +31,7 @@ export default class cryptocom extends cryptocomRest {
31
31
  unWatchOrderBook(symbol: string, params?: {}): Promise<any>;
32
32
  /**
33
33
  * @method
34
- * @name cryptocom#watchOrderBook
34
+ * @name cryptocom#watchOrderBookForSymbols
35
35
  * @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
36
36
  * @see https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#book-instrument_name
37
37
  * @param {string[]} symbols unified array of symbols
@@ -249,7 +249,7 @@ export default class cryptocom extends cryptocomRest {
249
249
  handleOrder(client: Client, message: any): void;
250
250
  /**
251
251
  * @method
252
- * @name cryptocom#cancelOrder
252
+ * @name cryptocom#cancelOrderWs
253
253
  * @description cancels an open order
254
254
  * @see https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-cancel-order
255
255
  * @param {string} id the order id of the order to cancel
@@ -100,7 +100,7 @@ export default class cryptocom extends cryptocomRest {
100
100
  }
101
101
  /**
102
102
  * @method
103
- * @name cryptocom#watchOrderBook
103
+ * @name cryptocom#watchOrderBookForSymbols
104
104
  * @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
105
105
  * @see https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#book-instrument_name
106
106
  * @param {string[]} symbols unified array of symbols
@@ -1081,7 +1081,7 @@ export default class cryptocom extends cryptocomRest {
1081
1081
  }
1082
1082
  /**
1083
1083
  * @method
1084
- * @name cryptocom#cancelOrder
1084
+ * @name cryptocom#cancelOrderWs
1085
1085
  * @description cancels an open order
1086
1086
  * @see https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-cancel-order
1087
1087
  * @param {string} id the order id of the order to cancel
@@ -120,7 +120,7 @@ export default class defx extends defxRest {
120
120
  watchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
121
121
  /**
122
122
  * @method
123
- * @name defx#unWatchTradesForSymbols
123
+ * @name defx#unWatchTrades
124
124
  * @description unWatches from the stream channel
125
125
  * @see https://www.postman.com/defxcode/defx-public-apis/collection/667939a1b5d8069c13d614e9
126
126
  * @param {string} symbol unified symbol of the market to fetch trades for
@@ -399,7 +399,7 @@ export default class defx extends defxRest {
399
399
  }
400
400
  /**
401
401
  * @method
402
- * @name defx#unWatchTradesForSymbols
402
+ * @name defx#unWatchTrades
403
403
  * @description unWatches from the stream channel
404
404
  * @see https://www.postman.com/defxcode/defx-public-apis/collection/667939a1b5d8069c13d614e9
405
405
  * @param {string} symbol unified symbol of the market to fetch trades for
@@ -50,7 +50,7 @@ export default class exmo extends exmoRest {
50
50
  handleTrades(client: Client, message: any): void;
51
51
  /**
52
52
  * @method
53
- * @name exmo#watchTrades
53
+ * @name exmo#watchMyTrades
54
54
  * @description get the list of trades associated with the user
55
55
  * @param {string} symbol unified symbol of the market to fetch trades for
56
56
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
@@ -349,7 +349,7 @@ export default class exmo extends exmoRest {
349
349
  }
350
350
  /**
351
351
  * @method
352
- * @name exmo#watchTrades
352
+ * @name exmo#watchMyTrades
353
353
  * @description get the list of trades associated with the user
354
354
  * @param {string} symbol unified symbol of the market to fetch trades for
355
355
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
@@ -33,7 +33,7 @@ export default class gemini extends geminiRest {
33
33
  handleTradesForMultidata(client: Client, trades: any, timestamp: Int): void;
34
34
  /**
35
35
  * @method
36
- * @name gemini#fetchOHLCV
36
+ * @name gemini#watchOHLCV
37
37
  * @description watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
38
38
  * @see https://docs.gemini.com/websocket-api/#candles-data-feed
39
39
  * @param {string} symbol unified symbol of the market to fetch OHLCV data for
@@ -262,7 +262,7 @@ export default class gemini extends geminiRest {
262
262
  }
263
263
  /**
264
264
  * @method
265
- * @name gemini#fetchOHLCV
265
+ * @name gemini#watchOHLCV
266
266
  * @description watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
267
267
  * @see https://docs.gemini.com/websocket-api/#candles-data-feed
268
268
  * @param {string} symbol unified symbol of the market to fetch OHLCV data for
@@ -50,7 +50,7 @@ export default class hashkey extends hashkeyRest {
50
50
  handleTrades(client: Client, message: any): void;
51
51
  /**
52
52
  * @method
53
- * @name alpaca#watchOrderBook
53
+ * @name hashkey#watchOrderBook
54
54
  * @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
55
55
  * @see https://hashkeyglobal-apidoc.readme.io/reference/websocket-api#public-stream
56
56
  * @param {string} symbol unified symbol of the market to fetch the order book for
@@ -104,7 +104,7 @@ export default class hashkey extends hashkeyRest {
104
104
  parseWsPosition(position: any, market?: Market): Position;
105
105
  /**
106
106
  * @method
107
- * @name bitmart#watchBalance
107
+ * @name hashkey#watchBalance
108
108
  * @description watch balance and get the amount of funds available for trading or funds locked in orders
109
109
  * @see https://hashkeyglobal-apidoc.readme.io/reference/websocket-api#private-stream
110
110
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -290,7 +290,7 @@ export default class hashkey extends hashkeyRest {
290
290
  }
291
291
  /**
292
292
  * @method
293
- * @name alpaca#watchOrderBook
293
+ * @name hashkey#watchOrderBook
294
294
  * @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
295
295
  * @see https://hashkeyglobal-apidoc.readme.io/reference/websocket-api#public-stream
296
296
  * @param {string} symbol unified symbol of the market to fetch the order book for
@@ -686,7 +686,7 @@ export default class hashkey extends hashkeyRest {
686
686
  }
687
687
  /**
688
688
  * @method
689
- * @name bitmart#watchBalance
689
+ * @name hashkey#watchBalance
690
690
  * @description watch balance and get the amount of funds available for trading or funds locked in orders
691
691
  * @see https://hashkeyglobal-apidoc.readme.io/reference/websocket-api#private-stream
692
692
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -6,7 +6,7 @@ export default class htx extends htxRest {
6
6
  requestId(): any;
7
7
  /**
8
8
  * @method
9
- * @name huobi#watchTicker
9
+ * @name htx#watchTicker
10
10
  * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
11
11
  * @see https://www.htx.com/en-us/opend/newApiPages/?id=7ec53561-7773-11ed-9966-0242ac110003
12
12
  * @see https://www.htx.com/en-us/opend/newApiPages/?id=28c33ab2-77ae-11ed-9966-0242ac110003
@@ -18,7 +18,7 @@ export default class htx extends htxRest {
18
18
  handleTicker(client: Client, message: any): any;
19
19
  /**
20
20
  * @method
21
- * @name huobi#watchTrades
21
+ * @name htx#watchTrades
22
22
  * @description get the list of most recent trades for a particular symbol
23
23
  * @see https://www.htx.com/en-us/opend/newApiPages/?id=7ec53b69-7773-11ed-9966-0242ac110003
24
24
  * @see https://www.htx.com/en-us/opend/newApiPages/?id=28c33c21-77ae-11ed-9966-0242ac110003
@@ -33,7 +33,7 @@ export default class htx extends htxRest {
33
33
  handleTrades(client: Client, message: any): any;
34
34
  /**
35
35
  * @method
36
- * @name huobi#watchOHLCV
36
+ * @name htx#watchOHLCV
37
37
  * @description watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
38
38
  * @see https://www.htx.com/en-us/opend/newApiPages/?id=7ec53241-7773-11ed-9966-0242ac110003
39
39
  * @see https://www.htx.com/en-us/opend/newApiPages/?id=28c3346a-77ae-11ed-9966-0242ac110003
@@ -49,7 +49,7 @@ export default class htx extends htxRest {
49
49
  handleOHLCV(client: Client, message: any): void;
50
50
  /**
51
51
  * @method
52
- * @name huobi#watchOrderBook
52
+ * @name htx#watchOrderBook
53
53
  * @see https://huobiapi.github.io/docs/dm/v1/en/#subscribe-market-depth-data
54
54
  * @see https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#subscribe-incremental-market-depth-data
55
55
  * @see https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-subscribe-incremental-market-depth-data
@@ -69,7 +69,7 @@ export default class htx extends htxRest {
69
69
  handleOrderBookSubscription(client: Client, message: any, subscription: any): void;
70
70
  /**
71
71
  * @method
72
- * @name huobi#watchMyTrades
72
+ * @name htx#watchMyTrades
73
73
  * @description watches information on multiple trades made by the user
74
74
  * @see https://www.htx.com/en-us/opend/newApiPages/?id=7ec53dd5-7773-11ed-9966-0242ac110003
75
75
  * @param {string} symbol unified market symbol of the market trades were made in
@@ -82,7 +82,7 @@ export default class htx extends htxRest {
82
82
  getOrderChannelAndMessageHash(type: any, subType: any, market?: any, params?: {}): any[];
83
83
  /**
84
84
  * @method
85
- * @name huobi#watchOrders
85
+ * @name htx#watchOrders
86
86
  * @description watches information on multiple orders made by the user
87
87
  * @see https://www.htx.com/en-us/opend/newApiPages/?id=7ec53c8f-7773-11ed-9966-0242ac110003
88
88
  * @param {string} symbol unified market symbol of the market orders were made in
@@ -97,7 +97,7 @@ export default class htx extends htxRest {
97
97
  parseOrderTrade(trade: any, market?: any): Trade;
98
98
  /**
99
99
  * @method
100
- * @name huobi#watchPositions
100
+ * @name htx#watchPositions
101
101
  * @see https://www.huobi.com/en-in/opend/newApiPages/?id=8cb7de1c-77b5-11ed-9966-0242ac110003
102
102
  * @see https://www.huobi.com/en-in/opend/newApiPages/?id=8cb7df0f-77b5-11ed-9966-0242ac110003
103
103
  * @see https://www.huobi.com/en-in/opend/newApiPages/?id=28c34a7d-77ae-11ed-9966-0242ac110003
@@ -113,7 +113,7 @@ export default class htx extends htxRest {
113
113
  handlePositions(client: any, message: any): void;
114
114
  /**
115
115
  * @method
116
- * @name huobi#watchBalance
116
+ * @name htx#watchBalance
117
117
  * @description watch balance and get the amount of funds available for trading or funds locked in orders
118
118
  * @see https://www.htx.com/en-us/opend/newApiPages/?id=7ec52e28-7773-11ed-9966-0242ac110003
119
119
  * @see https://www.htx.com/en-us/opend/newApiPages/?id=10000084-77b7-11ed-9966-0242ac110003
package/js/src/pro/htx.js CHANGED
@@ -132,7 +132,7 @@ export default class htx extends htxRest {
132
132
  }
133
133
  /**
134
134
  * @method
135
- * @name huobi#watchTicker
135
+ * @name htx#watchTicker
136
136
  * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
137
137
  * @see https://www.htx.com/en-us/opend/newApiPages/?id=7ec53561-7773-11ed-9966-0242ac110003
138
138
  * @see https://www.htx.com/en-us/opend/newApiPages/?id=28c33ab2-77ae-11ed-9966-0242ac110003
@@ -202,7 +202,7 @@ export default class htx extends htxRest {
202
202
  }
203
203
  /**
204
204
  * @method
205
- * @name huobi#watchTrades
205
+ * @name htx#watchTrades
206
206
  * @description get the list of most recent trades for a particular symbol
207
207
  * @see https://www.htx.com/en-us/opend/newApiPages/?id=7ec53b69-7773-11ed-9966-0242ac110003
208
208
  * @see https://www.htx.com/en-us/opend/newApiPages/?id=28c33c21-77ae-11ed-9966-0242ac110003
@@ -268,7 +268,7 @@ export default class htx extends htxRest {
268
268
  }
269
269
  /**
270
270
  * @method
271
- * @name huobi#watchOHLCV
271
+ * @name htx#watchOHLCV
272
272
  * @description watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
273
273
  * @see https://www.htx.com/en-us/opend/newApiPages/?id=7ec53241-7773-11ed-9966-0242ac110003
274
274
  * @see https://www.htx.com/en-us/opend/newApiPages/?id=28c3346a-77ae-11ed-9966-0242ac110003
@@ -331,7 +331,7 @@ export default class htx extends htxRest {
331
331
  }
332
332
  /**
333
333
  * @method
334
- * @name huobi#watchOrderBook
334
+ * @name htx#watchOrderBook
335
335
  * @see https://huobiapi.github.io/docs/dm/v1/en/#subscribe-market-depth-data
336
336
  * @see https://huobiapi.github.io/docs/coin_margined_swap/v1/en/#subscribe-incremental-market-depth-data
337
337
  * @see https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-subscribe-incremental-market-depth-data
@@ -677,7 +677,7 @@ export default class htx extends htxRest {
677
677
  }
678
678
  /**
679
679
  * @method
680
- * @name huobi#watchMyTrades
680
+ * @name htx#watchMyTrades
681
681
  * @description watches information on multiple trades made by the user
682
682
  * @see https://www.htx.com/en-us/opend/newApiPages/?id=7ec53dd5-7773-11ed-9966-0242ac110003
683
683
  * @param {string} symbol unified market symbol of the market trades were made in
@@ -781,7 +781,7 @@ export default class htx extends htxRest {
781
781
  }
782
782
  /**
783
783
  * @method
784
- * @name huobi#watchOrders
784
+ * @name htx#watchOrders
785
785
  * @description watches information on multiple orders made by the user
786
786
  * @see https://www.htx.com/en-us/opend/newApiPages/?id=7ec53c8f-7773-11ed-9966-0242ac110003
787
787
  * @param {string} symbol unified market symbol of the market orders were made in
@@ -1235,7 +1235,7 @@ export default class htx extends htxRest {
1235
1235
  }
1236
1236
  /**
1237
1237
  * @method
1238
- * @name huobi#watchPositions
1238
+ * @name htx#watchPositions
1239
1239
  * @see https://www.huobi.com/en-in/opend/newApiPages/?id=8cb7de1c-77b5-11ed-9966-0242ac110003
1240
1240
  * @see https://www.huobi.com/en-in/opend/newApiPages/?id=8cb7df0f-77b5-11ed-9966-0242ac110003
1241
1241
  * @see https://www.huobi.com/en-in/opend/newApiPages/?id=28c34a7d-77ae-11ed-9966-0242ac110003
@@ -1358,7 +1358,7 @@ export default class htx extends htxRest {
1358
1358
  }
1359
1359
  /**
1360
1360
  * @method
1361
- * @name huobi#watchBalance
1361
+ * @name htx#watchBalance
1362
1362
  * @description watch balance and get the amount of funds available for trading or funds locked in orders
1363
1363
  * @see https://www.htx.com/en-us/opend/newApiPages/?id=7ec52e28-7773-11ed-9966-0242ac110003
1364
1364
  * @see https://www.htx.com/en-us/opend/newApiPages/?id=10000084-77b7-11ed-9966-0242ac110003
@@ -15,7 +15,7 @@ export default class hyperliquid extends hyperliquidRest {
15
15
  createOrdersWs(orders: OrderRequest[], params?: {}): Promise<Order[]>;
16
16
  /**
17
17
  * @method
18
- * @name hyperliquid#createOrder
18
+ * @name hyperliquid#createOrderWs
19
19
  * @description create a trade order using WebSocket post request
20
20
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#place-an-order
21
21
  * @param {string} symbol unified symbol of the market to create an order in
@@ -36,7 +36,7 @@ export default class hyperliquid extends hyperliquidRest {
36
36
  createOrderWs(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
37
37
  /**
38
38
  * @method
39
- * @name hyperliquid#editOrder
39
+ * @name hyperliquid#editOrderWs
40
40
  * @description edit a trade order
41
41
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#modify-an-order
42
42
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#modify-multiple-orders
@@ -76,7 +76,7 @@ export default class hyperliquid extends hyperliquidRest {
76
76
  }
77
77
  /**
78
78
  * @method
79
- * @name hyperliquid#createOrder
79
+ * @name hyperliquid#createOrderWs
80
80
  * @description create a trade order using WebSocket post request
81
81
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#place-an-order
82
82
  * @param {string} symbol unified symbol of the market to create an order in
@@ -102,7 +102,7 @@ export default class hyperliquid extends hyperliquidRest {
102
102
  }
103
103
  /**
104
104
  * @method
105
- * @name hyperliquid#editOrder
105
+ * @name hyperliquid#editOrderWs
106
106
  * @description edit a trade order
107
107
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#modify-an-order
108
108
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#modify-multiple-orders
@@ -72,7 +72,7 @@ export default class kucoin extends kucoinRest {
72
72
  watchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
73
73
  /**
74
74
  * @method
75
- * @name kucoin#watchTrades
75
+ * @name kucoin#watchTradesForSymbols
76
76
  * @description get the list of most recent trades for a particular symbol
77
77
  * @see https://www.kucoin.com/docs/websocket/spot-trading/public-channels/match-execution-data
78
78
  * @param {string[]} symbols
@@ -496,7 +496,7 @@ export default class kucoin extends kucoinRest {
496
496
  }
497
497
  /**
498
498
  * @method
499
- * @name kucoin#watchTrades
499
+ * @name kucoin#watchTradesForSymbols
500
500
  * @description get the list of most recent trades for a particular symbol
501
501
  * @see https://www.kucoin.com/docs/websocket/spot-trading/public-channels/match-execution-data
502
502
  * @param {string[]} symbols
@@ -39,7 +39,7 @@ export default class okx extends okxRest {
39
39
  unWatchTradesForSymbols(symbols: string[], params?: {}): Promise<any>;
40
40
  /**
41
41
  * @method
42
- * @name okx#unWatchTradesForSymbols
42
+ * @name okx#unWatchTrades
43
43
  * @description unWatches from the stream channel
44
44
  * @param {string} symbol unified symbol of the market to fetch trades for
45
45
  * @param {object} [params] extra parameters specific to the exchange API endpoint
package/js/src/pro/okx.js CHANGED
@@ -256,7 +256,7 @@ export default class okx extends okxRest {
256
256
  }
257
257
  /**
258
258
  * @method
259
- * @name okx#unWatchTradesForSymbols
259
+ * @name okx#unWatchTrades
260
260
  * @description unWatches from the stream channel
261
261
  * @param {string} symbol unified symbol of the market to fetch trades for
262
262
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -217,7 +217,7 @@ export default class oxfun extends oxfunRest {
217
217
  cancelOrderWs(id: string, symbol?: Str, params?: {}): Promise<Order>;
218
218
  /**
219
219
  * @method
220
- * @name okx#cancelOrdersWs
220
+ * @name oxfun#cancelOrdersWs
221
221
  * @see https://www.okx.com/docs-v5/en/#order-book-trading-trade-ws-mass-cancel-order
222
222
  * @description cancel multiple orders
223
223
  * @param {string[]} ids order ids
@@ -983,7 +983,7 @@ export default class oxfun extends oxfunRest {
983
983
  }
984
984
  /**
985
985
  * @method
986
- * @name okx#cancelOrdersWs
986
+ * @name oxfun#cancelOrdersWs
987
987
  * @see https://www.okx.com/docs-v5/en/#order-book-trading-trade-ws-mass-cancel-order
988
988
  * @description cancel multiple orders
989
989
  * @param {string[]} ids order ids
@@ -112,6 +112,7 @@ export default class probit extends Exchange {
112
112
  * @param {int} [since] timestamp in ms of the earliest candle to fetch
113
113
  * @param {int} [limit] the maximum amount of candles to fetch
114
114
  * @param {object} [params] extra parameters specific to the exchange API endpoint
115
+ * @param {string} [params.until] timestamp in ms of the earliest candle to fetch
115
116
  * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
116
117
  */
117
118
  fetchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
package/js/src/probit.js CHANGED
@@ -90,7 +90,7 @@ export default class probit extends Exchange {
90
90
  'fetchWithdrawal': false,
91
91
  'fetchWithdrawals': true,
92
92
  'reduceMargin': false,
93
- 'sandbox': true,
93
+ 'sandbox': false,
94
94
  'setLeverage': false,
95
95
  'setMarginMode': false,
96
96
  'setPositionMode': false,
@@ -172,6 +172,73 @@ export default class probit extends Exchange {
172
172
  'taker': this.parseNumber('0.002'),
173
173
  },
174
174
  },
175
+ 'features': {
176
+ 'spot': {
177
+ 'sandbox': false,
178
+ 'createOrder': {
179
+ 'marginMode': false,
180
+ 'triggerPrice': false,
181
+ 'triggerDirection': false,
182
+ 'triggerPriceType': undefined,
183
+ 'stopLossPrice': false,
184
+ 'takeProfitPrice': false,
185
+ 'attachedStopLossTakeProfit': undefined,
186
+ // todo
187
+ 'timeInForce': {
188
+ 'IOC': true,
189
+ 'FOK': true,
190
+ 'PO': false,
191
+ 'GTD': false,
192
+ },
193
+ 'hedged': false,
194
+ 'trailing': false,
195
+ 'leverage': false,
196
+ 'marketBuyByCost': true,
197
+ 'marketBuyRequiresPrice': false,
198
+ 'selfTradePrevention': false,
199
+ 'iceberg': false,
200
+ },
201
+ 'createOrders': undefined,
202
+ 'fetchMyTrades': {
203
+ 'marginMode': false,
204
+ 'limit': 1000,
205
+ 'daysBack': 100000,
206
+ 'untilDays': 100000, // todo
207
+ },
208
+ 'fetchOrder': {
209
+ 'marginMode': false,
210
+ 'trigger': false,
211
+ 'trailing': false,
212
+ },
213
+ 'fetchOpenOrders': {
214
+ 'marginMode': false,
215
+ 'limit': undefined,
216
+ 'trigger': false,
217
+ 'trailing': false,
218
+ },
219
+ 'fetchOrders': undefined,
220
+ 'fetchClosedOrders': {
221
+ 'marginMode': false,
222
+ 'limit': 1000,
223
+ 'daysBack': 100000,
224
+ 'daysBackCanceled': 1,
225
+ 'untilDays': 90,
226
+ 'trigger': false,
227
+ 'trailing': false,
228
+ },
229
+ 'fetchOHLCV': {
230
+ 'limit': 4000,
231
+ },
232
+ },
233
+ 'swap': {
234
+ 'linear': undefined,
235
+ 'inverse': undefined,
236
+ },
237
+ 'future': {
238
+ 'linear': undefined,
239
+ 'inverse': undefined,
240
+ },
241
+ },
175
242
  'exceptions': {
176
243
  'exact': {
177
244
  'UNAUTHORIZED': AuthenticationError,
@@ -935,6 +1002,7 @@ export default class probit extends Exchange {
935
1002
  * @param {int} [since] timestamp in ms of the earliest candle to fetch
936
1003
  * @param {int} [limit] the maximum amount of candles to fetch
937
1004
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1005
+ * @param {string} [params.until] timestamp in ms of the earliest candle to fetch
938
1006
  * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
939
1007
  */
940
1008
  async fetchOHLCV(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
@@ -951,21 +1019,21 @@ export default class probit extends Exchange {
951
1019
  'limit': requestLimit, // max 1000
952
1020
  };
953
1021
  const now = this.milliseconds();
954
- const duration = this.parseTimeframe(timeframe);
1022
+ const until = this.safeInteger(params, 'until');
1023
+ const durationMilliseconds = this.parseTimeframe(timeframe) * 1000;
955
1024
  let startTime = since;
956
- let endTime = now;
1025
+ let endTime = (until !== undefined) ? until - durationMilliseconds : now;
957
1026
  if (since === undefined) {
958
1027
  if (limit === undefined) {
959
1028
  limit = requestLimit;
960
1029
  }
961
- startTime = now - limit * duration * 1000;
1030
+ const startLimit = limit - 1;
1031
+ startTime = endTime - startLimit * durationMilliseconds;
962
1032
  }
963
1033
  else {
964
- if (limit === undefined) {
965
- endTime = now;
966
- }
967
- else {
968
- endTime = this.sum(since, this.sum(limit, 1) * duration * 1000);
1034
+ if (limit !== undefined) {
1035
+ const endByLimit = this.sum(since, limit * durationMilliseconds);
1036
+ endTime = Math.min(endTime, endByLimit);
969
1037
  }
970
1038
  }
971
1039
  const startTimeNormalized = this.normalizeOHLCVTimestamp(startTime, timeframe);