ccxt 4.1.56 → 4.1.58

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (318) hide show
  1. package/.git-templates/hooks/pre-push +2 -2
  2. package/README.md +3 -3
  3. package/build.sh +30 -18
  4. package/dist/ccxt.browser.js +3893 -3214
  5. package/dist/ccxt.browser.min.js +10 -10
  6. package/dist/cjs/ccxt.js +1 -1
  7. package/dist/cjs/src/ace.js +17 -13
  8. package/dist/cjs/src/alpaca.js +6 -6
  9. package/dist/cjs/src/ascendex.js +35 -29
  10. package/dist/cjs/src/base/Exchange.js +39 -26
  11. package/dist/cjs/src/base/Precise.js +1 -3
  12. package/dist/cjs/src/base/ws/Client.js +1 -1
  13. package/dist/cjs/src/bigone.js +24 -20
  14. package/dist/cjs/src/binance.js +97 -76
  15. package/dist/cjs/src/bingx.js +63 -44
  16. package/dist/cjs/src/bit2c.js +18 -15
  17. package/dist/cjs/src/bitbank.js +16 -15
  18. package/dist/cjs/src/bitbns.js +28 -18
  19. package/dist/cjs/src/bitfinex.js +23 -21
  20. package/dist/cjs/src/bitfinex2.js +32 -28
  21. package/dist/cjs/src/bitflyer.js +28 -20
  22. package/dist/cjs/src/bitforex.js +25 -18
  23. package/dist/cjs/src/bitget.js +184 -147
  24. package/dist/cjs/src/bithumb.js +23 -16
  25. package/dist/cjs/src/bitmart.js +110 -89
  26. package/dist/cjs/src/bitmex.js +104 -64
  27. package/dist/cjs/src/bitopro.js +38 -26
  28. package/dist/cjs/src/bitpanda.js +24 -23
  29. package/dist/cjs/src/bitrue.js +33 -24
  30. package/dist/cjs/src/bitso.js +24 -23
  31. package/dist/cjs/src/bitstamp.js +24 -23
  32. package/dist/cjs/src/bittrex.js +30 -29
  33. package/dist/cjs/src/bitvavo.js +38 -30
  34. package/dist/cjs/src/bl3p.js +11 -10
  35. package/dist/cjs/src/blockchaincom.js +20 -20
  36. package/dist/cjs/src/btcalpha.js +18 -17
  37. package/dist/cjs/src/btcbox.js +13 -12
  38. package/dist/cjs/src/btcmarkets.js +20 -19
  39. package/dist/cjs/src/btcturk.js +14 -13
  40. package/dist/cjs/src/bybit.js +84 -54
  41. package/dist/cjs/src/cex.js +16 -14
  42. package/dist/cjs/src/coinbase.js +29 -27
  43. package/dist/cjs/src/coinbasepro.js +27 -25
  44. package/dist/cjs/src/coincheck.js +15 -14
  45. package/dist/cjs/src/coinex.js +100 -77
  46. package/dist/cjs/src/coinlist.js +28 -27
  47. package/dist/cjs/src/coinmate.js +20 -17
  48. package/dist/cjs/src/coinone.js +21 -16
  49. package/dist/cjs/src/coinsph.js +37 -28
  50. package/dist/cjs/src/coinspot.js +12 -11
  51. package/dist/cjs/src/cryptocom.js +40 -202
  52. package/dist/cjs/src/currencycom.js +32 -25
  53. package/dist/cjs/src/delta.js +34 -28
  54. package/dist/cjs/src/deribit.js +39 -36
  55. package/dist/cjs/src/digifinex.js +64 -44
  56. package/dist/cjs/src/exmo.js +29 -27
  57. package/dist/cjs/src/gate.js +67 -53
  58. package/dist/cjs/src/gemini.js +23 -20
  59. package/dist/cjs/src/hitbtc.js +65 -56
  60. package/dist/cjs/src/hollaex.js +30 -27
  61. package/dist/cjs/src/htx.js +132 -143
  62. package/dist/cjs/src/huobijp.js +22 -20
  63. package/dist/cjs/src/idex.js +22 -21
  64. package/dist/cjs/src/independentreserve.js +15 -14
  65. package/dist/cjs/src/indodax.js +30 -26
  66. package/dist/cjs/src/kraken.js +29 -27
  67. package/dist/cjs/src/krakenfutures.js +29 -22
  68. package/dist/cjs/src/kucoin.js +48 -43
  69. package/dist/cjs/src/kucoinfutures.js +33 -28
  70. package/dist/cjs/src/kuna.js +25 -24
  71. package/dist/cjs/src/latoken.js +24 -22
  72. package/dist/cjs/src/lbank.js +45 -30
  73. package/dist/cjs/src/luno.js +22 -19
  74. package/dist/cjs/src/lykke.js +19 -17
  75. package/dist/cjs/src/mercado.js +30 -19
  76. package/dist/cjs/src/mexc.js +60 -49
  77. package/dist/cjs/src/ndax.js +23 -22
  78. package/dist/cjs/src/novadax.js +23 -22
  79. package/dist/cjs/src/oceanex.js +22 -19
  80. package/dist/cjs/src/okcoin.js +29 -23
  81. package/dist/cjs/src/okx.js +87 -82
  82. package/dist/cjs/src/p2b.js +79 -82
  83. package/dist/cjs/src/paymium.js +10 -10
  84. package/dist/cjs/src/phemex.js +63 -40
  85. package/dist/cjs/src/poloniex.js +22 -22
  86. package/dist/cjs/src/poloniexfutures.js +23 -19
  87. package/dist/cjs/src/pro/alpaca.js +5 -5
  88. package/dist/cjs/src/pro/ascendex.js +4 -4
  89. package/dist/cjs/src/pro/binance.js +16 -16
  90. package/dist/cjs/src/pro/bingx.js +1 -1
  91. package/dist/cjs/src/pro/bitfinex.js +4 -4
  92. package/dist/cjs/src/pro/bitfinex2.js +6 -6
  93. package/dist/cjs/src/pro/bitget.js +7 -7
  94. package/dist/cjs/src/pro/bitmart.js +7 -5
  95. package/dist/cjs/src/pro/bitmex.js +6 -6
  96. package/dist/cjs/src/pro/bitopro.js +4 -4
  97. package/dist/cjs/src/pro/bitpanda.js +6 -6
  98. package/dist/cjs/src/pro/bitrue.js +2 -2
  99. package/dist/cjs/src/pro/bitstamp.js +6 -4
  100. package/dist/cjs/src/pro/bittrex.js +15 -6
  101. package/dist/cjs/src/pro/bitvavo.js +11 -7
  102. package/dist/cjs/src/pro/blockchaincom.js +8 -8
  103. package/dist/cjs/src/pro/bybit.js +7 -7
  104. package/dist/cjs/src/pro/cex.js +13 -9
  105. package/dist/cjs/src/pro/coinbase.js +5 -5
  106. package/dist/cjs/src/pro/coinbasepro.js +11 -10
  107. package/dist/cjs/src/pro/coinex.js +7 -9
  108. package/dist/cjs/src/pro/cryptocom.js +9 -9
  109. package/dist/cjs/src/pro/currencycom.js +4 -4
  110. package/dist/cjs/src/pro/deribit.js +6 -6
  111. package/dist/cjs/src/pro/exmo.js +12 -14
  112. package/dist/cjs/src/pro/gate.js +7 -7
  113. package/dist/cjs/src/pro/gemini.js +3 -3
  114. package/dist/cjs/src/pro/hitbtc.js +263 -4
  115. package/dist/cjs/src/pro/hollaex.js +5 -5
  116. package/dist/cjs/src/pro/htx.js +6 -6
  117. package/dist/cjs/src/pro/huobijp.js +3 -3
  118. package/dist/cjs/src/pro/idex.js +4 -4
  119. package/dist/cjs/src/pro/independentreserve.js +2 -2
  120. package/dist/cjs/src/pro/kraken.js +10 -10
  121. package/dist/cjs/src/pro/krakenfutures.js +41 -17
  122. package/dist/cjs/src/pro/kucoin.js +7 -7
  123. package/dist/cjs/src/pro/kucoinfutures.js +8 -6
  124. package/dist/cjs/src/pro/luno.js +2 -2
  125. package/dist/cjs/src/pro/mexc.js +6 -6
  126. package/dist/cjs/src/pro/ndax.js +3 -3
  127. package/dist/cjs/src/pro/okcoin.js +5 -5
  128. package/dist/cjs/src/pro/okx.js +12 -12
  129. package/dist/cjs/src/pro/phemex.js +6 -6
  130. package/dist/cjs/src/pro/poloniex.js +7 -7
  131. package/dist/cjs/src/pro/poloniexfutures.js +5 -5
  132. package/dist/cjs/src/pro/probit.js +6 -6
  133. package/dist/cjs/src/pro/upbit.js +3 -3
  134. package/dist/cjs/src/pro/wazirx.js +8 -8
  135. package/dist/cjs/src/pro/whitebit.js +12 -8
  136. package/dist/cjs/src/pro/woo.js +1 -1
  137. package/dist/cjs/src/probit.js +28 -23
  138. package/dist/cjs/src/tidex.js +16 -15
  139. package/dist/cjs/src/timex.js +19 -18
  140. package/dist/cjs/src/tokocrypto.js +27 -22
  141. package/dist/cjs/src/upbit.js +19 -19
  142. package/dist/cjs/src/wavesexchange.js +22 -19
  143. package/dist/cjs/src/wazirx.js +24 -17
  144. package/dist/cjs/src/whitebit.js +33 -27
  145. package/dist/cjs/src/woo.js +44 -34
  146. package/dist/cjs/src/yobit.js +25 -20
  147. package/dist/cjs/src/zaif.js +9 -9
  148. package/dist/cjs/src/zonda.js +18 -17
  149. package/js/ccxt.d.ts +1 -1
  150. package/js/ccxt.js +1 -1
  151. package/js/src/abstract/bybit.d.ts +1 -0
  152. package/js/src/abstract/cryptocom.d.ts +0 -20
  153. package/js/src/ace.js +18 -14
  154. package/js/src/alpaca.js +6 -6
  155. package/js/src/ascendex.js +35 -29
  156. package/js/src/base/Exchange.d.ts +37 -34
  157. package/js/src/base/Exchange.js +39 -26
  158. package/js/src/base/Precise.d.ts +4 -4
  159. package/js/src/base/Precise.js +1 -3
  160. package/js/src/base/functions/type.d.ts +25 -25
  161. package/js/src/base/types.d.ts +21 -14
  162. package/js/src/base/ws/Client.js +1 -1
  163. package/js/src/bigone.js +25 -21
  164. package/js/src/binance.d.ts +2 -2
  165. package/js/src/binance.js +97 -76
  166. package/js/src/bingx.js +63 -44
  167. package/js/src/bit2c.js +19 -16
  168. package/js/src/bitbank.js +16 -15
  169. package/js/src/bitbns.js +28 -18
  170. package/js/src/bitfinex.js +23 -21
  171. package/js/src/bitfinex2.js +32 -28
  172. package/js/src/bitflyer.js +28 -20
  173. package/js/src/bitforex.js +26 -19
  174. package/js/src/bitget.d.ts +25 -3
  175. package/js/src/bitget.js +184 -147
  176. package/js/src/bithumb.js +23 -16
  177. package/js/src/bitmart.d.ts +1 -1
  178. package/js/src/bitmart.js +110 -89
  179. package/js/src/bitmex.d.ts +2 -2
  180. package/js/src/bitmex.js +104 -64
  181. package/js/src/bitopro.js +38 -26
  182. package/js/src/bitpanda.js +24 -23
  183. package/js/src/bitrue.js +33 -24
  184. package/js/src/bitso.js +24 -23
  185. package/js/src/bitstamp.d.ts +2 -2
  186. package/js/src/bitstamp.js +24 -23
  187. package/js/src/bittrex.js +30 -29
  188. package/js/src/bitvavo.js +38 -30
  189. package/js/src/bl3p.js +11 -10
  190. package/js/src/blockchaincom.js +20 -20
  191. package/js/src/btcalpha.js +18 -17
  192. package/js/src/btcbox.js +13 -12
  193. package/js/src/btcmarkets.js +20 -19
  194. package/js/src/btcturk.js +14 -13
  195. package/js/src/bybit.d.ts +1 -1
  196. package/js/src/bybit.js +84 -54
  197. package/js/src/cex.js +16 -14
  198. package/js/src/coinbase.js +29 -27
  199. package/js/src/coinbasepro.js +27 -25
  200. package/js/src/coincheck.js +15 -14
  201. package/js/src/coinex.d.ts +1 -1
  202. package/js/src/coinex.js +100 -77
  203. package/js/src/coinlist.js +28 -27
  204. package/js/src/coinmate.js +21 -18
  205. package/js/src/coinone.js +21 -16
  206. package/js/src/coinsph.js +37 -28
  207. package/js/src/coinspot.js +12 -11
  208. package/js/src/cryptocom.d.ts +0 -23
  209. package/js/src/cryptocom.js +40 -202
  210. package/js/src/currencycom.js +32 -25
  211. package/js/src/delta.js +35 -29
  212. package/js/src/deribit.js +39 -36
  213. package/js/src/digifinex.d.ts +2 -2
  214. package/js/src/digifinex.js +65 -45
  215. package/js/src/exmo.js +29 -27
  216. package/js/src/gate.d.ts +1 -1
  217. package/js/src/gate.js +67 -53
  218. package/js/src/gemini.js +23 -20
  219. package/js/src/hitbtc.d.ts +1 -0
  220. package/js/src/hitbtc.js +65 -56
  221. package/js/src/hollaex.js +30 -27
  222. package/js/src/htx.d.ts +11 -3
  223. package/js/src/htx.js +132 -143
  224. package/js/src/huobijp.js +23 -21
  225. package/js/src/idex.js +22 -21
  226. package/js/src/independentreserve.js +15 -14
  227. package/js/src/indodax.js +30 -26
  228. package/js/src/kraken.js +29 -27
  229. package/js/src/krakenfutures.js +29 -22
  230. package/js/src/kucoin.d.ts +1 -1
  231. package/js/src/kucoin.js +48 -43
  232. package/js/src/kucoinfutures.js +33 -28
  233. package/js/src/kuna.js +25 -24
  234. package/js/src/latoken.js +25 -23
  235. package/js/src/lbank.js +46 -31
  236. package/js/src/luno.js +22 -19
  237. package/js/src/lykke.js +19 -17
  238. package/js/src/mercado.js +30 -19
  239. package/js/src/mexc.d.ts +1 -1
  240. package/js/src/mexc.js +60 -49
  241. package/js/src/ndax.js +23 -22
  242. package/js/src/novadax.js +23 -22
  243. package/js/src/oceanex.js +22 -19
  244. package/js/src/okcoin.js +29 -23
  245. package/js/src/okx.d.ts +2 -2
  246. package/js/src/okx.js +87 -82
  247. package/js/src/p2b.d.ts +8 -7
  248. package/js/src/p2b.js +79 -81
  249. package/js/src/paymium.js +10 -10
  250. package/js/src/phemex.js +63 -40
  251. package/js/src/poloniex.js +22 -22
  252. package/js/src/poloniexfutures.js +23 -19
  253. package/js/src/pro/alpaca.js +5 -5
  254. package/js/src/pro/ascendex.js +4 -4
  255. package/js/src/pro/binance.js +16 -16
  256. package/js/src/pro/bingx.js +1 -1
  257. package/js/src/pro/bitfinex.js +4 -4
  258. package/js/src/pro/bitfinex2.d.ts +1 -1
  259. package/js/src/pro/bitfinex2.js +6 -6
  260. package/js/src/pro/bitget.js +7 -7
  261. package/js/src/pro/bitmart.js +7 -5
  262. package/js/src/pro/bitmex.js +6 -6
  263. package/js/src/pro/bitopro.js +4 -4
  264. package/js/src/pro/bitpanda.js +6 -6
  265. package/js/src/pro/bitrue.js +2 -2
  266. package/js/src/pro/bitstamp.js +7 -5
  267. package/js/src/pro/bittrex.js +15 -6
  268. package/js/src/pro/bitvavo.js +12 -8
  269. package/js/src/pro/blockchaincom.js +8 -8
  270. package/js/src/pro/bybit.js +7 -7
  271. package/js/src/pro/cex.js +14 -10
  272. package/js/src/pro/coinbase.js +5 -5
  273. package/js/src/pro/coinbasepro.js +12 -11
  274. package/js/src/pro/coinex.js +7 -9
  275. package/js/src/pro/cryptocom.js +9 -9
  276. package/js/src/pro/currencycom.js +4 -4
  277. package/js/src/pro/deribit.js +6 -6
  278. package/js/src/pro/exmo.js +12 -14
  279. package/js/src/pro/gate.js +7 -7
  280. package/js/src/pro/gemini.js +3 -3
  281. package/js/src/pro/hitbtc.d.ts +8 -1
  282. package/js/src/pro/hitbtc.js +264 -5
  283. package/js/src/pro/hollaex.js +5 -5
  284. package/js/src/pro/htx.js +6 -6
  285. package/js/src/pro/huobijp.js +3 -3
  286. package/js/src/pro/idex.js +4 -4
  287. package/js/src/pro/independentreserve.js +2 -2
  288. package/js/src/pro/kraken.js +10 -10
  289. package/js/src/pro/krakenfutures.d.ts +1 -0
  290. package/js/src/pro/krakenfutures.js +42 -18
  291. package/js/src/pro/kucoin.js +7 -7
  292. package/js/src/pro/kucoinfutures.js +8 -6
  293. package/js/src/pro/luno.js +2 -2
  294. package/js/src/pro/mexc.js +6 -6
  295. package/js/src/pro/ndax.js +3 -3
  296. package/js/src/pro/okcoin.js +5 -5
  297. package/js/src/pro/okx.js +12 -12
  298. package/js/src/pro/phemex.js +6 -6
  299. package/js/src/pro/poloniex.js +7 -7
  300. package/js/src/pro/poloniexfutures.js +5 -5
  301. package/js/src/pro/probit.js +6 -6
  302. package/js/src/pro/upbit.js +3 -3
  303. package/js/src/pro/wazirx.js +8 -8
  304. package/js/src/pro/whitebit.js +13 -9
  305. package/js/src/pro/woo.js +1 -1
  306. package/js/src/probit.js +29 -24
  307. package/js/src/tidex.js +16 -15
  308. package/js/src/timex.js +19 -18
  309. package/js/src/tokocrypto.js +28 -23
  310. package/js/src/upbit.js +19 -19
  311. package/js/src/wavesexchange.js +23 -20
  312. package/js/src/wazirx.js +25 -18
  313. package/js/src/whitebit.js +33 -27
  314. package/js/src/woo.js +45 -35
  315. package/js/src/yobit.js +25 -20
  316. package/js/src/zaif.js +9 -9
  317. package/js/src/zonda.js +18 -17
  318. package/package.json +1 -1
@@ -29,7 +29,7 @@ class cryptocom extends cryptocom$1 {
29
29
  'future': true,
30
30
  'option': true,
31
31
  'addMargin': false,
32
- 'borrowMargin': true,
32
+ 'borrowMargin': false,
33
33
  'cancelAllOrders': true,
34
34
  'cancelOrder': true,
35
35
  'cancelOrders': true,
@@ -39,11 +39,11 @@ class cryptocom extends cryptocom$1 {
39
39
  'fetchBalance': true,
40
40
  'fetchBidsAsks': false,
41
41
  'fetchBorrowInterest': false,
42
- 'fetchBorrowRate': false,
43
42
  'fetchBorrowRateHistories': false,
44
43
  'fetchBorrowRateHistory': false,
45
- 'fetchBorrowRates': false,
46
44
  'fetchClosedOrders': 'emulated',
45
+ 'fetchCrossBorrowRate': false,
46
+ 'fetchCrossBorrowRates': false,
47
47
  'fetchCurrencies': false,
48
48
  'fetchDepositAddress': true,
49
49
  'fetchDepositAddressesByNetwork': true,
@@ -57,6 +57,8 @@ class cryptocom extends cryptocom$1 {
57
57
  'fetchFundingRates': false,
58
58
  'fetchGreeks': false,
59
59
  'fetchIndexOHLCV': false,
60
+ 'fetchIsolatedBorrowRate': false,
61
+ 'fetchIsolatedBorrowRates': false,
60
62
  'fetchLedger': true,
61
63
  'fetchLeverage': false,
62
64
  'fetchLeverageTiers': false,
@@ -90,7 +92,7 @@ class cryptocom extends cryptocom$1 {
90
92
  'fetchVolatilityHistory': false,
91
93
  'fetchWithdrawals': true,
92
94
  'reduceMargin': false,
93
- 'repayMargin': true,
95
+ 'repayMargin': false,
94
96
  'setLeverage': false,
95
97
  'setMarginMode': false,
96
98
  'setPositionMode': false,
@@ -210,26 +212,6 @@ class cryptocom extends cryptocom$1 {
210
212
  'private/get-open-orders': 10 / 3,
211
213
  'private/get-order-detail': 1 / 3,
212
214
  'private/get-trades': 100,
213
- 'private/margin/get-user-config': 10 / 3,
214
- 'private/margin/get-account-summary': 10 / 3,
215
- 'private/margin/transfer': 10 / 3,
216
- 'private/margin/borrow': 10 / 3,
217
- 'private/margin/repay': 10 / 3,
218
- 'private/margin/get-transfer-history': 10 / 3,
219
- 'private/margin/get-borrow-history': 10 / 3,
220
- 'private/margin/get-interest-history': 10 / 3,
221
- 'private/margin/get-repay-history': 10 / 3,
222
- 'private/margin/get-liquidation-history': 10 / 3,
223
- 'private/margin/get-liquidation-orders': 10 / 3,
224
- 'private/margin/create-order': 2 / 3,
225
- 'private/margin/cancel-order': 2 / 3,
226
- 'private/margin/cancel-all-orders': 2 / 3,
227
- 'private/margin/get-order-history': 10 / 3,
228
- 'private/margin/get-open-orders': 10 / 3,
229
- 'private/margin/get-order-detail': 1 / 3,
230
- 'private/margin/get-trades': 100,
231
- 'private/deriv/transfer': 10 / 3,
232
- 'private/deriv/get-transfer-history': 10 / 3,
233
215
  'private/get-accounts': 10 / 3,
234
216
  'private/get-subaccount-balances': 10 / 3,
235
217
  'private/create-subaccount-transfer': 10 / 3,
@@ -583,7 +565,7 @@ class cryptocom extends cryptocom$1 {
583
565
  * @see https://exchange-docs.crypto.com/derivatives/index.html#public-get-tickers
584
566
  * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
585
567
  * @param {object} [params] extra parameters specific to the cryptocom api endpoint
586
- * @returns {object} a dictionary of [ticker structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
568
+ * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
587
569
  */
588
570
  await this.loadMarkets();
589
571
  let market = undefined;
@@ -640,7 +622,7 @@ class cryptocom extends cryptocom$1 {
640
622
  * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
641
623
  * @param {string} symbol unified symbol of the market to fetch the ticker for
642
624
  * @param {object} [params] extra parameters specific to the cryptocom api endpoint
643
- * @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
625
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
644
626
  */
645
627
  await this.loadMarkets();
646
628
  symbol = this.symbol(symbol);
@@ -659,7 +641,7 @@ class cryptocom extends cryptocom$1 {
659
641
  * @param {object} [params] extra parameters specific to the cryptocom api endpoint
660
642
  * @param {int} [params.until] timestamp in ms for the ending date filter, default is the current time
661
643
  * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
662
- * @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
644
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
663
645
  */
664
646
  await this.loadMarkets();
665
647
  let paginate = false;
@@ -740,7 +722,7 @@ class cryptocom extends cryptocom$1 {
740
722
  * @param {object} [params] extra parameters specific to the cryptocom api endpoint
741
723
  * @param {int} [params.until] timestamp in ms for the ending date filter, default is the current time
742
724
  * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
743
- * @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
725
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
744
726
  */
745
727
  await this.loadMarkets();
746
728
  let paginate = false;
@@ -859,7 +841,7 @@ class cryptocom extends cryptocom$1 {
859
841
  * @param {string} symbol unified symbol of the market to fetch the order book for
860
842
  * @param {int} [limit] the number of order book entries to return, max 50
861
843
  * @param {object} [params] extra parameters specific to the cryptocom api endpoint
862
- * @returns {object} A dictionary of [order book structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-book-structure} indexed by market symbols
844
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
863
845
  */
864
846
  await this.loadMarkets();
865
847
  const market = this.market(symbol);
@@ -917,7 +899,7 @@ class cryptocom extends cryptocom$1 {
917
899
  * @description query for balance and get the amount of funds available for trading or funds locked in orders
918
900
  * @see https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-user-balance
919
901
  * @param {object} [params] extra parameters specific to the cryptocom api endpoint
920
- * @returns {object} a [balance structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#balance-structure}
902
+ * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
921
903
  */
922
904
  await this.loadMarkets();
923
905
  const response = await this.v1PrivatePostPrivateUserBalance(params);
@@ -974,7 +956,7 @@ class cryptocom extends cryptocom$1 {
974
956
  * @see https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-order-detail
975
957
  * @param {string} symbol unified symbol of the market the order was made in
976
958
  * @param {object} [params] extra parameters specific to the cryptocom api endpoint
977
- * @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
959
+ * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
978
960
  */
979
961
  await this.loadMarkets();
980
962
  let market = undefined;
@@ -1151,7 +1133,7 @@ class cryptocom extends cryptocom$1 {
1151
1133
  * @param {float} [params.stopPrice] price to trigger a stop order
1152
1134
  * @param {float} [params.stopLossPrice] price to trigger a stop-loss trigger order
1153
1135
  * @param {float} [params.takeProfitPrice] price to trigger a take-profit trigger order
1154
- * @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1136
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1155
1137
  */
1156
1138
  await this.loadMarkets();
1157
1139
  const market = this.market(symbol);
@@ -1179,7 +1161,7 @@ class cryptocom extends cryptocom$1 {
1179
1161
  * @see https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-create-order-list-list
1180
1162
  * @see https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-create-order-list-oco
1181
1163
  * @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
1182
- * @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1164
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1183
1165
  */
1184
1166
  await this.loadMarkets();
1185
1167
  const ordersRequests = [];
@@ -1383,7 +1365,7 @@ class cryptocom extends cryptocom$1 {
1383
1365
  * @see https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-cancel-all-orders
1384
1366
  * @param {string} symbol unified market symbol of the orders to cancel
1385
1367
  * @param {object} [params] extra parameters specific to the cryptocom api endpoint
1386
- * @returns {object} Returns exchange raw message{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1368
+ * @returns {object} Returns exchange raw message{@link https://docs.ccxt.com/#/?id=order-structure}
1387
1369
  */
1388
1370
  await this.loadMarkets();
1389
1371
  let market = undefined;
@@ -1403,7 +1385,7 @@ class cryptocom extends cryptocom$1 {
1403
1385
  * @param {string} id the order id of the order to cancel
1404
1386
  * @param {string} [symbol] unified symbol of the market the order was made in
1405
1387
  * @param {object} [params] extra parameters specific to the cryptocom api endpoint
1406
- * @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1388
+ * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1407
1389
  */
1408
1390
  await this.loadMarkets();
1409
1391
  let market = undefined;
@@ -1438,9 +1420,11 @@ class cryptocom extends cryptocom$1 {
1438
1420
  * @param {string[]} ids order ids
1439
1421
  * @param {string} symbol unified market symbol
1440
1422
  * @param {object} [params] extra parameters specific to the okx api endpoint
1441
- * @returns {object} an list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1423
+ * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
1442
1424
  */
1443
- this.checkRequiredSymbol('cancelOrders', symbol);
1425
+ if (symbol === undefined) {
1426
+ throw new errors.ArgumentsRequired(this.id + ' cancelOrders() requires a symbol argument');
1427
+ }
1444
1428
  await this.loadMarkets();
1445
1429
  const market = this.market(symbol);
1446
1430
  const orderRequests = [];
@@ -1470,7 +1454,7 @@ class cryptocom extends cryptocom$1 {
1470
1454
  * @param {int} [since] the earliest time in ms to fetch open orders for
1471
1455
  * @param {int} [limit] the maximum number of open order structures to retrieve
1472
1456
  * @param {object} [params] extra parameters specific to the cryptocom api endpoint
1473
- * @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1457
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
1474
1458
  */
1475
1459
  await this.loadMarkets();
1476
1460
  let market = undefined;
@@ -1533,7 +1517,7 @@ class cryptocom extends cryptocom$1 {
1533
1517
  * @param {object} [params] extra parameters specific to the cryptocom api endpoint
1534
1518
  * @param {int} [params.until] timestamp in ms for the ending date filter, default is the current time
1535
1519
  * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
1536
- * @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
1520
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
1537
1521
  */
1538
1522
  await this.loadMarkets();
1539
1523
  let paginate = false;
@@ -1617,7 +1601,7 @@ class cryptocom extends cryptocom$1 {
1617
1601
  * @param {string} address the address to withdraw to
1618
1602
  * @param {string} tag
1619
1603
  * @param {object} [params] extra parameters specific to the cryptocom api endpoint
1620
- * @returns {object} a [transaction structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
1604
+ * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
1621
1605
  */
1622
1606
  [tag, params] = this.handleWithdrawTagAndParams(tag, params);
1623
1607
  await this.loadMarkets();
@@ -1664,7 +1648,7 @@ class cryptocom extends cryptocom$1 {
1664
1648
  * @see https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-deposit-address
1665
1649
  * @param {string} code unified currency code of the currency for the deposit address
1666
1650
  * @param {object} [params] extra parameters specific to the cryptocom api endpoint
1667
- * @returns {object} a dictionary of [address structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#address-structure} indexed by the network
1651
+ * @returns {object} a dictionary of [address structures]{@link https://docs.ccxt.com/#/?id=address-structure} indexed by the network
1668
1652
  */
1669
1653
  await this.loadMarkets();
1670
1654
  const currency = this.currency(code);
@@ -1724,7 +1708,7 @@ class cryptocom extends cryptocom$1 {
1724
1708
  * @description fetch the deposit address for a currency associated with this account
1725
1709
  * @param {string} code unified currency code
1726
1710
  * @param {object} [params] extra parameters specific to the cryptocom api endpoint
1727
- * @returns {object} an [address structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#address-structure}
1711
+ * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
1728
1712
  */
1729
1713
  const network = this.safeStringUpper(params, 'network');
1730
1714
  params = this.omit(params, ['network']);
@@ -1760,7 +1744,7 @@ class cryptocom extends cryptocom$1 {
1760
1744
  * @param {int} [limit] the maximum number of deposits structures to retrieve
1761
1745
  * @param {object} [params] extra parameters specific to the cryptocom api endpoint
1762
1746
  * @param {int} [params.until] timestamp in ms for the ending date filter, default is the current time
1763
- * @returns {object[]} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
1747
+ * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
1764
1748
  */
1765
1749
  await this.loadMarkets();
1766
1750
  let currency = undefined;
@@ -1819,7 +1803,7 @@ class cryptocom extends cryptocom$1 {
1819
1803
  * @param {int} [limit] the maximum number of withdrawals structures to retrieve
1820
1804
  * @param {object} [params] extra parameters specific to the cryptocom api endpoint
1821
1805
  * @param {int} [params.until] timestamp in ms for the ending date filter, default is the current time
1822
- * @returns {object[]} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
1806
+ * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
1823
1807
  */
1824
1808
  await this.loadMarkets();
1825
1809
  let currency = undefined;
@@ -1879,7 +1863,7 @@ class cryptocom extends cryptocom$1 {
1879
1863
  * @param {string} fromAccount account to transfer from
1880
1864
  * @param {string} toAccount account to transfer to
1881
1865
  * @param {object} [params] extra parameters specific to the cryptocom api endpoint
1882
- * @returns {object} a [transfer structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#transfer-structure}
1866
+ * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
1883
1867
  */
1884
1868
  await this.loadMarkets();
1885
1869
  const currency = this.currency(code);
@@ -1917,7 +1901,7 @@ class cryptocom extends cryptocom$1 {
1917
1901
  * @param {int} [since] the earliest time in ms to fetch transfers for
1918
1902
  * @param {int} [limit] the maximum number of transfers structures to retrieve
1919
1903
  * @param {object} [params] extra parameters specific to the cryptocom api endpoint
1920
- * @returns {object[]} a list of [transfer structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transfer-structure}
1904
+ * @returns {object[]} a list of [transfer structures]{@link https://docs.ccxt.com/#/?id=transfer-structure}
1921
1905
  */
1922
1906
  if (!('direction' in params)) {
1923
1907
  throw new errors.ArgumentsRequired(this.id + ' fetchTransfers() requires a direction param to be either "IN" or "OUT"');
@@ -2415,154 +2399,6 @@ class cryptocom extends cryptocom$1 {
2415
2399
  'fee': fee,
2416
2400
  };
2417
2401
  }
2418
- async repayMargin(code, amount, symbol = undefined, params = {}) {
2419
- /**
2420
- * @method
2421
- * @name cryptocom#repayMargin
2422
- * @description repay borrowed margin and interest
2423
- * @see https://exchange-docs.crypto.com/spot/index.html#private-margin-repay
2424
- * @param {string} code unified currency code of the currency to repay
2425
- * @param {float} amount the amount to repay
2426
- * @param {string} symbol unified market symbol, not used by cryptocom.repayMargin ()
2427
- * @param {object} [params] extra parameters specific to the cryptocom api endpoint
2428
- * @returns {object} a [margin loan structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#margin-loan-structure}
2429
- */
2430
- await this.loadMarkets();
2431
- const currency = this.currency(code);
2432
- const request = {
2433
- 'currency': currency['id'],
2434
- 'amount': this.currencyToPrecision(code, amount),
2435
- };
2436
- const response = await this.v2PrivatePostPrivateMarginRepay(this.extend(request, params));
2437
- //
2438
- // {
2439
- // "id": 1656620104211,
2440
- // "method": "private/margin/repay",
2441
- // "code": 0,
2442
- // "result": {
2443
- // "badDebt": 0
2444
- // }
2445
- // }
2446
- //
2447
- const transaction = this.parseMarginLoan(response, currency);
2448
- return this.extend(transaction, {
2449
- 'amount': amount,
2450
- });
2451
- }
2452
- async borrowMargin(code, amount, symbol = undefined, params = {}) {
2453
- /**
2454
- * @method
2455
- * @name cryptocom#borrowMargin
2456
- * @description create a loan to borrow margin
2457
- * @see https://exchange-docs.crypto.com/spot/index.html#private-margin-borrow
2458
- * @param {string} code unified currency code of the currency to borrow
2459
- * @param {float} amount the amount to borrow
2460
- * @param {string} symbol unified market symbol, not used by cryptocom.repayMargin ()
2461
- * @param {object} [params] extra parameters specific to the cryptocom api endpoint
2462
- * @returns {object} a [margin loan structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#margin-loan-structure}
2463
- */
2464
- await this.loadMarkets();
2465
- const currency = this.currency(code);
2466
- const request = {
2467
- 'currency': currency['id'],
2468
- 'amount': this.currencyToPrecision(code, amount),
2469
- };
2470
- const response = await this.v2PrivatePostPrivateMarginBorrow(this.extend(request, params));
2471
- //
2472
- // {
2473
- // "id": 1656619578559,
2474
- // "method": "private/margin/borrow",
2475
- // "code": 0
2476
- // }
2477
- //
2478
- const transaction = this.parseMarginLoan(response, currency);
2479
- return this.extend(transaction, {
2480
- 'amount': amount,
2481
- });
2482
- }
2483
- parseMarginLoan(info, currency = undefined) {
2484
- //
2485
- // borrowMargin
2486
- //
2487
- // {
2488
- // "id": 1656619578559,
2489
- // "method": "private/margin/borrow",
2490
- // "code": 0
2491
- // }
2492
- //
2493
- // repayMargin
2494
- //
2495
- // {
2496
- // "id": 1656620104211,
2497
- // "method": "private/margin/repay",
2498
- // "code": 0,
2499
- // "result": {
2500
- // "badDebt": 0
2501
- // }
2502
- // }
2503
- //
2504
- return {
2505
- 'id': this.safeInteger(info, 'id'),
2506
- 'currency': this.safeCurrencyCode(undefined, currency),
2507
- 'amount': undefined,
2508
- 'symbol': undefined,
2509
- 'timestamp': undefined,
2510
- 'datetime': undefined,
2511
- 'info': info,
2512
- };
2513
- }
2514
- parseBorrowInterest(info, market = undefined) {
2515
- //
2516
- // {
2517
- // "loan_id": "2643528867803765921",
2518
- // "currency": "USDT",
2519
- // "interest": 0.00000004,
2520
- // "time": 1656702899559,
2521
- // "stake_amount": 6,
2522
- // "interest_rate": 0.000025
2523
- // },
2524
- //
2525
- const timestamp = this.safeInteger(info, 'time');
2526
- let symbol = undefined;
2527
- if (market !== undefined) {
2528
- symbol = market['symbol'];
2529
- }
2530
- return {
2531
- 'symbol': symbol,
2532
- 'marginMode': undefined,
2533
- 'currency': this.safeCurrencyCode(this.safeString(info, 'currency')),
2534
- 'interest': this.safeNumber(info, 'interest'),
2535
- 'interestRate': this.safeNumber(info, 'interest_rate'),
2536
- 'amountBorrowed': undefined,
2537
- 'timestamp': timestamp,
2538
- 'datetime': this.iso8601(timestamp),
2539
- 'info': info,
2540
- };
2541
- }
2542
- parseBorrowRates(info, codeKey) {
2543
- //
2544
- // {
2545
- // "currency": "AGLD",
2546
- // "hourly_rate": 0.00003334,
2547
- // "max_borrow_limit": 342.4032393,
2548
- // "min_borrow_limit": 30
2549
- // },
2550
- //
2551
- const timestamp = this.milliseconds();
2552
- const rates = [];
2553
- for (let i = 0; i < info.length; i++) {
2554
- const entry = info[i];
2555
- rates.push({
2556
- 'currency': this.safeCurrencyCode(this.safeString(entry, 'currency')),
2557
- 'rate': this.safeNumber(entry, 'hourly_rate'),
2558
- 'period': 3600000,
2559
- 'timestamp': timestamp,
2560
- 'datetime': this.iso8601(timestamp),
2561
- 'info': entry,
2562
- });
2563
- }
2564
- return rates;
2565
- }
2566
2402
  customHandleMarginModeAndParams(methodName, params = {}) {
2567
2403
  /**
2568
2404
  * @ignore
@@ -2645,7 +2481,7 @@ class cryptocom extends cryptocom$1 {
2645
2481
  * @see https://exchange-docs.crypto.com/spot/index.html#private-get-currency-networks
2646
2482
  * @param {string[]|undefined} codes list of unified currency codes
2647
2483
  * @param {object} [params] extra parameters specific to the cryptocom api endpoint
2648
- * @returns {object} a list of [fee structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#fee-structure}
2484
+ * @returns {object} a list of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
2649
2485
  */
2650
2486
  await this.loadMarkets();
2651
2487
  const response = await this.v2PrivatePostPrivateGetCurrencyNetworks(params);
@@ -2664,7 +2500,7 @@ class cryptocom extends cryptocom$1 {
2664
2500
  * @param {int} [limit] max number of ledger entries to return
2665
2501
  * @param {object} [params] extra parameters specific to the cryptocom api endpoint
2666
2502
  * @param {int} [params.until] timestamp in ms for the ending date filter, default is the current time
2667
- * @returns {object} a [ledger structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ledger-structure}
2503
+ * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
2668
2504
  */
2669
2505
  await this.loadMarkets();
2670
2506
  const request = {};
@@ -2803,7 +2639,7 @@ class cryptocom extends cryptocom$1 {
2803
2639
  * @description fetch all the accounts associated with a profile
2804
2640
  * @see https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-accounts
2805
2641
  * @param {object} [params] extra parameters specific to the cryptocom api endpoint
2806
- * @returns {object} a dictionary of [account structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#account-structure} indexed by the account type
2642
+ * @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/#/?id=account-structure} indexed by the account type
2807
2643
  */
2808
2644
  await this.loadMarkets();
2809
2645
  const response = await this.v1PrivatePostPrivateGetAccounts(params);
@@ -2888,7 +2724,7 @@ class cryptocom extends cryptocom$1 {
2888
2724
  * @param {int} [limit] number of records
2889
2725
  * @param {object} [params] exchange specific params
2890
2726
  * @param {int} [params.type] 'future', 'option'
2891
- * @returns {object[]} a list of [settlement history objects]{@link https://github.com/ccxt/ccxt/wiki/Manual#settlement-history-structure}
2727
+ * @returns {object[]} a list of [settlement history objects]{@link https://docs.ccxt.com/#/?id=settlement-history-structure}
2892
2728
  */
2893
2729
  await this.loadMarkets();
2894
2730
  let market = undefined;
@@ -2976,9 +2812,11 @@ class cryptocom extends cryptocom$1 {
2976
2812
  * @param {object} [params] extra parameters specific to the cryptocom api endpoint
2977
2813
  * @param {int} [params.until] timestamp in ms for the ending date filter, default is the current time
2978
2814
  * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
2979
- * @returns {object[]} a list of [funding rate structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-history-structure}
2815
+ * @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
2980
2816
  */
2981
- this.checkRequiredSymbol('fetchFundingRateHistory', symbol);
2817
+ if (symbol === undefined) {
2818
+ throw new errors.ArgumentsRequired(this.id + ' fetchFundingRateHistory() requires a symbol argument');
2819
+ }
2982
2820
  await this.loadMarkets();
2983
2821
  let paginate = false;
2984
2822
  [paginate, params] = this.handleOptionAndParams(params, 'fetchFundingRateHistory', 'paginate');
@@ -3047,7 +2885,7 @@ class cryptocom extends cryptocom$1 {
3047
2885
  * @see https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-positions
3048
2886
  * @param {string} symbol unified market symbol of the market the position is held in
3049
2887
  * @param {object} [params] extra parameters specific to the cryptocom api endpoint
3050
- * @returns {object} a [position structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#position-structure}
2888
+ * @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
3051
2889
  */
3052
2890
  await this.loadMarkets();
3053
2891
  const market = this.market(symbol);
@@ -3089,7 +2927,7 @@ class cryptocom extends cryptocom$1 {
3089
2927
  * @see https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-positions
3090
2928
  * @param {string[]|undefined} symbols list of unified market symbols
3091
2929
  * @param {object} [params] extra parameters specific to the cryptocom api endpoint
3092
- * @returns {object[]} a list of [position structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#position-structure}
2930
+ * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
3093
2931
  */
3094
2932
  await this.loadMarkets();
3095
2933
  symbols = this.marketSymbols(symbols);