ccxt 4.4.29 → 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 (501) 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 +279 -227
  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 +1347 -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 +152 -152
  13. package/dist/cjs/src/bitfinex.js +240 -240
  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 +578 -578
  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 +418 -411
  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 +521 -413
  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 +269 -268
  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 +134 -131
  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/abstract/alpaca.d.ts +1 -0
  170. package/js/src/abstract/binance.d.ts +9 -0
  171. package/js/src/abstract/binancecoinm.d.ts +9 -0
  172. package/js/src/abstract/binanceus.d.ts +9 -0
  173. package/js/src/abstract/binanceusdm.d.ts +9 -0
  174. package/js/src/ace.d.ts +123 -0
  175. package/js/src/ace.js +123 -123
  176. package/js/src/alpaca.d.ts +239 -0
  177. package/js/src/alpaca.js +279 -227
  178. package/js/src/ascendex.d.ts +339 -0
  179. package/js/src/ascendex.js +342 -341
  180. package/js/src/base/types.d.ts +1 -0
  181. package/js/src/bigone.d.ts +242 -0
  182. package/js/src/bigone.js +242 -242
  183. package/js/src/binance.d.ts +1305 -0
  184. package/js/src/binance.js +1347 -1291
  185. package/js/src/bingx.d.ts +639 -0
  186. package/js/src/bingx.js +639 -639
  187. package/js/src/bit2c.d.ts +111 -0
  188. package/js/src/bit2c.js +111 -111
  189. package/js/src/bitbank.d.ts +142 -0
  190. package/js/src/bitbank.js +142 -142
  191. package/js/src/bitbns.d.ts +140 -0
  192. package/js/src/bitbns.js +152 -152
  193. package/js/src/bitfinex.d.ts +231 -0
  194. package/js/src/bitfinex.js +240 -240
  195. package/js/src/bitfinex2.d.ts +403 -0
  196. package/js/src/bitfinex2.js +403 -403
  197. package/js/src/bitflyer.d.ts +184 -0
  198. package/js/src/bitflyer.js +184 -184
  199. package/js/src/bitget.d.ts +846 -0
  200. package/js/src/bitget.js +848 -846
  201. package/js/src/bithumb.d.ts +125 -0
  202. package/js/src/bithumb.js +125 -124
  203. package/js/src/bitmart.d.ts +525 -0
  204. package/js/src/bitmart.js +578 -578
  205. package/js/src/bitmex.d.ts +317 -0
  206. package/js/src/bitmex.js +317 -317
  207. package/js/src/bitopro.d.ts +221 -0
  208. package/js/src/bitopro.js +221 -221
  209. package/js/src/bitrue.d.ts +315 -0
  210. package/js/src/bitrue.js +315 -315
  211. package/js/src/bitso.d.ts +220 -0
  212. package/js/src/bitso.js +220 -220
  213. package/js/src/bitstamp.d.ts +251 -0
  214. package/js/src/bitstamp.js +251 -251
  215. package/js/src/bitteam.d.ts +183 -0
  216. package/js/src/bitteam.js +183 -183
  217. package/js/src/bitvavo.d.ts +247 -0
  218. package/js/src/bitvavo.js +247 -247
  219. package/js/src/bl3p.d.ts +82 -0
  220. package/js/src/bl3p.js +82 -82
  221. package/js/src/blockchaincom.d.ts +211 -0
  222. package/js/src/blockchaincom.js +211 -211
  223. package/js/src/blofin.d.ts +332 -0
  224. package/js/src/blofin.js +332 -331
  225. package/js/src/btcalpha.d.ts +166 -0
  226. package/js/src/btcalpha.js +166 -166
  227. package/js/src/btcbox.d.ts +108 -0
  228. package/js/src/btcbox.js +108 -108
  229. package/js/src/btcmarkets.d.ts +198 -0
  230. package/js/src/btcmarkets.js +198 -198
  231. package/js/src/btcturk.d.ts +124 -0
  232. package/js/src/btcturk.js +124 -124
  233. package/js/src/bybit.d.ts +906 -1
  234. package/js/src/bybit.js +906 -900
  235. package/js/src/cex.d.ts +227 -0
  236. package/js/src/cex.js +227 -226
  237. package/js/src/coinbase.d.ts +481 -0
  238. package/js/src/coinbase.js +481 -481
  239. package/js/src/coinbaseexchange.d.ts +274 -0
  240. package/js/src/coinbaseexchange.js +274 -274
  241. package/js/src/coinbaseinternational.d.ts +304 -0
  242. package/js/src/coinbaseinternational.js +304 -304
  243. package/js/src/coincatch.d.ts +646 -0
  244. package/js/src/coincatch.js +648 -648
  245. package/js/src/coincheck.d.ts +113 -0
  246. package/js/src/coincheck.js +113 -113
  247. package/js/src/coinex.d.ts +603 -0
  248. package/js/src/coinex.js +611 -601
  249. package/js/src/coinlist.d.ts +304 -0
  250. package/js/src/coinlist.js +304 -303
  251. package/js/src/coinmate.d.ts +162 -0
  252. package/js/src/coinmate.js +162 -161
  253. package/js/src/coinmetro.d.ts +187 -0
  254. package/js/src/coinmetro.js +187 -187
  255. package/js/src/coinone.d.ts +124 -0
  256. package/js/src/coinone.js +124 -123
  257. package/js/src/coinsph.d.ts +237 -0
  258. package/js/src/coinsph.js +237 -237
  259. package/js/src/coinspot.d.ts +82 -0
  260. package/js/src/coinspot.js +82 -82
  261. package/js/src/cryptocom.d.ts +342 -0
  262. package/js/src/cryptocom.js +342 -341
  263. package/js/src/currencycom.d.ts +225 -0
  264. package/js/src/currencycom.js +225 -224
  265. package/js/src/delta.d.ts +320 -0
  266. package/js/src/delta.js +320 -320
  267. package/js/src/deribit.d.ts +411 -0
  268. package/js/src/deribit.js +418 -411
  269. package/js/src/digifinex.d.ts +430 -0
  270. package/js/src/digifinex.js +432 -431
  271. package/js/src/exmo.d.ts +328 -0
  272. package/js/src/exmo.js +328 -327
  273. package/js/src/gate.d.ts +801 -1
  274. package/js/src/gate.js +812 -789
  275. package/js/src/gemini.d.ts +199 -0
  276. package/js/src/gemini.js +199 -198
  277. package/js/src/hashkey.d.ts +516 -0
  278. package/js/src/hashkey.js +520 -517
  279. package/js/src/hitbtc.d.ts +465 -0
  280. package/js/src/hitbtc.js +465 -462
  281. package/js/src/hollaex.d.ts +253 -0
  282. package/js/src/hollaex.js +253 -252
  283. package/js/src/htx.d.ts +765 -2
  284. package/js/src/htx.js +791 -848
  285. package/js/src/huobijp.d.ts +219 -0
  286. package/js/src/huobijp.js +219 -218
  287. package/js/src/hyperliquid.d.ts +422 -1
  288. package/js/src/hyperliquid.js +521 -413
  289. package/js/src/idex.d.ts +238 -0
  290. package/js/src/idex.js +238 -237
  291. package/js/src/independentreserve.d.ts +133 -0
  292. package/js/src/independentreserve.js +133 -132
  293. package/js/src/indodax.d.ts +171 -0
  294. package/js/src/indodax.js +176 -170
  295. package/js/src/kraken.d.ts +379 -0
  296. package/js/src/kraken.js +379 -377
  297. package/js/src/krakenfutures.d.ts +280 -0
  298. package/js/src/krakenfutures.js +283 -279
  299. package/js/src/kucoin.d.ts +613 -0
  300. package/js/src/kucoin.js +630 -622
  301. package/js/src/kucoinfutures.d.ts +437 -0
  302. package/js/src/kucoinfutures.js +439 -434
  303. package/js/src/kuna.d.ts +283 -0
  304. package/js/src/kuna.js +283 -282
  305. package/js/src/latoken.d.ts +211 -0
  306. package/js/src/latoken.js +211 -210
  307. package/js/src/lbank.d.ts +268 -0
  308. package/js/src/lbank.js +269 -268
  309. package/js/src/luno.d.ts +174 -0
  310. package/js/src/luno.js +174 -173
  311. package/js/src/lykke.d.ts +172 -0
  312. package/js/src/lykke.js +172 -171
  313. package/js/src/mercado.d.ts +123 -0
  314. package/js/src/mercado.js +123 -122
  315. package/js/src/mexc.d.ts +647 -0
  316. package/js/src/mexc.js +650 -646
  317. package/js/src/ndax.d.ts +229 -0
  318. package/js/src/ndax.js +229 -228
  319. package/js/src/novadax.d.ts +230 -0
  320. package/js/src/novadax.js +230 -229
  321. package/js/src/oceanex.d.ts +187 -0
  322. package/js/src/oceanex.js +187 -186
  323. package/js/src/okcoin.d.ts +286 -0
  324. package/js/src/okcoin.js +286 -285
  325. package/js/src/okx.d.ts +907 -0
  326. package/js/src/okx.js +909 -904
  327. package/js/src/onetrading.d.ts +218 -0
  328. package/js/src/onetrading.js +218 -218
  329. package/js/src/oxfun.d.ts +336 -3
  330. package/js/src/oxfun.js +335 -334
  331. package/js/src/p2b.d.ts +154 -0
  332. package/js/src/p2b.js +154 -154
  333. package/js/src/paradex.d.ts +241 -0
  334. package/js/src/paradex.js +249 -244
  335. package/js/src/paymium.d.ts +101 -0
  336. package/js/src/paymium.js +101 -101
  337. package/js/src/phemex.d.ts +366 -0
  338. package/js/src/phemex.js +369 -367
  339. package/js/src/poloniex.d.ts +270 -0
  340. package/js/src/poloniex.js +270 -270
  341. package/js/src/poloniexfutures.d.ts +250 -0
  342. package/js/src/poloniexfutures.js +250 -250
  343. package/js/src/pro/alpaca.d.ts +64 -0
  344. package/js/src/pro/alpaca.js +64 -64
  345. package/js/src/pro/ascendex.d.ts +64 -0
  346. package/js/src/pro/ascendex.js +64 -64
  347. package/js/src/pro/binance.d.ts +546 -0
  348. package/js/src/pro/binance.js +546 -543
  349. package/js/src/pro/bingx.d.ts +116 -0
  350. package/js/src/pro/bingx.js +116 -116
  351. package/js/src/pro/bitfinex.d.ts +42 -0
  352. package/js/src/pro/bitfinex.js +42 -42
  353. package/js/src/pro/bitfinex2.d.ts +66 -0
  354. package/js/src/pro/bitfinex2.js +66 -66
  355. package/js/src/pro/bitget.d.ts +187 -0
  356. package/js/src/pro/bitget.js +187 -180
  357. package/js/src/pro/bithumb.d.ts +40 -0
  358. package/js/src/pro/bithumb.js +40 -40
  359. package/js/src/pro/bitmart.d.ts +121 -0
  360. package/js/src/pro/bitmart.js +121 -119
  361. package/js/src/pro/bitmex.d.ts +135 -0
  362. package/js/src/pro/bitmex.js +135 -133
  363. package/js/src/pro/bitopro.d.ts +49 -0
  364. package/js/src/pro/bitopro.js +49 -49
  365. package/js/src/pro/bitrue.d.ts +19 -0
  366. package/js/src/pro/bitrue.js +19 -19
  367. package/js/src/pro/bitstamp.d.ts +29 -0
  368. package/js/src/pro/bitstamp.js +29 -29
  369. package/js/src/pro/bitvavo.d.ts +253 -0
  370. package/js/src/pro/bitvavo.js +253 -253
  371. package/js/src/pro/blockchaincom.d.ts +62 -0
  372. package/js/src/pro/blockchaincom.js +62 -62
  373. package/js/src/pro/blofin.d.ts +132 -0
  374. package/js/src/pro/blofin.js +134 -131
  375. package/js/src/pro/bybit.d.ts +317 -0
  376. package/js/src/pro/bybit.js +317 -313
  377. package/js/src/pro/cex.d.ts +168 -0
  378. package/js/src/pro/cex.js +168 -168
  379. package/js/src/pro/coinbase.d.ts +93 -0
  380. package/js/src/pro/coinbase.js +93 -91
  381. package/js/src/pro/coinbaseexchange.d.ts +95 -0
  382. package/js/src/pro/coinbaseexchange.js +95 -95
  383. package/js/src/pro/coinbaseinternational.d.ts +111 -0
  384. package/js/src/pro/coinbaseinternational.js +111 -111
  385. package/js/src/pro/coincatch.d.ts +150 -0
  386. package/js/src/pro/coincatch.js +150 -143
  387. package/js/src/pro/coincheck.d.ts +21 -0
  388. package/js/src/pro/coincheck.js +21 -21
  389. package/js/src/pro/coinex.d.ts +110 -0
  390. package/js/src/pro/coinex.js +110 -110
  391. package/js/src/pro/coinone.d.ts +30 -0
  392. package/js/src/pro/coinone.js +30 -30
  393. package/js/src/pro/cryptocom.d.ts +227 -0
  394. package/js/src/pro/cryptocom.js +227 -227
  395. package/js/src/pro/currencycom.d.ts +45 -0
  396. package/js/src/pro/currencycom.js +45 -45
  397. package/js/src/pro/deribit.d.ts +127 -0
  398. package/js/src/pro/deribit.js +127 -127
  399. package/js/src/pro/exmo.d.ts +66 -0
  400. package/js/src/pro/exmo.js +66 -66
  401. package/js/src/pro/gate.d.ts +287 -0
  402. package/js/src/pro/gate.js +287 -283
  403. package/js/src/pro/gemini.d.ts +74 -0
  404. package/js/src/pro/gemini.js +74 -74
  405. package/js/src/pro/hashkey.d.ts +87 -0
  406. package/js/src/pro/hashkey.js +87 -85
  407. package/js/src/pro/hitbtc.d.ts +190 -0
  408. package/js/src/pro/hitbtc.js +190 -190
  409. package/js/src/pro/hollaex.d.ts +51 -0
  410. package/js/src/pro/hollaex.js +51 -51
  411. package/js/src/pro/htx.d.ts +96 -0
  412. package/js/src/pro/htx.js +96 -94
  413. package/js/src/pro/huobijp.d.ts +38 -0
  414. package/js/src/pro/huobijp.js +38 -38
  415. package/js/src/pro/hyperliquid.d.ts +151 -0
  416. package/js/src/pro/hyperliquid.js +151 -150
  417. package/js/src/pro/idex.d.ts +48 -0
  418. package/js/src/pro/idex.js +48 -48
  419. package/js/src/pro/independentreserve.d.ts +19 -0
  420. package/js/src/pro/independentreserve.js +19 -19
  421. package/js/src/pro/kraken.d.ts +167 -0
  422. package/js/src/pro/kraken.js +167 -167
  423. package/js/src/pro/krakenfutures.d.ts +137 -0
  424. package/js/src/pro/krakenfutures.js +137 -138
  425. package/js/src/pro/kucoin.d.ts +167 -0
  426. package/js/src/pro/kucoin.js +167 -168
  427. package/js/src/pro/kucoinfutures.d.ts +147 -0
  428. package/js/src/pro/kucoinfutures.js +147 -147
  429. package/js/src/pro/lbank.d.ts +95 -0
  430. package/js/src/pro/lbank.js +95 -95
  431. package/js/src/pro/luno.d.ts +21 -0
  432. package/js/src/pro/luno.js +21 -21
  433. package/js/src/pro/mexc.d.ts +101 -0
  434. package/js/src/pro/mexc.js +101 -101
  435. package/js/src/pro/ndax.d.ts +42 -0
  436. package/js/src/pro/ndax.js +42 -42
  437. package/js/src/pro/okcoin.d.ts +61 -0
  438. package/js/src/pro/okcoin.js +61 -61
  439. package/js/src/pro/okx.d.ts +332 -0
  440. package/js/src/pro/okx.js +332 -330
  441. package/js/src/pro/onetrading.d.ts +71 -0
  442. package/js/src/pro/onetrading.js +71 -71
  443. package/js/src/pro/oxfun.d.ts +193 -0
  444. package/js/src/pro/oxfun.js +193 -191
  445. package/js/src/pro/p2b.d.ts +77 -0
  446. package/js/src/pro/p2b.js +77 -77
  447. package/js/src/pro/paradex.d.ts +39 -0
  448. package/js/src/pro/paradex.js +39 -39
  449. package/js/src/pro/phemex.d.ts +94 -0
  450. package/js/src/pro/phemex.js +94 -94
  451. package/js/src/pro/poloniex.d.ts +171 -0
  452. package/js/src/pro/poloniex.js +171 -171
  453. package/js/src/pro/poloniexfutures.d.ts +62 -0
  454. package/js/src/pro/poloniexfutures.js +62 -62
  455. package/js/src/pro/probit.d.ts +63 -0
  456. package/js/src/pro/probit.js +63 -63
  457. package/js/src/pro/upbit.d.ts +80 -0
  458. package/js/src/pro/upbit.js +80 -80
  459. package/js/src/pro/vertex.d.ts +65 -0
  460. package/js/src/pro/vertex.js +65 -63
  461. package/js/src/pro/wazirx.d.ts +70 -0
  462. package/js/src/pro/wazirx.js +70 -70
  463. package/js/src/pro/whitebit.d.ts +83 -0
  464. package/js/src/pro/whitebit.js +83 -83
  465. package/js/src/pro/woo.d.ts +106 -0
  466. package/js/src/pro/woo.js +106 -104
  467. package/js/src/pro/woofipro.d.ts +105 -0
  468. package/js/src/pro/woofipro.js +105 -103
  469. package/js/src/pro/xt.d.ts +119 -0
  470. package/js/src/pro/xt.js +119 -119
  471. package/js/src/probit.d.ts +229 -0
  472. package/js/src/probit.js +229 -229
  473. package/js/src/timex.d.ts +198 -0
  474. package/js/src/timex.js +198 -197
  475. package/js/src/tokocrypto.d.ts +214 -0
  476. package/js/src/tokocrypto.js +214 -213
  477. package/js/src/tradeogre.d.ts +92 -0
  478. package/js/src/tradeogre.js +92 -91
  479. package/js/src/upbit.d.ts +243 -0
  480. package/js/src/upbit.js +243 -242
  481. package/js/src/vertex.d.ts +258 -0
  482. package/js/src/vertex.js +258 -258
  483. package/js/src/wavesexchange.d.ts +175 -0
  484. package/js/src/wavesexchange.js +175 -172
  485. package/js/src/wazirx.d.ts +168 -0
  486. package/js/src/wazirx.js +168 -168
  487. package/js/src/whitebit.d.ts +361 -0
  488. package/js/src/whitebit.js +361 -361
  489. package/js/src/woo.d.ts +571 -0
  490. package/js/src/woo.js +571 -572
  491. package/js/src/woofipro.d.ts +392 -0
  492. package/js/src/woofipro.js +392 -391
  493. package/js/src/xt.d.ts +439 -4
  494. package/js/src/xt.js +436 -435
  495. package/js/src/yobit.d.ts +159 -0
  496. package/js/src/yobit.js +159 -158
  497. package/js/src/zaif.d.ts +103 -0
  498. package/js/src/zaif.js +103 -103
  499. package/js/src/zonda.d.ts +168 -0
  500. package/js/src/zonda.js +168 -168
  501. package/package.json +1 -1
@@ -359,15 +359,15 @@ class kucoinfutures extends kucoinfutures$1 {
359
359
  },
360
360
  });
361
361
  }
362
+ /**
363
+ * @method
364
+ * @name kucoinfutures#fetchStatus
365
+ * @description the latest known information on the availability of the exchange API
366
+ * @see https://www.kucoin.com/docs/rest/futures-trading/market-data/get-service-status
367
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
368
+ * @returns {object} a [status structure]{@link https://docs.ccxt.com/#/?id=exchange-status-structure}
369
+ */
362
370
  async fetchStatus(params = {}) {
363
- /**
364
- * @method
365
- * @name kucoinfutures#fetchStatus
366
- * @description the latest known information on the availability of the exchange API
367
- * @see https://www.kucoin.com/docs/rest/futures-trading/market-data/get-service-status
368
- * @param {object} [params] extra parameters specific to the exchange API endpoint
369
- * @returns {object} a [status structure]{@link https://docs.ccxt.com/#/?id=exchange-status-structure}
370
- */
371
371
  const response = await this.futuresPublicGetStatus(params);
372
372
  //
373
373
  // {
@@ -388,15 +388,15 @@ class kucoinfutures extends kucoinfutures$1 {
388
388
  'info': response,
389
389
  };
390
390
  }
391
+ /**
392
+ * @method
393
+ * @name kucoinfutures#fetchMarkets
394
+ * @description retrieves data on all markets for kucoinfutures
395
+ * @see https://www.kucoin.com/docs/rest/futures-trading/market-data/get-symbols-list
396
+ * @param {object} [params] extra parameters specific to the exchange api endpoint
397
+ * @returns {object[]} an array of objects representing market data
398
+ */
391
399
  async fetchMarkets(params = {}) {
392
- /**
393
- * @method
394
- * @name kucoinfutures#fetchMarkets
395
- * @description retrieves data on all markets for kucoinfutures
396
- * @see https://www.kucoin.com/docs/rest/futures-trading/market-data/get-symbols-list
397
- * @param {object} [params] extra parameters specific to the exchange api endpoint
398
- * @returns {object[]} an array of objects representing market data
399
- */
400
400
  const response = await this.futuresPublicGetContractsActive(params);
401
401
  //
402
402
  // {
@@ -553,15 +553,15 @@ class kucoinfutures extends kucoinfutures$1 {
553
553
  }
554
554
  return result;
555
555
  }
556
+ /**
557
+ * @method
558
+ * @name kucoinfutures#fetchTime
559
+ * @description fetches the current integer timestamp in milliseconds from the exchange server
560
+ * @see https://www.kucoin.com/docs/rest/futures-trading/market-data/get-server-time
561
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
562
+ * @returns {int} the current integer timestamp in milliseconds from the exchange server
563
+ */
556
564
  async fetchTime(params = {}) {
557
- /**
558
- * @method
559
- * @name kucoinfutures#fetchTime
560
- * @description fetches the current integer timestamp in milliseconds from the exchange server
561
- * @see https://www.kucoin.com/docs/rest/futures-trading/market-data/get-server-time
562
- * @param {object} [params] extra parameters specific to the exchange API endpoint
563
- * @returns {int} the current integer timestamp in milliseconds from the exchange server
564
- */
565
565
  const response = await this.futuresPublicGetTimestamp(params);
566
566
  //
567
567
  // {
@@ -571,20 +571,20 @@ class kucoinfutures extends kucoinfutures$1 {
571
571
  //
572
572
  return this.safeInteger(response, 'data');
573
573
  }
574
+ /**
575
+ * @method
576
+ * @name kucoinfutures#fetchOHLCV
577
+ * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
578
+ * @see https://www.kucoin.com/docs/rest/futures-trading/market-data/get-klines
579
+ * @param {string} symbol unified symbol of the market to fetch OHLCV data for
580
+ * @param {string} timeframe the length of time each candle represents
581
+ * @param {int} [since] timestamp in ms of the earliest candle to fetch
582
+ * @param {int} [limit] the maximum amount of candles to fetch
583
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
584
+ * @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)
585
+ * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
586
+ */
574
587
  async fetchOHLCV(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
575
- /**
576
- * @method
577
- * @name kucoinfutures#fetchOHLCV
578
- * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
579
- * @see https://www.kucoin.com/docs/rest/futures-trading/market-data/get-klines
580
- * @param {string} symbol unified symbol of the market to fetch OHLCV data for
581
- * @param {string} timeframe the length of time each candle represents
582
- * @param {int} [since] timestamp in ms of the earliest candle to fetch
583
- * @param {int} [limit] the maximum amount of candles to fetch
584
- * @param {object} [params] extra parameters specific to the exchange API endpoint
585
- * @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)
586
- * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
587
- */
588
588
  await this.loadMarkets();
589
589
  let paginate = false;
590
590
  [paginate, params] = this.handleOptionAndParams(params, 'fetchOHLCV', 'paginate');
@@ -652,16 +652,16 @@ class kucoinfutures extends kucoinfutures$1 {
652
652
  this.safeNumber(ohlcv, 5),
653
653
  ];
654
654
  }
655
+ /**
656
+ * @method
657
+ * @name kucoinfutures#fetchDepositAddress
658
+ * @description fetch the deposit address for a currency associated with this account
659
+ * @see https://www.kucoin.com/docs/rest/funding/deposit/get-deposit-address
660
+ * @param {string} code unified currency code
661
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
662
+ * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
663
+ */
655
664
  async fetchDepositAddress(code, params = {}) {
656
- /**
657
- * @method
658
- * @name kucoinfutures#fetchDepositAddress
659
- * @description fetch the deposit address for a currency associated with this account
660
- * @see https://www.kucoin.com/docs/rest/funding/deposit/get-deposit-address
661
- * @param {string} code unified currency code
662
- * @param {object} [params] extra parameters specific to the exchange API endpoint
663
- * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
664
- */
665
665
  await this.loadMarkets();
666
666
  const currency = this.currency(code);
667
667
  const currencyId = currency['id'];
@@ -692,17 +692,17 @@ class kucoinfutures extends kucoinfutures$1 {
692
692
  'tag': this.safeString(data, 'memo'),
693
693
  };
694
694
  }
695
+ /**
696
+ * @method
697
+ * @name kucoinfutures#fetchOrderBook
698
+ * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
699
+ * @see https://www.kucoin.com/docs/rest/futures-trading/market-data/get-part-order-book-level-2
700
+ * @param {string} symbol unified symbol of the market to fetch the order book for
701
+ * @param {int} [limit] the maximum amount of order book entries to return
702
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
703
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
704
+ */
695
705
  async fetchOrderBook(symbol, limit = undefined, params = {}) {
696
- /**
697
- * @method
698
- * @name kucoinfutures#fetchOrderBook
699
- * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
700
- * @see https://www.kucoin.com/docs/rest/futures-trading/market-data/get-part-order-book-level-2
701
- * @param {string} symbol unified symbol of the market to fetch the order book for
702
- * @param {int} [limit] the maximum amount of order book entries to return
703
- * @param {object} [params] extra parameters specific to the exchange API endpoint
704
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
705
- */
706
706
  await this.loadMarkets();
707
707
  const level = this.safeNumber(params, 'level');
708
708
  if (level !== 2 && level !== undefined) {
@@ -748,16 +748,16 @@ class kucoinfutures extends kucoinfutures$1 {
748
748
  orderbook['nonce'] = this.safeInteger(data, 'sequence');
749
749
  return orderbook;
750
750
  }
751
+ /**
752
+ * @method
753
+ * @name kucoinfutures#fetchTicker
754
+ * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
755
+ * @see https://www.kucoin.com/docs/rest/futures-trading/market-data/get-ticker
756
+ * @param {string} symbol unified symbol of the market to fetch the ticker for
757
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
758
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
759
+ */
751
760
  async fetchTicker(symbol, params = {}) {
752
- /**
753
- * @method
754
- * @name kucoinfutures#fetchTicker
755
- * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
756
- * @see https://www.kucoin.com/docs/rest/futures-trading/market-data/get-ticker
757
- * @param {string} symbol unified symbol of the market to fetch the ticker for
758
- * @param {object} [params] extra parameters specific to the exchange API endpoint
759
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
760
- */
761
761
  await this.loadMarkets();
762
762
  const market = this.market(symbol);
763
763
  const request = {
@@ -784,16 +784,16 @@ class kucoinfutures extends kucoinfutures$1 {
784
784
  //
785
785
  return this.parseTicker(response['data'], market);
786
786
  }
787
+ /**
788
+ * @method
789
+ * @name kucoinfutures#fetchMarkPrice
790
+ * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
791
+ * @see https://www.kucoin.com/docs/rest/futures-trading/market-data/get-current-mark-price
792
+ * @param {string} symbol unified symbol of the market to fetch the ticker for
793
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
794
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
795
+ */
787
796
  async fetchMarkPrice(symbol, params = {}) {
788
- /**
789
- * @method
790
- * @name kucoinfutures#fetchMarkPrice
791
- * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
792
- * @see https://www.kucoin.com/docs/rest/futures-trading/market-data/get-current-mark-price
793
- * @param {string} symbol unified symbol of the market to fetch the ticker for
794
- * @param {object} [params] extra parameters specific to the exchange API endpoint
795
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
796
- */
797
797
  await this.loadMarkets();
798
798
  const market = this.market(symbol);
799
799
  const request = {
@@ -803,17 +803,17 @@ class kucoinfutures extends kucoinfutures$1 {
803
803
  //
804
804
  return this.parseTicker(response['data'], market);
805
805
  }
806
+ /**
807
+ * @method
808
+ * @name kucoinfutures#fetchTickers
809
+ * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
810
+ * @see https://www.kucoin.com/docs/rest/futures-trading/market-data/get-symbols-list
811
+ * @param {string[]} [symbols] unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
812
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
813
+ * @param {string} [params.method] the method to use, futuresPublicGetAllTickers or futuresPublicGetContractsActive
814
+ * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
815
+ */
806
816
  async fetchTickers(symbols = undefined, params = {}) {
807
- /**
808
- * @method
809
- * @name kucoinfutures#fetchTickers
810
- * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
811
- * @see https://www.kucoin.com/docs/rest/futures-trading/market-data/get-symbols-list
812
- * @param {string[]} [symbols] unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
813
- * @param {object} [params] extra parameters specific to the exchange API endpoint
814
- * @param {string} [params.method] the method to use, futuresPublicGetAllTickers or futuresPublicGetContractsActive
815
- * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
816
- */
817
817
  await this.loadMarkets();
818
818
  symbols = this.marketSymbols(symbols);
819
819
  let method = undefined;
@@ -1007,32 +1007,32 @@ class kucoinfutures extends kucoinfutures$1 {
1007
1007
  'info': ticker,
1008
1008
  }, market);
1009
1009
  }
1010
+ /**
1011
+ * @method
1012
+ * @name kucoinfutures#fetchBidsAsks
1013
+ * @description fetches the bid and ask price and volume for multiple markets
1014
+ * @param {string[]} [symbols] unified symbols of the markets to fetch the bids and asks for, all markets are returned if not assigned
1015
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1016
+ * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1017
+ */
1010
1018
  async fetchBidsAsks(symbols = undefined, params = {}) {
1011
- /**
1012
- * @method
1013
- * @name kucoinfutures#fetchBidsAsks
1014
- * @description fetches the bid and ask price and volume for multiple markets
1015
- * @param {string[]} [symbols] unified symbols of the markets to fetch the bids and asks for, all markets are returned if not assigned
1016
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1017
- * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1018
- */
1019
1019
  const request = {
1020
1020
  'method': 'futuresPublicGetAllTickers',
1021
1021
  };
1022
1022
  return await this.fetchTickers(symbols, this.extend(request, params));
1023
1023
  }
1024
+ /**
1025
+ * @method
1026
+ * @name kucoinfutures#fetchFundingHistory
1027
+ * @description fetch the history of funding payments paid and received on this account
1028
+ * @see https://www.kucoin.com/docs/rest/futures-trading/funding-fees/get-funding-history
1029
+ * @param {string} symbol unified market symbol
1030
+ * @param {int} [since] the earliest time in ms to fetch funding history for
1031
+ * @param {int} [limit] the maximum number of funding history structures to retrieve
1032
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1033
+ * @returns {object} a [funding history structure]{@link https://docs.ccxt.com/#/?id=funding-history-structure}
1034
+ */
1024
1035
  async fetchFundingHistory(symbol = undefined, since = undefined, limit = undefined, params = {}) {
1025
- /**
1026
- * @method
1027
- * @name kucoinfutures#fetchFundingHistory
1028
- * @description fetch the history of funding payments paid and received on this account
1029
- * @see https://www.kucoin.com/docs/rest/futures-trading/funding-fees/get-funding-history
1030
- * @param {string} symbol unified market symbol
1031
- * @param {int} [since] the earliest time in ms to fetch funding history for
1032
- * @param {int} [limit] the maximum number of funding history structures to retrieve
1033
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1034
- * @returns {object} a [funding history structure]{@link https://docs.ccxt.com/#/?id=funding-history-structure}
1035
- */
1036
1036
  if (symbol === undefined) {
1037
1037
  throw new errors.ArgumentsRequired(this.id + ' fetchFundingHistory() requires a symbol argument');
1038
1038
  }
@@ -1093,16 +1093,16 @@ class kucoinfutures extends kucoinfutures$1 {
1093
1093
  }
1094
1094
  return fees;
1095
1095
  }
1096
+ /**
1097
+ * @method
1098
+ * @name kucoinfutures#fetchPosition
1099
+ * @see https://docs.kucoin.com/futures/#get-position-details
1100
+ * @description fetch data on an open position
1101
+ * @param {string} symbol unified market symbol of the market the position is held in
1102
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1103
+ * @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
1104
+ */
1096
1105
  async fetchPosition(symbol, params = {}) {
1097
- /**
1098
- * @method
1099
- * @name kucoinfutures#fetchPosition
1100
- * @see https://docs.kucoin.com/futures/#get-position-details
1101
- * @description fetch data on an open position
1102
- * @param {string} symbol unified market symbol of the market the position is held in
1103
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1104
- * @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
1105
- */
1106
1106
  await this.loadMarkets();
1107
1107
  const market = this.market(symbol);
1108
1108
  const request = {
@@ -1156,16 +1156,16 @@ class kucoinfutures extends kucoinfutures$1 {
1156
1156
  const data = this.safeDict(response, 'data', {});
1157
1157
  return this.parsePosition(data, market);
1158
1158
  }
1159
+ /**
1160
+ * @method
1161
+ * @name kucoinfutures#fetchPositions
1162
+ * @description fetch all open positions
1163
+ * @see https://docs.kucoin.com/futures/#get-position-list
1164
+ * @param {string[]|undefined} symbols list of unified market symbols
1165
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1166
+ * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
1167
+ */
1159
1168
  async fetchPositions(symbols = undefined, params = {}) {
1160
- /**
1161
- * @method
1162
- * @name kucoinfutures#fetchPositions
1163
- * @description fetch all open positions
1164
- * @see https://docs.kucoin.com/futures/#get-position-list
1165
- * @param {string[]|undefined} symbols list of unified market symbols
1166
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1167
- * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
1168
- */
1169
1169
  await this.loadMarkets();
1170
1170
  const response = await this.futuresPrivateGetPositions(params);
1171
1171
  //
@@ -1217,18 +1217,20 @@ class kucoinfutures extends kucoinfutures$1 {
1217
1217
  const data = this.safeList(response, 'data');
1218
1218
  return this.parsePositions(data, symbols);
1219
1219
  }
1220
+ /**
1221
+ * @method
1222
+ * @name kucoinfutures#fetchPositionsHistory
1223
+ * @description fetches historical positions
1224
+ * @see https://www.kucoin.com/docs/rest/futures-trading/positions/get-positions-history
1225
+ * @param {string[]} [symbols] list of unified market symbols
1226
+ * @param since
1227
+ * @param limit
1228
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1229
+ * @param {int} [params.until] closing end time
1230
+ * @param {int} [params.pageId] page id
1231
+ * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
1232
+ */
1220
1233
  async fetchPositionsHistory(symbols = undefined, since = undefined, limit = undefined, params = {}) {
1221
- /**
1222
- * @method
1223
- * @name kucoinfutures#fetchPositionsHistory
1224
- * @description fetches historical positions
1225
- * @see https://www.kucoin.com/docs/rest/futures-trading/positions/get-positions-history
1226
- * @param {string[]} [symbols] list of unified market symbols
1227
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1228
- * @param {int} [params.until] closing end time
1229
- * @param {int} [params.pageId] page id
1230
- * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
1231
- */
1232
1234
  await this.loadMarkets();
1233
1235
  if (limit === undefined) {
1234
1236
  limit = 200;
@@ -1420,38 +1422,38 @@ class kucoinfutures extends kucoinfutures$1 {
1420
1422
  'takeProfitPrice': undefined,
1421
1423
  });
1422
1424
  }
1425
+ /**
1426
+ * @method
1427
+ * @name kucoinfutures#createOrder
1428
+ * @description Create an order on the exchange
1429
+ * @see https://docs.kucoin.com/futures/#place-an-order
1430
+ * @see https://www.kucoin.com/docs/rest/futures-trading/orders/place-take-profit-and-stop-loss-order#http-request
1431
+ * @param {string} symbol Unified CCXT market symbol
1432
+ * @param {string} type 'limit' or 'market'
1433
+ * @param {string} side 'buy' or 'sell'
1434
+ * @param {float} amount the amount of currency to trade
1435
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
1436
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1437
+ * @param {object} [params.takeProfit] *takeProfit object in params* containing the triggerPrice at which the attached take profit order will be triggered
1438
+ * @param {object} [params.stopLoss] *stopLoss object in params* containing the triggerPrice at which the attached stop loss order will be triggered
1439
+ * @param {float} [params.triggerPrice] The price a trigger order is triggered at
1440
+ * @param {float} [params.stopLossPrice] price to trigger stop-loss orders
1441
+ * @param {float} [params.takeProfitPrice] price to trigger take-profit orders
1442
+ * @param {bool} [params.reduceOnly] A mark to reduce the position size only. Set to false by default. Need to set the position size when reduceOnly is true.
1443
+ * @param {string} [params.timeInForce] GTC, GTT, IOC, or FOK, default is GTC, limit orders only
1444
+ * @param {string} [params.postOnly] Post only flag, invalid when timeInForce is IOC or FOK
1445
+ * ----------------- Exchange Specific Parameters -----------------
1446
+ * @param {float} [params.leverage] Leverage size of the order
1447
+ * @param {string} [params.clientOid] client order id, defaults to uuid if not passed
1448
+ * @param {string} [params.remark] remark for the order, length cannot exceed 100 utf8 characters
1449
+ * @param {string} [params.stop] 'up' or 'down', the direction the stopPrice is triggered from, requires stopPrice. down: Triggers when the price reaches or goes below the stopPrice. up: Triggers when the price reaches or goes above the stopPrice.
1450
+ * @param {string} [params.stopPriceType] TP, IP or MP, defaults to MP: Mark Price
1451
+ * @param {bool} [params.closeOrder] set to true to close position
1452
+ * @param {bool} [params.test] set to true to use the test order endpoint (does not submit order, use to validate params)
1453
+ * @param {bool} [params.forceHold] A mark to forcely hold the funds for an order, even though it's an order to reduce the position size. This helps the order stay on the order book and not get canceled when the position size changes. Set to false by default.
1454
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1455
+ */
1423
1456
  async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
1424
- /**
1425
- * @method
1426
- * @name kucoinfutures#createOrder
1427
- * @description Create an order on the exchange
1428
- * @see https://docs.kucoin.com/futures/#place-an-order
1429
- * @see https://www.kucoin.com/docs/rest/futures-trading/orders/place-take-profit-and-stop-loss-order#http-request
1430
- * @param {string} symbol Unified CCXT market symbol
1431
- * @param {string} type 'limit' or 'market'
1432
- * @param {string} side 'buy' or 'sell'
1433
- * @param {float} amount the amount of currency to trade
1434
- * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
1435
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1436
- * @param {object} [params.takeProfit] *takeProfit object in params* containing the triggerPrice at which the attached take profit order will be triggered
1437
- * @param {object} [params.stopLoss] *stopLoss object in params* containing the triggerPrice at which the attached stop loss order will be triggered
1438
- * @param {float} [params.triggerPrice] The price a trigger order is triggered at
1439
- * @param {float} [params.stopLossPrice] price to trigger stop-loss orders
1440
- * @param {float} [params.takeProfitPrice] price to trigger take-profit orders
1441
- * @param {bool} [params.reduceOnly] A mark to reduce the position size only. Set to false by default. Need to set the position size when reduceOnly is true.
1442
- * @param {string} [params.timeInForce] GTC, GTT, IOC, or FOK, default is GTC, limit orders only
1443
- * @param {string} [params.postOnly] Post only flag, invalid when timeInForce is IOC or FOK
1444
- * ----------------- Exchange Specific Parameters -----------------
1445
- * @param {float} [params.leverage] Leverage size of the order
1446
- * @param {string} [params.clientOid] client order id, defaults to uuid if not passed
1447
- * @param {string} [params.remark] remark for the order, length cannot exceed 100 utf8 characters
1448
- * @param {string} [params.stop] 'up' or 'down', the direction the stopPrice is triggered from, requires stopPrice. down: Triggers when the price reaches or goes below the stopPrice. up: Triggers when the price reaches or goes above the stopPrice.
1449
- * @param {string} [params.stopPriceType] TP, IP or MP, defaults to MP: Mark Price
1450
- * @param {bool} [params.closeOrder] set to true to close position
1451
- * @param {bool} [params.test] set to true to use the test order endpoint (does not submit order, use to validate params)
1452
- * @param {bool} [params.forceHold] A mark to forcely hold the funds for an order, even though it's an order to reduce the position size. This helps the order stay on the order book and not get canceled when the position size changes. Set to false by default.
1453
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1454
- */
1455
1457
  await this.loadMarkets();
1456
1458
  const market = this.market(symbol);
1457
1459
  const testOrder = this.safeBool(params, 'test', false);
@@ -1481,16 +1483,16 @@ class kucoinfutures extends kucoinfutures$1 {
1481
1483
  const data = this.safeDict(response, 'data', {});
1482
1484
  return this.parseOrder(data, market);
1483
1485
  }
1486
+ /**
1487
+ * @method
1488
+ * @name kucoinfutures#createOrders
1489
+ * @description create a list of trade orders
1490
+ * @see https://www.kucoin.com/docs/rest/futures-trading/orders/place-multiple-orders
1491
+ * @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
1492
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1493
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1494
+ */
1484
1495
  async createOrders(orders, params = {}) {
1485
- /**
1486
- * @method
1487
- * @name kucoinfutures#createOrders
1488
- * @description create a list of trade orders
1489
- * @see https://www.kucoin.com/docs/rest/futures-trading/orders/place-multiple-orders
1490
- * @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
1491
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1492
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1493
- */
1494
1496
  await this.loadMarkets();
1495
1497
  const ordersRequests = [];
1496
1498
  for (let i = 0; i < orders.length; i++) {
@@ -1622,18 +1624,18 @@ class kucoinfutures extends kucoinfutures$1 {
1622
1624
  params = this.omit(params, ['timeInForce', 'stopPrice', 'triggerPrice', 'stopLossPrice', 'takeProfitPrice']); // Time in force only valid for limit orders, exchange error when gtc for market orders
1623
1625
  return this.extend(request, params);
1624
1626
  }
1627
+ /**
1628
+ * @method
1629
+ * @name kucoinfutures#cancelOrder
1630
+ * @description cancels an open order
1631
+ * @see https://www.kucoin.com/docs/rest/futures-trading/orders/cancel-futures-order-by-orderid
1632
+ * @param {string} id order id
1633
+ * @param {string} symbol unified symbol of the market the order was made in
1634
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1635
+ * @param {string} [params.clientOrderId] cancel order by client order id
1636
+ * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1637
+ */
1625
1638
  async cancelOrder(id, symbol = undefined, params = {}) {
1626
- /**
1627
- * @method
1628
- * @name kucoinfutures#cancelOrder
1629
- * @description cancels an open order
1630
- * @see https://www.kucoin.com/docs/rest/futures-trading/orders/cancel-futures-order-by-orderid
1631
- * @param {string} id order id
1632
- * @param {string} symbol unified symbol of the market the order was made in
1633
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1634
- * @param {string} [params.clientOrderId] cancel order by client order id
1635
- * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1636
- */
1637
1639
  await this.loadMarkets();
1638
1640
  const clientOrderId = this.safeString2(params, 'clientOid', 'clientOrderId');
1639
1641
  params = this.omit(params, ['clientOrderId']);
@@ -1664,18 +1666,18 @@ class kucoinfutures extends kucoinfutures$1 {
1664
1666
  //
1665
1667
  return this.safeValue(response, 'data');
1666
1668
  }
1669
+ /**
1670
+ * @method
1671
+ * @name kucoinfutures#cancelOrders
1672
+ * @description cancel multiple orders
1673
+ * @see https://www.kucoin.com/docs/rest/futures-trading/orders/batch-cancel-orders
1674
+ * @param {string[]} ids order ids
1675
+ * @param {string} symbol unified symbol of the market the order was made in
1676
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1677
+ * @param {string[]} [params.clientOrderIds] client order ids
1678
+ * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
1679
+ */
1667
1680
  async cancelOrders(ids, symbol = undefined, params = {}) {
1668
- /**
1669
- * @method
1670
- * @name kucoinfutures#cancelOrders
1671
- * @description cancel multiple orders
1672
- * @see https://www.kucoin.com/docs/rest/futures-trading/orders/batch-cancel-orders
1673
- * @param {string[]} ids order ids
1674
- * @param {string} symbol unified symbol of the market the order was made in
1675
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1676
- * @param {string[]} [params.clientOrderIds] client order ids
1677
- * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
1678
- */
1679
1681
  await this.loadMarkets();
1680
1682
  let market = undefined;
1681
1683
  if (symbol !== undefined) {
@@ -1725,18 +1727,18 @@ class kucoinfutures extends kucoinfutures$1 {
1725
1727
  const orders = this.safeList(response, 'data', []);
1726
1728
  return this.parseOrders(orders, market);
1727
1729
  }
1730
+ /**
1731
+ * @method
1732
+ * @name kucoinfutures#cancelAllOrders
1733
+ * @description cancel all open orders
1734
+ * @see https://www.kucoin.com/docs/rest/futures-trading/orders/cancel-multiple-futures-limit-orders
1735
+ * @see https://www.kucoin.com/docs/rest/futures-trading/orders/cancel-multiple-futures-stop-orders
1736
+ * @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
1737
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1738
+ * @param {object} [params.trigger] When true, all the trigger orders will be cancelled
1739
+ * @returns Response from the exchange
1740
+ */
1728
1741
  async cancelAllOrders(symbol = undefined, params = {}) {
1729
- /**
1730
- * @method
1731
- * @name kucoinfutures#cancelAllOrders
1732
- * @description cancel all open orders
1733
- * @see https://www.kucoin.com/docs/rest/futures-trading/orders/cancel-multiple-futures-limit-orders
1734
- * @see https://www.kucoin.com/docs/rest/futures-trading/orders/cancel-multiple-futures-stop-orders
1735
- * @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
1736
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1737
- * @param {object} [params.trigger] When true, all the trigger orders will be cancelled
1738
- * @returns Response from the exchange
1739
- */
1740
1742
  await this.loadMarkets();
1741
1743
  const request = {};
1742
1744
  if (symbol !== undefined) {
@@ -1763,17 +1765,17 @@ class kucoinfutures extends kucoinfutures$1 {
1763
1765
  //
1764
1766
  return this.safeValue(response, 'data');
1765
1767
  }
1768
+ /**
1769
+ * @method
1770
+ * @name kucoinfutures#addMargin
1771
+ * @description add margin
1772
+ * @see https://www.kucoin.com/docs/rest/futures-trading/positions/add-margin-manually
1773
+ * @param {string} symbol unified market symbol
1774
+ * @param {float} amount amount of margin to add
1775
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1776
+ * @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=add-margin-structure}
1777
+ */
1766
1778
  async addMargin(symbol, amount, params = {}) {
1767
- /**
1768
- * @method
1769
- * @name kucoinfutures#addMargin
1770
- * @description add margin
1771
- * @see https://www.kucoin.com/docs/rest/futures-trading/positions/add-margin-manually
1772
- * @param {string} symbol unified market symbol
1773
- * @param {float} amount amount of margin to add
1774
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1775
- * @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=add-margin-structure}
1776
- */
1777
1779
  await this.loadMarkets();
1778
1780
  const market = this.market(symbol);
1779
1781
  const uuid = this.uuid();
@@ -1904,25 +1906,25 @@ class kucoinfutures extends kucoinfutures$1 {
1904
1906
  'datetime': this.iso8601(timestamp),
1905
1907
  };
1906
1908
  }
1909
+ /**
1910
+ * @method
1911
+ * @name kucoinfutures#fetchOrdersByStatus
1912
+ * @description fetches a list of orders placed on the exchange
1913
+ * @see https://docs.kucoin.com/futures/#get-order-list
1914
+ * @see https://docs.kucoin.com/futures/#get-untriggered-stop-order-list
1915
+ * @param {string} status 'active' or 'closed', only 'active' is valid for stop orders
1916
+ * @param {string} symbol unified symbol for the market to retrieve orders from
1917
+ * @param {int} [since] timestamp in ms of the earliest order to retrieve
1918
+ * @param {int} [limit] The maximum number of orders to retrieve
1919
+ * @param {object} [params] exchange specific parameters
1920
+ * @param {bool} [params.trigger] set to true to retrieve untriggered stop orders
1921
+ * @param {int} [params.until] End time in ms
1922
+ * @param {string} [params.side] buy or sell
1923
+ * @param {string} [params.type] limit or market
1924
+ * @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)
1925
+ * @returns An [array of order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
1926
+ */
1907
1927
  async fetchOrdersByStatus(status, symbol = undefined, since = undefined, limit = undefined, params = {}) {
1908
- /**
1909
- * @method
1910
- * @name kucoinfutures#fetchOrdersByStatus
1911
- * @description fetches a list of orders placed on the exchange
1912
- * @see https://docs.kucoin.com/futures/#get-order-list
1913
- * @see https://docs.kucoin.com/futures/#get-untriggered-stop-order-list
1914
- * @param {string} status 'active' or 'closed', only 'active' is valid for stop orders
1915
- * @param {string} symbol unified symbol for the market to retrieve orders from
1916
- * @param {int} [since] timestamp in ms of the earliest order to retrieve
1917
- * @param {int} [limit] The maximum number of orders to retrieve
1918
- * @param {object} [params] exchange specific parameters
1919
- * @param {bool} [params.trigger] set to true to retrieve untriggered stop orders
1920
- * @param {int} [params.until] End time in ms
1921
- * @param {string} [params.side] buy or sell
1922
- * @param {string} [params.type] limit or market
1923
- * @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)
1924
- * @returns An [array of order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
1925
- */
1926
1928
  await this.loadMarkets();
1927
1929
  let paginate = false;
1928
1930
  [paginate, params] = this.handleOptionAndParams(params, 'fetchOrdersByStatus', 'paginate');
@@ -2018,22 +2020,22 @@ class kucoinfutures extends kucoinfutures$1 {
2018
2020
  const orders = this.safeList(responseData, 'items', []);
2019
2021
  return this.parseOrders(orders, market, since, limit);
2020
2022
  }
2023
+ /**
2024
+ * @method
2025
+ * @name kucoinfutures#fetchClosedOrders
2026
+ * @description fetches information on multiple closed orders made by the user
2027
+ * @see https://docs.kucoin.com/futures/#get-order-list
2028
+ * @param {string} symbol unified market symbol of the market orders were made in
2029
+ * @param {int} [since] the earliest time in ms to fetch orders for
2030
+ * @param {int} [limit] the maximum number of order structures to retrieve
2031
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2032
+ * @param {int} [params.until] end time in ms
2033
+ * @param {string} [params.side] buy or sell
2034
+ * @param {string} [params.type] limit, or market
2035
+ * @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)
2036
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
2037
+ */
2021
2038
  async fetchClosedOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
2022
- /**
2023
- * @method
2024
- * @name kucoinfutures#fetchClosedOrders
2025
- * @description fetches information on multiple closed orders made by the user
2026
- * @see https://docs.kucoin.com/futures/#get-order-list
2027
- * @param {string} symbol unified market symbol of the market orders were made in
2028
- * @param {int} [since] the earliest time in ms to fetch orders for
2029
- * @param {int} [limit] the maximum number of order structures to retrieve
2030
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2031
- * @param {int} [params.until] end time in ms
2032
- * @param {string} [params.side] buy or sell
2033
- * @param {string} [params.type] limit, or market
2034
- * @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)
2035
- * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
2036
- */
2037
2039
  await this.loadMarkets();
2038
2040
  let paginate = false;
2039
2041
  [paginate, params] = this.handleOptionAndParams(params, 'fetchClosedOrders', 'paginate');
@@ -2042,24 +2044,24 @@ class kucoinfutures extends kucoinfutures$1 {
2042
2044
  }
2043
2045
  return await this.fetchOrdersByStatus('done', symbol, since, limit, params);
2044
2046
  }
2047
+ /**
2048
+ * @method
2049
+ * @name kucoinfutures#fetchOpenOrders
2050
+ * @description fetches information on multiple open orders made by the user
2051
+ * @see https://docs.kucoin.com/futures/#get-order-list
2052
+ * @see https://docs.kucoin.com/futures/#get-untriggered-stop-order-list
2053
+ * @param {string} symbol unified market symbol of the market orders were made in
2054
+ * @param {int} [since] the earliest time in ms to fetch orders for
2055
+ * @param {int} [limit] the maximum number of order structures to retrieve
2056
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2057
+ * @param {int} [params.until] end time in ms
2058
+ * @param {string} [params.side] buy or sell
2059
+ * @param {string} [params.type] limit, or market
2060
+ * @param {boolean} [params.trigger] set to true to retrieve untriggered stop orders
2061
+ * @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)
2062
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
2063
+ */
2045
2064
  async fetchOpenOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
2046
- /**
2047
- * @method
2048
- * @name kucoinfutures#fetchOpenOrders
2049
- * @description fetches information on multiple open orders made by the user
2050
- * @see https://docs.kucoin.com/futures/#get-order-list
2051
- * @see https://docs.kucoin.com/futures/#get-untriggered-stop-order-list
2052
- * @param {string} symbol unified market symbol of the market orders were made in
2053
- * @param {int} [since] the earliest time in ms to fetch orders for
2054
- * @param {int} [limit] the maximum number of order structures to retrieve
2055
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2056
- * @param {int} [params.until] end time in ms
2057
- * @param {string} [params.side] buy or sell
2058
- * @param {string} [params.type] limit, or market
2059
- * @param {boolean} [params.trigger] set to true to retrieve untriggered stop orders
2060
- * @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)
2061
- * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
2062
- */
2063
2065
  await this.loadMarkets();
2064
2066
  let paginate = false;
2065
2067
  [paginate, params] = this.handleOptionAndParams(params, 'fetchOpenOrders', 'paginate');
@@ -2068,16 +2070,17 @@ class kucoinfutures extends kucoinfutures$1 {
2068
2070
  }
2069
2071
  return await this.fetchOrdersByStatus('open', symbol, since, limit, params);
2070
2072
  }
2073
+ /**
2074
+ * @method
2075
+ * @name kucoinfutures#fetchOrder
2076
+ * @description fetches information on an order made by the user
2077
+ * @see https://docs.kucoin.com/futures/#get-details-of-a-single-order
2078
+ * @param {string} id order id
2079
+ * @param {string} symbol unified symbol of the market the order was made in
2080
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2081
+ * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2082
+ */
2071
2083
  async fetchOrder(id = undefined, symbol = undefined, params = {}) {
2072
- /**
2073
- * @method
2074
- * @name kucoinfutures#fetchOrder
2075
- * @description fetches information on an order made by the user
2076
- * @see https://docs.kucoin.com/futures/#get-details-of-a-single-order
2077
- * @param {string} symbol unified symbol of the market the order was made in
2078
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2079
- * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2080
- */
2081
2084
  await this.loadMarkets();
2082
2085
  const request = {};
2083
2086
  let response = undefined;
@@ -2277,16 +2280,16 @@ class kucoinfutures extends kucoinfutures$1 {
2277
2280
  'trades': undefined,
2278
2281
  }, market);
2279
2282
  }
2283
+ /**
2284
+ * @method
2285
+ * @name kucoinfutures#fetchFundingRate
2286
+ * @description fetch the current funding rate
2287
+ * @see https://www.kucoin.com/docs/rest/futures-trading/funding-fees/get-current-funding-rate
2288
+ * @param {string} symbol unified market symbol
2289
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2290
+ * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
2291
+ */
2280
2292
  async fetchFundingRate(symbol, params = {}) {
2281
- /**
2282
- * @method
2283
- * @name kucoinfutures#fetchFundingRate
2284
- * @description fetch the current funding rate
2285
- * @see https://www.kucoin.com/docs/rest/futures-trading/funding-fees/get-current-funding-rate
2286
- * @param {string} symbol unified market symbol
2287
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2288
- * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
2289
- */
2290
2293
  await this.loadMarkets();
2291
2294
  const market = this.market(symbol);
2292
2295
  const request = {
@@ -2309,16 +2312,16 @@ class kucoinfutures extends kucoinfutures$1 {
2309
2312
  // the website displayes the previous funding rate as "funding rate"
2310
2313
  return this.parseFundingRate(data, market);
2311
2314
  }
2315
+ /**
2316
+ * @method
2317
+ * @name kucoinfutures#fetchFundingInterval
2318
+ * @description fetch the current funding rate interval
2319
+ * @see https://www.kucoin.com/docs/rest/futures-trading/funding-fees/get-current-funding-rate
2320
+ * @param {string} symbol unified market symbol
2321
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2322
+ * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
2323
+ */
2312
2324
  async fetchFundingInterval(symbol, params = {}) {
2313
- /**
2314
- * @method
2315
- * @name kucoinfutures#fetchFundingInterval
2316
- * @description fetch the current funding rate interval
2317
- * @see https://www.kucoin.com/docs/rest/futures-trading/funding-fees/get-current-funding-rate
2318
- * @param {string} symbol unified market symbol
2319
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2320
- * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
2321
- */
2322
2325
  return await this.fetchFundingRate(symbol, params);
2323
2326
  }
2324
2327
  parseFundingRate(data, market = undefined) {
@@ -2379,15 +2382,15 @@ class kucoinfutures extends kucoinfutures$1 {
2379
2382
  result[code] = account;
2380
2383
  return this.safeBalance(result);
2381
2384
  }
2385
+ /**
2386
+ * @method
2387
+ * @name kucoinfutures#fetchBalance
2388
+ * @description query for balance and get the amount of funds available for trading or funds locked in orders
2389
+ * @see https://www.kucoin.com/docs/rest/funding/funding-overview/get-account-detail-futures
2390
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2391
+ * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
2392
+ */
2382
2393
  async fetchBalance(params = {}) {
2383
- /**
2384
- * @method
2385
- * @name kucoinfutures#fetchBalance
2386
- * @description query for balance and get the amount of funds available for trading or funds locked in orders
2387
- * @see https://www.kucoin.com/docs/rest/funding/funding-overview/get-account-detail-futures
2388
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2389
- * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
2390
- */
2391
2394
  await this.loadMarkets();
2392
2395
  // only fetches one balance at a time
2393
2396
  let defaultCode = this.safeString(this.options, 'code');
@@ -2416,18 +2419,18 @@ class kucoinfutures extends kucoinfutures$1 {
2416
2419
  //
2417
2420
  return this.parseBalance(response);
2418
2421
  }
2422
+ /**
2423
+ * @method
2424
+ * @name kucoinfutures#transfer
2425
+ * @description transfer currency internally between wallets on the same account
2426
+ * @param {string} code unified currency code
2427
+ * @param {float} amount amount to transfer
2428
+ * @param {string} fromAccount account to transfer from
2429
+ * @param {string} toAccount account to transfer to
2430
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2431
+ * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
2432
+ */
2419
2433
  async transfer(code, amount, fromAccount, toAccount, params = {}) {
2420
- /**
2421
- * @method
2422
- * @name kucoinfutures#transfer
2423
- * @description transfer currency internally between wallets on the same account
2424
- * @param {string} code unified currency code
2425
- * @param {float} amount amount to transfer
2426
- * @param {string} fromAccount account to transfer from
2427
- * @param {string} toAccount account to transfer to
2428
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2429
- * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
2430
- */
2431
2434
  if ((toAccount !== 'main' && toAccount !== 'funding') || (fromAccount !== 'futures' && fromAccount !== 'future' && fromAccount !== 'contract')) {
2432
2435
  throw new errors.BadRequest(this.id + ' transfer() only supports transfers from contract(future) account to main(funding) account');
2433
2436
  }
@@ -2482,20 +2485,20 @@ class kucoinfutures extends kucoinfutures$1 {
2482
2485
  };
2483
2486
  return this.safeString(statuses, status, status);
2484
2487
  }
2488
+ /**
2489
+ * @method
2490
+ * @name kucoinfutures#fetchMyTrades
2491
+ * @see https://docs.kucoin.com/futures/#get-fills
2492
+ * @description fetch all trades made by the user
2493
+ * @param {string} symbol unified market symbol
2494
+ * @param {int} [since] the earliest time in ms to fetch trades for
2495
+ * @param {int} [limit] the maximum number of trades structures to retrieve
2496
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2497
+ * @param {int} [params.until] End time in ms
2498
+ * @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)
2499
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
2500
+ */
2485
2501
  async fetchMyTrades(symbol = undefined, since = undefined, limit = undefined, params = {}) {
2486
- /**
2487
- * @method
2488
- * @name kucoinfutures#fetchMyTrades
2489
- * @see https://docs.kucoin.com/futures/#get-fills
2490
- * @description fetch all trades made by the user
2491
- * @param {string} symbol unified market symbol
2492
- * @param {int} [since] the earliest time in ms to fetch trades for
2493
- * @param {int} [limit] the maximum number of trades structures to retrieve
2494
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2495
- * @param {int} [params.until] End time in ms
2496
- * @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)
2497
- * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
2498
- */
2499
2502
  await this.loadMarkets();
2500
2503
  let paginate = false;
2501
2504
  [paginate, params] = this.handleOptionAndParams(params, 'fetchMyTrades', 'paginate');
@@ -2557,18 +2560,18 @@ class kucoinfutures extends kucoinfutures$1 {
2557
2560
  const trades = this.safeList(data, 'items', []);
2558
2561
  return this.parseTrades(trades, market, since, limit);
2559
2562
  }
2563
+ /**
2564
+ * @method
2565
+ * @name kucoinfutures#fetchTrades
2566
+ * @description get the list of most recent trades for a particular symbol
2567
+ * @see https://www.kucoin.com/docs/rest/futures-trading/market-data/get-transaction-history
2568
+ * @param {string} symbol unified symbol of the market to fetch trades for
2569
+ * @param {int} [since] timestamp in ms of the earliest trade to fetch
2570
+ * @param {int} [limit] the maximum amount of trades to fetch
2571
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2572
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
2573
+ */
2560
2574
  async fetchTrades(symbol, since = undefined, limit = undefined, params = {}) {
2561
- /**
2562
- * @method
2563
- * @name kucoinfutures#fetchTrades
2564
- * @description get the list of most recent trades for a particular symbol
2565
- * @see https://www.kucoin.com/docs/rest/futures-trading/market-data/get-transaction-history
2566
- * @param {string} symbol unified symbol of the market to fetch trades for
2567
- * @param {int} [since] timestamp in ms of the earliest trade to fetch
2568
- * @param {int} [limit] the maximum amount of trades to fetch
2569
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2570
- * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
2571
- */
2572
2575
  await this.loadMarkets();
2573
2576
  const market = this.market(symbol);
2574
2577
  const request = {
@@ -2730,17 +2733,17 @@ class kucoinfutures extends kucoinfutures$1 {
2730
2733
  'fee': fee,
2731
2734
  }, market);
2732
2735
  }
2736
+ /**
2737
+ * @method
2738
+ * @name kucoinfutures#fetchDeposits
2739
+ * @description fetch all deposits made to an account
2740
+ * @param {string} code unified currency code
2741
+ * @param {int} [since] the earliest time in ms to fetch deposits for
2742
+ * @param {int} [limit] the maximum number of deposits structures to retrieve
2743
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2744
+ * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
2745
+ */
2733
2746
  async fetchDeposits(code = undefined, since = undefined, limit = undefined, params = {}) {
2734
- /**
2735
- * @method
2736
- * @name kucoinfutures#fetchDeposits
2737
- * @description fetch all deposits made to an account
2738
- * @param {string} code unified currency code
2739
- * @param {int} [since] the earliest time in ms to fetch deposits for
2740
- * @param {int} [limit] the maximum number of deposits structures to retrieve
2741
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2742
- * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
2743
- */
2744
2747
  await this.loadMarkets();
2745
2748
  const request = {};
2746
2749
  let currency = undefined;
@@ -2785,17 +2788,17 @@ class kucoinfutures extends kucoinfutures$1 {
2785
2788
  const responseData = response['data']['items'];
2786
2789
  return this.parseTransactions(responseData, currency, since, limit, { 'type': 'deposit' });
2787
2790
  }
2791
+ /**
2792
+ * @method
2793
+ * @name kucoinfutures#fetchWithdrawals
2794
+ * @description fetch all withdrawals made from an account
2795
+ * @param {string} code unified currency code
2796
+ * @param {int} [since] the earliest time in ms to fetch withdrawals for
2797
+ * @param {int} [limit] the maximum number of withdrawals structures to retrieve
2798
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2799
+ * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
2800
+ */
2788
2801
  async fetchWithdrawals(code = undefined, since = undefined, limit = undefined, params = {}) {
2789
- /**
2790
- * @method
2791
- * @name kucoinfutures#fetchWithdrawals
2792
- * @description fetch all withdrawals made from an account
2793
- * @param {string} code unified currency code
2794
- * @param {int} [since] the earliest time in ms to fetch withdrawals for
2795
- * @param {int} [limit] the maximum number of withdrawals structures to retrieve
2796
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2797
- * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
2798
- */
2799
2802
  await this.loadMarkets();
2800
2803
  const request = {};
2801
2804
  let currency = undefined;
@@ -2840,16 +2843,16 @@ class kucoinfutures extends kucoinfutures$1 {
2840
2843
  const responseData = response['data']['items'];
2841
2844
  return this.parseTransactions(responseData, currency, since, limit, { 'type': 'withdrawal' });
2842
2845
  }
2846
+ /**
2847
+ * @method
2848
+ * @name kucoinfutures#fetchMarketLeverageTiers
2849
+ * @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes for a single market
2850
+ * @see https://www.kucoin.com/docs/rest/futures-trading/risk-limit/get-futures-risk-limit-level
2851
+ * @param {string} symbol unified market symbol
2852
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2853
+ * @returns {object} a [leverage tiers structure]{@link https://docs.ccxt.com/#/?id=leverage-tiers-structure}
2854
+ */
2843
2855
  async fetchMarketLeverageTiers(symbol, params = {}) {
2844
- /**
2845
- * @method
2846
- * @name kucoinfutures#fetchMarketLeverageTiers
2847
- * @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes for a single market
2848
- * @see https://www.kucoin.com/docs/rest/futures-trading/risk-limit/get-futures-risk-limit-level
2849
- * @param {string} symbol unified market symbol
2850
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2851
- * @returns {object} a [leverage tiers structure]{@link https://docs.ccxt.com/#/?id=leverage-tiers-structure}
2852
- */
2853
2856
  await this.loadMarkets();
2854
2857
  const market = this.market(symbol);
2855
2858
  if (!market['contract']) {
@@ -2900,8 +2903,10 @@ class kucoinfutures extends kucoinfutures$1 {
2900
2903
  const tiers = [];
2901
2904
  for (let i = 0; i < info.length; i++) {
2902
2905
  const tier = info[i];
2906
+ const marketId = this.safeString(tier, 'symbol');
2903
2907
  tiers.push({
2904
2908
  'tier': this.safeNumber(tier, 'level'),
2909
+ 'symbol': this.safeSymbol(marketId, market, undefined, 'contract'),
2905
2910
  'currency': market['base'],
2906
2911
  'minNotional': this.safeNumber(tier, 'minRiskLimit'),
2907
2912
  'maxNotional': this.safeNumber(tier, 'maxRiskLimit'),
@@ -2912,19 +2917,19 @@ class kucoinfutures extends kucoinfutures$1 {
2912
2917
  }
2913
2918
  return tiers;
2914
2919
  }
2920
+ /**
2921
+ * @method
2922
+ * @name kucoinfutures#fetchFundingRateHistory
2923
+ * @see https://www.kucoin.com/docs/rest/futures-trading/funding-fees/get-public-funding-history#request-url
2924
+ * @description fetches historical funding rate prices
2925
+ * @param {string} symbol unified symbol of the market to fetch the funding rate history for
2926
+ * @param {int} [since] not used by kucuoinfutures
2927
+ * @param {int} [limit] the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure} to fetch
2928
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2929
+ * @param {int} [params.until] end time in ms
2930
+ * @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
2931
+ */
2915
2932
  async fetchFundingRateHistory(symbol = undefined, since = undefined, limit = undefined, params = {}) {
2916
- /**
2917
- * @method
2918
- * @name kucoinfutures#fetchFundingRateHistory
2919
- * @see https://www.kucoin.com/docs/rest/futures-trading/funding-fees/get-public-funding-history#request-url
2920
- * @description fetches historical funding rate prices
2921
- * @param {string} symbol unified symbol of the market to fetch the funding rate history for
2922
- * @param {int} [since] not used by kucuoinfutures
2923
- * @param {int} [limit] the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure} to fetch
2924
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2925
- * @param {int} [params.until] end time in ms
2926
- * @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
2927
- */
2928
2933
  if (symbol === undefined) {
2929
2934
  throw new errors.ArgumentsRequired(this.id + ' fetchFundingRateHistory() requires a symbol argument');
2930
2935
  }
@@ -2976,18 +2981,18 @@ class kucoinfutures extends kucoinfutures$1 {
2976
2981
  'datetime': this.iso8601(timestamp),
2977
2982
  };
2978
2983
  }
2984
+ /**
2985
+ * @method
2986
+ * @name kucoinfutures#closePosition
2987
+ * @description closes open positions for a market
2988
+ * @see https://www.kucoin.com/docs/rest/futures-trading/orders/place-order
2989
+ * @param {string} symbol Unified CCXT market symbol
2990
+ * @param {string} side not used by kucoinfutures closePositions
2991
+ * @param {object} [params] extra parameters specific to the okx api endpoint
2992
+ * @param {string} [params.clientOrderId] client order id of the order
2993
+ * @returns {object[]} [A list of position structures]{@link https://docs.ccxt.com/#/?id=position-structure}
2994
+ */
2979
2995
  async closePosition(symbol, side = undefined, params = {}) {
2980
- /**
2981
- * @method
2982
- * @name kucoinfutures#closePosition
2983
- * @description closes open positions for a market
2984
- * @see https://www.kucoin.com/docs/rest/futures-trading/orders/place-order
2985
- * @param {string} symbol Unified CCXT market symbol
2986
- * @param {string} side not used by kucoinfutures closePositions
2987
- * @param {object} [params] extra parameters specific to the okx api endpoint
2988
- * @param {string} [params.clientOrderId] client order id of the order
2989
- * @returns {object[]} [A list of position structures]{@link https://docs.ccxt.com/#/?id=position-structure}
2990
- */
2991
2996
  await this.loadMarkets();
2992
2997
  const market = this.market(symbol);
2993
2998
  let clientOrderId = this.safeString(params, 'clientOrderId');
@@ -3011,16 +3016,16 @@ class kucoinfutures extends kucoinfutures$1 {
3011
3016
  }
3012
3017
  return this.parseOrder(response, market);
3013
3018
  }
3019
+ /**
3020
+ * @method
3021
+ * @name kucoinfutures#fetchTradingFee
3022
+ * @description fetch the trading fees for a market
3023
+ * @see https://www.kucoin.com/docs/rest/funding/trade-fee/trading-pair-actual-fee-futures
3024
+ * @param {string} symbol unified market symbol
3025
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3026
+ * @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
3027
+ */
3014
3028
  async fetchTradingFee(symbol, params = {}) {
3015
- /**
3016
- * @method
3017
- * @name kucoinfutures#fetchTradingFee
3018
- * @description fetch the trading fees for a market
3019
- * @see https://www.kucoin.com/docs/rest/funding/trade-fee/trading-pair-actual-fee-futures
3020
- * @param {string} symbol unified market symbol
3021
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3022
- * @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
3023
- */
3024
3029
  await this.loadMarkets();
3025
3030
  const market = this.market(symbol);
3026
3031
  const request = {
@@ -3049,16 +3054,16 @@ class kucoinfutures extends kucoinfutures$1 {
3049
3054
  'tierBased': true,
3050
3055
  };
3051
3056
  }
3057
+ /**
3058
+ * @method
3059
+ * @name kucoinfutures#fetchMarginMode
3060
+ * @description fetches the margin mode of a trading pair
3061
+ * @see https://www.kucoin.com/docs/rest/futures-trading/positions/get-margin-mode
3062
+ * @param {string} symbol unified symbol of the market to fetch the margin mode for
3063
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3064
+ * @returns {object} a [margin mode structure]{@link https://docs.ccxt.com/#/?id=margin-mode-structure}
3065
+ */
3052
3066
  async fetchMarginMode(symbol, params = {}) {
3053
- /**
3054
- * @method
3055
- * @name kucoinfutures#fetchMarginMode
3056
- * @description fetches the margin mode of a trading pair
3057
- * @see https://www.kucoin.com/docs/rest/futures-trading/positions/get-margin-mode
3058
- * @param {string} symbol unified symbol of the market to fetch the margin mode for
3059
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3060
- * @returns {object} a [margin mode structure]{@link https://docs.ccxt.com/#/?id=margin-mode-structure}
3061
- */
3062
3067
  await this.loadMarkets();
3063
3068
  const market = this.market(symbol);
3064
3069
  const request = {
@@ -3086,17 +3091,17 @@ class kucoinfutures extends kucoinfutures$1 {
3086
3091
  'marginMode': marginType,
3087
3092
  };
3088
3093
  }
3094
+ /**
3095
+ * @method
3096
+ * @name kucoinfutures#setMarginMode
3097
+ * @description set margin mode to 'cross' or 'isolated'
3098
+ * @see https://www.kucoin.com/docs/rest/futures-trading/positions/modify-margin-mode
3099
+ * @param {string} marginMode 'cross' or 'isolated'
3100
+ * @param {string} symbol unified market symbol
3101
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3102
+ * @returns {object} response from the exchange
3103
+ */
3089
3104
  async setMarginMode(marginMode, symbol = undefined, params = {}) {
3090
- /**
3091
- * @method
3092
- * @name kucoinfutures#setMarginMode
3093
- * @description set margin mode to 'cross' or 'isolated'
3094
- * @see https://www.kucoin.com/docs/rest/futures-trading/positions/modify-margin-mode
3095
- * @param {string} marginMode 'cross' or 'isolated'
3096
- * @param {string} symbol unified market symbol
3097
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3098
- * @returns {object} response from the exchange
3099
- */
3100
3105
  if (symbol === undefined) {
3101
3106
  throw new errors.ArgumentsRequired(this.id + ' setMarginMode() requires a symbol argument');
3102
3107
  }
@@ -3120,16 +3125,16 @@ class kucoinfutures extends kucoinfutures$1 {
3120
3125
  const data = this.safeDict(response, 'data', {});
3121
3126
  return this.parseMarginMode(data, market);
3122
3127
  }
3128
+ /**
3129
+ * @method
3130
+ * @name kucoin#fetchLeverage
3131
+ * @description fetch the set leverage for a market
3132
+ * @see https://www.kucoin.com/docs/rest/futures-trading/positions/get-cross-margin-leverage
3133
+ * @param {string} symbol unified market symbol
3134
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3135
+ * @returns {object} a [leverage structure]{@link https://docs.ccxt.com/#/?id=leverage-structure}
3136
+ */
3123
3137
  async fetchLeverage(symbol, params = {}) {
3124
- /**
3125
- * @method
3126
- * @name kucoin#fetchLeverage
3127
- * @description fetch the set leverage for a market
3128
- * @see https://www.kucoin.com/docs/rest/futures-trading/positions/get-cross-margin-leverage
3129
- * @param {string} symbol unified market symbol
3130
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3131
- * @returns {object} a [leverage structure]{@link https://docs.ccxt.com/#/?id=leverage-structure}
3132
- */
3133
3138
  let marginMode = undefined;
3134
3139
  [marginMode, params] = this.handleMarginModeAndParams(symbol, params);
3135
3140
  if (marginMode !== 'cross') {
@@ -3156,17 +3161,17 @@ class kucoinfutures extends kucoinfutures$1 {
3156
3161
  'marginMode': marginMode,
3157
3162
  });
3158
3163
  }
3164
+ /**
3165
+ * @method
3166
+ * @name kucoinfutures#setLeverage
3167
+ * @description set the level of leverage for a market
3168
+ * @see https://www.kucoin.com/docs/rest/futures-trading/positions/modify-cross-margin-leverage
3169
+ * @param {float} leverage the rate of leverage
3170
+ * @param {string} symbol unified market symbol
3171
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3172
+ * @returns {object} response from the exchange
3173
+ */
3159
3174
  async setLeverage(leverage, symbol = undefined, params = {}) {
3160
- /**
3161
- * @method
3162
- * @name kucoinfutures#setLeverage
3163
- * @description set the level of leverage for a market
3164
- * @see https://www.kucoin.com/docs/rest/futures-trading/positions/modify-cross-margin-leverage
3165
- * @param {float} leverage the rate of leverage
3166
- * @param {string} symbol unified market symbol
3167
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3168
- * @returns {object} response from the exchange
3169
- */
3170
3175
  let marginMode = undefined;
3171
3176
  [marginMode, params] = this.handleMarginModeAndParams(symbol, params);
3172
3177
  if (marginMode !== 'cross') {