ccxt 4.0.74 → 4.0.76

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 (299) hide show
  1. package/README.md +4 -4
  2. package/dist/ccxt.browser.js +2635 -2383
  3. package/dist/ccxt.browser.min.js +3 -3
  4. package/dist/cjs/ccxt.js +1 -1
  5. package/dist/cjs/src/ace.js +11 -11
  6. package/dist/cjs/src/alpaca.js +7 -7
  7. package/dist/cjs/src/ascendex.js +25 -25
  8. package/dist/cjs/src/base/Exchange.js +4 -4
  9. package/dist/cjs/src/bigone.js +19 -19
  10. package/dist/cjs/src/binance.js +56 -56
  11. package/dist/cjs/src/bingx.js +85 -40
  12. package/dist/cjs/src/bit2c.js +12 -12
  13. package/dist/cjs/src/bitbank.js +13 -13
  14. package/dist/cjs/src/bitbns.js +14 -14
  15. package/dist/cjs/src/bitfinex.js +21 -21
  16. package/dist/cjs/src/bitfinex2.js +29 -29
  17. package/dist/cjs/src/bitflyer.js +17 -17
  18. package/dist/cjs/src/bitforex.js +11 -11
  19. package/dist/cjs/src/bitget.js +39 -39
  20. package/dist/cjs/src/bithumb.js +11 -11
  21. package/dist/cjs/src/bitmart.js +44 -31
  22. package/dist/cjs/src/bitmex.js +24 -24
  23. package/dist/cjs/src/bitopro.js +21 -21
  24. package/dist/cjs/src/bitpanda.js +21 -21
  25. package/dist/cjs/src/bitrue.js +18 -18
  26. package/dist/cjs/src/bitso.js +21 -21
  27. package/dist/cjs/src/bitstamp.js +21 -21
  28. package/dist/cjs/src/bitstamp1.js +8 -8
  29. package/dist/cjs/src/bittrex.js +27 -27
  30. package/dist/cjs/src/bitvavo.js +19 -19
  31. package/dist/cjs/src/bkex.js +21 -21
  32. package/dist/cjs/src/bl3p.js +8 -8
  33. package/dist/cjs/src/blockchaincom.js +21 -21
  34. package/dist/cjs/src/btcalpha.js +15 -15
  35. package/dist/cjs/src/btcbox.js +10 -10
  36. package/dist/cjs/src/btcmarkets.js +17 -17
  37. package/dist/cjs/src/btctradeua.js +8 -8
  38. package/dist/cjs/src/btcturk.js +11 -11
  39. package/dist/cjs/src/bybit.js +153 -121
  40. package/dist/cjs/src/cex.js +14 -14
  41. package/dist/cjs/src/coinbase.js +23 -23
  42. package/dist/cjs/src/coinbasepro.js +24 -24
  43. package/dist/cjs/src/coincheck.js +12 -12
  44. package/dist/cjs/src/coinex.js +87 -41
  45. package/dist/cjs/src/coinfalcon.js +16 -16
  46. package/dist/cjs/src/coinmate.js +14 -14
  47. package/dist/cjs/src/coinone.js +12 -12
  48. package/dist/cjs/src/coinsph.js +27 -22
  49. package/dist/cjs/src/coinspot.js +8 -8
  50. package/dist/cjs/src/cryptocom.js +29 -29
  51. package/dist/cjs/src/currencycom.js +20 -20
  52. package/dist/cjs/src/delta.js +25 -25
  53. package/dist/cjs/src/deribit.js +30 -30
  54. package/dist/cjs/src/digifinex.js +31 -31
  55. package/dist/cjs/src/exmo.js +26 -26
  56. package/dist/cjs/src/gate.js +38 -38
  57. package/dist/cjs/src/gemini.js +17 -17
  58. package/dist/cjs/src/hitbtc.js +34 -34
  59. package/dist/cjs/src/hollaex.js +23 -23
  60. package/dist/cjs/src/huobi.js +45 -45
  61. package/dist/cjs/src/huobijp.js +20 -20
  62. package/dist/cjs/src/idex.js +19 -19
  63. package/dist/cjs/src/independentreserve.js +12 -12
  64. package/dist/cjs/src/indodax.js +14 -14
  65. package/dist/cjs/src/kraken.js +27 -27
  66. package/dist/cjs/src/krakenfutures.js +12 -12
  67. package/dist/cjs/src/kucoin.js +33 -33
  68. package/dist/cjs/src/kucoinfutures.js +24 -24
  69. package/dist/cjs/src/kuna.js +12 -12
  70. package/dist/cjs/src/latoken.js +17 -17
  71. package/dist/cjs/src/lbank.js +12 -12
  72. package/dist/cjs/src/lbank2.js +23 -23
  73. package/dist/cjs/src/luno.js +16 -16
  74. package/dist/cjs/src/lykke.js +16 -16
  75. package/dist/cjs/src/mercado.js +12 -12
  76. package/dist/cjs/src/mexc.js +44 -42
  77. package/dist/cjs/src/ndax.js +20 -20
  78. package/dist/cjs/src/novadax.js +20 -20
  79. package/dist/cjs/src/oceanex.js +16 -16
  80. package/dist/cjs/src/okcoin.js +21 -21
  81. package/dist/cjs/src/okx.js +52 -52
  82. package/dist/cjs/src/paymium.js +11 -11
  83. package/dist/cjs/src/phemex.js +26 -26
  84. package/dist/cjs/src/poloniex.js +237 -136
  85. package/dist/cjs/src/poloniexfutures.js +18 -18
  86. package/dist/cjs/src/pro/alpaca.js +5 -5
  87. package/dist/cjs/src/pro/ascendex.js +4 -4
  88. package/dist/cjs/src/pro/binance.js +16 -16
  89. package/dist/cjs/src/pro/bitfinex.js +4 -4
  90. package/dist/cjs/src/pro/bitfinex2.js +6 -6
  91. package/dist/cjs/src/pro/bitget.js +6 -6
  92. package/dist/cjs/src/pro/bitmart.js +4 -4
  93. package/dist/cjs/src/pro/bitmex.js +6 -6
  94. package/dist/cjs/src/pro/bitopro.js +4 -4
  95. package/dist/cjs/src/pro/bitpanda.js +6 -6
  96. package/dist/cjs/src/pro/bitrue.js +2 -2
  97. package/dist/cjs/src/pro/bitstamp.js +3 -3
  98. package/dist/cjs/src/pro/bittrex.js +6 -6
  99. package/dist/cjs/src/pro/bitvavo.js +5 -5
  100. package/dist/cjs/src/pro/blockchaincom.js +5 -5
  101. package/dist/cjs/src/pro/bybit.js +6 -6
  102. package/dist/cjs/src/pro/cex.js +7 -7
  103. package/dist/cjs/src/pro/coinbase.js +5 -5
  104. package/dist/cjs/src/pro/coinbasepro.js +6 -6
  105. package/dist/cjs/src/pro/coinex.js +5 -5
  106. package/dist/cjs/src/pro/cryptocom.js +10 -10
  107. package/dist/cjs/src/pro/currencycom.js +4 -4
  108. package/dist/cjs/src/pro/deribit.js +6 -6
  109. package/dist/cjs/src/pro/exmo.js +5 -5
  110. package/dist/cjs/src/pro/gate.js +7 -7
  111. package/dist/cjs/src/pro/gemini.js +3 -3
  112. package/dist/cjs/src/pro/hitbtc.js +3 -3
  113. package/dist/cjs/src/pro/hollaex.js +5 -5
  114. package/dist/cjs/src/pro/huobi.js +6 -6
  115. package/dist/cjs/src/pro/huobijp.js +3 -3
  116. package/dist/cjs/src/pro/idex.js +4 -4
  117. package/dist/cjs/src/pro/independentreserve.js +2 -2
  118. package/dist/cjs/src/pro/kraken.js +12 -12
  119. package/dist/cjs/src/pro/krakenfutures.js +7 -7
  120. package/dist/cjs/src/pro/kucoin.js +6 -6
  121. package/dist/cjs/src/pro/kucoinfutures.js +6 -5
  122. package/dist/cjs/src/pro/luno.js +2 -2
  123. package/dist/cjs/src/pro/mexc.js +6 -6
  124. package/dist/cjs/src/pro/ndax.js +3 -3
  125. package/dist/cjs/src/pro/okcoin.js +5 -5
  126. package/dist/cjs/src/pro/okx.js +19 -18
  127. package/dist/cjs/src/pro/phemex.js +6 -6
  128. package/dist/cjs/src/pro/poloniex.js +7 -7
  129. package/dist/cjs/src/pro/poloniexfutures.js +5 -5
  130. package/dist/cjs/src/pro/probit.js +6 -6
  131. package/dist/cjs/src/pro/upbit.js +3 -3
  132. package/dist/cjs/src/pro/wazirx.js +6 -6
  133. package/dist/cjs/src/pro/whitebit.js +6 -6
  134. package/dist/cjs/src/probit.js +19 -19
  135. package/dist/cjs/src/tidex.js +13 -13
  136. package/dist/cjs/src/timex.js +16 -16
  137. package/dist/cjs/src/tokocrypto.js +18 -18
  138. package/dist/cjs/src/upbit.js +20 -20
  139. package/dist/cjs/src/wavesexchange.js +16 -16
  140. package/dist/cjs/src/wazirx.js +12 -12
  141. package/dist/cjs/src/whitebit.js +24 -24
  142. package/dist/cjs/src/woo.js +30 -24
  143. package/dist/cjs/src/yobit.js +16 -16
  144. package/dist/cjs/src/zaif.js +10 -10
  145. package/dist/cjs/src/zonda.js +15 -15
  146. package/js/ccxt.d.ts +1 -1
  147. package/js/ccxt.js +1 -1
  148. package/js/src/abstract/bingx.d.ts +2 -0
  149. package/js/src/abstract/bitmart.d.ts +13 -0
  150. package/js/src/abstract/bybit.d.ts +33 -21
  151. package/js/src/abstract/coinsph.d.ts +5 -0
  152. package/js/src/abstract/woo.d.ts +6 -0
  153. package/js/src/ace.js +11 -11
  154. package/js/src/alpaca.js +7 -7
  155. package/js/src/ascendex.js +25 -25
  156. package/js/src/base/Exchange.js +4 -4
  157. package/js/src/bigone.js +19 -19
  158. package/js/src/binance.js +56 -56
  159. package/js/src/bingx.d.ts +1 -0
  160. package/js/src/bingx.js +85 -40
  161. package/js/src/bit2c.js +12 -12
  162. package/js/src/bitbank.js +13 -13
  163. package/js/src/bitbns.js +14 -14
  164. package/js/src/bitfinex.js +21 -21
  165. package/js/src/bitfinex2.js +29 -29
  166. package/js/src/bitflyer.js +17 -17
  167. package/js/src/bitforex.js +11 -11
  168. package/js/src/bitget.js +39 -39
  169. package/js/src/bithumb.js +11 -11
  170. package/js/src/bitmart.js +44 -31
  171. package/js/src/bitmex.js +24 -24
  172. package/js/src/bitopro.js +21 -21
  173. package/js/src/bitpanda.js +21 -21
  174. package/js/src/bitrue.js +18 -18
  175. package/js/src/bitso.js +21 -21
  176. package/js/src/bitstamp.js +21 -21
  177. package/js/src/bitstamp1.js +8 -8
  178. package/js/src/bittrex.js +27 -27
  179. package/js/src/bitvavo.js +19 -19
  180. package/js/src/bkex.js +21 -21
  181. package/js/src/bl3p.js +8 -8
  182. package/js/src/blockchaincom.js +21 -21
  183. package/js/src/btcalpha.js +15 -15
  184. package/js/src/btcbox.js +10 -10
  185. package/js/src/btcmarkets.js +17 -17
  186. package/js/src/btctradeua.js +8 -8
  187. package/js/src/btcturk.js +11 -11
  188. package/js/src/bybit.js +153 -121
  189. package/js/src/cex.js +14 -14
  190. package/js/src/coinbase.js +23 -23
  191. package/js/src/coinbasepro.js +24 -24
  192. package/js/src/coincheck.js +12 -12
  193. package/js/src/coinex.d.ts +1 -0
  194. package/js/src/coinex.js +87 -41
  195. package/js/src/coinfalcon.js +16 -16
  196. package/js/src/coinmate.js +14 -14
  197. package/js/src/coinone.js +12 -12
  198. package/js/src/coinsph.js +27 -22
  199. package/js/src/coinspot.js +8 -8
  200. package/js/src/cryptocom.js +29 -29
  201. package/js/src/currencycom.js +20 -20
  202. package/js/src/delta.js +25 -25
  203. package/js/src/deribit.js +30 -30
  204. package/js/src/digifinex.js +31 -31
  205. package/js/src/exmo.js +26 -26
  206. package/js/src/gate.js +38 -38
  207. package/js/src/gemini.js +17 -17
  208. package/js/src/hitbtc.js +34 -34
  209. package/js/src/hollaex.js +23 -23
  210. package/js/src/huobi.js +45 -45
  211. package/js/src/huobijp.js +20 -20
  212. package/js/src/idex.js +19 -19
  213. package/js/src/independentreserve.js +12 -12
  214. package/js/src/indodax.js +14 -14
  215. package/js/src/kraken.js +27 -27
  216. package/js/src/krakenfutures.js +12 -12
  217. package/js/src/kucoin.js +33 -33
  218. package/js/src/kucoinfutures.js +24 -24
  219. package/js/src/kuna.js +12 -12
  220. package/js/src/latoken.js +17 -17
  221. package/js/src/lbank.js +12 -12
  222. package/js/src/lbank2.js +23 -23
  223. package/js/src/luno.js +16 -16
  224. package/js/src/lykke.js +16 -16
  225. package/js/src/mercado.js +12 -12
  226. package/js/src/mexc.js +45 -43
  227. package/js/src/ndax.js +20 -20
  228. package/js/src/novadax.js +20 -20
  229. package/js/src/oceanex.js +16 -16
  230. package/js/src/okcoin.js +21 -21
  231. package/js/src/okx.js +52 -52
  232. package/js/src/paymium.js +11 -11
  233. package/js/src/phemex.js +26 -26
  234. package/js/src/poloniex.d.ts +1 -1
  235. package/js/src/poloniex.js +237 -136
  236. package/js/src/poloniexfutures.js +18 -18
  237. package/js/src/pro/alpaca.js +5 -5
  238. package/js/src/pro/ascendex.js +4 -4
  239. package/js/src/pro/binance.js +16 -16
  240. package/js/src/pro/bitfinex.js +4 -4
  241. package/js/src/pro/bitfinex2.js +6 -6
  242. package/js/src/pro/bitget.js +6 -6
  243. package/js/src/pro/bitmart.js +4 -4
  244. package/js/src/pro/bitmex.js +6 -6
  245. package/js/src/pro/bitopro.js +4 -4
  246. package/js/src/pro/bitpanda.js +6 -6
  247. package/js/src/pro/bitrue.js +2 -2
  248. package/js/src/pro/bitstamp.js +3 -3
  249. package/js/src/pro/bittrex.js +6 -6
  250. package/js/src/pro/bitvavo.js +5 -5
  251. package/js/src/pro/blockchaincom.js +5 -5
  252. package/js/src/pro/bybit.js +6 -6
  253. package/js/src/pro/cex.js +7 -7
  254. package/js/src/pro/coinbase.js +5 -5
  255. package/js/src/pro/coinbasepro.js +6 -6
  256. package/js/src/pro/coinex.js +5 -5
  257. package/js/src/pro/cryptocom.js +10 -10
  258. package/js/src/pro/currencycom.js +4 -4
  259. package/js/src/pro/deribit.js +6 -6
  260. package/js/src/pro/exmo.js +5 -5
  261. package/js/src/pro/gate.js +7 -7
  262. package/js/src/pro/gemini.js +3 -3
  263. package/js/src/pro/hitbtc.js +3 -3
  264. package/js/src/pro/hollaex.js +5 -5
  265. package/js/src/pro/huobi.js +6 -6
  266. package/js/src/pro/huobijp.js +3 -3
  267. package/js/src/pro/idex.js +4 -4
  268. package/js/src/pro/independentreserve.js +2 -2
  269. package/js/src/pro/kraken.js +12 -12
  270. package/js/src/pro/krakenfutures.js +7 -7
  271. package/js/src/pro/kucoin.js +6 -6
  272. package/js/src/pro/kucoinfutures.js +6 -5
  273. package/js/src/pro/luno.js +2 -2
  274. package/js/src/pro/mexc.js +6 -6
  275. package/js/src/pro/ndax.js +3 -3
  276. package/js/src/pro/okcoin.js +5 -5
  277. package/js/src/pro/okx.d.ts +1 -1
  278. package/js/src/pro/okx.js +19 -18
  279. package/js/src/pro/phemex.js +6 -6
  280. package/js/src/pro/poloniex.js +7 -7
  281. package/js/src/pro/poloniexfutures.js +5 -5
  282. package/js/src/pro/probit.js +6 -6
  283. package/js/src/pro/upbit.js +3 -3
  284. package/js/src/pro/wazirx.js +6 -6
  285. package/js/src/pro/whitebit.js +6 -6
  286. package/js/src/probit.js +19 -19
  287. package/js/src/tidex.js +13 -13
  288. package/js/src/timex.js +16 -16
  289. package/js/src/tokocrypto.js +18 -18
  290. package/js/src/upbit.js +20 -20
  291. package/js/src/wavesexchange.js +16 -16
  292. package/js/src/wazirx.js +12 -12
  293. package/js/src/whitebit.js +24 -24
  294. package/js/src/woo.js +30 -24
  295. package/js/src/yobit.js +16 -16
  296. package/js/src/zaif.js +10 -10
  297. package/js/src/zonda.js +15 -15
  298. package/package.json +1 -1
  299. package/skip-tests.json +2 -0
@@ -116,9 +116,9 @@ export default class kraken extends krakenRest {
116
116
  * @param {string} type 'market' or 'limit'
117
117
  * @param {string} side 'buy' or 'sell'
118
118
  * @param {float} amount how much of currency you want to trade in units of base currency
119
- * @param {float} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
119
+ * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
120
120
  * @param {object} [params] extra parameters specific to the kraken api endpoint
121
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
121
+ * @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
122
122
  */
123
123
  await this.loadMarkets();
124
124
  const token = await this.authenticate();
@@ -173,9 +173,9 @@ export default class kraken extends krakenRest {
173
173
  * @param {string} type 'market' or 'limit'
174
174
  * @param {string} side 'buy' or 'sell'
175
175
  * @param {float} amount how much of the currency you want to trade in units of the base currency
176
- * @param {float} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
176
+ * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
177
177
  * @param {object} [params] extra parameters specific to the kraken api endpoint
178
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
178
+ * @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
179
179
  */
180
180
  await this.loadMarkets();
181
181
  const token = await this.authenticate();
@@ -203,7 +203,7 @@ export default class kraken extends krakenRest {
203
203
  * @param {string[]} ids order ids
204
204
  * @param {string} symbol unified market symbol, default is undefined
205
205
  * @param {object} [params] extra parameters specific to the kraken api endpoint
206
- * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
206
+ * @returns {object} an list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
207
207
  */
208
208
  await this.loadMarkets();
209
209
  const token = await this.authenticate();
@@ -227,7 +227,7 @@ export default class kraken extends krakenRest {
227
227
  * @param {string} id order id
228
228
  * @param {string} symbol unified symbol of the market the order was made in
229
229
  * @param {object} [params] extra parameters specific to the kraken api endpoint
230
- * @returns {object} An [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
230
+ * @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
231
231
  */
232
232
  await this.loadMarkets();
233
233
  const token = await this.authenticate();
@@ -264,7 +264,7 @@ export default class kraken extends krakenRest {
264
264
  * @description cancel all open orders
265
265
  * @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
266
266
  * @param {object} [params] extra parameters specific to the kraken api endpoint
267
- * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
267
+ * @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
268
268
  */
269
269
  if (symbol !== undefined) {
270
270
  throw new NotSupported(this.id + ' cancelAllOrdersWs () does not support cancelling orders in a specific market.');
@@ -469,7 +469,7 @@ export default class kraken extends krakenRest {
469
469
  * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
470
470
  * @param {string} symbol unified symbol of the market to fetch the ticker for
471
471
  * @param {object} [params] extra parameters specific to the kraken api endpoint
472
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
472
+ * @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
473
473
  */
474
474
  return await this.watchPublic('ticker', symbol, params);
475
475
  }
@@ -482,7 +482,7 @@ export default class kraken extends krakenRest {
482
482
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
483
483
  * @param {int} [limit] the maximum amount of trades to fetch
484
484
  * @param {object} [params] extra parameters specific to the kraken api endpoint
485
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades}
485
+ * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
486
486
  */
487
487
  await this.loadMarkets();
488
488
  symbol = this.symbol(symbol);
@@ -501,7 +501,7 @@ export default class kraken extends krakenRest {
501
501
  * @param {string} symbol unified symbol of the market to fetch the order book for
502
502
  * @param {int} [limit] the maximum amount of order book entries to return
503
503
  * @param {object} [params] extra parameters specific to the kraken api endpoint
504
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
504
+ * @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
505
505
  */
506
506
  const name = 'book';
507
507
  const request = {};
@@ -833,7 +833,7 @@ export default class kraken extends krakenRest {
833
833
  * @param {int} [since] the earliest time in ms to fetch trades for
834
834
  * @param {int} [limit] the maximum number of trade structures to retrieve
835
835
  * @param {object} [params] extra parameters specific to the kraken api endpoint
836
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure
836
+ * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure
837
837
  */
838
838
  return await this.watchPrivate('ownTrades', symbol, since, limit, params);
839
839
  }
@@ -995,7 +995,7 @@ export default class kraken extends krakenRest {
995
995
  * @param {int} [since] the earliest time in ms to fetch orders for
996
996
  * @param {int} [limit] the maximum number of orde structures to retrieve
997
997
  * @param {object} [params] extra parameters specific to the kraken api endpoint
998
- * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
998
+ * @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
999
999
  */
1000
1000
  return await this.watchPrivate('openOrders', symbol, since, limit, params);
1001
1001
  }
@@ -145,7 +145,7 @@ export default class krakenfutures extends krakenfuturesRest {
145
145
  * @see https://docs.futures.kraken.com/#websocket-api-public-feeds-ticker
146
146
  * @param {string} symbol unified symbol of the market to fetch the ticker for
147
147
  * @param {object} [params] extra parameters specific to the krakenfutures api endpoint
148
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure}
148
+ * @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
149
149
  */
150
150
  const options = this.safeValue(this.options, 'watchTicker');
151
151
  const method = this.safeString(options, 'method', 'ticker'); // or ticker_lite
@@ -161,7 +161,7 @@ export default class krakenfutures extends krakenfuturesRest {
161
161
  * @see https://docs.futures.kraken.com/#websocket-api-public-feeds-ticker-lite
162
162
  * @param {string} symbol unified symbol of the market to fetch the ticker for
163
163
  * @param {object} [params] extra parameters specific to the krakenfutures api endpoint
164
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure}
164
+ * @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
165
165
  */
166
166
  const method = this.safeString(this.options, 'watchTickerMethod', 'ticker'); // or ticker_lite
167
167
  const name = this.safeString2(params, 'method', 'watchTickerMethod', method);
@@ -178,7 +178,7 @@ export default class krakenfutures extends krakenfuturesRest {
178
178
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
179
179
  * @param {int} [limit] the maximum amount of trades to fetch
180
180
  * @param {object} [params] extra parameters specific to the krakenfutures api endpoint
181
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades}
181
+ * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
182
182
  */
183
183
  await this.loadMarkets();
184
184
  const name = 'trade';
@@ -197,7 +197,7 @@ export default class krakenfutures extends krakenfuturesRest {
197
197
  * @param {string} symbol unified symbol of the market to fetch the order book for
198
198
  * @param {int} [limit] not used by krakenfutures watchOrderBook
199
199
  * @param {object} [params] extra parameters specific to the krakenfutures api endpoint
200
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols
200
+ * @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
201
201
  */
202
202
  const orderbook = await this.subscribePublic('book', [symbol], params);
203
203
  return orderbook.limit();
@@ -213,7 +213,7 @@ export default class krakenfutures extends krakenfuturesRest {
213
213
  * @param {int} [since] not used by krakenfutures watchOrders
214
214
  * @param {int} [limit] not used by krakenfutures watchOrders
215
215
  * @param {object} [params] extra parameters specific to the krakenfutures api endpoint
216
- * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
216
+ * @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
217
217
  */
218
218
  await this.loadMarkets();
219
219
  const name = 'open_orders';
@@ -238,7 +238,7 @@ export default class krakenfutures extends krakenfuturesRest {
238
238
  * @param {int} [since] the earliest time in ms to fetch orders for
239
239
  * @param {int} [limit] the maximum number of orde structures to retrieve
240
240
  * @param {object} [params] extra parameters specific to the kucoin api endpoint
241
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
241
+ * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
242
242
  */
243
243
  await this.loadMarkets();
244
244
  const name = 'fills';
@@ -264,7 +264,7 @@ export default class krakenfutures extends krakenfuturesRest {
264
264
  * @param {int} [limit] not used by krakenfutures watchBalance
265
265
  * @param {object} [params] extra parameters specific to the krakenfutures api endpoint
266
266
  * @param {string} [params.account] can be either 'futures' or 'flex_futures'
267
- * @returns {object[]} a list of [balance structures]{@link https://docs.ccxt.com/#/?id=balance-structure}
267
+ * @returns {object[]} a list of [balance structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
268
268
  */
269
269
  await this.loadMarkets();
270
270
  const name = 'balances';
@@ -122,7 +122,7 @@ export default class kucoin extends kucoinRest {
122
122
  * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
123
123
  * @param {string} symbol unified symbol of the market to fetch the ticker for
124
124
  * @param {object} [params] extra parameters specific to the kucoin api endpoint
125
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
125
+ * @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
126
126
  */
127
127
  await this.loadMarkets();
128
128
  const market = this.market(symbol);
@@ -280,7 +280,7 @@ export default class kucoin extends kucoinRest {
280
280
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
281
281
  * @param {int} [limit] the maximum amount of trades to fetch
282
282
  * @param {object} [params] extra parameters specific to the kucoin api endpoint
283
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades}
283
+ * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
284
284
  */
285
285
  await this.loadMarkets();
286
286
  const url = await this.negotiate(false);
@@ -335,7 +335,7 @@ export default class kucoin extends kucoinRest {
335
335
  * @param {string} symbol unified symbol of the market to fetch the order book for
336
336
  * @param {int} [limit] the maximum amount of order book entries to return
337
337
  * @param {object} [params] extra parameters specific to the kucoin api endpoint
338
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
338
+ * @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
339
339
  */
340
340
  //
341
341
  // https://docs.kucoin.com/#level-2-market-data
@@ -499,7 +499,7 @@ export default class kucoin extends kucoinRest {
499
499
  * @param {int} [since] the earliest time in ms to fetch orders for
500
500
  * @param {int} [limit] the maximum number of orde structures to retrieve
501
501
  * @param {object} [params] extra parameters specific to the kucoin api endpoint
502
- * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
502
+ * @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
503
503
  */
504
504
  await this.loadMarkets();
505
505
  const url = await this.negotiate(true);
@@ -622,7 +622,7 @@ export default class kucoin extends kucoinRest {
622
622
  * @param {int} [since] the earliest time in ms to fetch trades for
623
623
  * @param {int} [limit] the maximum number of trade structures to retrieve
624
624
  * @param {object} [params] extra parameters specific to the kucoin api endpoint
625
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure
625
+ * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure
626
626
  */
627
627
  await this.loadMarkets();
628
628
  const url = await this.negotiate(true);
@@ -712,7 +712,7 @@ export default class kucoin extends kucoinRest {
712
712
  * @name kucoin#watchBalance
713
713
  * @description watch balance and get the amount of funds available for trading or funds locked in orders
714
714
  * @param {object} [params] extra parameters specific to the kucoin api endpoint
715
- * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure}
715
+ * @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
716
716
  */
717
717
  await this.loadMarkets();
718
718
  const url = await this.negotiate(true);
@@ -138,7 +138,7 @@ export default class kucoinfutures extends kucoinfuturesRest {
138
138
  * @see https://docs.kucoin.com/futures/#get-real-time-symbol-ticker-v2
139
139
  * @param {string} symbol unified symbol of the market to fetch the ticker for
140
140
  * @param {object} [params] extra parameters specific to the kucoinfutures api endpoint
141
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
141
+ * @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
142
142
  */
143
143
  await this.loadMarkets();
144
144
  const market = this.market(symbol);
@@ -188,7 +188,7 @@ export default class kucoinfutures extends kucoinfuturesRest {
188
188
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
189
189
  * @param {int} [limit] the maximum amount of trades to fetch
190
190
  * @param {object} [params] extra parameters specific to the kucoinfutures api endpoint
191
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades}
191
+ * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
192
192
  */
193
193
  await this.loadMarkets();
194
194
  const url = await this.negotiate(false);
@@ -252,7 +252,7 @@ export default class kucoinfutures extends kucoinfuturesRest {
252
252
  * @param {string} symbol unified symbol of the market to fetch the order book for
253
253
  * @param {int} [limit] the maximum amount of order book entries to return
254
254
  * @param {object} [params] extra parameters specific to the kucoinfutures api endpoint
255
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
255
+ * @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
256
256
  */
257
257
  if (limit !== undefined) {
258
258
  if ((limit !== 20) && (limit !== 100)) {
@@ -406,7 +406,7 @@ export default class kucoinfutures extends kucoinfuturesRest {
406
406
  * @param {int} [since] the earliest time in ms to fetch orders for
407
407
  * @param {int} [limit] the maximum number of orde structures to retrieve
408
408
  * @param {object} [params] extra parameters specific to the kucoinfutures api endpoint
409
- * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
409
+ * @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
410
410
  */
411
411
  await this.loadMarkets();
412
412
  const url = await this.negotiate(true);
@@ -528,8 +528,9 @@ export default class kucoinfutures extends kucoinfuturesRest {
528
528
  * @description watch balance and get the amount of funds available for trading or funds locked in orders
529
529
  * @see https://docs.kucoin.com/futures/#account-balance-events
530
530
  * @param {object} [params] extra parameters specific to the kucoinfutures api endpoint
531
- * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure}
531
+ * @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
532
532
  */
533
+ await this.loadMarkets();
533
534
  const url = await this.negotiate(true);
534
535
  const topic = '/contractAccount/wallet';
535
536
  const request = {
@@ -43,7 +43,7 @@ export default class luno extends lunoRest {
43
43
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
44
44
  * @param {int} [limit] the maximum amount of trades to fetch
45
45
  * @param {object} [params] extra parameters specific to the luno api endpoint
46
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades}
46
+ * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
47
47
  */
48
48
  await this.checkRequiredCredentials();
49
49
  await this.loadMarkets();
@@ -140,7 +140,7 @@ export default class luno extends lunoRest {
140
140
  * @param {int} [limit] the maximum amount of order book entries to return
141
141
  * @param {objectConstructor} [params] extra parameters specific to the luno api endpoint
142
142
  * @param {string} [params.type] accepts l2 or l3 for level 2 or level 3 order book
143
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
143
+ * @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
144
144
  */
145
145
  await this.checkRequiredCredentials();
146
146
  await this.loadMarkets();
@@ -67,7 +67,7 @@ export default class mexc extends mexcRest {
67
67
  * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
68
68
  * @param {string} symbol unified symbol of the market to fetch the ticker for
69
69
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
70
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/en/latest/manual.html#ticker-structure}
70
+ * @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
71
71
  */
72
72
  await this.loadMarkets();
73
73
  const market = this.market(symbol);
@@ -348,7 +348,7 @@ export default class mexc extends mexcRest {
348
348
  * @param {string} symbol unified symbol of the market to fetch the order book for
349
349
  * @param {int} [limit] the maximum amount of order book entries to return
350
350
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
351
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols
351
+ * @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
352
352
  */
353
353
  await this.loadMarkets();
354
354
  const market = this.market(symbol);
@@ -516,7 +516,7 @@ export default class mexc extends mexcRest {
516
516
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
517
517
  * @param {int} [limit] the maximum amount of trades to fetch
518
518
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
519
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades}
519
+ * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
520
520
  */
521
521
  await this.loadMarkets();
522
522
  const market = this.market(symbol);
@@ -605,7 +605,7 @@ export default class mexc extends mexcRest {
605
605
  * @param {int} [since] the earliest time in ms to fetch trades for
606
606
  * @param {int} [limit] the maximum number of trade structures to retrieve
607
607
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
608
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html#trade-structure
608
+ * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure
609
609
  */
610
610
  await this.loadMarkets();
611
611
  let messageHash = 'myTrades';
@@ -734,7 +734,7 @@ export default class mexc extends mexcRest {
734
734
  * @param {int} [limit] the maximum number of orde structures to retrieve
735
735
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
736
736
  * @params {string|undefined} params.type the type of orders to retrieve, can be 'spot' or 'margin'
737
- * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
737
+ * @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
738
738
  */
739
739
  await this.loadMarkets();
740
740
  params = this.omit(params, 'type');
@@ -981,7 +981,7 @@ export default class mexc extends mexcRest {
981
981
  * @see https://mxcdevelop.github.io/apidocs/spot_v3_en/#spot-account-upadte
982
982
  * @description watch balance and get the amount of funds available for trading or funds locked in orders
983
983
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
984
- * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure}
984
+ * @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
985
985
  */
986
986
  await this.loadMarkets();
987
987
  let type = undefined;
@@ -45,7 +45,7 @@ export default class ndax extends ndaxRest {
45
45
  * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
46
46
  * @param {string} symbol unified symbol of the market to fetch the ticker for
47
47
  * @param {object} [params] extra parameters specific to the ndax api endpoint
48
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
48
+ * @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
49
49
  */
50
50
  const omsId = this.safeInteger(this.options, 'omsId', 1);
51
51
  await this.loadMarkets();
@@ -112,7 +112,7 @@ export default class ndax extends ndaxRest {
112
112
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
113
113
  * @param {int} [limit] the maximum amount of trades to fetch
114
114
  * @param {object} [params] extra parameters specific to the ndax api endpoint
115
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades}
115
+ * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
116
116
  */
117
117
  const omsId = this.safeInteger(this.options, 'omsId', 1);
118
118
  await this.loadMarkets();
@@ -324,7 +324,7 @@ export default class ndax extends ndaxRest {
324
324
  * @param {string} symbol unified symbol of the market to fetch the order book for
325
325
  * @param {int} [limit] the maximum amount of order book entries to return
326
326
  * @param {object} [params] extra parameters specific to the ndax api endpoint
327
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
327
+ * @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
328
328
  */
329
329
  const omsId = this.safeInteger(this.options, 'omsId', 1);
330
330
  await this.loadMarkets();
@@ -74,7 +74,7 @@ export default class okcoin extends okcoinRest {
74
74
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
75
75
  * @param {int} [limit] the maximum amount of trades to fetch
76
76
  * @param {object} [params] extra parameters specific to the okcoin api endpoint
77
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades}
77
+ * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
78
78
  */
79
79
  await this.loadMarkets();
80
80
  symbol = this.symbol(symbol);
@@ -93,7 +93,7 @@ export default class okcoin extends okcoinRest {
93
93
  * @param {int} [since] the earliest time in ms to fetch orders for
94
94
  * @param {int} [limit] the maximum number of orde structures to retrieve
95
95
  * @param {object} [params] extra parameters specific to the okcoin api endpoint
96
- * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
96
+ * @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
97
97
  */
98
98
  await this.loadMarkets();
99
99
  await this.authenticate();
@@ -177,7 +177,7 @@ export default class okcoin extends okcoinRest {
177
177
  * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
178
178
  * @param {string} symbol unified symbol of the market to fetch the ticker for
179
179
  * @param {object} [params] extra parameters specific to the okcoin api endpoint
180
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
180
+ * @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
181
181
  */
182
182
  return await this.subscribe('ticker', symbol, params);
183
183
  }
@@ -325,7 +325,7 @@ export default class okcoin extends okcoinRest {
325
325
  * @param {string} symbol unified symbol of the market to fetch the order book for
326
326
  * @param {int} [limit] the maximum amount of order book entries to return
327
327
  * @param {object} [params] extra parameters specific to the okcoin api endpoint
328
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
328
+ * @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
329
329
  */
330
330
  const options = this.safeValue(this.options, 'watchOrderBook', {});
331
331
  const depth = this.safeString(options, 'depth', 'depth_l2_tbt');
@@ -486,7 +486,7 @@ export default class okcoin extends okcoinRest {
486
486
  * @name okcoin#watchBalance
487
487
  * @description watch balance and get the amount of funds available for trading or funds locked in orders
488
488
  * @param {object} [params] extra parameters specific to the okcoin api endpoint
489
- * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure}
489
+ * @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
490
490
  */
491
491
  const defaultType = this.safeString2(this.options, 'watchBalance', 'defaultType');
492
492
  const type = this.safeString(params, 'type', defaultType);
@@ -18,7 +18,7 @@ export default class okx extends okxRest {
18
18
  handleDeltas(bookside: any, deltas: any): void;
19
19
  handleOrderBookMessage(client: Client, message: any, orderbook: any, messageHash: any): any;
20
20
  handleOrderBook(client: Client, message: any): any;
21
- authenticate(params?: {}): any;
21
+ authenticate(params?: {}): Promise<any>;
22
22
  watchBalance(params?: {}): Promise<any>;
23
23
  handleBalance(client: Client, message: any): void;
24
24
  orderToTrade(order: any, market?: any): import("../base/types.js").Trade;
package/js/src/pro/okx.js CHANGED
@@ -160,7 +160,7 @@ export default class okx extends okxRest {
160
160
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
161
161
  * @param {int} [limit] the maximum amount of trades to fetch
162
162
  * @param {object} [params] extra parameters specific to the okx api endpoint
163
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades}
163
+ * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
164
164
  */
165
165
  await this.loadMarkets();
166
166
  symbol = this.symbol(symbol);
@@ -214,7 +214,7 @@ export default class okx extends okxRest {
214
214
  * @param {string} symbol unified symbol of the market to fetch the ticker for
215
215
  * @param {object} [params] extra parameters specific to the okx api endpoint
216
216
  * @param {string} [params.channel] the channel to subscribe to, tickers by default. Can be tickers, sprd-tickers, index-tickers, block-tickers
217
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
217
+ * @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
218
218
  */
219
219
  let channel = undefined;
220
220
  [channel, params] = this.handleOptionAndParams(params, 'watchTicker', 'channel', 'tickers');
@@ -231,7 +231,7 @@ export default class okx extends okxRest {
231
231
  * @param {string[]} [symbols] unified symbol of the market to fetch the ticker for
232
232
  * @param {object} [params] extra parameters specific to the okx api endpoint
233
233
  * @param {string} [params.channel] the channel to subscribe to, tickers by default. Can be tickers, sprd-tickers, index-tickers, block-tickers
234
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
234
+ * @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
235
235
  */
236
236
  let channel = undefined;
237
237
  [channel, params] = this.handleOptionAndParams(params, 'watchTickers', 'channel', 'tickers');
@@ -362,7 +362,7 @@ export default class okx extends okxRest {
362
362
  * @param {string} symbol unified symbol of the market to fetch the order book for
363
363
  * @param {int} [limit] the maximum amount of order book entries to return
364
364
  * @param {object} [params] extra parameters specific to the okx api endpoint
365
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
365
+ * @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
366
366
  */
367
367
  const options = this.safeValue(this.options, 'watchOrderBook', {});
368
368
  //
@@ -602,15 +602,16 @@ export default class okx extends okxRest {
602
602
  }
603
603
  return message;
604
604
  }
605
- authenticate(params = {}) {
605
+ async authenticate(params = {}) {
606
606
  this.checkRequiredCredentials();
607
607
  const access = this.safeString(params, 'access', 'private');
608
608
  params = this.omit(params, ['access']);
609
609
  const url = this.getUrl('users', access);
610
610
  const messageHash = 'authenticated';
611
611
  const client = this.client(url);
612
- let future = this.safeValue(client.subscriptions, messageHash);
613
- if (future === undefined) {
612
+ const future = client.future(messageHash);
613
+ const authenticated = this.safeValue(client.subscriptions, messageHash);
614
+ if (authenticated === undefined) {
614
615
  const timestamp = this.seconds().toString();
615
616
  const method = 'GET';
616
617
  const path = '/users/self/verify';
@@ -629,8 +630,7 @@ export default class okx extends okxRest {
629
630
  ],
630
631
  };
631
632
  const message = this.extend(request, params);
632
- future = this.watch(url, messageHash, message);
633
- client.subscriptions[messageHash] = future;
633
+ this.watch(url, messageHash, message, messageHash);
634
634
  }
635
635
  return future;
636
636
  }
@@ -640,7 +640,7 @@ export default class okx extends okxRest {
640
640
  * @name okx#watchBalance
641
641
  * @description watch balance and get the amount of funds available for trading or funds locked in orders
642
642
  * @param {object} [params] extra parameters specific to the okx api endpoint
643
- * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure}
643
+ * @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
644
644
  */
645
645
  await this.loadMarkets();
646
646
  await this.authenticate();
@@ -734,7 +734,7 @@ export default class okx extends okxRest {
734
734
  * @param {int} [limit] the maximum number of trade structures to retrieve
735
735
  * @param {object} [params] extra parameters specific to the okx api endpoint
736
736
  * @param {bool} [params.stop] true if fetching trigger or conditional trades
737
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure
737
+ * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure
738
738
  */
739
739
  await this.loadMarkets();
740
740
  await this.authenticate();
@@ -776,7 +776,7 @@ export default class okx extends okxRest {
776
776
  * @param {int} [limit] the maximum number of orde structures to retrieve
777
777
  * @param {object} [params] extra parameters specific to the okx api endpoint
778
778
  * @param {bool} [params.stop] true if fetching trigger or conditional orders
779
- * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
779
+ * @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
780
780
  */
781
781
  await this.loadMarkets();
782
782
  await this.authenticate();
@@ -993,7 +993,7 @@ export default class okx extends okxRest {
993
993
  * @param {float|undefined} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
994
994
  * @param {object} [params] extra parameters specific to the okx api endpoint
995
995
  * @param {boolean} params.test test order, default false
996
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
996
+ * @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
997
997
  */
998
998
  await this.loadMarkets();
999
999
  await this.authenticate();
@@ -1062,7 +1062,7 @@ export default class okx extends okxRest {
1062
1062
  * @param {float} amount how much of the currency you want to trade in units of the base currency
1063
1063
  * @param {float|undefined} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
1064
1064
  * @param {object} [params] extra parameters specific to the okx api endpoint
1065
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
1065
+ * @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1066
1066
  */
1067
1067
  await this.loadMarkets();
1068
1068
  await this.authenticate();
@@ -1088,7 +1088,7 @@ export default class okx extends okxRest {
1088
1088
  * @param {string} symbol unified market symbol, default is undefined
1089
1089
  * @param {object} [params] extra parameters specific to the okx api endpoint
1090
1090
  * @param {string} [params.clOrdId] client order id
1091
- * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
1091
+ * @returns {object} an list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1092
1092
  */
1093
1093
  if (symbol === undefined) {
1094
1094
  throw new BadRequest(this.id + ' cancelOrderWs() requires a symbol argument');
@@ -1124,7 +1124,7 @@ export default class okx extends okxRest {
1124
1124
  * @param {string[]} ids order ids
1125
1125
  * @param {string} symbol unified market symbol, default is undefined
1126
1126
  * @param {object} [params] extra parameters specific to the okx api endpoint
1127
- * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
1127
+ * @returns {object} an list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1128
1128
  */
1129
1129
  const idsLength = ids.length;
1130
1130
  if (idsLength > 20) {
@@ -1160,7 +1160,7 @@ export default class okx extends okxRest {
1160
1160
  * @description cancel all open orders of a type. Only applicable to Option in Portfolio Margin mode, and MMP privilege is required.
1161
1161
  * @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
1162
1162
  * @param {object} [params] extra parameters specific to the okx api endpoint
1163
- * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
1163
+ * @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1164
1164
  */
1165
1165
  if (symbol === undefined) {
1166
1166
  throw new BadRequest(this.id + ' cancelAllOrdersWs() requires a symbol argument');
@@ -1213,7 +1213,8 @@ export default class okx extends okxRest {
1213
1213
  //
1214
1214
  // { event: 'login', success: true }
1215
1215
  //
1216
- client.resolve(message, 'authenticated');
1216
+ const future = this.safeValue(client.futures, 'authenticated');
1217
+ future.resolve(true);
1217
1218
  }
1218
1219
  ping(client) {
1219
1220
  // okex does not support built-in ws protocol-level ping-pong
@@ -303,7 +303,7 @@ export default class phemex extends phemexRest {
303
303
  * @description watch balance and get the amount of funds available for trading or funds locked in orders
304
304
  * @param {object} [params] extra parameters specific to the phemex api endpoint
305
305
  * @param {string} [params.settle] set to USDT to use hedged perpetual api
306
- * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure}
306
+ * @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
307
307
  */
308
308
  await this.loadMarkets();
309
309
  let type = undefined;
@@ -498,7 +498,7 @@ export default class phemex extends phemexRest {
498
498
  * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
499
499
  * @param {string} symbol unified symbol of the market to fetch the ticker for
500
500
  * @param {object} [params] extra parameters specific to the phemex api endpoint
501
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
501
+ * @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
502
502
  */
503
503
  await this.loadMarkets();
504
504
  const market = this.market(symbol);
@@ -533,7 +533,7 @@ export default class phemex extends phemexRest {
533
533
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
534
534
  * @param {int} [limit] the maximum amount of trades to fetch
535
535
  * @param {object} [params] extra parameters specific to the phemex api endpoint
536
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades}
536
+ * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
537
537
  */
538
538
  await this.loadMarkets();
539
539
  const market = this.market(symbol);
@@ -570,7 +570,7 @@ export default class phemex extends phemexRest {
570
570
  * @param {string} symbol unified symbol of the market to fetch the order book for
571
571
  * @param {int} [limit] the maximum amount of order book entries to return
572
572
  * @param {object} [params] extra parameters specific to the phemex api endpoint
573
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
573
+ * @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
574
574
  */
575
575
  await this.loadMarkets();
576
576
  const market = this.market(symbol);
@@ -728,7 +728,7 @@ export default class phemex extends phemexRest {
728
728
  * @param {int} [since] the earliest time in ms to fetch trades for
729
729
  * @param {int} [limit] the maximum number of trade structures to retrieve
730
730
  * @param {object} [params] extra parameters specific to the phemex api endpoint
731
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure
731
+ * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure
732
732
  */
733
733
  await this.loadMarkets();
734
734
  let market = undefined;
@@ -891,7 +891,7 @@ export default class phemex extends phemexRest {
891
891
  * @param {int} [since] the earliest time in ms to fetch orders for
892
892
  * @param {int} [limit] the maximum number of orde structures to retrieve
893
893
  * @param {object} [params] extra parameters specific to the phemex api endpoint
894
- * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
894
+ * @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
895
895
  */
896
896
  await this.loadMarkets();
897
897
  let messageHash = 'orders:';