ccxt 4.1.85 → 4.1.86

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 (295) hide show
  1. package/README.md +3 -3
  2. package/dist/ccxt.browser.js +724 -388
  3. package/dist/ccxt.browser.min.js +3 -3
  4. package/dist/cjs/ccxt.js +1 -1
  5. package/dist/cjs/src/ace.js +1 -1
  6. package/dist/cjs/src/alpaca.js +2 -2
  7. package/dist/cjs/src/ascendex.js +2 -2
  8. package/dist/cjs/src/base/Exchange.js +50 -20
  9. package/dist/cjs/src/bigone.js +1 -1
  10. package/dist/cjs/src/binance.js +2 -2
  11. package/dist/cjs/src/bingx.js +1 -1
  12. package/dist/cjs/src/bit2c.js +1 -1
  13. package/dist/cjs/src/bitbank.js +1 -1
  14. package/dist/cjs/src/bitbns.js +1 -1
  15. package/dist/cjs/src/bitfinex.js +1 -1
  16. package/dist/cjs/src/bitfinex2.js +1 -1
  17. package/dist/cjs/src/bitflyer.js +1 -1
  18. package/dist/cjs/src/bitforex.js +1 -1
  19. package/dist/cjs/src/bitget.js +2 -3
  20. package/dist/cjs/src/bithumb.js +1 -1
  21. package/dist/cjs/src/bitmart.js +1 -1
  22. package/dist/cjs/src/bitmex.js +2 -2
  23. package/dist/cjs/src/bitopro.js +1 -1
  24. package/dist/cjs/src/bitpanda.js +1 -1
  25. package/dist/cjs/src/bitrue.js +1 -1
  26. package/dist/cjs/src/bitso.js +1 -1
  27. package/dist/cjs/src/bitstamp.js +1 -1
  28. package/dist/cjs/src/bittrex.js +1 -1
  29. package/dist/cjs/src/bitvavo.js +1 -1
  30. package/dist/cjs/src/bl3p.js +1 -1
  31. package/dist/cjs/src/blockchaincom.js +1 -1
  32. package/dist/cjs/src/btcalpha.js +1 -1
  33. package/dist/cjs/src/btcbox.js +1 -1
  34. package/dist/cjs/src/btcmarkets.js +1 -1
  35. package/dist/cjs/src/btcturk.js +1 -1
  36. package/dist/cjs/src/bybit.js +3 -5
  37. package/dist/cjs/src/cex.js +1 -1
  38. package/dist/cjs/src/coinbase.js +1 -1
  39. package/dist/cjs/src/coinbasepro.js +1 -1
  40. package/dist/cjs/src/coincheck.js +1 -1
  41. package/dist/cjs/src/coinex.js +2 -2
  42. package/dist/cjs/src/coinlist.js +1 -1
  43. package/dist/cjs/src/coinmate.js +1 -1
  44. package/dist/cjs/src/coinone.js +1 -1
  45. package/dist/cjs/src/coinsph.js +1 -1
  46. package/dist/cjs/src/coinspot.js +1 -1
  47. package/dist/cjs/src/cryptocom.js +3 -3
  48. package/dist/cjs/src/currencycom.js +1 -1
  49. package/dist/cjs/src/delta.js +1 -1
  50. package/dist/cjs/src/deribit.js +1 -1
  51. package/dist/cjs/src/digifinex.js +160 -112
  52. package/dist/cjs/src/exmo.js +1 -1
  53. package/dist/cjs/src/gate.js +1 -1
  54. package/dist/cjs/src/gemini.js +1 -1
  55. package/dist/cjs/src/hitbtc.js +2 -2
  56. package/dist/cjs/src/hitbtc3.js +1 -1
  57. package/dist/cjs/src/hollaex.js +1 -1
  58. package/dist/cjs/src/htx.js +2 -2
  59. package/dist/cjs/src/huobijp.js +1 -1
  60. package/dist/cjs/src/idex.js +1 -1
  61. package/dist/cjs/src/independentreserve.js +1 -1
  62. package/dist/cjs/src/indodax.js +1 -1
  63. package/dist/cjs/src/kraken.js +2 -2
  64. package/dist/cjs/src/krakenfutures.js +3 -3
  65. package/dist/cjs/src/kucoin.js +2 -6
  66. package/dist/cjs/src/kuna.js +1 -1
  67. package/dist/cjs/src/latoken.js +2 -2
  68. package/dist/cjs/src/lbank.js +1 -1
  69. package/dist/cjs/src/luno.js +1 -1
  70. package/dist/cjs/src/lykke.js +1 -1
  71. package/dist/cjs/src/mercado.js +1 -1
  72. package/dist/cjs/src/mexc.js +102 -53
  73. package/dist/cjs/src/ndax.js +1 -1
  74. package/dist/cjs/src/novadax.js +1 -1
  75. package/dist/cjs/src/oceanex.js +1 -1
  76. package/dist/cjs/src/okcoin.js +1 -1
  77. package/dist/cjs/src/okx.js +4 -4
  78. package/dist/cjs/src/p2b.js +1 -3
  79. package/dist/cjs/src/paymium.js +1 -1
  80. package/dist/cjs/src/phemex.js +1 -1
  81. package/dist/cjs/src/poloniex.js +51 -51
  82. package/dist/cjs/src/poloniexfutures.js +1 -1
  83. package/dist/cjs/src/pro/bitget.js +1 -1
  84. package/dist/cjs/src/pro/bitmex.js +206 -0
  85. package/dist/cjs/src/pro/krakenfutures.js +6 -6
  86. package/dist/cjs/src/pro/mexc.js +1 -1
  87. package/dist/cjs/src/pro/poloniex.js +1 -1
  88. package/dist/cjs/src/pro/poloniexfutures.js +3 -3
  89. package/dist/cjs/src/probit.js +27 -19
  90. package/dist/cjs/src/static_dependencies/jsencrypt/JSEncrypt.js +1 -1
  91. package/dist/cjs/src/static_dependencies/jsencrypt/JSEncryptRSAKey.js +3 -3
  92. package/dist/cjs/src/timex.js +1 -1
  93. package/dist/cjs/src/tokocrypto.js +8 -4
  94. package/dist/cjs/src/upbit.js +1 -1
  95. package/dist/cjs/src/wavesexchange.js +1 -1
  96. package/dist/cjs/src/wazirx.js +1 -1
  97. package/dist/cjs/src/whitebit.js +1 -1
  98. package/dist/cjs/src/woo.js +1 -1
  99. package/dist/cjs/src/yobit.js +1 -1
  100. package/dist/cjs/src/zaif.js +1 -1
  101. package/dist/cjs/src/zonda.js +1 -1
  102. package/js/ccxt.d.ts +1 -1
  103. package/js/ccxt.js +1 -1
  104. package/js/src/ace.d.ts +1 -1
  105. package/js/src/ace.js +1 -1
  106. package/js/src/alpaca.d.ts +1 -1
  107. package/js/src/alpaca.js +2 -2
  108. package/js/src/ascendex.d.ts +1 -1
  109. package/js/src/ascendex.js +2 -2
  110. package/js/src/base/Exchange.d.ts +4 -0
  111. package/js/src/base/Exchange.js +50 -20
  112. package/js/src/base/types.d.ts +1 -0
  113. package/js/src/bigone.d.ts +1 -1
  114. package/js/src/bigone.js +1 -1
  115. package/js/src/binance.d.ts +1 -1
  116. package/js/src/binance.js +2 -2
  117. package/js/src/bingx.js +1 -1
  118. package/js/src/bit2c.d.ts +1 -1
  119. package/js/src/bit2c.js +1 -1
  120. package/js/src/bitbank.d.ts +1 -1
  121. package/js/src/bitbank.js +1 -1
  122. package/js/src/bitbns.d.ts +1 -1
  123. package/js/src/bitbns.js +1 -1
  124. package/js/src/bitfinex.d.ts +1 -1
  125. package/js/src/bitfinex.js +1 -1
  126. package/js/src/bitfinex2.d.ts +1 -1
  127. package/js/src/bitfinex2.js +1 -1
  128. package/js/src/bitflyer.d.ts +1 -1
  129. package/js/src/bitflyer.js +1 -1
  130. package/js/src/bitforex.d.ts +1 -1
  131. package/js/src/bitforex.js +1 -1
  132. package/js/src/bitget.d.ts +1 -1
  133. package/js/src/bitget.js +2 -3
  134. package/js/src/bithumb.d.ts +1 -1
  135. package/js/src/bithumb.js +1 -1
  136. package/js/src/bitmart.d.ts +1 -1
  137. package/js/src/bitmart.js +1 -1
  138. package/js/src/bitmex.d.ts +1 -1
  139. package/js/src/bitmex.js +2 -2
  140. package/js/src/bitopro.d.ts +1 -1
  141. package/js/src/bitopro.js +1 -1
  142. package/js/src/bitpanda.d.ts +1 -1
  143. package/js/src/bitpanda.js +1 -1
  144. package/js/src/bitrue.d.ts +1 -1
  145. package/js/src/bitrue.js +1 -1
  146. package/js/src/bitso.d.ts +1 -1
  147. package/js/src/bitso.js +1 -1
  148. package/js/src/bitstamp.d.ts +1 -1
  149. package/js/src/bitstamp.js +1 -1
  150. package/js/src/bittrex.d.ts +1 -1
  151. package/js/src/bittrex.js +1 -1
  152. package/js/src/bitvavo.d.ts +1 -1
  153. package/js/src/bitvavo.js +1 -1
  154. package/js/src/bl3p.d.ts +1 -1
  155. package/js/src/bl3p.js +1 -1
  156. package/js/src/blockchaincom.d.ts +1 -1
  157. package/js/src/blockchaincom.js +1 -1
  158. package/js/src/btcalpha.d.ts +1 -1
  159. package/js/src/btcalpha.js +1 -1
  160. package/js/src/btcbox.d.ts +1 -1
  161. package/js/src/btcbox.js +1 -1
  162. package/js/src/btcmarkets.d.ts +1 -1
  163. package/js/src/btcmarkets.js +1 -1
  164. package/js/src/btcturk.d.ts +1 -1
  165. package/js/src/btcturk.js +1 -1
  166. package/js/src/bybit.d.ts +1 -1
  167. package/js/src/bybit.js +3 -5
  168. package/js/src/cex.d.ts +1 -1
  169. package/js/src/cex.js +1 -1
  170. package/js/src/coinbase.d.ts +1 -1
  171. package/js/src/coinbase.js +1 -1
  172. package/js/src/coinbasepro.d.ts +1 -1
  173. package/js/src/coinbasepro.js +1 -1
  174. package/js/src/coincheck.d.ts +1 -1
  175. package/js/src/coincheck.js +1 -1
  176. package/js/src/coinex.d.ts +1 -1
  177. package/js/src/coinex.js +2 -2
  178. package/js/src/coinlist.d.ts +1 -1
  179. package/js/src/coinlist.js +1 -1
  180. package/js/src/coinmate.d.ts +1 -1
  181. package/js/src/coinmate.js +1 -1
  182. package/js/src/coinone.d.ts +1 -1
  183. package/js/src/coinone.js +1 -1
  184. package/js/src/coinsph.d.ts +1 -1
  185. package/js/src/coinsph.js +1 -1
  186. package/js/src/coinspot.d.ts +1 -1
  187. package/js/src/coinspot.js +1 -1
  188. package/js/src/cryptocom.d.ts +1 -1
  189. package/js/src/cryptocom.js +3 -3
  190. package/js/src/currencycom.d.ts +1 -1
  191. package/js/src/currencycom.js +1 -1
  192. package/js/src/delta.d.ts +1 -1
  193. package/js/src/delta.js +1 -1
  194. package/js/src/deribit.d.ts +1 -1
  195. package/js/src/deribit.js +1 -1
  196. package/js/src/digifinex.d.ts +1 -1
  197. package/js/src/digifinex.js +160 -112
  198. package/js/src/exmo.d.ts +1 -1
  199. package/js/src/exmo.js +1 -1
  200. package/js/src/gate.d.ts +1 -1
  201. package/js/src/gate.js +1 -1
  202. package/js/src/gemini.d.ts +1 -1
  203. package/js/src/gemini.js +1 -1
  204. package/js/src/hitbtc.d.ts +1 -1
  205. package/js/src/hitbtc.js +2 -2
  206. package/js/src/hitbtc3.d.ts +1 -1
  207. package/js/src/hitbtc3.js +1 -1
  208. package/js/src/hollaex.d.ts +1 -1
  209. package/js/src/hollaex.js +1 -1
  210. package/js/src/htx.d.ts +1 -1
  211. package/js/src/htx.js +2 -2
  212. package/js/src/huobijp.d.ts +1 -1
  213. package/js/src/huobijp.js +1 -1
  214. package/js/src/idex.d.ts +1 -1
  215. package/js/src/idex.js +1 -1
  216. package/js/src/independentreserve.d.ts +1 -1
  217. package/js/src/independentreserve.js +1 -1
  218. package/js/src/indodax.d.ts +1 -1
  219. package/js/src/indodax.js +1 -1
  220. package/js/src/kraken.d.ts +1 -1
  221. package/js/src/kraken.js +2 -2
  222. package/js/src/krakenfutures.d.ts +1 -1
  223. package/js/src/krakenfutures.js +3 -3
  224. package/js/src/kucoin.d.ts +1 -1
  225. package/js/src/kucoin.js +2 -6
  226. package/js/src/kuna.d.ts +1 -1
  227. package/js/src/kuna.js +1 -1
  228. package/js/src/latoken.d.ts +1 -1
  229. package/js/src/latoken.js +2 -2
  230. package/js/src/lbank.d.ts +1 -1
  231. package/js/src/lbank.js +1 -1
  232. package/js/src/luno.d.ts +1 -1
  233. package/js/src/luno.js +1 -1
  234. package/js/src/lykke.d.ts +1 -1
  235. package/js/src/lykke.js +1 -1
  236. package/js/src/mercado.d.ts +1 -1
  237. package/js/src/mercado.js +1 -1
  238. package/js/src/mexc.d.ts +1 -1
  239. package/js/src/mexc.js +102 -53
  240. package/js/src/ndax.d.ts +1 -1
  241. package/js/src/ndax.js +1 -1
  242. package/js/src/novadax.d.ts +1 -1
  243. package/js/src/novadax.js +1 -1
  244. package/js/src/oceanex.d.ts +1 -1
  245. package/js/src/oceanex.js +1 -1
  246. package/js/src/okcoin.d.ts +1 -1
  247. package/js/src/okcoin.js +1 -1
  248. package/js/src/okx.d.ts +1 -1
  249. package/js/src/okx.js +4 -4
  250. package/js/src/p2b.d.ts +1 -1
  251. package/js/src/p2b.js +1 -3
  252. package/js/src/paymium.d.ts +1 -1
  253. package/js/src/paymium.js +1 -1
  254. package/js/src/phemex.d.ts +1 -1
  255. package/js/src/phemex.js +1 -1
  256. package/js/src/poloniex.d.ts +1 -1
  257. package/js/src/poloniex.js +51 -51
  258. package/js/src/poloniexfutures.d.ts +1 -1
  259. package/js/src/poloniexfutures.js +1 -1
  260. package/js/src/pro/bitget.d.ts +1 -1
  261. package/js/src/pro/bitget.js +1 -1
  262. package/js/src/pro/bitmex.d.ts +3 -1
  263. package/js/src/pro/bitmex.js +207 -1
  264. package/js/src/pro/krakenfutures.js +6 -6
  265. package/js/src/pro/mexc.js +1 -1
  266. package/js/src/pro/poloniex.js +1 -1
  267. package/js/src/pro/poloniexfutures.js +3 -3
  268. package/js/src/probit.d.ts +1 -1
  269. package/js/src/probit.js +27 -19
  270. package/js/src/static_dependencies/jsencrypt/JSEncrypt.d.ts +1 -1
  271. package/js/src/static_dependencies/jsencrypt/JSEncrypt.js +1 -1
  272. package/js/src/static_dependencies/jsencrypt/JSEncryptRSAKey.d.ts +3 -3
  273. package/js/src/static_dependencies/jsencrypt/JSEncryptRSAKey.js +3 -3
  274. package/js/src/timex.d.ts +1 -1
  275. package/js/src/timex.js +1 -1
  276. package/js/src/tokocrypto.d.ts +1 -1
  277. package/js/src/tokocrypto.js +8 -4
  278. package/js/src/upbit.d.ts +1 -1
  279. package/js/src/upbit.js +1 -1
  280. package/js/src/wavesexchange.d.ts +1 -1
  281. package/js/src/wavesexchange.js +1 -1
  282. package/js/src/wazirx.d.ts +1 -1
  283. package/js/src/wazirx.js +1 -1
  284. package/js/src/whitebit.d.ts +1 -1
  285. package/js/src/whitebit.js +1 -1
  286. package/js/src/woo.d.ts +1 -1
  287. package/js/src/woo.js +1 -1
  288. package/js/src/yobit.d.ts +1 -1
  289. package/js/src/yobit.js +1 -1
  290. package/js/src/zaif.d.ts +1 -1
  291. package/js/src/zaif.js +1 -1
  292. package/js/src/zonda.d.ts +1 -1
  293. package/js/src/zonda.js +1 -1
  294. package/package.json +4 -3
  295. package/skip-tests.json +4 -0
@@ -10,7 +10,7 @@ var sha256 = require('./static_dependencies/noble-hashes/sha256.js');
10
10
  // ---------------------------------------------------------------------------
11
11
  /**
12
12
  * @class poloniex
13
- * @extends Exchange
13
+ * @augments Exchange
14
14
  */
15
15
  class poloniex extends poloniex$1 {
16
16
  describe() {
@@ -1236,20 +1236,20 @@ class poloniex extends poloniex$1 {
1236
1236
  }
1237
1237
  async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
1238
1238
  /**
1239
- * @method
1240
- * @name poloniex#createOrder
1241
- * @description create a trade order
1242
- * @see https://docs.poloniex.com/#authenticated-endpoints-orders-create-order
1243
- * @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-create-order // trigger orders
1244
- * @param {string} symbol unified symbol of the market to create an order in
1245
- * @param {string} type 'market' or 'limit'
1246
- * @param {string} side 'buy' or 'sell'
1247
- * @param {float} amount how much of currency you want to trade in units of base currency
1248
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
1249
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1250
- * @param {float} [params.triggerPrice] *spot only* The price at which a trigger order is triggered at
1251
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1252
- */
1239
+ * @method
1240
+ * @name poloniex#createOrder
1241
+ * @description create a trade order
1242
+ * @see https://docs.poloniex.com/#authenticated-endpoints-orders-create-order
1243
+ * @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-create-order // trigger orders
1244
+ * @param {string} symbol unified symbol of the market to create an order in
1245
+ * @param {string} type 'market' or 'limit'
1246
+ * @param {string} side 'buy' or 'sell'
1247
+ * @param {float} amount how much of currency you want to trade in units of base currency
1248
+ * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
1249
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1250
+ * @param {float} [params.triggerPrice] *spot only* The price at which a trigger order is triggered at
1251
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1252
+ */
1253
1253
  await this.loadMarkets();
1254
1254
  const market = this.market(symbol);
1255
1255
  if (!market['spot']) {
@@ -1319,21 +1319,21 @@ class poloniex extends poloniex$1 {
1319
1319
  }
1320
1320
  async editOrder(id, symbol, type, side, amount = undefined, price = undefined, params = {}) {
1321
1321
  /**
1322
- * @method
1323
- * @name poloniex#editOrder
1324
- * @description edit a trade order
1325
- * @see https://docs.poloniex.com/#authenticated-endpoints-orders-cancel-replace-order
1326
- * @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-cancel-replace-order
1327
- * @param {string} id order id
1328
- * @param {string} symbol unified symbol of the market to create an order in
1329
- * @param {string} type 'market' or 'limit'
1330
- * @param {string} side 'buy' or 'sell'
1331
- * @param {float} [amount] how much of the currency you want to trade in units of the base currency
1332
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
1333
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1334
- * @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
1335
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1336
- */
1322
+ * @method
1323
+ * @name poloniex#editOrder
1324
+ * @description edit a trade order
1325
+ * @see https://docs.poloniex.com/#authenticated-endpoints-orders-cancel-replace-order
1326
+ * @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-cancel-replace-order
1327
+ * @param {string} id order id
1328
+ * @param {string} symbol unified symbol of the market to create an order in
1329
+ * @param {string} type 'market' or 'limit'
1330
+ * @param {string} side 'buy' or 'sell'
1331
+ * @param {float} [amount] how much of the currency you want to trade in units of the base currency
1332
+ * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
1333
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1334
+ * @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
1335
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1336
+ */
1337
1337
  await this.loadMarkets();
1338
1338
  const market = this.market(symbol);
1339
1339
  if (!market['spot']) {
@@ -1405,16 +1405,16 @@ class poloniex extends poloniex$1 {
1405
1405
  }
1406
1406
  async cancelAllOrders(symbol = undefined, params = {}) {
1407
1407
  /**
1408
- * @method
1409
- * @name poloniex#cancelAllOrders
1410
- * @description cancel all open orders
1411
- * @see https://docs.poloniex.com/#authenticated-endpoints-orders-cancel-all-orders
1412
- * @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-cancel-all-orders // trigger orders
1413
- * @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
1414
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1415
- * @param {boolean} [params.trigger] true if canceling trigger orders
1416
- * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
1417
- */
1408
+ * @method
1409
+ * @name poloniex#cancelAllOrders
1410
+ * @description cancel all open orders
1411
+ * @see https://docs.poloniex.com/#authenticated-endpoints-orders-cancel-all-orders
1412
+ * @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-cancel-all-orders // trigger orders
1413
+ * @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
1414
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1415
+ * @param {boolean} [params.trigger] true if canceling trigger orders
1416
+ * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
1417
+ */
1418
1418
  await this.loadMarkets();
1419
1419
  const request = {
1420
1420
  // 'accountTypes': 'SPOT',
@@ -1457,17 +1457,17 @@ class poloniex extends poloniex$1 {
1457
1457
  }
1458
1458
  async fetchOrder(id, symbol = undefined, params = {}) {
1459
1459
  /**
1460
- * @method
1461
- * @name poloniex#fetchOrder
1462
- * @description fetch an order by it's id
1463
- * @see https://docs.poloniex.com/#authenticated-endpoints-orders-order-details
1464
- * @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-open-orders // trigger orders
1465
- * @param {string} id order id
1466
- * @param {string} symbol unified market symbol, default is undefined
1467
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1468
- * @param {boolean} [params.trigger] true if fetching a trigger order
1469
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1470
- */
1460
+ * @method
1461
+ * @name poloniex#fetchOrder
1462
+ * @description fetch an order by it's id
1463
+ * @see https://docs.poloniex.com/#authenticated-endpoints-orders-order-details
1464
+ * @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-open-orders // trigger orders
1465
+ * @param {string} id order id
1466
+ * @param {string} symbol unified market symbol, default is undefined
1467
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1468
+ * @param {boolean} [params.trigger] true if fetching a trigger order
1469
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1470
+ */
1471
1471
  await this.loadMarkets();
1472
1472
  id = id.toString();
1473
1473
  const request = {
@@ -10,7 +10,7 @@ var sha256 = require('./static_dependencies/noble-hashes/sha256.js');
10
10
  // ---------------------------------------------------------------------------
11
11
  /**
12
12
  * @class poloniexfutures
13
- * @extends Exchange
13
+ * @augments Exchange
14
14
  */
15
15
  class poloniexfutures extends poloniexfutures$1 {
16
16
  describe() {
@@ -10,7 +10,7 @@ var sha256 = require('../static_dependencies/noble-hashes/sha256.js');
10
10
  // ---------------------------------------------------------------------------
11
11
  /**
12
12
  * @class bitget
13
- * @extends Exchange
13
+ * @augments Exchange
14
14
  * @description watching delivery future markets is not yet implemented (perpertual future / swap is implemented)
15
15
  */
16
16
  class bitget extends bitget$1 {
@@ -18,6 +18,7 @@ class bitmex extends bitmex$1 {
18
18
  'watchOrderBook': true,
19
19
  'watchOrderBookForSymbols': true,
20
20
  'watchOrders': true,
21
+ 'watchPostions': true,
21
22
  'watchTicker': true,
22
23
  'watchTickers': false,
23
24
  'watchTrades': true,
@@ -591,6 +592,210 @@ class bitmex extends bitmex$1 {
591
592
  }
592
593
  }
593
594
  }
595
+ async watchPositions(symbols = undefined, since = undefined, limit = undefined, params = {}) {
596
+ /**
597
+ * @method
598
+ * @name bitmex#watchPositions
599
+ * @see https://www.bitmex.com/app/wsAPI
600
+ * @description watch all open positions
601
+ * @param {string[]|undefined} symbols list of unified market symbols
602
+ * @param {object} params extra parameters specific to the exchange API endpoint
603
+ * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure}
604
+ */
605
+ await this.loadMarkets();
606
+ await this.authenticate();
607
+ const subscriptionHash = 'position';
608
+ let messageHash = 'positions';
609
+ if (!this.isEmpty(symbols)) {
610
+ messageHash = '::' + symbols.join(',');
611
+ }
612
+ const url = this.urls['api']['ws'];
613
+ const request = {
614
+ 'op': 'subscribe',
615
+ 'args': [
616
+ subscriptionHash,
617
+ ],
618
+ };
619
+ const newPositions = await this.watch(url, messageHash, request, subscriptionHash);
620
+ if (this.newUpdates) {
621
+ return newPositions;
622
+ }
623
+ return this.filterBySymbolsSinceLimit(this.positions, symbols, since, limit, true);
624
+ }
625
+ handlePositions(client, message) {
626
+ //
627
+ // partial
628
+ // {
629
+ // table: 'position',
630
+ // action: 'partial',
631
+ // keys: [ 'account', 'symbol' ],
632
+ // types: {
633
+ // account: 'long',
634
+ // symbol: 'symbol',
635
+ // currency: 'symbol',
636
+ // underlying: 'symbol',
637
+ // quoteCurrency: 'symbol',
638
+ // commission: 'float',
639
+ // initMarginReq: 'float',
640
+ // maintMarginReq: 'float',
641
+ // riskLimit: 'long',
642
+ // leverage: 'float',
643
+ // crossMargin: 'boolean',
644
+ // deleveragePercentile: 'float',
645
+ // rebalancedPnl: 'long',
646
+ // prevRealisedPnl: 'long',
647
+ // prevUnrealisedPnl: 'long',
648
+ // openingQty: 'long',
649
+ // openOrderBuyQty: 'long',
650
+ // openOrderBuyCost: 'long',
651
+ // openOrderBuyPremium: 'long',
652
+ // openOrderSellQty: 'long',
653
+ // openOrderSellCost: 'long',
654
+ // openOrderSellPremium: 'long',
655
+ // currentQty: 'long',
656
+ // currentCost: 'long',
657
+ // currentComm: 'long',
658
+ // realisedCost: 'long',
659
+ // unrealisedCost: 'long',
660
+ // grossOpenPremium: 'long',
661
+ // isOpen: 'boolean',
662
+ // markPrice: 'float',
663
+ // markValue: 'long',
664
+ // riskValue: 'long',
665
+ // homeNotional: 'float',
666
+ // foreignNotional: 'float',
667
+ // posState: 'symbol',
668
+ // posCost: 'long',
669
+ // posCross: 'long',
670
+ // posComm: 'long',
671
+ // posLoss: 'long',
672
+ // posMargin: 'long',
673
+ // posMaint: 'long',
674
+ // initMargin: 'long',
675
+ // maintMargin: 'long',
676
+ // realisedPnl: 'long',
677
+ // unrealisedPnl: 'long',
678
+ // unrealisedPnlPcnt: 'float',
679
+ // unrealisedRoePcnt: 'float',
680
+ // avgCostPrice: 'float',
681
+ // avgEntryPrice: 'float',
682
+ // breakEvenPrice: 'float',
683
+ // marginCallPrice: 'float',
684
+ // liquidationPrice: 'float',
685
+ // bankruptPrice: 'float',
686
+ // timestamp: 'timestamp'
687
+ // },
688
+ // filter: { account: 412475 },
689
+ // data: [
690
+ // {
691
+ // account: 412475,
692
+ // symbol: 'XBTUSD',
693
+ // currency: 'XBt',
694
+ // underlying: 'XBT',
695
+ // quoteCurrency: 'USD',
696
+ // commission: 0.00075,
697
+ // initMarginReq: 0.01,
698
+ // maintMarginReq: 0.0035,
699
+ // riskLimit: 20000000000,
700
+ // leverage: 100,
701
+ // crossMargin: true,
702
+ // deleveragePercentile: 1,
703
+ // rebalancedPnl: 0,
704
+ // prevRealisedPnl: 0,
705
+ // prevUnrealisedPnl: 0,
706
+ // openingQty: 400,
707
+ // openOrderBuyQty: 0,
708
+ // openOrderBuyCost: 0,
709
+ // openOrderBuyPremium: 0,
710
+ // openOrderSellQty: 0,
711
+ // openOrderSellCost: 0,
712
+ // openOrderSellPremium: 0,
713
+ // currentQty: 400,
714
+ // currentCost: -912269,
715
+ // currentComm: 684,
716
+ // realisedCost: 0,
717
+ // unrealisedCost: -912269,
718
+ // grossOpenPremium: 0,
719
+ // isOpen: true,
720
+ // markPrice: 43772,
721
+ // markValue: -913828,
722
+ // riskValue: 913828,
723
+ // homeNotional: 0.00913828,
724
+ // foreignNotional: -400,
725
+ // posCost: -912269,
726
+ // posCross: 1559,
727
+ // posComm: 694,
728
+ // posLoss: 0,
729
+ // posMargin: 11376,
730
+ // posMaint: 3887,
731
+ // initMargin: 0,
732
+ // maintMargin: 9817,
733
+ // realisedPnl: -684,
734
+ // unrealisedPnl: -1559,
735
+ // unrealisedPnlPcnt: -0.0017,
736
+ // unrealisedRoePcnt: -0.1709,
737
+ // avgCostPrice: 43846.7643,
738
+ // avgEntryPrice: 43846.7643,
739
+ // breakEvenPrice: 43880,
740
+ // marginCallPrice: 20976,
741
+ // liquidationPrice: 20976,
742
+ // bankruptPrice: 20941,
743
+ // timestamp: '2023-12-07T00:09:00.709Z'
744
+ // }
745
+ // ]
746
+ // }
747
+ // update
748
+ // {
749
+ // table: 'position',
750
+ // action: 'update',
751
+ // data: [
752
+ // {
753
+ // account: 412475,
754
+ // symbol: 'XBTUSD',
755
+ // currency: 'XBt',
756
+ // currentQty: 400,
757
+ // markPrice: 43772.75,
758
+ // markValue: -913812,
759
+ // riskValue: 913812,
760
+ // homeNotional: 0.00913812,
761
+ // posCross: 1543,
762
+ // posComm: 693,
763
+ // posMargin: 11359,
764
+ // posMaint: 3886,
765
+ // maintMargin: 9816,
766
+ // unrealisedPnl: -1543,
767
+ // unrealisedRoePcnt: -0.1691,
768
+ // liquidationPrice: 20976,
769
+ // timestamp: '2023-12-07T00:09:10.760Z'
770
+ // }
771
+ // ]
772
+ // }
773
+ //
774
+ if (this.positions === undefined) {
775
+ this.positions = new Cache.ArrayCacheBySymbolBySide();
776
+ }
777
+ const cache = this.positions;
778
+ const rawPositions = this.safeValue(message, 'data', []);
779
+ const newPositions = [];
780
+ for (let i = 0; i < rawPositions.length; i++) {
781
+ const rawPosition = rawPositions[i];
782
+ const position = this.parsePosition(rawPosition);
783
+ newPositions.push(position);
784
+ cache.append(position);
785
+ }
786
+ const messageHashes = this.findMessageHashes(client, 'positions::');
787
+ for (let i = 0; i < messageHashes.length; i++) {
788
+ const messageHash = messageHashes[i];
789
+ const parts = messageHash.split('::');
790
+ const symbolsString = parts[1];
791
+ const symbols = symbolsString.split(',');
792
+ const positions = this.filterByArray(newPositions, 'symbol', symbols, false);
793
+ if (!this.isEmpty(positions)) {
794
+ client.resolve(positions, messageHash);
795
+ }
796
+ }
797
+ client.resolve(newPositions, 'positions');
798
+ }
594
799
  async watchOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
595
800
  /**
596
801
  * @method
@@ -1373,6 +1578,7 @@ class bitmex extends bitmex$1 {
1373
1578
  'order': this.handleOrders,
1374
1579
  'execution': this.handleMyTrades,
1375
1580
  'margin': this.handleBalance,
1581
+ 'position': this.handlePositions,
1376
1582
  };
1377
1583
  const method = this.safeValue(methods, table);
1378
1584
  if (method === undefined) {
@@ -96,10 +96,10 @@ class krakenfutures extends krakenfutures$1 {
96
96
  * @ignore
97
97
  * @method
98
98
  * @description Connects to a websocket channel
99
- * @param {String} name name of the channel
99
+ * @param {string} name name of the channel
100
100
  * @param {string[]} symbols CCXT market symbols
101
- * @param {Object} [params] extra parameters specific to the krakenfutures api
102
- * @returns {Object} data from the websocket stream
101
+ * @param {object} [params] extra parameters specific to the krakenfutures api
102
+ * @returns {object} data from the websocket stream
103
103
  */
104
104
  await this.loadMarkets();
105
105
  const url = this.urls['api']['ws'];
@@ -130,10 +130,10 @@ class krakenfutures extends krakenfutures$1 {
130
130
  * @ignore
131
131
  * @method
132
132
  * @description Connects to a websocket channel
133
- * @param {String} name name of the channel
133
+ * @param {string} name name of the channel
134
134
  * @param {string[]} symbols CCXT market symbols
135
- * @param {Object} [params] extra parameters specific to the krakenfutures api
136
- * @returns {Object} data from the websocket stream
135
+ * @param {object} [params] extra parameters specific to the krakenfutures api
136
+ * @returns {object} data from the websocket stream
137
137
  */
138
138
  await this.loadMarkets();
139
139
  await this.authenticate();
@@ -739,7 +739,7 @@ class mexc extends mexc$1 {
739
739
  * @param {int} [since] the earliest time in ms to fetch orders for
740
740
  * @param {int} [limit] the maximum number of orde structures to retrieve
741
741
  * @param {object} [params] extra parameters specific to the exchange API endpoint
742
- * @params {string|undefined} params.type the type of orders to retrieve, can be 'spot' or 'margin'
742
+ * @param {string|undefined} params.type the type of orders to retrieve, can be 'spot' or 'margin'
743
743
  * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
744
744
  */
745
745
  await this.loadMarkets();
@@ -201,7 +201,7 @@ class poloniex extends poloniex$1 {
201
201
  * @param {string} [params.stpMode] self-trade prevention, defaults to expire_taker, none: enable self-trade; expire_taker: taker order will be canceled when self-trade happens
202
202
  * @param {string} [params.slippageTolerance] used to control the maximum slippage ratio, the value range is greater than 0 and less than 1
203
203
  * @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
204
- */
204
+ */
205
205
  await this.loadMarkets();
206
206
  await this.authenticate();
207
207
  const market = this.market(symbol);
@@ -126,9 +126,9 @@ class poloniexfutures extends poloniexfutures$1 {
126
126
  * @param {string} name name of the channel and suscriptionHash
127
127
  * @param {bool} isPrivate true for the authenticated url, false for the public url
128
128
  * @param {string} symbol is required for all public channels, not required for private channels (except position)
129
- * @param {Object} subscription subscription parameters
130
- * @param {Object} [params] extra parameters specific to the poloniex api
131
- * @returns {Object} data from the websocket stream
129
+ * @param {object} subscription subscription parameters
130
+ * @param {object} [params] extra parameters specific to the poloniex api
131
+ * @returns {object} data from the websocket stream
132
132
  */
133
133
  const url = await this.negotiate(isPrivate);
134
134
  if (symbol !== undefined) {
@@ -9,7 +9,7 @@ var number = require('./base/functions/number.js');
9
9
  // ---------------------------------------------------------------------------
10
10
  /**
11
11
  * @class probit
12
- * @extends Exchange
12
+ * @augments Exchange
13
13
  */
14
14
  class probit extends probit$1 {
15
15
  describe() {
@@ -28,7 +28,10 @@ class probit extends probit$1 {
28
28
  'option': false,
29
29
  'addMargin': false,
30
30
  'cancelOrder': true,
31
+ 'createMarketBuyOrderWithCost': true,
31
32
  'createMarketOrder': true,
33
+ 'createMarketOrderWithCost': false,
34
+ 'createMarketSellOrderWithCost': false,
32
35
  'createOrder': true,
33
36
  'createReduceOnlyOrder': false,
34
37
  'createStopLimitOrder': false,
@@ -315,6 +318,7 @@ class probit extends probit$1 {
315
318
  'precision': {
316
319
  'amount': this.parseNumber(this.parsePrecision(this.safeString(market, 'quantity_precision'))),
317
320
  'price': this.safeNumber(market, 'price_increment'),
321
+ 'cost': this.parseNumber(this.parsePrecision(this.safeString(market, 'cost_precision'))),
318
322
  },
319
323
  'limits': {
320
324
  'leverage': {
@@ -1187,14 +1191,15 @@ class probit extends probit$1 {
1187
1191
  /**
1188
1192
  * @method
1189
1193
  * @name probit#createOrder
1190
- * @see https://docs-en.probit.com/reference/order-1
1191
1194
  * @description create a trade order
1195
+ * @see https://docs-en.probit.com/reference/order-1
1192
1196
  * @param {string} symbol unified symbol of the market to create an order in
1193
1197
  * @param {string} type 'market' or 'limit'
1194
1198
  * @param {string} side 'buy' or 'sell'
1195
- * @param {float} amount how much of currency you want to trade in units of base currency
1199
+ * @param {float} amount how much you want to trade in units of the base currency
1196
1200
  * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
1197
1201
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1202
+ * @param {float} [params.cost] the quote quantity that can be used as an alternative for the amount for market buy orders
1198
1203
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1199
1204
  */
1200
1205
  await this.loadMarkets();
@@ -1212,7 +1217,7 @@ class probit extends probit$1 {
1212
1217
  if (clientOrderId !== undefined) {
1213
1218
  request['client_order_id'] = clientOrderId;
1214
1219
  }
1215
- let costToPrecision = undefined;
1220
+ let quoteAmount = undefined;
1216
1221
  if (type === 'limit') {
1217
1222
  request['limit_price'] = this.priceToPrecision(symbol, price);
1218
1223
  request['quantity'] = this.amountToPrecision(symbol, amount);
@@ -1220,25 +1225,28 @@ class probit extends probit$1 {
1220
1225
  else if (type === 'market') {
1221
1226
  // for market buy it requires the amount of quote currency to spend
1222
1227
  if (side === 'buy') {
1223
- let cost = this.safeNumber(params, 'cost');
1224
- const createMarketBuyOrderRequiresPrice = this.safeValue(this.options, 'createMarketBuyOrderRequiresPrice', true);
1225
- if (createMarketBuyOrderRequiresPrice) {
1226
- if (price !== undefined) {
1227
- if (cost === undefined) {
1228
- const amountString = this.numberToString(amount);
1229
- const priceString = this.numberToString(price);
1230
- cost = this.parseNumber(Precise["default"].stringMul(amountString, priceString));
1231
- }
1228
+ let createMarketBuyOrderRequiresPrice = true;
1229
+ [createMarketBuyOrderRequiresPrice, params] = this.handleOptionAndParams(params, 'createOrder', 'createMarketBuyOrderRequiresPrice', true);
1230
+ const cost = this.safeString(params, 'cost');
1231
+ params = this.omit(params, 'cost');
1232
+ if (cost !== undefined) {
1233
+ quoteAmount = this.costToPrecision(symbol, cost);
1234
+ }
1235
+ else if (createMarketBuyOrderRequiresPrice) {
1236
+ if (price === undefined) {
1237
+ throw new errors.InvalidOrder(this.id + ' createOrder() requires the price argument for market buy orders to calculate the total cost to spend (amount * price), alternatively set the createMarketBuyOrderRequiresPrice option or param to false and pass the cost to spend in the amount argument');
1232
1238
  }
1233
- else if (cost === undefined) {
1234
- throw new errors.InvalidOrder(this.id + ' createOrder() requires the price argument for market buy orders to calculate total order cost (amount to spend), where cost = amount * price. Supply a price argument to createOrder() call if you want the cost to be calculated for you from price and amount, or, alternatively, add .options["createMarketBuyOrderRequiresPrice"] = false and supply the total cost value in the "amount" argument or in the "cost" extra parameter (the exchange-specific behaviour)');
1239
+ else {
1240
+ const amountString = this.numberToString(amount);
1241
+ const priceString = this.numberToString(price);
1242
+ const costRequest = Precise["default"].stringMul(amountString, priceString);
1243
+ quoteAmount = this.costToPrecision(symbol, costRequest);
1235
1244
  }
1236
1245
  }
1237
1246
  else {
1238
- cost = (cost === undefined) ? amount : cost;
1247
+ quoteAmount = this.costToPrecision(symbol, amount);
1239
1248
  }
1240
- costToPrecision = this.costToPrecision(symbol, cost);
1241
- request['cost'] = costToPrecision;
1249
+ request['cost'] = quoteAmount;
1242
1250
  }
1243
1251
  else {
1244
1252
  request['quantity'] = this.amountToPrecision(symbol, amount);
@@ -1273,7 +1281,7 @@ class probit extends probit$1 {
1273
1281
  // returned by the exchange on market buys
1274
1282
  if ((type === 'market') && (side === 'buy')) {
1275
1283
  order['amount'] = undefined;
1276
- order['cost'] = this.parseNumber(costToPrecision);
1284
+ order['cost'] = this.parseNumber(quoteAmount);
1277
1285
  order['remaining'] = undefined;
1278
1286
  }
1279
1287
  return order;
@@ -10,7 +10,7 @@ const version = typeof process !== 'undefined'
10
10
  : undefined;
11
11
  /**
12
12
  *
13
- * @param {Object} [options = {}] - An object to customize JSEncrypt behaviour
13
+ * @param {object} [options = {}] - An object to customize JSEncrypt behaviour
14
14
  * possible parameters are:
15
15
  * - default_key_size {number} default: 1024 the key size in bit
16
16
  * - default_public_exponent {string} default: '010001' the hexadecimal representation of the public exponent
@@ -253,7 +253,7 @@ class JSEncryptRSAKey extends rsa.RSAKey {
253
253
  /**
254
254
  * Check if the object contains the necessary parameters to populate the rsa modulus
255
255
  * and public exponent parameters.
256
- * @param {Object} [obj={}] - An object that may contain the two public key
256
+ * @param {object} [obj={}] - An object that may contain the two public key
257
257
  * parameters
258
258
  * @returns {boolean} true if the object contains both the modulus and the public exponent
259
259
  * properties (n and e)
@@ -267,7 +267,7 @@ class JSEncryptRSAKey extends rsa.RSAKey {
267
267
  }
268
268
  /**
269
269
  * Check if the object contains ALL the parameters of an RSA key.
270
- * @param {Object} [obj={}] - An object that may contain nine rsa key
270
+ * @param {object} [obj={}] - An object that may contain nine rsa key
271
271
  * parameters
272
272
  * @returns {boolean} true if the object contains all the parameters needed
273
273
  * @todo check for types of the parameters all the parameters but the public exponent
@@ -288,7 +288,7 @@ class JSEncryptRSAKey extends rsa.RSAKey {
288
288
  /**
289
289
  * Parse the properties of obj in the current rsa object. Obj should AT LEAST
290
290
  * include the modulus and public exponent (n, e) parameters.
291
- * @param {Object} obj - the object containing rsa parameters
291
+ * @param {object} obj - the object containing rsa parameters
292
292
  * @private
293
293
  */
294
294
  parsePropertiesFrom(obj) {
@@ -7,7 +7,7 @@ var number = require('./base/functions/number.js');
7
7
 
8
8
  /**
9
9
  * @class timex
10
- * @extends Exchange
10
+ * @augments Exchange
11
11
  */
12
12
  class timex extends timex$1 {
13
13
  describe() {
@@ -10,7 +10,7 @@ var sha256 = require('./static_dependencies/noble-hashes/sha256.js');
10
10
  // ---------------------------------------------------------------------------
11
11
  /**
12
12
  * @class tokocrypto
13
- * @extends Exchange
13
+ * @augments Exchange
14
14
  */
15
15
  class tokocrypto extends tokocrypto$1 {
16
16
  describe() {
@@ -1015,16 +1015,21 @@ class tokocrypto extends tokocrypto$1 {
1015
1015
  const data = this.safeValue(responseInner, 'data', {});
1016
1016
  return this.parseTrades(data, market, since, limit);
1017
1017
  }
1018
+ if (limit !== undefined) {
1019
+ request['limit'] = limit; // default = 500, maximum = 1000
1020
+ }
1018
1021
  const defaultMethod = 'binanceGetTrades';
1019
1022
  const method = this.safeString(this.options, 'fetchTradesMethod', defaultMethod);
1023
+ let response = undefined;
1020
1024
  if ((method === 'binanceGetAggTrades') && (since !== undefined)) {
1021
1025
  request['startTime'] = since;
1022
1026
  // https://github.com/ccxt/ccxt/issues/6400
1023
1027
  // https://github.com/binance-exchange/binance-official-api-docs/blob/master/rest-api.md#compressedaggregate-trades-list
1024
1028
  request['endTime'] = this.sum(since, 3600000);
1029
+ response = await this.binanceGetAggTrades(this.extend(request, params));
1025
1030
  }
1026
- if (limit !== undefined) {
1027
- request['limit'] = limit; // default = 500, maximum = 1000
1031
+ else {
1032
+ response = await this.binanceGetTrades(this.extend(request, params));
1028
1033
  }
1029
1034
  //
1030
1035
  // Caveats:
@@ -1035,7 +1040,6 @@ class tokocrypto extends tokocrypto$1 {
1035
1040
  // - 'tradeId' accepted and returned by this method is "aggregate" trade id
1036
1041
  // which is different from actual trade id
1037
1042
  // - setting both fromId and time window results in error
1038
- const response = await this[method](this.extend(request, params));
1039
1043
  //
1040
1044
  // aggregate trades
1041
1045
  //