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
package/js/src/mercado.js CHANGED
@@ -38,15 +38,16 @@ export default class mercado extends Exchange {
38
38
  'createStopMarketOrder': false,
39
39
  'createStopOrder': false,
40
40
  'fetchBalance': true,
41
- 'fetchBorrowRate': false,
42
41
  'fetchBorrowRateHistory': false,
43
- 'fetchBorrowRates': false,
44
- 'fetchBorrowRatesPerSymbol': false,
42
+ 'fetchCrossBorrowRate': false,
43
+ 'fetchCrossBorrowRates': false,
45
44
  'fetchFundingHistory': false,
46
45
  'fetchFundingRate': false,
47
46
  'fetchFundingRateHistory': false,
48
47
  'fetchFundingRates': false,
49
48
  'fetchIndexOHLCV': false,
49
+ 'fetchIsolatedBorrowRate': false,
50
+ 'fetchIsolatedBorrowRates': false,
50
51
  'fetchLeverage': false,
51
52
  'fetchLeverageTiers': false,
52
53
  'fetchMarginMode': false,
@@ -253,7 +254,7 @@ export default class mercado extends Exchange {
253
254
  * @param {string} symbol unified symbol of the market to fetch the order book for
254
255
  * @param {int} [limit] the maximum amount of order book entries to return
255
256
  * @param {object} [params] extra parameters specific to the mercado api endpoint
256
- * @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
257
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
257
258
  */
258
259
  await this.loadMarkets();
259
260
  const market = this.market(symbol);
@@ -309,7 +310,7 @@ export default class mercado extends Exchange {
309
310
  * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
310
311
  * @param {string} symbol unified symbol of the market to fetch the ticker for
311
312
  * @param {object} [params] extra parameters specific to the mercado api endpoint
312
- * @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
313
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
313
314
  */
314
315
  await this.loadMarkets();
315
316
  const market = this.market(symbol);
@@ -375,7 +376,7 @@ export default class mercado extends Exchange {
375
376
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
376
377
  * @param {int} [limit] the maximum amount of trades to fetch
377
378
  * @param {object} [params] extra parameters specific to the mercado api endpoint
378
- * @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
379
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
379
380
  */
380
381
  await this.loadMarkets();
381
382
  const market = this.market(symbol);
@@ -418,7 +419,7 @@ export default class mercado extends Exchange {
418
419
  * @name mercado#fetchBalance
419
420
  * @description query for balance and get the amount of funds available for trading or funds locked in orders
420
421
  * @param {object} [params] extra parameters specific to the mercado api endpoint
421
- * @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
422
+ * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
422
423
  */
423
424
  await this.loadMarkets();
424
425
  const response = await this.privatePostGetAccountInfo(params);
@@ -435,7 +436,7 @@ export default class mercado extends Exchange {
435
436
  * @param {float} amount how much of currency you want to trade in units of base currency
436
437
  * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
437
438
  * @param {object} [params] extra parameters specific to the mercado api endpoint
438
- * @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
439
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
439
440
  */
440
441
  await this.loadMarkets();
441
442
  const market = this.market(symbol);
@@ -475,9 +476,11 @@ export default class mercado extends Exchange {
475
476
  * @param {string} id order id
476
477
  * @param {string} symbol unified symbol of the market the order was made in
477
478
  * @param {object} [params] extra parameters specific to the mercado api endpoint
478
- * @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
479
+ * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
479
480
  */
480
- this.checkRequiredSymbol('cancelOrder', symbol);
481
+ if (symbol === undefined) {
482
+ throw new ArgumentsRequired(this.id + ' cancelOrder() requires a symbol argument');
483
+ }
481
484
  await this.loadMarkets();
482
485
  const market = this.market(symbol);
483
486
  const request = {
@@ -599,9 +602,11 @@ export default class mercado extends Exchange {
599
602
  * @description fetches information on an order made by the user
600
603
  * @param {string} symbol unified symbol of the market the order was made in
601
604
  * @param {object} [params] extra parameters specific to the mercado api endpoint
602
- * @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
605
+ * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
603
606
  */
604
- this.checkRequiredSymbol('fetchOrder', symbol);
607
+ if (symbol === undefined) {
608
+ throw new ArgumentsRequired(this.id + ' fetchOrder() requires a symbol argument');
609
+ }
605
610
  await this.loadMarkets();
606
611
  const market = this.market(symbol);
607
612
  const request = {
@@ -623,7 +628,7 @@ export default class mercado extends Exchange {
623
628
  * @param {string} address the address to withdraw to
624
629
  * @param {string} tag
625
630
  * @param {object} [params] extra parameters specific to the mercado api endpoint
626
- * @returns {object} a [transaction structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
631
+ * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
627
632
  */
628
633
  [tag, params] = this.handleWithdrawTagAndParams(tag, params);
629
634
  this.checkAddress(address);
@@ -770,9 +775,11 @@ export default class mercado extends Exchange {
770
775
  * @param {int} [since] the earliest time in ms to fetch orders for
771
776
  * @param {int} [limit] the maximum number of order structures to retrieve
772
777
  * @param {object} [params] extra parameters specific to the mercado api endpoint
773
- * @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
778
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
774
779
  */
775
- this.checkRequiredSymbol('fetchOrders', symbol);
780
+ if (symbol === undefined) {
781
+ throw new ArgumentsRequired(this.id + ' fetchOrders() requires a symbol argument');
782
+ }
776
783
  await this.loadMarkets();
777
784
  const market = this.market(symbol);
778
785
  const request = {
@@ -792,9 +799,11 @@ export default class mercado extends Exchange {
792
799
  * @param {int} [since] the earliest time in ms to fetch open orders for
793
800
  * @param {int} [limit] the maximum number of open order structures to retrieve
794
801
  * @param {object} [params] extra parameters specific to the mercado api endpoint
795
- * @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
802
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
796
803
  */
797
- this.checkRequiredSymbol('fetchOpenOrders', symbol);
804
+ if (symbol === undefined) {
805
+ throw new ArgumentsRequired(this.id + ' fetchOpenOrders() requires a symbol argument');
806
+ }
798
807
  await this.loadMarkets();
799
808
  const market = this.market(symbol);
800
809
  const request = {
@@ -815,9 +824,11 @@ export default class mercado extends Exchange {
815
824
  * @param {int} [since] the earliest time in ms to fetch trades for
816
825
  * @param {int} [limit] the maximum number of trades structures to retrieve
817
826
  * @param {object} [params] extra parameters specific to the mercado api endpoint
818
- * @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
827
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
819
828
  */
820
- this.checkRequiredSymbol('fetchMyTrades', symbol);
829
+ if (symbol === undefined) {
830
+ throw new ArgumentsRequired(this.id + ' fetchMyTrades() requires a symbol argument');
831
+ }
821
832
  await this.loadMarkets();
822
833
  const market = this.market(symbol);
823
834
  const request = {
package/js/src/mexc.d.ts CHANGED
@@ -54,7 +54,7 @@ export default class mexc extends Exchange {
54
54
  fetchAccounts(params?: {}): Promise<any[]>;
55
55
  fetchTradingFees(params?: {}): Promise<{}>;
56
56
  customParseBalance(response: any, marketType: any): Balances;
57
- parseBalanceHelper(entry: any): import("./base/types.js").Balance;
57
+ parseBalanceHelper(entry: any): import("./base/types.js").Account;
58
58
  fetchBalance(params?: {}): Promise<Balances>;
59
59
  fetchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
60
60
  fetchOrderTrades(id: string, symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
package/js/src/mexc.js CHANGED
@@ -46,13 +46,12 @@ export default class mexc extends Exchange {
46
46
  'fetchAccounts': true,
47
47
  'fetchBalance': true,
48
48
  'fetchBidsAsks': true,
49
- 'fetchBorrowRate': undefined,
50
49
  'fetchBorrowRateHistory': undefined,
51
- 'fetchBorrowRates': undefined,
52
- 'fetchBorrowRatesPerSymbol': undefined,
53
50
  'fetchCanceledOrders': true,
54
51
  'fetchClosedOrder': undefined,
55
52
  'fetchClosedOrders': true,
53
+ 'fetchCrossBorrowRate': false,
54
+ 'fetchCrossBorrowRates': false,
56
55
  'fetchCurrencies': true,
57
56
  'fetchDeposit': undefined,
58
57
  'fetchDepositAddress': true,
@@ -66,6 +65,8 @@ export default class mexc extends Exchange {
66
65
  'fetchFundingRateHistory': true,
67
66
  'fetchFundingRates': undefined,
68
67
  'fetchIndexOHLCV': true,
68
+ 'fetchIsolatedBorrowRate': false,
69
+ 'fetchIsolatedBorrowRates': false,
69
70
  'fetchL2OrderBook': true,
70
71
  'fetchLedger': undefined,
71
72
  'fetchLedgerEntry': undefined,
@@ -824,7 +825,7 @@ export default class mexc extends Exchange {
824
825
  * @name mexc3#fetchStatus
825
826
  * @description the latest known information on the availability of the exchange API
826
827
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
827
- * @returns {object} a [status structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#exchange-status-structure}
828
+ * @returns {object} a [status structure]{@link https://docs.ccxt.com/#/?id=exchange-status-structure}
828
829
  */
829
830
  const [marketType, query] = this.handleMarketTypeAndParams('fetchStatus', undefined, params);
830
831
  let response = undefined;
@@ -1292,7 +1293,7 @@ export default class mexc extends Exchange {
1292
1293
  * @param {string} symbol unified symbol of the market to fetch the order book for
1293
1294
  * @param {int} [limit] the maximum amount of order book entries to return
1294
1295
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
1295
- * @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
1296
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
1296
1297
  */
1297
1298
  await this.loadMarkets();
1298
1299
  const market = this.market(symbol);
@@ -1370,7 +1371,7 @@ export default class mexc extends Exchange {
1370
1371
  * @param {int} [limit] the maximum amount of trades to fetch
1371
1372
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
1372
1373
  * @param {int} [params.until] *spot only* *since must be defined* the latest time in ms to fetch entries for
1373
- * @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
1374
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
1374
1375
  */
1375
1376
  await this.loadMarkets();
1376
1377
  const market = this.market(symbol);
@@ -1743,7 +1744,7 @@ export default class mexc extends Exchange {
1743
1744
  * @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
1744
1745
  * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
1745
1746
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
1746
- * @returns {object} a dictionary of [ticker structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
1747
+ * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1747
1748
  */
1748
1749
  await this.loadMarkets();
1749
1750
  const request = {};
@@ -1831,7 +1832,7 @@ export default class mexc extends Exchange {
1831
1832
  * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
1832
1833
  * @param {string} symbol unified symbol of the market to fetch the ticker for
1833
1834
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
1834
- * @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
1835
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1835
1836
  */
1836
1837
  await this.loadMarkets();
1837
1838
  const market = this.market(symbol);
@@ -2021,7 +2022,7 @@ export default class mexc extends Exchange {
2021
2022
  * @description fetches the bid and ask price and volume for multiple markets
2022
2023
  * @param {string[]|undefined} symbols unified symbols of the markets to fetch the bids and asks for, all markets are returned if not assigned
2023
2024
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
2024
- * @returns {object} a dictionary of [ticker structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
2025
+ * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
2025
2026
  */
2026
2027
  await this.loadMarkets();
2027
2028
  let market = undefined;
@@ -2068,7 +2069,7 @@ export default class mexc extends Exchange {
2068
2069
  * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
2069
2070
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
2070
2071
  * @param {string} [params.marginMode] only 'isolated' is supported for spot-margin trading
2071
- * @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
2072
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2072
2073
  */
2073
2074
  await this.loadMarkets();
2074
2075
  const market = this.market(symbol);
@@ -2279,7 +2280,7 @@ export default class mexc extends Exchange {
2279
2280
  * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#batch-orders
2280
2281
  * @param {array} orders list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
2281
2282
  * @param {object} [params] extra parameters specific to api endpoint
2282
- * @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
2283
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2283
2284
  */
2284
2285
  await this.loadMarkets();
2285
2286
  const ordersRequests = [];
@@ -2343,9 +2344,11 @@ export default class mexc extends Exchange {
2343
2344
  * @param {string} symbol unified symbol of the market the order was made in
2344
2345
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
2345
2346
  * @param {string} [params.marginMode] only 'isolated' is supported, for spot-margin trading
2346
- * @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
2347
+ * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2347
2348
  */
2348
- this.checkRequiredSymbol('fetchOrder', symbol);
2349
+ if (symbol === undefined) {
2350
+ throw new ArgumentsRequired(this.id + ' fetchOrder() requires a symbol argument');
2351
+ }
2349
2352
  await this.loadMarkets();
2350
2353
  const market = this.market(symbol);
2351
2354
  const request = {
@@ -2464,7 +2467,7 @@ export default class mexc extends Exchange {
2464
2467
  * @param {int} [limit] the maximum number of orde structures to retrieve
2465
2468
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
2466
2469
  * @param {string} [params.marginMode] only 'isolated' is supported, for spot-margin trading
2467
- * @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
2470
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
2468
2471
  */
2469
2472
  await this.loadMarkets();
2470
2473
  const request = {};
@@ -2694,7 +2697,7 @@ export default class mexc extends Exchange {
2694
2697
  * @param {int} [limit] the maximum number of open orders structures to retrieve
2695
2698
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
2696
2699
  * @param {string} [params.marginMode] only 'isolated' is supported, for spot-margin trading
2697
- * @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
2700
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
2698
2701
  */
2699
2702
  await this.loadMarkets();
2700
2703
  const request = {};
@@ -2782,7 +2785,7 @@ export default class mexc extends Exchange {
2782
2785
  * @param {int} [since] the earliest time in ms to fetch orders for
2783
2786
  * @param {int} [limit] the maximum number of orde structures to retrieve
2784
2787
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
2785
- * @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
2788
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
2786
2789
  */
2787
2790
  return await this.fetchOrdersByState(3, symbol, since, limit, params);
2788
2791
  }
@@ -2795,7 +2798,7 @@ export default class mexc extends Exchange {
2795
2798
  * @param {int} [since] timestamp in ms of the earliest order, default is undefined
2796
2799
  * @param {int} [limit] max number of orders to return, default is undefined
2797
2800
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
2798
- * @returns {object} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
2801
+ * @returns {object} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
2799
2802
  */
2800
2803
  return await this.fetchOrdersByState(4, symbol, since, limit, params);
2801
2804
  }
@@ -2824,7 +2827,7 @@ export default class mexc extends Exchange {
2824
2827
  * @param {string} symbol unified symbol of the market the order was made in
2825
2828
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
2826
2829
  * @param {string} [params.marginMode] only 'isolated' is supported for spot-margin trading
2827
- * @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
2830
+ * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2828
2831
  */
2829
2832
  await this.loadMarkets();
2830
2833
  const request = {};
@@ -2930,7 +2933,7 @@ export default class mexc extends Exchange {
2930
2933
  * @param {string[]} ids order ids
2931
2934
  * @param {string} symbol unified market symbol, default is undefined
2932
2935
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
2933
- * @returns {object} an list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
2936
+ * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
2934
2937
  */
2935
2938
  await this.loadMarkets();
2936
2939
  const market = (symbol !== undefined) ? this.market(symbol) : undefined;
@@ -2965,7 +2968,7 @@ export default class mexc extends Exchange {
2965
2968
  * @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
2966
2969
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
2967
2970
  * @param {string} [params.marginMode] only 'isolated' is supported for spot-margin trading
2968
- * @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
2971
+ * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
2969
2972
  */
2970
2973
  await this.loadMarkets();
2971
2974
  const market = (symbol !== undefined) ? this.market(symbol) : undefined;
@@ -3358,7 +3361,7 @@ export default class mexc extends Exchange {
3358
3361
  * @name mexc3#fetchAccounts
3359
3362
  * @description fetch all the accounts associated with a profile
3360
3363
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
3361
- * @returns {object} a dictionary of [account structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#account-structure} indexed by the account type
3364
+ * @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/#/?id=account-structure} indexed by the account type
3362
3365
  */
3363
3366
  // TODO: is the below endpoints suitable for fetchAccounts?
3364
3367
  const [marketType, query] = this.handleMarketTypeAndParams('fetchAccounts', undefined, params);
@@ -3385,7 +3388,7 @@ export default class mexc extends Exchange {
3385
3388
  * @name mexc3#fetchTradingFees
3386
3389
  * @description fetch the trading fees for multiple markets
3387
3390
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
3388
- * @returns {object} a dictionary of [fee structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure} indexed by market symbols
3391
+ * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
3389
3392
  */
3390
3393
  await this.loadMarkets();
3391
3394
  const response = await this.fetchAccountHelper('spot', params);
@@ -3540,7 +3543,7 @@ export default class mexc extends Exchange {
3540
3543
  * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#isolated-account
3541
3544
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
3542
3545
  * @param {string} [params.symbols] // required for margin, market id's separated by commas
3543
- * @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
3546
+ * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
3544
3547
  */
3545
3548
  await this.loadMarkets();
3546
3549
  let marketType = undefined;
@@ -3668,9 +3671,11 @@ export default class mexc extends Exchange {
3668
3671
  * @param {int} [since] the earliest time in ms to fetch trades for
3669
3672
  * @param {int} [limit] the maximum number of trades structures to retrieve
3670
3673
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
3671
- * @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
3674
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
3672
3675
  */
3673
- this.checkRequiredSymbol('fetchMyTrades', symbol);
3676
+ if (symbol === undefined) {
3677
+ throw new ArgumentsRequired(this.id + ' fetchMyTrades() requires a symbol argument');
3678
+ }
3674
3679
  await this.loadMarkets();
3675
3680
  const market = this.market(symbol);
3676
3681
  const [marketType, query] = this.handleMarketTypeAndParams('fetchMyTrades', market, params);
@@ -3757,7 +3762,7 @@ export default class mexc extends Exchange {
3757
3762
  * @param {int} [since] the earliest time in ms to fetch trades for
3758
3763
  * @param {int} [limit] the maximum number of trades to retrieve
3759
3764
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
3760
- * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
3765
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
3761
3766
  */
3762
3767
  await this.loadMarkets();
3763
3768
  const request = {};
@@ -3853,7 +3858,7 @@ export default class mexc extends Exchange {
3853
3858
  * @param {string} symbol unified market symbol
3854
3859
  * @param {float} amount the amount of margin to remove
3855
3860
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
3856
- * @returns {object} a [margin structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#reduce-margin-structure}
3861
+ * @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=reduce-margin-structure}
3857
3862
  */
3858
3863
  return await this.modifyMarginHelper(symbol, amount, 'SUB', params);
3859
3864
  }
@@ -3865,7 +3870,7 @@ export default class mexc extends Exchange {
3865
3870
  * @param {string} symbol unified market symbol
3866
3871
  * @param {float} amount amount of margin to add
3867
3872
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
3868
- * @returns {object} a [margin structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#add-margin-structure}
3873
+ * @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=add-margin-structure}
3869
3874
  */
3870
3875
  return await this.modifyMarginHelper(symbol, amount, 'ADD', params);
3871
3876
  }
@@ -3911,7 +3916,7 @@ export default class mexc extends Exchange {
3911
3916
  * @param {int} [since] the earliest time in ms to fetch funding history for
3912
3917
  * @param {int} [limit] the maximum number of funding history structures to retrieve
3913
3918
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
3914
- * @returns {object} a [funding history structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-history-structure}
3919
+ * @returns {object} a [funding history structure]{@link https://docs.ccxt.com/#/?id=funding-history-structure}
3915
3920
  */
3916
3921
  await this.loadMarkets();
3917
3922
  let market = undefined;
@@ -4024,7 +4029,7 @@ export default class mexc extends Exchange {
4024
4029
  * @description fetch the current funding rate
4025
4030
  * @param {string} symbol unified market symbol
4026
4031
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
4027
- * @returns {object} a [funding rate structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-structure}
4032
+ * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
4028
4033
  */
4029
4034
  await this.loadMarkets();
4030
4035
  const market = this.market(symbol);
@@ -4059,9 +4064,11 @@ export default class mexc extends Exchange {
4059
4064
  * @param {int} [since] not used by mexc, but filtered internally by ccxt
4060
4065
  * @param {int} [limit] mexc limit is page_size default 20, maximum is 100
4061
4066
  * @param {object} [params] extra parameters specific to the mexc api endpoint
4062
- * @returns {object[]} a list of [funding rate structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-history-structure}
4067
+ * @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
4063
4068
  */
4064
- this.checkRequiredSymbol('fetchFundingRateHistory', symbol);
4069
+ if (symbol === undefined) {
4070
+ throw new ArgumentsRequired(this.id + ' fetchFundingRateHistory() requires a symbol argument');
4071
+ }
4065
4072
  await this.loadMarkets();
4066
4073
  const market = this.market(symbol);
4067
4074
  const request = {
@@ -4123,7 +4130,7 @@ export default class mexc extends Exchange {
4123
4130
  * @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes
4124
4131
  * @param {string[]|undefined} symbols list of unified market symbols
4125
4132
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
4126
- * @returns {object} a dictionary of [leverage tiers structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#leverage-tiers-structure}, indexed by market symbols
4133
+ * @returns {object} a dictionary of [leverage tiers structures]{@link https://docs.ccxt.com/#/?id=leverage-tiers-structure}, indexed by market symbols
4127
4134
  */
4128
4135
  await this.loadMarkets();
4129
4136
  symbols = this.marketSymbols(symbols, 'swap', true, true);
@@ -4237,7 +4244,7 @@ export default class mexc extends Exchange {
4237
4244
  * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#deposit-address-supporting-network
4238
4245
  * @param {string} code unified currency code of the currency for the deposit address
4239
4246
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
4240
- * @returns {object} a dictionary of [address structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#address-structure} indexed by the network
4247
+ * @returns {object} a dictionary of [address structures]{@link https://docs.ccxt.com/#/?id=address-structure} indexed by the network
4241
4248
  */
4242
4249
  await this.loadMarkets();
4243
4250
  const currency = this.currency(code);
@@ -4278,7 +4285,7 @@ export default class mexc extends Exchange {
4278
4285
  * @param {string} code unified currency code of the currency for the deposit address
4279
4286
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
4280
4287
  * @param {string} [params.network] the blockchain network name
4281
- * @returns {object} an [address structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#address-structure}
4288
+ * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
4282
4289
  */
4283
4290
  await this.loadMarkets();
4284
4291
  const currency = this.currency(code);
@@ -4317,7 +4324,7 @@ export default class mexc extends Exchange {
4317
4324
  * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#deposit-address-supporting-network
4318
4325
  * @param {string} code unified currency code
4319
4326
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
4320
- * @returns {object} an [address structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#address-structure}
4327
+ * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
4321
4328
  */
4322
4329
  const rawNetwork = this.safeStringUpper(params, 'network');
4323
4330
  params = this.omit(params, 'network');
@@ -4347,7 +4354,7 @@ export default class mexc extends Exchange {
4347
4354
  * @param {int} [since] the earliest time in ms to fetch deposits for
4348
4355
  * @param {int} [limit] the maximum number of deposits structures to retrieve
4349
4356
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
4350
- * @returns {object[]} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
4357
+ * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
4351
4358
  */
4352
4359
  await this.loadMarkets();
4353
4360
  const request = {
@@ -4407,7 +4414,7 @@ export default class mexc extends Exchange {
4407
4414
  * @param {int} [since] the earliest time in ms to fetch withdrawals for
4408
4415
  * @param {int} [limit] the maximum number of withdrawals structures to retrieve
4409
4416
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
4410
- * @returns {object[]} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
4417
+ * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
4411
4418
  */
4412
4419
  await this.loadMarkets();
4413
4420
  const request = {
@@ -4581,7 +4588,7 @@ export default class mexc extends Exchange {
4581
4588
  * @description fetch data on a single open contract trade position
4582
4589
  * @param {string} symbol unified market symbol of the market the position is held in, default is undefined
4583
4590
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
4584
- * @returns {object} a [position structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#position-structure}
4591
+ * @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
4585
4592
  */
4586
4593
  await this.loadMarkets();
4587
4594
  const market = this.market(symbol);
@@ -4598,7 +4605,7 @@ export default class mexc extends Exchange {
4598
4605
  * @description fetch all open positions
4599
4606
  * @param {string[]|undefined} symbols list of unified market symbols
4600
4607
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
4601
- * @returns {object[]} a list of [position structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#position-structure}
4608
+ * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
4602
4609
  */
4603
4610
  await this.loadMarkets();
4604
4611
  const response = await this.contractPrivateGetPositionOpenPositions(params);
@@ -4740,7 +4747,7 @@ export default class mexc extends Exchange {
4740
4747
  * @param {int} [since] the earliest time in ms to fetch transfers for
4741
4748
  * @param {int} [limit] the maximum number of transfers structures to retrieve
4742
4749
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
4743
- * @returns {object[]} a list of [transfer structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transfer-structure}
4750
+ * @returns {object[]} a list of [transfer structures]{@link https://docs.ccxt.com/#/?id=transfer-structure}
4744
4751
  */
4745
4752
  const [marketType, query] = this.handleMarketTypeAndParams('fetchTransfers', undefined, params);
4746
4753
  await this.loadMarkets();
@@ -4830,7 +4837,7 @@ export default class mexc extends Exchange {
4830
4837
  * @param {string} toAccount account to transfer to
4831
4838
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
4832
4839
  * @param {string} [params.symbol] market symbol required for margin account transfers eg:BTCUSDT
4833
- * @returns {object} a [transfer structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transfer-structure}
4840
+ * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
4834
4841
  */
4835
4842
  await this.loadMarkets();
4836
4843
  const currency = this.currency(code);
@@ -4962,7 +4969,7 @@ export default class mexc extends Exchange {
4962
4969
  * @param {string} address the address to withdraw to
4963
4970
  * @param {string} tag
4964
4971
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
4965
- * @returns {object} a [transaction structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
4972
+ * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
4966
4973
  */
4967
4974
  [tag, params] = this.handleWithdrawTagAndParams(tag, params);
4968
4975
  const networks = this.safeValue(this.options, 'networks', {});
@@ -5029,9 +5036,11 @@ export default class mexc extends Exchange {
5029
5036
  * @param {float} amount the amount to borrow
5030
5037
  * @param {string} symbol unified market symbol
5031
5038
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
5032
- * @returns {object} a [margin loan structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#margin-loan-structure}
5039
+ * @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
5033
5040
  */
5034
- this.checkRequiredSymbol('borrowMargin', symbol);
5041
+ if (symbol === undefined) {
5042
+ throw new ArgumentsRequired(this.id + ' borrowMargin() requires a symbol argument');
5043
+ }
5035
5044
  await this.loadMarkets();
5036
5045
  const market = this.market(symbol);
5037
5046
  const currency = this.currency(code);
@@ -5063,9 +5072,11 @@ export default class mexc extends Exchange {
5063
5072
  * @param {string} symbol unified market symbol
5064
5073
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
5065
5074
  * @param {string} [params.borrowId] transaction id '762407666453712896'
5066
- * @returns {object} a [margin loan structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#margin-loan-structure}
5075
+ * @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
5067
5076
  */
5068
- this.checkRequiredSymbol('repayMargin', symbol);
5077
+ if (symbol === undefined) {
5078
+ throw new ArgumentsRequired(this.id + ' repayMargin() requires a symbol argument');
5079
+ }
5069
5080
  await this.loadMarkets();
5070
5081
  const id = this.safeString2(params, 'id', 'borrowId');
5071
5082
  if (id === undefined) {
@@ -5099,7 +5110,7 @@ export default class mexc extends Exchange {
5099
5110
  * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#query-the-currency-information
5100
5111
  * @param {string[]|undefined} codes returns fees for all currencies if undefined
5101
5112
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
5102
- * @returns {object[]} a list of [fee structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure}
5113
+ * @returns {object[]} a list of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
5103
5114
  */
5104
5115
  await this.loadMarkets();
5105
5116
  const response = await this.spotPrivateGetCapitalConfigGetall(params);
@@ -5197,7 +5208,7 @@ export default class mexc extends Exchange {
5197
5208
  * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#query-the-currency-information
5198
5209
  * @param {string[]|undefined} codes returns fees for all currencies if undefined
5199
5210
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
5200
- * @returns {object[]} a list of [fee structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure}
5211
+ * @returns {object[]} a list of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
5201
5212
  */
5202
5213
  await this.loadMarkets();
5203
5214
  const response = await this.spotPrivateGetCapitalConfigGetall(params);