ccxt 4.1.56 → 4.1.57

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 (316) hide show
  1. package/.git-templates/hooks/pre-push +2 -2
  2. package/README.md +3 -3
  3. package/build.sh +30 -18
  4. package/dist/ccxt.browser.js +3872 -3202
  5. package/dist/ccxt.browser.min.js +10 -10
  6. package/dist/cjs/ccxt.js +1 -1
  7. package/dist/cjs/src/ace.js +17 -13
  8. package/dist/cjs/src/alpaca.js +6 -6
  9. package/dist/cjs/src/ascendex.js +35 -29
  10. package/dist/cjs/src/base/Exchange.js +39 -26
  11. package/dist/cjs/src/base/Precise.js +1 -3
  12. package/dist/cjs/src/bigone.js +24 -20
  13. package/dist/cjs/src/binance.js +97 -76
  14. package/dist/cjs/src/bingx.js +63 -44
  15. package/dist/cjs/src/bit2c.js +18 -15
  16. package/dist/cjs/src/bitbank.js +16 -15
  17. package/dist/cjs/src/bitbns.js +28 -18
  18. package/dist/cjs/src/bitfinex.js +23 -21
  19. package/dist/cjs/src/bitfinex2.js +32 -28
  20. package/dist/cjs/src/bitflyer.js +28 -20
  21. package/dist/cjs/src/bitforex.js +25 -18
  22. package/dist/cjs/src/bitget.js +184 -147
  23. package/dist/cjs/src/bithumb.js +23 -16
  24. package/dist/cjs/src/bitmart.js +106 -85
  25. package/dist/cjs/src/bitmex.js +104 -64
  26. package/dist/cjs/src/bitopro.js +38 -26
  27. package/dist/cjs/src/bitpanda.js +24 -23
  28. package/dist/cjs/src/bitrue.js +33 -24
  29. package/dist/cjs/src/bitso.js +24 -23
  30. package/dist/cjs/src/bitstamp.js +24 -23
  31. package/dist/cjs/src/bittrex.js +30 -29
  32. package/dist/cjs/src/bitvavo.js +38 -30
  33. package/dist/cjs/src/bl3p.js +11 -10
  34. package/dist/cjs/src/blockchaincom.js +20 -20
  35. package/dist/cjs/src/btcalpha.js +18 -17
  36. package/dist/cjs/src/btcbox.js +13 -12
  37. package/dist/cjs/src/btcmarkets.js +20 -19
  38. package/dist/cjs/src/btcturk.js +14 -13
  39. package/dist/cjs/src/bybit.js +84 -54
  40. package/dist/cjs/src/cex.js +16 -14
  41. package/dist/cjs/src/coinbase.js +29 -27
  42. package/dist/cjs/src/coinbasepro.js +27 -25
  43. package/dist/cjs/src/coincheck.js +15 -14
  44. package/dist/cjs/src/coinex.js +100 -77
  45. package/dist/cjs/src/coinlist.js +28 -27
  46. package/dist/cjs/src/coinmate.js +20 -17
  47. package/dist/cjs/src/coinone.js +21 -16
  48. package/dist/cjs/src/coinsph.js +37 -28
  49. package/dist/cjs/src/coinspot.js +12 -11
  50. package/dist/cjs/src/cryptocom.js +40 -202
  51. package/dist/cjs/src/currencycom.js +32 -25
  52. package/dist/cjs/src/delta.js +34 -28
  53. package/dist/cjs/src/deribit.js +39 -36
  54. package/dist/cjs/src/digifinex.js +64 -44
  55. package/dist/cjs/src/exmo.js +29 -27
  56. package/dist/cjs/src/gate.js +67 -53
  57. package/dist/cjs/src/gemini.js +23 -20
  58. package/dist/cjs/src/hitbtc.js +65 -56
  59. package/dist/cjs/src/hollaex.js +30 -27
  60. package/dist/cjs/src/htx.js +132 -143
  61. package/dist/cjs/src/huobijp.js +22 -20
  62. package/dist/cjs/src/idex.js +22 -21
  63. package/dist/cjs/src/independentreserve.js +15 -14
  64. package/dist/cjs/src/indodax.js +30 -26
  65. package/dist/cjs/src/kraken.js +29 -27
  66. package/dist/cjs/src/krakenfutures.js +29 -22
  67. package/dist/cjs/src/kucoin.js +48 -43
  68. package/dist/cjs/src/kucoinfutures.js +33 -28
  69. package/dist/cjs/src/kuna.js +25 -24
  70. package/dist/cjs/src/latoken.js +24 -22
  71. package/dist/cjs/src/lbank.js +45 -30
  72. package/dist/cjs/src/luno.js +22 -19
  73. package/dist/cjs/src/lykke.js +19 -17
  74. package/dist/cjs/src/mercado.js +30 -19
  75. package/dist/cjs/src/mexc.js +60 -49
  76. package/dist/cjs/src/ndax.js +23 -22
  77. package/dist/cjs/src/novadax.js +23 -22
  78. package/dist/cjs/src/oceanex.js +22 -19
  79. package/dist/cjs/src/okcoin.js +29 -23
  80. package/dist/cjs/src/okx.js +87 -82
  81. package/dist/cjs/src/p2b.js +79 -82
  82. package/dist/cjs/src/paymium.js +10 -10
  83. package/dist/cjs/src/phemex.js +63 -40
  84. package/dist/cjs/src/poloniex.js +22 -22
  85. package/dist/cjs/src/poloniexfutures.js +23 -19
  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/bingx.js +1 -1
  90. package/dist/cjs/src/pro/bitfinex.js +4 -4
  91. package/dist/cjs/src/pro/bitfinex2.js +6 -6
  92. package/dist/cjs/src/pro/bitget.js +7 -7
  93. package/dist/cjs/src/pro/bitmart.js +7 -5
  94. package/dist/cjs/src/pro/bitmex.js +6 -6
  95. package/dist/cjs/src/pro/bitopro.js +4 -4
  96. package/dist/cjs/src/pro/bitpanda.js +6 -6
  97. package/dist/cjs/src/pro/bitrue.js +2 -2
  98. package/dist/cjs/src/pro/bitstamp.js +6 -4
  99. package/dist/cjs/src/pro/bittrex.js +6 -6
  100. package/dist/cjs/src/pro/bitvavo.js +11 -7
  101. package/dist/cjs/src/pro/blockchaincom.js +8 -8
  102. package/dist/cjs/src/pro/bybit.js +7 -7
  103. package/dist/cjs/src/pro/cex.js +13 -9
  104. package/dist/cjs/src/pro/coinbase.js +5 -5
  105. package/dist/cjs/src/pro/coinbasepro.js +11 -10
  106. package/dist/cjs/src/pro/coinex.js +7 -9
  107. package/dist/cjs/src/pro/cryptocom.js +9 -9
  108. package/dist/cjs/src/pro/currencycom.js +4 -4
  109. package/dist/cjs/src/pro/deribit.js +6 -6
  110. package/dist/cjs/src/pro/exmo.js +12 -14
  111. package/dist/cjs/src/pro/gate.js +7 -7
  112. package/dist/cjs/src/pro/gemini.js +3 -3
  113. package/dist/cjs/src/pro/hitbtc.js +263 -4
  114. package/dist/cjs/src/pro/hollaex.js +5 -5
  115. package/dist/cjs/src/pro/htx.js +6 -6
  116. package/dist/cjs/src/pro/huobijp.js +3 -3
  117. package/dist/cjs/src/pro/idex.js +4 -4
  118. package/dist/cjs/src/pro/independentreserve.js +2 -2
  119. package/dist/cjs/src/pro/kraken.js +10 -10
  120. package/dist/cjs/src/pro/krakenfutures.js +41 -17
  121. package/dist/cjs/src/pro/kucoin.js +7 -7
  122. package/dist/cjs/src/pro/kucoinfutures.js +8 -6
  123. package/dist/cjs/src/pro/luno.js +2 -2
  124. package/dist/cjs/src/pro/mexc.js +6 -6
  125. package/dist/cjs/src/pro/ndax.js +3 -3
  126. package/dist/cjs/src/pro/okcoin.js +5 -5
  127. package/dist/cjs/src/pro/okx.js +12 -12
  128. package/dist/cjs/src/pro/phemex.js +6 -6
  129. package/dist/cjs/src/pro/poloniex.js +7 -7
  130. package/dist/cjs/src/pro/poloniexfutures.js +5 -5
  131. package/dist/cjs/src/pro/probit.js +6 -6
  132. package/dist/cjs/src/pro/upbit.js +3 -3
  133. package/dist/cjs/src/pro/wazirx.js +8 -8
  134. package/dist/cjs/src/pro/whitebit.js +12 -8
  135. package/dist/cjs/src/pro/woo.js +1 -1
  136. package/dist/cjs/src/probit.js +28 -23
  137. package/dist/cjs/src/tidex.js +16 -15
  138. package/dist/cjs/src/timex.js +19 -18
  139. package/dist/cjs/src/tokocrypto.js +27 -22
  140. package/dist/cjs/src/upbit.js +19 -19
  141. package/dist/cjs/src/wavesexchange.js +22 -19
  142. package/dist/cjs/src/wazirx.js +24 -17
  143. package/dist/cjs/src/whitebit.js +33 -27
  144. package/dist/cjs/src/woo.js +44 -34
  145. package/dist/cjs/src/yobit.js +25 -20
  146. package/dist/cjs/src/zaif.js +9 -9
  147. package/dist/cjs/src/zonda.js +18 -17
  148. package/js/ccxt.d.ts +1 -1
  149. package/js/ccxt.js +1 -1
  150. package/js/src/abstract/bybit.d.ts +1 -0
  151. package/js/src/abstract/cryptocom.d.ts +0 -20
  152. package/js/src/ace.js +18 -14
  153. package/js/src/alpaca.js +6 -6
  154. package/js/src/ascendex.js +35 -29
  155. package/js/src/base/Exchange.d.ts +37 -34
  156. package/js/src/base/Exchange.js +39 -26
  157. package/js/src/base/Precise.d.ts +4 -4
  158. package/js/src/base/Precise.js +1 -3
  159. package/js/src/base/functions/type.d.ts +25 -25
  160. package/js/src/base/types.d.ts +21 -14
  161. package/js/src/bigone.js +25 -21
  162. package/js/src/binance.d.ts +2 -2
  163. package/js/src/binance.js +97 -76
  164. package/js/src/bingx.js +63 -44
  165. package/js/src/bit2c.js +19 -16
  166. package/js/src/bitbank.js +16 -15
  167. package/js/src/bitbns.js +28 -18
  168. package/js/src/bitfinex.js +23 -21
  169. package/js/src/bitfinex2.js +32 -28
  170. package/js/src/bitflyer.js +28 -20
  171. package/js/src/bitforex.js +26 -19
  172. package/js/src/bitget.d.ts +25 -3
  173. package/js/src/bitget.js +184 -147
  174. package/js/src/bithumb.js +23 -16
  175. package/js/src/bitmart.d.ts +1 -1
  176. package/js/src/bitmart.js +106 -85
  177. package/js/src/bitmex.d.ts +2 -2
  178. package/js/src/bitmex.js +104 -64
  179. package/js/src/bitopro.js +38 -26
  180. package/js/src/bitpanda.js +24 -23
  181. package/js/src/bitrue.js +33 -24
  182. package/js/src/bitso.js +24 -23
  183. package/js/src/bitstamp.d.ts +2 -2
  184. package/js/src/bitstamp.js +24 -23
  185. package/js/src/bittrex.js +30 -29
  186. package/js/src/bitvavo.js +38 -30
  187. package/js/src/bl3p.js +11 -10
  188. package/js/src/blockchaincom.js +20 -20
  189. package/js/src/btcalpha.js +18 -17
  190. package/js/src/btcbox.js +13 -12
  191. package/js/src/btcmarkets.js +20 -19
  192. package/js/src/btcturk.js +14 -13
  193. package/js/src/bybit.d.ts +1 -1
  194. package/js/src/bybit.js +84 -54
  195. package/js/src/cex.js +16 -14
  196. package/js/src/coinbase.js +29 -27
  197. package/js/src/coinbasepro.js +27 -25
  198. package/js/src/coincheck.js +15 -14
  199. package/js/src/coinex.d.ts +1 -1
  200. package/js/src/coinex.js +100 -77
  201. package/js/src/coinlist.js +28 -27
  202. package/js/src/coinmate.js +21 -18
  203. package/js/src/coinone.js +21 -16
  204. package/js/src/coinsph.js +37 -28
  205. package/js/src/coinspot.js +12 -11
  206. package/js/src/cryptocom.d.ts +0 -23
  207. package/js/src/cryptocom.js +40 -202
  208. package/js/src/currencycom.js +32 -25
  209. package/js/src/delta.js +35 -29
  210. package/js/src/deribit.js +39 -36
  211. package/js/src/digifinex.d.ts +2 -2
  212. package/js/src/digifinex.js +65 -45
  213. package/js/src/exmo.js +29 -27
  214. package/js/src/gate.d.ts +1 -1
  215. package/js/src/gate.js +67 -53
  216. package/js/src/gemini.js +23 -20
  217. package/js/src/hitbtc.d.ts +1 -0
  218. package/js/src/hitbtc.js +65 -56
  219. package/js/src/hollaex.js +30 -27
  220. package/js/src/htx.d.ts +11 -3
  221. package/js/src/htx.js +132 -143
  222. package/js/src/huobijp.js +23 -21
  223. package/js/src/idex.js +22 -21
  224. package/js/src/independentreserve.js +15 -14
  225. package/js/src/indodax.js +30 -26
  226. package/js/src/kraken.js +29 -27
  227. package/js/src/krakenfutures.js +29 -22
  228. package/js/src/kucoin.d.ts +1 -1
  229. package/js/src/kucoin.js +48 -43
  230. package/js/src/kucoinfutures.js +33 -28
  231. package/js/src/kuna.js +25 -24
  232. package/js/src/latoken.js +25 -23
  233. package/js/src/lbank.js +46 -31
  234. package/js/src/luno.js +22 -19
  235. package/js/src/lykke.js +19 -17
  236. package/js/src/mercado.js +30 -19
  237. package/js/src/mexc.d.ts +1 -1
  238. package/js/src/mexc.js +60 -49
  239. package/js/src/ndax.js +23 -22
  240. package/js/src/novadax.js +23 -22
  241. package/js/src/oceanex.js +22 -19
  242. package/js/src/okcoin.js +29 -23
  243. package/js/src/okx.d.ts +2 -2
  244. package/js/src/okx.js +87 -82
  245. package/js/src/p2b.d.ts +8 -7
  246. package/js/src/p2b.js +79 -81
  247. package/js/src/paymium.js +10 -10
  248. package/js/src/phemex.js +63 -40
  249. package/js/src/poloniex.js +22 -22
  250. package/js/src/poloniexfutures.js +23 -19
  251. package/js/src/pro/alpaca.js +5 -5
  252. package/js/src/pro/ascendex.js +4 -4
  253. package/js/src/pro/binance.js +16 -16
  254. package/js/src/pro/bingx.js +1 -1
  255. package/js/src/pro/bitfinex.js +4 -4
  256. package/js/src/pro/bitfinex2.d.ts +1 -1
  257. package/js/src/pro/bitfinex2.js +6 -6
  258. package/js/src/pro/bitget.js +7 -7
  259. package/js/src/pro/bitmart.js +7 -5
  260. package/js/src/pro/bitmex.js +6 -6
  261. package/js/src/pro/bitopro.js +4 -4
  262. package/js/src/pro/bitpanda.js +6 -6
  263. package/js/src/pro/bitrue.js +2 -2
  264. package/js/src/pro/bitstamp.js +7 -5
  265. package/js/src/pro/bittrex.js +6 -6
  266. package/js/src/pro/bitvavo.js +12 -8
  267. package/js/src/pro/blockchaincom.js +8 -8
  268. package/js/src/pro/bybit.js +7 -7
  269. package/js/src/pro/cex.js +14 -10
  270. package/js/src/pro/coinbase.js +5 -5
  271. package/js/src/pro/coinbasepro.js +12 -11
  272. package/js/src/pro/coinex.js +7 -9
  273. package/js/src/pro/cryptocom.js +9 -9
  274. package/js/src/pro/currencycom.js +4 -4
  275. package/js/src/pro/deribit.js +6 -6
  276. package/js/src/pro/exmo.js +12 -14
  277. package/js/src/pro/gate.js +7 -7
  278. package/js/src/pro/gemini.js +3 -3
  279. package/js/src/pro/hitbtc.d.ts +8 -1
  280. package/js/src/pro/hitbtc.js +264 -5
  281. package/js/src/pro/hollaex.js +5 -5
  282. package/js/src/pro/htx.js +6 -6
  283. package/js/src/pro/huobijp.js +3 -3
  284. package/js/src/pro/idex.js +4 -4
  285. package/js/src/pro/independentreserve.js +2 -2
  286. package/js/src/pro/kraken.js +10 -10
  287. package/js/src/pro/krakenfutures.d.ts +1 -0
  288. package/js/src/pro/krakenfutures.js +42 -18
  289. package/js/src/pro/kucoin.js +7 -7
  290. package/js/src/pro/kucoinfutures.js +8 -6
  291. package/js/src/pro/luno.js +2 -2
  292. package/js/src/pro/mexc.js +6 -6
  293. package/js/src/pro/ndax.js +3 -3
  294. package/js/src/pro/okcoin.js +5 -5
  295. package/js/src/pro/okx.js +12 -12
  296. package/js/src/pro/phemex.js +6 -6
  297. package/js/src/pro/poloniex.js +7 -7
  298. package/js/src/pro/poloniexfutures.js +5 -5
  299. package/js/src/pro/probit.js +6 -6
  300. package/js/src/pro/upbit.js +3 -3
  301. package/js/src/pro/wazirx.js +8 -8
  302. package/js/src/pro/whitebit.js +13 -9
  303. package/js/src/pro/woo.js +1 -1
  304. package/js/src/probit.js +29 -24
  305. package/js/src/tidex.js +16 -15
  306. package/js/src/timex.js +19 -18
  307. package/js/src/tokocrypto.js +28 -23
  308. package/js/src/upbit.js +19 -19
  309. package/js/src/wavesexchange.js +23 -20
  310. package/js/src/wazirx.js +25 -18
  311. package/js/src/whitebit.js +33 -27
  312. package/js/src/woo.js +45 -35
  313. package/js/src/yobit.js +25 -20
  314. package/js/src/zaif.js +9 -9
  315. package/js/src/zonda.js +18 -17
  316. package/package.json +1 -1
@@ -405,7 +405,7 @@ export default class poloniexfutures extends Exchange {
405
405
  * @see https://futures-docs.poloniex.com/#get-real-time-ticker-2-0
406
406
  * @param {string} symbol unified symbol of the market to fetch the ticker for
407
407
  * @param {object} [params] extra parameters specific to the poloniexfutures api endpoint
408
- * @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
408
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
409
409
  */
410
410
  await this.loadMarkets();
411
411
  const market = this.market(symbol);
@@ -441,7 +441,7 @@ export default class poloniexfutures extends Exchange {
441
441
  * @see https://futures-docs.poloniex.com/#get-real-time-ticker-of-all-symbols
442
442
  * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
443
443
  * @param {object} [params] extra parameters specific to the poloniexfutures api endpoint
444
- * @returns {object} a dictionary of [ticker structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
444
+ * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
445
445
  */
446
446
  await this.loadMarkets();
447
447
  const response = await this.publicGetTickers(params);
@@ -457,7 +457,7 @@ export default class poloniexfutures extends Exchange {
457
457
  * @param {string} symbol unified symbol of the market to fetch the order book for
458
458
  * @param {int} [limit] the maximum amount of order book entries to return
459
459
  * @param {object} [params] extra parameters specific to the poloniexfuturesfutures api endpoint
460
- * @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
460
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
461
461
  */
462
462
  await this.loadMarkets();
463
463
  const level = this.safeNumber(params, 'level');
@@ -543,7 +543,7 @@ export default class poloniexfutures extends Exchange {
543
543
  * @param {string} symbol unified market symbol
544
544
  * @param {int} [limit] max number of orders to return, default is undefined
545
545
  * @param {object} [params] extra parameters specific to the blockchaincom api endpoint
546
- * @returns {object} an [order book structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure}
546
+ * @returns {object} an [order book structure]{@link https://docs.ccxt.com/#/?id=order-book-structure}
547
547
  */
548
548
  await this.loadMarkets();
549
549
  const market = this.market(symbol);
@@ -651,7 +651,7 @@ export default class poloniexfutures extends Exchange {
651
651
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
652
652
  * @param {int} [limit] the maximum amount of trades to fetch
653
653
  * @param {object} [params] extra parameters specific to the poloniexfutures api endpoint
654
- * @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
654
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
655
655
  */
656
656
  await this.loadMarkets();
657
657
  const market = this.market(symbol);
@@ -773,7 +773,7 @@ export default class poloniexfutures extends Exchange {
773
773
  * @description query for balance and get the amount of funds available for trading or funds locked in orders
774
774
  * @see https://futures-docs.poloniex.com/#get-account-overview
775
775
  * @param {object} [params] extra parameters specific to the poloniexfutures api endpoint
776
- * @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
776
+ * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
777
777
  */
778
778
  await this.loadMarkets();
779
779
  const currencyId = this.safeString(params, 'currency');
@@ -825,7 +825,7 @@ export default class poloniexfutures extends Exchange {
825
825
  * @param {string} [params.stopPriceType] TP, IP or MP, defaults to TP
826
826
  * @param {bool} [params.closeOrder] set to true to close position
827
827
  * @param {bool} [params.forceHold] A mark to forcely hold the funds for an order, even though it's an order to reduce the position size. This helps the order stay on the order book and not get canceled when the position size changes. Set to false by default.
828
- * @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
828
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
829
829
  */
830
830
  await this.loadMarkets();
831
831
  const market = this.market(symbol);
@@ -919,7 +919,7 @@ export default class poloniexfutures extends Exchange {
919
919
  * @param {string} id order id
920
920
  * @param {string} symbol unified symbol of the market the order was made in
921
921
  * @param {object} [params] extra parameters specific to the poloniexfutures api endpoint
922
- * @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
922
+ * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
923
923
  */
924
924
  await this.loadMarkets();
925
925
  const request = {
@@ -958,7 +958,7 @@ export default class poloniexfutures extends Exchange {
958
958
  * @see https://futures-docs.poloniex.com/#get-position-list
959
959
  * @param {string[]|undefined} symbols list of unified market symbols
960
960
  * @param {object} [params] extra parameters specific to the poloniexfutures api endpoint
961
- * @returns {object[]} a list of [position structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#position-structure}
961
+ * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
962
962
  */
963
963
  await this.loadMarkets();
964
964
  const response = await this.privateGetPositions(params);
@@ -1114,9 +1114,11 @@ export default class poloniexfutures extends Exchange {
1114
1114
  * @param {int} [since] the earliest time in ms to fetch funding history for
1115
1115
  * @param {int} [limit] the maximum number of funding history structures to retrieve
1116
1116
  * @param {object} [params] extra parameters specific to the poloniexfutures api endpoint
1117
- * @returns {object} a [funding history structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-history-structure}
1117
+ * @returns {object} a [funding history structure]{@link https://docs.ccxt.com/#/?id=funding-history-structure}
1118
1118
  */
1119
- this.checkRequiredSymbol('fetchFundingHistory', symbol);
1119
+ if (symbol === undefined) {
1120
+ throw new ArgumentsRequired(this.id + ' fetchFundingHistory() requires a symbol argument');
1121
+ }
1120
1122
  await this.loadMarkets();
1121
1123
  const market = this.market(symbol);
1122
1124
  const request = {
@@ -1183,7 +1185,7 @@ export default class poloniexfutures extends Exchange {
1183
1185
  * @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
1184
1186
  * @param {object} [params] extra parameters specific to the poloniexfutures api endpoint
1185
1187
  * @param {object} [params.stop] When true, all the trigger orders will be cancelled
1186
- * @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1188
+ * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
1187
1189
  */
1188
1190
  await this.loadMarkets();
1189
1191
  const request = {};
@@ -1251,7 +1253,7 @@ export default class poloniexfutures extends Exchange {
1251
1253
  * @param {int} [params.until] End time in ms
1252
1254
  * @param {string} [params.side] buy or sell
1253
1255
  * @param {string} [params.type] limit or market
1254
- * @returns An [array of order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1256
+ * @returns An [array of order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
1255
1257
  */
1256
1258
  await this.loadMarkets();
1257
1259
  const stop = this.safeValue(params, 'stop');
@@ -1354,7 +1356,7 @@ export default class poloniexfutures extends Exchange {
1354
1356
  * @param {int} [params.till] end time in ms
1355
1357
  * @param {string} [params.side] buy or sell
1356
1358
  * @param {string} [params.type] limit, or market
1357
- * @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1359
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
1358
1360
  */
1359
1361
  return await this.fetchOrdersByStatus('open', symbol, since, limit, params);
1360
1362
  }
@@ -1372,7 +1374,7 @@ export default class poloniexfutures extends Exchange {
1372
1374
  * @param {int} [params.till] end time in ms
1373
1375
  * @param {string} [params.side] buy or sell
1374
1376
  * @param {string} [params.type] limit, or market
1375
- * @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1377
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
1376
1378
  */
1377
1379
  return await this.fetchOrdersByStatus('closed', symbol, since, limit, params);
1378
1380
  }
@@ -1385,7 +1387,7 @@ export default class poloniexfutures extends Exchange {
1385
1387
  * @see https://futures-docs.poloniex.com/#get-single-order-by-clientoid
1386
1388
  * @param {string} symbol unified symbol of the market the order was made in
1387
1389
  * @param {object} [params] extra parameters specific to the poloniexfutures api endpoint
1388
- * @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1390
+ * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1389
1391
  */
1390
1392
  await this.loadMarkets();
1391
1393
  const request = {};
@@ -1584,7 +1586,7 @@ export default class poloniexfutures extends Exchange {
1584
1586
  * @see https://futures-docs.poloniex.com/#get-premium-index
1585
1587
  * @param {string} symbol unified market symbol
1586
1588
  * @param {object} [params] extra parameters specific to the poloniexfutures api endpoint
1587
- * @returns {object} a [funding rate structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-structure}
1589
+ * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
1588
1590
  */
1589
1591
  await this.loadMarkets();
1590
1592
  const market = this.market(symbol);
@@ -1638,7 +1640,7 @@ export default class poloniexfutures extends Exchange {
1638
1640
  * @param {string} side buy or sell
1639
1641
  * @param {string} type limit, market, limit_stop or market_stop
1640
1642
  * @param {int} endAt end time (milisecond)
1641
- * @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
1643
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
1642
1644
  */
1643
1645
  await this.loadMarkets();
1644
1646
  const request = {};
@@ -1699,7 +1701,9 @@ export default class poloniexfutures extends Exchange {
1699
1701
  * @param {object} [params] extra parameters specific to the poloniexfutures api endpoint
1700
1702
  * @returns {object} response from the exchange
1701
1703
  */
1702
- this.checkRequiredSymbol('setMarginMode', symbol);
1704
+ if (symbol === undefined) {
1705
+ throw new ArgumentsRequired(this.id + ' setMarginMode() requires a symbol argument');
1706
+ }
1703
1707
  if ((marginMode !== 0) && (marginMode !== 1)) {
1704
1708
  throw new ArgumentsRequired(this.id + ' setMarginMode() marginMode must be 0 (isolated) or 1 (cross)');
1705
1709
  }
@@ -54,7 +54,7 @@ export default class alpaca extends alpacaRest {
54
54
  * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
55
55
  * @param {string} symbol unified symbol of the market to fetch the ticker for
56
56
  * @param {object} [params] extra parameters specific to the alpaca api endpoint
57
- * @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
57
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
58
58
  */
59
59
  const url = this.urls['api']['ws']['crypto'];
60
60
  await this.authenticate(url);
@@ -186,7 +186,7 @@ export default class alpaca extends alpacaRest {
186
186
  * @param {string} symbol unified symbol of the market to fetch the order book for
187
187
  * @param {int} [limit] the maximum amount of order book entries to return.
188
188
  * @param {object} [params] extra parameters specific to the alpaca api endpoint
189
- * @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
189
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
190
190
  */
191
191
  const url = this.urls['api']['ws']['crypto'];
192
192
  await this.authenticate(url);
@@ -266,7 +266,7 @@ export default class alpaca extends alpacaRest {
266
266
  * @param {int} [since] the earliest time in ms to fetch orders for
267
267
  * @param {int} [limit] the maximum number of trade structures to retrieve
268
268
  * @param {object} [params] extra parameters specific to the alpaca api endpoint
269
- * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure
269
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure
270
270
  */
271
271
  const url = this.urls['api']['ws']['crypto'];
272
272
  await this.authenticate(url);
@@ -319,7 +319,7 @@ export default class alpaca extends alpacaRest {
319
319
  * @param {int} [limit] the maximum number of trade structures to retrieve
320
320
  * @param {object} [params] extra parameters specific to the alpaca api endpoint
321
321
  * @param {boolean} [params.unifiedMargin] use unified margin account
322
- * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure
322
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure
323
323
  */
324
324
  const url = this.urls['api']['ws']['trading'];
325
325
  await this.authenticate(url);
@@ -350,7 +350,7 @@ export default class alpaca extends alpacaRest {
350
350
  * @param {int} [since] the earliest time in ms to fetch orders for
351
351
  * @param {int} [limit] the maximum number of orde structures to retrieve
352
352
  * @param {object} [params] extra parameters specific to the alpaca api endpoint
353
- * @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure
353
+ * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure
354
354
  */
355
355
  const url = this.urls['api']['ws']['trading'];
356
356
  await this.authenticate(url);
@@ -147,7 +147,7 @@ export default class ascendex extends ascendexRest {
147
147
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
148
148
  * @param {int} [limit] the maximum amount of trades to fetch
149
149
  * @param {object} [params] extra parameters specific to the ascendex api endpoint
150
- * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
150
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
151
151
  */
152
152
  await this.loadMarkets();
153
153
  const market = this.market(symbol);
@@ -207,7 +207,7 @@ export default class ascendex extends ascendexRest {
207
207
  * @param {string} symbol unified symbol of the market to fetch the order book for
208
208
  * @param {int} [limit] the maximum amount of order book entries to return
209
209
  * @param {object} [params] extra parameters specific to the ascendex api endpoint
210
- * @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
210
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
211
211
  */
212
212
  await this.loadMarkets();
213
213
  const market = this.market(symbol);
@@ -352,7 +352,7 @@ export default class ascendex extends ascendexRest {
352
352
  * @name ascendex#watchBalance
353
353
  * @description watch balance and get the amount of funds available for trading or funds locked in orders
354
354
  * @param {object} [params] extra parameters specific to the ascendex api endpoint
355
- * @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
355
+ * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
356
356
  */
357
357
  await this.loadMarkets();
358
358
  const [type, query] = this.handleMarketTypeAndParams('watchBalance', undefined, params);
@@ -480,7 +480,7 @@ export default class ascendex extends ascendexRest {
480
480
  * @param {int} [since] the earliest time in ms to fetch orders for
481
481
  * @param {int} [limit] the maximum number of orde structures to retrieve
482
482
  * @param {object} [params] extra parameters specific to the ascendex api endpoint
483
- * @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
483
+ * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
484
484
  */
485
485
  await this.loadMarkets();
486
486
  let market = undefined;
@@ -143,7 +143,7 @@ export default class binance extends binanceRest {
143
143
  * @param {string} symbol unified symbol of the market to fetch the order book for
144
144
  * @param {int} [limit] the maximum amount of order book entries to return
145
145
  * @param {object} [params] extra parameters specific to the binance api endpoint
146
- * @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
146
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
147
147
  */
148
148
  //
149
149
  // todo add support for <levels>-snapshots (depth)
@@ -545,7 +545,7 @@ export default class binance extends binanceRest {
545
545
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
546
546
  * @param {int} [limit] the maximum amount of trades to fetch
547
547
  * @param {object} [params] extra parameters specific to the binance api endpoint
548
- * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
548
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
549
549
  */
550
550
  await this.loadMarkets();
551
551
  const market = this.market(symbol);
@@ -938,7 +938,7 @@ export default class binance extends binanceRest {
938
938
  * @param {string} symbol unified symbol of the market to fetch the ticker for
939
939
  * @param {object} [params] extra parameters specific to the binance api endpoint
940
940
  * @param {string} [params.name] stream to use can be ticker or bookTicker
941
- * @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
941
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
942
942
  */
943
943
  await this.loadMarkets();
944
944
  const market = this.market(symbol);
@@ -973,7 +973,7 @@ export default class binance extends binanceRest {
973
973
  * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
974
974
  * @param {string[]} symbols unified symbol of the market to fetch the ticker for
975
975
  * @param {object} [params] extra parameters specific to the binance api endpoint
976
- * @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
976
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
977
977
  */
978
978
  await this.loadMarkets();
979
979
  symbols = this.marketSymbols(symbols, undefined, true, true, true);
@@ -1393,7 +1393,7 @@ export default class binance extends binanceRest {
1393
1393
  * @param {string|undefined} [params.type] 'future', 'delivery', 'savings', 'funding', or 'spot'
1394
1394
  * @param {string|undefined} [params.marginMode] 'cross' or 'isolated', for margin trading, uses this.options.defaultMarginMode if not passed, defaults to undefined/None/null
1395
1395
  * @param {string[]|undefined} [params.symbols] unified market symbols, only used in isolated margin mode
1396
- * @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
1396
+ * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
1397
1397
  */
1398
1398
  await this.loadMarkets();
1399
1399
  const url = this.urls['api']['ws']['ws'];
@@ -1470,7 +1470,7 @@ export default class binance extends binanceRest {
1470
1470
  * @name binance#watchBalance
1471
1471
  * @description watch balance and get the amount of funds available for trading or funds locked in orders
1472
1472
  * @param {object} [params] extra parameters specific to the binance api endpoint
1473
- * @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
1473
+ * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
1474
1474
  */
1475
1475
  await this.loadMarkets();
1476
1476
  await this.authenticate(params);
@@ -1638,7 +1638,7 @@ export default class binance extends binanceRest {
1638
1638
  * @param {float|undefined} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
1639
1639
  * @param {object} [params] extra parameters specific to the binance api endpoint
1640
1640
  * @param {boolean} params.test test order, default false
1641
- * @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1641
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1642
1642
  */
1643
1643
  await this.loadMarkets();
1644
1644
  this.checkIsSpot('createOrderWs', symbol, params);
@@ -1772,7 +1772,7 @@ export default class binance extends binanceRest {
1772
1772
  * @param {float} amount how much of the currency you want to trade in units of the base currency
1773
1773
  * @param {float|undefined} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
1774
1774
  * @param {object} [params] extra parameters specific to the binance api endpoint
1775
- * @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1775
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1776
1776
  */
1777
1777
  await this.loadMarkets();
1778
1778
  this.checkIsSpot('editOrderWs', symbol, params);
@@ -1876,7 +1876,7 @@ export default class binance extends binanceRest {
1876
1876
  * @param {string} symbol unified market symbol, default is undefined
1877
1877
  * @param {object} [params] extra parameters specific to the binance api endpoint
1878
1878
  * @param {string|undefined} [params.cancelRestrictions] Supported values: ONLY_NEW - Cancel will succeed if the order status is NEW. ONLY_PARTIALLY_FILLED - Cancel will succeed if order status is PARTIALLY_FILLED.
1879
- * @returns {object} an list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1879
+ * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
1880
1880
  */
1881
1881
  await this.loadMarkets();
1882
1882
  if (symbol === undefined) {
@@ -1918,7 +1918,7 @@ export default class binance extends binanceRest {
1918
1918
  * @description cancel all open orders in a market
1919
1919
  * @param {string} symbol unified market symbol of the market to cancel orders in
1920
1920
  * @param {object} [params] extra parameters specific to the binance api endpoint
1921
- * @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1921
+ * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
1922
1922
  */
1923
1923
  await this.loadMarkets();
1924
1924
  const url = this.urls['api']['ws']['ws'];
@@ -1948,7 +1948,7 @@ export default class binance extends binanceRest {
1948
1948
  * @description fetches information on an order made by the user
1949
1949
  * @param {string} symbol unified symbol of the market the order was made in
1950
1950
  * @param {object} params extra parameters specific to the binance api endpoint
1951
- * @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1951
+ * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1952
1952
  */
1953
1953
  await this.loadMarkets();
1954
1954
  if (symbol === undefined) {
@@ -1995,7 +1995,7 @@ export default class binance extends binanceRest {
1995
1995
  * @param {int} [params.startTime] earliest time in ms to retrieve orders for
1996
1996
  * @param {int} [params.endTime] latest time in ms to retrieve orders for
1997
1997
  * @param {int} [params.limit] the maximum number of order structures to retrieve
1998
- * @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1998
+ * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
1999
1999
  */
2000
2000
  await this.loadMarkets();
2001
2001
  if (symbol === undefined) {
@@ -2032,7 +2032,7 @@ export default class binance extends binanceRest {
2032
2032
  * @param {int|undefined} [since] the earliest time in ms to fetch open orders for
2033
2033
  * @param {int|undefined} [limit] the maximum number of open orders structures to retrieve
2034
2034
  * @param {object} [params] extra parameters specific to the binance api endpoint
2035
- * @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
2035
+ * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
2036
2036
  */
2037
2037
  await this.loadMarkets();
2038
2038
  this.checkIsSpot('fetchOpenOrdersWs', symbol);
@@ -2067,7 +2067,7 @@ export default class binance extends binanceRest {
2067
2067
  * @param {int} [since] the earliest time in ms to fetch orders for
2068
2068
  * @param {int} [limit] the maximum number of orde structures to retrieve
2069
2069
  * @param {object} [params] extra parameters specific to the binance api endpoint
2070
- * @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
2070
+ * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
2071
2071
  */
2072
2072
  await this.loadMarkets();
2073
2073
  let messageHash = 'orders';
@@ -2545,7 +2545,7 @@ export default class binance extends binanceRest {
2545
2545
  * @param {object} [params] extra parameters specific to the binance api endpoint
2546
2546
  * @param {int} [params.endTime] the latest time in ms to fetch trades for
2547
2547
  * @param {int} [params.fromId] first trade Id to fetch
2548
- * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
2548
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
2549
2549
  */
2550
2550
  await this.loadMarkets();
2551
2551
  if (symbol === undefined) {
@@ -2620,7 +2620,7 @@ export default class binance extends binanceRest {
2620
2620
  * @param {int} [since] the earliest time in ms to fetch orders for
2621
2621
  * @param {int} [limit] the maximum number of orde structures to retrieve
2622
2622
  * @param {object} [params] extra parameters specific to the binance api endpoint
2623
- * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure
2623
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure
2624
2624
  */
2625
2625
  await this.loadMarkets();
2626
2626
  let type = undefined;
@@ -484,7 +484,7 @@ export default class bingx extends bingxRest {
484
484
  * @param {int} [since] the earliest time in ms to trades orders for
485
485
  * @param {int} [limit] the maximum number of trades structures to retrieve
486
486
  * @param {object} [params] extra parameters specific to the bingx api endpoint
487
- * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure
487
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure
488
488
  */
489
489
  await this.loadMarkets();
490
490
  await this.authenticate();
@@ -64,7 +64,7 @@ export default class bitfinex extends bitfinexRest {
64
64
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
65
65
  * @param {int} [limit] the maximum amount of trades to fetch
66
66
  * @param {object} [params] extra parameters specific to the bitfinex api endpoint
67
- * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
67
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
68
68
  */
69
69
  await this.loadMarkets();
70
70
  symbol = this.symbol(symbol);
@@ -81,7 +81,7 @@ export default class bitfinex extends bitfinexRest {
81
81
  * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
82
82
  * @param {string} symbol unified symbol of the market to fetch the ticker for
83
83
  * @param {object} [params] extra parameters specific to the bitfinex api endpoint
84
- * @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
84
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
85
85
  */
86
86
  return await this.subscribe('ticker', symbol, params);
87
87
  }
@@ -256,7 +256,7 @@ export default class bitfinex extends bitfinexRest {
256
256
  * @param {string} symbol unified symbol of the market to fetch the order book for
257
257
  * @param {int} [limit] the maximum amount of order book entries to return
258
258
  * @param {object} [params] extra parameters specific to the bitfinex api endpoint
259
- * @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
259
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
260
260
  */
261
261
  if (limit !== undefined) {
262
262
  if ((limit !== 25) && (limit !== 100)) {
@@ -463,7 +463,7 @@ export default class bitfinex extends bitfinexRest {
463
463
  * @param {int} [since] the earliest time in ms to fetch orders for
464
464
  * @param {int} [limit] the maximum number of orde structures to retrieve
465
465
  * @param {object} [params] extra parameters specific to the bitfinex api endpoint
466
- * @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
466
+ * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
467
467
  */
468
468
  await this.loadMarkets();
469
469
  await this.authenticate();
@@ -20,7 +20,7 @@ export default class bitfinex2 extends bitfinex2Rest {
20
20
  handleChecksum(client: Client, message: any, subscription: any): void;
21
21
  watchBalance(params?: {}): Promise<any>;
22
22
  handleBalance(client: Client, message: any, subscription: any): void;
23
- parseWsBalance(balance: any): import("../base/types.js").Balance;
23
+ parseWsBalance(balance: any): import("../base/types.js").Account;
24
24
  handleSystemStatus(client: Client, message: any): any;
25
25
  handleSubscriptionStatus(client: Client, message: any): any;
26
26
  authenticate(params?: {}): Promise<any>;
@@ -196,7 +196,7 @@ export default class bitfinex2 extends bitfinex2Rest {
196
196
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
197
197
  * @param {int} [limit] the maximum amount of trades to fetch
198
198
  * @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
199
- * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
199
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
200
200
  */
201
201
  const trades = await this.subscribe('trades', symbol, params);
202
202
  if (this.newUpdates) {
@@ -213,7 +213,7 @@ export default class bitfinex2 extends bitfinex2Rest {
213
213
  * @param {int} [since] the earliest time in ms to fetch trades for
214
214
  * @param {int} [limit] the maximum number of trade structures to retrieve
215
215
  * @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
216
- * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure
216
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure
217
217
  */
218
218
  await this.loadMarkets();
219
219
  let messageHash = 'myTrade';
@@ -234,7 +234,7 @@ export default class bitfinex2 extends bitfinex2Rest {
234
234
  * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
235
235
  * @param {string} symbol unified symbol of the market to fetch the ticker for
236
236
  * @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
237
- * @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
237
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
238
238
  */
239
239
  return await this.subscribe('ticker', symbol, params);
240
240
  }
@@ -524,7 +524,7 @@ export default class bitfinex2 extends bitfinex2Rest {
524
524
  * @param {string} symbol unified symbol of the market to fetch the order book for
525
525
  * @param {int} [limit] the maximum amount of order book entries to return
526
526
  * @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
527
- * @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
527
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
528
528
  */
529
529
  if (limit !== undefined) {
530
530
  if ((limit !== 25) && (limit !== 100)) {
@@ -690,7 +690,7 @@ export default class bitfinex2 extends bitfinex2Rest {
690
690
  * @description watch balance and get the amount of funds available for trading or funds locked in orders
691
691
  * @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
692
692
  * @param {str} [params.type] spot or contract if not provided this.options['defaultType'] is used
693
- * @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
693
+ * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
694
694
  */
695
695
  await this.loadMarkets();
696
696
  const balanceType = this.safeString(params, 'wallet', 'exchange'); // exchange, margin
@@ -887,7 +887,7 @@ export default class bitfinex2 extends bitfinex2Rest {
887
887
  * @param {int} [since] the earliest time in ms to fetch orders for
888
888
  * @param {int} [limit] the maximum number of orde structures to retrieve
889
889
  * @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
890
- * @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure
890
+ * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure
891
891
  */
892
892
  await this.loadMarkets();
893
893
  let messageHash = 'orders';
@@ -132,7 +132,7 @@ export default class bitget extends bitgetRest {
132
132
  * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
133
133
  * @param {string} symbol unified symbol of the market to fetch the ticker for
134
134
  * @param {object} [params] extra parameters specific to the bitget api endpoint
135
- * @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
135
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
136
136
  */
137
137
  await this.loadMarkets();
138
138
  const market = this.market(symbol);
@@ -153,7 +153,7 @@ export default class bitget extends bitgetRest {
153
153
  * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
154
154
  * @param {string[]} symbols unified symbol of the market to fetch the ticker for
155
155
  * @param {object} [params] extra parameters specific to the bitget api endpoint
156
- * @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
156
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
157
157
  */
158
158
  await this.loadMarkets();
159
159
  symbols = this.marketSymbols(symbols, undefined, false);
@@ -456,7 +456,7 @@ export default class bitget extends bitgetRest {
456
456
  * @param {string} symbol unified symbol of the market to fetch the order book for
457
457
  * @param {int} [limit] the maximum amount of order book entries to return
458
458
  * @param {object} [params] extra parameters specific to the bitget api endpoint
459
- * @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
459
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
460
460
  */
461
461
  await this.loadMarkets();
462
462
  const market = this.market(symbol);
@@ -630,7 +630,7 @@ export default class bitget extends bitgetRest {
630
630
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
631
631
  * @param {int} [limit] the maximum amount of trades to fetch
632
632
  * @param {object} [params] extra parameters specific to the bitget api endpoint
633
- * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
633
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
634
634
  */
635
635
  await this.loadMarkets();
636
636
  const market = this.market(symbol);
@@ -945,7 +945,7 @@ export default class bitget extends bitgetRest {
945
945
  * @param {int} [since] the earliest time in ms to fetch orders for
946
946
  * @param {int} [limit] the maximum number of orde structures to retrieve
947
947
  * @param {object} [params] extra parameters specific to the bitget api endpoint
948
- * @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure
948
+ * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure
949
949
  */
950
950
  await this.loadMarkets();
951
951
  let market = undefined;
@@ -1268,7 +1268,7 @@ export default class bitget extends bitgetRest {
1268
1268
  * @param {int} [since] the earliest time in ms to fetch trades for
1269
1269
  * @param {int} [limit] the maximum number of trades structures to retrieve
1270
1270
  * @param {object} [params] extra parameters specific to the bitget api endpoint
1271
- * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
1271
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
1272
1272
  */
1273
1273
  // only contracts stream provides the trade info consistently in between order updates
1274
1274
  // the spot stream only provides on limit orders updates so we can't support it for spot
@@ -1420,7 +1420,7 @@ export default class bitget extends bitgetRest {
1420
1420
  * @description watch balance and get the amount of funds available for trading or funds locked in orders
1421
1421
  * @param {object} [params] extra parameters specific to the bitget api endpoint
1422
1422
  * @param {str} [params.type] spot or contract if not provided this.options['defaultType'] is used
1423
- * @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
1423
+ * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
1424
1424
  */
1425
1425
  let type = undefined;
1426
1426
  [type, params] = this.handleMarketTypeAndParams('watchOrders', undefined, params);
@@ -90,7 +90,7 @@ export default class bitmart extends bitmartRest {
90
90
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
91
91
  * @param {int} [limit] the maximum amount of trades to fetch
92
92
  * @param {object} [params] extra parameters specific to the bitmart api endpoint
93
- * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
93
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
94
94
  */
95
95
  await this.loadMarkets();
96
96
  symbol = this.symbol(symbol);
@@ -107,7 +107,7 @@ export default class bitmart extends bitmartRest {
107
107
  * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
108
108
  * @param {string} symbol unified symbol of the market to fetch the ticker for
109
109
  * @param {object} [params] extra parameters specific to the bitmart api endpoint
110
- * @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
110
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
111
111
  */
112
112
  return await this.subscribe('ticker', symbol, params);
113
113
  }
@@ -120,9 +120,11 @@ export default class bitmart extends bitmartRest {
120
120
  * @param {int} [since] the earliest time in ms to fetch orders for
121
121
  * @param {int} [limit] the maximum number of order structures to retrieve
122
122
  * @param {object} [params] extra parameters specific to the bitmart api endpoint
123
- * @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
123
+ * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
124
124
  */
125
- this.checkRequiredSymbol('watchOrders', symbol);
125
+ if (symbol === undefined) {
126
+ throw new ArgumentsRequired(this.id + ' watchOrders() requires a symbol argument');
127
+ }
126
128
  await this.loadMarkets();
127
129
  const market = this.market(symbol);
128
130
  symbol = market['symbol'];
@@ -385,7 +387,7 @@ export default class bitmart extends bitmartRest {
385
387
  * @param {string} symbol unified symbol of the market to fetch the order book for
386
388
  * @param {int} [limit] the maximum amount of order book entries to return
387
389
  * @param {object} [params] extra parameters specific to the bitmart api endpoint
388
- * @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
390
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
389
391
  */
390
392
  const options = this.safeValue(this.options, 'watchOrderBook', {});
391
393
  const depth = this.safeString(options, 'depth', 'depth50');