ccxt 4.4.39 → 4.4.41

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 (190) hide show
  1. package/README.md +3 -3
  2. package/dist/ccxt.browser.min.js +3 -3
  3. package/dist/cjs/ccxt.js +1 -1
  4. package/dist/cjs/src/ascendex.js +9 -9
  5. package/dist/cjs/src/base/Exchange.js +32 -21
  6. package/dist/cjs/src/binance.js +37 -43
  7. package/dist/cjs/src/bingx.js +4 -3
  8. package/dist/cjs/src/bit2c.js +0 -1
  9. package/dist/cjs/src/bitbank.js +0 -1
  10. package/dist/cjs/src/bitbns.js +0 -1
  11. package/dist/cjs/src/bitfinex.js +18 -19
  12. package/dist/cjs/src/bitfinex1.js +0 -1
  13. package/dist/cjs/src/bitflyer.js +0 -1
  14. package/dist/cjs/src/bitget.js +2 -2
  15. package/dist/cjs/src/bithumb.js +0 -1
  16. package/dist/cjs/src/bitmart.js +257 -5
  17. package/dist/cjs/src/bitmex.js +5 -6
  18. package/dist/cjs/src/bitopro.js +4 -5
  19. package/dist/cjs/src/bitrue.js +5 -7
  20. package/dist/cjs/src/bitso.js +1 -2
  21. package/dist/cjs/src/bitstamp.js +1 -2
  22. package/dist/cjs/src/bitteam.js +1 -3
  23. package/dist/cjs/src/bitvavo.js +2 -4
  24. package/dist/cjs/src/blockchaincom.js +5 -5
  25. package/dist/cjs/src/blofin.js +10 -10
  26. package/dist/cjs/src/btcalpha.js +0 -1
  27. package/dist/cjs/src/btcbox.js +0 -1
  28. package/dist/cjs/src/btcmarkets.js +1 -3
  29. package/dist/cjs/src/bybit.js +10 -11
  30. package/dist/cjs/src/cex.js +1 -1
  31. package/dist/cjs/src/coinbase.js +77 -1
  32. package/dist/cjs/src/coinbaseexchange.js +1 -1
  33. package/dist/cjs/src/coinbaseinternational.js +62 -0
  34. package/dist/cjs/src/coincatch.js +1 -1
  35. package/dist/cjs/src/coinex.js +9 -9
  36. package/dist/cjs/src/coinlist.js +1 -1
  37. package/dist/cjs/src/coinmetro.js +1 -1
  38. package/dist/cjs/src/cryptocom.js +91 -2
  39. package/dist/cjs/src/currencycom.js +1 -1
  40. package/dist/cjs/src/defx.js +1 -2
  41. package/dist/cjs/src/delta.js +1 -1
  42. package/dist/cjs/src/digifinex.js +1 -1
  43. package/dist/cjs/src/exmo.js +64 -6
  44. package/dist/cjs/src/gate.js +2 -2
  45. package/dist/cjs/src/hashkey.js +3 -5
  46. package/dist/cjs/src/htx.js +2 -2
  47. package/dist/cjs/src/hyperliquid.js +66 -2
  48. package/dist/cjs/src/kraken.js +130 -27
  49. package/dist/cjs/src/kucoin.js +30 -25
  50. package/dist/cjs/src/luno.js +1 -1
  51. package/dist/cjs/src/mexc.js +138 -2
  52. package/dist/cjs/src/ndax.js +1 -1
  53. package/dist/cjs/src/okcoin.js +18 -18
  54. package/dist/cjs/src/okx.js +27 -22
  55. package/dist/cjs/src/phemex.js +12 -8
  56. package/dist/cjs/src/poloniex.js +1 -1
  57. package/dist/cjs/src/poloniexfutures.js +6 -6
  58. package/dist/cjs/src/pro/bitget.js +1 -1
  59. package/dist/cjs/src/pro/bybit.js +13 -1
  60. package/dist/cjs/src/pro/coinex.js +2 -2
  61. package/dist/cjs/src/pro/gate.js +6 -6
  62. package/dist/cjs/src/pro/kucoin.js +3 -3
  63. package/dist/cjs/src/pro/okx.js +11 -11
  64. package/dist/cjs/src/pro/upbit.js +3 -3
  65. package/dist/cjs/src/vertex.js +11 -11
  66. package/dist/cjs/src/woo.js +33 -33
  67. package/dist/cjs/src/woofipro.js +24 -24
  68. package/dist/cjs/src/xt.js +31 -28
  69. package/dist/cjs/src/zonda.js +1 -1
  70. package/js/ccxt.d.ts +3 -3
  71. package/js/ccxt.js +1 -1
  72. package/js/src/abstract/bitmart.d.ts +2 -0
  73. package/js/src/abstract/okx.d.ts +5 -0
  74. package/js/src/ascendex.d.ts +2 -2
  75. package/js/src/ascendex.js +9 -9
  76. package/js/src/base/Exchange.d.ts +6 -3
  77. package/js/src/base/Exchange.js +32 -21
  78. package/js/src/base/types.d.ts +2 -0
  79. package/js/src/binance.d.ts +9 -9
  80. package/js/src/binance.js +37 -43
  81. package/js/src/bingx.d.ts +1 -1
  82. package/js/src/bingx.js +4 -3
  83. package/js/src/bit2c.js +0 -1
  84. package/js/src/bitbank.js +0 -1
  85. package/js/src/bitbns.js +0 -1
  86. package/js/src/bitfinex.d.ts +3 -3
  87. package/js/src/bitfinex.js +18 -19
  88. package/js/src/bitfinex1.js +0 -1
  89. package/js/src/bitflyer.js +0 -1
  90. package/js/src/bitget.d.ts +1 -1
  91. package/js/src/bitget.js +2 -2
  92. package/js/src/bithumb.js +0 -1
  93. package/js/src/bitmart.d.ts +53 -2
  94. package/js/src/bitmart.js +257 -5
  95. package/js/src/bitmex.d.ts +1 -1
  96. package/js/src/bitmex.js +5 -6
  97. package/js/src/bitopro.js +4 -5
  98. package/js/src/bitrue.js +5 -7
  99. package/js/src/bitso.d.ts +1 -1
  100. package/js/src/bitso.js +1 -2
  101. package/js/src/bitstamp.d.ts +1 -1
  102. package/js/src/bitstamp.js +1 -2
  103. package/js/src/bitteam.js +1 -3
  104. package/js/src/bitvavo.d.ts +1 -1
  105. package/js/src/bitvavo.js +2 -4
  106. package/js/src/blockchaincom.js +5 -5
  107. package/js/src/blofin.d.ts +3 -3
  108. package/js/src/blofin.js +10 -10
  109. package/js/src/btcalpha.js +0 -1
  110. package/js/src/btcbox.js +0 -1
  111. package/js/src/btcmarkets.js +1 -3
  112. package/js/src/bybit.d.ts +1 -1
  113. package/js/src/bybit.js +10 -11
  114. package/js/src/cex.d.ts +1 -1
  115. package/js/src/cex.js +1 -1
  116. package/js/src/coinbase.d.ts +1 -1
  117. package/js/src/coinbase.js +77 -1
  118. package/js/src/coinbaseexchange.d.ts +1 -1
  119. package/js/src/coinbaseexchange.js +1 -1
  120. package/js/src/coinbaseinternational.js +62 -0
  121. package/js/src/coincatch.d.ts +1 -1
  122. package/js/src/coincatch.js +1 -1
  123. package/js/src/coinex.js +9 -9
  124. package/js/src/coinlist.d.ts +1 -1
  125. package/js/src/coinlist.js +1 -1
  126. package/js/src/coinmetro.d.ts +1 -1
  127. package/js/src/coinmetro.js +1 -1
  128. package/js/src/cryptocom.d.ts +2 -2
  129. package/js/src/cryptocom.js +91 -2
  130. package/js/src/currencycom.d.ts +1 -1
  131. package/js/src/currencycom.js +1 -1
  132. package/js/src/defx.d.ts +1 -2
  133. package/js/src/defx.js +1 -2
  134. package/js/src/delta.d.ts +1 -1
  135. package/js/src/delta.js +1 -1
  136. package/js/src/digifinex.d.ts +1 -1
  137. package/js/src/digifinex.js +1 -1
  138. package/js/src/exmo.d.ts +35 -0
  139. package/js/src/exmo.js +64 -6
  140. package/js/src/gate.d.ts +1 -1
  141. package/js/src/gate.js +2 -2
  142. package/js/src/hashkey.d.ts +1 -1
  143. package/js/src/hashkey.js +3 -5
  144. package/js/src/htx.d.ts +1 -1
  145. package/js/src/htx.js +2 -2
  146. package/js/src/hyperliquid.d.ts +21 -2
  147. package/js/src/hyperliquid.js +66 -2
  148. package/js/src/kraken.d.ts +14 -8
  149. package/js/src/kraken.js +130 -27
  150. package/js/src/kucoin.d.ts +13 -13
  151. package/js/src/kucoin.js +30 -25
  152. package/js/src/luno.d.ts +1 -1
  153. package/js/src/luno.js +1 -1
  154. package/js/src/mexc.d.ts +1 -2
  155. package/js/src/mexc.js +138 -2
  156. package/js/src/ndax.d.ts +1 -1
  157. package/js/src/ndax.js +1 -1
  158. package/js/src/okcoin.d.ts +4 -4
  159. package/js/src/okcoin.js +18 -18
  160. package/js/src/okx.d.ts +3 -3
  161. package/js/src/okx.js +27 -22
  162. package/js/src/phemex.js +12 -8
  163. package/js/src/poloniex.d.ts +1 -1
  164. package/js/src/poloniex.js +1 -1
  165. package/js/src/poloniexfutures.d.ts +1 -1
  166. package/js/src/poloniexfutures.js +6 -6
  167. package/js/src/pro/bitget.d.ts +1 -1
  168. package/js/src/pro/bitget.js +1 -1
  169. package/js/src/pro/bybit.d.ts +1 -1
  170. package/js/src/pro/bybit.js +13 -1
  171. package/js/src/pro/coinex.js +2 -2
  172. package/js/src/pro/gate.d.ts +2 -2
  173. package/js/src/pro/gate.js +6 -6
  174. package/js/src/pro/kucoin.d.ts +1 -1
  175. package/js/src/pro/kucoin.js +3 -3
  176. package/js/src/pro/okx.d.ts +2 -2
  177. package/js/src/pro/okx.js +11 -11
  178. package/js/src/pro/upbit.d.ts +3 -3
  179. package/js/src/pro/upbit.js +3 -3
  180. package/js/src/vertex.d.ts +3 -3
  181. package/js/src/vertex.js +11 -11
  182. package/js/src/woo.d.ts +7 -7
  183. package/js/src/woo.js +33 -33
  184. package/js/src/woofipro.d.ts +1 -1
  185. package/js/src/woofipro.js +24 -24
  186. package/js/src/xt.d.ts +7 -7
  187. package/js/src/xt.js +31 -28
  188. package/js/src/zonda.d.ts +1 -1
  189. package/js/src/zonda.js +1 -1
  190. package/package.json +2 -2
@@ -1209,7 +1209,7 @@ export default class poloniexfutures extends Exchange {
1209
1209
  * @description cancel all open orders
1210
1210
  * @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
1211
1211
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1212
- * @param {object} [params.stop] When true, all the trigger orders will be cancelled
1212
+ * @param {object} [params.trigger] When true, all the trigger orders will be cancelled
1213
1213
  * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
1214
1214
  */
1215
1215
  async cancelAllOrders(symbol = undefined, params = {}) {
@@ -1218,10 +1218,10 @@ export default class poloniexfutures extends Exchange {
1218
1218
  if (symbol !== undefined) {
1219
1219
  request['symbol'] = this.marketId(symbol);
1220
1220
  }
1221
- const stop = this.safeValue2(params, 'stop', 'trigger');
1221
+ const trigger = this.safeValue2(params, 'stop', 'trigger');
1222
1222
  params = this.omit(params, ['stop', 'trigger']);
1223
1223
  let response = undefined;
1224
- if (stop) {
1224
+ if (trigger) {
1225
1225
  response = await this.privateDeleteStopOrders(this.extend(request, params));
1226
1226
  }
1227
1227
  else {
@@ -1288,14 +1288,14 @@ export default class poloniexfutures extends Exchange {
1288
1288
  */
1289
1289
  async fetchOrdersByStatus(status, symbol = undefined, since = undefined, limit = undefined, params = {}) {
1290
1290
  await this.loadMarkets();
1291
- const stop = this.safeValue2(params, 'stop', 'trigger');
1291
+ const trigger = this.safeValue2(params, 'stop', 'trigger');
1292
1292
  const until = this.safeInteger(params, 'until');
1293
1293
  params = this.omit(params, ['trigger', 'stop', 'until']);
1294
1294
  if (status === 'closed') {
1295
1295
  status = 'done';
1296
1296
  }
1297
1297
  const request = {};
1298
- if (!stop) {
1298
+ if (!trigger) {
1299
1299
  request['status'] = (status === 'open') ? 'active' : 'done';
1300
1300
  }
1301
1301
  else if (status !== 'open') {
@@ -1313,7 +1313,7 @@ export default class poloniexfutures extends Exchange {
1313
1313
  request['endAt'] = until;
1314
1314
  }
1315
1315
  let response = undefined;
1316
- if (stop) {
1316
+ if (trigger) {
1317
1317
  response = await this.privateGetStopOrders(this.extend(request, params));
1318
1318
  }
1319
1319
  else {
@@ -193,7 +193,7 @@ export default class bitget extends bitgetRest {
193
193
  * @param {int} [since] the earliest time in ms to fetch orders for
194
194
  * @param {int} [limit] the maximum number of order structures to retrieve
195
195
  * @param {object} [params] extra parameters specific to the exchange API endpoint
196
- * @param {boolean} [params.stop] *contract only* set to true for watching trigger orders
196
+ * @param {boolean} [params.trigger] *contract only* set to true for watching trigger orders
197
197
  * @param {string} [params.marginMode] 'isolated' or 'cross' for watching spot margin orders]
198
198
  * @param {string} [params.type] 'spot', 'swap'
199
199
  * @param {string} [params.subType] 'linear', 'inverse'
@@ -1124,7 +1124,7 @@ export default class bitget extends bitgetRest {
1124
1124
  * @param {int} [since] the earliest time in ms to fetch orders for
1125
1125
  * @param {int} [limit] the maximum number of order structures to retrieve
1126
1126
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1127
- * @param {boolean} [params.stop] *contract only* set to true for watching trigger orders
1127
+ * @param {boolean} [params.trigger] *contract only* set to true for watching trigger orders
1128
1128
  * @param {string} [params.marginMode] 'isolated' or 'cross' for watching spot margin orders]
1129
1129
  * @param {string} [params.type] 'spot', 'swap'
1130
1130
  * @param {string} [params.subType] 'linear', 'inverse'
@@ -73,7 +73,7 @@ export default class bybit extends bybitRest {
73
73
  * @param {string} id order id
74
74
  * @param {string} symbol unified symbol of the market the order was made in
75
75
  * @param {object} [params] extra parameters specific to the exchange API endpoint
76
- * @param {boolean} [params.stop] *spot only* whether the order is a stop order
76
+ * @param {boolean} [params.trigger] *spot only* whether the order is a trigger order
77
77
  * @param {string} [params.orderFilter] *spot only* 'Order' or 'StopOrder' or 'tpslOrder'
78
78
  * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
79
79
  */
@@ -109,6 +109,12 @@ export default class bybit extends bybitRest {
109
109
  'fetchPositionsSnapshot': true,
110
110
  'awaitPositionsSnapshot': true, // whether to wait for the positions snapshot before providing updates
111
111
  },
112
+ 'watchMyTrades': {
113
+ // filter execType: https://bybit-exchange.github.io/docs/api-explorer/v5/position/execution
114
+ 'filterExecTypes': [
115
+ 'Trade', 'AdlTrade', 'BustTrade', 'Settle',
116
+ ],
117
+ },
112
118
  'spot': {
113
119
  'timeframes': {
114
120
  '1m': '1m',
@@ -309,7 +315,7 @@ export default class bybit extends bybitRest {
309
315
  * @param {string} id order id
310
316
  * @param {string} symbol unified symbol of the market the order was made in
311
317
  * @param {object} [params] extra parameters specific to the exchange API endpoint
312
- * @param {boolean} [params.stop] *spot only* whether the order is a stop order
318
+ * @param {boolean} [params.trigger] *spot only* whether the order is a trigger order
313
319
  * @param {string} [params.orderFilter] *spot only* 'Order' or 'StopOrder' or 'tpslOrder'
314
320
  * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
315
321
  */
@@ -1353,6 +1359,7 @@ export default class bybit extends bybitRest {
1353
1359
  }
1354
1360
  const trades = this.myTrades;
1355
1361
  const symbols = {};
1362
+ const filterExecTypes = this.handleOption('watchMyTrades', 'filterExecTypes', []);
1356
1363
  for (let i = 0; i < data.length; i++) {
1357
1364
  const rawTrade = data[i];
1358
1365
  let parsed = undefined;
@@ -1360,6 +1367,11 @@ export default class bybit extends bybitRest {
1360
1367
  parsed = this.parseWsTrade(rawTrade);
1361
1368
  }
1362
1369
  else {
1370
+ // filter unified trades
1371
+ const execType = this.safeString(rawTrade, 'execType', '');
1372
+ if (!this.inArray(execType, filterExecTypes)) {
1373
+ continue;
1374
+ }
1363
1375
  parsed = this.parseTrade(rawTrade);
1364
1376
  }
1365
1377
  const symbol = parsed['symbol'];
@@ -896,7 +896,7 @@ export default class coinex extends coinexRest {
896
896
  */
897
897
  async watchOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
898
898
  await this.loadMarkets();
899
- const stop = this.safeBool2(params, 'trigger', 'stop');
899
+ const trigger = this.safeBool2(params, 'trigger', 'stop');
900
900
  params = this.omit(params, ['trigger', 'stop']);
901
901
  let messageHash = 'orders';
902
902
  let market = undefined;
@@ -922,7 +922,7 @@ export default class coinex extends coinexRest {
922
922
  }
923
923
  }
924
924
  let method = undefined;
925
- if (stop) {
925
+ if (trigger) {
926
926
  method = 'stop.subscribe';
927
927
  }
928
928
  else {
@@ -64,7 +64,7 @@ export default class gate extends gateRest {
64
64
  * @param {string} id Order id
65
65
  * @param {string} symbol Unified market symbol
66
66
  * @param {object} [params] Parameters specified by the exchange api
67
- * @param {bool} [params.stop] True if the order to be cancelled is a trigger order
67
+ * @param {bool} [params.trigger] True if the order to be cancelled is a trigger order
68
68
  * @returns An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
69
69
  */
70
70
  cancelOrderWs(id: string, symbol?: Str, params?: {}): Promise<Order>;
@@ -93,7 +93,7 @@ export default class gate extends gateRest {
93
93
  * @param {string} id Order id
94
94
  * @param {string} symbol Unified market symbol, *required for spot and margin*
95
95
  * @param {object} [params] Parameters specified by the exchange api
96
- * @param {bool} [params.stop] True if the order being fetched is a trigger order
96
+ * @param {bool} [params.trigger] True if the order being fetched is a trigger order
97
97
  * @param {string} [params.marginMode] 'cross' or 'isolated' - marginMode for margin trading if not provided this.options['defaultMarginMode'] is used
98
98
  * @param {string} [params.type] 'spot', 'swap', or 'future', if not provided this.options['defaultMarginMode'] is used
99
99
  * @param {string} [params.settle] 'btc' or 'usdt' - settle currency for perpetual swap and future - market settle currency is used if symbol !== undefined, default="usdt" for swap and "btc" for future
@@ -203,14 +203,14 @@ export default class gate extends gateRest {
203
203
  async cancelAllOrdersWs(symbol = undefined, params = {}) {
204
204
  await this.loadMarkets();
205
205
  const market = (symbol === undefined) ? undefined : this.market(symbol);
206
- const stop = this.safeBool2(params, 'stop', 'trigger');
206
+ const trigger = this.safeBool2(params, 'stop', 'trigger');
207
207
  const messageType = this.getTypeByMarket(market);
208
208
  let channel = messageType + '.order_cancel_cp';
209
209
  [channel, params] = this.handleOptionAndParams(params, 'cancelAllOrdersWs', 'channel', channel);
210
210
  const url = this.getUrlByMarket(market);
211
211
  params = this.omit(params, ['stop', 'trigger']);
212
212
  const [type, query] = this.handleMarketTypeAndParams('cancelAllOrders', market, params);
213
- const [request, requestParams] = (type === 'spot') ? this.multiOrderSpotPrepareRequest(market, stop, query) : this.prepareRequest(market, type, query);
213
+ const [request, requestParams] = (type === 'spot') ? this.multiOrderSpotPrepareRequest(market, trigger, query) : this.prepareRequest(market, type, query);
214
214
  await this.authenticate(url, messageType);
215
215
  const rawOrders = await this.requestPrivate(url, this.extend(request, requestParams), channel);
216
216
  return this.parseOrders(rawOrders, market);
@@ -224,16 +224,16 @@ export default class gate extends gateRest {
224
224
  * @param {string} id Order id
225
225
  * @param {string} symbol Unified market symbol
226
226
  * @param {object} [params] Parameters specified by the exchange api
227
- * @param {bool} [params.stop] True if the order to be cancelled is a trigger order
227
+ * @param {bool} [params.trigger] True if the order to be cancelled is a trigger order
228
228
  * @returns An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
229
229
  */
230
230
  async cancelOrderWs(id, symbol = undefined, params = {}) {
231
231
  await this.loadMarkets();
232
232
  const market = (symbol === undefined) ? undefined : this.market(symbol);
233
- const stop = this.safeValueN(params, ['is_stop_order', 'stop', 'trigger'], false);
233
+ const trigger = this.safeValueN(params, ['is_stop_order', 'stop', 'trigger'], false);
234
234
  params = this.omit(params, ['is_stop_order', 'stop', 'trigger']);
235
235
  const [type, query] = this.handleMarketTypeAndParams('cancelOrder', market, params);
236
- const [request, requestParams] = (type === 'spot' || type === 'margin') ? this.spotOrderPrepareRequest(market, stop, query) : this.prepareRequest(market, type, query);
236
+ const [request, requestParams] = (type === 'spot' || type === 'margin') ? this.spotOrderPrepareRequest(market, trigger, query) : this.prepareRequest(market, type, query);
237
237
  const messageType = this.getTypeByMarket(market);
238
238
  const channel = messageType + '.order_cancel';
239
239
  const url = this.getUrlByMarket(market);
@@ -277,7 +277,7 @@ export default class gate extends gateRest {
277
277
  * @param {string} id Order id
278
278
  * @param {string} symbol Unified market symbol, *required for spot and margin*
279
279
  * @param {object} [params] Parameters specified by the exchange api
280
- * @param {bool} [params.stop] True if the order being fetched is a trigger order
280
+ * @param {bool} [params.trigger] True if the order being fetched is a trigger order
281
281
  * @param {string} [params.marginMode] 'cross' or 'isolated' - marginMode for margin trading if not provided this.options['defaultMarginMode'] is used
282
282
  * @param {string} [params.type] 'spot', 'swap', or 'future', if not provided this.options['defaultMarginMode'] is used
283
283
  * @param {string} [params.settle] 'btc' or 'usdt' - settle currency for perpetual swap and future - market settle currency is used if symbol !== undefined, default="usdt" for swap and "btc" for future
@@ -178,7 +178,7 @@ export default class kucoin extends kucoinRest {
178
178
  * @param {int} [since] the earliest time in ms to fetch orders for
179
179
  * @param {int} [limit] the maximum number of order structures to retrieve
180
180
  * @param {object} [params] extra parameters specific to the exchange API endpoint
181
- * @param {boolean} [params.stop] trigger orders are watched if true
181
+ * @param {boolean} [params.trigger] trigger orders are watched if true
182
182
  * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
183
183
  */
184
184
  watchOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
@@ -951,15 +951,15 @@ export default class kucoin extends kucoinRest {
951
951
  * @param {int} [since] the earliest time in ms to fetch orders for
952
952
  * @param {int} [limit] the maximum number of order structures to retrieve
953
953
  * @param {object} [params] extra parameters specific to the exchange API endpoint
954
- * @param {boolean} [params.stop] trigger orders are watched if true
954
+ * @param {boolean} [params.trigger] trigger orders are watched if true
955
955
  * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
956
956
  */
957
957
  async watchOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
958
958
  await this.loadMarkets();
959
- const stop = this.safeValue2(params, 'stop', 'trigger');
959
+ const trigger = this.safeValue2(params, 'stop', 'trigger');
960
960
  params = this.omit(params, ['stop', 'trigger']);
961
961
  const url = await this.negotiate(true);
962
- const topic = stop ? '/spotMarket/advancedOrders' : '/spotMarket/tradeOrders';
962
+ const topic = trigger ? '/spotMarket/advancedOrders' : '/spotMarket/tradeOrders';
963
963
  const request = {
964
964
  'privateChannel': true,
965
965
  };
@@ -291,7 +291,7 @@ export default class okx extends okxRest {
291
291
  * @param {int} [since] the earliest time in ms to fetch trades for
292
292
  * @param {int} [limit] the maximum number of trade structures to retrieve
293
293
  * @param {object} [params] extra parameters specific to the exchange API endpoint
294
- * @param {bool} [params.stop] true if fetching trigger or conditional trades
294
+ * @param {bool} [params.trigger] true if fetching trigger or conditional trades
295
295
  * @param {string} [params.type] 'spot', 'swap', 'future', 'option', 'ANY', 'SPOT', 'MARGIN', 'SWAP', 'FUTURES' or 'OPTION'
296
296
  * @param {string} [params.marginMode] 'cross' or 'isolated', for automatically setting the type to spot margin
297
297
  * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
@@ -319,7 +319,7 @@ export default class okx extends okxRest {
319
319
  * @param {int} [since] the earliest time in ms to fetch orders for
320
320
  * @param {int} [limit] the maximum number of order structures to retrieve
321
321
  * @param {object} [params] extra parameters specific to the exchange API endpoint
322
- * @param {bool} [params.stop] true if fetching trigger or conditional orders
322
+ * @param {bool} [params.trigger] true if fetching trigger or conditional orders
323
323
  * @param {string} [params.type] 'spot', 'swap', 'future', 'option', 'ANY', 'SPOT', 'MARGIN', 'SWAP', 'FUTURES' or 'OPTION'
324
324
  * @param {string} [params.marginMode] 'cross' or 'isolated', for automatically setting the type to spot margin
325
325
  * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
package/js/src/pro/okx.js CHANGED
@@ -747,9 +747,9 @@ export default class okx extends okxRest {
747
747
  */
748
748
  async watchMyLiquidationsForSymbols(symbols = undefined, since = undefined, limit = undefined, params = {}) {
749
749
  await this.loadMarkets();
750
- const isStop = this.safeValue2(params, 'stop', 'trigger', false);
750
+ const isTrigger = this.safeValue2(params, 'stop', 'trigger', false);
751
751
  params = this.omit(params, ['stop', 'trigger']);
752
- await this.authenticate({ 'access': isStop ? 'business' : 'private' });
752
+ await this.authenticate({ 'access': isTrigger ? 'business' : 'private' });
753
753
  symbols = this.marketSymbols(symbols, undefined, true, true);
754
754
  const messageHash = 'myLiquidations';
755
755
  const messageHashes = [];
@@ -1596,7 +1596,7 @@ export default class okx extends okxRest {
1596
1596
  * @param {int} [since] the earliest time in ms to fetch trades for
1597
1597
  * @param {int} [limit] the maximum number of trade structures to retrieve
1598
1598
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1599
- * @param {bool} [params.stop] true if fetching trigger or conditional trades
1599
+ * @param {bool} [params.trigger] true if fetching trigger or conditional trades
1600
1600
  * @param {string} [params.type] 'spot', 'swap', 'future', 'option', 'ANY', 'SPOT', 'MARGIN', 'SWAP', 'FUTURES' or 'OPTION'
1601
1601
  * @param {string} [params.marginMode] 'cross' or 'isolated', for automatically setting the type to spot margin
1602
1602
  * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
@@ -1605,11 +1605,11 @@ export default class okx extends okxRest {
1605
1605
  // By default, receive order updates from any instrument type
1606
1606
  let type = undefined;
1607
1607
  [type, params] = this.handleOptionAndParams(params, 'watchMyTrades', 'type', 'ANY');
1608
- const isStop = this.safeBool(params, 'stop', false);
1609
- params = this.omit(params, ['stop']);
1608
+ const isTrigger = this.safeBool2(params, 'trigger', 'stop', false);
1609
+ params = this.omit(params, ['trigger', 'stop']);
1610
1610
  await this.loadMarkets();
1611
- await this.authenticate({ 'access': isStop ? 'business' : 'private' });
1612
- const channel = isStop ? 'orders-algo' : 'orders';
1611
+ await this.authenticate({ 'access': isTrigger ? 'business' : 'private' });
1612
+ const channel = isTrigger ? 'orders-algo' : 'orders';
1613
1613
  let messageHash = channel + '::myTrades';
1614
1614
  let market = undefined;
1615
1615
  if (symbol !== undefined) {
@@ -1785,7 +1785,7 @@ export default class okx extends okxRest {
1785
1785
  * @param {int} [since] the earliest time in ms to fetch orders for
1786
1786
  * @param {int} [limit] the maximum number of order structures to retrieve
1787
1787
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1788
- * @param {bool} [params.stop] true if fetching trigger or conditional orders
1788
+ * @param {bool} [params.trigger] true if fetching trigger or conditional orders
1789
1789
  * @param {string} [params.type] 'spot', 'swap', 'future', 'option', 'ANY', 'SPOT', 'MARGIN', 'SWAP', 'FUTURES' or 'OPTION'
1790
1790
  * @param {string} [params.marginMode] 'cross' or 'isolated', for automatically setting the type to spot margin
1791
1791
  * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
@@ -1794,10 +1794,10 @@ export default class okx extends okxRest {
1794
1794
  let type = undefined;
1795
1795
  // By default, receive order updates from any instrument type
1796
1796
  [type, params] = this.handleOptionAndParams(params, 'watchOrders', 'type', 'ANY');
1797
- const isStop = this.safeValue2(params, 'stop', 'trigger', false);
1797
+ const isTrigger = this.safeValue2(params, 'stop', 'trigger', false);
1798
1798
  params = this.omit(params, ['stop', 'trigger']);
1799
1799
  await this.loadMarkets();
1800
- await this.authenticate({ 'access': isStop ? 'business' : 'private' });
1800
+ await this.authenticate({ 'access': isTrigger ? 'business' : 'private' });
1801
1801
  let market = undefined;
1802
1802
  if (symbol !== undefined) {
1803
1803
  market = this.market(symbol);
@@ -1818,7 +1818,7 @@ export default class okx extends okxRest {
1818
1818
  const request = {
1819
1819
  'instType': uppercaseType,
1820
1820
  };
1821
- const channel = isStop ? 'orders-algo' : 'orders';
1821
+ const channel = isTrigger ? 'orders-algo' : 'orders';
1822
1822
  const orders = await this.subscribe('private', channel, channel, symbol, this.extend(request, params));
1823
1823
  if (this.newUpdates) {
1824
1824
  limit = orders.getLimit(symbol, limit);
@@ -17,10 +17,10 @@ export default class upbit extends upbitRest {
17
17
  watchTicker(symbol: string, params?: {}): Promise<Ticker>;
18
18
  /**
19
19
  * @method
20
- * @name upbit#watchTicker
21
- * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
20
+ * @name upbit#watchTickers
21
+ * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
22
22
  * @see https://global-docs.upbit.com/reference/websocket-ticker
23
- * @param symbols
23
+ * @param {string[]} symbols unified symbol of the market to fetch the ticker for
24
24
  * @param {object} [params] extra parameters specific to the exchange API endpoint
25
25
  * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
26
26
  */
@@ -101,10 +101,10 @@ export default class upbit extends upbitRest {
101
101
  }
102
102
  /**
103
103
  * @method
104
- * @name upbit#watchTicker
105
- * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
104
+ * @name upbit#watchTickers
105
+ * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
106
106
  * @see https://global-docs.upbit.com/reference/websocket-ticker
107
- * @param symbols
107
+ * @param {string[]} symbols unified symbol of the market to fetch the ticker for
108
108
  * @param {object} [params] extra parameters specific to the exchange API endpoint
109
109
  * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
110
110
  */
@@ -232,7 +232,7 @@ export default class vertex extends Exchange {
232
232
  * @param {int} [since] the earliest time in ms to fetch open orders for
233
233
  * @param {int} [limit] the maximum number of open orders structures to retrieve
234
234
  * @param {object} [params] extra parameters specific to the exchange API endpoint
235
- * @param {boolean} [params.stop] whether the order is a stop/algo order
235
+ * @param {boolean} [params.trigger] whether the order is a trigger/algo order
236
236
  * @param {string} [params.user] user address, will default to this.walletAddress if not provided
237
237
  * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
238
238
  */
@@ -246,7 +246,7 @@ export default class vertex extends Exchange {
246
246
  * @param {int} [since] the earliest time in ms to fetch open orders for
247
247
  * @param {int} [limit] the maximum number of open orders structures to retrieve
248
248
  * @param {object} [params] extra parameters specific to the exchange API endpoint
249
- * @param {boolean} [params.stop] whether the order is a stop/algo order
249
+ * @param {boolean} [params.trigger] whether the order is a trigger/algo order
250
250
  * @param {string} [params.user] user address, will default to this.walletAddress if not provided
251
251
  * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
252
252
  */
@@ -259,7 +259,7 @@ export default class vertex extends Exchange {
259
259
  * @description cancel all open orders in a market
260
260
  * @param {string} symbol unified market symbol
261
261
  * @param {object} [params] extra parameters specific to the exchange API endpoint
262
- * @param {boolean} [params.stop] whether the order is a stop/algo order
262
+ * @param {boolean} [params.trigger] whether the order is a trigger/algo order
263
263
  * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
264
264
  */
265
265
  cancelAllOrders(symbol?: Str, params?: {}): Promise<any>;
package/js/src/vertex.js CHANGED
@@ -2018,7 +2018,7 @@ export default class vertex extends Exchange {
2018
2018
  * @param {int} [since] the earliest time in ms to fetch open orders for
2019
2019
  * @param {int} [limit] the maximum number of open orders structures to retrieve
2020
2020
  * @param {object} [params] extra parameters specific to the exchange API endpoint
2021
- * @param {boolean} [params.stop] whether the order is a stop/algo order
2021
+ * @param {boolean} [params.trigger] whether the order is a trigger/algo order
2022
2022
  * @param {string} [params.user] user address, will default to this.walletAddress if not provided
2023
2023
  * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
2024
2024
  */
@@ -2029,14 +2029,14 @@ export default class vertex extends Exchange {
2029
2029
  [userAddress, params] = this.handlePublicAddress('fetchOpenOrders', params);
2030
2030
  const request = {};
2031
2031
  let market = undefined;
2032
- const stop = this.safeBool2(params, 'stop', 'trigger');
2032
+ const trigger = this.safeBool2(params, 'stop', 'trigger');
2033
2033
  params = this.omit(params, ['stop', 'trigger']);
2034
2034
  if (symbol !== undefined) {
2035
2035
  market = this.market(symbol);
2036
2036
  request['product_id'] = this.parseToNumeric(market['id']);
2037
2037
  }
2038
2038
  let response = undefined;
2039
- if (stop) {
2039
+ if (trigger) {
2040
2040
  const contracts = await this.queryContracts();
2041
2041
  const chainId = this.safeString(contracts, 'chain_id');
2042
2042
  const verifyingContractAddress = this.safeString(contracts, 'endpoint_addr');
@@ -2135,15 +2135,15 @@ export default class vertex extends Exchange {
2135
2135
  * @param {int} [since] the earliest time in ms to fetch open orders for
2136
2136
  * @param {int} [limit] the maximum number of open orders structures to retrieve
2137
2137
  * @param {object} [params] extra parameters specific to the exchange API endpoint
2138
- * @param {boolean} [params.stop] whether the order is a stop/algo order
2138
+ * @param {boolean} [params.trigger] whether the order is a trigger/algo order
2139
2139
  * @param {string} [params.user] user address, will default to this.walletAddress if not provided
2140
2140
  * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
2141
2141
  */
2142
2142
  async fetchOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
2143
2143
  this.checkRequiredCredentials();
2144
- const stop = this.safeBool2(params, 'stop', 'trigger');
2144
+ const trigger = this.safeBool2(params, 'stop', 'trigger');
2145
2145
  params = this.omit(params, ['stop', 'trigger']);
2146
- if (!stop) {
2146
+ if (!trigger) {
2147
2147
  throw new NotSupported(this.id + ' fetchOrders only support trigger orders');
2148
2148
  }
2149
2149
  let userAddress = undefined;
@@ -2221,7 +2221,7 @@ export default class vertex extends Exchange {
2221
2221
  * @description cancel all open orders in a market
2222
2222
  * @param {string} symbol unified market symbol
2223
2223
  * @param {object} [params] extra parameters specific to the exchange API endpoint
2224
- * @param {boolean} [params.stop] whether the order is a stop/algo order
2224
+ * @param {boolean} [params.trigger] whether the order is a trigger/algo order
2225
2225
  * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
2226
2226
  */
2227
2227
  async cancelAllOrders(symbol = undefined, params = {}) {
@@ -2254,10 +2254,10 @@ export default class vertex extends Exchange {
2254
2254
  'signature': this.buildCancelAllOrdersSig(cancels, chainId, verifyingContractAddress),
2255
2255
  },
2256
2256
  };
2257
- const stop = this.safeBool2(params, 'stop', 'trigger');
2257
+ const trigger = this.safeBool2(params, 'stop', 'trigger');
2258
2258
  params = this.omit(params, ['stop', 'trigger']);
2259
2259
  let response = undefined;
2260
- if (stop) {
2260
+ if (trigger) {
2261
2261
  response = await this.v1TriggerPostExecute(this.extend(request, params));
2262
2262
  //
2263
2263
  // {
@@ -2355,10 +2355,10 @@ export default class vertex extends Exchange {
2355
2355
  'signature': this.buildCancelOrdersSig(cancels, chainId, verifyingContractAddress),
2356
2356
  },
2357
2357
  };
2358
- const stop = this.safeBool2(params, 'stop', 'trigger');
2358
+ const trigger = this.safeBool2(params, 'stop', 'trigger');
2359
2359
  params = this.omit(params, ['stop', 'trigger']);
2360
2360
  let response = undefined;
2361
- if (stop) {
2361
+ if (trigger) {
2362
2362
  response = await this.v1TriggerPostExecute(this.extend(request, params));
2363
2363
  //
2364
2364
  // {
package/js/src/woo.d.ts CHANGED
@@ -188,7 +188,7 @@ export default class woo extends Exchange {
188
188
  * @param {string} id order id
189
189
  * @param {string} symbol unified symbol of the market the order was made in
190
190
  * @param {object} [params] extra parameters specific to the exchange API endpoint
191
- * @param {boolean} [params.stop] whether the order is a stop/algo order
191
+ * @param {boolean} [params.trigger] whether the order is a trigger/algo order
192
192
  * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
193
193
  */
194
194
  cancelOrder(id: string, symbol?: Str, params?: {}): Promise<any>;
@@ -201,7 +201,7 @@ export default class woo extends Exchange {
201
201
  * @description cancel all open orders in a market
202
202
  * @param {string} symbol unified market symbol
203
203
  * @param {object} [params] extra parameters specific to the exchange API endpoint
204
- * @param {boolean} [params.stop] whether the order is a stop/algo order
204
+ * @param {boolean} [params.trigger] whether the order is a trigger/algo order
205
205
  * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
206
206
  */
207
207
  cancelAllOrders(symbol?: Str, params?: {}): Promise<any>;
@@ -224,7 +224,7 @@ export default class woo extends Exchange {
224
224
  * @param {string} id the order id
225
225
  * @param {string} symbol unified symbol of the market the order was made in
226
226
  * @param {object} [params] extra parameters specific to the exchange API endpoint
227
- * @param {boolean} [params.stop] whether the order is a stop/algo order
227
+ * @param {boolean} [params.trigger] whether the order is a trigger/algo order
228
228
  * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
229
229
  */
230
230
  fetchOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
@@ -238,7 +238,7 @@ export default class woo extends Exchange {
238
238
  * @param {int} [since] the earliest time in ms to fetch orders for
239
239
  * @param {int} [limit] the maximum number of order structures to retrieve
240
240
  * @param {object} [params] extra parameters specific to the exchange API endpoint
241
- * @param {boolean} [params.stop] whether the order is a stop/algo order
241
+ * @param {boolean} [params.trigger] whether the order is a trigger/algo order
242
242
  * @param {boolean} [params.isTriggered] whether the order has been triggered (false by default)
243
243
  * @param {string} [params.side] 'buy' or 'sell'
244
244
  * @param {boolean} [params.trailing] set to true if you want to fetch trailing orders
@@ -256,7 +256,7 @@ export default class woo extends Exchange {
256
256
  * @param {int} [since] the earliest time in ms to fetch orders for
257
257
  * @param {int} [limit] the maximum number of order structures to retrieve
258
258
  * @param {object} [params] extra parameters specific to the exchange API endpoint
259
- * @param {boolean} [params.stop] whether the order is a stop/algo order
259
+ * @param {boolean} [params.trigger] whether the order is a trigger/algo order
260
260
  * @param {boolean} [params.isTriggered] whether the order has been triggered (false by default)
261
261
  * @param {string} [params.side] 'buy' or 'sell'
262
262
  * @param {boolean} [params.trailing] set to true if you want to fetch trailing orders
@@ -274,7 +274,7 @@ export default class woo extends Exchange {
274
274
  * @param {int} [since] the earliest time in ms to fetch orders for
275
275
  * @param {int} [limit] the maximum number of order structures to retrieve
276
276
  * @param {object} [params] extra parameters specific to the exchange API endpoint
277
- * @param {boolean} [params.stop] whether the order is a stop/algo order
277
+ * @param {boolean} [params.trigger] whether the order is a trigger/algo order
278
278
  * @param {boolean} [params.isTriggered] whether the order has been triggered (false by default)
279
279
  * @param {string} [params.side] 'buy' or 'sell'
280
280
  * @param {boolean} [params.trailing] set to true if you want to fetch trailing orders
@@ -383,7 +383,7 @@ export default class woo extends Exchange {
383
383
  * @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
384
384
  * @param {int} [limit] max number of ledger entries to return, default is undefined
385
385
  * @param {object} [params] extra parameters specific to the exchange API endpoint
386
- * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
386
+ * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger}
387
387
  */
388
388
  fetchLedger(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<LedgerEntry[]>;
389
389
  parseLedgerEntry(item: Dict, currency?: Currency): LedgerEntry;