ccxt 4.1.55 → 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 (328) hide show
  1. package/.git-templates/hooks/pre-push +2 -2
  2. package/CONTRIBUTING.md +1 -1
  3. package/README.md +6 -6
  4. package/build.sh +30 -8
  5. package/dist/ccxt.browser.js +5592 -4907
  6. package/dist/ccxt.browser.min.js +13 -13
  7. package/dist/cjs/ccxt.js +1 -1
  8. package/dist/cjs/src/ace.js +17 -13
  9. package/dist/cjs/src/alpaca.js +6 -6
  10. package/dist/cjs/src/ascendex.js +35 -29
  11. package/dist/cjs/src/base/Exchange.js +39 -26
  12. package/dist/cjs/src/base/Precise.js +1 -3
  13. package/dist/cjs/src/bigone.js +24 -20
  14. package/dist/cjs/src/binance.js +97 -76
  15. package/dist/cjs/src/bingx.js +63 -44
  16. package/dist/cjs/src/bit2c.js +18 -15
  17. package/dist/cjs/src/bitbank.js +17 -15
  18. package/dist/cjs/src/bitbns.js +28 -18
  19. package/dist/cjs/src/bitfinex.js +23 -21
  20. package/dist/cjs/src/bitfinex2.js +32 -28
  21. package/dist/cjs/src/bitflyer.js +28 -20
  22. package/dist/cjs/src/bitforex.js +25 -18
  23. package/dist/cjs/src/bitget.js +184 -147
  24. package/dist/cjs/src/bithumb.js +23 -16
  25. package/dist/cjs/src/bitmart.js +129 -94
  26. package/dist/cjs/src/bitmex.js +104 -64
  27. package/dist/cjs/src/bitopro.js +38 -26
  28. package/dist/cjs/src/bitpanda.js +24 -23
  29. package/dist/cjs/src/bitrue.js +33 -24
  30. package/dist/cjs/src/bitso.js +24 -23
  31. package/dist/cjs/src/bitstamp.js +24 -23
  32. package/dist/cjs/src/bittrex.js +30 -29
  33. package/dist/cjs/src/bitvavo.js +38 -30
  34. package/dist/cjs/src/bl3p.js +11 -10
  35. package/dist/cjs/src/blockchaincom.js +20 -20
  36. package/dist/cjs/src/btcalpha.js +18 -17
  37. package/dist/cjs/src/btcbox.js +13 -12
  38. package/dist/cjs/src/btcmarkets.js +20 -19
  39. package/dist/cjs/src/btcturk.js +14 -13
  40. package/dist/cjs/src/bybit.js +84 -54
  41. package/dist/cjs/src/cex.js +16 -14
  42. package/dist/cjs/src/coinbase.js +29 -27
  43. package/dist/cjs/src/coinbasepro.js +27 -25
  44. package/dist/cjs/src/coincheck.js +15 -14
  45. package/dist/cjs/src/coinex.js +101 -78
  46. package/dist/cjs/src/coinlist.js +28 -27
  47. package/dist/cjs/src/coinmate.js +20 -17
  48. package/dist/cjs/src/coinone.js +21 -16
  49. package/dist/cjs/src/coinsph.js +37 -28
  50. package/dist/cjs/src/coinspot.js +12 -11
  51. package/dist/cjs/src/cryptocom.js +40 -202
  52. package/dist/cjs/src/currencycom.js +32 -25
  53. package/dist/cjs/src/delta.js +34 -28
  54. package/dist/cjs/src/deribit.js +39 -36
  55. package/dist/cjs/src/digifinex.js +64 -44
  56. package/dist/cjs/src/exmo.js +29 -27
  57. package/dist/cjs/src/gate.js +67 -53
  58. package/dist/cjs/src/gemini.js +23 -20
  59. package/dist/cjs/src/hitbtc.js +65 -56
  60. package/dist/cjs/src/hollaex.js +30 -27
  61. package/dist/cjs/src/htx.js +135 -143
  62. package/dist/cjs/src/huobijp.js +22 -20
  63. package/dist/cjs/src/idex.js +22 -21
  64. package/dist/cjs/src/independentreserve.js +15 -14
  65. package/dist/cjs/src/indodax.js +30 -26
  66. package/dist/cjs/src/kraken.js +29 -27
  67. package/dist/cjs/src/krakenfutures.js +29 -22
  68. package/dist/cjs/src/kucoin.js +48 -43
  69. package/dist/cjs/src/kucoinfutures.js +33 -28
  70. package/dist/cjs/src/kuna.js +25 -24
  71. package/dist/cjs/src/latoken.js +24 -22
  72. package/dist/cjs/src/lbank.js +45 -30
  73. package/dist/cjs/src/luno.js +22 -19
  74. package/dist/cjs/src/lykke.js +19 -17
  75. package/dist/cjs/src/mercado.js +30 -19
  76. package/dist/cjs/src/mexc.js +60 -49
  77. package/dist/cjs/src/ndax.js +23 -22
  78. package/dist/cjs/src/novadax.js +23 -22
  79. package/dist/cjs/src/oceanex.js +22 -19
  80. package/dist/cjs/src/okcoin.js +29 -23
  81. package/dist/cjs/src/okx.js +92 -84
  82. package/dist/cjs/src/p2b.js +80 -83
  83. package/dist/cjs/src/paymium.js +10 -10
  84. package/dist/cjs/src/phemex.js +63 -40
  85. package/dist/cjs/src/poloniex.js +22 -22
  86. package/dist/cjs/src/poloniexfutures.js +23 -19
  87. package/dist/cjs/src/pro/alpaca.js +5 -5
  88. package/dist/cjs/src/pro/ascendex.js +4 -4
  89. package/dist/cjs/src/pro/binance.js +16 -16
  90. package/dist/cjs/src/pro/bingx.js +1 -1
  91. package/dist/cjs/src/pro/bitfinex.js +4 -4
  92. package/dist/cjs/src/pro/bitfinex2.js +6 -6
  93. package/dist/cjs/src/pro/bitget.js +7 -7
  94. package/dist/cjs/src/pro/bitmart.js +7 -5
  95. package/dist/cjs/src/pro/bitmex.js +6 -6
  96. package/dist/cjs/src/pro/bitopro.js +4 -4
  97. package/dist/cjs/src/pro/bitpanda.js +6 -6
  98. package/dist/cjs/src/pro/bitrue.js +2 -2
  99. package/dist/cjs/src/pro/bitstamp.js +6 -4
  100. package/dist/cjs/src/pro/bittrex.js +6 -6
  101. package/dist/cjs/src/pro/bitvavo.js +11 -7
  102. package/dist/cjs/src/pro/blockchaincom.js +8 -8
  103. package/dist/cjs/src/pro/bybit.js +7 -7
  104. package/dist/cjs/src/pro/cex.js +13 -9
  105. package/dist/cjs/src/pro/coinbase.js +5 -5
  106. package/dist/cjs/src/pro/coinbasepro.js +11 -10
  107. package/dist/cjs/src/pro/coinex.js +7 -9
  108. package/dist/cjs/src/pro/cryptocom.js +9 -9
  109. package/dist/cjs/src/pro/currencycom.js +4 -4
  110. package/dist/cjs/src/pro/deribit.js +6 -6
  111. package/dist/cjs/src/pro/exmo.js +12 -14
  112. package/dist/cjs/src/pro/gate.js +7 -7
  113. package/dist/cjs/src/pro/gemini.js +3 -3
  114. package/dist/cjs/src/pro/hitbtc.js +263 -4
  115. package/dist/cjs/src/pro/hollaex.js +5 -5
  116. package/dist/cjs/src/pro/htx.js +6 -6
  117. package/dist/cjs/src/pro/huobijp.js +3 -3
  118. package/dist/cjs/src/pro/idex.js +4 -4
  119. package/dist/cjs/src/pro/independentreserve.js +2 -2
  120. package/dist/cjs/src/pro/kraken.js +10 -10
  121. package/dist/cjs/src/pro/krakenfutures.js +41 -17
  122. package/dist/cjs/src/pro/kucoin.js +7 -7
  123. package/dist/cjs/src/pro/kucoinfutures.js +8 -6
  124. package/dist/cjs/src/pro/luno.js +2 -2
  125. package/dist/cjs/src/pro/mexc.js +6 -6
  126. package/dist/cjs/src/pro/ndax.js +3 -3
  127. package/dist/cjs/src/pro/okcoin.js +5 -5
  128. package/dist/cjs/src/pro/okx.js +12 -12
  129. package/dist/cjs/src/pro/phemex.js +6 -6
  130. package/dist/cjs/src/pro/poloniex.js +7 -7
  131. package/dist/cjs/src/pro/poloniexfutures.js +5 -5
  132. package/dist/cjs/src/pro/probit.js +6 -6
  133. package/dist/cjs/src/pro/upbit.js +3 -3
  134. package/dist/cjs/src/pro/wazirx.js +8 -8
  135. package/dist/cjs/src/pro/whitebit.js +12 -8
  136. package/dist/cjs/src/pro/woo.js +1 -1
  137. package/dist/cjs/src/probit.js +28 -23
  138. package/dist/cjs/src/tidex.js +16 -15
  139. package/dist/cjs/src/timex.js +19 -18
  140. package/dist/cjs/src/tokocrypto.js +27 -22
  141. package/dist/cjs/src/upbit.js +19 -19
  142. package/dist/cjs/src/wavesexchange.js +22 -19
  143. package/dist/cjs/src/wazirx.js +24 -17
  144. package/dist/cjs/src/whitebit.js +33 -27
  145. package/dist/cjs/src/woo.js +44 -34
  146. package/dist/cjs/src/yobit.js +25 -20
  147. package/dist/cjs/src/zaif.js +9 -9
  148. package/dist/cjs/src/zonda.js +18 -17
  149. package/js/ccxt.d.ts +1 -1
  150. package/js/ccxt.js +1 -1
  151. package/js/src/abstract/bitbank.d.ts +1 -0
  152. package/js/src/abstract/bybit.d.ts +1 -0
  153. package/js/src/abstract/cryptocom.d.ts +0 -20
  154. package/js/src/abstract/htx.d.ts +3 -0
  155. package/js/src/abstract/huobi.d.ts +3 -0
  156. package/js/src/abstract/huobipro.d.ts +3 -0
  157. package/js/src/abstract/okex.d.ts +3 -1
  158. package/js/src/abstract/okex5.d.ts +3 -1
  159. package/js/src/abstract/okx.d.ts +3 -1
  160. package/js/src/ace.js +18 -14
  161. package/js/src/alpaca.js +6 -6
  162. package/js/src/ascendex.js +35 -29
  163. package/js/src/base/Exchange.d.ts +37 -34
  164. package/js/src/base/Exchange.js +39 -26
  165. package/js/src/base/Precise.d.ts +4 -4
  166. package/js/src/base/Precise.js +1 -3
  167. package/js/src/base/functions/type.d.ts +25 -25
  168. package/js/src/base/types.d.ts +21 -14
  169. package/js/src/bigone.js +25 -21
  170. package/js/src/binance.d.ts +2 -2
  171. package/js/src/binance.js +97 -76
  172. package/js/src/bingx.js +63 -44
  173. package/js/src/bit2c.js +19 -16
  174. package/js/src/bitbank.js +17 -15
  175. package/js/src/bitbns.js +28 -18
  176. package/js/src/bitfinex.js +23 -21
  177. package/js/src/bitfinex2.js +32 -28
  178. package/js/src/bitflyer.js +28 -20
  179. package/js/src/bitforex.js +26 -19
  180. package/js/src/bitget.d.ts +25 -3
  181. package/js/src/bitget.js +184 -147
  182. package/js/src/bithumb.js +23 -16
  183. package/js/src/bitmart.d.ts +1 -1
  184. package/js/src/bitmart.js +129 -94
  185. package/js/src/bitmex.d.ts +2 -2
  186. package/js/src/bitmex.js +104 -64
  187. package/js/src/bitopro.js +38 -26
  188. package/js/src/bitpanda.js +24 -23
  189. package/js/src/bitrue.js +33 -24
  190. package/js/src/bitso.js +24 -23
  191. package/js/src/bitstamp.d.ts +2 -2
  192. package/js/src/bitstamp.js +24 -23
  193. package/js/src/bittrex.js +30 -29
  194. package/js/src/bitvavo.js +38 -30
  195. package/js/src/bl3p.js +11 -10
  196. package/js/src/blockchaincom.js +20 -20
  197. package/js/src/btcalpha.js +18 -17
  198. package/js/src/btcbox.js +13 -12
  199. package/js/src/btcmarkets.js +20 -19
  200. package/js/src/btcturk.js +14 -13
  201. package/js/src/bybit.d.ts +1 -1
  202. package/js/src/bybit.js +84 -54
  203. package/js/src/cex.js +16 -14
  204. package/js/src/coinbase.js +29 -27
  205. package/js/src/coinbasepro.js +27 -25
  206. package/js/src/coincheck.js +15 -14
  207. package/js/src/coinex.d.ts +1 -1
  208. package/js/src/coinex.js +101 -78
  209. package/js/src/coinlist.js +28 -27
  210. package/js/src/coinmate.js +21 -18
  211. package/js/src/coinone.js +21 -16
  212. package/js/src/coinsph.js +37 -28
  213. package/js/src/coinspot.js +12 -11
  214. package/js/src/cryptocom.d.ts +0 -23
  215. package/js/src/cryptocom.js +40 -202
  216. package/js/src/currencycom.js +32 -25
  217. package/js/src/delta.js +35 -29
  218. package/js/src/deribit.js +39 -36
  219. package/js/src/digifinex.d.ts +2 -2
  220. package/js/src/digifinex.js +65 -45
  221. package/js/src/exmo.js +29 -27
  222. package/js/src/gate.d.ts +1 -1
  223. package/js/src/gate.js +67 -53
  224. package/js/src/gemini.js +23 -20
  225. package/js/src/hitbtc.d.ts +1 -0
  226. package/js/src/hitbtc.js +65 -56
  227. package/js/src/hollaex.js +30 -27
  228. package/js/src/htx.d.ts +11 -3
  229. package/js/src/htx.js +135 -143
  230. package/js/src/huobijp.js +23 -21
  231. package/js/src/idex.js +22 -21
  232. package/js/src/independentreserve.js +15 -14
  233. package/js/src/indodax.js +30 -26
  234. package/js/src/kraken.js +29 -27
  235. package/js/src/krakenfutures.js +29 -22
  236. package/js/src/kucoin.d.ts +1 -1
  237. package/js/src/kucoin.js +48 -43
  238. package/js/src/kucoinfutures.js +33 -28
  239. package/js/src/kuna.js +25 -24
  240. package/js/src/latoken.js +25 -23
  241. package/js/src/lbank.js +46 -31
  242. package/js/src/luno.js +22 -19
  243. package/js/src/lykke.js +19 -17
  244. package/js/src/mercado.js +30 -19
  245. package/js/src/mexc.d.ts +1 -1
  246. package/js/src/mexc.js +60 -49
  247. package/js/src/ndax.js +23 -22
  248. package/js/src/novadax.js +23 -22
  249. package/js/src/oceanex.js +22 -19
  250. package/js/src/okcoin.js +29 -23
  251. package/js/src/okx.d.ts +2 -2
  252. package/js/src/okx.js +92 -84
  253. package/js/src/p2b.d.ts +8 -7
  254. package/js/src/p2b.js +80 -82
  255. package/js/src/paymium.js +10 -10
  256. package/js/src/phemex.js +63 -40
  257. package/js/src/poloniex.js +22 -22
  258. package/js/src/poloniexfutures.js +23 -19
  259. package/js/src/pro/alpaca.js +5 -5
  260. package/js/src/pro/ascendex.js +4 -4
  261. package/js/src/pro/binance.js +16 -16
  262. package/js/src/pro/bingx.js +1 -1
  263. package/js/src/pro/bitfinex.js +4 -4
  264. package/js/src/pro/bitfinex2.d.ts +1 -1
  265. package/js/src/pro/bitfinex2.js +6 -6
  266. package/js/src/pro/bitget.js +7 -7
  267. package/js/src/pro/bitmart.js +7 -5
  268. package/js/src/pro/bitmex.js +6 -6
  269. package/js/src/pro/bitopro.js +4 -4
  270. package/js/src/pro/bitpanda.js +6 -6
  271. package/js/src/pro/bitrue.js +2 -2
  272. package/js/src/pro/bitstamp.js +7 -5
  273. package/js/src/pro/bittrex.js +6 -6
  274. package/js/src/pro/bitvavo.js +12 -8
  275. package/js/src/pro/blockchaincom.js +8 -8
  276. package/js/src/pro/bybit.js +7 -7
  277. package/js/src/pro/cex.js +14 -10
  278. package/js/src/pro/coinbase.js +5 -5
  279. package/js/src/pro/coinbasepro.js +12 -11
  280. package/js/src/pro/coinex.js +7 -9
  281. package/js/src/pro/cryptocom.js +9 -9
  282. package/js/src/pro/currencycom.js +4 -4
  283. package/js/src/pro/deribit.js +6 -6
  284. package/js/src/pro/exmo.js +12 -14
  285. package/js/src/pro/gate.js +7 -7
  286. package/js/src/pro/gemini.js +3 -3
  287. package/js/src/pro/hitbtc.d.ts +8 -1
  288. package/js/src/pro/hitbtc.js +264 -5
  289. package/js/src/pro/hollaex.js +5 -5
  290. package/js/src/pro/htx.js +6 -6
  291. package/js/src/pro/huobijp.js +3 -3
  292. package/js/src/pro/idex.js +4 -4
  293. package/js/src/pro/independentreserve.js +2 -2
  294. package/js/src/pro/kraken.js +10 -10
  295. package/js/src/pro/krakenfutures.d.ts +1 -0
  296. package/js/src/pro/krakenfutures.js +42 -18
  297. package/js/src/pro/kucoin.js +7 -7
  298. package/js/src/pro/kucoinfutures.js +8 -6
  299. package/js/src/pro/luno.js +2 -2
  300. package/js/src/pro/mexc.js +6 -6
  301. package/js/src/pro/ndax.js +3 -3
  302. package/js/src/pro/okcoin.js +5 -5
  303. package/js/src/pro/okx.js +12 -12
  304. package/js/src/pro/phemex.js +6 -6
  305. package/js/src/pro/poloniex.js +7 -7
  306. package/js/src/pro/poloniexfutures.js +5 -5
  307. package/js/src/pro/probit.js +6 -6
  308. package/js/src/pro/upbit.js +3 -3
  309. package/js/src/pro/wazirx.js +8 -8
  310. package/js/src/pro/whitebit.js +13 -9
  311. package/js/src/pro/woo.js +1 -1
  312. package/js/src/probit.js +29 -24
  313. package/js/src/tidex.js +16 -15
  314. package/js/src/timex.js +19 -18
  315. package/js/src/tokocrypto.js +28 -23
  316. package/js/src/upbit.js +19 -19
  317. package/js/src/wavesexchange.js +23 -20
  318. package/js/src/wazirx.js +25 -18
  319. package/js/src/whitebit.js +33 -27
  320. package/js/src/woo.js +45 -35
  321. package/js/src/yobit.js +25 -20
  322. package/js/src/zaif.js +9 -9
  323. package/js/src/zonda.js +18 -17
  324. package/package.json +2 -2
  325. package/js/src/bitstamp1.d.ts +0 -28
  326. package/js/src/bitstamp1.js +0 -430
  327. package/js/src/lbank2.d.ts +0 -90
  328. package/js/src/lbank2.js +0 -2779
@@ -59,7 +59,7 @@ export default class bitmex extends bitmexRest {
59
59
  * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
60
60
  * @param {string} symbol unified symbol of the market to fetch the ticker for
61
61
  * @param {object} [params] extra parameters specific to the bitmex api endpoint
62
- * @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
62
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
63
63
  */
64
64
  await this.loadMarkets();
65
65
  const market = this.market(symbol);
@@ -323,7 +323,7 @@ export default class bitmex extends bitmexRest {
323
323
  * @name bitmex#watchBalance
324
324
  * @description watch balance and get the amount of funds available for trading or funds locked in orders
325
325
  * @param {object} [params] extra parameters specific to the bitmex api endpoint
326
- * @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
326
+ * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
327
327
  */
328
328
  await this.loadMarkets();
329
329
  await this.authenticate();
@@ -534,7 +534,7 @@ export default class bitmex extends bitmexRest {
534
534
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
535
535
  * @param {int} [limit] the maximum amount of trades to fetch
536
536
  * @param {object} [params] extra parameters specific to the bitmex api endpoint
537
- * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
537
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
538
538
  */
539
539
  await this.loadMarkets();
540
540
  const market = this.market(symbol);
@@ -603,7 +603,7 @@ export default class bitmex extends bitmexRest {
603
603
  * @param {int} [since] the earliest time in ms to fetch orders for
604
604
  * @param {int} [limit] the maximum number of orde structures to retrieve
605
605
  * @param {object} [params] extra parameters specific to the bitmex api endpoint
606
- * @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
606
+ * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
607
607
  */
608
608
  await this.loadMarkets();
609
609
  await this.authenticate();
@@ -818,7 +818,7 @@ export default class bitmex extends bitmexRest {
818
818
  * @param {int} [since] the earliest time in ms to fetch trades for
819
819
  * @param {int} [limit] the maximum number of trade structures to retrieve
820
820
  * @param {object} [params] extra parameters specific to the bitmex api endpoint
821
- * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure
821
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure
822
822
  */
823
823
  await this.loadMarkets();
824
824
  await this.authenticate();
@@ -934,7 +934,7 @@ export default class bitmex extends bitmexRest {
934
934
  * @param {string} symbol unified symbol of the market to fetch the order book for
935
935
  * @param {int} [limit] the maximum amount of order book entries to return
936
936
  * @param {object} [params] extra parameters specific to the bitmex api endpoint
937
- * @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
937
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
938
938
  */
939
939
  let table = undefined;
940
940
  if (limit === undefined) {
@@ -59,7 +59,7 @@ export default class bitopro extends bitoproRest {
59
59
  * @param {string} symbol unified symbol of the market to fetch the order book for
60
60
  * @param {int} [limit] the maximum amount of order book entries to return
61
61
  * @param {object} [params] extra parameters specific to the bitopro api endpoint
62
- * @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
62
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
63
63
  */
64
64
  if (limit !== undefined) {
65
65
  if ((limit !== 5) && (limit !== 10) && (limit !== 20) && (limit !== 50) && (limit !== 100) && (limit !== 500) && (limit !== 1000)) {
@@ -125,7 +125,7 @@ export default class bitopro extends bitoproRest {
125
125
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
126
126
  * @param {int} [limit] the maximum amount of trades to fetch
127
127
  * @param {object} [params] extra parameters specific to the bitopro api endpoint
128
- * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
128
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
129
129
  */
130
130
  await this.loadMarkets();
131
131
  const market = this.market(symbol);
@@ -182,7 +182,7 @@ export default class bitopro extends bitoproRest {
182
182
  * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
183
183
  * @param {string} symbol unified symbol of the market to fetch the ticker for
184
184
  * @param {object} [params] extra parameters specific to the bitopro api endpoint
185
- * @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
185
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
186
186
  */
187
187
  await this.loadMarkets();
188
188
  const market = this.market(symbol);
@@ -260,7 +260,7 @@ export default class bitopro extends bitoproRest {
260
260
  * @name bitopro#watchBalance
261
261
  * @description watch balance and get the amount of funds available for trading or funds locked in orders
262
262
  * @param {object} [params] extra parameters specific to the bitopro api endpoint
263
- * @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
263
+ * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
264
264
  */
265
265
  this.checkRequiredCredentials();
266
266
  await this.loadMarkets();
@@ -83,7 +83,7 @@ export default class bitpanda extends bitpandaRest {
83
83
  * @see https://developers.bitpanda.com/exchange/#account-history-channel
84
84
  * @description watch balance and get the amount of funds available for trading or funds locked in orders
85
85
  * @param {object} [params] extra parameters specific to the bitpanda api endpoint
86
- * @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
86
+ * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
87
87
  */
88
88
  await this.authenticate(params);
89
89
  const url = this.urls['api']['ws'];
@@ -143,7 +143,7 @@ export default class bitpanda extends bitpandaRest {
143
143
  * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
144
144
  * @param {string} symbol unified symbol of the market to fetch the ticker for
145
145
  * @param {object} [params] extra parameters specific to the bitpanda api endpoint
146
- * @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
146
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
147
147
  */
148
148
  await this.loadMarkets();
149
149
  const market = this.market(symbol);
@@ -169,7 +169,7 @@ export default class bitpanda extends bitpandaRest {
169
169
  * @description watches price tickers, a statistical calculation with the information for all markets or those specified.
170
170
  * @param {string} symbols unified symbols of the markets to fetch the ticker for
171
171
  * @param {object} [params] extra parameters specific to the bitpanda api endpoint
172
- * @returns {object} an array of [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
172
+ * @returns {object} an array of [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
173
173
  */
174
174
  await this.loadMarkets();
175
175
  symbols = this.marketSymbols(symbols);
@@ -267,7 +267,7 @@ export default class bitpanda extends bitpandaRest {
267
267
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
268
268
  * @param {int} [limit] the maximum amount of trades to fetch
269
269
  * @param {object} [params] extra parameters specific to the bitpanda api endpoint
270
- * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
270
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
271
271
  */
272
272
  await this.loadMarkets();
273
273
  let messageHash = 'myTrades';
@@ -310,7 +310,7 @@ export default class bitpanda extends bitpandaRest {
310
310
  * @param {string} symbol unified symbol of the market to fetch the order book for
311
311
  * @param {int} [limit] the maximum amount of order book entries to return
312
312
  * @param {object} [params] extra parameters specific to the bitpanda api endpoint
313
- * @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
313
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
314
314
  */
315
315
  await this.loadMarkets();
316
316
  const market = this.market(symbol);
@@ -429,7 +429,7 @@ export default class bitpanda extends bitpandaRest {
429
429
  * @param {int} [limit] the maximum number of orde structures to retrieve
430
430
  * @param {object} [params] extra parameters specific to the bitpanda api endpoint
431
431
  * @param {string} [params.channel] can listen to orders using ACCOUNT_HISTORY or TRADING
432
- * @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
432
+ * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
433
433
  */
434
434
  await this.loadMarkets();
435
435
  let messageHash = 'orders';
@@ -61,7 +61,7 @@ export default class bitrue extends bitrueRest {
61
61
  * @description watch balance and get the amount of funds available for trading or funds locked in orders
62
62
  * @see https://github.com/Bitrue-exchange/Spot-official-api-docs#balance-update
63
63
  * @param {object} [params] extra parameters specific to the bitrue api endpoint
64
- * @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
64
+ * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
65
65
  */
66
66
  const url = await this.authenticate();
67
67
  const messageHash = 'balance';
@@ -176,7 +176,7 @@ export default class bitrue extends bitrueRest {
176
176
  * @param {int} [since] timestamp in ms of the earliest order
177
177
  * @param {int} [limit] the maximum amount of orders to return
178
178
  * @param {object} [params] extra parameters specific to the bitrue api endpoint
179
- * @returns {object} A dictionary of [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure} indexed by market symbols
179
+ * @returns {object} A dictionary of [order structure]{@link https://docs.ccxt.com/#/?id=order-structure} indexed by market symbols
180
180
  */
181
181
  await this.loadMarkets();
182
182
  if (symbol !== undefined) {
@@ -6,7 +6,7 @@
6
6
 
7
7
  // ---------------------------------------------------------------------------
8
8
  import bitstampRest from '../bitstamp.js';
9
- import { AuthenticationError } from '../base/errors.js';
9
+ import { ArgumentsRequired, AuthenticationError } from '../base/errors.js';
10
10
  import { ArrayCache, ArrayCacheBySymbolById } from '../base/ws/Cache.js';
11
11
  // ---------------------------------------------------------------------------
12
12
  export default class bitstamp extends bitstampRest {
@@ -52,7 +52,7 @@ export default class bitstamp extends bitstampRest {
52
52
  * @param {string} symbol unified symbol of the market to fetch the order book for
53
53
  * @param {int} [limit] the maximum amount of order book entries to return
54
54
  * @param {object} [params] extra parameters specific to the bitstamp api endpoint
55
- * @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
55
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
56
56
  */
57
57
  await this.loadMarkets();
58
58
  const market = this.market(symbol);
@@ -164,7 +164,7 @@ export default class bitstamp extends bitstampRest {
164
164
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
165
165
  * @param {int} [limit] the maximum amount of trades to fetch
166
166
  * @param {object} [params] extra parameters specific to the bitstamp api endpoint
167
- * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
167
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
168
168
  */
169
169
  await this.loadMarkets();
170
170
  const market = this.market(symbol);
@@ -271,9 +271,11 @@ export default class bitstamp extends bitstampRest {
271
271
  * @param {int} [since] the earliest time in ms to fetch orders for
272
272
  * @param {int} [limit] the maximum number of order structures to retrieve
273
273
  * @param {object} [params] extra parameters specific to the bitstamp api endpoint
274
- * @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
274
+ * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
275
275
  */
276
- this.checkRequiredSymbol('watchOrders', symbol);
276
+ if (symbol === undefined) {
277
+ throw new ArgumentsRequired(this.id + ' watchOrders() requires a symbol argument');
278
+ }
277
279
  await this.loadMarkets();
278
280
  const market = this.market(symbol);
279
281
  symbol = market['symbol'];
@@ -218,7 +218,7 @@ export default class bittrex extends bittrexRest {
218
218
  * @param {int} [since] the earliest time in ms to fetch orders for
219
219
  * @param {int} [limit] the maximum number of orde structures to retrieve
220
220
  * @param {object} [params] extra parameters specific to the bittrex api endpoint
221
- * @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
221
+ * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
222
222
  */
223
223
  await this.loadMarkets();
224
224
  if (symbol !== undefined) {
@@ -274,7 +274,7 @@ export default class bittrex extends bittrexRest {
274
274
  * @name bittrex#watchBalance
275
275
  * @description watch balance and get the amount of funds available for trading or funds locked in orders
276
276
  * @param {object} [params] extra parameters specific to the bittrex api endpoint
277
- * @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
277
+ * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
278
278
  */
279
279
  await this.loadMarkets();
280
280
  const authentication = await this.authenticate();
@@ -343,7 +343,7 @@ export default class bittrex extends bittrexRest {
343
343
  * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
344
344
  * @param {string} symbol unified symbol of the market to fetch the ticker for
345
345
  * @param {object} [params] extra parameters specific to the bittrex api endpoint
346
- * @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
346
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
347
347
  */
348
348
  await this.loadMarkets();
349
349
  const negotiation = await this.negotiate();
@@ -464,7 +464,7 @@ export default class bittrex extends bittrexRest {
464
464
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
465
465
  * @param {int} [limit] the maximum amount of trades to fetch
466
466
  * @param {object} [params] extra parameters specific to the bittrex api endpoint
467
- * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
467
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
468
468
  */
469
469
  await this.loadMarkets();
470
470
  symbol = this.symbol(symbol);
@@ -530,7 +530,7 @@ export default class bittrex extends bittrexRest {
530
530
  * @param {int} [since] the earliest time in ms to fetch trades for
531
531
  * @param {int} [limit] the maximum number of trade structures to retrieve
532
532
  * @param {object} [params] extra parameters specific to the bittrex api endpoint
533
- * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure
533
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure
534
534
  */
535
535
  await this.loadMarkets();
536
536
  if (symbol !== undefined) {
@@ -588,7 +588,7 @@ export default class bittrex extends bittrexRest {
588
588
  * @param {string} symbol unified symbol of the market to fetch the order book for
589
589
  * @param {int} [limit] the maximum amount of order book entries to return
590
590
  * @param {object} [params] extra parameters specific to the bittrex api endpoint
591
- * @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
591
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
592
592
  */
593
593
  limit = (limit === undefined) ? 25 : limit; // 25 by default
594
594
  if ((limit !== 1) && (limit !== 25) && (limit !== 500)) {
@@ -6,7 +6,7 @@
6
6
 
7
7
  // ---------------------------------------------------------------------------
8
8
  import bitvavoRest from '../bitvavo.js';
9
- import { AuthenticationError } from '../base/errors.js';
9
+ import { ArgumentsRequired, AuthenticationError } from '../base/errors.js';
10
10
  import { ArrayCache, ArrayCacheByTimestamp, ArrayCacheBySymbolById } from '../base/ws/Cache.js';
11
11
  import { sha256 } from '../static_dependencies/noble-hashes/sha256.js';
12
12
  // ---------------------------------------------------------------------------
@@ -60,7 +60,7 @@ export default class bitvavo extends bitvavoRest {
60
60
  * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
61
61
  * @param {string} symbol unified symbol of the market to fetch the ticker for
62
62
  * @param {object} [params] extra parameters specific to the bitvavo api endpoint
63
- * @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
63
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
64
64
  */
65
65
  return await this.watchPublic('ticker24h', symbol, params);
66
66
  }
@@ -109,7 +109,7 @@ export default class bitvavo extends bitvavoRest {
109
109
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
110
110
  * @param {int} [limit] the maximum amount of trades to fetch
111
111
  * @param {object} [params] extra parameters specific to the bitvavo api endpoint
112
- * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
112
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
113
113
  */
114
114
  await this.loadMarkets();
115
115
  symbol = this.symbol(symbol);
@@ -232,7 +232,7 @@ export default class bitvavo extends bitvavoRest {
232
232
  * @param {string} symbol unified symbol of the market to fetch the order book for
233
233
  * @param {int} [limit] the maximum amount of order book entries to return
234
234
  * @param {object} [params] extra parameters specific to the bitvavo api endpoint
235
- * @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
235
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
236
236
  */
237
237
  await this.loadMarkets();
238
238
  const market = this.market(symbol);
@@ -423,9 +423,11 @@ export default class bitvavo extends bitvavoRest {
423
423
  * @param {int} [since] the earliest time in ms to fetch orders for
424
424
  * @param {int} [limit] the maximum number of order structures to retrieve
425
425
  * @param {object} [params] extra parameters specific to the bitvavo api endpoint
426
- * @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
426
+ * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
427
427
  */
428
- this.checkRequiredSymbol('watchOrders', symbol);
428
+ if (symbol === undefined) {
429
+ throw new ArgumentsRequired(this.id + ' watchOrders() requires a symbol argument');
430
+ }
429
431
  await this.loadMarkets();
430
432
  await this.authenticate();
431
433
  const market = this.market(symbol);
@@ -458,9 +460,11 @@ export default class bitvavo extends bitvavoRest {
458
460
  * @param {int} [since] the earliest time in ms to fetch trades for
459
461
  * @param {int} [limit] the maximum number of trade structures to retrieve
460
462
  * @param {object} [params] extra parameters specific to the bitvavo api endpoint
461
- * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#ortradeder-structure
463
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=ortradeder-structure
462
464
  */
463
- this.checkRequiredSymbol('watchMyTrades', symbol);
465
+ if (symbol === undefined) {
466
+ throw new ArgumentsRequired(this.id + ' watchMyTrades() requires a symbol argument');
467
+ }
464
468
  await this.loadMarkets();
465
469
  await this.authenticate();
466
470
  const market = this.market(symbol);
@@ -58,7 +58,7 @@ export default class blockchaincom extends blockchaincomRest {
58
58
  * @description watch balance and get the amount of funds available for trading or funds locked in orders
59
59
  * @see https://exchange.blockchain.com/api/#balances
60
60
  * @param {object} [params] extra parameters specific to the blockchaincom api endpoint
61
- * @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
61
+ * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
62
62
  */
63
63
  await this.authenticate(params);
64
64
  const messageHash = 'balance';
@@ -111,12 +111,12 @@ export default class blockchaincom extends blockchaincomRest {
111
111
  const currencyId = this.safeString(entry, 'currency');
112
112
  const code = this.safeCurrencyCode(currencyId);
113
113
  const account = this.account();
114
- account['free'] = this.safeNumber(entry, 'available');
115
- account['total'] = this.safeNumber(entry, 'balance');
114
+ account['free'] = this.safeString(entry, 'available');
115
+ account['total'] = this.safeString(entry, 'balance');
116
116
  result[code] = account;
117
117
  }
118
118
  const messageHash = 'balance';
119
- this.balance = result;
119
+ this.balance = this.safeBalance(result);
120
120
  client.resolve(this.balance, messageHash);
121
121
  }
122
122
  async watchOHLCV(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
@@ -208,7 +208,7 @@ export default class blockchaincom extends blockchaincomRest {
208
208
  * @see https://exchange.blockchain.com/api/#ticker
209
209
  * @param {string} symbol unified symbol of the market to fetch the ticker for
210
210
  * @param {object} [params] extra parameters specific to the blockchaincom api endpoint
211
- * @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
211
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
212
212
  */
213
213
  await this.loadMarkets();
214
214
  const market = this.market(symbol);
@@ -317,7 +317,7 @@ export default class blockchaincom extends blockchaincomRest {
317
317
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
318
318
  * @param {int} [limit] the maximum amount of trades to fetch
319
319
  * @param {object} [params] extra parameters specific to the blockchaincom api endpoint
320
- * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
320
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
321
321
  */
322
322
  await this.loadMarkets();
323
323
  const market = this.market(symbol);
@@ -416,7 +416,7 @@ export default class blockchaincom extends blockchaincomRest {
416
416
  * @param {int} [since] the earliest time in ms to fetch orders for
417
417
  * @param {int} [limit] the maximum number of orde structures to retrieve
418
418
  * @param {object} [params] extra parameters specific to the blockchaincom api endpoint
419
- * @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
419
+ * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
420
420
  */
421
421
  await this.loadMarkets();
422
422
  await this.authenticate();
@@ -630,7 +630,7 @@ export default class blockchaincom extends blockchaincomRest {
630
630
  * @param {int} [limit] the maximum amount of order book entries to return
631
631
  * @param {objectConstructor} [params] extra parameters specific to the blockchaincom api endpoint
632
632
  * @param {string} [params.type] accepts l2 or l3 for level 2 or level 3 order book
633
- * @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
633
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
634
634
  */
635
635
  await this.loadMarkets();
636
636
  const market = this.market(symbol);
@@ -172,7 +172,7 @@ export default class bybit extends bybitRest {
172
172
  * @see https://bybit-exchange.github.io/docs/v5/websocket/public/etp-ticker
173
173
  * @param {string} symbol unified symbol of the market to fetch the ticker for
174
174
  * @param {object} [params] extra parameters specific to the bybit api endpoint
175
- * @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
175
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
176
176
  */
177
177
  await this.loadMarkets();
178
178
  const market = this.market(symbol);
@@ -198,7 +198,7 @@ export default class bybit extends bybitRest {
198
198
  * @see https://bybit-exchange.github.io/docs/v5/websocket/public/etp-ticker
199
199
  * @param {string[]} symbols unified symbol of the market to fetch the ticker for
200
200
  * @param {object} [params] extra parameters specific to the bybit api endpoint
201
- * @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
201
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
202
202
  */
203
203
  await this.loadMarkets();
204
204
  symbols = this.marketSymbols(symbols, undefined, false);
@@ -516,7 +516,7 @@ export default class bybit extends bybitRest {
516
516
  * @param {string} symbol unified symbol of the market to fetch the order book for
517
517
  * @param {int} [limit] the maximum amount of order book entries to return.
518
518
  * @param {object} [params] extra parameters specific to the bybit api endpoint
519
- * @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
519
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
520
520
  */
521
521
  await this.loadMarkets();
522
522
  const market = this.market(symbol);
@@ -670,7 +670,7 @@ export default class bybit extends bybitRest {
670
670
  * @param {int} [since] the earliest time in ms to fetch trades for
671
671
  * @param {int} [limit] the maximum number of trade structures to retrieve
672
672
  * @param {object} [params] extra parameters specific to the bybit api endpoint
673
- * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure
673
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure
674
674
  */
675
675
  await this.loadMarkets();
676
676
  const market = this.market(symbol);
@@ -858,7 +858,7 @@ export default class bybit extends bybitRest {
858
858
  * @param {int} [limit] the maximum number of orde structures to retrieve
859
859
  * @param {object} [params] extra parameters specific to the bybit api endpoint
860
860
  * @param {boolean} [params.unifiedMargin] use unified margin account
861
- * @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure
861
+ * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure
862
862
  */
863
863
  const method = 'watchMyTrades';
864
864
  let messageHash = 'myTrades';
@@ -1122,7 +1122,7 @@ export default class bybit extends bybitRest {
1122
1122
  * @param {int} [since] the earliest time in ms to fetch orders for
1123
1123
  * @param {int} [limit] the maximum number of orde structures to retrieve
1124
1124
  * @param {object} [params] extra parameters specific to the bybit api endpoint
1125
- * @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure
1125
+ * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure
1126
1126
  */
1127
1127
  await this.loadMarkets();
1128
1128
  const method = 'watchOrders';
@@ -1405,7 +1405,7 @@ export default class bybit extends bybitRest {
1405
1405
  * @description watch balance and get the amount of funds available for trading or funds locked in orders
1406
1406
  * @see https://bybit-exchange.github.io/docs/v5/websocket/private/wallet
1407
1407
  * @param {object} [params] extra parameters specific to the bybit api endpoint
1408
- * @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
1408
+ * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
1409
1409
  */
1410
1410
  await this.loadMarkets();
1411
1411
  const method = 'watchBalance';
package/js/src/pro/cex.js CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  // ---------------------------------------------------------------------------
8
8
  import cexRest from '../cex.js';
9
- import { ExchangeError } from '../base/errors.js';
9
+ import { ArgumentsRequired, ExchangeError } from '../base/errors.js';
10
10
  import { Precise } from '../base/Precise.js';
11
11
  import { ArrayCacheBySymbolById, ArrayCacheByTimestamp, ArrayCache } from '../base/ws/Cache.js';
12
12
  import { sha256 } from '../static_dependencies/noble-hashes/sha256.js';
@@ -50,7 +50,7 @@ export default class cex extends cexRest {
50
50
  * @description watch balance and get the amount of funds available for trading or funds locked in orders
51
51
  * @see https://cex.io/websocket-api#get-balance
52
52
  * @param {object} [params] extra parameters specific to the cex api endpoint
53
- * @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
53
+ * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
54
54
  */
55
55
  await this.authenticate(params);
56
56
  const messageHash = 'balance';
@@ -112,7 +112,7 @@ export default class cex extends cexRest {
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 cex api endpoint
115
- * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
115
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
116
116
  */
117
117
  await this.loadMarkets();
118
118
  const market = this.market(symbol);
@@ -228,7 +228,7 @@ export default class cex extends cexRest {
228
228
  * @param {string} symbol unified symbol of the market to fetch the ticker for
229
229
  * @param {object} [params] extra parameters specific to the cex api endpoint
230
230
  * @param {string} [params.method] public or private
231
- * @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
231
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
232
232
  */
233
233
  await this.loadMarkets();
234
234
  const market = this.market(symbol);
@@ -265,7 +265,7 @@ export default class cex extends cexRest {
265
265
  * @description watches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
266
266
  * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
267
267
  * @param {object} [params] extra parameters specific to the cex api endpoint
268
- * @returns {object} a dictionary of [ticker structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
268
+ * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
269
269
  */
270
270
  await this.loadMarkets();
271
271
  symbols = this.marketSymbols(symbols);
@@ -384,9 +384,11 @@ export default class cex extends cexRest {
384
384
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
385
385
  * @param {int} [limit] the maximum amount of trades to fetch
386
386
  * @param {object} [params] extra parameters specific to the cex api endpoint
387
- * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
387
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
388
388
  */
389
- this.checkRequiredSymbol('watchOrders', symbol);
389
+ if (symbol === undefined) {
390
+ throw new ArgumentsRequired(this.id + ' watchOrders() requires a symbol argument');
391
+ }
390
392
  await this.loadMarkets();
391
393
  await this.authenticate(params);
392
394
  const url = this.urls['api']['ws'];
@@ -420,9 +422,11 @@ export default class cex extends cexRest {
420
422
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
421
423
  * @param {int} [limit] the maximum amount of trades to fetch
422
424
  * @param {object} [params] extra parameters specific to the cex api endpoint
423
- * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
425
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
424
426
  */
425
- this.checkRequiredSymbol('watchMyTrades', symbol);
427
+ if (symbol === undefined) {
428
+ throw new ArgumentsRequired(this.id + ' watchMyTrades() requires a symbol argument');
429
+ }
426
430
  await this.loadMarkets();
427
431
  await this.authenticate(params);
428
432
  const url = this.urls['api']['ws'];
@@ -851,7 +855,7 @@ export default class cex extends cexRest {
851
855
  * @param {string} symbol unified symbol of the market to fetch the order book for
852
856
  * @param {int} [limit] the maximum amount of order book entries to return
853
857
  * @param {object} [params] extra parameters specific to the cex api endpoint
854
- * @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
858
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
855
859
  */
856
860
  await this.loadMarkets();
857
861
  await this.authenticate();
@@ -97,7 +97,7 @@ export default class coinbase extends coinbaseRest {
97
97
  * @see https://docs.cloud.coinbase.com/advanced-trade-api/docs/ws-channels#ticker-channel
98
98
  * @param {string} [symbol] unified symbol of the market to fetch the ticker for
99
99
  * @param {object} [params] extra parameters specific to the coinbasepro api endpoint
100
- * @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
100
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
101
101
  */
102
102
  const name = 'ticker';
103
103
  return await this.subscribe(name, symbol, params);
@@ -110,7 +110,7 @@ export default class coinbase extends coinbaseRest {
110
110
  * @see https://docs.cloud.coinbase.com/advanced-trade-api/docs/ws-channels#ticker-batch-channel
111
111
  * @param {string[]} [symbols] unified symbol of the market to fetch the ticker for
112
112
  * @param {object} [params] extra parameters specific to the coinbasepro api endpoint
113
- * @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
113
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
114
114
  */
115
115
  if (symbols === undefined) {
116
116
  throw new ArgumentsRequired(this.id + ' watchTickers requires a symbols argument');
@@ -251,7 +251,7 @@ export default class coinbase extends coinbaseRest {
251
251
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
252
252
  * @param {int} [limit] the maximum amount of trades to fetch
253
253
  * @param {object} [params] extra parameters specific to the coinbasepro api endpoint
254
- * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
254
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
255
255
  */
256
256
  await this.loadMarkets();
257
257
  symbol = this.symbol(symbol);
@@ -272,7 +272,7 @@ export default class coinbase extends coinbaseRest {
272
272
  * @param {int} [since] the earliest time in ms to fetch orders for
273
273
  * @param {int} [limit] the maximum number of orde structures to retrieve
274
274
  * @param {object} [params] extra parameters specific to the coinbasepro api endpoint
275
- * @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
275
+ * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
276
276
  */
277
277
  await this.loadMarkets();
278
278
  const name = 'user';
@@ -291,7 +291,7 @@ export default class coinbase extends coinbaseRest {
291
291
  * @param {string} symbol unified symbol of the market to fetch the order book for
292
292
  * @param {int} [limit] the maximum amount of order book entries to return
293
293
  * @param {object} [params] extra parameters specific to the coinbasepro api endpoint
294
- * @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
294
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
295
295
  */
296
296
  await this.loadMarkets();
297
297
  const name = 'level2';