ccxt 4.1.56 → 4.1.58

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 (318) 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 +3893 -3214
  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/base/ws/Client.js +1 -1
  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 +16 -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 +110 -89
  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 +100 -77
  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 +132 -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 +87 -82
  82. package/dist/cjs/src/p2b.js +79 -82
  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 +15 -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/bybit.d.ts +1 -0
  152. package/js/src/abstract/cryptocom.d.ts +0 -20
  153. package/js/src/ace.js +18 -14
  154. package/js/src/alpaca.js +6 -6
  155. package/js/src/ascendex.js +35 -29
  156. package/js/src/base/Exchange.d.ts +37 -34
  157. package/js/src/base/Exchange.js +39 -26
  158. package/js/src/base/Precise.d.ts +4 -4
  159. package/js/src/base/Precise.js +1 -3
  160. package/js/src/base/functions/type.d.ts +25 -25
  161. package/js/src/base/types.d.ts +21 -14
  162. package/js/src/base/ws/Client.js +1 -1
  163. package/js/src/bigone.js +25 -21
  164. package/js/src/binance.d.ts +2 -2
  165. package/js/src/binance.js +97 -76
  166. package/js/src/bingx.js +63 -44
  167. package/js/src/bit2c.js +19 -16
  168. package/js/src/bitbank.js +16 -15
  169. package/js/src/bitbns.js +28 -18
  170. package/js/src/bitfinex.js +23 -21
  171. package/js/src/bitfinex2.js +32 -28
  172. package/js/src/bitflyer.js +28 -20
  173. package/js/src/bitforex.js +26 -19
  174. package/js/src/bitget.d.ts +25 -3
  175. package/js/src/bitget.js +184 -147
  176. package/js/src/bithumb.js +23 -16
  177. package/js/src/bitmart.d.ts +1 -1
  178. package/js/src/bitmart.js +110 -89
  179. package/js/src/bitmex.d.ts +2 -2
  180. package/js/src/bitmex.js +104 -64
  181. package/js/src/bitopro.js +38 -26
  182. package/js/src/bitpanda.js +24 -23
  183. package/js/src/bitrue.js +33 -24
  184. package/js/src/bitso.js +24 -23
  185. package/js/src/bitstamp.d.ts +2 -2
  186. package/js/src/bitstamp.js +24 -23
  187. package/js/src/bittrex.js +30 -29
  188. package/js/src/bitvavo.js +38 -30
  189. package/js/src/bl3p.js +11 -10
  190. package/js/src/blockchaincom.js +20 -20
  191. package/js/src/btcalpha.js +18 -17
  192. package/js/src/btcbox.js +13 -12
  193. package/js/src/btcmarkets.js +20 -19
  194. package/js/src/btcturk.js +14 -13
  195. package/js/src/bybit.d.ts +1 -1
  196. package/js/src/bybit.js +84 -54
  197. package/js/src/cex.js +16 -14
  198. package/js/src/coinbase.js +29 -27
  199. package/js/src/coinbasepro.js +27 -25
  200. package/js/src/coincheck.js +15 -14
  201. package/js/src/coinex.d.ts +1 -1
  202. package/js/src/coinex.js +100 -77
  203. package/js/src/coinlist.js +28 -27
  204. package/js/src/coinmate.js +21 -18
  205. package/js/src/coinone.js +21 -16
  206. package/js/src/coinsph.js +37 -28
  207. package/js/src/coinspot.js +12 -11
  208. package/js/src/cryptocom.d.ts +0 -23
  209. package/js/src/cryptocom.js +40 -202
  210. package/js/src/currencycom.js +32 -25
  211. package/js/src/delta.js +35 -29
  212. package/js/src/deribit.js +39 -36
  213. package/js/src/digifinex.d.ts +2 -2
  214. package/js/src/digifinex.js +65 -45
  215. package/js/src/exmo.js +29 -27
  216. package/js/src/gate.d.ts +1 -1
  217. package/js/src/gate.js +67 -53
  218. package/js/src/gemini.js +23 -20
  219. package/js/src/hitbtc.d.ts +1 -0
  220. package/js/src/hitbtc.js +65 -56
  221. package/js/src/hollaex.js +30 -27
  222. package/js/src/htx.d.ts +11 -3
  223. package/js/src/htx.js +132 -143
  224. package/js/src/huobijp.js +23 -21
  225. package/js/src/idex.js +22 -21
  226. package/js/src/independentreserve.js +15 -14
  227. package/js/src/indodax.js +30 -26
  228. package/js/src/kraken.js +29 -27
  229. package/js/src/krakenfutures.js +29 -22
  230. package/js/src/kucoin.d.ts +1 -1
  231. package/js/src/kucoin.js +48 -43
  232. package/js/src/kucoinfutures.js +33 -28
  233. package/js/src/kuna.js +25 -24
  234. package/js/src/latoken.js +25 -23
  235. package/js/src/lbank.js +46 -31
  236. package/js/src/luno.js +22 -19
  237. package/js/src/lykke.js +19 -17
  238. package/js/src/mercado.js +30 -19
  239. package/js/src/mexc.d.ts +1 -1
  240. package/js/src/mexc.js +60 -49
  241. package/js/src/ndax.js +23 -22
  242. package/js/src/novadax.js +23 -22
  243. package/js/src/oceanex.js +22 -19
  244. package/js/src/okcoin.js +29 -23
  245. package/js/src/okx.d.ts +2 -2
  246. package/js/src/okx.js +87 -82
  247. package/js/src/p2b.d.ts +8 -7
  248. package/js/src/p2b.js +79 -81
  249. package/js/src/paymium.js +10 -10
  250. package/js/src/phemex.js +63 -40
  251. package/js/src/poloniex.js +22 -22
  252. package/js/src/poloniexfutures.js +23 -19
  253. package/js/src/pro/alpaca.js +5 -5
  254. package/js/src/pro/ascendex.js +4 -4
  255. package/js/src/pro/binance.js +16 -16
  256. package/js/src/pro/bingx.js +1 -1
  257. package/js/src/pro/bitfinex.js +4 -4
  258. package/js/src/pro/bitfinex2.d.ts +1 -1
  259. package/js/src/pro/bitfinex2.js +6 -6
  260. package/js/src/pro/bitget.js +7 -7
  261. package/js/src/pro/bitmart.js +7 -5
  262. package/js/src/pro/bitmex.js +6 -6
  263. package/js/src/pro/bitopro.js +4 -4
  264. package/js/src/pro/bitpanda.js +6 -6
  265. package/js/src/pro/bitrue.js +2 -2
  266. package/js/src/pro/bitstamp.js +7 -5
  267. package/js/src/pro/bittrex.js +15 -6
  268. package/js/src/pro/bitvavo.js +12 -8
  269. package/js/src/pro/blockchaincom.js +8 -8
  270. package/js/src/pro/bybit.js +7 -7
  271. package/js/src/pro/cex.js +14 -10
  272. package/js/src/pro/coinbase.js +5 -5
  273. package/js/src/pro/coinbasepro.js +12 -11
  274. package/js/src/pro/coinex.js +7 -9
  275. package/js/src/pro/cryptocom.js +9 -9
  276. package/js/src/pro/currencycom.js +4 -4
  277. package/js/src/pro/deribit.js +6 -6
  278. package/js/src/pro/exmo.js +12 -14
  279. package/js/src/pro/gate.js +7 -7
  280. package/js/src/pro/gemini.js +3 -3
  281. package/js/src/pro/hitbtc.d.ts +8 -1
  282. package/js/src/pro/hitbtc.js +264 -5
  283. package/js/src/pro/hollaex.js +5 -5
  284. package/js/src/pro/htx.js +6 -6
  285. package/js/src/pro/huobijp.js +3 -3
  286. package/js/src/pro/idex.js +4 -4
  287. package/js/src/pro/independentreserve.js +2 -2
  288. package/js/src/pro/kraken.js +10 -10
  289. package/js/src/pro/krakenfutures.d.ts +1 -0
  290. package/js/src/pro/krakenfutures.js +42 -18
  291. package/js/src/pro/kucoin.js +7 -7
  292. package/js/src/pro/kucoinfutures.js +8 -6
  293. package/js/src/pro/luno.js +2 -2
  294. package/js/src/pro/mexc.js +6 -6
  295. package/js/src/pro/ndax.js +3 -3
  296. package/js/src/pro/okcoin.js +5 -5
  297. package/js/src/pro/okx.js +12 -12
  298. package/js/src/pro/phemex.js +6 -6
  299. package/js/src/pro/poloniex.js +7 -7
  300. package/js/src/pro/poloniexfutures.js +5 -5
  301. package/js/src/pro/probit.js +6 -6
  302. package/js/src/pro/upbit.js +3 -3
  303. package/js/src/pro/wazirx.js +8 -8
  304. package/js/src/pro/whitebit.js +13 -9
  305. package/js/src/pro/woo.js +1 -1
  306. package/js/src/probit.js +29 -24
  307. package/js/src/tidex.js +16 -15
  308. package/js/src/timex.js +19 -18
  309. package/js/src/tokocrypto.js +28 -23
  310. package/js/src/upbit.js +19 -19
  311. package/js/src/wavesexchange.js +23 -20
  312. package/js/src/wazirx.js +25 -18
  313. package/js/src/whitebit.js +33 -27
  314. package/js/src/woo.js +45 -35
  315. package/js/src/yobit.js +25 -20
  316. package/js/src/zaif.js +9 -9
  317. package/js/src/zonda.js +18 -17
  318. package/package.json +1 -1
package/js/src/bitbns.js CHANGED
@@ -159,7 +159,7 @@ export default class bitbns extends Exchange {
159
159
  * @name bitbns#fetchStatus
160
160
  * @description the latest known information on the availability of the exchange API
161
161
  * @param {object} [params] extra parameters specific to the bitbns api endpoint
162
- * @returns {object} a [status structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#exchange-status-structure}
162
+ * @returns {object} a [status structure]{@link https://docs.ccxt.com/#/?id=exchange-status-structure}
163
163
  */
164
164
  const response = await this.v1GetPlatformStatus(params);
165
165
  //
@@ -292,7 +292,7 @@ export default class bitbns extends Exchange {
292
292
  * @param {string} symbol unified symbol of the market to fetch the order book for
293
293
  * @param {int} [limit] the maximum amount of order book entries to return
294
294
  * @param {object} [params] extra parameters specific to the bitbns api endpoint
295
- * @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
295
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
296
296
  */
297
297
  await this.loadMarkets();
298
298
  const market = this.market(symbol);
@@ -388,7 +388,7 @@ export default class bitbns extends Exchange {
388
388
  * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
389
389
  * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
390
390
  * @param {object} [params] extra parameters specific to the bitbns api endpoint
391
- * @returns {object} a dictionary of [ticker structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
391
+ * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
392
392
  */
393
393
  await this.loadMarkets();
394
394
  const response = await this.wwwGetOrderFetchTickers(params);
@@ -460,7 +460,7 @@ export default class bitbns extends Exchange {
460
460
  * @name bitbns#fetchBalance
461
461
  * @description query for balance and get the amount of funds available for trading or funds locked in orders
462
462
  * @param {object} [params] extra parameters specific to the bitbns api endpoint
463
- * @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
463
+ * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
464
464
  */
465
465
  await this.loadMarkets();
466
466
  const response = await this.v1PostCurrentCoinBalanceEVERYTHING(params);
@@ -596,7 +596,7 @@ export default class bitbns extends Exchange {
596
596
  * EXCHANGE SPECIFIC PARAMETERS
597
597
  * @param {float} [params.target_rate] *requires params.trail_rate when set, type must be 'limit'* a bracket order is placed when set
598
598
  * @param {float} [params.trail_rate] *requires params.target_rate when set, type must be 'limit'* a bracket order is placed when set
599
- * @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
599
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
600
600
  */
601
601
  await this.loadMarkets();
602
602
  const market = this.market(symbol);
@@ -652,9 +652,11 @@ export default class bitbns extends Exchange {
652
652
  * @param {string} symbol unified symbol of the market the order was made in
653
653
  * @param {object} [params] extra parameters specific to the bitbns api endpoint
654
654
  * @param {boolean} [params.trigger] true if cancelling a trigger order
655
- * @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
655
+ * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
656
656
  */
657
- this.checkRequiredSymbol('cancelOrder', symbol);
657
+ if (symbol === undefined) {
658
+ throw new ArgumentsRequired(this.id + ' cancelOrder() requires a symbol argument');
659
+ }
658
660
  await this.loadMarkets();
659
661
  const market = this.market(symbol);
660
662
  const isTrigger = this.safeValue2(params, 'trigger', 'stop');
@@ -680,9 +682,11 @@ export default class bitbns extends Exchange {
680
682
  * @param {string} id order id
681
683
  * @param {string} symbol unified symbol of the market the order was made in
682
684
  * @param {object} [params] extra parameters specific to the bitbns api endpoint
683
- * @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
685
+ * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
684
686
  */
685
- this.checkRequiredSymbol('fetchOrder', symbol);
687
+ if (symbol === undefined) {
688
+ throw new ArgumentsRequired(this.id + ' fetchOrder() requires a symbol argument');
689
+ }
686
690
  await this.loadMarkets();
687
691
  const market = this.market(symbol);
688
692
  const request = {
@@ -735,9 +739,11 @@ export default class bitbns extends Exchange {
735
739
  * @param {int} [limit] the maximum number of open orders structures to retrieve
736
740
  * @param {object} [params] extra parameters specific to the bitbns api endpoint
737
741
  * @param {boolean} [params.trigger] true if fetching trigger orders
738
- * @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
742
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
739
743
  */
740
- this.checkRequiredSymbol('fetchOpenOrders', symbol);
744
+ if (symbol === undefined) {
745
+ throw new ArgumentsRequired(this.id + ' fetchOpenOrders() requires a symbol argument');
746
+ }
741
747
  await this.loadMarkets();
742
748
  const market = this.market(symbol);
743
749
  const isTrigger = this.safeValue2(params, 'trigger', 'stop');
@@ -863,9 +869,11 @@ export default class bitbns extends Exchange {
863
869
  * @param {int} [since] the earliest time in ms to fetch trades for
864
870
  * @param {int} [limit] the maximum number of trades structures to retrieve
865
871
  * @param {object} [params] extra parameters specific to the bitbns api endpoint
866
- * @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
872
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
867
873
  */
868
- this.checkRequiredSymbol('fetchMyTrades', symbol);
874
+ if (symbol === undefined) {
875
+ throw new ArgumentsRequired(this.id + ' fetchMyTrades() requires a symbol argument');
876
+ }
869
877
  await this.loadMarkets();
870
878
  const market = this.market(symbol);
871
879
  const request = {
@@ -929,9 +937,11 @@ export default class bitbns extends Exchange {
929
937
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
930
938
  * @param {int} [limit] the maximum amount of trades to fetch
931
939
  * @param {object} [params] extra parameters specific to the bitbns api endpoint
932
- * @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
940
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
933
941
  */
934
- this.checkRequiredSymbol('fetchTrades', symbol);
942
+ if (symbol === undefined) {
943
+ throw new ArgumentsRequired(this.id + ' fetchTrades() requires a symbol argument');
944
+ }
935
945
  await this.loadMarkets();
936
946
  const market = this.market(symbol);
937
947
  const request = {
@@ -957,7 +967,7 @@ export default class bitbns extends Exchange {
957
967
  * @param {int} [since] the earliest time in ms to fetch deposits for
958
968
  * @param {int} [limit] the maximum number of deposits structures to retrieve
959
969
  * @param {object} [params] extra parameters specific to the bitbns api endpoint
960
- * @returns {object[]} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
970
+ * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
961
971
  */
962
972
  if (code === undefined) {
963
973
  throw new ArgumentsRequired(this.id + ' fetchDeposits() requires a currency code argument');
@@ -1004,7 +1014,7 @@ export default class bitbns extends Exchange {
1004
1014
  * @param {int} [since] the earliest time in ms to fetch withdrawals for
1005
1015
  * @param {int} [limit] the maximum number of withdrawals structures to retrieve
1006
1016
  * @param {object} [params] extra parameters specific to the bitbns api endpoint
1007
- * @returns {object[]} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
1017
+ * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
1008
1018
  */
1009
1019
  if (code === undefined) {
1010
1020
  throw new ArgumentsRequired(this.id + ' fetchWithdrawals() requires a currency code argument');
@@ -1116,7 +1126,7 @@ export default class bitbns extends Exchange {
1116
1126
  * @description fetch the deposit address for a currency associated with this account
1117
1127
  * @param {string} code unified currency code
1118
1128
  * @param {object} [params] extra parameters specific to the bitbns api endpoint
1119
- * @returns {object} an [address structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#address-structure}
1129
+ * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
1120
1130
  */
1121
1131
  await this.loadMarkets();
1122
1132
  const currency = this.currency(code);
@@ -405,7 +405,7 @@ export default class bitfinex extends Exchange {
405
405
  * @see https://docs.bitfinex.com/v1/reference/rest-auth-fees
406
406
  * @param {string[]|undefined} codes list of unified currency codes
407
407
  * @param {object} [params] extra parameters specific to the bitfinex api endpoint
408
- * @returns {object[]} a list of [fees structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure}
408
+ * @returns {object[]} a list of [fees structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
409
409
  */
410
410
  await this.loadMarkets();
411
411
  const result = {};
@@ -441,7 +441,7 @@ export default class bitfinex extends Exchange {
441
441
  * @see https://docs.bitfinex.com/v1/reference/rest-auth-fees
442
442
  * @param {string[]|undefined} codes list of unified currency codes
443
443
  * @param {object} [params] extra parameters specific to the bitfinex api endpoint
444
- * @returns {object[]} a list of [fees structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure}
444
+ * @returns {object[]} a list of [fees structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
445
445
  */
446
446
  await this.loadMarkets();
447
447
  const response = await this.privatePostAccountFees(params);
@@ -479,7 +479,7 @@ export default class bitfinex extends Exchange {
479
479
  * @name bitfinex#fetchTradingFees
480
480
  * @description fetch the trading fees for multiple markets
481
481
  * @param {object} [params] extra parameters specific to the bitfinex api endpoint
482
- * @returns {object} a dictionary of [fee structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure} indexed by market symbols
482
+ * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
483
483
  */
484
484
  await this.loadMarkets();
485
485
  const response = await this.privatePostSummary(params);
@@ -685,7 +685,7 @@ export default class bitfinex extends Exchange {
685
685
  * @name bitfinex#fetchBalance
686
686
  * @description query for balance and get the amount of funds available for trading or funds locked in orders
687
687
  * @param {object} [params] extra parameters specific to the bitfinex api endpoint
688
- * @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
688
+ * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
689
689
  */
690
690
  await this.loadMarkets();
691
691
  const accountsByType = this.safeValue(this.options, 'accountsByType', {});
@@ -746,7 +746,7 @@ export default class bitfinex extends Exchange {
746
746
  * @param {string} fromAccount account to transfer from
747
747
  * @param {string} toAccount account to transfer to
748
748
  * @param {object} [params] extra parameters specific to the bitfinex api endpoint
749
- * @returns {object} a [transfer structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transfer-structure}
749
+ * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
750
750
  */
751
751
  // transferring between derivatives wallet and regular wallet is not documented in their API
752
752
  // however we support it in CCXT (from just looking at web inspector)
@@ -830,7 +830,7 @@ export default class bitfinex extends Exchange {
830
830
  * @param {string} symbol unified symbol of the market to fetch the order book for
831
831
  * @param {int} [limit] the maximum amount of order book entries to return
832
832
  * @param {object} [params] extra parameters specific to the bitfinex api endpoint
833
- * @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
833
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
834
834
  */
835
835
  await this.loadMarkets();
836
836
  const market = this.market(symbol);
@@ -851,7 +851,7 @@ export default class bitfinex extends Exchange {
851
851
  * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
852
852
  * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
853
853
  * @param {object} [params] extra parameters specific to the bitfinex api endpoint
854
- * @returns {object} a dictionary of [ticker structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
854
+ * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
855
855
  */
856
856
  await this.loadMarkets();
857
857
  symbols = this.marketSymbols(symbols);
@@ -871,7 +871,7 @@ export default class bitfinex extends Exchange {
871
871
  * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
872
872
  * @param {string} symbol unified symbol of the market to fetch the ticker for
873
873
  * @param {object} [params] extra parameters specific to the bitfinex api endpoint
874
- * @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
874
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
875
875
  */
876
876
  await this.loadMarkets();
877
877
  const market = this.market(symbol);
@@ -989,7 +989,7 @@ export default class bitfinex extends Exchange {
989
989
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
990
990
  * @param {int} [limit] the maximum amount of trades to fetch
991
991
  * @param {object} [params] extra parameters specific to the bitfinex api endpoint
992
- * @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
992
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
993
993
  */
994
994
  await this.loadMarkets();
995
995
  const market = this.market(symbol);
@@ -1024,9 +1024,11 @@ export default class bitfinex extends Exchange {
1024
1024
  * @param {int} [since] the earliest time in ms to fetch trades for
1025
1025
  * @param {int} [limit] the maximum number of trades structures to retrieve
1026
1026
  * @param {object} [params] extra parameters specific to the bitfinex api endpoint
1027
- * @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
1027
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
1028
1028
  */
1029
- this.checkRequiredSymbol('fetchMyTrades', symbol);
1029
+ if (symbol === undefined) {
1030
+ throw new ArgumentsRequired(this.id + ' fetchMyTrades() requires a symbol argument');
1031
+ }
1030
1032
  await this.loadMarkets();
1031
1033
  const market = this.market(symbol);
1032
1034
  const request = {
@@ -1052,7 +1054,7 @@ export default class bitfinex extends Exchange {
1052
1054
  * @param {float} amount how much of currency you want to trade in units of base currency
1053
1055
  * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
1054
1056
  * @param {object} [params] extra parameters specific to the bitfinex api endpoint
1055
- * @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1057
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1056
1058
  */
1057
1059
  await this.loadMarkets();
1058
1060
  const market = this.market(symbol);
@@ -1116,7 +1118,7 @@ export default class bitfinex extends Exchange {
1116
1118
  * @param {string} id order id
1117
1119
  * @param {string} symbol not used by bitfinex cancelOrder ()
1118
1120
  * @param {object} [params] extra parameters specific to the bitfinex api endpoint
1119
- * @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1121
+ * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1120
1122
  */
1121
1123
  await this.loadMarkets();
1122
1124
  const request = {
@@ -1217,7 +1219,7 @@ export default class bitfinex extends Exchange {
1217
1219
  * @param {int} [since] the earliest time in ms to fetch open orders for
1218
1220
  * @param {int} [limit] the maximum number of open orders structures to retrieve
1219
1221
  * @param {object} [params] extra parameters specific to the bitfinex api endpoint
1220
- * @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1222
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
1221
1223
  */
1222
1224
  await this.loadMarkets();
1223
1225
  if (symbol !== undefined) {
@@ -1241,7 +1243,7 @@ export default class bitfinex extends Exchange {
1241
1243
  * @param {int} [since] the earliest time in ms to fetch orders for
1242
1244
  * @param {int} [limit] the maximum number of orde structures to retrieve
1243
1245
  * @param {object} [params] extra parameters specific to the bitfinex api endpoint
1244
- * @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1246
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
1245
1247
  */
1246
1248
  await this.loadMarkets();
1247
1249
  symbol = this.symbol(symbol);
@@ -1264,7 +1266,7 @@ export default class bitfinex extends Exchange {
1264
1266
  * @description fetches information on an order made by the user
1265
1267
  * @param {string} symbol not used by bitfinex fetchOrder
1266
1268
  * @param {object} [params] extra parameters specific to the bitfinex api endpoint
1267
- * @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1269
+ * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1268
1270
  */
1269
1271
  await this.loadMarkets();
1270
1272
  const request = {
@@ -1344,7 +1346,7 @@ export default class bitfinex extends Exchange {
1344
1346
  * @description create a currency deposit address
1345
1347
  * @param {string} code unified currency code of the currency for the deposit address
1346
1348
  * @param {object} [params] extra parameters specific to the bitfinex api endpoint
1347
- * @returns {object} an [address structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#address-structure}
1349
+ * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
1348
1350
  */
1349
1351
  await this.loadMarkets();
1350
1352
  const request = {
@@ -1359,7 +1361,7 @@ export default class bitfinex extends Exchange {
1359
1361
  * @description fetch the deposit address for a currency associated with this account
1360
1362
  * @param {string} code unified currency code
1361
1363
  * @param {object} [params] extra parameters specific to the bitfinex api endpoint
1362
- * @returns {object} an [address structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#address-structure}
1364
+ * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
1363
1365
  */
1364
1366
  await this.loadMarkets();
1365
1367
  // todo rewrite for https://api-pub.bitfinex.com//v2/conf/pub:map:tx:method
@@ -1394,7 +1396,7 @@ export default class bitfinex extends Exchange {
1394
1396
  * @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
1395
1397
  * @param {int} [limit] max number of deposit/withdrawals to return, default is undefined
1396
1398
  * @param {object} [params] extra parameters specific to the bitfinex api endpoint
1397
- * @returns {object} a list of [transaction structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
1399
+ * @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
1398
1400
  */
1399
1401
  await this.loadMarkets();
1400
1402
  let currencyId = this.safeString(params, 'currency');
@@ -1531,7 +1533,7 @@ export default class bitfinex extends Exchange {
1531
1533
  * @param {string} address the address to withdraw to
1532
1534
  * @param {string} tag
1533
1535
  * @param {object} [params] extra parameters specific to the bitfinex api endpoint
1534
- * @returns {object} a [transaction structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
1536
+ * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
1535
1537
  */
1536
1538
  [tag, params] = this.handleWithdrawTagAndParams(tag, params);
1537
1539
  this.checkAddress(address);
@@ -1578,7 +1580,7 @@ export default class bitfinex extends Exchange {
1578
1580
  * @description fetch all open positions
1579
1581
  * @param {string[]|undefined} symbols list of unified market symbols
1580
1582
  * @param {object} [params] extra parameters specific to the bitfinex api endpoint
1581
- * @returns {object[]} a list of [position structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#position-structure}
1583
+ * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
1582
1584
  */
1583
1585
  await this.loadMarkets();
1584
1586
  const response = await this.privatePostPositions(params);
@@ -437,7 +437,7 @@ export default class bitfinex2 extends Exchange {
437
437
  * @description the latest known information on the availability of the exchange API
438
438
  * @see https://docs.bitfinex.com/reference/rest-public-platform-status
439
439
  * @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
440
- * @returns {object} a [status structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#exchange-status-structure}
440
+ * @returns {object} a [status structure]{@link https://docs.ccxt.com/#/?id=exchange-status-structure}
441
441
  */
442
442
  //
443
443
  // [1] // operative
@@ -801,7 +801,7 @@ export default class bitfinex2 extends Exchange {
801
801
  * @description query for balance and get the amount of funds available for trading or funds locked in orders
802
802
  * @see https://docs.bitfinex.com/reference/rest-auth-wallets
803
803
  * @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
804
- * @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
804
+ * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
805
805
  */
806
806
  // this api call does not return the 'used' amount - use the v1 version instead (which also returns zero balances)
807
807
  // there is a difference between this and the v1 api, namely trading wallet is called margin in v2
@@ -846,7 +846,7 @@ export default class bitfinex2 extends Exchange {
846
846
  * @param {string} fromAccount account to transfer from
847
847
  * @param {string} toAccount account to transfer to
848
848
  * @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
849
- * @returns {object} a [transfer structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transfer-structure}
849
+ * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
850
850
  */
851
851
  // transferring between derivatives wallet and regular wallet is not documented in their API
852
852
  // however we support it in CCXT (from just looking at web inspector)
@@ -990,7 +990,7 @@ export default class bitfinex2 extends Exchange {
990
990
  * @param {string} symbol unified symbol of the market to fetch the order book for
991
991
  * @param {int} [limit] the maximum amount of order book entries to return
992
992
  * @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
993
- * @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
993
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
994
994
  */
995
995
  await this.loadMarkets();
996
996
  const precision = this.safeValue(this.options, 'precision', 'R0');
@@ -1102,7 +1102,7 @@ export default class bitfinex2 extends Exchange {
1102
1102
  * @see https://docs.bitfinex.com/reference/rest-public-tickers
1103
1103
  * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
1104
1104
  * @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
1105
- * @returns {object} a dictionary of [ticker structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
1105
+ * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1106
1106
  */
1107
1107
  await this.loadMarkets();
1108
1108
  symbols = this.marketSymbols(symbols);
@@ -1172,7 +1172,7 @@ export default class bitfinex2 extends Exchange {
1172
1172
  * @see https://docs.bitfinex.com/reference/rest-public-ticker
1173
1173
  * @param {string} symbol unified symbol of the market to fetch the ticker for
1174
1174
  * @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
1175
- * @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
1175
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1176
1176
  */
1177
1177
  await this.loadMarkets();
1178
1178
  const market = this.market(symbol);
@@ -1277,7 +1277,7 @@ export default class bitfinex2 extends Exchange {
1277
1277
  * @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
1278
1278
  * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
1279
1279
  * @param {int} [params.until] the latest time in ms to fetch entries for
1280
- * @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
1280
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
1281
1281
  */
1282
1282
  await this.loadMarkets();
1283
1283
  let paginate = false;
@@ -1505,7 +1505,7 @@ export default class bitfinex2 extends Exchange {
1505
1505
  * @param {string} [params.price_traling] The trailing price for a trailing stop order
1506
1506
  * @param {string} [params.price_aux_limit] Order price for stop limit orders
1507
1507
  * @param {string} [params.price_oco_stop] OCO stop price
1508
- * @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1508
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1509
1509
  */
1510
1510
  await this.loadMarkets();
1511
1511
  const market = this.market(symbol);
@@ -1657,7 +1657,7 @@ export default class bitfinex2 extends Exchange {
1657
1657
  * @see https://docs.bitfinex.com/reference/rest-auth-cancel-orders-multiple
1658
1658
  * @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
1659
1659
  * @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
1660
- * @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1660
+ * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
1661
1661
  */
1662
1662
  const request = {
1663
1663
  'all': 1,
@@ -1675,7 +1675,7 @@ export default class bitfinex2 extends Exchange {
1675
1675
  * @param {string} id order id
1676
1676
  * @param {string} symbol Not used by bitfinex2 cancelOrder ()
1677
1677
  * @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
1678
- * @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1678
+ * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1679
1679
  */
1680
1680
  const cid = this.safeValue2(params, 'cid', 'clientOrderId'); // client order id
1681
1681
  let request = undefined;
@@ -1709,7 +1709,7 @@ export default class bitfinex2 extends Exchange {
1709
1709
  * @param {string} id order id
1710
1710
  * @param {string} symbol unified market symbol, default is undefined
1711
1711
  * @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
1712
- * @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1712
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1713
1713
  */
1714
1714
  const request = {
1715
1715
  'id': [parseInt(id)],
@@ -1731,7 +1731,7 @@ export default class bitfinex2 extends Exchange {
1731
1731
  * @param {string} id order id
1732
1732
  * @param {string} symbol unified market symbol, default is undefined
1733
1733
  * @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
1734
- * @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1734
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1735
1735
  */
1736
1736
  const request = {
1737
1737
  'id': [parseInt(id)],
@@ -1754,7 +1754,7 @@ export default class bitfinex2 extends Exchange {
1754
1754
  * @param {int} [since] the earliest time in ms to fetch open orders for
1755
1755
  * @param {int} [limit] the maximum number of open orders structures to retrieve
1756
1756
  * @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
1757
- * @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1757
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
1758
1758
  */
1759
1759
  await this.loadMarkets();
1760
1760
  const request = {};
@@ -1821,7 +1821,7 @@ export default class bitfinex2 extends Exchange {
1821
1821
  * @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
1822
1822
  * @param {int} [params.until] the latest time in ms to fetch entries for
1823
1823
  * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
1824
- * @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1824
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
1825
1825
  */
1826
1826
  // returns the most recent closed or canceled orders up to circa two weeks ago
1827
1827
  await this.loadMarkets();
@@ -1899,9 +1899,11 @@ export default class bitfinex2 extends Exchange {
1899
1899
  * @param {int} [since] the earliest time in ms to fetch trades for
1900
1900
  * @param {int} [limit] the maximum number of trades to retrieve
1901
1901
  * @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
1902
- * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
1902
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
1903
1903
  */
1904
- this.checkRequiredSymbol('fetchOrderTrades', symbol);
1904
+ if (symbol === undefined) {
1905
+ throw new ArgumentsRequired(this.id + ' fetchOrderTrades() requires a symbol argument');
1906
+ }
1905
1907
  await this.loadMarkets();
1906
1908
  const market = this.market(symbol);
1907
1909
  const orderId = parseInt(id);
@@ -1924,7 +1926,7 @@ export default class bitfinex2 extends Exchange {
1924
1926
  * @param {int} [since] the earliest time in ms to fetch trades for
1925
1927
  * @param {int} [limit] the maximum number of trades structures to retrieve
1926
1928
  * @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
1927
- * @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
1929
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
1928
1930
  */
1929
1931
  await this.loadMarkets();
1930
1932
  let market = undefined;
@@ -1956,7 +1958,7 @@ export default class bitfinex2 extends Exchange {
1956
1958
  * @see https://docs.bitfinex.com/reference/rest-auth-deposit-address
1957
1959
  * @param {string} code unified currency code of the currency for the deposit address
1958
1960
  * @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
1959
- * @returns {object} an [address structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#address-structure}
1961
+ * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
1960
1962
  */
1961
1963
  await this.loadMarkets();
1962
1964
  const request = {
@@ -1972,7 +1974,7 @@ export default class bitfinex2 extends Exchange {
1972
1974
  * @see https://docs.bitfinex.com/reference/rest-auth-deposit-address
1973
1975
  * @param {string} code unified currency code
1974
1976
  * @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
1975
- * @returns {object} an [address structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#address-structure}
1977
+ * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
1976
1978
  */
1977
1979
  await this.loadMarkets();
1978
1980
  const currency = this.currency(code);
@@ -2187,7 +2189,7 @@ export default class bitfinex2 extends Exchange {
2187
2189
  * @description fetch the trading fees for multiple markets
2188
2190
  * @see https://docs.bitfinex.com/reference/rest-auth-summary
2189
2191
  * @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
2190
- * @returns {object} a dictionary of [fee structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure} indexed by market symbols
2192
+ * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
2191
2193
  */
2192
2194
  await this.loadMarkets();
2193
2195
  const response = await this.privatePostAuthRSummary(params);
@@ -2305,7 +2307,7 @@ export default class bitfinex2 extends Exchange {
2305
2307
  * @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
2306
2308
  * @param {int} [limit] max number of deposit/withdrawals to return, default is undefined
2307
2309
  * @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
2308
- * @returns {object} a list of [transaction structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
2310
+ * @returns {object} a list of [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
2309
2311
  */
2310
2312
  await this.loadMarkets();
2311
2313
  let currency = undefined;
@@ -2366,7 +2368,7 @@ export default class bitfinex2 extends Exchange {
2366
2368
  * @param {string} address the address to withdraw to
2367
2369
  * @param {string} tag
2368
2370
  * @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
2369
- * @returns {object} a [transaction structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
2371
+ * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
2370
2372
  */
2371
2373
  this.checkAddress(address);
2372
2374
  await this.loadMarkets();
@@ -2453,7 +2455,7 @@ export default class bitfinex2 extends Exchange {
2453
2455
  * @see https://docs.bitfinex.com/reference/rest-auth-positions
2454
2456
  * @param {string[]|undefined} symbols list of unified market symbols
2455
2457
  * @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
2456
- * @returns {object[]} a list of [position structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#position-structure}
2458
+ * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
2457
2459
  */
2458
2460
  await this.loadMarkets();
2459
2461
  symbols = this.marketSymbols(symbols);
@@ -2710,7 +2712,7 @@ export default class bitfinex2 extends Exchange {
2710
2712
  * @param {object} [params] extra parameters specific to the bitfinex2 api endpoint
2711
2713
  * @param {int} [params.until] timestamp in ms of the latest ledger entry
2712
2714
  * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
2713
- * @returns {object} a [ledger structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ledger-structure}
2715
+ * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
2714
2716
  */
2715
2717
  await this.loadMarkets();
2716
2718
  await this.loadMarkets();
@@ -2762,7 +2764,7 @@ export default class bitfinex2 extends Exchange {
2762
2764
  * @see https://docs.bitfinex.com/reference/rest-public-derivatives-status
2763
2765
  * @param {string} symbol unified market symbol
2764
2766
  * @param {object} [params] extra parameters specific to the bingx api endpoint
2765
- * @returns {object} a [funding rate structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-structure}
2767
+ * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
2766
2768
  */
2767
2769
  return this.fetchFundingRates([symbol], params);
2768
2770
  }
@@ -2774,7 +2776,7 @@ export default class bitfinex2 extends Exchange {
2774
2776
  * @see https://docs.bitfinex.com/reference/rest-public-derivatives-status
2775
2777
  * @param {string[]} symbols list of unified market symbols
2776
2778
  * @param {object} [params] extra parameters specific to the bingx api endpoint
2777
- * @returns {object} a [funding rate structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-structure}
2779
+ * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
2778
2780
  */
2779
2781
  if (symbols === undefined) {
2780
2782
  throw new ArgumentsRequired(this.id + ' fetchFundingRates() requires a symbols argument');
@@ -2827,10 +2829,12 @@ export default class bitfinex2 extends Exchange {
2827
2829
  * @param {object} [params] extra parameters specific to the bingx api endpoint
2828
2830
  * @param {int} [params.until] timestamp in ms of the latest funding rate
2829
2831
  * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
2830
- * @returns {object} a [funding rate structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-structure}
2832
+ * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
2831
2833
  */
2834
+ if (symbol === undefined) {
2835
+ throw new ArgumentsRequired(this.id + ' fetchFundingRateHistory() requires a symbol argument');
2836
+ }
2832
2837
  await this.loadMarkets();
2833
- this.checkRequiredSymbol('fetchFundingRateHistory', symbol);
2834
2838
  let paginate = false;
2835
2839
  [paginate, params] = this.handleOptionAndParams(params, 'fetchFundingRateHistory', 'paginate');
2836
2840
  if (paginate) {