ccxt 4.1.56 → 4.1.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (316) hide show
  1. package/.git-templates/hooks/pre-push +2 -2
  2. package/README.md +3 -3
  3. package/build.sh +30 -18
  4. package/dist/ccxt.browser.js +3872 -3202
  5. package/dist/ccxt.browser.min.js +10 -10
  6. package/dist/cjs/ccxt.js +1 -1
  7. package/dist/cjs/src/ace.js +17 -13
  8. package/dist/cjs/src/alpaca.js +6 -6
  9. package/dist/cjs/src/ascendex.js +35 -29
  10. package/dist/cjs/src/base/Exchange.js +39 -26
  11. package/dist/cjs/src/base/Precise.js +1 -3
  12. package/dist/cjs/src/bigone.js +24 -20
  13. package/dist/cjs/src/binance.js +97 -76
  14. package/dist/cjs/src/bingx.js +63 -44
  15. package/dist/cjs/src/bit2c.js +18 -15
  16. package/dist/cjs/src/bitbank.js +16 -15
  17. package/dist/cjs/src/bitbns.js +28 -18
  18. package/dist/cjs/src/bitfinex.js +23 -21
  19. package/dist/cjs/src/bitfinex2.js +32 -28
  20. package/dist/cjs/src/bitflyer.js +28 -20
  21. package/dist/cjs/src/bitforex.js +25 -18
  22. package/dist/cjs/src/bitget.js +184 -147
  23. package/dist/cjs/src/bithumb.js +23 -16
  24. package/dist/cjs/src/bitmart.js +106 -85
  25. package/dist/cjs/src/bitmex.js +104 -64
  26. package/dist/cjs/src/bitopro.js +38 -26
  27. package/dist/cjs/src/bitpanda.js +24 -23
  28. package/dist/cjs/src/bitrue.js +33 -24
  29. package/dist/cjs/src/bitso.js +24 -23
  30. package/dist/cjs/src/bitstamp.js +24 -23
  31. package/dist/cjs/src/bittrex.js +30 -29
  32. package/dist/cjs/src/bitvavo.js +38 -30
  33. package/dist/cjs/src/bl3p.js +11 -10
  34. package/dist/cjs/src/blockchaincom.js +20 -20
  35. package/dist/cjs/src/btcalpha.js +18 -17
  36. package/dist/cjs/src/btcbox.js +13 -12
  37. package/dist/cjs/src/btcmarkets.js +20 -19
  38. package/dist/cjs/src/btcturk.js +14 -13
  39. package/dist/cjs/src/bybit.js +84 -54
  40. package/dist/cjs/src/cex.js +16 -14
  41. package/dist/cjs/src/coinbase.js +29 -27
  42. package/dist/cjs/src/coinbasepro.js +27 -25
  43. package/dist/cjs/src/coincheck.js +15 -14
  44. package/dist/cjs/src/coinex.js +100 -77
  45. package/dist/cjs/src/coinlist.js +28 -27
  46. package/dist/cjs/src/coinmate.js +20 -17
  47. package/dist/cjs/src/coinone.js +21 -16
  48. package/dist/cjs/src/coinsph.js +37 -28
  49. package/dist/cjs/src/coinspot.js +12 -11
  50. package/dist/cjs/src/cryptocom.js +40 -202
  51. package/dist/cjs/src/currencycom.js +32 -25
  52. package/dist/cjs/src/delta.js +34 -28
  53. package/dist/cjs/src/deribit.js +39 -36
  54. package/dist/cjs/src/digifinex.js +64 -44
  55. package/dist/cjs/src/exmo.js +29 -27
  56. package/dist/cjs/src/gate.js +67 -53
  57. package/dist/cjs/src/gemini.js +23 -20
  58. package/dist/cjs/src/hitbtc.js +65 -56
  59. package/dist/cjs/src/hollaex.js +30 -27
  60. package/dist/cjs/src/htx.js +132 -143
  61. package/dist/cjs/src/huobijp.js +22 -20
  62. package/dist/cjs/src/idex.js +22 -21
  63. package/dist/cjs/src/independentreserve.js +15 -14
  64. package/dist/cjs/src/indodax.js +30 -26
  65. package/dist/cjs/src/kraken.js +29 -27
  66. package/dist/cjs/src/krakenfutures.js +29 -22
  67. package/dist/cjs/src/kucoin.js +48 -43
  68. package/dist/cjs/src/kucoinfutures.js +33 -28
  69. package/dist/cjs/src/kuna.js +25 -24
  70. package/dist/cjs/src/latoken.js +24 -22
  71. package/dist/cjs/src/lbank.js +45 -30
  72. package/dist/cjs/src/luno.js +22 -19
  73. package/dist/cjs/src/lykke.js +19 -17
  74. package/dist/cjs/src/mercado.js +30 -19
  75. package/dist/cjs/src/mexc.js +60 -49
  76. package/dist/cjs/src/ndax.js +23 -22
  77. package/dist/cjs/src/novadax.js +23 -22
  78. package/dist/cjs/src/oceanex.js +22 -19
  79. package/dist/cjs/src/okcoin.js +29 -23
  80. package/dist/cjs/src/okx.js +87 -82
  81. package/dist/cjs/src/p2b.js +79 -82
  82. package/dist/cjs/src/paymium.js +10 -10
  83. package/dist/cjs/src/phemex.js +63 -40
  84. package/dist/cjs/src/poloniex.js +22 -22
  85. package/dist/cjs/src/poloniexfutures.js +23 -19
  86. package/dist/cjs/src/pro/alpaca.js +5 -5
  87. package/dist/cjs/src/pro/ascendex.js +4 -4
  88. package/dist/cjs/src/pro/binance.js +16 -16
  89. package/dist/cjs/src/pro/bingx.js +1 -1
  90. package/dist/cjs/src/pro/bitfinex.js +4 -4
  91. package/dist/cjs/src/pro/bitfinex2.js +6 -6
  92. package/dist/cjs/src/pro/bitget.js +7 -7
  93. package/dist/cjs/src/pro/bitmart.js +7 -5
  94. package/dist/cjs/src/pro/bitmex.js +6 -6
  95. package/dist/cjs/src/pro/bitopro.js +4 -4
  96. package/dist/cjs/src/pro/bitpanda.js +6 -6
  97. package/dist/cjs/src/pro/bitrue.js +2 -2
  98. package/dist/cjs/src/pro/bitstamp.js +6 -4
  99. package/dist/cjs/src/pro/bittrex.js +6 -6
  100. package/dist/cjs/src/pro/bitvavo.js +11 -7
  101. package/dist/cjs/src/pro/blockchaincom.js +8 -8
  102. package/dist/cjs/src/pro/bybit.js +7 -7
  103. package/dist/cjs/src/pro/cex.js +13 -9
  104. package/dist/cjs/src/pro/coinbase.js +5 -5
  105. package/dist/cjs/src/pro/coinbasepro.js +11 -10
  106. package/dist/cjs/src/pro/coinex.js +7 -9
  107. package/dist/cjs/src/pro/cryptocom.js +9 -9
  108. package/dist/cjs/src/pro/currencycom.js +4 -4
  109. package/dist/cjs/src/pro/deribit.js +6 -6
  110. package/dist/cjs/src/pro/exmo.js +12 -14
  111. package/dist/cjs/src/pro/gate.js +7 -7
  112. package/dist/cjs/src/pro/gemini.js +3 -3
  113. package/dist/cjs/src/pro/hitbtc.js +263 -4
  114. package/dist/cjs/src/pro/hollaex.js +5 -5
  115. package/dist/cjs/src/pro/htx.js +6 -6
  116. package/dist/cjs/src/pro/huobijp.js +3 -3
  117. package/dist/cjs/src/pro/idex.js +4 -4
  118. package/dist/cjs/src/pro/independentreserve.js +2 -2
  119. package/dist/cjs/src/pro/kraken.js +10 -10
  120. package/dist/cjs/src/pro/krakenfutures.js +41 -17
  121. package/dist/cjs/src/pro/kucoin.js +7 -7
  122. package/dist/cjs/src/pro/kucoinfutures.js +8 -6
  123. package/dist/cjs/src/pro/luno.js +2 -2
  124. package/dist/cjs/src/pro/mexc.js +6 -6
  125. package/dist/cjs/src/pro/ndax.js +3 -3
  126. package/dist/cjs/src/pro/okcoin.js +5 -5
  127. package/dist/cjs/src/pro/okx.js +12 -12
  128. package/dist/cjs/src/pro/phemex.js +6 -6
  129. package/dist/cjs/src/pro/poloniex.js +7 -7
  130. package/dist/cjs/src/pro/poloniexfutures.js +5 -5
  131. package/dist/cjs/src/pro/probit.js +6 -6
  132. package/dist/cjs/src/pro/upbit.js +3 -3
  133. package/dist/cjs/src/pro/wazirx.js +8 -8
  134. package/dist/cjs/src/pro/whitebit.js +12 -8
  135. package/dist/cjs/src/pro/woo.js +1 -1
  136. package/dist/cjs/src/probit.js +28 -23
  137. package/dist/cjs/src/tidex.js +16 -15
  138. package/dist/cjs/src/timex.js +19 -18
  139. package/dist/cjs/src/tokocrypto.js +27 -22
  140. package/dist/cjs/src/upbit.js +19 -19
  141. package/dist/cjs/src/wavesexchange.js +22 -19
  142. package/dist/cjs/src/wazirx.js +24 -17
  143. package/dist/cjs/src/whitebit.js +33 -27
  144. package/dist/cjs/src/woo.js +44 -34
  145. package/dist/cjs/src/yobit.js +25 -20
  146. package/dist/cjs/src/zaif.js +9 -9
  147. package/dist/cjs/src/zonda.js +18 -17
  148. package/js/ccxt.d.ts +1 -1
  149. package/js/ccxt.js +1 -1
  150. package/js/src/abstract/bybit.d.ts +1 -0
  151. package/js/src/abstract/cryptocom.d.ts +0 -20
  152. package/js/src/ace.js +18 -14
  153. package/js/src/alpaca.js +6 -6
  154. package/js/src/ascendex.js +35 -29
  155. package/js/src/base/Exchange.d.ts +37 -34
  156. package/js/src/base/Exchange.js +39 -26
  157. package/js/src/base/Precise.d.ts +4 -4
  158. package/js/src/base/Precise.js +1 -3
  159. package/js/src/base/functions/type.d.ts +25 -25
  160. package/js/src/base/types.d.ts +21 -14
  161. package/js/src/bigone.js +25 -21
  162. package/js/src/binance.d.ts +2 -2
  163. package/js/src/binance.js +97 -76
  164. package/js/src/bingx.js +63 -44
  165. package/js/src/bit2c.js +19 -16
  166. package/js/src/bitbank.js +16 -15
  167. package/js/src/bitbns.js +28 -18
  168. package/js/src/bitfinex.js +23 -21
  169. package/js/src/bitfinex2.js +32 -28
  170. package/js/src/bitflyer.js +28 -20
  171. package/js/src/bitforex.js +26 -19
  172. package/js/src/bitget.d.ts +25 -3
  173. package/js/src/bitget.js +184 -147
  174. package/js/src/bithumb.js +23 -16
  175. package/js/src/bitmart.d.ts +1 -1
  176. package/js/src/bitmart.js +106 -85
  177. package/js/src/bitmex.d.ts +2 -2
  178. package/js/src/bitmex.js +104 -64
  179. package/js/src/bitopro.js +38 -26
  180. package/js/src/bitpanda.js +24 -23
  181. package/js/src/bitrue.js +33 -24
  182. package/js/src/bitso.js +24 -23
  183. package/js/src/bitstamp.d.ts +2 -2
  184. package/js/src/bitstamp.js +24 -23
  185. package/js/src/bittrex.js +30 -29
  186. package/js/src/bitvavo.js +38 -30
  187. package/js/src/bl3p.js +11 -10
  188. package/js/src/blockchaincom.js +20 -20
  189. package/js/src/btcalpha.js +18 -17
  190. package/js/src/btcbox.js +13 -12
  191. package/js/src/btcmarkets.js +20 -19
  192. package/js/src/btcturk.js +14 -13
  193. package/js/src/bybit.d.ts +1 -1
  194. package/js/src/bybit.js +84 -54
  195. package/js/src/cex.js +16 -14
  196. package/js/src/coinbase.js +29 -27
  197. package/js/src/coinbasepro.js +27 -25
  198. package/js/src/coincheck.js +15 -14
  199. package/js/src/coinex.d.ts +1 -1
  200. package/js/src/coinex.js +100 -77
  201. package/js/src/coinlist.js +28 -27
  202. package/js/src/coinmate.js +21 -18
  203. package/js/src/coinone.js +21 -16
  204. package/js/src/coinsph.js +37 -28
  205. package/js/src/coinspot.js +12 -11
  206. package/js/src/cryptocom.d.ts +0 -23
  207. package/js/src/cryptocom.js +40 -202
  208. package/js/src/currencycom.js +32 -25
  209. package/js/src/delta.js +35 -29
  210. package/js/src/deribit.js +39 -36
  211. package/js/src/digifinex.d.ts +2 -2
  212. package/js/src/digifinex.js +65 -45
  213. package/js/src/exmo.js +29 -27
  214. package/js/src/gate.d.ts +1 -1
  215. package/js/src/gate.js +67 -53
  216. package/js/src/gemini.js +23 -20
  217. package/js/src/hitbtc.d.ts +1 -0
  218. package/js/src/hitbtc.js +65 -56
  219. package/js/src/hollaex.js +30 -27
  220. package/js/src/htx.d.ts +11 -3
  221. package/js/src/htx.js +132 -143
  222. package/js/src/huobijp.js +23 -21
  223. package/js/src/idex.js +22 -21
  224. package/js/src/independentreserve.js +15 -14
  225. package/js/src/indodax.js +30 -26
  226. package/js/src/kraken.js +29 -27
  227. package/js/src/krakenfutures.js +29 -22
  228. package/js/src/kucoin.d.ts +1 -1
  229. package/js/src/kucoin.js +48 -43
  230. package/js/src/kucoinfutures.js +33 -28
  231. package/js/src/kuna.js +25 -24
  232. package/js/src/latoken.js +25 -23
  233. package/js/src/lbank.js +46 -31
  234. package/js/src/luno.js +22 -19
  235. package/js/src/lykke.js +19 -17
  236. package/js/src/mercado.js +30 -19
  237. package/js/src/mexc.d.ts +1 -1
  238. package/js/src/mexc.js +60 -49
  239. package/js/src/ndax.js +23 -22
  240. package/js/src/novadax.js +23 -22
  241. package/js/src/oceanex.js +22 -19
  242. package/js/src/okcoin.js +29 -23
  243. package/js/src/okx.d.ts +2 -2
  244. package/js/src/okx.js +87 -82
  245. package/js/src/p2b.d.ts +8 -7
  246. package/js/src/p2b.js +79 -81
  247. package/js/src/paymium.js +10 -10
  248. package/js/src/phemex.js +63 -40
  249. package/js/src/poloniex.js +22 -22
  250. package/js/src/poloniexfutures.js +23 -19
  251. package/js/src/pro/alpaca.js +5 -5
  252. package/js/src/pro/ascendex.js +4 -4
  253. package/js/src/pro/binance.js +16 -16
  254. package/js/src/pro/bingx.js +1 -1
  255. package/js/src/pro/bitfinex.js +4 -4
  256. package/js/src/pro/bitfinex2.d.ts +1 -1
  257. package/js/src/pro/bitfinex2.js +6 -6
  258. package/js/src/pro/bitget.js +7 -7
  259. package/js/src/pro/bitmart.js +7 -5
  260. package/js/src/pro/bitmex.js +6 -6
  261. package/js/src/pro/bitopro.js +4 -4
  262. package/js/src/pro/bitpanda.js +6 -6
  263. package/js/src/pro/bitrue.js +2 -2
  264. package/js/src/pro/bitstamp.js +7 -5
  265. package/js/src/pro/bittrex.js +6 -6
  266. package/js/src/pro/bitvavo.js +12 -8
  267. package/js/src/pro/blockchaincom.js +8 -8
  268. package/js/src/pro/bybit.js +7 -7
  269. package/js/src/pro/cex.js +14 -10
  270. package/js/src/pro/coinbase.js +5 -5
  271. package/js/src/pro/coinbasepro.js +12 -11
  272. package/js/src/pro/coinex.js +7 -9
  273. package/js/src/pro/cryptocom.js +9 -9
  274. package/js/src/pro/currencycom.js +4 -4
  275. package/js/src/pro/deribit.js +6 -6
  276. package/js/src/pro/exmo.js +12 -14
  277. package/js/src/pro/gate.js +7 -7
  278. package/js/src/pro/gemini.js +3 -3
  279. package/js/src/pro/hitbtc.d.ts +8 -1
  280. package/js/src/pro/hitbtc.js +264 -5
  281. package/js/src/pro/hollaex.js +5 -5
  282. package/js/src/pro/htx.js +6 -6
  283. package/js/src/pro/huobijp.js +3 -3
  284. package/js/src/pro/idex.js +4 -4
  285. package/js/src/pro/independentreserve.js +2 -2
  286. package/js/src/pro/kraken.js +10 -10
  287. package/js/src/pro/krakenfutures.d.ts +1 -0
  288. package/js/src/pro/krakenfutures.js +42 -18
  289. package/js/src/pro/kucoin.js +7 -7
  290. package/js/src/pro/kucoinfutures.js +8 -6
  291. package/js/src/pro/luno.js +2 -2
  292. package/js/src/pro/mexc.js +6 -6
  293. package/js/src/pro/ndax.js +3 -3
  294. package/js/src/pro/okcoin.js +5 -5
  295. package/js/src/pro/okx.js +12 -12
  296. package/js/src/pro/phemex.js +6 -6
  297. package/js/src/pro/poloniex.js +7 -7
  298. package/js/src/pro/poloniexfutures.js +5 -5
  299. package/js/src/pro/probit.js +6 -6
  300. package/js/src/pro/upbit.js +3 -3
  301. package/js/src/pro/wazirx.js +8 -8
  302. package/js/src/pro/whitebit.js +13 -9
  303. package/js/src/pro/woo.js +1 -1
  304. package/js/src/probit.js +29 -24
  305. package/js/src/tidex.js +16 -15
  306. package/js/src/timex.js +19 -18
  307. package/js/src/tokocrypto.js +28 -23
  308. package/js/src/upbit.js +19 -19
  309. package/js/src/wavesexchange.js +23 -20
  310. package/js/src/wazirx.js +25 -18
  311. package/js/src/whitebit.js +33 -27
  312. package/js/src/woo.js +45 -35
  313. package/js/src/yobit.js +25 -20
  314. package/js/src/zaif.js +9 -9
  315. package/js/src/zonda.js +18 -17
  316. package/package.json +1 -1
@@ -28,9 +28,9 @@ class bitmart extends bitmart$1 {
28
28
  'CORS': undefined,
29
29
  'spot': true,
30
30
  'margin': true,
31
- 'swap': undefined,
31
+ 'swap': true,
32
32
  'future': false,
33
- 'option': undefined,
33
+ 'option': false,
34
34
  'borrowMargin': true,
35
35
  'cancelAllOrders': true,
36
36
  'cancelOrder': true,
@@ -42,12 +42,12 @@ class bitmart extends bitmart$1 {
42
42
  'createStopOrder': false,
43
43
  'fetchBalance': true,
44
44
  'fetchBorrowInterest': true,
45
- 'fetchBorrowRate': true,
46
45
  'fetchBorrowRateHistories': false,
47
46
  'fetchBorrowRateHistory': false,
48
- 'fetchBorrowRates': true,
49
47
  'fetchCanceledOrders': true,
50
48
  'fetchClosedOrders': true,
49
+ 'fetchCrossBorrowRate': false,
50
+ 'fetchCrossBorrowRates': false,
51
51
  'fetchCurrencies': true,
52
52
  'fetchDeposit': true,
53
53
  'fetchDepositAddress': true,
@@ -60,6 +60,8 @@ class bitmart extends bitmart$1 {
60
60
  'fetchFundingRate': true,
61
61
  'fetchFundingRateHistory': false,
62
62
  'fetchFundingRates': false,
63
+ 'fetchIsolatedBorrowRate': true,
64
+ 'fetchIsolatedBorrowRates': true,
63
65
  'fetchLiquidations': false,
64
66
  'fetchMarginMode': false,
65
67
  'fetchMarkets': true,
@@ -132,7 +134,7 @@ class bitmart extends bitmart$1 {
132
134
  'spot/quotation/v3/books': 4,
133
135
  'spot/quotation/v3/trades': 4,
134
136
  'spot/v1/ticker': 5,
135
- 'spot/v2/ticker': 5,
137
+ 'spot/v2/ticker': 30,
136
138
  'spot/v1/ticker_detail': 5,
137
139
  'spot/v1/steps': 30,
138
140
  'spot/v1/symbols/kline': 5,
@@ -177,10 +179,10 @@ class bitmart extends bitmart$1 {
177
179
  // margin
178
180
  'spot/v1/margin/isolated/borrow_record': 1,
179
181
  'spot/v1/margin/isolated/repay_record': 1,
180
- 'spot/v1/margin/isolated/pairs': 1,
181
- 'spot/v1/margin/isolated/account': 6,
182
- 'spot/v1/trade_fee': 6,
183
- 'spot/v1/user_fee': 6,
182
+ 'spot/v1/margin/isolated/pairs': 30,
183
+ 'spot/v1/margin/isolated/account': 5,
184
+ 'spot/v1/trade_fee': 30,
185
+ 'spot/v1/user_fee': 30,
184
186
  // broker
185
187
  'spot/v1/broker/rebate': 1,
186
188
  // contract
@@ -220,9 +222,9 @@ class bitmart extends bitmart$1 {
220
222
  'spot/v2/submit_order': 1,
221
223
  // margin
222
224
  'spot/v1/margin/submit_order': 1,
223
- 'spot/v1/margin/isolated/borrow': 6,
224
- 'spot/v1/margin/isolated/repay': 6,
225
- 'spot/v1/margin/isolated/transfer': 6,
225
+ 'spot/v1/margin/isolated/borrow': 30,
226
+ 'spot/v1/margin/isolated/repay': 30,
227
+ 'spot/v1/margin/isolated/transfer': 30,
226
228
  // contract
227
229
  'account/v1/transfer-contract-list': 60,
228
230
  'account/v1/transfer-contract': 60,
@@ -614,7 +616,7 @@ class bitmart extends bitmart$1 {
614
616
  * @name bitmart#fetchStatus
615
617
  * @description the latest known information on the availability of the exchange API
616
618
  * @param {object} [params] extra parameters specific to the bitmart api endpoint
617
- * @returns {object} a [status structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#exchange-status-structure}
619
+ * @returns {object} a [status structure]{@link https://docs.ccxt.com/#/?id=exchange-status-structure}
618
620
  */
619
621
  const options = this.safeValue(this.options, 'fetchStatus', {});
620
622
  const defaultType = this.safeString(this.options, 'defaultType');
@@ -950,7 +952,7 @@ class bitmart extends bitmart$1 {
950
952
  * @description please use fetchDepositWithdrawFee instead
951
953
  * @param {string} code unified currency code
952
954
  * @param {object} [params] extra parameters specific to the bitmart api endpoint
953
- * @returns {object} a [fee structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure}
955
+ * @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
954
956
  */
955
957
  await this.loadMarkets();
956
958
  const currency = this.currency(code);
@@ -1009,7 +1011,7 @@ class bitmart extends bitmart$1 {
1009
1011
  * @description fetch the fee for deposits and withdrawals
1010
1012
  * @param {string} code unified currency code
1011
1013
  * @param {object} [params] extra parameters specific to the bitmart api endpoint
1012
- * @returns {object} a [fee structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure}
1014
+ * @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
1013
1015
  */
1014
1016
  await this.loadMarkets();
1015
1017
  const currency = this.currency(code);
@@ -1122,7 +1124,7 @@ class bitmart extends bitmart$1 {
1122
1124
  * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
1123
1125
  * @param {string} symbol unified symbol of the market to fetch the ticker for
1124
1126
  * @param {object} [params] extra parameters specific to the bitmart api endpoint
1125
- * @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
1127
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1126
1128
  */
1127
1129
  await this.loadMarkets();
1128
1130
  const market = this.market(symbol);
@@ -1211,7 +1213,7 @@ class bitmart extends bitmart$1 {
1211
1213
  * @see https://developer-pro.bitmart.com/en/spot/#get-ticker-of-all-pairs-v2
1212
1214
  * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
1213
1215
  * @param {object} [params] extra parameters specific to the bitmart api endpoint
1214
- * @returns {object} a dictionary of [ticker structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
1216
+ * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1215
1217
  */
1216
1218
  await this.loadMarkets();
1217
1219
  symbols = this.marketSymbols(symbols);
@@ -1247,7 +1249,7 @@ class bitmart extends bitmart$1 {
1247
1249
  * @param {string} symbol unified symbol of the market to fetch the order book for
1248
1250
  * @param {int} [limit] the maximum amount of order book entries to return
1249
1251
  * @param {object} [params] extra parameters specific to the bitmart api endpoint
1250
- * @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
1252
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
1251
1253
  */
1252
1254
  await this.loadMarkets();
1253
1255
  const market = this.market(symbol);
@@ -1420,7 +1422,7 @@ class bitmart extends bitmart$1 {
1420
1422
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
1421
1423
  * @param {int} [limit] the maximum amount of trades to fetch
1422
1424
  * @param {object} [params] extra parameters specific to the bitmart api endpoint
1423
- * @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
1425
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
1424
1426
  */
1425
1427
  await this.loadMarkets();
1426
1428
  const market = this.market(symbol);
@@ -1631,7 +1633,7 @@ class bitmart extends bitmart$1 {
1631
1633
  * @param {object} [params] extra parameters specific to the bitmart api endpoint
1632
1634
  * @param {int} [params.until] the latest time in ms to fetch trades for
1633
1635
  * @param {boolean} [params.marginMode] *spot* whether to fetch trades for margin orders or spot orders, defaults to spot orders (only isolated margin orders are supported)
1634
- * @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
1636
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
1635
1637
  */
1636
1638
  await this.loadMarkets();
1637
1639
  let market = undefined;
@@ -1666,7 +1668,9 @@ class bitmart extends bitmart$1 {
1666
1668
  response = await this.privatePostSpotV4QueryTrades(this.extend(request, params));
1667
1669
  }
1668
1670
  else if (type === 'swap') {
1669
- this.checkRequiredSymbol('fetchMyTrades', symbol);
1671
+ if (symbol === undefined) {
1672
+ throw new errors.ArgumentsRequired(this.id + ' fetchMyTrades() requires a symbol argument');
1673
+ }
1670
1674
  if (since !== undefined) {
1671
1675
  request['start_time'] = since;
1672
1676
  }
@@ -1743,7 +1747,7 @@ class bitmart extends bitmart$1 {
1743
1747
  * @param {int} [since] the earliest time in ms to fetch trades for
1744
1748
  * @param {int} [limit] the maximum number of trades to retrieve
1745
1749
  * @param {object} [params] extra parameters specific to the bitmart api endpoint
1746
- * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
1750
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
1747
1751
  */
1748
1752
  await this.loadMarkets();
1749
1753
  const request = {
@@ -1816,7 +1820,7 @@ class bitmart extends bitmart$1 {
1816
1820
  * @see https://developer-pro.bitmart.com/en/spot/#get-account-balance
1817
1821
  * @see https://developer-pro.bitmart.com/en/spot/#get-margin-account-details-isolated
1818
1822
  * @param {object} [params] extra parameters specific to the bitmart api endpoint
1819
- * @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
1823
+ * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
1820
1824
  */
1821
1825
  await this.loadMarkets();
1822
1826
  let marketType = undefined;
@@ -1955,7 +1959,7 @@ class bitmart extends bitmart$1 {
1955
1959
  * @description fetch the trading fees for a market
1956
1960
  * @param {string} symbol unified market symbol
1957
1961
  * @param {object} [params] extra parameters specific to the bitmart api endpoint
1958
- * @returns {object} a [fee structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure}
1962
+ * @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
1959
1963
  */
1960
1964
  await this.loadMarkets();
1961
1965
  const market = this.market(symbol);
@@ -2159,7 +2163,7 @@ class bitmart extends bitmart$1 {
2159
2163
  * @param {string} [params.clientOrderId] client order id of the order
2160
2164
  * @param {boolean} [params.reduceOnly] *swap only* reduce only
2161
2165
  * @param {boolean} [params.postOnly] make sure the order is posted to the order book and not matched immediately
2162
- * @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
2166
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2163
2167
  */
2164
2168
  await this.loadMarkets();
2165
2169
  const market = this.market(symbol);
@@ -2218,7 +2222,7 @@ class bitmart extends bitmart$1 {
2218
2222
  * @param {boolean} [params.reduceOnly] *swap only* reduce only
2219
2223
  * @param {string} [params.marginMode] 'cross' or 'isolated', default is 'cross'
2220
2224
  * @param {string} [params.clientOrderId] client order id of the order
2221
- * @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
2225
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2222
2226
  */
2223
2227
  const market = this.market(symbol);
2224
2228
  const request = {
@@ -2294,7 +2298,7 @@ class bitmart extends bitmart$1 {
2294
2298
  * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
2295
2299
  * @param {object} [params] extra parameters specific to the bitmart api endpoint
2296
2300
  * @param {string} [params.marginMode] 'cross' or 'isolated'
2297
- * @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
2301
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2298
2302
  */
2299
2303
  const market = this.market(symbol);
2300
2304
  const request = {
@@ -2366,9 +2370,11 @@ class bitmart extends bitmart$1 {
2366
2370
  * @param {object} [params] extra parameters specific to the bitmart api endpoint
2367
2371
  * @param {string} [params.clientOrderId] *spot only* the client order id of the order to cancel
2368
2372
  * @param {boolean} [params.stop] *swap only* whether the order is a stop order
2369
- * @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
2373
+ * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2370
2374
  */
2371
- this.checkRequiredSymbol('cancelOrder', symbol);
2375
+ if (symbol === undefined) {
2376
+ throw new errors.ArgumentsRequired(this.id + ' cancelOrder() requires a symbol argument');
2377
+ }
2372
2378
  await this.loadMarkets();
2373
2379
  const market = this.market(symbol);
2374
2380
  const request = {
@@ -2452,7 +2458,7 @@ class bitmart extends bitmart$1 {
2452
2458
  * @param {string} symbol unified market symbol of the market to cancel orders in
2453
2459
  * @param {object} [params] extra parameters specific to the bitmart api endpoint
2454
2460
  * @param {string} [params.side] *spot only* 'buy' or 'sell'
2455
- * @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
2461
+ * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
2456
2462
  */
2457
2463
  await this.loadMarkets();
2458
2464
  const request = {};
@@ -2468,7 +2474,9 @@ class bitmart extends bitmart$1 {
2468
2474
  response = await this.privatePostSpotV1CancelOrders(this.extend(request, params));
2469
2475
  }
2470
2476
  else if (type === 'swap') {
2471
- this.checkRequiredSymbol('cancelAllOrders', symbol);
2477
+ if (symbol === undefined) {
2478
+ throw new errors.ArgumentsRequired(this.id + ' cancelAllOrders() requires a symbol argument');
2479
+ }
2472
2480
  response = await this.privatePostContractPrivateCancelOrders(this.extend(request, params));
2473
2481
  }
2474
2482
  //
@@ -2492,7 +2500,9 @@ class bitmart extends bitmart$1 {
2492
2500
  return response;
2493
2501
  }
2494
2502
  async fetchOrdersByStatus(status, symbol = undefined, since = undefined, limit = undefined, params = {}) {
2495
- this.checkRequiredSymbol('fetchOrdersByStatus', symbol);
2503
+ if (symbol === undefined) {
2504
+ throw new errors.ArgumentsRequired(this.id + ' fetchOrdersByStatus() requires a symbol argument');
2505
+ }
2496
2506
  await this.loadMarkets();
2497
2507
  const market = this.market(symbol);
2498
2508
  if (!market['spot']) {
@@ -2563,7 +2573,7 @@ class bitmart extends bitmart$1 {
2563
2573
  * @param {int} [params.until] *spot* the latest time in ms to fetch orders for
2564
2574
  * @param {string} [params.type] *swap* order type, 'limit' or 'market'
2565
2575
  * @param {string} [params.order_state] *swap* the order state, 'all' or 'partially_filled', default is 'all'
2566
- * @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
2576
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
2567
2577
  */
2568
2578
  await this.loadMarkets();
2569
2579
  let market = undefined;
@@ -2670,7 +2680,7 @@ class bitmart extends bitmart$1 {
2670
2680
  * @param {object} [params] extra parameters specific to the bitmart api endpoint
2671
2681
  * @param {int} [params.until] timestamp in ms of the latest entry
2672
2682
  * @param {string} [params.marginMode] *spot only* 'cross' or 'isolated', for margin trading
2673
- * @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
2683
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
2674
2684
  */
2675
2685
  await this.loadMarkets();
2676
2686
  let market = undefined;
@@ -2682,7 +2692,9 @@ class bitmart extends bitmart$1 {
2682
2692
  let type = undefined;
2683
2693
  [type, params] = this.handleMarketTypeAndParams('fetchClosedOrders', market, params);
2684
2694
  if (type !== 'spot') {
2685
- this.checkRequiredSymbol('fetchClosedOrders', symbol);
2695
+ if (symbol === undefined) {
2696
+ throw new errors.ArgumentsRequired(this.id + ' fetchClosedOrders() requires a symbol argument');
2697
+ }
2686
2698
  }
2687
2699
  let marginMode = undefined;
2688
2700
  [marginMode, params] = this.handleMarginModeAndParams('fetchClosedOrders', params);
@@ -2718,7 +2730,7 @@ class bitmart extends bitmart$1 {
2718
2730
  * @param {int} [since] timestamp in ms of the earliest order, default is undefined
2719
2731
  * @param {int} [limit] max number of orders to return, default is undefined
2720
2732
  * @param {object} [params] extra parameters specific to the bitmart api endpoint
2721
- * @returns {object} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
2733
+ * @returns {object} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
2722
2734
  */
2723
2735
  return await this.fetchOrdersByStatus('canceled', symbol, since, limit, params);
2724
2736
  }
@@ -2734,7 +2746,7 @@ class bitmart extends bitmart$1 {
2734
2746
  * @param {string} symbol unified symbol of the market the order was made in
2735
2747
  * @param {object} [params] extra parameters specific to the bitmart api endpoint
2736
2748
  * @param {string} [params.clientOrderId] *spot* fetch the order by client order id instead of order id
2737
- * @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
2749
+ * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2738
2750
  */
2739
2751
  await this.loadMarkets();
2740
2752
  const request = {};
@@ -2758,7 +2770,9 @@ class bitmart extends bitmart$1 {
2758
2770
  }
2759
2771
  }
2760
2772
  else if (type === 'swap') {
2761
- this.checkRequiredSymbol('fetchOrder', symbol);
2773
+ if (symbol === undefined) {
2774
+ throw new errors.ArgumentsRequired(this.id + ' fetchOrder() requires a symbol argument');
2775
+ }
2762
2776
  request['symbol'] = market['id'];
2763
2777
  request['order_id'] = id;
2764
2778
  response = await this.privateGetContractPrivateOrder(this.extend(request, params));
@@ -2823,7 +2837,7 @@ class bitmart extends bitmart$1 {
2823
2837
  * @description fetch the deposit address for a currency associated with this account
2824
2838
  * @param {string} code unified currency code
2825
2839
  * @param {object} [params] extra parameters specific to the bitmart api endpoint
2826
- * @returns {object} an [address structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#address-structure}
2840
+ * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
2827
2841
  */
2828
2842
  await this.loadMarkets();
2829
2843
  const currency = this.currency(code);
@@ -2888,7 +2902,7 @@ class bitmart extends bitmart$1 {
2888
2902
  * @param {string} address the address to withdraw to
2889
2903
  * @param {string} tag
2890
2904
  * @param {object} [params] extra parameters specific to the bitmart api endpoint
2891
- * @returns {object} a [transaction structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
2905
+ * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
2892
2906
  */
2893
2907
  [tag, params] = this.handleWithdrawTagAndParams(tag, params);
2894
2908
  this.checkAddress(address);
@@ -2997,7 +3011,7 @@ class bitmart extends bitmart$1 {
2997
3011
  * @param {string} id deposit id
2998
3012
  * @param {string} code not used by bitmart fetchDeposit ()
2999
3013
  * @param {object} [params] extra parameters specific to the bitmart api endpoint
3000
- * @returns {object} a [transaction structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
3014
+ * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
3001
3015
  */
3002
3016
  await this.loadMarkets();
3003
3017
  const request = {
@@ -3039,7 +3053,7 @@ class bitmart extends bitmart$1 {
3039
3053
  * @param {int} [since] the earliest time in ms to fetch deposits for
3040
3054
  * @param {int} [limit] the maximum number of deposits structures to retrieve
3041
3055
  * @param {object} [params] extra parameters specific to the bitmart api endpoint
3042
- * @returns {object[]} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
3056
+ * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
3043
3057
  */
3044
3058
  return await this.fetchTransactionsByType('deposit', code, since, limit, params);
3045
3059
  }
@@ -3051,7 +3065,7 @@ class bitmart extends bitmart$1 {
3051
3065
  * @param {string} id withdrawal id
3052
3066
  * @param {string} code not used by bitmart.fetchWithdrawal
3053
3067
  * @param {object} [params] extra parameters specific to the bitmart api endpoint
3054
- * @returns {object} a [transaction structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
3068
+ * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
3055
3069
  */
3056
3070
  await this.loadMarkets();
3057
3071
  const request = {
@@ -3093,7 +3107,7 @@ class bitmart extends bitmart$1 {
3093
3107
  * @param {int} [since] the earliest time in ms to fetch withdrawals for
3094
3108
  * @param {int} [limit] the maximum number of withdrawals structures to retrieve
3095
3109
  * @param {object} [params] extra parameters specific to the bitmart api endpoint
3096
- * @returns {object[]} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
3110
+ * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
3097
3111
  */
3098
3112
  return await this.fetchTransactionsByType('withdraw', code, since, limit, params);
3099
3113
  }
@@ -3194,9 +3208,11 @@ class bitmart extends bitmart$1 {
3194
3208
  * @param {string} symbol unified market symbol
3195
3209
  * @param {object} [params] extra parameters specific to the bitmart api endpoint
3196
3210
  * @param {string} [params.marginMode] 'isolated' is the default and 'cross' is unavailable
3197
- * @returns {object} a [margin loan structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#margin-loan-structure}
3211
+ * @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
3198
3212
  */
3199
- this.checkRequiredSymbol('repayMargin', symbol);
3213
+ if (symbol === undefined) {
3214
+ throw new errors.ArgumentsRequired(this.id + ' repayMargin() requires a symbol argument');
3215
+ }
3200
3216
  await this.loadMarkets();
3201
3217
  const market = this.market(symbol);
3202
3218
  const currency = this.currency(code);
@@ -3235,9 +3251,11 @@ class bitmart extends bitmart$1 {
3235
3251
  * @param {string} symbol unified market symbol
3236
3252
  * @param {object} [params] extra parameters specific to the bitmart api endpoint
3237
3253
  * @param {string} [params.marginMode] 'isolated' is the default and 'cross' is unavailable
3238
- * @returns {object} a [margin loan structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#margin-loan-structure}
3254
+ * @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
3239
3255
  */
3240
- this.checkRequiredSymbol('borrowMargin', symbol);
3256
+ if (symbol === undefined) {
3257
+ throw new errors.ArgumentsRequired(this.id + ' borrowMargin() requires a symbol argument');
3258
+ }
3241
3259
  await this.loadMarkets();
3242
3260
  const market = this.market(symbol);
3243
3261
  const currency = this.currency(code);
@@ -3291,20 +3309,21 @@ class bitmart extends bitmart$1 {
3291
3309
  };
3292
3310
  }
3293
3311
  async fetchIsolatedBorrowRate(symbol, params = {}) {
3294
- /**
3295
- * @method
3296
- * @name bitmart#fetchBorrowRate
3297
- * @description fetch the rate of interest to borrow a currency for margin trading
3298
- * @see https://developer-pro.bitmart.com/en/spot/#get-trading-pair-borrowing-rate-and-amount
3299
- * @param {string} code unified currency code
3300
- * @param {object} [params] extra parameters specific to the bitmart api endpoint
3301
- * @returns {object} a [borrow rate structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#borrow-rate-structure}
3302
- */
3312
+ //
3313
+ // @method
3314
+ // @name bitmart#fetchIsolatedBorrowRate
3315
+ // @description fetch the rate of interest to borrow a currency for margin trading
3316
+ // @see https://developer-pro.bitmart.com/en/spot/#get-trading-pair-borrowing-rate-and-amount-keyed
3317
+ // @param {string} symbol unified symbol of the market to fetch the borrow rate for
3318
+ // @param {object} [params] extra parameters specific to the bitmart api endpoint
3319
+ // <<<<<<< HEAD
3320
+ // @returns {object} a [borrow rate structure]{@link https://docs.ccxt.com/#/?id=borrow-rate-structure}
3321
+ // =======
3322
+ // @returns {object} an [isolated borrow rate structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#isolated-borrow-rate-structure}
3323
+ // >>>>>>> 3215552206edf1cda1ae63d2063535e19973dbe5
3324
+ //
3303
3325
  await this.loadMarkets();
3304
- let market = undefined;
3305
- if (symbol !== undefined) {
3306
- market = this.market(symbol);
3307
- }
3326
+ const market = this.market(symbol);
3308
3327
  const request = {
3309
3328
  'symbol': market['id'],
3310
3329
  };
@@ -3372,20 +3391,16 @@ class bitmart extends bitmart$1 {
3372
3391
  //
3373
3392
  const marketId = this.safeString(info, 'symbol');
3374
3393
  const symbol = this.safeSymbol(marketId, market);
3375
- const baseData = this.safeValue(info, 'base');
3376
- const quoteData = this.safeValue(info, 'quote');
3394
+ const baseData = this.safeValue(info, 'base', {});
3395
+ const quoteData = this.safeValue(info, 'quote', {});
3377
3396
  const baseId = this.safeString(baseData, 'currency');
3378
3397
  const quoteId = this.safeString(quoteData, 'currency');
3379
- const base = this.safeCurrencyCode(baseId);
3380
- const quote = this.safeCurrencyCode(quoteId);
3381
- const baseRate = this.safeNumber(baseData, 'hourly_interest');
3382
- const quoteRate = this.safeNumber(quoteData, 'hourly_interest');
3383
3398
  return {
3384
3399
  'symbol': symbol,
3385
- 'base': base,
3386
- 'baseRate': baseRate,
3387
- 'quote': quote,
3388
- 'quoteRate': quoteRate,
3400
+ 'base': this.safeCurrencyCode(baseId),
3401
+ 'baseRate': this.safeNumber(baseData, 'hourly_interest'),
3402
+ 'quote': this.safeCurrencyCode(quoteId),
3403
+ 'quoteRate': this.safeNumber(quoteData, 'hourly_interest'),
3389
3404
  'period': 3600000,
3390
3405
  'timestamp': undefined,
3391
3406
  'datetime': undefined,
@@ -3395,11 +3410,11 @@ class bitmart extends bitmart$1 {
3395
3410
  async fetchIsolatedBorrowRates(params = {}) {
3396
3411
  /**
3397
3412
  * @method
3398
- * @name bitmart#fetchBorrowRates
3413
+ * @name bitmart#fetchIsolatedBorrowRates
3399
3414
  * @description fetch the borrow interest rates of all currencies, currently only works for isolated margin
3400
- * @see https://developer-pro.bitmart.com/en/spot/#get-trading-pair-borrowing-rate-and-amount
3415
+ * @see https://developer-pro.bitmart.com/en/spot/#get-trading-pair-borrowing-rate-and-amount-keyed
3401
3416
  * @param {object} [params] extra parameters specific to the bitmart api endpoint
3402
- * @returns {object} a list of [borrow rate structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#borrow-rate-structure}
3417
+ * @returns {object} a list of [isolated borrow rate structures]{@link https://docs.ccxt.com/#/?id=isolated-borrow-rate-structure}
3403
3418
  */
3404
3419
  await this.loadMarkets();
3405
3420
  const response = await this.privateGetSpotV1MarginIsolatedPairs(params);
@@ -3456,7 +3471,7 @@ class bitmart extends bitmart$1 {
3456
3471
  * @param {string} fromAccount account to transfer from
3457
3472
  * @param {string} toAccount account to transfer to
3458
3473
  * @param {object} [params] extra parameters specific to the bitmart api endpoint
3459
- * @returns {object} a [transfer structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transfer-structure}
3474
+ * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
3460
3475
  */
3461
3476
  await this.loadMarkets();
3462
3477
  const currency = this.currency(code);
@@ -3597,7 +3612,7 @@ class bitmart extends bitmart$1 {
3597
3612
  * @param {object} [params] extra parameters specific to the bitmart api endpoint
3598
3613
  * @param {int} [params.page] the required number of pages, default is 1, max is 1000
3599
3614
  * @param {int} [params.until] the latest time in ms to fetch transfers for
3600
- * @returns {object[]} a list of [transfer structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transfer-structure}
3615
+ * @returns {object[]} a list of [transfer structures]{@link https://docs.ccxt.com/#/?id=transfer-structure}
3601
3616
  */
3602
3617
  await this.loadMarkets();
3603
3618
  if (limit === undefined) {
@@ -3659,9 +3674,11 @@ class bitmart extends bitmart$1 {
3659
3674
  * @param {int} [since] the earliest time in ms to fetch borrrow interest for
3660
3675
  * @param {int} [limit] the maximum number of structures to retrieve
3661
3676
  * @param {object} [params] extra parameters specific to the bitmart api endpoint
3662
- * @returns {object[]} a list of [borrow interest structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#borrow-interest-structure}
3677
+ * @returns {object[]} a list of [borrow interest structures]{@link https://docs.ccxt.com/#/?id=borrow-interest-structure}
3663
3678
  */
3664
- this.checkRequiredSymbol('fetchBorrowInterest', symbol);
3679
+ if (symbol === undefined) {
3680
+ throw new errors.ArgumentsRequired(this.id + ' fetchBorrowInterest() requires a symbol argument');
3681
+ }
3665
3682
  await this.loadMarkets();
3666
3683
  const market = this.market(symbol);
3667
3684
  const request = {
@@ -3736,7 +3753,7 @@ class bitmart extends bitmart$1 {
3736
3753
  * @see https://developer-pro.bitmart.com/en/futures/#get-futures-openinterest
3737
3754
  * @param {string} symbol Unified CCXT market symbol
3738
3755
  * @param {object} [params] exchange specific parameters
3739
- * @returns {object} an open interest structure{@link https://github.com/ccxt/ccxt/wiki/Manual#open-interest-structure}
3756
+ * @returns {object} an open interest structure{@link https://docs.ccxt.com/#/?id=open-interest-structure}
3740
3757
  */
3741
3758
  await this.loadMarkets();
3742
3759
  const market = this.market(symbol);
@@ -3795,7 +3812,9 @@ class bitmart extends bitmart$1 {
3795
3812
  * @param {string} [params.marginMode] 'isolated' or 'cross'
3796
3813
  * @returns {object} response from the exchange
3797
3814
  */
3798
- this.checkRequiredSymbol('setLeverage', symbol);
3815
+ if (symbol === undefined) {
3816
+ throw new errors.ArgumentsRequired(this.id + ' setLeverage() requires a symbol argument');
3817
+ }
3799
3818
  let marginMode = undefined;
3800
3819
  [marginMode, params] = this.handleMarginModeAndParams('setLeverage', params);
3801
3820
  this.checkRequiredArgument('setLeverage', marginMode, 'marginMode', ['isolated', 'cross']);
@@ -3819,7 +3838,7 @@ class bitmart extends bitmart$1 {
3819
3838
  * @see https://developer-pro.bitmart.com/en/futures/#get-current-funding-rate
3820
3839
  * @param {string} symbol unified market symbol
3821
3840
  * @param {object} [params] extra parameters specific to the bitmart api endpoint
3822
- * @returns {object} a [funding rate structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-structure}
3841
+ * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
3823
3842
  */
3824
3843
  await this.loadMarkets();
3825
3844
  const market = this.market(symbol);
@@ -3885,7 +3904,7 @@ class bitmart extends bitmart$1 {
3885
3904
  * @see https://developer-pro.bitmart.com/en/futures/#get-current-position-keyed
3886
3905
  * @param {string} symbol unified market symbol of the market the position is held in
3887
3906
  * @param {object} [params] extra parameters specific to the bitmart api endpoint
3888
- * @returns {object} a [position structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#position-structure}
3907
+ * @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
3889
3908
  */
3890
3909
  await this.loadMarkets();
3891
3910
  const market = this.market(symbol);
@@ -3934,7 +3953,7 @@ class bitmart extends bitmart$1 {
3934
3953
  * @see https://developer-pro.bitmart.com/en/futures/#get-current-position-keyed
3935
3954
  * @param {string[]|undefined} symbols list of unified market symbols
3936
3955
  * @param {object} [params] extra parameters specific to the bitmart api endpoint
3937
- * @returns {object[]} a list of [position structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#position-structure}
3956
+ * @returns {object[]} a list of [position structures]{@link https://docs.ccxt.com/#/?id=position-structure}
3938
3957
  */
3939
3958
  await this.loadMarkets();
3940
3959
  let market = undefined;
@@ -4062,9 +4081,11 @@ class bitmart extends bitmart$1 {
4062
4081
  * @param {int} [limit] the maximum number of liquidation structures to retrieve
4063
4082
  * @param {object} [params] exchange specific parameters for the bitmart api endpoint
4064
4083
  * @param {int} [params.until] timestamp in ms of the latest liquidation
4065
- * @returns {object} an array of [liquidation structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#liquidation-structure}
4084
+ * @returns {object} an array of [liquidation structures]{@link https://docs.ccxt.com/#/?id=liquidation-structure}
4066
4085
  */
4067
- this.checkRequiredSymbol('fetchMyLiquidations', symbol);
4086
+ if (symbol === undefined) {
4087
+ throw new errors.ArgumentsRequired(this.id + ' fetchMyLiquidations() requires a symbol argument');
4088
+ }
4068
4089
  await this.loadMarkets();
4069
4090
  const market = this.market(symbol);
4070
4091
  if (!market['swap']) {