ccxt 4.4.30 → 4.4.31

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 (496) hide show
  1. package/README.md +3 -3
  2. package/dist/ccxt.browser.min.js +3 -3
  3. package/dist/cjs/ccxt.js +1 -1
  4. package/dist/cjs/src/ace.js +123 -123
  5. package/dist/cjs/src/alpaca.js +237 -237
  6. package/dist/cjs/src/ascendex.js +342 -341
  7. package/dist/cjs/src/bigone.js +242 -242
  8. package/dist/cjs/src/binance.js +1338 -1291
  9. package/dist/cjs/src/bingx.js +639 -639
  10. package/dist/cjs/src/bit2c.js +111 -111
  11. package/dist/cjs/src/bitbank.js +142 -142
  12. package/dist/cjs/src/bitbns.js +140 -140
  13. package/dist/cjs/src/bitfinex.js +231 -231
  14. package/dist/cjs/src/bitfinex2.js +403 -403
  15. package/dist/cjs/src/bitflyer.js +184 -184
  16. package/dist/cjs/src/bitget.js +848 -846
  17. package/dist/cjs/src/bithumb.js +125 -124
  18. package/dist/cjs/src/bitmart.js +525 -525
  19. package/dist/cjs/src/bitmex.js +317 -317
  20. package/dist/cjs/src/bitopro.js +221 -221
  21. package/dist/cjs/src/bitrue.js +315 -315
  22. package/dist/cjs/src/bitso.js +220 -220
  23. package/dist/cjs/src/bitstamp.js +251 -251
  24. package/dist/cjs/src/bitteam.js +183 -183
  25. package/dist/cjs/src/bitvavo.js +247 -247
  26. package/dist/cjs/src/bl3p.js +82 -82
  27. package/dist/cjs/src/blockchaincom.js +211 -211
  28. package/dist/cjs/src/blofin.js +332 -331
  29. package/dist/cjs/src/btcalpha.js +166 -166
  30. package/dist/cjs/src/btcbox.js +108 -108
  31. package/dist/cjs/src/btcmarkets.js +198 -198
  32. package/dist/cjs/src/btcturk.js +124 -124
  33. package/dist/cjs/src/bybit.js +906 -900
  34. package/dist/cjs/src/cex.js +227 -226
  35. package/dist/cjs/src/coinbase.js +481 -481
  36. package/dist/cjs/src/coinbaseexchange.js +274 -274
  37. package/dist/cjs/src/coinbaseinternational.js +304 -304
  38. package/dist/cjs/src/coincatch.js +648 -648
  39. package/dist/cjs/src/coincheck.js +113 -113
  40. package/dist/cjs/src/coinex.js +611 -601
  41. package/dist/cjs/src/coinlist.js +304 -303
  42. package/dist/cjs/src/coinmate.js +162 -161
  43. package/dist/cjs/src/coinmetro.js +187 -187
  44. package/dist/cjs/src/coinone.js +124 -123
  45. package/dist/cjs/src/coinsph.js +237 -237
  46. package/dist/cjs/src/coinspot.js +82 -82
  47. package/dist/cjs/src/cryptocom.js +342 -341
  48. package/dist/cjs/src/currencycom.js +225 -224
  49. package/dist/cjs/src/delta.js +320 -320
  50. package/dist/cjs/src/deribit.js +411 -408
  51. package/dist/cjs/src/digifinex.js +432 -431
  52. package/dist/cjs/src/exmo.js +328 -327
  53. package/dist/cjs/src/gate.js +812 -789
  54. package/dist/cjs/src/gemini.js +199 -198
  55. package/dist/cjs/src/hashkey.js +520 -517
  56. package/dist/cjs/src/hitbtc.js +465 -462
  57. package/dist/cjs/src/hollaex.js +253 -252
  58. package/dist/cjs/src/htx.js +791 -848
  59. package/dist/cjs/src/huobijp.js +219 -218
  60. package/dist/cjs/src/hyperliquid.js +421 -417
  61. package/dist/cjs/src/idex.js +238 -237
  62. package/dist/cjs/src/independentreserve.js +133 -132
  63. package/dist/cjs/src/indodax.js +176 -170
  64. package/dist/cjs/src/kraken.js +379 -377
  65. package/dist/cjs/src/krakenfutures.js +283 -279
  66. package/dist/cjs/src/kucoin.js +630 -622
  67. package/dist/cjs/src/kucoinfutures.js +439 -434
  68. package/dist/cjs/src/kuna.js +283 -282
  69. package/dist/cjs/src/latoken.js +211 -210
  70. package/dist/cjs/src/lbank.js +268 -267
  71. package/dist/cjs/src/luno.js +174 -173
  72. package/dist/cjs/src/lykke.js +172 -171
  73. package/dist/cjs/src/mercado.js +123 -122
  74. package/dist/cjs/src/mexc.js +650 -646
  75. package/dist/cjs/src/ndax.js +229 -228
  76. package/dist/cjs/src/novadax.js +230 -229
  77. package/dist/cjs/src/oceanex.js +187 -186
  78. package/dist/cjs/src/okcoin.js +286 -285
  79. package/dist/cjs/src/okx.js +909 -904
  80. package/dist/cjs/src/onetrading.js +218 -218
  81. package/dist/cjs/src/oxfun.js +335 -334
  82. package/dist/cjs/src/p2b.js +154 -154
  83. package/dist/cjs/src/paradex.js +249 -244
  84. package/dist/cjs/src/paymium.js +101 -101
  85. package/dist/cjs/src/phemex.js +369 -367
  86. package/dist/cjs/src/poloniex.js +270 -270
  87. package/dist/cjs/src/poloniexfutures.js +250 -250
  88. package/dist/cjs/src/pro/alpaca.js +64 -64
  89. package/dist/cjs/src/pro/ascendex.js +64 -64
  90. package/dist/cjs/src/pro/binance.js +546 -543
  91. package/dist/cjs/src/pro/bingx.js +116 -116
  92. package/dist/cjs/src/pro/bitfinex.js +42 -42
  93. package/dist/cjs/src/pro/bitfinex2.js +66 -66
  94. package/dist/cjs/src/pro/bitget.js +187 -180
  95. package/dist/cjs/src/pro/bithumb.js +40 -40
  96. package/dist/cjs/src/pro/bitmart.js +121 -119
  97. package/dist/cjs/src/pro/bitmex.js +135 -133
  98. package/dist/cjs/src/pro/bitopro.js +49 -49
  99. package/dist/cjs/src/pro/bitrue.js +19 -19
  100. package/dist/cjs/src/pro/bitstamp.js +29 -29
  101. package/dist/cjs/src/pro/bitvavo.js +253 -253
  102. package/dist/cjs/src/pro/blockchaincom.js +62 -62
  103. package/dist/cjs/src/pro/blofin.js +132 -130
  104. package/dist/cjs/src/pro/bybit.js +317 -313
  105. package/dist/cjs/src/pro/cex.js +168 -168
  106. package/dist/cjs/src/pro/coinbase.js +93 -91
  107. package/dist/cjs/src/pro/coinbaseexchange.js +95 -95
  108. package/dist/cjs/src/pro/coinbaseinternational.js +111 -111
  109. package/dist/cjs/src/pro/coincatch.js +150 -143
  110. package/dist/cjs/src/pro/coincheck.js +21 -21
  111. package/dist/cjs/src/pro/coinex.js +110 -110
  112. package/dist/cjs/src/pro/coinone.js +30 -30
  113. package/dist/cjs/src/pro/cryptocom.js +227 -227
  114. package/dist/cjs/src/pro/currencycom.js +45 -45
  115. package/dist/cjs/src/pro/deribit.js +127 -127
  116. package/dist/cjs/src/pro/exmo.js +66 -66
  117. package/dist/cjs/src/pro/gate.js +287 -283
  118. package/dist/cjs/src/pro/gemini.js +74 -74
  119. package/dist/cjs/src/pro/hashkey.js +87 -85
  120. package/dist/cjs/src/pro/hitbtc.js +190 -190
  121. package/dist/cjs/src/pro/hollaex.js +51 -51
  122. package/dist/cjs/src/pro/htx.js +96 -94
  123. package/dist/cjs/src/pro/huobijp.js +38 -38
  124. package/dist/cjs/src/pro/hyperliquid.js +151 -150
  125. package/dist/cjs/src/pro/idex.js +48 -48
  126. package/dist/cjs/src/pro/independentreserve.js +19 -19
  127. package/dist/cjs/src/pro/kraken.js +167 -167
  128. package/dist/cjs/src/pro/krakenfutures.js +137 -138
  129. package/dist/cjs/src/pro/kucoin.js +167 -168
  130. package/dist/cjs/src/pro/kucoinfutures.js +147 -147
  131. package/dist/cjs/src/pro/lbank.js +95 -95
  132. package/dist/cjs/src/pro/luno.js +21 -21
  133. package/dist/cjs/src/pro/mexc.js +101 -101
  134. package/dist/cjs/src/pro/ndax.js +42 -42
  135. package/dist/cjs/src/pro/okcoin.js +61 -61
  136. package/dist/cjs/src/pro/okx.js +332 -330
  137. package/dist/cjs/src/pro/onetrading.js +71 -71
  138. package/dist/cjs/src/pro/oxfun.js +193 -191
  139. package/dist/cjs/src/pro/p2b.js +77 -77
  140. package/dist/cjs/src/pro/paradex.js +39 -39
  141. package/dist/cjs/src/pro/phemex.js +94 -94
  142. package/dist/cjs/src/pro/poloniex.js +171 -171
  143. package/dist/cjs/src/pro/poloniexfutures.js +62 -62
  144. package/dist/cjs/src/pro/probit.js +63 -63
  145. package/dist/cjs/src/pro/upbit.js +80 -80
  146. package/dist/cjs/src/pro/vertex.js +65 -63
  147. package/dist/cjs/src/pro/wazirx.js +70 -70
  148. package/dist/cjs/src/pro/whitebit.js +83 -83
  149. package/dist/cjs/src/pro/woo.js +106 -104
  150. package/dist/cjs/src/pro/woofipro.js +105 -103
  151. package/dist/cjs/src/pro/xt.js +119 -119
  152. package/dist/cjs/src/probit.js +229 -229
  153. package/dist/cjs/src/timex.js +198 -197
  154. package/dist/cjs/src/tokocrypto.js +214 -213
  155. package/dist/cjs/src/tradeogre.js +92 -91
  156. package/dist/cjs/src/upbit.js +243 -242
  157. package/dist/cjs/src/vertex.js +258 -258
  158. package/dist/cjs/src/wavesexchange.js +175 -172
  159. package/dist/cjs/src/wazirx.js +168 -168
  160. package/dist/cjs/src/whitebit.js +361 -361
  161. package/dist/cjs/src/woo.js +571 -572
  162. package/dist/cjs/src/woofipro.js +392 -391
  163. package/dist/cjs/src/xt.js +436 -435
  164. package/dist/cjs/src/yobit.js +159 -158
  165. package/dist/cjs/src/zaif.js +103 -103
  166. package/dist/cjs/src/zonda.js +168 -168
  167. package/js/ccxt.d.ts +1 -1
  168. package/js/ccxt.js +1 -1
  169. package/js/src/ace.d.ts +123 -0
  170. package/js/src/ace.js +123 -123
  171. package/js/src/alpaca.d.ts +237 -0
  172. package/js/src/alpaca.js +237 -237
  173. package/js/src/ascendex.d.ts +339 -0
  174. package/js/src/ascendex.js +342 -341
  175. package/js/src/base/types.d.ts +1 -0
  176. package/js/src/bigone.d.ts +242 -0
  177. package/js/src/bigone.js +242 -242
  178. package/js/src/binance.d.ts +1305 -0
  179. package/js/src/binance.js +1338 -1291
  180. package/js/src/bingx.d.ts +639 -0
  181. package/js/src/bingx.js +639 -639
  182. package/js/src/bit2c.d.ts +111 -0
  183. package/js/src/bit2c.js +111 -111
  184. package/js/src/bitbank.d.ts +142 -0
  185. package/js/src/bitbank.js +142 -142
  186. package/js/src/bitbns.d.ts +140 -0
  187. package/js/src/bitbns.js +140 -140
  188. package/js/src/bitfinex.d.ts +231 -0
  189. package/js/src/bitfinex.js +231 -231
  190. package/js/src/bitfinex2.d.ts +403 -0
  191. package/js/src/bitfinex2.js +403 -403
  192. package/js/src/bitflyer.d.ts +184 -0
  193. package/js/src/bitflyer.js +184 -184
  194. package/js/src/bitget.d.ts +846 -0
  195. package/js/src/bitget.js +848 -846
  196. package/js/src/bithumb.d.ts +125 -0
  197. package/js/src/bithumb.js +125 -124
  198. package/js/src/bitmart.d.ts +525 -0
  199. package/js/src/bitmart.js +525 -525
  200. package/js/src/bitmex.d.ts +317 -0
  201. package/js/src/bitmex.js +317 -317
  202. package/js/src/bitopro.d.ts +221 -0
  203. package/js/src/bitopro.js +221 -221
  204. package/js/src/bitrue.d.ts +315 -0
  205. package/js/src/bitrue.js +315 -315
  206. package/js/src/bitso.d.ts +220 -0
  207. package/js/src/bitso.js +220 -220
  208. package/js/src/bitstamp.d.ts +251 -0
  209. package/js/src/bitstamp.js +251 -251
  210. package/js/src/bitteam.d.ts +183 -0
  211. package/js/src/bitteam.js +183 -183
  212. package/js/src/bitvavo.d.ts +247 -0
  213. package/js/src/bitvavo.js +247 -247
  214. package/js/src/bl3p.d.ts +82 -0
  215. package/js/src/bl3p.js +82 -82
  216. package/js/src/blockchaincom.d.ts +211 -0
  217. package/js/src/blockchaincom.js +211 -211
  218. package/js/src/blofin.d.ts +332 -0
  219. package/js/src/blofin.js +332 -331
  220. package/js/src/btcalpha.d.ts +166 -0
  221. package/js/src/btcalpha.js +166 -166
  222. package/js/src/btcbox.d.ts +108 -0
  223. package/js/src/btcbox.js +108 -108
  224. package/js/src/btcmarkets.d.ts +198 -0
  225. package/js/src/btcmarkets.js +198 -198
  226. package/js/src/btcturk.d.ts +124 -0
  227. package/js/src/btcturk.js +124 -124
  228. package/js/src/bybit.d.ts +906 -1
  229. package/js/src/bybit.js +906 -900
  230. package/js/src/cex.d.ts +227 -0
  231. package/js/src/cex.js +227 -226
  232. package/js/src/coinbase.d.ts +481 -0
  233. package/js/src/coinbase.js +481 -481
  234. package/js/src/coinbaseexchange.d.ts +274 -0
  235. package/js/src/coinbaseexchange.js +274 -274
  236. package/js/src/coinbaseinternational.d.ts +304 -0
  237. package/js/src/coinbaseinternational.js +304 -304
  238. package/js/src/coincatch.d.ts +646 -0
  239. package/js/src/coincatch.js +648 -648
  240. package/js/src/coincheck.d.ts +113 -0
  241. package/js/src/coincheck.js +113 -113
  242. package/js/src/coinex.d.ts +603 -0
  243. package/js/src/coinex.js +611 -601
  244. package/js/src/coinlist.d.ts +304 -0
  245. package/js/src/coinlist.js +304 -303
  246. package/js/src/coinmate.d.ts +162 -0
  247. package/js/src/coinmate.js +162 -161
  248. package/js/src/coinmetro.d.ts +187 -0
  249. package/js/src/coinmetro.js +187 -187
  250. package/js/src/coinone.d.ts +124 -0
  251. package/js/src/coinone.js +124 -123
  252. package/js/src/coinsph.d.ts +237 -0
  253. package/js/src/coinsph.js +237 -237
  254. package/js/src/coinspot.d.ts +82 -0
  255. package/js/src/coinspot.js +82 -82
  256. package/js/src/cryptocom.d.ts +342 -0
  257. package/js/src/cryptocom.js +342 -341
  258. package/js/src/currencycom.d.ts +225 -0
  259. package/js/src/currencycom.js +225 -224
  260. package/js/src/delta.d.ts +320 -0
  261. package/js/src/delta.js +320 -320
  262. package/js/src/deribit.d.ts +411 -0
  263. package/js/src/deribit.js +411 -408
  264. package/js/src/digifinex.d.ts +430 -0
  265. package/js/src/digifinex.js +432 -431
  266. package/js/src/exmo.d.ts +328 -0
  267. package/js/src/exmo.js +328 -327
  268. package/js/src/gate.d.ts +801 -1
  269. package/js/src/gate.js +812 -789
  270. package/js/src/gemini.d.ts +199 -0
  271. package/js/src/gemini.js +199 -198
  272. package/js/src/hashkey.d.ts +516 -0
  273. package/js/src/hashkey.js +520 -517
  274. package/js/src/hitbtc.d.ts +465 -0
  275. package/js/src/hitbtc.js +465 -462
  276. package/js/src/hollaex.d.ts +253 -0
  277. package/js/src/hollaex.js +253 -252
  278. package/js/src/htx.d.ts +765 -2
  279. package/js/src/htx.js +791 -848
  280. package/js/src/huobijp.d.ts +219 -0
  281. package/js/src/huobijp.js +219 -218
  282. package/js/src/hyperliquid.d.ts +419 -0
  283. package/js/src/hyperliquid.js +421 -417
  284. package/js/src/idex.d.ts +238 -0
  285. package/js/src/idex.js +238 -237
  286. package/js/src/independentreserve.d.ts +133 -0
  287. package/js/src/independentreserve.js +133 -132
  288. package/js/src/indodax.d.ts +171 -0
  289. package/js/src/indodax.js +176 -170
  290. package/js/src/kraken.d.ts +379 -0
  291. package/js/src/kraken.js +379 -377
  292. package/js/src/krakenfutures.d.ts +280 -0
  293. package/js/src/krakenfutures.js +283 -279
  294. package/js/src/kucoin.d.ts +613 -0
  295. package/js/src/kucoin.js +630 -622
  296. package/js/src/kucoinfutures.d.ts +437 -0
  297. package/js/src/kucoinfutures.js +439 -434
  298. package/js/src/kuna.d.ts +283 -0
  299. package/js/src/kuna.js +283 -282
  300. package/js/src/latoken.d.ts +211 -0
  301. package/js/src/latoken.js +211 -210
  302. package/js/src/lbank.d.ts +268 -0
  303. package/js/src/lbank.js +268 -267
  304. package/js/src/luno.d.ts +174 -0
  305. package/js/src/luno.js +174 -173
  306. package/js/src/lykke.d.ts +172 -0
  307. package/js/src/lykke.js +172 -171
  308. package/js/src/mercado.d.ts +123 -0
  309. package/js/src/mercado.js +123 -122
  310. package/js/src/mexc.d.ts +647 -0
  311. package/js/src/mexc.js +650 -646
  312. package/js/src/ndax.d.ts +229 -0
  313. package/js/src/ndax.js +229 -228
  314. package/js/src/novadax.d.ts +230 -0
  315. package/js/src/novadax.js +230 -229
  316. package/js/src/oceanex.d.ts +187 -0
  317. package/js/src/oceanex.js +187 -186
  318. package/js/src/okcoin.d.ts +286 -0
  319. package/js/src/okcoin.js +286 -285
  320. package/js/src/okx.d.ts +907 -0
  321. package/js/src/okx.js +909 -904
  322. package/js/src/onetrading.d.ts +218 -0
  323. package/js/src/onetrading.js +218 -218
  324. package/js/src/oxfun.d.ts +336 -3
  325. package/js/src/oxfun.js +335 -334
  326. package/js/src/p2b.d.ts +154 -0
  327. package/js/src/p2b.js +154 -154
  328. package/js/src/paradex.d.ts +241 -0
  329. package/js/src/paradex.js +249 -244
  330. package/js/src/paymium.d.ts +101 -0
  331. package/js/src/paymium.js +101 -101
  332. package/js/src/phemex.d.ts +366 -0
  333. package/js/src/phemex.js +369 -367
  334. package/js/src/poloniex.d.ts +270 -0
  335. package/js/src/poloniex.js +270 -270
  336. package/js/src/poloniexfutures.d.ts +250 -0
  337. package/js/src/poloniexfutures.js +250 -250
  338. package/js/src/pro/alpaca.d.ts +64 -0
  339. package/js/src/pro/alpaca.js +64 -64
  340. package/js/src/pro/ascendex.d.ts +64 -0
  341. package/js/src/pro/ascendex.js +64 -64
  342. package/js/src/pro/binance.d.ts +546 -0
  343. package/js/src/pro/binance.js +546 -543
  344. package/js/src/pro/bingx.d.ts +116 -0
  345. package/js/src/pro/bingx.js +116 -116
  346. package/js/src/pro/bitfinex.d.ts +42 -0
  347. package/js/src/pro/bitfinex.js +42 -42
  348. package/js/src/pro/bitfinex2.d.ts +66 -0
  349. package/js/src/pro/bitfinex2.js +66 -66
  350. package/js/src/pro/bitget.d.ts +187 -0
  351. package/js/src/pro/bitget.js +187 -180
  352. package/js/src/pro/bithumb.d.ts +40 -0
  353. package/js/src/pro/bithumb.js +40 -40
  354. package/js/src/pro/bitmart.d.ts +121 -0
  355. package/js/src/pro/bitmart.js +121 -119
  356. package/js/src/pro/bitmex.d.ts +135 -0
  357. package/js/src/pro/bitmex.js +135 -133
  358. package/js/src/pro/bitopro.d.ts +49 -0
  359. package/js/src/pro/bitopro.js +49 -49
  360. package/js/src/pro/bitrue.d.ts +19 -0
  361. package/js/src/pro/bitrue.js +19 -19
  362. package/js/src/pro/bitstamp.d.ts +29 -0
  363. package/js/src/pro/bitstamp.js +29 -29
  364. package/js/src/pro/bitvavo.d.ts +253 -0
  365. package/js/src/pro/bitvavo.js +253 -253
  366. package/js/src/pro/blockchaincom.d.ts +62 -0
  367. package/js/src/pro/blockchaincom.js +62 -62
  368. package/js/src/pro/blofin.d.ts +132 -0
  369. package/js/src/pro/blofin.js +132 -130
  370. package/js/src/pro/bybit.d.ts +317 -0
  371. package/js/src/pro/bybit.js +317 -313
  372. package/js/src/pro/cex.d.ts +168 -0
  373. package/js/src/pro/cex.js +168 -168
  374. package/js/src/pro/coinbase.d.ts +93 -0
  375. package/js/src/pro/coinbase.js +93 -91
  376. package/js/src/pro/coinbaseexchange.d.ts +95 -0
  377. package/js/src/pro/coinbaseexchange.js +95 -95
  378. package/js/src/pro/coinbaseinternational.d.ts +111 -0
  379. package/js/src/pro/coinbaseinternational.js +111 -111
  380. package/js/src/pro/coincatch.d.ts +150 -0
  381. package/js/src/pro/coincatch.js +150 -143
  382. package/js/src/pro/coincheck.d.ts +21 -0
  383. package/js/src/pro/coincheck.js +21 -21
  384. package/js/src/pro/coinex.d.ts +110 -0
  385. package/js/src/pro/coinex.js +110 -110
  386. package/js/src/pro/coinone.d.ts +30 -0
  387. package/js/src/pro/coinone.js +30 -30
  388. package/js/src/pro/cryptocom.d.ts +227 -0
  389. package/js/src/pro/cryptocom.js +227 -227
  390. package/js/src/pro/currencycom.d.ts +45 -0
  391. package/js/src/pro/currencycom.js +45 -45
  392. package/js/src/pro/deribit.d.ts +127 -0
  393. package/js/src/pro/deribit.js +127 -127
  394. package/js/src/pro/exmo.d.ts +66 -0
  395. package/js/src/pro/exmo.js +66 -66
  396. package/js/src/pro/gate.d.ts +287 -0
  397. package/js/src/pro/gate.js +287 -283
  398. package/js/src/pro/gemini.d.ts +74 -0
  399. package/js/src/pro/gemini.js +74 -74
  400. package/js/src/pro/hashkey.d.ts +87 -0
  401. package/js/src/pro/hashkey.js +87 -85
  402. package/js/src/pro/hitbtc.d.ts +190 -0
  403. package/js/src/pro/hitbtc.js +190 -190
  404. package/js/src/pro/hollaex.d.ts +51 -0
  405. package/js/src/pro/hollaex.js +51 -51
  406. package/js/src/pro/htx.d.ts +96 -0
  407. package/js/src/pro/htx.js +96 -94
  408. package/js/src/pro/huobijp.d.ts +38 -0
  409. package/js/src/pro/huobijp.js +38 -38
  410. package/js/src/pro/hyperliquid.d.ts +151 -0
  411. package/js/src/pro/hyperliquid.js +151 -150
  412. package/js/src/pro/idex.d.ts +48 -0
  413. package/js/src/pro/idex.js +48 -48
  414. package/js/src/pro/independentreserve.d.ts +19 -0
  415. package/js/src/pro/independentreserve.js +19 -19
  416. package/js/src/pro/kraken.d.ts +167 -0
  417. package/js/src/pro/kraken.js +167 -167
  418. package/js/src/pro/krakenfutures.d.ts +137 -0
  419. package/js/src/pro/krakenfutures.js +137 -138
  420. package/js/src/pro/kucoin.d.ts +167 -0
  421. package/js/src/pro/kucoin.js +167 -168
  422. package/js/src/pro/kucoinfutures.d.ts +147 -0
  423. package/js/src/pro/kucoinfutures.js +147 -147
  424. package/js/src/pro/lbank.d.ts +95 -0
  425. package/js/src/pro/lbank.js +95 -95
  426. package/js/src/pro/luno.d.ts +21 -0
  427. package/js/src/pro/luno.js +21 -21
  428. package/js/src/pro/mexc.d.ts +101 -0
  429. package/js/src/pro/mexc.js +101 -101
  430. package/js/src/pro/ndax.d.ts +42 -0
  431. package/js/src/pro/ndax.js +42 -42
  432. package/js/src/pro/okcoin.d.ts +61 -0
  433. package/js/src/pro/okcoin.js +61 -61
  434. package/js/src/pro/okx.d.ts +332 -0
  435. package/js/src/pro/okx.js +332 -330
  436. package/js/src/pro/onetrading.d.ts +71 -0
  437. package/js/src/pro/onetrading.js +71 -71
  438. package/js/src/pro/oxfun.d.ts +193 -0
  439. package/js/src/pro/oxfun.js +193 -191
  440. package/js/src/pro/p2b.d.ts +77 -0
  441. package/js/src/pro/p2b.js +77 -77
  442. package/js/src/pro/paradex.d.ts +39 -0
  443. package/js/src/pro/paradex.js +39 -39
  444. package/js/src/pro/phemex.d.ts +94 -0
  445. package/js/src/pro/phemex.js +94 -94
  446. package/js/src/pro/poloniex.d.ts +171 -0
  447. package/js/src/pro/poloniex.js +171 -171
  448. package/js/src/pro/poloniexfutures.d.ts +62 -0
  449. package/js/src/pro/poloniexfutures.js +62 -62
  450. package/js/src/pro/probit.d.ts +63 -0
  451. package/js/src/pro/probit.js +63 -63
  452. package/js/src/pro/upbit.d.ts +80 -0
  453. package/js/src/pro/upbit.js +80 -80
  454. package/js/src/pro/vertex.d.ts +65 -0
  455. package/js/src/pro/vertex.js +65 -63
  456. package/js/src/pro/wazirx.d.ts +70 -0
  457. package/js/src/pro/wazirx.js +70 -70
  458. package/js/src/pro/whitebit.d.ts +83 -0
  459. package/js/src/pro/whitebit.js +83 -83
  460. package/js/src/pro/woo.d.ts +106 -0
  461. package/js/src/pro/woo.js +106 -104
  462. package/js/src/pro/woofipro.d.ts +105 -0
  463. package/js/src/pro/woofipro.js +105 -103
  464. package/js/src/pro/xt.d.ts +119 -0
  465. package/js/src/pro/xt.js +119 -119
  466. package/js/src/probit.d.ts +229 -0
  467. package/js/src/probit.js +229 -229
  468. package/js/src/timex.d.ts +198 -0
  469. package/js/src/timex.js +198 -197
  470. package/js/src/tokocrypto.d.ts +214 -0
  471. package/js/src/tokocrypto.js +214 -213
  472. package/js/src/tradeogre.d.ts +92 -0
  473. package/js/src/tradeogre.js +92 -91
  474. package/js/src/upbit.d.ts +243 -0
  475. package/js/src/upbit.js +243 -242
  476. package/js/src/vertex.d.ts +258 -0
  477. package/js/src/vertex.js +258 -258
  478. package/js/src/wavesexchange.d.ts +175 -0
  479. package/js/src/wavesexchange.js +175 -172
  480. package/js/src/wazirx.d.ts +168 -0
  481. package/js/src/wazirx.js +168 -168
  482. package/js/src/whitebit.d.ts +361 -0
  483. package/js/src/whitebit.js +361 -361
  484. package/js/src/woo.d.ts +571 -0
  485. package/js/src/woo.js +571 -572
  486. package/js/src/woofipro.d.ts +392 -0
  487. package/js/src/woofipro.js +392 -391
  488. package/js/src/xt.d.ts +439 -4
  489. package/js/src/xt.js +436 -435
  490. package/js/src/yobit.d.ts +159 -0
  491. package/js/src/yobit.js +159 -158
  492. package/js/src/zaif.d.ts +103 -0
  493. package/js/src/zaif.js +103 -103
  494. package/js/src/zonda.d.ts +168 -0
  495. package/js/src/zonda.js +168 -168
  496. package/package.json +1 -1
@@ -986,15 +986,15 @@ class kucoin extends kucoin$1 {
986
986
  nonce() {
987
987
  return this.milliseconds();
988
988
  }
989
+ /**
990
+ * @method
991
+ * @name kucoin#fetchTime
992
+ * @description fetches the current integer timestamp in milliseconds from the exchange server
993
+ * @see https://docs.kucoin.com/#server-time
994
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
995
+ * @returns {int} the current integer timestamp in milliseconds from the exchange server
996
+ */
989
997
  async fetchTime(params = {}) {
990
- /**
991
- * @method
992
- * @name kucoin#fetchTime
993
- * @description fetches the current integer timestamp in milliseconds from the exchange server
994
- * @see https://docs.kucoin.com/#server-time
995
- * @param {object} [params] extra parameters specific to the exchange API endpoint
996
- * @returns {int} the current integer timestamp in milliseconds from the exchange server
997
- */
998
998
  const response = await this.publicGetTimestamp(params);
999
999
  //
1000
1000
  // {
@@ -1005,15 +1005,15 @@ class kucoin extends kucoin$1 {
1005
1005
  //
1006
1006
  return this.safeInteger(response, 'data');
1007
1007
  }
1008
+ /**
1009
+ * @method
1010
+ * @name kucoin#fetchStatus
1011
+ * @description the latest known information on the availability of the exchange API
1012
+ * @see https://docs.kucoin.com/#service-status
1013
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1014
+ * @returns {object} a [status structure]{@link https://docs.ccxt.com/#/?id=exchange-status-structure}
1015
+ */
1008
1016
  async fetchStatus(params = {}) {
1009
- /**
1010
- * @method
1011
- * @name kucoin#fetchStatus
1012
- * @description the latest known information on the availability of the exchange API
1013
- * @see https://docs.kucoin.com/#service-status
1014
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1015
- * @returns {object} a [status structure]{@link https://docs.ccxt.com/#/?id=exchange-status-structure}
1016
- */
1017
1017
  const response = await this.publicGetStatus(params);
1018
1018
  //
1019
1019
  // {
@@ -1034,16 +1034,16 @@ class kucoin extends kucoin$1 {
1034
1034
  'info': response,
1035
1035
  };
1036
1036
  }
1037
+ /**
1038
+ * @method
1039
+ * @name kucoin#fetchMarkets
1040
+ * @description retrieves data on all markets for kucoin
1041
+ * @see https://docs.kucoin.com/#get-symbols-list-deprecated
1042
+ * @see https://docs.kucoin.com/#get-all-tickers
1043
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1044
+ * @returns {object[]} an array of objects representing market data
1045
+ */
1037
1046
  async fetchMarkets(params = {}) {
1038
- /**
1039
- * @method
1040
- * @name kucoin#fetchMarkets
1041
- * @description retrieves data on all markets for kucoin
1042
- * @see https://docs.kucoin.com/#get-symbols-list-deprecated
1043
- * @see https://docs.kucoin.com/#get-all-tickers
1044
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1045
- * @returns {object[]} an array of objects representing market data
1046
- */
1047
1047
  let fetchTickersFees = undefined;
1048
1048
  [fetchTickersFees, params] = this.handleOptionAndParams(params, 'fetchMarkets', 'fetchTickersFees', true);
1049
1049
  const promises = [];
@@ -1227,13 +1227,14 @@ class kucoin extends kucoin$1 {
1227
1227
  }
1228
1228
  return result;
1229
1229
  }
1230
+ /**
1231
+ * @param force
1232
+ * @method
1233
+ * @name kucoin#loadMigrationStatus
1234
+ * @description loads the migration status for the account (hf or not)
1235
+ * @see https://www.kucoin.com/docs/rest/spot-trading/spot-hf-trade-pro-account/get-user-type
1236
+ */
1230
1237
  async loadMigrationStatus(force = false) {
1231
- /**
1232
- * @method
1233
- * @name kucoin#loadMigrationStatus
1234
- * @description loads the migration status for the account (hf or not)
1235
- * @see https://www.kucoin.com/docs/rest/spot-trading/spot-hf-trade-pro-account/get-user-type
1236
- */
1237
1238
  if (!('hf' in this.options) || (this.options['hf'] === undefined) || force) {
1238
1239
  const result = await this.privateGetHfAccountsOpened();
1239
1240
  this.options['hf'] = this.safeBool(result, 'data');
@@ -1254,15 +1255,15 @@ class kucoin extends kucoin$1 {
1254
1255
  params = this.omit(params, 'hf');
1255
1256
  return [hf, params];
1256
1257
  }
1258
+ /**
1259
+ * @method
1260
+ * @name kucoin#fetchCurrencies
1261
+ * @description fetches all available currencies on an exchange
1262
+ * @see https://docs.kucoin.com/#get-currencies
1263
+ * @param {object} params extra parameters specific to the exchange API endpoint
1264
+ * @returns {object} an associative dictionary of currencies
1265
+ */
1257
1266
  async fetchCurrencies(params = {}) {
1258
- /**
1259
- * @method
1260
- * @name kucoin#fetchCurrencies
1261
- * @description fetches all available currencies on an exchange
1262
- * @see https://docs.kucoin.com/#get-currencies
1263
- * @param {object} params extra parameters specific to the exchange API endpoint
1264
- * @returns {object} an associative dictionary of currencies
1265
- */
1266
1267
  const promises = [];
1267
1268
  promises.push(this.publicGetCurrencies(params));
1268
1269
  //
@@ -1417,15 +1418,15 @@ class kucoin extends kucoin$1 {
1417
1418
  }
1418
1419
  return result;
1419
1420
  }
1421
+ /**
1422
+ * @method
1423
+ * @name kucoin#fetchAccounts
1424
+ * @description fetch all the accounts associated with a profile
1425
+ * @see https://docs.kucoin.com/#list-accounts
1426
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1427
+ * @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/#/?id=account-structure} indexed by the account type
1428
+ */
1420
1429
  async fetchAccounts(params = {}) {
1421
- /**
1422
- * @method
1423
- * @name kucoin#fetchAccounts
1424
- * @description fetch all the accounts associated with a profile
1425
- * @see https://docs.kucoin.com/#list-accounts
1426
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1427
- * @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/#/?id=account-structure} indexed by the account type
1428
- */
1429
1430
  const response = await this.privateGetAccounts(params);
1430
1431
  //
1431
1432
  // {
@@ -1468,16 +1469,16 @@ class kucoin extends kucoin$1 {
1468
1469
  }
1469
1470
  return result;
1470
1471
  }
1472
+ /**
1473
+ * @method
1474
+ * @name kucoin#fetchTransactionFee
1475
+ * @description *DEPRECATED* please use fetchDepositWithdrawFee instead
1476
+ * @see https://docs.kucoin.com/#get-withdrawal-quotas
1477
+ * @param {string} code unified currency code
1478
+ * @param {object} params extra parameters specific to the exchange API endpoint
1479
+ * @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
1480
+ */
1471
1481
  async fetchTransactionFee(code, params = {}) {
1472
- /**
1473
- * @method
1474
- * @name kucoin#fetchTransactionFee
1475
- * @description *DEPRECATED* please use fetchDepositWithdrawFee instead
1476
- * @see https://docs.kucoin.com/#get-withdrawal-quotas
1477
- * @param {string} code unified currency code
1478
- * @param {object} params extra parameters specific to the exchange API endpoint
1479
- * @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
1480
- */
1481
1482
  await this.loadMarkets();
1482
1483
  const currency = this.currency(code);
1483
1484
  const request = {
@@ -1498,17 +1499,17 @@ class kucoin extends kucoin$1 {
1498
1499
  'deposit': {},
1499
1500
  };
1500
1501
  }
1502
+ /**
1503
+ * @method
1504
+ * @name kucoin#fetchDepositWithdrawFee
1505
+ * @description fetch the fee for deposits and withdrawals
1506
+ * @see https://docs.kucoin.com/#get-withdrawal-quotas
1507
+ * @param {string} code unified currency code
1508
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1509
+ * @param {string} [params.network] The chain of currency. This only apply for multi-chain currency, and there is no need for single chain currency; you can query the chain through the response of the GET /api/v2/currencies/{currency} interface
1510
+ * @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
1511
+ */
1501
1512
  async fetchDepositWithdrawFee(code, params = {}) {
1502
- /**
1503
- * @method
1504
- * @name kucoin#fetchDepositWithdrawFee
1505
- * @description fetch the fee for deposits and withdrawals
1506
- * @see https://docs.kucoin.com/#get-withdrawal-quotas
1507
- * @param {string} code unified currency code
1508
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1509
- * @param {string} [params.network] The chain of currency. This only apply for multi-chain currency, and there is no need for single chain currency; you can query the chain through the response of the GET /api/v2/currencies/{currency} interface
1510
- * @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
1511
- */
1512
1513
  await this.loadMarkets();
1513
1514
  const currency = this.currency(code);
1514
1515
  const request = {
@@ -1691,16 +1692,16 @@ class kucoin extends kucoin$1 {
1691
1692
  'info': ticker,
1692
1693
  }, market);
1693
1694
  }
1695
+ /**
1696
+ * @method
1697
+ * @name kucoin#fetchTickers
1698
+ * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
1699
+ * @see https://docs.kucoin.com/#get-all-tickers
1700
+ * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
1701
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1702
+ * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1703
+ */
1694
1704
  async fetchTickers(symbols = undefined, params = {}) {
1695
- /**
1696
- * @method
1697
- * @name kucoin#fetchTickers
1698
- * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
1699
- * @see https://docs.kucoin.com/#get-all-tickers
1700
- * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
1701
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1702
- * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1703
- */
1704
1705
  await this.loadMarkets();
1705
1706
  symbols = this.marketSymbols(symbols);
1706
1707
  const response = await this.publicGetMarketAllTickers(params);
@@ -1746,32 +1747,32 @@ class kucoin extends kucoin$1 {
1746
1747
  }
1747
1748
  return this.filterByArrayTickers(result, 'symbol', symbols);
1748
1749
  }
1750
+ /**
1751
+ * @method
1752
+ * @name kucoin#fetchMarkPrices
1753
+ * @description fetches the mark price for multiple markets
1754
+ * @see https://www.kucoin.com/docs/rest/margin-trading/margin-info/get-all-margin-trading-pairs-mark-prices
1755
+ * @param {string[]} [symbols] unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
1756
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1757
+ * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1758
+ */
1749
1759
  async fetchMarkPrices(symbols = undefined, params = {}) {
1750
- /**
1751
- * @method
1752
- * @name kucoin#fetchMarkPrices
1753
- * @description fetches the mark price for multiple markets
1754
- * @see https://www.kucoin.com/docs/rest/margin-trading/margin-info/get-all-margin-trading-pairs-mark-prices
1755
- * @param {string[]} [symbols] unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
1756
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1757
- * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1758
- */
1759
1760
  await this.loadMarkets();
1760
1761
  symbols = this.marketSymbols(symbols);
1761
1762
  const response = await this.publicGetMarkPriceAllSymbols(params);
1762
1763
  const data = this.safeList(response, 'data', []);
1763
1764
  return this.parseTickers(data);
1764
1765
  }
1766
+ /**
1767
+ * @method
1768
+ * @name kucoin#fetchTicker
1769
+ * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
1770
+ * @see https://docs.kucoin.com/#get-24hr-stats
1771
+ * @param {string} symbol unified symbol of the market to fetch the ticker for
1772
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1773
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1774
+ */
1765
1775
  async fetchTicker(symbol, params = {}) {
1766
- /**
1767
- * @method
1768
- * @name kucoin#fetchTicker
1769
- * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
1770
- * @see https://docs.kucoin.com/#get-24hr-stats
1771
- * @param {string} symbol unified symbol of the market to fetch the ticker for
1772
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1773
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1774
- */
1775
1776
  await this.loadMarkets();
1776
1777
  const market = this.market(symbol);
1777
1778
  const request = {
@@ -1804,16 +1805,16 @@ class kucoin extends kucoin$1 {
1804
1805
  const data = this.safeDict(response, 'data', {});
1805
1806
  return this.parseTicker(data, market);
1806
1807
  }
1808
+ /**
1809
+ * @method
1810
+ * @name kucoin#fetchMarkPrice
1811
+ * @description fetches the mark price for a specific market
1812
+ * @see https://www.kucoin.com/docs/rest/margin-trading/margin-info/get-mark-price
1813
+ * @param {string} symbol unified symbol of the market to fetch the ticker for
1814
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1815
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1816
+ */
1807
1817
  async fetchMarkPrice(symbol, params = {}) {
1808
- /**
1809
- * @method
1810
- * @name kucoin#fetchMarkPrice
1811
- * @description fetches the mark price for a specific market
1812
- * @see https://www.kucoin.com/docs/rest/margin-trading/margin-info/get-mark-price
1813
- * @param {string} symbol unified symbol of the market to fetch the ticker for
1814
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1815
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1816
- */
1817
1818
  await this.loadMarkets();
1818
1819
  const market = this.market(symbol);
1819
1820
  const request = {
@@ -1845,20 +1846,20 @@ class kucoin extends kucoin$1 {
1845
1846
  this.safeNumber(ohlcv, 5),
1846
1847
  ];
1847
1848
  }
1849
+ /**
1850
+ * @method
1851
+ * @name kucoin#fetchOHLCV
1852
+ * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
1853
+ * @see https://docs.kucoin.com/#get-klines
1854
+ * @param {string} symbol unified symbol of the market to fetch OHLCV data for
1855
+ * @param {string} timeframe the length of time each candle represents
1856
+ * @param {int} [since] timestamp in ms of the earliest candle to fetch
1857
+ * @param {int} [limit] the maximum amount of candles to fetch
1858
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1859
+ * @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)
1860
+ * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
1861
+ */
1848
1862
  async fetchOHLCV(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
1849
- /**
1850
- * @method
1851
- * @name kucoin#fetchOHLCV
1852
- * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
1853
- * @see https://docs.kucoin.com/#get-klines
1854
- * @param {string} symbol unified symbol of the market to fetch OHLCV data for
1855
- * @param {string} timeframe the length of time each candle represents
1856
- * @param {int} [since] timestamp in ms of the earliest candle to fetch
1857
- * @param {int} [limit] the maximum amount of candles to fetch
1858
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1859
- * @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)
1860
- * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
1861
- */
1862
1863
  await this.loadMarkets();
1863
1864
  let paginate = false;
1864
1865
  [paginate, params] = this.handleOptionAndParams(params, 'fetchOHLCV', 'paginate');
@@ -1903,17 +1904,17 @@ class kucoin extends kucoin$1 {
1903
1904
  const data = this.safeList(response, 'data', []);
1904
1905
  return this.parseOHLCVs(data, market, timeframe, since, limit);
1905
1906
  }
1907
+ /**
1908
+ * @method
1909
+ * @name kucoin#createDepositAddress
1910
+ * @see https://www.kucoin.com/docs/rest/funding/deposit/create-deposit-address-v3-
1911
+ * @description create a currency deposit address
1912
+ * @param {string} code unified currency code of the currency for the deposit address
1913
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1914
+ * @param {string} [params.network] the blockchain network name
1915
+ * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
1916
+ */
1906
1917
  async createDepositAddress(code, params = {}) {
1907
- /**
1908
- * @method
1909
- * @name kucoin#createDepositAddress
1910
- * @see https://www.kucoin.com/docs/rest/funding/deposit/create-deposit-address-v3-
1911
- * @description create a currency deposit address
1912
- * @param {string} code unified currency code of the currency for the deposit address
1913
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1914
- * @param {string} [params.network] the blockchain network name
1915
- * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
1916
- */
1917
1918
  await this.loadMarkets();
1918
1919
  const currency = this.currency(code);
1919
1920
  const request = {
@@ -1943,17 +1944,17 @@ class kucoin extends kucoin$1 {
1943
1944
  const data = this.safeDict(response, 'data', {});
1944
1945
  return this.parseDepositAddress(data, currency);
1945
1946
  }
1947
+ /**
1948
+ * @method
1949
+ * @name kucoin#fetchDepositAddress
1950
+ * @description fetch the deposit address for a currency associated with this account
1951
+ * @see https://docs.kucoin.com/#get-deposit-addresses-v2
1952
+ * @param {string} code unified currency code
1953
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1954
+ * @param {string} [params.network] the blockchain network name
1955
+ * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
1956
+ */
1946
1957
  async fetchDepositAddress(code, params = {}) {
1947
- /**
1948
- * @method
1949
- * @name kucoin#fetchDepositAddress
1950
- * @description fetch the deposit address for a currency associated with this account
1951
- * @see https://docs.kucoin.com/#get-deposit-addresses-v2
1952
- * @param {string} code unified currency code
1953
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1954
- * @param {string} [params.network] the blockchain network name
1955
- * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
1956
- */
1957
1958
  await this.loadMarkets();
1958
1959
  const currency = this.currency(code);
1959
1960
  const request = {
@@ -2001,16 +2002,16 @@ class kucoin extends kucoin$1 {
2001
2002
  'tag': this.safeString(depositAddress, 'memo'),
2002
2003
  };
2003
2004
  }
2005
+ /**
2006
+ * @method
2007
+ * @name kucoin#fetchDepositAddressesByNetwork
2008
+ * @see https://docs.kucoin.com/#get-deposit-addresses-v2
2009
+ * @description fetch the deposit address for a currency associated with this account
2010
+ * @param {string} code unified currency code
2011
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2012
+ * @returns {object} an array of [address structures]{@link https://docs.ccxt.com/#/?id=address-structure}
2013
+ */
2004
2014
  async fetchDepositAddressesByNetwork(code, params = {}) {
2005
- /**
2006
- * @method
2007
- * @name kucoin#fetchDepositAddressesByNetwork
2008
- * @see https://docs.kucoin.com/#get-deposit-addresses-v2
2009
- * @description fetch the deposit address for a currency associated with this account
2010
- * @param {string} code unified currency code
2011
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2012
- * @returns {object} an array of [address structures]{@link https://docs.ccxt.com/#/?id=address-structure}
2013
- */
2014
2015
  await this.loadMarkets();
2015
2016
  const currency = this.currency(code);
2016
2017
  const request = {
@@ -2041,18 +2042,18 @@ class kucoin extends kucoin$1 {
2041
2042
  });
2042
2043
  return this.indexBy(parsed, 'network');
2043
2044
  }
2045
+ /**
2046
+ * @method
2047
+ * @name kucoin#fetchOrderBook
2048
+ * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
2049
+ * @see https://www.kucoin.com/docs/rest/spot-trading/market-data/get-part-order-book-aggregated-
2050
+ * @see https://www.kucoin.com/docs/rest/spot-trading/market-data/get-full-order-book-aggregated-
2051
+ * @param {string} symbol unified symbol of the market to fetch the order book for
2052
+ * @param {int} [limit] the maximum amount of order book entries to return
2053
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2054
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
2055
+ */
2044
2056
  async fetchOrderBook(symbol, limit = undefined, params = {}) {
2045
- /**
2046
- * @method
2047
- * @name kucoin#fetchOrderBook
2048
- * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
2049
- * @see https://www.kucoin.com/docs/rest/spot-trading/market-data/get-part-order-book-aggregated-
2050
- * @see https://www.kucoin.com/docs/rest/spot-trading/market-data/get-full-order-book-aggregated-
2051
- * @param {string} symbol unified symbol of the market to fetch the order book for
2052
- * @param {int} [limit] the maximum amount of order book entries to return
2053
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2054
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
2055
- */
2056
2057
  await this.loadMarkets();
2057
2058
  const market = this.market(symbol);
2058
2059
  const level = this.safeInteger(params, 'level', 2);
@@ -2125,51 +2126,51 @@ class kucoin extends kucoin$1 {
2125
2126
  }
2126
2127
  return [triggerPrice, stopLossPrice, takeProfitPrice];
2127
2128
  }
2129
+ /**
2130
+ * @method
2131
+ * @name kucoin#createOrder
2132
+ * @description Create an order on the exchange
2133
+ * @see https://docs.kucoin.com/spot#place-a-new-order
2134
+ * @see https://docs.kucoin.com/spot#place-a-new-order-2
2135
+ * @see https://docs.kucoin.com/spot#place-a-margin-order
2136
+ * @see https://docs.kucoin.com/spot-hf/#place-hf-order
2137
+ * @see https://www.kucoin.com/docs/rest/spot-trading/orders/place-order-test
2138
+ * @see https://www.kucoin.com/docs/rest/margin-trading/orders/place-margin-order-test
2139
+ * @see https://www.kucoin.com/docs/rest/spot-trading/spot-hf-trade-pro-account/sync-place-hf-order
2140
+ * @param {string} symbol Unified CCXT market symbol
2141
+ * @param {string} type 'limit' or 'market'
2142
+ * @param {string} side 'buy' or 'sell'
2143
+ * @param {float} amount the amount of currency to trade
2144
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
2145
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2146
+ * @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
2147
+ * @param {string} [params.marginMode] 'cross', // cross (cross mode) and isolated (isolated mode), set to cross by default, the isolated mode will be released soon, stay tuned
2148
+ * @param {string} [params.timeInForce] GTC, GTT, IOC, or FOK, default is GTC, limit orders only
2149
+ * @param {string} [params.postOnly] Post only flag, invalid when timeInForce is IOC or FOK
2150
+ *
2151
+ * EXCHANGE SPECIFIC PARAMETERS
2152
+ * @param {string} [params.clientOid] client order id, defaults to uuid if not passed
2153
+ * @param {string} [params.remark] remark for the order, length cannot exceed 100 utf8 characters
2154
+ * @param {string} [params.tradeType] 'TRADE', // TRADE, MARGIN_TRADE // not used with margin orders
2155
+ * limit orders ---------------------------------------------------
2156
+ * @param {float} [params.cancelAfter] long, // cancel after n seconds, requires timeInForce to be GTT
2157
+ * @param {bool} [params.hidden] false, // Order will not be displayed in the order book
2158
+ * @param {bool} [params.iceberg] false, // Only a portion of the order is displayed in the order book
2159
+ * @param {string} [params.visibleSize] this.amountToPrecision (symbol, visibleSize), // The maximum visible size of an iceberg order
2160
+ * market orders --------------------------------------------------
2161
+ * @param {string} [params.funds] // Amount of quote currency to use
2162
+ * stop orders ----------------------------------------------------
2163
+ * @param {string} [params.stop] Either loss or entry, the default is loss. Requires stopPrice to be defined
2164
+ * margin orders --------------------------------------------------
2165
+ * @param {float} [params.leverage] Leverage size of the order
2166
+ * @param {string} [params.stp] '', // self trade prevention, CN, CO, CB or DC
2167
+ * @param {bool} [params.autoBorrow] false, // The system will first borrow you funds at the optimal interest rate and then place an order for you
2168
+ * @param {bool} [params.hf] false, // true for hf order
2169
+ * @param {bool} [params.test] set to true to test an order, no order will be created but the request will be validated
2170
+ * @param {bool} [params.sync] set to true to use the hf sync call
2171
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2172
+ */
2128
2173
  async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
2129
- /**
2130
- * @method
2131
- * @name kucoin#createOrder
2132
- * @description Create an order on the exchange
2133
- * @see https://docs.kucoin.com/spot#place-a-new-order
2134
- * @see https://docs.kucoin.com/spot#place-a-new-order-2
2135
- * @see https://docs.kucoin.com/spot#place-a-margin-order
2136
- * @see https://docs.kucoin.com/spot-hf/#place-hf-order
2137
- * @see https://www.kucoin.com/docs/rest/spot-trading/orders/place-order-test
2138
- * @see https://www.kucoin.com/docs/rest/margin-trading/orders/place-margin-order-test
2139
- * @see https://www.kucoin.com/docs/rest/spot-trading/spot-hf-trade-pro-account/sync-place-hf-order
2140
- * @param {string} symbol Unified CCXT market symbol
2141
- * @param {string} type 'limit' or 'market'
2142
- * @param {string} side 'buy' or 'sell'
2143
- * @param {float} amount the amount of currency to trade
2144
- * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
2145
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2146
- * @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
2147
- * @param {string} [params.marginMode] 'cross', // cross (cross mode) and isolated (isolated mode), set to cross by default, the isolated mode will be released soon, stay tuned
2148
- * @param {string} [params.timeInForce] GTC, GTT, IOC, or FOK, default is GTC, limit orders only
2149
- * @param {string} [params.postOnly] Post only flag, invalid when timeInForce is IOC or FOK
2150
- *
2151
- * EXCHANGE SPECIFIC PARAMETERS
2152
- * @param {string} [params.clientOid] client order id, defaults to uuid if not passed
2153
- * @param {string} [params.remark] remark for the order, length cannot exceed 100 utf8 characters
2154
- * @param {string} [params.tradeType] 'TRADE', // TRADE, MARGIN_TRADE // not used with margin orders
2155
- * limit orders ---------------------------------------------------
2156
- * @param {float} [params.cancelAfter] long, // cancel after n seconds, requires timeInForce to be GTT
2157
- * @param {bool} [params.hidden] false, // Order will not be displayed in the order book
2158
- * @param {bool} [params.iceberg] false, // Only a portion of the order is displayed in the order book
2159
- * @param {string} [params.visibleSize] this.amountToPrecision (symbol, visibleSize), // The maximum visible size of an iceberg order
2160
- * market orders --------------------------------------------------
2161
- * @param {string} [params.funds] // Amount of quote currency to use
2162
- * stop orders ----------------------------------------------------
2163
- * @param {string} [params.stop] Either loss or entry, the default is loss. Requires stopPrice to be defined
2164
- * margin orders --------------------------------------------------
2165
- * @param {float} [params.leverage] Leverage size of the order
2166
- * @param {string} [params.stp] '', // self trade prevention, CN, CO, CB or DC
2167
- * @param {bool} [params.autoBorrow] false, // The system will first borrow you funds at the optimal interest rate and then place an order for you
2168
- * @param {bool} [params.hf] false, // true for hf order
2169
- * @param {bool} [params.test] set to true to test an order, no order will be created but the request will be validated
2170
- * @param {bool} [params.sync] set to true to use the hf sync call
2171
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2172
- */
2173
2174
  await this.loadMarkets();
2174
2175
  const market = this.market(symbol);
2175
2176
  const testOrder = this.safeBool(params, 'test', false);
@@ -2224,64 +2225,64 @@ class kucoin extends kucoin$1 {
2224
2225
  const data = this.safeDict(response, 'data', {});
2225
2226
  return this.parseOrder(data, market);
2226
2227
  }
2228
+ /**
2229
+ * @method
2230
+ * @name kucoin#createMarketOrderWithCost
2231
+ * @description create a market order by providing the symbol, side and cost
2232
+ * @see https://www.kucoin.com/docs/rest/spot-trading/orders/place-order
2233
+ * @param {string} symbol unified symbol of the market to create an order in
2234
+ * @param {string} side 'buy' or 'sell'
2235
+ * @param {float} cost how much you want to trade in units of the quote currency
2236
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2237
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2238
+ */
2227
2239
  async createMarketOrderWithCost(symbol, side, cost, params = {}) {
2228
- /**
2229
- * @method
2230
- * @name kucoin#createMarketOrderWithCost
2231
- * @description create a market order by providing the symbol, side and cost
2232
- * @see https://www.kucoin.com/docs/rest/spot-trading/orders/place-order
2233
- * @param {string} symbol unified symbol of the market to create an order in
2234
- * @param {string} side 'buy' or 'sell'
2235
- * @param {float} cost how much you want to trade in units of the quote currency
2236
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2237
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2238
- */
2239
2240
  await this.loadMarkets();
2240
2241
  params['cost'] = cost;
2241
2242
  return await this.createOrder(symbol, 'market', side, cost, undefined, params);
2242
2243
  }
2244
+ /**
2245
+ * @method
2246
+ * @name kucoin#createMarketBuyOrderWithCost
2247
+ * @description create a market buy order by providing the symbol and cost
2248
+ * @see https://www.kucoin.com/docs/rest/spot-trading/orders/place-order
2249
+ * @param {string} symbol unified symbol of the market to create an order in
2250
+ * @param {float} cost how much you want to trade in units of the quote currency
2251
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2252
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2253
+ */
2243
2254
  async createMarketBuyOrderWithCost(symbol, cost, params = {}) {
2244
- /**
2245
- * @method
2246
- * @name kucoin#createMarketBuyOrderWithCost
2247
- * @description create a market buy order by providing the symbol and cost
2248
- * @see https://www.kucoin.com/docs/rest/spot-trading/orders/place-order
2249
- * @param {string} symbol unified symbol of the market to create an order in
2250
- * @param {float} cost how much you want to trade in units of the quote currency
2251
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2252
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2253
- */
2254
2255
  await this.loadMarkets();
2255
2256
  return await this.createMarketOrderWithCost(symbol, 'buy', cost, params);
2256
2257
  }
2258
+ /**
2259
+ * @method
2260
+ * @name kucoin#createMarketSellOrderWithCost
2261
+ * @description create a market sell order by providing the symbol and cost
2262
+ * @see https://www.kucoin.com/docs/rest/spot-trading/orders/place-order
2263
+ * @param {string} symbol unified symbol of the market to create an order in
2264
+ * @param {float} cost how much you want to trade in units of the quote currency
2265
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2266
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2267
+ */
2257
2268
  async createMarketSellOrderWithCost(symbol, cost, params = {}) {
2258
- /**
2259
- * @method
2260
- * @name kucoin#createMarketSellOrderWithCost
2261
- * @description create a market sell order by providing the symbol and cost
2262
- * @see https://www.kucoin.com/docs/rest/spot-trading/orders/place-order
2263
- * @param {string} symbol unified symbol of the market to create an order in
2264
- * @param {float} cost how much you want to trade in units of the quote currency
2265
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2266
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2267
- */
2268
2269
  await this.loadMarkets();
2269
2270
  return await this.createMarketOrderWithCost(symbol, 'sell', cost, params);
2270
2271
  }
2272
+ /**
2273
+ * @method
2274
+ * @name kucoin#createOrders
2275
+ * @description create a list of trade orders
2276
+ * @see https://www.kucoin.com/docs/rest/spot-trading/orders/place-multiple-orders
2277
+ * @see https://www.kucoin.com/docs/rest/spot-trading/spot-hf-trade-pro-account/place-multiple-hf-orders
2278
+ * @see https://www.kucoin.com/docs/rest/spot-trading/spot-hf-trade-pro-account/sync-place-multiple-hf-orders
2279
+ * @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
2280
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2281
+ * @param {bool} [params.hf] false, // true for hf orders
2282
+ * @param {bool} [params.sync] false, // true to use the hf sync call
2283
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2284
+ */
2271
2285
  async createOrders(orders, params = {}) {
2272
- /**
2273
- * @method
2274
- * @name kucoin#createOrders
2275
- * @description create a list of trade orders
2276
- * @see https://www.kucoin.com/docs/rest/spot-trading/orders/place-multiple-orders
2277
- * @see https://www.kucoin.com/docs/rest/spot-trading/spot-hf-trade-pro-account/place-multiple-hf-orders
2278
- * @see https://www.kucoin.com/docs/rest/spot-trading/spot-hf-trade-pro-account/sync-place-multiple-hf-orders
2279
- * @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
2280
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2281
- * @param {bool} [params.hf] false, // true for hf orders
2282
- * @param {bool} [params.sync] false, // true to use the hf sync call
2283
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2284
- */
2285
2286
  await this.loadMarkets();
2286
2287
  const ordersRequests = [];
2287
2288
  let symbol = undefined;
@@ -2439,22 +2440,22 @@ class kucoin extends kucoin$1 {
2439
2440
  }
2440
2441
  return this.extend(request, params);
2441
2442
  }
2443
+ /**
2444
+ * @method
2445
+ * @name kucoin#editOrder
2446
+ * @description edit an order, kucoin currently only supports the modification of HF orders
2447
+ * @see https://docs.kucoin.com/spot-hf/#modify-order
2448
+ * @param {string} id order id
2449
+ * @param {string} symbol unified symbol of the market to create an order in
2450
+ * @param {string} type not used
2451
+ * @param {string} side not used
2452
+ * @param {float} amount how much of the currency you want to trade in units of the base currency
2453
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
2454
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2455
+ * @param {string} [params.clientOrderId] client order id, defaults to id if not passed
2456
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2457
+ */
2442
2458
  async editOrder(id, symbol, type, side, amount = undefined, price = undefined, params = {}) {
2443
- /**
2444
- * @method
2445
- * @name kucoin#editOrder
2446
- * @description edit an order, kucoin currently only supports the modification of HF orders
2447
- * @see https://docs.kucoin.com/spot-hf/#modify-order
2448
- * @param {string} id order id
2449
- * @param {string} symbol unified symbol of the market to create an order in
2450
- * @param {string} type not used
2451
- * @param {string} side not used
2452
- * @param {float} amount how much of the currency you want to trade in units of the base currency
2453
- * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
2454
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2455
- * @param {string} [params.clientOrderId] client order id, defaults to id if not passed
2456
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2457
- */
2458
2459
  await this.loadMarkets();
2459
2460
  const market = this.market(symbol);
2460
2461
  const request = {
@@ -2485,27 +2486,27 @@ class kucoin extends kucoin$1 {
2485
2486
  const data = this.safeDict(response, 'data', {});
2486
2487
  return this.parseOrder(data, market);
2487
2488
  }
2489
+ /**
2490
+ * @method
2491
+ * @name kucoin#cancelOrder
2492
+ * @description cancels an open order
2493
+ * @see https://docs.kucoin.com/spot#cancel-an-order
2494
+ * @see https://docs.kucoin.com/spot#cancel-an-order-2
2495
+ * @see https://docs.kucoin.com/spot#cancel-single-order-by-clientoid
2496
+ * @see https://docs.kucoin.com/spot#cancel-single-order-by-clientoid-2
2497
+ * @see https://docs.kucoin.com/spot-hf/#cancel-orders-by-orderid
2498
+ * @see https://docs.kucoin.com/spot-hf/#cancel-order-by-clientoid
2499
+ * @see https://www.kucoin.com/docs/rest/spot-trading/spot-hf-trade-pro-account/sync-cancel-hf-order-by-orderid
2500
+ * @see https://www.kucoin.com/docs/rest/spot-trading/spot-hf-trade-pro-account/sync-cancel-hf-order-by-clientoid
2501
+ * @param {string} id order id
2502
+ * @param {string} symbol unified symbol of the market the order was made in
2503
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2504
+ * @param {bool} [params.stop] True if cancelling a stop order
2505
+ * @param {bool} [params.hf] false, // true for hf order
2506
+ * @param {bool} [params.sync] false, // true to use the hf sync call
2507
+ * @returns Response from the exchange
2508
+ */
2488
2509
  async cancelOrder(id, symbol = undefined, params = {}) {
2489
- /**
2490
- * @method
2491
- * @name kucoin#cancelOrder
2492
- * @description cancels an open order
2493
- * @see https://docs.kucoin.com/spot#cancel-an-order
2494
- * @see https://docs.kucoin.com/spot#cancel-an-order-2
2495
- * @see https://docs.kucoin.com/spot#cancel-single-order-by-clientoid
2496
- * @see https://docs.kucoin.com/spot#cancel-single-order-by-clientoid-2
2497
- * @see https://docs.kucoin.com/spot-hf/#cancel-orders-by-orderid
2498
- * @see https://docs.kucoin.com/spot-hf/#cancel-order-by-clientoid
2499
- * @see https://www.kucoin.com/docs/rest/spot-trading/spot-hf-trade-pro-account/sync-cancel-hf-order-by-orderid
2500
- * @see https://www.kucoin.com/docs/rest/spot-trading/spot-hf-trade-pro-account/sync-cancel-hf-order-by-clientoid
2501
- * @param {string} id order id
2502
- * @param {string} symbol unified symbol of the market the order was made in
2503
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2504
- * @param {bool} [params.stop] True if cancelling a stop order
2505
- * @param {bool} [params.hf] false, // true for hf order
2506
- * @param {bool} [params.sync] false, // true to use the hf sync call
2507
- * @returns Response from the exchange
2508
- */
2509
2510
  await this.loadMarkets();
2510
2511
  const request = {};
2511
2512
  const clientOrderId = this.safeString2(params, 'clientOid', 'clientOrderId');
@@ -2612,23 +2613,22 @@ class kucoin extends kucoin$1 {
2612
2613
  });
2613
2614
  }
2614
2615
  }
2616
+ /**
2617
+ * @method
2618
+ * @name kucoin#cancelAllOrders
2619
+ * @description cancel all open orders
2620
+ * @see https://docs.kucoin.com/spot#cancel-all-orders
2621
+ * @see https://docs.kucoin.com/spot#cancel-orders
2622
+ * @see https://docs.kucoin.com/spot-hf/#cancel-all-hf-orders-by-symbol
2623
+ * @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
2624
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2625
+ * @param {bool} [params.stop] *invalid for isolated margin* true if cancelling all stop orders
2626
+ * @param {string} [params.marginMode] 'cross' or 'isolated'
2627
+ * @param {string} [params.orderIds] *stop orders only* Comma seperated order IDs
2628
+ * @param {bool} [params.hf] false, // true for hf order
2629
+ * @returns Response from the exchange
2630
+ */
2615
2631
  async cancelAllOrders(symbol = undefined, params = {}) {
2616
- /**
2617
- * @method
2618
- * @name kucoin#cancelAllOrders
2619
- * @description cancel all open orders
2620
- * @see https://docs.kucoin.com/spot#cancel-all-orders
2621
- * @see https://docs.kucoin.com/spot#cancel-orders
2622
- * @see https://docs.kucoin.com/spot-hf/#cancel-all-hf-orders-by-symbol
2623
- * @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
2624
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2625
- * @param {bool} [params.stop] *invalid for isolated margin* true if cancelling all stop orders
2626
- * @param {string} [params.marginMode] 'cross' or 'isolated'
2627
- * @param {string} [params.orderIds] *stop orders only* Comma seperated order IDs
2628
- * @param {bool} [params.stop] True if cancelling a stop order
2629
- * @param {bool} [params.hf] false, // true for hf order
2630
- * @returns Response from the exchange
2631
- */
2632
2632
  await this.loadMarkets();
2633
2633
  const request = {};
2634
2634
  const stop = this.safeBool(params, 'stop', false);
@@ -2662,31 +2662,30 @@ class kucoin extends kucoin$1 {
2662
2662
  }
2663
2663
  return response;
2664
2664
  }
2665
+ /**
2666
+ * @method
2667
+ * @name kucoin#fetchOrdersByStatus
2668
+ * @description fetch a list of orders
2669
+ * @see https://docs.kucoin.com/spot#list-orders
2670
+ * @see https://docs.kucoin.com/spot#list-stop-orders
2671
+ * @see https://docs.kucoin.com/spot-hf/#obtain-list-of-active-hf-orders
2672
+ * @see https://docs.kucoin.com/spot-hf/#obtain-list-of-filled-hf-orders
2673
+ * @param {string} status *not used for stop orders* 'open' or 'closed'
2674
+ * @param {string} symbol unified market symbol
2675
+ * @param {int} [since] timestamp in ms of the earliest order
2676
+ * @param {int} [limit] max number of orders to return
2677
+ * @param {object} [params] exchange specific params
2678
+ * @param {int} [params.until] end time in ms
2679
+ * @param {string} [params.side] buy or sell
2680
+ * @param {string} [params.type] limit, market, limit_stop or market_stop
2681
+ * @param {string} [params.tradeType] TRADE for spot trading, MARGIN_TRADE for Margin Trading
2682
+ * @param {int} [params.currentPage] *stop orders only* current page
2683
+ * @param {string} [params.orderIds] *stop orders only* comma seperated order ID list
2684
+ * @param {bool} [params.stop] True if fetching a stop order
2685
+ * @param {bool} [params.hf] false, // true for hf order
2686
+ * @returns An [array of order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
2687
+ */
2665
2688
  async fetchOrdersByStatus(status, symbol = undefined, since = undefined, limit = undefined, params = {}) {
2666
- /**
2667
- * @method
2668
- * @name kucoin#fetchOrdersByStatus
2669
- * @description fetch a list of orders
2670
- * @see https://docs.kucoin.com/spot#list-orders
2671
- * @see https://docs.kucoin.com/spot#list-stop-orders
2672
- * @see https://docs.kucoin.com/spot-hf/#obtain-list-of-active-hf-orders
2673
- * @see https://docs.kucoin.com/spot-hf/#obtain-list-of-filled-hf-orders
2674
- * @param {string} status *not used for stop orders* 'open' or 'closed'
2675
- * @param {string} symbol unified market symbol
2676
- * @param {int} [since] timestamp in ms of the earliest order
2677
- * @param {int} [limit] max number of orders to return
2678
- * @param {object} [params] exchange specific params
2679
- * @param {int} [params.until] end time in ms
2680
- * @param {bool} [params.stop] true if fetching stop orders
2681
- * @param {string} [params.side] buy or sell
2682
- * @param {string} [params.type] limit, market, limit_stop or market_stop
2683
- * @param {string} [params.tradeType] TRADE for spot trading, MARGIN_TRADE for Margin Trading
2684
- * @param {int} [params.currentPage] *stop orders only* current page
2685
- * @param {string} [params.orderIds] *stop orders only* comma seperated order ID list
2686
- * @param {bool} [params.stop] True if fetching a stop order
2687
- * @param {bool} [params.hf] false, // true for hf order
2688
- * @returns An [array of order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
2689
- */
2690
2689
  await this.loadMarkets();
2691
2690
  let lowercaseStatus = status.toLowerCase();
2692
2691
  const until = this.safeInteger(params, 'until');
@@ -2788,28 +2787,28 @@ class kucoin extends kucoin$1 {
2788
2787
  const orders = this.safeList(responseData, 'items', []);
2789
2788
  return this.parseOrders(orders, market, since, limit);
2790
2789
  }
2790
+ /**
2791
+ * @method
2792
+ * @name kucoin#fetchClosedOrders
2793
+ * @description fetches information on multiple closed orders made by the user
2794
+ * @see https://docs.kucoin.com/spot#list-orders
2795
+ * @see https://docs.kucoin.com/spot#list-stop-orders
2796
+ * @see https://docs.kucoin.com/spot-hf/#obtain-list-of-active-hf-orders
2797
+ * @see https://docs.kucoin.com/spot-hf/#obtain-list-of-filled-hf-orders
2798
+ * @param {string} symbol unified market symbol of the market orders were made in
2799
+ * @param {int} [since] the earliest time in ms to fetch orders for
2800
+ * @param {int} [limit] the maximum number of order structures to retrieve
2801
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2802
+ * @param {int} [params.until] end time in ms
2803
+ * @param {string} [params.side] buy or sell
2804
+ * @param {string} [params.type] limit, market, limit_stop or market_stop
2805
+ * @param {string} [params.tradeType] TRADE for spot trading, MARGIN_TRADE for Margin Trading
2806
+ * @param {bool} [params.stop] True if fetching a stop order
2807
+ * @param {bool} [params.hf] false, // true for hf order
2808
+ * @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)
2809
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
2810
+ */
2791
2811
  async fetchClosedOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
2792
- /**
2793
- * @method
2794
- * @name kucoin#fetchClosedOrders
2795
- * @description fetches information on multiple closed orders made by the user
2796
- * @see https://docs.kucoin.com/spot#list-orders
2797
- * @see https://docs.kucoin.com/spot#list-stop-orders
2798
- * @see https://docs.kucoin.com/spot-hf/#obtain-list-of-active-hf-orders
2799
- * @see https://docs.kucoin.com/spot-hf/#obtain-list-of-filled-hf-orders
2800
- * @param {string} symbol unified market symbol of the market orders were made in
2801
- * @param {int} [since] the earliest time in ms to fetch orders for
2802
- * @param {int} [limit] the maximum number of order structures to retrieve
2803
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2804
- * @param {int} [params.until] end time in ms
2805
- * @param {string} [params.side] buy or sell
2806
- * @param {string} [params.type] limit, market, limit_stop or market_stop
2807
- * @param {string} [params.tradeType] TRADE for spot trading, MARGIN_TRADE for Margin Trading
2808
- * @param {bool} [params.stop] True if fetching a stop order
2809
- * @param {bool} [params.hf] false, // true for hf order
2810
- * @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)
2811
- * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
2812
- */
2813
2812
  await this.loadMarkets();
2814
2813
  let paginate = false;
2815
2814
  [paginate, params] = this.handleOptionAndParams(params, 'fetchClosedOrders', 'paginate');
@@ -2818,31 +2817,30 @@ class kucoin extends kucoin$1 {
2818
2817
  }
2819
2818
  return await this.fetchOrdersByStatus('done', symbol, since, limit, params);
2820
2819
  }
2820
+ /**
2821
+ * @method
2822
+ * @name kucoin#fetchOpenOrders
2823
+ * @description fetch all unfilled currently open orders
2824
+ * @see https://docs.kucoin.com/spot#list-orders
2825
+ * @see https://docs.kucoin.com/spot#list-stop-orders
2826
+ * @see https://docs.kucoin.com/spot-hf/#obtain-list-of-active-hf-orders
2827
+ * @see https://docs.kucoin.com/spot-hf/#obtain-list-of-filled-hf-orders
2828
+ * @param {string} symbol unified market symbol
2829
+ * @param {int} [since] the earliest time in ms to fetch open orders for
2830
+ * @param {int} [limit] the maximum number of open orders structures to retrieve
2831
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2832
+ * @param {int} [params.until] end time in ms
2833
+ * @param {bool} [params.stop] true if fetching stop orders
2834
+ * @param {string} [params.side] buy or sell
2835
+ * @param {string} [params.type] limit, market, limit_stop or market_stop
2836
+ * @param {string} [params.tradeType] TRADE for spot trading, MARGIN_TRADE for Margin Trading
2837
+ * @param {int} [params.currentPage] *stop orders only* current page
2838
+ * @param {string} [params.orderIds] *stop orders only* comma seperated order ID list
2839
+ * @param {bool} [params.hf] false, // true for hf order
2840
+ * @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)
2841
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
2842
+ */
2821
2843
  async fetchOpenOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
2822
- /**
2823
- * @method
2824
- * @name kucoin#fetchOpenOrders
2825
- * @description fetch all unfilled currently open orders
2826
- * @see https://docs.kucoin.com/spot#list-orders
2827
- * @see https://docs.kucoin.com/spot#list-stop-orders
2828
- * @see https://docs.kucoin.com/spot-hf/#obtain-list-of-active-hf-orders
2829
- * @see https://docs.kucoin.com/spot-hf/#obtain-list-of-filled-hf-orders
2830
- * @param {string} symbol unified market symbol
2831
- * @param {int} [since] the earliest time in ms to fetch open orders for
2832
- * @param {int} [limit] the maximum number of open orders structures to retrieve
2833
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2834
- * @param {int} [params.until] end time in ms
2835
- * @param {bool} [params.stop] true if fetching stop orders
2836
- * @param {string} [params.side] buy or sell
2837
- * @param {string} [params.type] limit, market, limit_stop or market_stop
2838
- * @param {string} [params.tradeType] TRADE for spot trading, MARGIN_TRADE for Margin Trading
2839
- * @param {int} [params.currentPage] *stop orders only* current page
2840
- * @param {string} [params.orderIds] *stop orders only* comma seperated order ID list
2841
- * @param {bool} [params.stop] True if fetching a stop order
2842
- * @param {bool} [params.hf] false, // true for hf order
2843
- * @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)
2844
- * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
2845
- */
2846
2844
  await this.loadMarkets();
2847
2845
  let paginate = false;
2848
2846
  [paginate, params] = this.handleOptionAndParams(params, 'fetchOpenOrders', 'paginate');
@@ -2851,25 +2849,25 @@ class kucoin extends kucoin$1 {
2851
2849
  }
2852
2850
  return await this.fetchOrdersByStatus('active', symbol, since, limit, params);
2853
2851
  }
2852
+ /**
2853
+ * @method
2854
+ * @name kucoin#fetchOrder
2855
+ * @description fetch an order
2856
+ * @see https://docs.kucoin.com/spot#get-an-order
2857
+ * @see https://docs.kucoin.com/spot#get-single-active-order-by-clientoid
2858
+ * @see https://docs.kucoin.com/spot#get-single-order-info
2859
+ * @see https://docs.kucoin.com/spot#get-single-order-by-clientoid
2860
+ * @see https://docs.kucoin.com/spot-hf/#details-of-a-single-hf-order
2861
+ * @see https://docs.kucoin.com/spot-hf/#obtain-details-of-a-single-hf-order-using-clientoid
2862
+ * @param {string} id Order id
2863
+ * @param {string} symbol not sent to exchange except for stop orders with clientOid, but used internally by CCXT to filter
2864
+ * @param {object} [params] exchange specific parameters
2865
+ * @param {bool} [params.stop] true if fetching a stop order
2866
+ * @param {bool} [params.hf] false, // true for hf order
2867
+ * @param {bool} [params.clientOid] unique order id created by users to identify their orders
2868
+ * @returns An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2869
+ */
2854
2870
  async fetchOrder(id, symbol = undefined, params = {}) {
2855
- /**
2856
- * @method
2857
- * @name kucoin#fetchOrder
2858
- * @description fetch an order
2859
- * @see https://docs.kucoin.com/spot#get-an-order
2860
- * @see https://docs.kucoin.com/spot#get-single-active-order-by-clientoid
2861
- * @see https://docs.kucoin.com/spot#get-single-order-info
2862
- * @see https://docs.kucoin.com/spot#get-single-order-by-clientoid
2863
- * @see https://docs.kucoin.com/spot-hf/#details-of-a-single-hf-order
2864
- * @see https://docs.kucoin.com/spot-hf/#obtain-details-of-a-single-hf-order-using-clientoid
2865
- * @param {string} id Order id
2866
- * @param {string} symbol not sent to exchange except for stop orders with clientOid, but used internally by CCXT to filter
2867
- * @param {object} [params] exchange specific parameters
2868
- * @param {bool} [params.stop] true if fetching a stop order
2869
- * @param {bool} [params.hf] false, // true for hf order
2870
- * @param {bool} [params.clientOid] unique order id created by users to identify their orders
2871
- * @returns An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2872
- */
2873
2871
  await this.loadMarkets();
2874
2872
  const request = {};
2875
2873
  const clientOrderId = this.safeString2(params, 'clientOid', 'clientOrderId');
@@ -3110,41 +3108,41 @@ class kucoin extends kucoin$1 {
3110
3108
  'trades': undefined,
3111
3109
  }, market);
3112
3110
  }
3111
+ /**
3112
+ * @method
3113
+ * @name kucoin#fetchOrderTrades
3114
+ * @description fetch all the trades made from a single order
3115
+ * @see https://docs.kucoin.com/#list-fills
3116
+ * @see https://docs.kucoin.com/spot-hf/#transaction-details
3117
+ * @param {string} id order id
3118
+ * @param {string} symbol unified market symbol
3119
+ * @param {int} [since] the earliest time in ms to fetch trades for
3120
+ * @param {int} [limit] the maximum number of trades to retrieve
3121
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3122
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
3123
+ */
3113
3124
  async fetchOrderTrades(id, symbol = undefined, since = undefined, limit = undefined, params = {}) {
3114
- /**
3115
- * @method
3116
- * @name kucoin#fetchOrderTrades
3117
- * @description fetch all the trades made from a single order
3118
- * @see https://docs.kucoin.com/#list-fills
3119
- * @see https://docs.kucoin.com/spot-hf/#transaction-details
3120
- * @param {string} id order id
3121
- * @param {string} symbol unified market symbol
3122
- * @param {int} [since] the earliest time in ms to fetch trades for
3123
- * @param {int} [limit] the maximum number of trades to retrieve
3124
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3125
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
3126
- */
3127
3125
  const request = {
3128
3126
  'orderId': id,
3129
3127
  };
3130
3128
  return await this.fetchMyTrades(symbol, since, limit, this.extend(request, params));
3131
3129
  }
3130
+ /**
3131
+ * @method
3132
+ * @name kucoin#fetchMyTrades
3133
+ * @see https://docs.kucoin.com/#list-fills
3134
+ * @see https://docs.kucoin.com/spot-hf/#transaction-details
3135
+ * @description fetch all trades made by the user
3136
+ * @param {string} symbol unified market symbol
3137
+ * @param {int} [since] the earliest time in ms to fetch trades for
3138
+ * @param {int} [limit] the maximum number of trades structures to retrieve
3139
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3140
+ * @param {int} [params.until] the latest time in ms to fetch entries for
3141
+ * @param {bool} [params.hf] false, // true for hf order
3142
+ * @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)
3143
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
3144
+ */
3132
3145
  async fetchMyTrades(symbol = undefined, since = undefined, limit = undefined, params = {}) {
3133
- /**
3134
- * @method
3135
- * @name kucoin#fetchMyTrades
3136
- * @see https://docs.kucoin.com/#list-fills
3137
- * @see https://docs.kucoin.com/spot-hf/#transaction-details
3138
- * @description fetch all trades made by the user
3139
- * @param {string} symbol unified market symbol
3140
- * @param {int} [since] the earliest time in ms to fetch trades for
3141
- * @param {int} [limit] the maximum number of trades structures to retrieve
3142
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3143
- * @param {int} [params.until] the latest time in ms to fetch entries for
3144
- * @param {bool} [params.hf] false, // true for hf order
3145
- * @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)
3146
- * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
3147
- */
3148
3146
  await this.loadMarkets();
3149
3147
  let paginate = false;
3150
3148
  [paginate, params] = this.handleOptionAndParams(params, 'fetchMyTrades', 'paginate');
@@ -3240,18 +3238,18 @@ class kucoin extends kucoin$1 {
3240
3238
  }
3241
3239
  return this.parseTrades(trades, market, since, limit);
3242
3240
  }
3241
+ /**
3242
+ * @method
3243
+ * @name kucoin#fetchTrades
3244
+ * @description get the list of most recent trades for a particular symbol
3245
+ * @see https://www.kucoin.com/docs/rest/spot-trading/market-data/get-trade-histories
3246
+ * @param {string} symbol unified symbol of the market to fetch trades for
3247
+ * @param {int} [since] timestamp in ms of the earliest trade to fetch
3248
+ * @param {int} [limit] the maximum amount of trades to fetch
3249
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3250
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
3251
+ */
3243
3252
  async fetchTrades(symbol, since = undefined, limit = undefined, params = {}) {
3244
- /**
3245
- * @method
3246
- * @name kucoin#fetchTrades
3247
- * @description get the list of most recent trades for a particular symbol
3248
- * @see https://www.kucoin.com/docs/rest/spot-trading/market-data/get-trade-histories
3249
- * @param {string} symbol unified symbol of the market to fetch trades for
3250
- * @param {int} [since] timestamp in ms of the earliest trade to fetch
3251
- * @param {int} [limit] the maximum amount of trades to fetch
3252
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3253
- * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
3254
- */
3255
3253
  await this.loadMarkets();
3256
3254
  const market = this.market(symbol);
3257
3255
  const request = {
@@ -3413,16 +3411,16 @@ class kucoin extends kucoin$1 {
3413
3411
  'fee': fee,
3414
3412
  }, market);
3415
3413
  }
3414
+ /**
3415
+ * @method
3416
+ * @name kucoin#fetchTradingFee
3417
+ * @description fetch the trading fees for a market
3418
+ * @see https://www.kucoin.com/docs/rest/funding/trade-fee/trading-pair-actual-fee-spot-margin-trade_hf
3419
+ * @param {string} symbol unified market symbol
3420
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3421
+ * @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
3422
+ */
3416
3423
  async fetchTradingFee(symbol, params = {}) {
3417
- /**
3418
- * @method
3419
- * @name kucoin#fetchTradingFee
3420
- * @description fetch the trading fees for a market
3421
- * @see https://www.kucoin.com/docs/rest/funding/trade-fee/trading-pair-actual-fee-spot-margin-trade_hf
3422
- * @param {string} symbol unified market symbol
3423
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3424
- * @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
3425
- */
3426
3424
  await this.loadMarkets();
3427
3425
  const market = this.market(symbol);
3428
3426
  const request = {
@@ -3453,19 +3451,19 @@ class kucoin extends kucoin$1 {
3453
3451
  'tierBased': true,
3454
3452
  };
3455
3453
  }
3454
+ /**
3455
+ * @method
3456
+ * @name kucoin#withdraw
3457
+ * @description make a withdrawal
3458
+ * @see https://www.kucoin.com/docs/rest/funding/withdrawals/apply-withdraw-v3-
3459
+ * @param {string} code unified currency code
3460
+ * @param {float} amount the amount to withdraw
3461
+ * @param {string} address the address to withdraw to
3462
+ * @param {string} tag
3463
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3464
+ * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
3465
+ */
3456
3466
  async withdraw(code, amount, address, tag = undefined, params = {}) {
3457
- /**
3458
- * @method
3459
- * @name kucoin#withdraw
3460
- * @description make a withdrawal
3461
- * @see https://www.kucoin.com/docs/rest/funding/withdrawals/apply-withdraw-v3-
3462
- * @param {string} code unified currency code
3463
- * @param {float} amount the amount to withdraw
3464
- * @param {string} address the address to withdraw to
3465
- * @param {string} tag
3466
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3467
- * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
3468
- */
3469
3467
  [tag, params] = this.handleWithdrawTagAndParams(tag, params);
3470
3468
  await this.loadMarkets();
3471
3469
  this.checkAddress(address);
@@ -3629,21 +3627,21 @@ class kucoin extends kucoin$1 {
3629
3627
  'updated': updated,
3630
3628
  };
3631
3629
  }
3630
+ /**
3631
+ * @method
3632
+ * @name kucoin#fetchDeposits
3633
+ * @description fetch all deposits made to an account
3634
+ * @see https://www.kucoin.com/docs/rest/funding/deposit/get-deposit-list
3635
+ * @see https://www.kucoin.com/docs/rest/funding/deposit/get-v1-historical-deposits-list
3636
+ * @param {string} code unified currency code
3637
+ * @param {int} [since] the earliest time in ms to fetch deposits for
3638
+ * @param {int} [limit] the maximum number of deposits structures to retrieve
3639
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3640
+ * @param {int} [params.until] the latest time in ms to fetch entries for
3641
+ * @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)
3642
+ * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
3643
+ */
3632
3644
  async fetchDeposits(code = undefined, since = undefined, limit = undefined, params = {}) {
3633
- /**
3634
- * @method
3635
- * @name kucoin#fetchDeposits
3636
- * @description fetch all deposits made to an account
3637
- * @see https://www.kucoin.com/docs/rest/funding/deposit/get-deposit-list
3638
- * @see https://www.kucoin.com/docs/rest/funding/deposit/get-v1-historical-deposits-list
3639
- * @param {string} code unified currency code
3640
- * @param {int} [since] the earliest time in ms to fetch deposits for
3641
- * @param {int} [limit] the maximum number of deposits structures to retrieve
3642
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3643
- * @param {int} [params.until] the latest time in ms to fetch entries for
3644
- * @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)
3645
- * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
3646
- */
3647
3645
  await this.loadMarkets();
3648
3646
  let paginate = false;
3649
3647
  [paginate, params] = this.handleOptionAndParams(params, 'fetchDeposits', 'paginate');
@@ -3714,21 +3712,21 @@ class kucoin extends kucoin$1 {
3714
3712
  const items = this.safeList(data, 'items', []);
3715
3713
  return this.parseTransactions(items, currency, since, limit, { 'type': 'deposit' });
3716
3714
  }
3715
+ /**
3716
+ * @method
3717
+ * @name kucoin#fetchWithdrawals
3718
+ * @description fetch all withdrawals made from an account
3719
+ * @see https://www.kucoin.com/docs/rest/funding/withdrawals/get-withdrawals-list
3720
+ * @see https://www.kucoin.com/docs/rest/funding/withdrawals/get-v1-historical-withdrawals-list
3721
+ * @param {string} code unified currency code
3722
+ * @param {int} [since] the earliest time in ms to fetch withdrawals for
3723
+ * @param {int} [limit] the maximum number of withdrawals structures to retrieve
3724
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3725
+ * @param {int} [params.until] the latest time in ms to fetch entries for
3726
+ * @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)
3727
+ * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
3728
+ */
3717
3729
  async fetchWithdrawals(code = undefined, since = undefined, limit = undefined, params = {}) {
3718
- /**
3719
- * @method
3720
- * @name kucoin#fetchWithdrawals
3721
- * @description fetch all withdrawals made from an account
3722
- * @see https://www.kucoin.com/docs/rest/funding/withdrawals/get-withdrawals-list
3723
- * @see https://www.kucoin.com/docs/rest/funding/withdrawals/get-v1-historical-withdrawals-list
3724
- * @param {string} code unified currency code
3725
- * @param {int} [since] the earliest time in ms to fetch withdrawals for
3726
- * @param {int} [limit] the maximum number of withdrawals structures to retrieve
3727
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3728
- * @param {int} [params.until] the latest time in ms to fetch entries for
3729
- * @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)
3730
- * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
3731
- */
3732
3730
  await this.loadMarkets();
3733
3731
  let paginate = false;
3734
3732
  [paginate, params] = this.handleOptionAndParams(params, 'fetchWithdrawals', 'paginate');
@@ -3810,20 +3808,20 @@ class kucoin extends kucoin$1 {
3810
3808
  account['debt'] = Precise["default"].stringAdd(debt, interest);
3811
3809
  return account;
3812
3810
  }
3811
+ /**
3812
+ * @method
3813
+ * @name kucoin#fetchBalance
3814
+ * @description query for balance and get the amount of funds available for trading or funds locked in orders
3815
+ * @see https://www.kucoin.com/docs/rest/account/basic-info/get-account-list-spot-margin-trade_hf
3816
+ * @see https://www.kucoin.com/docs/rest/funding/funding-overview/get-account-detail-margin
3817
+ * @see https://www.kucoin.com/docs/rest/funding/funding-overview/get-account-detail-isolated-margin
3818
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3819
+ * @param {object} [params.marginMode] 'cross' or 'isolated', margin type for fetching margin balance
3820
+ * @param {object} [params.type] extra parameters specific to the exchange API endpoint
3821
+ * @param {object} [params.hf] *default if false* if true, the result includes the balance of the high frequency account
3822
+ * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
3823
+ */
3813
3824
  async fetchBalance(params = {}) {
3814
- /**
3815
- * @method
3816
- * @name kucoin#fetchBalance
3817
- * @description query for balance and get the amount of funds available for trading or funds locked in orders
3818
- * @see https://www.kucoin.com/docs/rest/account/basic-info/get-account-list-spot-margin-trade_hf
3819
- * @see https://www.kucoin.com/docs/rest/funding/funding-overview/get-account-detail-margin
3820
- * @see https://www.kucoin.com/docs/rest/funding/funding-overview/get-account-detail-isolated-margin
3821
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3822
- * @param {object} [params.marginMode] 'cross' or 'isolated', margin type for fetching margin balance
3823
- * @param {object} [params.type] extra parameters specific to the exchange API endpoint
3824
- * @param {object} [params.hf] *default if false* if true, the result includes the balance of the high frequency account
3825
- * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
3826
- */
3827
3825
  await this.loadMarkets();
3828
3826
  const code = this.safeString(params, 'code');
3829
3827
  let currency = undefined;
@@ -3990,21 +3988,21 @@ class kucoin extends kucoin$1 {
3990
3988
  const returnType = isolated ? result : this.safeBalance(result);
3991
3989
  return returnType;
3992
3990
  }
3991
+ /**
3992
+ * @method
3993
+ * @name kucoin#transfer
3994
+ * @description transfer currency internally between wallets on the same account
3995
+ * @see https://www.kucoin.com/docs/rest/funding/transfer/inner-transfer
3996
+ * @see https://docs.kucoin.com/futures/#transfer-funds-to-kucoin-main-account-2
3997
+ * @see https://docs.kucoin.com/spot-hf/#internal-funds-transfers-in-high-frequency-trading-accounts
3998
+ * @param {string} code unified currency code
3999
+ * @param {float} amount amount to transfer
4000
+ * @param {string} fromAccount account to transfer from
4001
+ * @param {string} toAccount account to transfer to
4002
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4003
+ * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
4004
+ */
3993
4005
  async transfer(code, amount, fromAccount, toAccount, params = {}) {
3994
- /**
3995
- * @method
3996
- * @name kucoin#transfer
3997
- * @description transfer currency internally between wallets on the same account
3998
- * @see https://www.kucoin.com/docs/rest/funding/transfer/inner-transfer
3999
- * @see https://docs.kucoin.com/futures/#transfer-funds-to-kucoin-main-account-2
4000
- * @see https://docs.kucoin.com/spot-hf/#internal-funds-transfers-in-high-frequency-trading-accounts
4001
- * @param {string} code unified currency code
4002
- * @param {float} amount amount to transfer
4003
- * @param {string} fromAccount account to transfer from
4004
- * @param {string} toAccount account to transfer to
4005
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4006
- * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
4007
- */
4008
4006
  await this.loadMarkets();
4009
4007
  const currency = this.currency(code);
4010
4008
  const requestedAmount = this.currencyToPrecision(code, amount);
@@ -4275,23 +4273,23 @@ class kucoin extends kucoin$1 {
4275
4273
  'fee': fee,
4276
4274
  }, currency);
4277
4275
  }
4276
+ /**
4277
+ * @method
4278
+ * @name kucoin#fetchLedger
4279
+ * @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
4280
+ * @see https://www.kucoin.com/docs/rest/account/basic-info/get-account-ledgers-spot-margin
4281
+ * @see https://www.kucoin.com/docs/rest/account/basic-info/get-account-ledgers-trade_hf
4282
+ * @see https://www.kucoin.com/docs/rest/account/basic-info/get-account-ledgers-margin_hf
4283
+ * @param {string} [code] unified currency code, default is undefined
4284
+ * @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
4285
+ * @param {int} [limit] max number of ledger entries to return, default is undefined
4286
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4287
+ * @param {boolean} [params.hf] default false, when true will fetch ledger entries for the high frequency trading account
4288
+ * @param {int} [params.until] the latest time in ms to fetch entries for
4289
+ * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
4290
+ * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
4291
+ */
4278
4292
  async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
4279
- /**
4280
- * @method
4281
- * @name kucoin#fetchLedger
4282
- * @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
4283
- * @see https://www.kucoin.com/docs/rest/account/basic-info/get-account-ledgers-spot-margin
4284
- * @see https://www.kucoin.com/docs/rest/account/basic-info/get-account-ledgers-trade_hf
4285
- * @see https://www.kucoin.com/docs/rest/account/basic-info/get-account-ledgers-margin_hf
4286
- * @param {string} [code] unified currency code, default is undefined
4287
- * @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
4288
- * @param {int} [limit] max number of ledger entries to return, default is undefined
4289
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4290
- * @param {boolean} [params.hf] default false, when true will fetch ledger entries for the high frequency trading account
4291
- * @param {int} [params.until] the latest time in ms to fetch entries for
4292
- * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
4293
- * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
4294
- */
4295
4293
  await this.loadMarkets();
4296
4294
  await this.loadAccounts();
4297
4295
  let paginate = false;
@@ -4424,33 +4422,40 @@ class kucoin extends kucoin$1 {
4424
4422
  'info': info,
4425
4423
  };
4426
4424
  }
4425
+ /**
4426
+ * @method
4427
+ * @name kucoin#fetchBorrowInterest
4428
+ * @description fetch the interest owed by the user for borrowing currency for margin trading
4429
+ * @see https://docs.kucoin.com/#get-repay-record
4430
+ * @see https://docs.kucoin.com/#query-isolated-margin-account-info
4431
+ * @param {string} [code] unified currency code
4432
+ * @param {string} [symbol] unified market symbol, required for isolated margin
4433
+ * @param {int} [since] the earliest time in ms to fetch borrrow interest for
4434
+ * @param {int} [limit] the maximum number of structures to retrieve
4435
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4436
+ * @param {string} [params.marginMode] 'cross' or 'isolated' default is 'cross'
4437
+ * @returns {object[]} a list of [borrow interest structures]{@link https://docs.ccxt.com/#/?id=borrow-interest-structure}
4438
+ */
4427
4439
  async fetchBorrowInterest(code = undefined, symbol = undefined, since = undefined, limit = undefined, params = {}) {
4428
- /**
4429
- * @method
4430
- * @name kucoin#fetchBorrowInterest
4431
- * @description fetch the interest owed by the user for borrowing currency for margin trading
4432
- * @see https://docs.kucoin.com/#get-repay-record
4433
- * @see https://docs.kucoin.com/#query-isolated-margin-account-info
4434
- * @param {string} code unified currency code
4435
- * @param {string} symbol unified market symbol, required for isolated margin
4436
- * @param {int} [since] the earliest time in ms to fetch borrrow interest for
4437
- * @param {int} [limit] the maximum number of structures to retrieve
4438
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4439
- * @param {string} [params.marginMode] 'cross' or 'isolated' default is 'cross'
4440
- * @returns {object[]} a list of [borrow interest structures]{@link https://docs.ccxt.com/#/?id=borrow-interest-structure}
4441
- */
4442
4440
  await this.loadMarkets();
4443
4441
  let marginMode = undefined;
4444
- [marginMode, params] = this.handleMarginModeAndParams('fetchBorrowInterest', params);
4445
- if (marginMode === undefined) {
4446
- marginMode = 'cross'; // cross as default marginMode
4447
- }
4442
+ [marginMode, params] = this.handleMarginModeAndParams('fetchBorrowInterest', params, 'cross');
4448
4443
  const request = {};
4449
- let response = undefined;
4444
+ let currency = undefined;
4450
4445
  if (code !== undefined) {
4451
- const currency = this.currency(code);
4452
- request['quoteCurrency'] = currency['id'];
4446
+ currency = this.currency(code);
4447
+ if (marginMode === 'isolated') {
4448
+ request['balanceCurrency'] = currency['id'];
4449
+ }
4450
+ else {
4451
+ request['quoteCurrency'] = currency['id'];
4452
+ }
4453
4453
  }
4454
+ let market = undefined;
4455
+ if (symbol !== undefined) {
4456
+ market = this.market(symbol);
4457
+ }
4458
+ let response = undefined;
4454
4459
  if (marginMode === 'isolated') {
4455
4460
  response = await this.privateGetIsolatedAccounts(this.extend(request, params));
4456
4461
  }
@@ -4523,7 +4528,9 @@ class kucoin extends kucoin$1 {
4523
4528
  //
4524
4529
  const data = this.safeDict(response, 'data', {});
4525
4530
  const assets = (marginMode === 'isolated') ? this.safeList(data, 'assets', []) : this.safeList(data, 'accounts', []);
4526
- return this.parseBorrowInterests(assets, undefined);
4531
+ const interest = this.parseBorrowInterests(assets, market);
4532
+ const filteredByCurrency = this.filterByCurrencySinceLimit(interest, code, since, limit);
4533
+ return this.filterBySymbolSinceLimit(filteredByCurrency, symbol, since, limit);
4527
4534
  }
4528
4535
  parseBorrowInterest(info, market = undefined) {
4529
4536
  //
@@ -4601,20 +4608,20 @@ class kucoin extends kucoin$1 {
4601
4608
  'datetime': this.iso8601(timestamp),
4602
4609
  };
4603
4610
  }
4611
+ /**
4612
+ * @method
4613
+ * @name kucoin#fetchBorrowRateHistories
4614
+ * @description retrieves a history of a multiple currencies borrow interest rate at specific time slots, returns all currencies if no symbols passed, default is undefined
4615
+ * @see https://www.kucoin.com/docs/rest/margin-trading/margin-trading-v3-/get-cross-isolated-margin-interest-records
4616
+ * @param {string[]|undefined} codes list of unified currency codes, default is undefined
4617
+ * @param {int} [since] timestamp in ms of the earliest borrowRate, default is undefined
4618
+ * @param {int} [limit] max number of borrow rate prices to return, default is undefined
4619
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4620
+ * @param {string} [params.marginMode] 'cross' or 'isolated' default is 'cross'
4621
+ * @param {int} [params.until] the latest time in ms to fetch entries for
4622
+ * @returns {object} a dictionary of [borrow rate structures]{@link https://docs.ccxt.com/#/?id=borrow-rate-structure} indexed by the market symbol
4623
+ */
4604
4624
  async fetchBorrowRateHistories(codes = undefined, since = undefined, limit = undefined, params = {}) {
4605
- /**
4606
- * @method
4607
- * @name kucoin#fetchBorrowRateHistories
4608
- * @description retrieves a history of a multiple currencies borrow interest rate at specific time slots, returns all currencies if no symbols passed, default is undefined
4609
- * @see https://www.kucoin.com/docs/rest/margin-trading/margin-trading-v3-/get-cross-isolated-margin-interest-records
4610
- * @param {string[]|undefined} codes list of unified currency codes, default is undefined
4611
- * @param {int} [since] timestamp in ms of the earliest borrowRate, default is undefined
4612
- * @param {int} [limit] max number of borrow rate prices to return, default is undefined
4613
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4614
- * @param {string} [params.marginMode] 'cross' or 'isolated' default is 'cross'
4615
- * @param {int} [params.until] the latest time in ms to fetch entries for
4616
- * @returns {object} a dictionary of [borrow rate structures]{@link https://docs.ccxt.com/#/?id=borrow-rate-structure} indexed by the market symbol
4617
- */
4618
4625
  await this.loadMarkets();
4619
4626
  const marginResult = this.handleMarginModeAndParams('fetchBorrowRateHistories', params);
4620
4627
  const marginMode = this.safeString(marginResult, 0, 'cross');
@@ -4654,20 +4661,20 @@ class kucoin extends kucoin$1 {
4654
4661
  const rows = this.safeList(data, 'items', []);
4655
4662
  return this.parseBorrowRateHistories(rows, codes, since, limit);
4656
4663
  }
4664
+ /**
4665
+ * @method
4666
+ * @name kucoin#fetchBorrowRateHistory
4667
+ * @description retrieves a history of a currencies borrow interest rate at specific time slots
4668
+ * @see https://www.kucoin.com/docs/rest/margin-trading/margin-trading-v3-/get-cross-isolated-margin-interest-records
4669
+ * @param {string} code unified currency code
4670
+ * @param {int} [since] timestamp for the earliest borrow rate
4671
+ * @param {int} [limit] the maximum number of [borrow rate structures]{@link https://docs.ccxt.com/#/?id=borrow-rate-structure} to retrieve
4672
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4673
+ * @param {string} [params.marginMode] 'cross' or 'isolated' default is 'cross'
4674
+ * @param {int} [params.until] the latest time in ms to fetch entries for
4675
+ * @returns {object[]} an array of [borrow rate structures]{@link https://docs.ccxt.com/#/?id=borrow-rate-structure}
4676
+ */
4657
4677
  async fetchBorrowRateHistory(code, since = undefined, limit = undefined, params = {}) {
4658
- /**
4659
- * @method
4660
- * @name kucoin#fetchBorrowRateHistory
4661
- * @description retrieves a history of a currencies borrow interest rate at specific time slots
4662
- * @see https://www.kucoin.com/docs/rest/margin-trading/margin-trading-v3-/get-cross-isolated-margin-interest-records
4663
- * @param {string} code unified currency code
4664
- * @param {int} [since] timestamp for the earliest borrow rate
4665
- * @param {int} [limit] the maximum number of [borrow rate structures]{@link https://docs.ccxt.com/#/?id=borrow-rate-structure} to retrieve
4666
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4667
- * @param {string} [params.marginMode] 'cross' or 'isolated' default is 'cross'
4668
- * @param {int} [params.until] the latest time in ms to fetch entries for
4669
- * @returns {object[]} an array of [borrow rate structures]{@link https://docs.ccxt.com/#/?id=borrow-rate-structure}
4670
- */
4671
4678
  await this.loadMarkets();
4672
4679
  const marginResult = this.handleMarginModeAndParams('fetchBorrowRateHistories', params);
4673
4680
  const marginMode = this.safeString(marginResult, 0, 'cross');
@@ -4739,18 +4746,18 @@ class kucoin extends kucoin$1 {
4739
4746
  }
4740
4747
  return borrowRateHistories;
4741
4748
  }
4749
+ /**
4750
+ * @method
4751
+ * @name kucoin#borrowCrossMargin
4752
+ * @description create a loan to borrow margin
4753
+ * @see https://docs.kucoin.com/#1-margin-borrowing
4754
+ * @param {string} code unified currency code of the currency to borrow
4755
+ * @param {float} amount the amount to borrow
4756
+ * @param {object} [params] extra parameters specific to the exchange API endpoints
4757
+ * @param {string} [params.timeInForce] either IOC or FOK
4758
+ * @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
4759
+ */
4742
4760
  async borrowCrossMargin(code, amount, params = {}) {
4743
- /**
4744
- * @method
4745
- * @name kucoin#borrowCrossMargin
4746
- * @description create a loan to borrow margin
4747
- * @see https://docs.kucoin.com/#1-margin-borrowing
4748
- * @param {string} code unified currency code of the currency to borrow
4749
- * @param {float} amount the amount to borrow
4750
- * @param {object} [params] extra parameters specific to the exchange API endpoints
4751
- * @param {string} [params.timeInForce] either IOC or FOK
4752
- * @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
4753
- */
4754
4761
  await this.loadMarkets();
4755
4762
  const currency = this.currency(code);
4756
4763
  const request = {
@@ -4774,19 +4781,19 @@ class kucoin extends kucoin$1 {
4774
4781
  const data = this.safeDict(response, 'data', {});
4775
4782
  return this.parseMarginLoan(data, currency);
4776
4783
  }
4784
+ /**
4785
+ * @method
4786
+ * @name kucoin#borrowIsolatedMargin
4787
+ * @description create a loan to borrow margin
4788
+ * @see https://docs.kucoin.com/#1-margin-borrowing
4789
+ * @param {string} symbol unified market symbol, required for isolated margin
4790
+ * @param {string} code unified currency code of the currency to borrow
4791
+ * @param {float} amount the amount to borrow
4792
+ * @param {object} [params] extra parameters specific to the exchange API endpoints
4793
+ * @param {string} [params.timeInForce] either IOC or FOK
4794
+ * @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
4795
+ */
4777
4796
  async borrowIsolatedMargin(symbol, code, amount, params = {}) {
4778
- /**
4779
- * @method
4780
- * @name kucoin#borrowIsolatedMargin
4781
- * @description create a loan to borrow margin
4782
- * @see https://docs.kucoin.com/#1-margin-borrowing
4783
- * @param {string} symbol unified market symbol, required for isolated margin
4784
- * @param {string} code unified currency code of the currency to borrow
4785
- * @param {float} amount the amount to borrow
4786
- * @param {object} [params] extra parameters specific to the exchange API endpoints
4787
- * @param {string} [params.timeInForce] either IOC or FOK
4788
- * @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
4789
- */
4790
4797
  await this.loadMarkets();
4791
4798
  const market = this.market(symbol);
4792
4799
  const currency = this.currency(code);
@@ -4813,17 +4820,17 @@ class kucoin extends kucoin$1 {
4813
4820
  const data = this.safeDict(response, 'data', {});
4814
4821
  return this.parseMarginLoan(data, currency);
4815
4822
  }
4823
+ /**
4824
+ * @method
4825
+ * @name kucoin#repayCrossMargin
4826
+ * @description repay borrowed margin and interest
4827
+ * @see https://docs.kucoin.com/#2-repayment
4828
+ * @param {string} code unified currency code of the currency to repay
4829
+ * @param {float} amount the amount to repay
4830
+ * @param {object} [params] extra parameters specific to the exchange API endpoints
4831
+ * @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
4832
+ */
4816
4833
  async repayCrossMargin(code, amount, params = {}) {
4817
- /**
4818
- * @method
4819
- * @name kucoin#repayCrossMargin
4820
- * @description repay borrowed margin and interest
4821
- * @see https://docs.kucoin.com/#2-repayment
4822
- * @param {string} code unified currency code of the currency to repay
4823
- * @param {float} amount the amount to repay
4824
- * @param {object} [params] extra parameters specific to the exchange API endpoints
4825
- * @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
4826
- */
4827
4834
  await this.loadMarkets();
4828
4835
  const currency = this.currency(code);
4829
4836
  const request = {
@@ -4846,18 +4853,18 @@ class kucoin extends kucoin$1 {
4846
4853
  const data = this.safeDict(response, 'data', {});
4847
4854
  return this.parseMarginLoan(data, currency);
4848
4855
  }
4856
+ /**
4857
+ * @method
4858
+ * @name kucoin#repayIsolatedMargin
4859
+ * @description repay borrowed margin and interest
4860
+ * @see https://docs.kucoin.com/#2-repayment
4861
+ * @param {string} symbol unified market symbol
4862
+ * @param {string} code unified currency code of the currency to repay
4863
+ * @param {float} amount the amount to repay
4864
+ * @param {object} [params] extra parameters specific to the exchange API endpoints
4865
+ * @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
4866
+ */
4849
4867
  async repayIsolatedMargin(symbol, code, amount, params = {}) {
4850
- /**
4851
- * @method
4852
- * @name kucoin#repayIsolatedMargin
4853
- * @description repay borrowed margin and interest
4854
- * @see https://docs.kucoin.com/#2-repayment
4855
- * @param {string} symbol unified market symbol
4856
- * @param {string} code unified currency code of the currency to repay
4857
- * @param {float} amount the amount to repay
4858
- * @param {object} [params] extra parameters specific to the exchange API endpoints
4859
- * @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
4860
- */
4861
4868
  await this.loadMarkets();
4862
4869
  const market = this.market(symbol);
4863
4870
  const currency = this.currency(code);
@@ -4902,16 +4909,16 @@ class kucoin extends kucoin$1 {
4902
4909
  'info': info,
4903
4910
  };
4904
4911
  }
4912
+ /**
4913
+ * @method
4914
+ * @name kucoin#fetchDepositWithdrawFees
4915
+ * @description fetch deposit and withdraw fees - *IMPORTANT* use fetchDepositWithdrawFee to get more in-depth info
4916
+ * @see https://docs.kucoin.com/#get-currencies
4917
+ * @param {string[]|undefined} codes list of unified currency codes
4918
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4919
+ * @returns {object} a list of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
4920
+ */
4905
4921
  async fetchDepositWithdrawFees(codes = undefined, params = {}) {
4906
- /**
4907
- * @method
4908
- * @name kucoin#fetchDepositWithdrawFees
4909
- * @description fetch deposit and withdraw fees - *IMPORTANT* use fetchDepositWithdrawFee to get more in-depth info
4910
- * @see https://docs.kucoin.com/#get-currencies
4911
- * @param {string[]|undefined} codes list of unified currency codes
4912
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4913
- * @returns {object} a list of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
4914
- */
4915
4922
  await this.loadMarkets();
4916
4923
  const response = await this.publicGetCurrencies(params);
4917
4924
  //
@@ -4935,16 +4942,17 @@ class kucoin extends kucoin$1 {
4935
4942
  const data = this.safeList(response, 'data', []);
4936
4943
  return this.parseDepositWithdrawFees(data, codes, 'currency');
4937
4944
  }
4945
+ /**
4946
+ * @method
4947
+ * @name kucoin#setLeverage
4948
+ * @description set the level of leverage for a market
4949
+ * @see https://www.kucoin.com/docs/rest/margin-trading/margin-trading-v3-/modify-leverage-multiplier
4950
+ * @param leverage
4951
+ * @param {string} symbol unified market symbol
4952
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4953
+ * @returns {object} response from the exchange
4954
+ */
4938
4955
  async setLeverage(leverage, symbol = undefined, params = {}) {
4939
- /**
4940
- * @method
4941
- * @name kucoin#setLeverage
4942
- * @description set the level of leverage for a market
4943
- * @see https://www.kucoin.com/docs/rest/margin-trading/margin-trading-v3-/modify-leverage-multiplier
4944
- * @param {string} symbol unified market symbol
4945
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4946
- * @returns {object} response from the exchange
4947
- */
4948
4956
  await this.loadMarkets();
4949
4957
  let market = undefined;
4950
4958
  let marketType = undefined;