ccxt 4.4.30 → 4.4.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (496) hide show
  1. package/README.md +9 -3
  2. package/dist/ccxt.browser.min.js +3 -3
  3. package/dist/cjs/ccxt.js +1 -1
  4. package/dist/cjs/src/ace.js +123 -123
  5. package/dist/cjs/src/alpaca.js +237 -237
  6. package/dist/cjs/src/ascendex.js +342 -341
  7. package/dist/cjs/src/bigone.js +242 -242
  8. package/dist/cjs/src/binance.js +1339 -1291
  9. package/dist/cjs/src/bingx.js +639 -639
  10. package/dist/cjs/src/bit2c.js +111 -111
  11. package/dist/cjs/src/bitbank.js +142 -142
  12. package/dist/cjs/src/bitbns.js +140 -140
  13. package/dist/cjs/src/bitfinex.js +231 -231
  14. package/dist/cjs/src/bitfinex2.js +403 -403
  15. package/dist/cjs/src/bitflyer.js +184 -184
  16. package/dist/cjs/src/bitget.js +848 -846
  17. package/dist/cjs/src/bithumb.js +125 -124
  18. package/dist/cjs/src/bitmart.js +525 -525
  19. package/dist/cjs/src/bitmex.js +317 -317
  20. package/dist/cjs/src/bitopro.js +221 -221
  21. package/dist/cjs/src/bitrue.js +315 -315
  22. package/dist/cjs/src/bitso.js +220 -220
  23. package/dist/cjs/src/bitstamp.js +251 -251
  24. package/dist/cjs/src/bitteam.js +183 -183
  25. package/dist/cjs/src/bitvavo.js +247 -251
  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 +650 -650
  39. package/dist/cjs/src/coincheck.js +113 -113
  40. package/dist/cjs/src/coinex.js +611 -601
  41. package/dist/cjs/src/coinlist.js +304 -303
  42. package/dist/cjs/src/coinmate.js +162 -161
  43. package/dist/cjs/src/coinmetro.js +187 -187
  44. package/dist/cjs/src/coinone.js +124 -123
  45. package/dist/cjs/src/coinsph.js +237 -237
  46. package/dist/cjs/src/coinspot.js +82 -82
  47. package/dist/cjs/src/cryptocom.js +342 -341
  48. package/dist/cjs/src/currencycom.js +225 -224
  49. package/dist/cjs/src/delta.js +320 -320
  50. package/dist/cjs/src/deribit.js +411 -408
  51. package/dist/cjs/src/digifinex.js +432 -431
  52. package/dist/cjs/src/exmo.js +328 -327
  53. package/dist/cjs/src/gate.js +830 -791
  54. package/dist/cjs/src/gemini.js +199 -198
  55. package/dist/cjs/src/hashkey.js +520 -517
  56. package/dist/cjs/src/hitbtc.js +465 -462
  57. package/dist/cjs/src/hollaex.js +253 -252
  58. package/dist/cjs/src/htx.js +791 -848
  59. package/dist/cjs/src/huobijp.js +219 -218
  60. package/dist/cjs/src/hyperliquid.js +421 -417
  61. package/dist/cjs/src/idex.js +238 -237
  62. package/dist/cjs/src/independentreserve.js +133 -132
  63. package/dist/cjs/src/indodax.js +177 -171
  64. package/dist/cjs/src/kraken.js +381 -377
  65. package/dist/cjs/src/krakenfutures.js +285 -279
  66. package/dist/cjs/src/kucoin.js +632 -622
  67. package/dist/cjs/src/kucoinfutures.js +533 -457
  68. package/dist/cjs/src/kuna.js +283 -282
  69. package/dist/cjs/src/latoken.js +211 -210
  70. package/dist/cjs/src/lbank.js +268 -267
  71. package/dist/cjs/src/luno.js +174 -173
  72. package/dist/cjs/src/lykke.js +172 -171
  73. package/dist/cjs/src/mercado.js +123 -122
  74. package/dist/cjs/src/mexc.js +650 -646
  75. package/dist/cjs/src/ndax.js +229 -228
  76. package/dist/cjs/src/novadax.js +230 -229
  77. package/dist/cjs/src/oceanex.js +187 -186
  78. package/dist/cjs/src/okcoin.js +286 -285
  79. package/dist/cjs/src/okx.js +909 -904
  80. package/dist/cjs/src/onetrading.js +218 -218
  81. package/dist/cjs/src/oxfun.js +335 -334
  82. package/dist/cjs/src/p2b.js +154 -154
  83. package/dist/cjs/src/paradex.js +249 -244
  84. package/dist/cjs/src/paymium.js +101 -101
  85. package/dist/cjs/src/phemex.js +388 -390
  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 +188 -181
  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 +299 -301
  102. package/dist/cjs/src/pro/blockchaincom.js +62 -62
  103. package/dist/cjs/src/pro/blofin.js +132 -130
  104. package/dist/cjs/src/pro/bybit.js +317 -313
  105. package/dist/cjs/src/pro/cex.js +168 -168
  106. package/dist/cjs/src/pro/coinbase.js +93 -91
  107. package/dist/cjs/src/pro/coinbaseexchange.js +95 -95
  108. package/dist/cjs/src/pro/coinbaseinternational.js +111 -111
  109. package/dist/cjs/src/pro/coincatch.js +150 -143
  110. package/dist/cjs/src/pro/coincheck.js +21 -21
  111. package/dist/cjs/src/pro/coinex.js +110 -110
  112. package/dist/cjs/src/pro/coinone.js +30 -30
  113. package/dist/cjs/src/pro/cryptocom.js +227 -227
  114. package/dist/cjs/src/pro/currencycom.js +45 -45
  115. package/dist/cjs/src/pro/deribit.js +127 -127
  116. package/dist/cjs/src/pro/exmo.js +66 -66
  117. package/dist/cjs/src/pro/gate.js +287 -283
  118. package/dist/cjs/src/pro/gemini.js +74 -74
  119. package/dist/cjs/src/pro/hashkey.js +87 -85
  120. package/dist/cjs/src/pro/hitbtc.js +190 -190
  121. package/dist/cjs/src/pro/hollaex.js +51 -51
  122. package/dist/cjs/src/pro/htx.js +96 -94
  123. package/dist/cjs/src/pro/huobijp.js +38 -38
  124. package/dist/cjs/src/pro/hyperliquid.js +151 -150
  125. package/dist/cjs/src/pro/idex.js +48 -48
  126. package/dist/cjs/src/pro/independentreserve.js +19 -19
  127. package/dist/cjs/src/pro/kraken.js +167 -167
  128. package/dist/cjs/src/pro/krakenfutures.js +137 -138
  129. package/dist/cjs/src/pro/kucoin.js +167 -168
  130. package/dist/cjs/src/pro/kucoinfutures.js +147 -147
  131. package/dist/cjs/src/pro/lbank.js +95 -95
  132. package/dist/cjs/src/pro/luno.js +21 -21
  133. package/dist/cjs/src/pro/mexc.js +102 -103
  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 +176 -172
  159. package/dist/cjs/src/wazirx.js +168 -168
  160. package/dist/cjs/src/whitebit.js +361 -361
  161. package/dist/cjs/src/woo.js +571 -572
  162. package/dist/cjs/src/woofipro.js +392 -391
  163. package/dist/cjs/src/xt.js +436 -435
  164. package/dist/cjs/src/yobit.js +159 -158
  165. package/dist/cjs/src/zaif.js +103 -103
  166. package/dist/cjs/src/zonda.js +168 -168
  167. package/js/ccxt.d.ts +1 -1
  168. package/js/ccxt.js +1 -1
  169. package/js/src/ace.d.ts +123 -0
  170. package/js/src/ace.js +123 -123
  171. package/js/src/alpaca.d.ts +237 -0
  172. package/js/src/alpaca.js +237 -237
  173. package/js/src/ascendex.d.ts +339 -0
  174. package/js/src/ascendex.js +342 -341
  175. package/js/src/base/types.d.ts +1 -0
  176. package/js/src/bigone.d.ts +242 -0
  177. package/js/src/bigone.js +242 -242
  178. package/js/src/binance.d.ts +1306 -0
  179. package/js/src/binance.js +1339 -1291
  180. package/js/src/bingx.d.ts +639 -0
  181. package/js/src/bingx.js +639 -639
  182. package/js/src/bit2c.d.ts +111 -0
  183. package/js/src/bit2c.js +111 -111
  184. package/js/src/bitbank.d.ts +142 -0
  185. package/js/src/bitbank.js +142 -142
  186. package/js/src/bitbns.d.ts +140 -0
  187. package/js/src/bitbns.js +140 -140
  188. package/js/src/bitfinex.d.ts +231 -0
  189. package/js/src/bitfinex.js +231 -231
  190. package/js/src/bitfinex2.d.ts +403 -0
  191. package/js/src/bitfinex2.js +403 -403
  192. package/js/src/bitflyer.d.ts +184 -0
  193. package/js/src/bitflyer.js +184 -184
  194. package/js/src/bitget.d.ts +846 -0
  195. package/js/src/bitget.js +848 -846
  196. package/js/src/bithumb.d.ts +125 -0
  197. package/js/src/bithumb.js +125 -124
  198. package/js/src/bitmart.d.ts +525 -0
  199. package/js/src/bitmart.js +525 -525
  200. package/js/src/bitmex.d.ts +317 -0
  201. package/js/src/bitmex.js +317 -317
  202. package/js/src/bitopro.d.ts +221 -0
  203. package/js/src/bitopro.js +221 -221
  204. package/js/src/bitrue.d.ts +315 -0
  205. package/js/src/bitrue.js +315 -315
  206. package/js/src/bitso.d.ts +220 -0
  207. package/js/src/bitso.js +220 -220
  208. package/js/src/bitstamp.d.ts +251 -0
  209. package/js/src/bitstamp.js +251 -251
  210. package/js/src/bitteam.d.ts +183 -0
  211. package/js/src/bitteam.js +183 -183
  212. package/js/src/bitvavo.d.ts +247 -0
  213. package/js/src/bitvavo.js +247 -251
  214. package/js/src/bl3p.d.ts +82 -0
  215. package/js/src/bl3p.js +82 -82
  216. package/js/src/blockchaincom.d.ts +211 -0
  217. package/js/src/blockchaincom.js +211 -211
  218. package/js/src/blofin.d.ts +332 -0
  219. package/js/src/blofin.js +332 -331
  220. package/js/src/btcalpha.d.ts +166 -0
  221. package/js/src/btcalpha.js +166 -166
  222. package/js/src/btcbox.d.ts +108 -0
  223. package/js/src/btcbox.js +108 -108
  224. package/js/src/btcmarkets.d.ts +198 -0
  225. package/js/src/btcmarkets.js +198 -198
  226. package/js/src/btcturk.d.ts +124 -0
  227. package/js/src/btcturk.js +124 -124
  228. package/js/src/bybit.d.ts +906 -1
  229. package/js/src/bybit.js +906 -900
  230. package/js/src/cex.d.ts +227 -0
  231. package/js/src/cex.js +227 -226
  232. package/js/src/coinbase.d.ts +481 -0
  233. package/js/src/coinbase.js +481 -481
  234. package/js/src/coinbaseexchange.d.ts +274 -0
  235. package/js/src/coinbaseexchange.js +274 -274
  236. package/js/src/coinbaseinternational.d.ts +304 -0
  237. package/js/src/coinbaseinternational.js +304 -304
  238. package/js/src/coincatch.d.ts +646 -0
  239. package/js/src/coincatch.js +650 -650
  240. package/js/src/coincheck.d.ts +113 -0
  241. package/js/src/coincheck.js +113 -113
  242. package/js/src/coinex.d.ts +603 -0
  243. package/js/src/coinex.js +611 -601
  244. package/js/src/coinlist.d.ts +304 -0
  245. package/js/src/coinlist.js +304 -303
  246. package/js/src/coinmate.d.ts +162 -0
  247. package/js/src/coinmate.js +162 -161
  248. package/js/src/coinmetro.d.ts +187 -0
  249. package/js/src/coinmetro.js +187 -187
  250. package/js/src/coinone.d.ts +124 -0
  251. package/js/src/coinone.js +124 -123
  252. package/js/src/coinsph.d.ts +237 -0
  253. package/js/src/coinsph.js +237 -237
  254. package/js/src/coinspot.d.ts +82 -0
  255. package/js/src/coinspot.js +82 -82
  256. package/js/src/cryptocom.d.ts +342 -0
  257. package/js/src/cryptocom.js +342 -341
  258. package/js/src/currencycom.d.ts +225 -0
  259. package/js/src/currencycom.js +225 -224
  260. package/js/src/delta.d.ts +320 -0
  261. package/js/src/delta.js +320 -320
  262. package/js/src/deribit.d.ts +411 -0
  263. package/js/src/deribit.js +411 -408
  264. package/js/src/digifinex.d.ts +430 -0
  265. package/js/src/digifinex.js +432 -431
  266. package/js/src/exmo.d.ts +328 -0
  267. package/js/src/exmo.js +328 -327
  268. package/js/src/gate.d.ts +803 -1
  269. package/js/src/gate.js +830 -791
  270. package/js/src/gemini.d.ts +199 -0
  271. package/js/src/gemini.js +199 -198
  272. package/js/src/hashkey.d.ts +516 -0
  273. package/js/src/hashkey.js +520 -517
  274. package/js/src/hitbtc.d.ts +465 -0
  275. package/js/src/hitbtc.js +465 -462
  276. package/js/src/hollaex.d.ts +253 -0
  277. package/js/src/hollaex.js +253 -252
  278. package/js/src/htx.d.ts +765 -2
  279. package/js/src/htx.js +791 -848
  280. package/js/src/huobijp.d.ts +219 -0
  281. package/js/src/huobijp.js +219 -218
  282. package/js/src/hyperliquid.d.ts +419 -0
  283. package/js/src/hyperliquid.js +421 -417
  284. package/js/src/idex.d.ts +238 -0
  285. package/js/src/idex.js +238 -237
  286. package/js/src/independentreserve.d.ts +133 -0
  287. package/js/src/independentreserve.js +133 -132
  288. package/js/src/indodax.d.ts +171 -0
  289. package/js/src/indodax.js +177 -171
  290. package/js/src/kraken.d.ts +381 -0
  291. package/js/src/kraken.js +381 -377
  292. package/js/src/krakenfutures.d.ts +282 -0
  293. package/js/src/krakenfutures.js +285 -279
  294. package/js/src/kucoin.d.ts +613 -0
  295. package/js/src/kucoin.js +632 -622
  296. package/js/src/kucoinfutures.d.ts +441 -0
  297. package/js/src/kucoinfutures.js +533 -457
  298. package/js/src/kuna.d.ts +283 -0
  299. package/js/src/kuna.js +283 -282
  300. package/js/src/latoken.d.ts +211 -0
  301. package/js/src/latoken.js +211 -210
  302. package/js/src/lbank.d.ts +268 -0
  303. package/js/src/lbank.js +268 -267
  304. package/js/src/luno.d.ts +174 -0
  305. package/js/src/luno.js +174 -173
  306. package/js/src/lykke.d.ts +172 -0
  307. package/js/src/lykke.js +172 -171
  308. package/js/src/mercado.d.ts +123 -0
  309. package/js/src/mercado.js +123 -122
  310. package/js/src/mexc.d.ts +647 -0
  311. package/js/src/mexc.js +650 -646
  312. package/js/src/ndax.d.ts +229 -0
  313. package/js/src/ndax.js +229 -228
  314. package/js/src/novadax.d.ts +230 -0
  315. package/js/src/novadax.js +230 -229
  316. package/js/src/oceanex.d.ts +187 -0
  317. package/js/src/oceanex.js +187 -186
  318. package/js/src/okcoin.d.ts +286 -0
  319. package/js/src/okcoin.js +286 -285
  320. package/js/src/okx.d.ts +907 -0
  321. package/js/src/okx.js +909 -904
  322. package/js/src/onetrading.d.ts +218 -0
  323. package/js/src/onetrading.js +218 -218
  324. package/js/src/oxfun.d.ts +336 -3
  325. package/js/src/oxfun.js +335 -334
  326. package/js/src/p2b.d.ts +154 -0
  327. package/js/src/p2b.js +154 -154
  328. package/js/src/paradex.d.ts +241 -0
  329. package/js/src/paradex.js +249 -244
  330. package/js/src/paymium.d.ts +101 -0
  331. package/js/src/paymium.js +101 -101
  332. package/js/src/phemex.d.ts +366 -0
  333. package/js/src/phemex.js +388 -390
  334. package/js/src/poloniex.d.ts +270 -0
  335. package/js/src/poloniex.js +270 -270
  336. package/js/src/poloniexfutures.d.ts +250 -0
  337. package/js/src/poloniexfutures.js +250 -250
  338. package/js/src/pro/alpaca.d.ts +64 -0
  339. package/js/src/pro/alpaca.js +64 -64
  340. package/js/src/pro/ascendex.d.ts +64 -0
  341. package/js/src/pro/ascendex.js +64 -64
  342. package/js/src/pro/binance.d.ts +546 -0
  343. package/js/src/pro/binance.js +546 -543
  344. package/js/src/pro/bingx.d.ts +116 -0
  345. package/js/src/pro/bingx.js +116 -116
  346. package/js/src/pro/bitfinex.d.ts +42 -0
  347. package/js/src/pro/bitfinex.js +42 -42
  348. package/js/src/pro/bitfinex2.d.ts +66 -0
  349. package/js/src/pro/bitfinex2.js +66 -66
  350. package/js/src/pro/bitget.d.ts +187 -0
  351. package/js/src/pro/bitget.js +188 -181
  352. package/js/src/pro/bithumb.d.ts +40 -0
  353. package/js/src/pro/bithumb.js +40 -40
  354. package/js/src/pro/bitmart.d.ts +121 -0
  355. package/js/src/pro/bitmart.js +121 -119
  356. package/js/src/pro/bitmex.d.ts +135 -0
  357. package/js/src/pro/bitmex.js +135 -133
  358. package/js/src/pro/bitopro.d.ts +49 -0
  359. package/js/src/pro/bitopro.js +49 -49
  360. package/js/src/pro/bitrue.d.ts +19 -0
  361. package/js/src/pro/bitrue.js +19 -19
  362. package/js/src/pro/bitstamp.d.ts +29 -0
  363. package/js/src/pro/bitstamp.js +29 -29
  364. package/js/src/pro/bitvavo.d.ts +254 -1
  365. package/js/src/pro/bitvavo.js +299 -301
  366. package/js/src/pro/blockchaincom.d.ts +62 -0
  367. package/js/src/pro/blockchaincom.js +62 -62
  368. package/js/src/pro/blofin.d.ts +132 -0
  369. package/js/src/pro/blofin.js +132 -130
  370. package/js/src/pro/bybit.d.ts +317 -0
  371. package/js/src/pro/bybit.js +317 -313
  372. package/js/src/pro/cex.d.ts +168 -0
  373. package/js/src/pro/cex.js +168 -168
  374. package/js/src/pro/coinbase.d.ts +93 -0
  375. package/js/src/pro/coinbase.js +93 -91
  376. package/js/src/pro/coinbaseexchange.d.ts +95 -0
  377. package/js/src/pro/coinbaseexchange.js +95 -95
  378. package/js/src/pro/coinbaseinternational.d.ts +111 -0
  379. package/js/src/pro/coinbaseinternational.js +111 -111
  380. package/js/src/pro/coincatch.d.ts +150 -0
  381. package/js/src/pro/coincatch.js +150 -143
  382. package/js/src/pro/coincheck.d.ts +21 -0
  383. package/js/src/pro/coincheck.js +21 -21
  384. package/js/src/pro/coinex.d.ts +110 -0
  385. package/js/src/pro/coinex.js +110 -110
  386. package/js/src/pro/coinone.d.ts +30 -0
  387. package/js/src/pro/coinone.js +30 -30
  388. package/js/src/pro/cryptocom.d.ts +227 -0
  389. package/js/src/pro/cryptocom.js +227 -227
  390. package/js/src/pro/currencycom.d.ts +45 -0
  391. package/js/src/pro/currencycom.js +45 -45
  392. package/js/src/pro/deribit.d.ts +127 -0
  393. package/js/src/pro/deribit.js +127 -127
  394. package/js/src/pro/exmo.d.ts +66 -0
  395. package/js/src/pro/exmo.js +66 -66
  396. package/js/src/pro/gate.d.ts +287 -0
  397. package/js/src/pro/gate.js +287 -283
  398. package/js/src/pro/gemini.d.ts +74 -0
  399. package/js/src/pro/gemini.js +74 -74
  400. package/js/src/pro/hashkey.d.ts +87 -0
  401. package/js/src/pro/hashkey.js +87 -85
  402. package/js/src/pro/hitbtc.d.ts +190 -0
  403. package/js/src/pro/hitbtc.js +190 -190
  404. package/js/src/pro/hollaex.d.ts +51 -0
  405. package/js/src/pro/hollaex.js +51 -51
  406. package/js/src/pro/htx.d.ts +96 -0
  407. package/js/src/pro/htx.js +96 -94
  408. package/js/src/pro/huobijp.d.ts +38 -0
  409. package/js/src/pro/huobijp.js +38 -38
  410. package/js/src/pro/hyperliquid.d.ts +151 -0
  411. package/js/src/pro/hyperliquid.js +151 -150
  412. package/js/src/pro/idex.d.ts +48 -0
  413. package/js/src/pro/idex.js +48 -48
  414. package/js/src/pro/independentreserve.d.ts +19 -0
  415. package/js/src/pro/independentreserve.js +19 -19
  416. package/js/src/pro/kraken.d.ts +167 -0
  417. package/js/src/pro/kraken.js +167 -167
  418. package/js/src/pro/krakenfutures.d.ts +137 -0
  419. package/js/src/pro/krakenfutures.js +137 -138
  420. package/js/src/pro/kucoin.d.ts +167 -0
  421. package/js/src/pro/kucoin.js +167 -168
  422. package/js/src/pro/kucoinfutures.d.ts +147 -0
  423. package/js/src/pro/kucoinfutures.js +147 -147
  424. package/js/src/pro/lbank.d.ts +95 -0
  425. package/js/src/pro/lbank.js +95 -95
  426. package/js/src/pro/luno.d.ts +21 -0
  427. package/js/src/pro/luno.js +21 -21
  428. package/js/src/pro/mexc.d.ts +101 -0
  429. package/js/src/pro/mexc.js +102 -103
  430. package/js/src/pro/ndax.d.ts +42 -0
  431. package/js/src/pro/ndax.js +42 -42
  432. package/js/src/pro/okcoin.d.ts +61 -0
  433. package/js/src/pro/okcoin.js +61 -61
  434. package/js/src/pro/okx.d.ts +332 -0
  435. package/js/src/pro/okx.js +332 -330
  436. package/js/src/pro/onetrading.d.ts +71 -0
  437. package/js/src/pro/onetrading.js +71 -71
  438. package/js/src/pro/oxfun.d.ts +193 -0
  439. package/js/src/pro/oxfun.js +193 -191
  440. package/js/src/pro/p2b.d.ts +77 -0
  441. package/js/src/pro/p2b.js +77 -77
  442. package/js/src/pro/paradex.d.ts +39 -0
  443. package/js/src/pro/paradex.js +39 -39
  444. package/js/src/pro/phemex.d.ts +94 -0
  445. package/js/src/pro/phemex.js +94 -94
  446. package/js/src/pro/poloniex.d.ts +171 -0
  447. package/js/src/pro/poloniex.js +171 -171
  448. package/js/src/pro/poloniexfutures.d.ts +62 -0
  449. package/js/src/pro/poloniexfutures.js +62 -62
  450. package/js/src/pro/probit.d.ts +63 -0
  451. package/js/src/pro/probit.js +63 -63
  452. package/js/src/pro/upbit.d.ts +80 -0
  453. package/js/src/pro/upbit.js +80 -80
  454. package/js/src/pro/vertex.d.ts +65 -0
  455. package/js/src/pro/vertex.js +65 -63
  456. package/js/src/pro/wazirx.d.ts +70 -0
  457. package/js/src/pro/wazirx.js +70 -70
  458. package/js/src/pro/whitebit.d.ts +83 -0
  459. package/js/src/pro/whitebit.js +83 -83
  460. package/js/src/pro/woo.d.ts +106 -0
  461. package/js/src/pro/woo.js +106 -104
  462. package/js/src/pro/woofipro.d.ts +105 -0
  463. package/js/src/pro/woofipro.js +105 -103
  464. package/js/src/pro/xt.d.ts +119 -0
  465. package/js/src/pro/xt.js +119 -119
  466. package/js/src/probit.d.ts +229 -0
  467. package/js/src/probit.js +229 -229
  468. package/js/src/timex.d.ts +198 -0
  469. package/js/src/timex.js +198 -197
  470. package/js/src/tokocrypto.d.ts +214 -0
  471. package/js/src/tokocrypto.js +214 -213
  472. package/js/src/tradeogre.d.ts +92 -0
  473. package/js/src/tradeogre.js +92 -91
  474. package/js/src/upbit.d.ts +243 -0
  475. package/js/src/upbit.js +243 -242
  476. package/js/src/vertex.d.ts +258 -0
  477. package/js/src/vertex.js +258 -258
  478. package/js/src/wavesexchange.d.ts +176 -0
  479. package/js/src/wavesexchange.js +176 -172
  480. package/js/src/wazirx.d.ts +168 -0
  481. package/js/src/wazirx.js +168 -168
  482. package/js/src/whitebit.d.ts +361 -0
  483. package/js/src/whitebit.js +361 -361
  484. package/js/src/woo.d.ts +571 -0
  485. package/js/src/woo.js +571 -572
  486. package/js/src/woofipro.d.ts +392 -0
  487. package/js/src/woofipro.js +392 -391
  488. package/js/src/xt.d.ts +439 -4
  489. package/js/src/xt.js +436 -435
  490. package/js/src/yobit.d.ts +159 -0
  491. package/js/src/yobit.js +159 -158
  492. package/js/src/zaif.d.ts +103 -0
  493. package/js/src/zaif.js +103 -103
  494. package/js/src/zonda.d.ts +168 -0
  495. package/js/src/zonda.js +168 -168
  496. package/package.json +1 -1
@@ -483,15 +483,15 @@ class coincatch extends coincatch$1 {
483
483
  return cost;
484
484
  }
485
485
  }
486
+ /**
487
+ * @method
488
+ * @name coincatch#fetchTime
489
+ * @description fetches the current integer timestamp in milliseconds from the exchange server
490
+ * @see https://coincatch.github.io/github.io/en/spot/#get-server-time
491
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
492
+ * @returns {int} the current integer timestamp in milliseconds from the exchange server
493
+ */
486
494
  async fetchTime(params = {}) {
487
- /**
488
- * @method
489
- * @name coincatch#fetchTime
490
- * @description fetches the current integer timestamp in milliseconds from the exchange server
491
- * @see https://coincatch.github.io/github.io/en/spot/#get-server-time
492
- * @param {object} [params] extra parameters specific to the exchange API endpoint
493
- * @returns {int} the current integer timestamp in milliseconds from the exchange server
494
- */
495
495
  const response = await this.publicGetApiSpotV1PublicTime(params);
496
496
  //
497
497
  // {
@@ -503,15 +503,15 @@ class coincatch extends coincatch$1 {
503
503
  //
504
504
  return this.safeInteger(response, 'data');
505
505
  }
506
+ /**
507
+ * @method
508
+ * @name coincatch#fetchCurrencies
509
+ * @description fetches all available currencies on an exchange
510
+ * @see https://coincatch.github.io/github.io/en/spot/#get-coin-list
511
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
512
+ * @returns {object} an associative dictionary of currencies
513
+ */
506
514
  async fetchCurrencies(params = {}) {
507
- /**
508
- * @method
509
- * @name coincatch#fetchCurrencies
510
- * @description fetches all available currencies on an exchange
511
- * @see https://coincatch.github.io/github.io/en/spot/#get-coin-list
512
- * @param {object} [params] extra parameters specific to the exchange API endpoint
513
- * @returns {object} an associative dictionary of currencies
514
- */
515
515
  const response = await this.publicGetApiSpotV1PublicCurrencies(params);
516
516
  const data = this.safeList(response, 'data', []);
517
517
  //
@@ -624,16 +624,16 @@ class coincatch extends coincatch$1 {
624
624
  }
625
625
  return result;
626
626
  }
627
+ /**
628
+ * @method
629
+ * @name coincatch#fetchMarkets
630
+ * @description retrieves data on all markets for the exchange
631
+ * @see https://coincatch.github.io/github.io/en/spot/#get-all-tickers
632
+ * @see https://coincatch.github.io/github.io/en/mix/#get-all-symbols
633
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
634
+ * @returns {object[]} an array of objects representing market data
635
+ */
627
636
  async fetchMarkets(params = {}) {
628
- /**
629
- * @method
630
- * @name coincatch#fetchMarkets
631
- * @description retrieves data on all markets for the exchange
632
- * @see https://coincatch.github.io/github.io/en/spot/#get-all-tickers
633
- * @see https://coincatch.github.io/github.io/en/mix/#get-all-symbols
634
- * @param {object} [params] extra parameters specific to the exchange API endpoint
635
- * @returns {object[]} an array of objects representing market data
636
- */
637
637
  let response = await this.publicGetApiSpotV1MarketTickers(params);
638
638
  //
639
639
  // {
@@ -941,17 +941,17 @@ class coincatch extends coincatch$1 {
941
941
  };
942
942
  return result;
943
943
  }
944
+ /**
945
+ * @method
946
+ * @name coincatch#fetchTicker
947
+ * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
948
+ * @see https://coincatch.github.io/github.io/en/spot/#get-single-ticker
949
+ * @see https://coincatch.github.io/github.io/en/mix/#get-single-symbol-ticker
950
+ * @param {string} symbol unified symbol of the market to fetch the ticker for
951
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
952
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
953
+ */
944
954
  async fetchTicker(symbol, params = {}) {
945
- /**
946
- * @method
947
- * @name coincatch#fetchTicker
948
- * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
949
- * @see https://coincatch.github.io/github.io/en/spot/#get-single-ticker
950
- * @see https://coincatch.github.io/github.io/en/mix/#get-single-symbol-ticker
951
- * @param {string} symbol unified symbol of the market to fetch the ticker for
952
- * @param {object} [params] extra parameters specific to the exchange API endpoint
953
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
954
- */
955
955
  await this.loadMarkets();
956
956
  const market = this.market(symbol);
957
957
  const request = {
@@ -1024,19 +1024,19 @@ class coincatch extends coincatch$1 {
1024
1024
  const data = this.safeDict(response, 'data', {});
1025
1025
  return this.parseTicker(data, market);
1026
1026
  }
1027
+ /**
1028
+ * @method
1029
+ * @name coincatch#fetchTickers
1030
+ * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
1031
+ * @see https://coincatch.github.io/github.io/en/spot/#get-all-tickers
1032
+ * @see https://coincatch.github.io/github.io/en/mix/#get-all-symbol-ticker
1033
+ * @param {string[]} [symbols] unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
1034
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1035
+ * @param {string} [params.type] 'spot' or 'swap' (default 'spot')
1036
+ * @param {string} [params.productType] 'umcbl' or 'dmcbl' (default 'umcbl') - USDT perpetual contract or Universal margin perpetual contract
1037
+ * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1038
+ */
1027
1039
  async fetchTickers(symbols = undefined, params = {}) {
1028
- /**
1029
- * @method
1030
- * @name coincatch#fetchTickers
1031
- * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
1032
- * @see https://coincatch.github.io/github.io/en/spot/#get-all-tickers
1033
- * @see https://coincatch.github.io/github.io/en/mix/#get-all-symbol-ticker
1034
- * @param {string[]} [symbols] unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
1035
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1036
- * @param {string} [params.type] 'spot' or 'swap' (default 'spot')
1037
- * @param {string} [params.productType] 'umcbl' or 'dmcbl' (default 'umcbl') - USDT perpetual contract or Universal margin perpetual contract
1038
- * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1039
- */
1040
1040
  const methodName = 'fetchTickers';
1041
1041
  await this.loadMarkets();
1042
1042
  symbols = this.marketSymbols(symbols, undefined, true, true);
@@ -1199,19 +1199,19 @@ class coincatch extends coincatch$1 {
1199
1199
  'info': ticker,
1200
1200
  }, market);
1201
1201
  }
1202
+ /**
1203
+ * @method
1204
+ * @name coincatch#fetchOrderBook
1205
+ * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
1206
+ * @see https://coincatch.github.io/github.io/en/spot/#get-merged-depth-data
1207
+ * @see https://coincatch.github.io/github.io/en/mix/#get-merged-depth-data
1208
+ * @param {string} symbol unified symbol of the market to fetch the order book for
1209
+ * @param {int} [limit] the maximum amount of order book entries to return (maximum and default value is 100)
1210
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1211
+ * @param {string} [params.precision] 'scale0' (default), 'scale1', 'scale2' or 'scale3' - price accuracy, according to the selected accuracy as the step size to return the cumulative depth
1212
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
1213
+ */
1202
1214
  async fetchOrderBook(symbol, limit = undefined, params = {}) {
1203
- /**
1204
- * @method
1205
- * @name coincatch#fetchOrderBook
1206
- * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
1207
- * @see https://coincatch.github.io/github.io/en/spot/#get-merged-depth-data
1208
- * @see https://coincatch.github.io/github.io/en/mix/#get-merged-depth-data
1209
- * @param {string} symbol unified symbol of the market to fetch the order book for
1210
- * @param {int} [limit] the maximum amount of order book entries to return (maximum and default value is 100)
1211
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1212
- * @param {string} [params.precision] 'scale0' (default), 'scale1', 'scale2' or 'scale3' - price accuracy, according to the selected accuracy as the step size to return the cumulative depth
1213
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
1214
- */
1215
1215
  await this.loadMarkets();
1216
1216
  const methodName = 'fetchOrderBook';
1217
1217
  const market = this.market(symbol);
@@ -1255,22 +1255,22 @@ class coincatch extends coincatch$1 {
1255
1255
  const timestamp = this.safeInteger(data, 'ts');
1256
1256
  return this.parseOrderBook(data, symbol, timestamp, 'bids', 'asks');
1257
1257
  }
1258
+ /**
1259
+ * @method
1260
+ * @name coincatch#fetchOHLCV
1261
+ * @see https://coincatch.github.io/github.io/en/spot/#get-candle-data
1262
+ * @see https://coincatch.github.io/github.io/en/mix/#get-candle-data
1263
+ * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
1264
+ * @param {string} symbol unified symbol of the market to fetch OHLCV data for
1265
+ * @param {string} timeframe the length of time each candle represents
1266
+ * @param {int} [since] timestamp in ms of the earliest candle to fetch
1267
+ * @param {int} [limit] the maximum amount of candles to fetch (default 100)
1268
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1269
+ * @param {int} [params.until] timestamp in ms of the latest candle to fetch
1270
+ * @param {string} [params.price] "mark" for mark price candles
1271
+ * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
1272
+ */
1258
1273
  async fetchOHLCV(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
1259
- /**
1260
- * @method
1261
- * @name coincatch#fetchOHLCV
1262
- * @see https://coincatch.github.io/github.io/en/spot/#get-candle-data
1263
- * @see https://coincatch.github.io/github.io/en/mix/#get-candle-data
1264
- * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
1265
- * @param {string} symbol unified symbol of the market to fetch OHLCV data for
1266
- * @param {string} timeframe the length of time each candle represents
1267
- * @param {int} [since] timestamp in ms of the earliest candle to fetch
1268
- * @param {int} [limit] the maximum amount of candles to fetch (default 100)
1269
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1270
- * @param {int} [params.until] timestamp in ms of the latest candle to fetch
1271
- * @param {string} [params.price] "mark" for mark price candles
1272
- * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
1273
- */
1274
1274
  const methodName = 'fetchOHLCV';
1275
1275
  await this.loadMarkets();
1276
1276
  const market = this.market(symbol);
@@ -1370,20 +1370,20 @@ class coincatch extends coincatch$1 {
1370
1370
  this.safeNumber2(ohlcv, 'baseVol', 5),
1371
1371
  ];
1372
1372
  }
1373
+ /**
1374
+ * @method
1375
+ * @name coincatch#fetchTrades
1376
+ * @description get the list of most recent trades for a particular symbol
1377
+ * @see https://coincatch.github.io/github.io/en/spot/#get-recent-trades
1378
+ * @see https://coincatch.github.io/github.io/en/mix/#get-fills
1379
+ * @param {string} symbol unified symbol of the market to fetch trades for
1380
+ * @param {int} [since] timestamp in ms of the earliest trade to fetch
1381
+ * @param {int} [limit] the maximum amount of trades to fetch
1382
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1383
+ * @param {int} [params.until] timestamp in ms of the latest entry to fetch
1384
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
1385
+ */
1373
1386
  async fetchTrades(symbol, since = undefined, limit = undefined, params = {}) {
1374
- /**
1375
- * @method
1376
- * @name coincatch#fetchTrades
1377
- * @description get the list of most recent trades for a particular symbol
1378
- * @see https://coincatch.github.io/github.io/en/spot/#get-recent-trades
1379
- * @see https://coincatch.github.io/github.io/en/mix/#get-fills
1380
- * @param {string} symbol unified symbol of the market to fetch trades for
1381
- * @param {int} [since] timestamp in ms of the earliest trade to fetch
1382
- * @param {int} [limit] the maximum amount of trades to fetch
1383
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1384
- * @param {int} [params.until] timestamp in ms of the latest entry to fetch
1385
- * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
1386
- */
1387
1387
  const methodName = 'fetchTrades';
1388
1388
  await this.loadMarkets();
1389
1389
  const market = this.market(symbol);
@@ -1543,16 +1543,16 @@ class coincatch extends coincatch$1 {
1543
1543
  'info': trade,
1544
1544
  }, market);
1545
1545
  }
1546
+ /**
1547
+ * @method
1548
+ * @name coincatch#fetchFundingRate
1549
+ * @description fetch the current funding rate
1550
+ * @see https://coincatch.github.io/github.io/en/mix/#get-current-funding-rate
1551
+ * @param {string} symbol unified market symbol
1552
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1553
+ * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
1554
+ */
1546
1555
  async fetchFundingRate(symbol, params = {}) {
1547
- /**
1548
- * @method
1549
- * @name coincatch#fetchFundingRate
1550
- * @description fetch the current funding rate
1551
- * @see https://coincatch.github.io/github.io/en/mix/#get-current-funding-rate
1552
- * @param {string} symbol unified market symbol
1553
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1554
- * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
1555
- */
1556
1556
  await this.loadMarkets();
1557
1557
  const market = this.market(symbol);
1558
1558
  const marketId = market['id'];
@@ -1607,20 +1607,20 @@ class coincatch extends coincatch$1 {
1607
1607
  }
1608
1608
  return [request, paramsOmited];
1609
1609
  }
1610
+ /**
1611
+ * @method
1612
+ * @name coincatch#fetchFundingRateHistory
1613
+ * @description fetches historical funding rate prices
1614
+ * @see https://coincatch.github.io/github.io/en/mix/#get-history-funding-rate
1615
+ * @param {string} symbol unified symbol of the market to fetch the funding rate history for
1616
+ * @param {int} [since] timestamp in ms of the earliest funding rate to fetch
1617
+ * @param {int} [limit] the maximum amount of entries to fetch
1618
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1619
+ * @param {int} [params.pageNo] the page number to fetch
1620
+ * @param {bool} [params.nextPage] whether to query the next page (default false)
1621
+ * @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
1622
+ */
1610
1623
  async fetchFundingRateHistory(symbol = undefined, since = undefined, limit = undefined, params = {}) {
1611
- /**
1612
- * @method
1613
- * @name coincatch#fetchFundingRateHistory
1614
- * @description fetches historical funding rate prices
1615
- * @see https://coincatch.github.io/github.io/en/mix/#get-history-funding-rate
1616
- * @param {string} symbol unified symbol of the market to fetch the funding rate history for
1617
- * @param {int} [since] timestamp in ms of the earliest funding rate to fetch
1618
- * @param {int} [limit] the maximum amount of entries to fetch
1619
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1620
- * @param {int} [params.pageNo] the page number to fetch
1621
- * @param {bool} [params.nextPage] whether to query the next page (default false)
1622
- * @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
1623
- */
1624
1624
  if (symbol === undefined) {
1625
1625
  throw new errors.ArgumentsRequired(this.id + ' fetchFundingRateHistory() requires a symbol argument');
1626
1626
  }
@@ -1668,21 +1668,21 @@ class coincatch extends coincatch$1 {
1668
1668
  const sorted = this.sortBy(rates, 'timestamp');
1669
1669
  return this.filterBySinceLimit(sorted, since, limit);
1670
1670
  }
1671
+ /**
1672
+ * @method
1673
+ * @name coincatch#fetchBalance
1674
+ * @description query for balance and get the amount of funds available for trading or funds locked in orders
1675
+ * @see https://coincatch.github.io/github.io/en/spot/#get-account-assets
1676
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1677
+ * @param {string} [params.type] 'spot' or 'swap' - the type of the market to fetch balance for (default 'spot')
1678
+ * @param {string} [params.productType] *swap only* 'umcbl' or 'dmcbl' (default 'umcbl')
1679
+ * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
1680
+ */
1671
1681
  async fetchBalance(params = {}) {
1672
- /**
1673
- * @method
1674
- * @name coincatch#fetchBalance
1675
- * @description query for balance and get the amount of funds available for trading or funds locked in orders
1676
- * @see https://coincatch.github.io/github.io/en/spot/#get-account-assets
1677
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1678
- * @param {string} [params.type] 'spot' or 'swap' - the type of the market to fetch balance for (default 'spot')
1679
- * @param {string} [params.productType] *swap only* 'umcbl' or 'dmcbl' (default 'umcbl')
1680
- * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
1681
- */
1682
1682
  await this.loadMarkets();
1683
1683
  const methodName = 'fetchBalance';
1684
- let marketType = 'spot';
1685
- [marketType, params] = this.handleMarketTypeAndParams(methodName, undefined, params, marketType);
1684
+ let marketType = undefined;
1685
+ [marketType, params] = this.handleMarketTypeAndParams(methodName, undefined, params);
1686
1686
  let response = undefined;
1687
1687
  if (marketType === 'spot') {
1688
1688
  //
@@ -1794,20 +1794,20 @@ class coincatch extends coincatch$1 {
1794
1794
  }
1795
1795
  return this.safeBalance(result);
1796
1796
  }
1797
+ /**
1798
+ * @method
1799
+ * @name coincatch#transfer
1800
+ * @description transfer currency internally between wallets on the same account
1801
+ * @see https://coincatch.github.io/github.io/en/spot/#transfer
1802
+ * @param {string} code unified currency code
1803
+ * @param {float} amount amount to transfer
1804
+ * @param {string} fromAccount 'spot' or 'swap' or 'mix_usdt' or 'mix_usd' - account to transfer from
1805
+ * @param {string} toAccount 'spot' or 'swap' or 'mix_usdt' or 'mix_usd' - account to transfer to
1806
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1807
+ * @param {string} [params.clientOrderId] a unique id for the transfer
1808
+ * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
1809
+ */
1797
1810
  async transfer(code, amount, fromAccount, toAccount, params = {}) {
1798
- /**
1799
- * @method
1800
- * @name coincatch#transfer
1801
- * @description transfer currency internally between wallets on the same account
1802
- * @see https://coincatch.github.io/github.io/en/spot/#transfer
1803
- * @param {string} code unified currency code
1804
- * @param {float} amount amount to transfer
1805
- * @param {string} fromAccount 'spot' or 'swap' or 'mix_usdt' or 'mix_usd' - account to transfer from
1806
- * @param {string} toAccount 'spot' or 'swap' or 'mix_usdt' or 'mix_usd' - account to transfer to
1807
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1808
- * @param {string} [params.clientOrderId] a unique id for the transfer
1809
- * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
1810
- */
1811
1811
  await this.loadMarkets();
1812
1812
  const currency = this.currency(code);
1813
1813
  if (fromAccount === 'swap') {
@@ -1870,17 +1870,17 @@ class coincatch extends coincatch$1 {
1870
1870
  'info': transfer,
1871
1871
  };
1872
1872
  }
1873
+ /**
1874
+ * @method
1875
+ * @name coincatch#fetchDepositAddress
1876
+ * @description fetch the deposit address for a currency associated with this account
1877
+ * @see https://coincatch.github.io/github.io/en/spot/#get-coin-address
1878
+ * @param {string} code unified currency code
1879
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1880
+ * @param {string} [params.network] network for fetch deposit address
1881
+ * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
1882
+ */
1873
1883
  async fetchDepositAddress(code, params = {}) {
1874
- /**
1875
- * @method
1876
- * @name coincatch#fetchDepositAddress
1877
- * @description fetch the deposit address for a currency associated with this account
1878
- * @see https://coincatch.github.io/github.io/en/spot/#get-coin-address
1879
- * @param {string} code unified currency code
1880
- * @param {string} [params.network] network for fetch deposit address
1881
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1882
- * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
1883
- */
1884
1884
  await this.loadMarkets();
1885
1885
  const currency = this.currency(code);
1886
1886
  const request = {
@@ -1937,21 +1937,21 @@ class coincatch extends coincatch$1 {
1937
1937
  'info': depositAddress,
1938
1938
  };
1939
1939
  }
1940
+ /**
1941
+ * @method
1942
+ * @name coincatch#fetchDeposits
1943
+ * @description fetch all deposits made to an account
1944
+ * @see https://coincatch.github.io/github.io/en/spot/#get-deposit-list
1945
+ * @param {string} code unified currency code of the currency transferred
1946
+ * @param {int} [since] the earliest time in ms to fetch transfers for (default 24 hours ago)
1947
+ * @param {int} [limit] the maximum number of transfer structures to retrieve (not used by exchange)
1948
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1949
+ * @param {int} [params.until] the latest time in ms to fetch transfers for (default time now)
1950
+ * @param {int} [params.pageNo] pageNo default 1
1951
+ * @param {int} [params.pageSize] pageSize (default 20, max 100)
1952
+ * @returns {object[]} a list of [transfer structures]{@link https://docs.ccxt.com/#/?id=transfer-structure}
1953
+ */
1940
1954
  async fetchDeposits(code = undefined, since = undefined, limit = undefined, params = {}) {
1941
- /**
1942
- * @method
1943
- * @name coincatch#fetchDeposits
1944
- * @description fetch all deposits made to an account
1945
- * @see https://coincatch.github.io/github.io/en/spot/#get-deposit-list
1946
- * @param {string} code unified currency code of the currency transferred
1947
- * @param {int} [since] the earliest time in ms to fetch transfers for (default 24 hours ago)
1948
- * @param {int} [limit] the maximum number of transfer structures to retrieve (not used by exchange)
1949
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1950
- * @param {int} [params.until] the latest time in ms to fetch transfers for (default time now)
1951
- * @param {int} [params.pageNo] pageNo default 1
1952
- * @param {int} [params.pageSize] pageSize (default 20, max 100)
1953
- * @returns {object[]} a list of [transfer structures]{@link https://docs.ccxt.com/#/?id=transfer-structure}
1954
- */
1955
1955
  const methodName = 'fetchDeposits';
1956
1956
  await this.loadMarkets();
1957
1957
  const request = {};
@@ -1999,22 +1999,22 @@ class coincatch extends coincatch$1 {
1999
1999
  const data = this.safeList(response, 'data', []);
2000
2000
  return this.parseTransactions(data, currency, since, limit);
2001
2001
  }
2002
+ /**
2003
+ * @method
2004
+ * @name coincatch#fetchWithdrawals
2005
+ * @description fetch all withdrawals made from an account
2006
+ * @see https://coincatch.github.io/github.io/en/spot/#get-withdraw-list-v2
2007
+ * @param {string} code unified currency code of the currency transferred
2008
+ * @param {int} [since] the earliest time in ms to fetch transfers for (default 24 hours ago)
2009
+ * @param {int} [limit] the maximum number of transfer structures to retrieve (default 50, max 200)
2010
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2011
+ * @param {int} [params.until] the latest time in ms to fetch transfers for (default time now)
2012
+ * @param {string} [params.clientOid] clientOid
2013
+ * @param {string} [params.orderId] The response orderId
2014
+ * @param {string} [params.idLessThan] Requests the content on the page before this ID (older data), the value input should be the orderId of the corresponding interface.
2015
+ * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
2016
+ */
2002
2017
  async fetchWithdrawals(code = undefined, since = undefined, limit = undefined, params = {}) {
2003
- /**
2004
- * @method
2005
- * @name coincatch#fetchWithdrawals
2006
- * @description fetch all withdrawals made from an account
2007
- * @see https://coincatch.github.io/github.io/en/spot/#get-withdraw-list-v2
2008
- * @param {string} code unified currency code of the currency transferred
2009
- * @param {int} [since] the earliest time in ms to fetch transfers for (default 24 hours ago)
2010
- * @param {int} [limit] the maximum number of transfer structures to retrieve (default 50, max 200)
2011
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2012
- * @param {int} [params.until] the latest time in ms to fetch transfers for (default time now)
2013
- * @param {string} [params.clientOid] clientOid
2014
- * @param {string} [params.orderId] The response orderId
2015
- * @param {string} [params.idLessThan] Requests the content on the page before this ID (older data), the value input should be the orderId of the corresponding interface.
2016
- * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
2017
- */
2018
2018
  const methodName = 'fetchWithdrawals';
2019
2019
  await this.loadMarkets();
2020
2020
  const request = {};
@@ -2040,22 +2040,22 @@ class coincatch extends coincatch$1 {
2040
2040
  const data = this.safeList(response, 'data', []);
2041
2041
  return this.parseTransactions(data, currency, since, limit);
2042
2042
  }
2043
+ /**
2044
+ * @method
2045
+ * @name coincatch#withdraw
2046
+ * @description make a withdrawal
2047
+ * @see https://coincatch.github.io/github.io/en/spot/#withdraw
2048
+ * @param {string} code unified currency code
2049
+ * @param {float} amount the amount to withdraw
2050
+ * @param {string} address the address to withdraw to
2051
+ * @param {string} [tag]
2052
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2053
+ * @param {string} params.network network for withdraw (mandatory)
2054
+ * @param {string} [params.remark] remark
2055
+ * @param {string} [params.clientOid] custom id
2056
+ * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
2057
+ */
2043
2058
  async withdraw(code, amount, address, tag = undefined, params = {}) {
2044
- /**
2045
- * @method
2046
- * @name coincatch#withdraw
2047
- * @description make a withdrawal
2048
- * @see https://coincatch.github.io/github.io/en/spot/#withdraw
2049
- * @param {string} code unified currency code
2050
- * @param {float} amount the amount to withdraw
2051
- * @param {string} address the address to withdraw to
2052
- * @param {string} [tag]
2053
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2054
- * @param {string} params.network network for withdraw (mandatory)
2055
- * @param {string} [params.remark] remark
2056
- * @param {string} [params.clientOid] custom id
2057
- * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
2058
- */
2059
2059
  [tag, params] = this.handleWithdrawTagAndParams(tag, params);
2060
2060
  await this.loadMarkets();
2061
2061
  const currency = this.currency(code);
@@ -2166,17 +2166,17 @@ class coincatch extends coincatch$1 {
2166
2166
  'fee': fee,
2167
2167
  };
2168
2168
  }
2169
+ /**
2170
+ * @method
2171
+ * @name coincatch#createMarketBuyOrderWithCost
2172
+ * @description create a market buy order by providing the symbol and cost
2173
+ * @see https://coincatch.github.io/github.io/en/spot/#place-order
2174
+ * @param {string} symbol unified symbol of the market to create an order in
2175
+ * @param {float} cost how much you want to trade in units of the quote currency
2176
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2177
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2178
+ */
2169
2179
  async createMarketBuyOrderWithCost(symbol, cost, params = {}) {
2170
- /**
2171
- * @method
2172
- * @name coincatch#createMarketBuyOrderWithCost
2173
- * @description create a market buy order by providing the symbol and cost
2174
- * @see https://coincatch.github.io/github.io/en/spot/#place-order
2175
- * @param {string} symbol unified symbol of the market to create an order in
2176
- * @param {float} cost how much you want to trade in units of the quote currency
2177
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2178
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2179
- */
2180
2180
  await this.loadMarkets();
2181
2181
  const methodName = 'createMarketBuyOrderWithCost';
2182
2182
  const market = this.market(symbol);
@@ -2187,28 +2187,28 @@ class coincatch extends coincatch$1 {
2187
2187
  params['createMarketBuyOrderRequiresPrice'] = false;
2188
2188
  return await this.createOrder(symbol, 'market', 'buy', cost, undefined, params);
2189
2189
  }
2190
+ /**
2191
+ * @method
2192
+ * @name coincatch#createOrder
2193
+ * @description create a trade order
2194
+ * @see https://coincatch.github.io/github.io/en/spot/#place-order
2195
+ * @see https://coincatch.github.io/github.io/en/spot/#place-plan-order
2196
+ * @see https://coincatch.github.io/github.io/en/mix/#place-order
2197
+ * @see https://coincatch.github.io/github.io/en/mix/#place-plan-order
2198
+ * @param {string} symbol unified symbol of the market to create an order in
2199
+ * @param {string} type 'market' or 'limit' or 'LIMIT_MAKER' for spot, 'market' or 'limit' or 'STOP' for swap
2200
+ * @param {string} side 'buy' or 'sell'
2201
+ * @param {float} amount how much of you want to trade in units of the base currency
2202
+ * @param {float} [price] the price that the order is to be fulfilled, in units of the quote currency, ignored in market orders
2203
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2204
+ * @param {float} [params.cost] *spot market buy only* the quote quantity that can be used as an alternative for the amount
2205
+ * @param {float} [params.triggerPrice] the price that the order is to be triggered
2206
+ * @param {bool} [params.postOnly] if true, the order will only be posted to the order book and not executed immediately
2207
+ * @param {string} [params.timeInForce] 'GTC', 'IOC', 'FOK' or 'PO'
2208
+ * @param {string} [params.clientOrderId] a unique id for the order - is mandatory for swap
2209
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2210
+ */
2190
2211
  async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
2191
- /**
2192
- * @method
2193
- * @name coincatch#createOrder
2194
- * @description create a trade order
2195
- * @see https://coincatch.github.io/github.io/en/spot/#place-order
2196
- * @see https://coincatch.github.io/github.io/en/spot/#place-plan-order
2197
- * @see https://coincatch.github.io/github.io/en/mix/#place-order
2198
- * @see https://coincatch.github.io/github.io/en/mix/#place-plan-order
2199
- * @param {string} symbol unified symbol of the market to create an order in
2200
- * @param {string} type 'market' or 'limit' or 'LIMIT_MAKER' for spot, 'market' or 'limit' or 'STOP' for swap
2201
- * @param {string} side 'buy' or 'sell'
2202
- * @param {float} amount how much of you want to trade in units of the base currency
2203
- * @param {float} [price] the price that the order is to be fulfilled, in units of the quote currency, ignored in market orders
2204
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2205
- * @param {float} [params.cost] *spot market buy only* the quote quantity that can be used as an alternative for the amount
2206
- * @param {float} [params.triggerPrice] the price that the order is to be triggered
2207
- * @param {bool} [params.postOnly] if true, the order will only be posted to the order book and not executed immediately
2208
- * @param {string} [params.timeInForce] 'GTC', 'IOC', 'FOK' or 'PO'
2209
- * @param {string} [params.clientOrderId] a unique id for the order - is mandatory for swap
2210
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2211
- */
2212
2212
  await this.loadMarkets();
2213
2213
  params['methodName'] = this.safeString(params, 'methodName', 'createOrder');
2214
2214
  const market = this.market(symbol);
@@ -2222,26 +2222,26 @@ class coincatch extends coincatch$1 {
2222
2222
  throw new errors.NotSupported(this.id + ' createOrder() is not supported for ' + market['type'] + ' type of markets');
2223
2223
  }
2224
2224
  }
2225
+ /**
2226
+ * @method
2227
+ * @name coincatch#createSpotOrder
2228
+ * @description create a trade order on spot market
2229
+ * @see https://coincatch.github.io/github.io/en/spot/#place-order
2230
+ * @see https://coincatch.github.io/github.io/en/spot/#place-plan-order
2231
+ * @param {string} symbol unified symbol of the market to create an order in
2232
+ * @param {string} type 'market' or 'limit'
2233
+ * @param {string} side 'buy' or 'sell'
2234
+ * @param {float} amount how much of you want to trade in units of the base currency
2235
+ * @param {float} [price] the price that the order is to be fulfilled, in units of the quote currency, ignored in market orders
2236
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2237
+ * @param {float} [params.cost] *market buy only* the quote quantity that can be used as an alternative for the amount
2238
+ * @param {float} [params.triggerPrice] the price that the order is to be triggered at
2239
+ * @param {bool} [params.postOnly] if true, the order will only be posted to the order book and not executed immediately
2240
+ * @param {string} [params.timeInForce] 'GTC', 'IOC', 'FOK' or 'PO'
2241
+ * @param {string} [params.clientOrderId] a unique id for the order (max length 40)
2242
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2243
+ */
2225
2244
  async createSpotOrder(symbol, type, side, amount, price = undefined, params = {}) {
2226
- /**
2227
- * @method
2228
- * @name coincatch#createSpotOrder
2229
- * @description create a trade order on spot market
2230
- * @see https://coincatch.github.io/github.io/en/spot/#place-order
2231
- * @see https://coincatch.github.io/github.io/en/spot/#place-plan-order
2232
- * @param {string} symbol unified symbol of the market to create an order in
2233
- * @param {string} type 'market' or 'limit'
2234
- * @param {string} side 'buy' or 'sell'
2235
- * @param {float} amount how much of you want to trade in units of the base currency
2236
- * @param {float} [price] the price that the order is to be fulfilled, in units of the quote currency, ignored in market orders
2237
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2238
- * @param {float} [params.cost] *market buy only* the quote quantity that can be used as an alternative for the amount
2239
- * @param {float} [params.triggerPrice] the price that the order is to be triggered at
2240
- * @param {bool} [params.postOnly] if true, the order will only be posted to the order book and not executed immediately
2241
- * @param {string} [params.timeInForce] 'GTC', 'IOC', 'FOK' or 'PO'
2242
- * @param {string} [params.clientOrderId] a unique id for the order (max length 40)
2243
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2244
- */
2245
2245
  await this.loadMarkets();
2246
2246
  params['methodName'] = this.safeString(params, 'methodName', 'createSpotOrder');
2247
2247
  const request = this.createSpotOrderRequest(symbol, type, side, amount, price, params);
@@ -2272,7 +2272,7 @@ class coincatch extends coincatch$1 {
2272
2272
  /**
2273
2273
  * @method
2274
2274
  * @ignore
2275
- * @name hashkey#createSpotOrderRequest
2275
+ * @name coincatch#createSpotOrderRequest
2276
2276
  * @description helper function to build request
2277
2277
  * @param {string} symbol unified symbol of the market to create an order in
2278
2278
  * @param {string} type 'market' or 'limit'
@@ -2390,33 +2390,33 @@ class coincatch extends coincatch$1 {
2390
2390
  };
2391
2391
  return result;
2392
2392
  }
2393
+ /**
2394
+ * @method
2395
+ * @name coincatch#createSwapOrder
2396
+ * @description create a trade order on swap market
2397
+ * @see https://coincatch.github.io/github.io/en/mix/#place-order
2398
+ * @see https://coincatch.github.io/github.io/en/mix/#place-plan-order
2399
+ * @see https://coincatch.github.io/github.io/en/mix/#place-stop-order
2400
+ * @param {string} symbol unified symbol of the market to create an order in
2401
+ * @param {string} type 'market' or 'limit'
2402
+ * @param {string} side 'buy' or 'sell'
2403
+ * @param {float} amount how much of you want to trade in units of the base currency
2404
+ * @param {float} [price] the price that the order is to be fulfilled, in units of the quote currency, ignored in market orders
2405
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2406
+ * @param {bool} [params.postOnly] *non-trigger orders only* if true, the order will only be posted to the order book and not executed immediately
2407
+ * @param {bool} [params.reduceOnly] true or false whether the order is reduce only
2408
+ * @param {string} [params.timeInForce] *non-trigger orders only* 'GTC', 'FOK', 'IOC' or 'PO'
2409
+ * @param {string} [params.clientOrderId] a unique id for the order
2410
+ * @param {float} [params.triggerPrice] the price that the order is to be triggered at
2411
+ * @param {float} [params.stopLossPrice] The price at which a stop loss order is triggered at
2412
+ * @param {float} [params.takeProfitPrice] The price at which a take profit order is triggered at
2413
+ * @param {object} [params.takeProfit] *takeProfit object in params* containing the triggerPrice at which the attached take profit order will be triggered (perpetual swap markets only)
2414
+ * @param {float} [params.takeProfit.triggerPrice] take profit trigger price
2415
+ * @param {object} [params.stopLoss] *stopLoss object in params* containing the triggerPrice at which the attached stop loss order will be triggered (perpetual swap markets only)
2416
+ * @param {float} [params.stopLoss.triggerPrice] stop loss trigger price
2417
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2418
+ */
2393
2419
  async createSwapOrder(symbol, type, side, amount, price = undefined, params = {}) {
2394
- /**
2395
- * @method
2396
- * @name coincatch#createSwapOrder
2397
- * @description create a trade order on swap market
2398
- * @see https://coincatch.github.io/github.io/en/mix/#place-order
2399
- * @see https://coincatch.github.io/github.io/en/mix/#place-plan-order
2400
- * @see https://coincatch.github.io/github.io/en/mix/#place-stop-order
2401
- * @param {string} symbol unified symbol of the market to create an order in
2402
- * @param {string} type 'market' or 'limit'
2403
- * @param {string} side 'buy' or 'sell'
2404
- * @param {float} amount how much of you want to trade in units of the base currency
2405
- * @param {float} [price] the price that the order is to be fulfilled, in units of the quote currency, ignored in market orders
2406
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2407
- * @param {bool} [params.postOnly] *non-trigger orders only* if true, the order will only be posted to the order book and not executed immediately
2408
- * @param {bool} [params.reduceOnly] true or false whether the order is reduce only
2409
- * @param {string} [params.timeInForce] *non-trigger orders only* 'GTC', 'FOK', 'IOC' or 'PO'
2410
- * @param {string} [params.clientOrderId] a unique id for the order
2411
- * @param {float} [params.triggerPrice] the price that the order is to be triggered at
2412
- * @param {float} [params.stopLossPrice] The price at which a stop loss order is triggered at
2413
- * @param {float} [params.takeProfitPrice] The price at which a take profit order is triggered at
2414
- * @param {object} [params.takeProfit] *takeProfit object in params* containing the triggerPrice at which the attached take profit order will be triggered (perpetual swap markets only)
2415
- * @param {float} [params.takeProfit.triggerPrice] take profit trigger price
2416
- * @param {object} [params.stopLoss] *stopLoss object in params* containing the triggerPrice at which the attached stop loss order will be triggered (perpetual swap markets only)
2417
- * @param {float} [params.stopLoss.triggerPrice] stop loss trigger price
2418
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2419
- */
2420
2420
  params['methodName'] = this.safeString(params, 'methodName', 'createSwapOrder');
2421
2421
  await this.loadMarkets();
2422
2422
  const market = this.market(symbol);
@@ -2452,7 +2452,7 @@ class coincatch extends coincatch$1 {
2452
2452
  /**
2453
2453
  * @method
2454
2454
  * @ignore
2455
- * @name hashkey#createSwapOrderRequest
2455
+ * @name coincatch#createSwapOrderRequest
2456
2456
  * @description helper function to build request
2457
2457
  * @param {string} symbol unified symbol of the market to create an order in
2458
2458
  * @param {string} type 'market' or 'limit'
@@ -2613,21 +2613,21 @@ class coincatch extends coincatch$1 {
2613
2613
  params = this.omit(params, ['stopLoss', 'takeProfit', 'stopLossPrice', 'takeProfitPrice', 'triggerPrice', 'stopPrice', 'trailingPercent', 'trailingTriggerPrice']);
2614
2614
  return this.extend(request, params);
2615
2615
  }
2616
+ /**
2617
+ * @method
2618
+ * @name coincatch#createOrderWithTakeProfitAndStopLoss
2619
+ * @description *swap markets only* create an order with a stop loss or take profit attached (type 3)
2620
+ * @param {string} symbol unified symbol of the market to create an order in
2621
+ * @param {string} type 'market' or 'limit'
2622
+ * @param {string} side 'buy' or 'sell'
2623
+ * @param {float} amount how much you want to trade in units of the base currency or the number of contracts
2624
+ * @param {float} [price] the price to fulfill the order, in units of the quote currency, ignored in market orders
2625
+ * @param {float} [takeProfit] the take profit price, in units of the quote currency
2626
+ * @param {float} [stopLoss] the stop loss price, in units of the quote currency
2627
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2628
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2629
+ */
2616
2630
  async createOrderWithTakeProfitAndStopLoss(symbol, type, side, amount, price = undefined, takeProfit = undefined, stopLoss = undefined, params = {}) {
2617
- /**
2618
- * @method
2619
- * @name coincatch#createOrderWithTakeProfitAndStopLoss
2620
- * @description *swap markets only* create an order with a stop loss or take profit attached (type 3)
2621
- * @param {string} symbol unified symbol of the market to create an order in
2622
- * @param {string} type 'market' or 'limit'
2623
- * @param {string} side 'buy' or 'sell'
2624
- * @param {float} amount how much you want to trade in units of the base currency or the number of contracts
2625
- * @param {float} [price] the price to fulfill the order, in units of the quote currency, ignored in market orders
2626
- * @param {float} [takeProfit] the take profit price, in units of the quote currency
2627
- * @param {float} [stopLoss] the stop loss price, in units of the quote currency
2628
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2629
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2630
- */
2631
2631
  const methodName = 'createOrderWithTakeProfitAndStopLoss';
2632
2632
  await this.loadMarkets();
2633
2633
  const market = this.market(symbol);
@@ -2646,17 +2646,17 @@ class coincatch extends coincatch$1 {
2646
2646
  };
2647
2647
  return this.safeString(timeInForceMap, timeInForce, timeInForce);
2648
2648
  }
2649
+ /**
2650
+ * @method
2651
+ * @name coincatch#createOrders
2652
+ * @description create a list of trade orders (all orders should be of the same symbol)
2653
+ * @see https://hashkeyglobal-apidoc.readme.io/reference/create-multiple-orders
2654
+ * @see https://hashkeyglobal-apidoc.readme.io/reference/batch-create-new-futures-order
2655
+ * @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 (max 50 entries)
2656
+ * @param {object} [params] extra parameters specific to the api endpoint
2657
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2658
+ */
2649
2659
  async createOrders(orders, params = {}) {
2650
- /**
2651
- * @method
2652
- * @name coincatch#createOrders
2653
- * @description create a list of trade orders (all orders should be of the same symbol)
2654
- * @see https://hashkeyglobal-apidoc.readme.io/reference/create-multiple-orders
2655
- * @see https://hashkeyglobal-apidoc.readme.io/reference/batch-create-new-futures-order
2656
- * @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 (max 50 entries)
2657
- * @param {object} [params] extra parameters specific to the api endpoint
2658
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2659
- */
2660
2660
  await this.loadMarkets();
2661
2661
  // same symbol for all orders
2662
2662
  const methodName = 'createOrders';
@@ -2782,21 +2782,21 @@ class coincatch extends coincatch$1 {
2782
2782
  throw new errors.NotSupported(this.id + ' ' + methodName + '() is not supported for ' + market['type'] + ' type of markets');
2783
2783
  }
2784
2784
  }
2785
+ /**
2786
+ * @method
2787
+ * @name coincatch#editOrder
2788
+ * @description edit a trade trigger, stop-looss or take-profit order
2789
+ * @see https://coincatch.github.io/github.io/en/spot/#modify-plan-order
2790
+ * @param {string} id order id
2791
+ * @param {string} symbol unified symbol of the market to create an order in
2792
+ * @param {string} type 'market' or 'limit'
2793
+ * @param {string} side 'buy' or 'sell'
2794
+ * @param {float} amount how much of currency you want to trade in units of base currency
2795
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
2796
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2797
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2798
+ */
2785
2799
  async editOrder(id, symbol, type, side, amount = undefined, price = undefined, params = {}) {
2786
- /**
2787
- * @method
2788
- * @name coincatch#editOrder
2789
- * @description edit a trade trigger, stop-looss or take-profit order
2790
- * @see https://coincatch.github.io/github.io/en/spot/#modify-plan-order
2791
- * @param {string} id order id
2792
- * @param {string} symbol unified symbol of the market to create an order in
2793
- * @param {string} type 'market' or 'limit'
2794
- * @param {string} side 'buy' or 'sell'
2795
- * @param {float} amount how much of currency you want to trade in units of base currency
2796
- * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
2797
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2798
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2799
- */
2800
2800
  const methodName = 'editOrder';
2801
2801
  // only trigger, stop-looss or take-profit orders can be edited
2802
2802
  params['methodName'] = methodName;
@@ -2810,25 +2810,25 @@ class coincatch extends coincatch$1 {
2810
2810
  throw new errors.NotSupported(this.id + ' ' + methodName + '() is not supported for ' + market['type'] + ' type of markets');
2811
2811
  }
2812
2812
  }
2813
+ /**
2814
+ * @method
2815
+ * @name coincatch#editSpotOrder
2816
+ * @ignore
2817
+ * @description edit a trade order
2818
+ * @see https://coincatch.github.io/github.io/en/spot/#modify-plan-order
2819
+ * @param {string} id order id
2820
+ * @param {string} symbol unified symbol of the market to create an order in
2821
+ * @param {string} type 'market' or 'limit'
2822
+ * @param {string} side 'buy' or 'sell'
2823
+ * @param {float} amount how much of currency you want to trade in units of base currency
2824
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
2825
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2826
+ * @param {string} [params.clientOrderId] a unique id for the order that can be used as an alternative for the id
2827
+ * @param {string} params.triggerPrice *mandatory* the price that the order is to be triggered at
2828
+ * @param {float} [params.cost] *market buy only* the quote quantity that can be used as an alternative for the amount
2829
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2830
+ */
2813
2831
  async editSpotOrder(id, symbol, type, side, amount, price = undefined, params = {}) {
2814
- /**
2815
- * @method
2816
- * @name coincatch#editSpotOrder
2817
- * @ignore
2818
- * @description edit a trade order
2819
- * @see https://coincatch.github.io/github.io/en/spot/#modify-plan-order
2820
- * @param {string} id order id
2821
- * @param {string} symbol unified symbol of the market to create an order in
2822
- * @param {string} type 'market' or 'limit'
2823
- * @param {string} side 'buy' or 'sell'
2824
- * @param {float} amount how much of currency you want to trade in units of base currency
2825
- * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
2826
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2827
- * @param {string} [params.clientOrderId] a unique id for the order that can be used as an alternative for the id
2828
- * @param {string} params.triggerPrice *mandatory* the price that the order is to be triggered at
2829
- * @param {float} [params.cost] *market buy only* the quote quantity that can be used as an alternative for the amount
2830
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2831
- */
2832
2832
  await this.loadMarkets();
2833
2833
  let methodName = 'editSpotOrder';
2834
2834
  [methodName, params] = this.handleParamString(params, 'methodName', methodName);
@@ -2886,20 +2886,20 @@ class coincatch extends coincatch$1 {
2886
2886
  const data = this.safeDict(response, 'data', {});
2887
2887
  return this.parseOrder(data, market);
2888
2888
  }
2889
+ /**
2890
+ * @method
2891
+ * @name coincatch#fetchOrder
2892
+ * @description fetches information on an order made by the user (non-trigger orders only)
2893
+ * @see https://coincatch.github.io/github.io/en/spot/#get-order-details
2894
+ * @see https://coincatch.github.io/github.io/en/mix/#get-order-details
2895
+ * @param {string} id the order id
2896
+ * @param {string} symbol unified symbol of the market the order was made in (is mandatory for swap)
2897
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2898
+ * @param {string} [params.type] 'spot' or 'swap' - the type of the market to fetch entry for (default 'spot')
2899
+ * @param {string} [params.clientOrderId] a unique id for the order that can be used as an alternative for the id
2900
+ * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2901
+ */
2889
2902
  async fetchOrder(id, symbol = undefined, params = {}) {
2890
- /**
2891
- * @method
2892
- * @name coincatch#fetchOrder
2893
- * @description fetches information on an order made by the user (non-trigger orders only)
2894
- * @see https://coincatch.github.io/github.io/en/spot/#get-order-details
2895
- * @see https://coincatch.github.io/github.io/en/mix/#get-order-details
2896
- * @param {string} id the order id
2897
- * @param {string} symbol unified symbol of the market the order was made in (is mandatory for swap)
2898
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2899
- * @param {string} [params.type] 'spot' or 'swap' - the type of the market to fetch entry for (default 'spot')
2900
- * @param {string} [params.clientOrderId] a unique id for the order that can be used as an alternative for the id
2901
- * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2902
- */
2903
2903
  const methodName = 'fetchOrder';
2904
2904
  // for non-trigger orders only
2905
2905
  await this.loadMarkets();
@@ -3018,27 +3018,27 @@ class coincatch extends coincatch$1 {
3018
3018
  }
3019
3019
  return this.parseOrder(order, market);
3020
3020
  }
3021
+ /**
3022
+ * @method
3023
+ * @name coincatch#fetchOpenOrders
3024
+ * @description fetch all unfilled currently open orders
3025
+ * @see https://coincatch.github.io/github.io/en/spot/#get-order-list
3026
+ * @see https://coincatch.github.io/github.io/en/spot/#get-current-plan-orders
3027
+ * @see https://coincatch.github.io/github.io/en/mix/#get-open-order
3028
+ * @see https://coincatch.github.io/github.io/en/mix/#get-all-open-order
3029
+ * @see https://coincatch.github.io/github.io/en/mix/#get-plan-order-tpsl-list
3030
+ * @param {string} [symbol] unified market symbol of the market orders were made in
3031
+ * @param {int} [since] the earliest time in ms to fetch orders for
3032
+ * @param {int} [limit] the maximum number of order structures to retrieve
3033
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3034
+ * @param {boolean} [params.trigger] true if fetching trigger orders (default false)
3035
+ * @param {string} [params.type] 'spot' or 'swap' - the type of the market to fetch entries for (default 'spot')
3036
+ * @param {string} [params.productType] *swap only* 'umcbl' or 'dmcbl' - the product type of the market to fetch entries for (default 'umcbl')
3037
+ * @param {string} [params.marginCoin] *swap only* the margin coin of the market to fetch entries for
3038
+ * @param {string} [params.isPlan] *swap trigger only* 'plan' or 'profit_loss' ('plan' (default) for trigger (plan) orders, 'profit_loss' for stop-loss and take-profit orders)
3039
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
3040
+ */
3021
3041
  async fetchOpenOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
3022
- /**
3023
- * @method
3024
- * @name coincatch#fetchOpenOrders
3025
- * @description fetch all unfilled currently open orders
3026
- * @see https://coincatch.github.io/github.io/en/spot/#get-order-list
3027
- * @see https://coincatch.github.io/github.io/en/spot/#get-current-plan-orders
3028
- * @see https://coincatch.github.io/github.io/en/mix/#get-open-order
3029
- * @see https://coincatch.github.io/github.io/en/mix/#get-all-open-order
3030
- * @see https://coincatch.github.io/github.io/en/mix/#get-plan-order-tpsl-list
3031
- * @param {string} [symbol] unified market symbol of the market orders were made in
3032
- * @param {int} [since] the earliest time in ms to fetch orders for
3033
- * @param {int} [limit] the maximum number of order structures to retrieve
3034
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3035
- * @param {boolean} [params.trigger] true if fetching trigger orders (default false)
3036
- * @param {string} [params.type] 'spot' or 'swap' - the type of the market to fetch entries for (default 'spot')
3037
- * @param {string} [params.productType] *swap only* 'umcbl' or 'dmcbl' - the product type of the market to fetch entries for (default 'umcbl')
3038
- * @param {string} [params.marginCoin] *swap only* the margin coin of the market to fetch entries for
3039
- * @param {string} [params.isPlan] *swap trigger only* 'plan' or 'profit_loss' ('plan' (default) for trigger (plan) orders, 'profit_loss' for stop-loss and take-profit orders)
3040
- * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
3041
- */
3042
3042
  const methodName = 'fetchOpenOrders';
3043
3043
  await this.loadMarkets();
3044
3044
  let market = undefined;
@@ -3058,22 +3058,22 @@ class coincatch extends coincatch$1 {
3058
3058
  throw new errors.NotSupported(this.id + ' ' + methodName + '() is not supported for ' + marketType + ' type of markets');
3059
3059
  }
3060
3060
  }
3061
+ /**
3062
+ * @method
3063
+ * @ignore
3064
+ * @name coincatch#fetchOpenSpotOrders
3065
+ * @description fetch all unfilled currently open orders for spot markets
3066
+ * @see https://coincatch.github.io/github.io/en/spot/#get-order-list
3067
+ * @see https://coincatch.github.io/github.io/en/spot/#get-current-plan-orders
3068
+ * @param {string} [symbol] unified market symbol of the market orders were made in
3069
+ * @param {int} [since] the earliest time in ms to fetch orders for
3070
+ * @param {int} [limit] the maximum number of order structures to retrieve
3071
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3072
+ * @param {boolean} [params.trigger] true if fetching trigger orders (default false)
3073
+ * @param {string} [params.lastEndId] *for trigger orders only* the last order id to fetch entries after
3074
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
3075
+ */
3061
3076
  async fetchOpenSpotOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
3062
- /**
3063
- * @method
3064
- * @ignore
3065
- * @name coincatch#fetchOpenSpotOrders
3066
- * @description fetch all unfilled currently open orders for spot markets
3067
- * @see https://coincatch.github.io/github.io/en/spot/#get-order-list
3068
- * @see https://coincatch.github.io/github.io/en/spot/#get-current-plan-orders
3069
- * @param {string} [symbol] unified market symbol of the market orders were made in
3070
- * @param {int} [since] the earliest time in ms to fetch orders for
3071
- * @param {int} [limit] the maximum number of order structures to retrieve
3072
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3073
- * @param {boolean} [params.trigger] true if fetching trigger orders (default false)
3074
- * @param {string} [params.lastEndId] *for trigger orders only* the last order id to fetch entries after
3075
- * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
3076
- */
3077
3077
  await this.loadMarkets();
3078
3078
  let methodName = 'fetchOpenSpotOrders';
3079
3079
  [methodName, params] = this.handleParamString(params, 'methodName', methodName);
@@ -3160,25 +3160,25 @@ class coincatch extends coincatch$1 {
3160
3160
  }
3161
3161
  return this.parseOrders(result, market, since, limit);
3162
3162
  }
3163
+ /**
3164
+ * @method
3165
+ * @ignore
3166
+ * @name coincatch#fetchOpenSwapOrders
3167
+ * @description fetch all unfilled currently open orders for swap markets
3168
+ * @see https://coincatch.github.io/github.io/en/mix/#get-open-order
3169
+ * @see https://coincatch.github.io/github.io/en/mix/#get-all-open-order
3170
+ * @see https://coincatch.github.io/github.io/en/mix/#get-plan-order-tpsl-list
3171
+ * @param {string} [symbol] unified market symbol of the market orders were made in
3172
+ * @param {int} [since] the earliest time in ms to fetch orders for
3173
+ * @param {int} [limit] the maximum number of order structures to retrieve
3174
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3175
+ * @param {boolean} [params.trigger] true if fetching trigger orders (default false)
3176
+ * @param {string} [params.isPlan] 'plan' or 'profit_loss' ('plan' (default) for trigger (plan) orders, 'profit_loss' for stop-loss and take-profit orders)
3177
+ * @param {string} [params.productType] 'umcbl' or 'dmcbl' - the product type of the market to fetch entries for (default 'umcbl')
3178
+ * @param {string} [params.marginCoin] the margin coin of the market to fetch entries for
3179
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
3180
+ */
3163
3181
  async fetchOpenSwapOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
3164
- /**
3165
- * @method
3166
- * @ignore
3167
- * @name coincatch#fetchOpenSwapOrders
3168
- * @description fetch all unfilled currently open orders for swap markets
3169
- * @see https://coincatch.github.io/github.io/en/mix/#get-open-order
3170
- * @see https://coincatch.github.io/github.io/en/mix/#get-all-open-order
3171
- * @see https://coincatch.github.io/github.io/en/mix/#get-plan-order-tpsl-list
3172
- * @param {string} [symbol] unified market symbol of the market orders were made in
3173
- * @param {int} [since] the earliest time in ms to fetch orders for
3174
- * @param {int} [limit] the maximum number of order structures to retrieve
3175
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3176
- * @param {boolean} [params.trigger] true if fetching trigger orders (default false)
3177
- * @param {string} [params.isPlan] 'plan' or 'profit_loss' ('plan' (default) for trigger (plan) orders, 'profit_loss' for stop-loss and take-profit orders)
3178
- * @param {string} [params.productType] 'umcbl' or 'dmcbl' - the product type of the market to fetch entries for (default 'umcbl')
3179
- * @param {string} [params.marginCoin] the margin coin of the market to fetch entries for
3180
- * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
3181
- */
3182
3182
  await this.loadMarkets();
3183
3183
  let methodName = 'fetchOpenSwapOrders';
3184
3184
  [methodName, params] = this.handleParamString(params, 'methodName', methodName);
@@ -3294,27 +3294,27 @@ class coincatch extends coincatch$1 {
3294
3294
  const data = this.safeList(response, 'data', []);
3295
3295
  return this.parseOrders(data, market, since, limit);
3296
3296
  }
3297
+ /**
3298
+ * @method
3299
+ * @name coincatch#fetchCanceledAndClosedOrders
3300
+ * @description fetches information on multiple canceled and closed orders made by the user
3301
+ * @see https://coincatch.github.io/github.io/en/spot/#get-order-list
3302
+ * @see https://coincatch.github.io/github.io/en/spot/#get-history-plan-orders
3303
+ * @see https://coincatch.github.io/github.io/en/mix/#get-history-orders
3304
+ * @see https://coincatch.github.io/github.io/en/mix/#get-producttype-history-orders
3305
+ * @see https://coincatch.github.io/github.io/en/mix/#get-history-plan-orders-tpsl
3306
+ * @param {string} symbol *is mandatory* unified market symbol of the market orders were made in
3307
+ * @param {int} [since] the earliest time in ms to fetch orders for
3308
+ * @param {int} [limit] the maximum number of order structures to retrieve
3309
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3310
+ * @param {int} [params.until] the latest time in ms to fetch orders for
3311
+ * @param {boolean} [params.trigger] true if fetching trigger orders (default false)
3312
+ * @param {string} [params.isPlan] *swap only* 'plan' or 'profit_loss' ('plan' (default) for trigger (plan) orders, 'profit_loss' for stop-loss and take-profit orders)
3313
+ * @param {string} [params.type] 'spot' or 'swap' - the type of the market to fetch entries for (default 'spot')
3314
+ * @param {string} [params.productType] *swap only* 'umcbl' or 'dmcbl' - the product type of the market to fetch entries for (default 'umcbl')
3315
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
3316
+ */
3297
3317
  async fetchCanceledAndClosedOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
3298
- /**
3299
- * @method
3300
- * @name coincatch#fetchCanceledAndClosedOrders
3301
- * @description fetches information on multiple canceled and closed orders made by the user
3302
- * @see https://coincatch.github.io/github.io/en/spot/#get-order-list
3303
- * @see https://coincatch.github.io/github.io/en/spot/#get-history-plan-orders
3304
- * @see https://coincatch.github.io/github.io/en/mix/#get-history-orders
3305
- * @see https://coincatch.github.io/github.io/en/mix/#get-producttype-history-orders
3306
- * @see https://coincatch.github.io/github.io/en/mix/#get-history-plan-orders-tpsl
3307
- * @param {string} symbol *is mandatory* unified market symbol of the market orders were made in
3308
- * @param {int} [since] the earliest time in ms to fetch orders for
3309
- * @param {int} [limit] the maximum number of order structures to retrieve
3310
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3311
- * @param {int} [params.until] the latest time in ms to fetch orders for
3312
- * @param {boolean} [params.trigger] true if fetching trigger orders (default false)
3313
- * @param {string} [params.isPlan] *swap only* 'plan' or 'profit_loss' ('plan' (default) for trigger (plan) orders, 'profit_loss' for stop-loss and take-profit orders)
3314
- * @param {string} [params.type] 'spot' or 'swap' - the type of the market to fetch entries for (default 'spot')
3315
- * @param {string} [params.productType] *swap only* 'umcbl' or 'dmcbl' - the product type of the market to fetch entries for (default 'umcbl')
3316
- * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
3317
- */
3318
3318
  const methodName = 'fetchCanceledAndClosedOrders';
3319
3319
  await this.loadMarkets();
3320
3320
  let market = undefined;
@@ -3334,23 +3334,23 @@ class coincatch extends coincatch$1 {
3334
3334
  throw new errors.NotSupported(this.id + ' ' + methodName + '() is not supported for ' + marketType + ' type of markets');
3335
3335
  }
3336
3336
  }
3337
+ /**
3338
+ * @method
3339
+ * @ignore
3340
+ * @name coincatch#fetchCanceledAndClosedSpotOrders
3341
+ * @description fetches information on multiple canceled and closed orders made by the user on spot markets
3342
+ * @see https://coincatch.github.io/github.io/en/spot/#get-order-history
3343
+ * @see https://coincatch.github.io/github.io/en/spot/#get-history-plan-orders
3344
+ * @param {string} symbol *is mandatory* unified market symbol of the market orders were made in
3345
+ * @param {int} [since] the earliest time in ms to fetch orders for
3346
+ * @param {int} [limit] the maximum number of order structures to retrieve
3347
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3348
+ * @param {int} [params.until] *for trigger orders only* the latest time in ms to fetch orders for
3349
+ * @param {boolean} [params.trigger] true if fetching trigger orders (default false)
3350
+ * @param {string} [params.lastEndId] *for trigger orders only* the last order id to fetch entries after
3351
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
3352
+ */
3337
3353
  async fetchCanceledAndClosedSpotOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
3338
- /**
3339
- * @method
3340
- * @ignore
3341
- * @name coincatch#fetchCanceledAndClosedSpotOrders
3342
- * @description fetches information on multiple canceled and closed orders made by the user on spot markets
3343
- * @see https://coincatch.github.io/github.io/en/spot/#get-order-history
3344
- * @see https://coincatch.github.io/github.io/en/spot/#get-history-plan-orders
3345
- * @param {string} symbol *is mandatory* unified market symbol of the market orders were made in
3346
- * @param {int} [since] the earliest time in ms to fetch orders for
3347
- * @param {int} [limit] the maximum number of order structures to retrieve
3348
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3349
- * @param {int} [params.until] *for trigger orders only* the latest time in ms to fetch orders for
3350
- * @param {boolean} [params.trigger] true if fetching trigger orders (default false)
3351
- * @param {string} [params.lastEndId] *for trigger orders only* the last order id to fetch entries after
3352
- * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
3353
- */
3354
3354
  let methodName = 'fetchCanceledAndClosedSpotOrders';
3355
3355
  [methodName, params] = this.handleParamString(params, 'methodName', methodName);
3356
3356
  if (symbol === undefined) {
@@ -3480,25 +3480,25 @@ class coincatch extends coincatch$1 {
3480
3480
  }
3481
3481
  return this.parseOrders(result, market, since, limit);
3482
3482
  }
3483
+ /**
3484
+ * @method
3485
+ * @ignore
3486
+ * @name coincatch#fetchCanceledAndClosedSwapOrders
3487
+ * @description fetches information on multiple canceled and closed orders made by the user on swap markets
3488
+ * @see https://coincatch.github.io/github.io/en/mix/#get-history-orders
3489
+ * @see https://coincatch.github.io/github.io/en/mix/#get-producttype-history-orders
3490
+ * @see https://coincatch.github.io/github.io/en/mix/#get-history-plan-orders-tpsl
3491
+ * @param {string} [symbol] unified market symbol of the market orders were made in
3492
+ * @param {int} [since] the earliest time in ms to fetch orders for
3493
+ * @param {int} [limit] the maximum number of order structures to retrieve
3494
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3495
+ * @param {int} [params.until] the latest time in ms to fetch orders for
3496
+ * @param {boolean} [params.trigger] true if fetching trigger orders (default false)
3497
+ * @param {string} [params.isPlan] *swap only* 'plan' or 'profit_loss' ('plan' (default) for trigger (plan) orders, 'profit_loss' for stop-loss and take-profit orders)
3498
+ * @param {string} [params.productType] *swap only* 'umcbl' or 'dmcbl' - the product type of the market to fetch entries for (default 'umcbl')
3499
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
3500
+ */
3483
3501
  async fetchCanceledAndClosedSwapOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
3484
- /**
3485
- * @method
3486
- * @ignore
3487
- * @name coincatch#fetchCanceledAndClosedSwapOrders
3488
- * @description fetches information on multiple canceled and closed orders made by the user on swap markets
3489
- * @see https://coincatch.github.io/github.io/en/mix/#get-history-orders
3490
- * @see https://coincatch.github.io/github.io/en/mix/#get-producttype-history-orders
3491
- * @see https://coincatch.github.io/github.io/en/mix/#get-history-plan-orders-tpsl
3492
- * @param {string} [symbol] unified market symbol of the market orders were made in
3493
- * @param {int} [since] the earliest time in ms to fetch orders for
3494
- * @param {int} [limit] the maximum number of order structures to retrieve
3495
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3496
- * @param {int} [params.until] the latest time in ms to fetch orders for
3497
- * @param {boolean} [params.trigger] true if fetching trigger orders (default false)
3498
- * @param {string} [params.isPlan] *swap only* 'plan' or 'profit_loss' ('plan' (default) for trigger (plan) orders, 'profit_loss' for stop-loss and take-profit orders)
3499
- * @param {string} [params.productType] *swap only* 'umcbl' or 'dmcbl' - the product type of the market to fetch entries for (default 'umcbl')
3500
- * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
3501
- */
3502
3502
  let methodName = 'fetchCanceledAndClosedSwapOrders';
3503
3503
  [methodName, params] = this.handleParamString(params, 'methodName', methodName);
3504
3504
  let requestSince = since;
@@ -3640,24 +3640,24 @@ class coincatch extends coincatch$1 {
3640
3640
  }
3641
3641
  return this.parseOrders(result, market);
3642
3642
  }
3643
+ /**
3644
+ * @method
3645
+ * @name coincatch#cancelOrder
3646
+ * @description cancels an open order
3647
+ * @see https://coincatch.github.io/github.io/en/spot/#cancel-order-v2
3648
+ * @see https://coincatch.github.io/github.io/en/spot/#cancel-plan-order
3649
+ * @see https://coincatch.github.io/github.io/en/mix/#cancel-order
3650
+ * @see https://coincatch.github.io/github.io/en/mix/#cancel-plan-order-tpsl
3651
+ * @param {string} id order id
3652
+ * @param {string} symbol unified symbol of the market the order was made in
3653
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3654
+ * @param {string} [params.clientOrderId] a unique id for the order that can be used as an alternative for the id
3655
+ * @param {bool} [params.trigger] true for canceling a trigger order (default false)
3656
+ * @param {bool} [params.stop] *swap only* an alternative for trigger param
3657
+ * @param {string} [params.planType] *swap trigger only* the type of the plan order to cancel: 'profit_plan' - profit order, 'loss_plan' - loss order, 'normal_plan' - plan order, 'pos_profit' - position profit, 'pos_loss' - position loss, 'moving_plan' - Trailing TP/SL, 'track_plan' - Trailing Stop
3658
+ * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
3659
+ */
3643
3660
  async cancelOrder(id, symbol = undefined, params = {}) {
3644
- /**
3645
- * @method
3646
- * @name coincatch#cancelOrder
3647
- * @description cancels an open order
3648
- * @see https://coincatch.github.io/github.io/en/spot/#cancel-order-v2
3649
- * @see https://coincatch.github.io/github.io/en/spot/#cancel-plan-order
3650
- * @see https://coincatch.github.io/github.io/en/mix/#cancel-order
3651
- * @see https://coincatch.github.io/github.io/en/mix/#cancel-plan-order-tpsl
3652
- * @param {string} id order id
3653
- * @param {string} symbol unified symbol of the market the order was made in
3654
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3655
- * @param {string} [params.clientOrderId] a unique id for the order that can be used as an alternative for the id
3656
- * @param {bool} [params.trigger] true for canceling a trigger order (default false)
3657
- * @param {bool} [params.stop] *swap only* an alternative for trigger param
3658
- * @param {string} [params.planType] *swap trigger only* the type of the plan order to cancel: 'profit_plan' - profit order, 'loss_plan' - loss order, 'normal_plan' - plan order, 'pos_profit' - position profit, 'pos_loss' - position loss, 'moving_plan' - Trailing TP/SL, 'track_plan' - Trailing Stop
3659
- * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
3660
- */
3661
3661
  const methodName = 'cancelOrder';
3662
3662
  if (symbol === undefined) {
3663
3663
  throw new errors.ArgumentsRequired(this.id + ' ' + methodName + ' () requires a symbol argument');
@@ -3712,26 +3712,26 @@ class coincatch extends coincatch$1 {
3712
3712
  const data = this.safeDict(response, 'data', {});
3713
3713
  return this.parseOrder(data, market);
3714
3714
  }
3715
+ /**
3716
+ * @method
3717
+ * @name coincatch#cancelAllOrders
3718
+ * @description cancels all open orders
3719
+ * @see https://coincatch.github.io/github.io/en/spot/#cancel-all-orders
3720
+ * @see https://coincatch.github.io/github.io/en/spot/#batch-cancel-plan-orders
3721
+ * @see https://coincatch.github.io/github.io/en/mix/#batch-cancel-order
3722
+ * @see https://coincatch.github.io/github.io/en/mix/#cancel-order-by-symbol
3723
+ * @see https://coincatch.github.io/github.io/en/mix/#cancel-plan-order-tpsl-by-symbol
3724
+ * @see https://coincatch.github.io/github.io/en/mix/#cancel-all-trigger-order-tpsl
3725
+ * @param {string} [symbol] unified symbol of the market the orders were made in
3726
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3727
+ * @param {string} [params.type] 'spot' or 'swap' - the type of the market to cancel orders for (default 'spot')
3728
+ * @param {bool} [params.trigger] true for canceling a trigger orders (default false)
3729
+ * @param {string} [params.productType] *swap only (if symbol is not provided* 'umcbl' or 'dmcbl' - the product type of the market to cancel orders for (default 'umcbl')
3730
+ * @param {string} [params.marginCoin] *mandatory for swap non-trigger dmcb (if symbol is not provided)* the margin coin of the market to cancel orders for
3731
+ * @param {string} [params.planType] *swap trigger only* the type of the plan order to cancel: 'profit_plan' - profit order, 'loss_plan' - loss order, 'normal_plan' - plan order, 'pos_profit' - position profit, 'pos_loss' - position loss, 'moving_plan' - Trailing TP/SL, 'track_plan' - Trailing Stop
3732
+ * @returns {object} response from the exchange
3733
+ */
3715
3734
  async cancelAllOrders(symbol = undefined, params = {}) {
3716
- /**
3717
- * @method
3718
- * @name coincatch#cancelAllOrders
3719
- * @description cancels all open orders
3720
- * @see https://coincatch.github.io/github.io/en/spot/#cancel-all-orders
3721
- * @see https://coincatch.github.io/github.io/en/spot/#batch-cancel-plan-orders
3722
- * @see https://coincatch.github.io/github.io/en/mix/#batch-cancel-order
3723
- * @see https://coincatch.github.io/github.io/en/mix/#cancel-order-by-symbol
3724
- * @see https://coincatch.github.io/github.io/en/mix/#cancel-plan-order-tpsl-by-symbol
3725
- * @see https://coincatch.github.io/github.io/en/mix/#cancel-all-trigger-order-tpsl
3726
- * @param {string} [symbol] unified symbol of the market the orders were made in
3727
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3728
- * @param {string} [params.type] 'spot' or 'swap' - the type of the market to cancel orders for (default 'spot')
3729
- * @param {bool} [params.trigger] true for canceling a trigger orders (default false)
3730
- * @param {string} [params.productType] *swap only (if symbol is not provided* 'umcbl' or 'dmcbl' - the product type of the market to cancel orders for (default 'umcbl')
3731
- * @param {string} [params.marginCoin] *mandatory for swap non-trigger dmcb (if symbol is not provided)* the margin coin of the market to cancel orders for
3732
- * @param {string} [params.planType] *swap trigger only* the type of the plan order to cancel: 'profit_plan' - profit order, 'loss_plan' - loss order, 'normal_plan' - plan order, 'pos_profit' - position profit, 'pos_loss' - position loss, 'moving_plan' - Trailing TP/SL, 'track_plan' - Trailing Stop
3733
- * @returns {object} response from the exchange
3734
- */
3735
3735
  const methodName = 'cancelAllOrders';
3736
3736
  await this.loadMarkets();
3737
3737
  let market = undefined;
@@ -3847,18 +3847,18 @@ class coincatch extends coincatch$1 {
3847
3847
  order['info'] = response;
3848
3848
  return [order];
3849
3849
  }
3850
+ /**
3851
+ * @method
3852
+ * @name coincatch#cancelOrders
3853
+ * @description cancel multiple non-trigger orders
3854
+ * @see https://coincatch.github.io/github.io/en/spot/#cancel-order-in-batch-v2-single-instruments
3855
+ * @param {string[]} ids order ids
3856
+ * @param {string} symbol *is mandatory* unified market symbol
3857
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3858
+ * @param {string[]} [params.clientOrderIds] client order ids
3859
+ * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
3860
+ */
3850
3861
  async cancelOrders(ids, symbol = undefined, params = {}) {
3851
- /**
3852
- * @method
3853
- * @name coincatch#cancelOrders
3854
- * @description cancel multiple non-trigger orders
3855
- * @see https://coincatch.github.io/github.io/en/spot/#cancel-order-in-batch-v2-single-instruments
3856
- * @param {string[]} ids order ids
3857
- * @param {string} symbol *is mandatory* unified market symbol
3858
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3859
- * @param {string[]} [params.clientOrderIds] client order ids
3860
- * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
3861
- */
3862
3862
  const methodName = 'cancelOrders';
3863
3863
  // only non-trigger and not tp/sl orders can be canceled via cancelOrders
3864
3864
  if (symbol === undefined) {
@@ -4229,22 +4229,22 @@ class coincatch extends coincatch$1 {
4229
4229
  }
4230
4230
  return result;
4231
4231
  }
4232
+ /**
4233
+ * @method
4234
+ * @name coincatch#fetchMyTrades
4235
+ * @description fetch all trades made by the user
4236
+ * @see https://coincatch.github.io/github.io/en/spot/#get-transaction-details
4237
+ * @see https://coincatch.github.io/github.io/en/mix/#get-order-fill-detail
4238
+ * @see https://coincatch.github.io/github.io/en/mix/#get-producttype-order-fill-detail
4239
+ * @param {string} symbol *is mandatory* unified market symbol
4240
+ * @param {int} [since] the earliest time in ms to fetch trades for
4241
+ * @param {int} [limit] the maximum amount of trades to fetch
4242
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4243
+ * @param {int} [params.until] *swap markets only* the latest time in ms to fetch trades for, only supports the last 30 days timeframe
4244
+ * @param {string} [params.lastEndId] *swap markets only* query the data after this tradeId
4245
+ * @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
4246
+ */
4232
4247
  async fetchMyTrades(symbol = undefined, since = undefined, limit = undefined, params = {}) {
4233
- /**
4234
- * @method
4235
- * @name coincatch#fetchMyTrades
4236
- * @description fetch all trades made by the user
4237
- * @see https://coincatch.github.io/github.io/en/spot/#get-transaction-details
4238
- * @see https://coincatch.github.io/github.io/en/mix/#get-order-fill-detail
4239
- * @see https://coincatch.github.io/github.io/en/mix/#get-producttype-order-fill-detail
4240
- * @param {string} symbol *is mandatory* unified market symbol
4241
- * @param {int} [since] the earliest time in ms to fetch trades for
4242
- * @param {int} [limit] the maximum amount of trades to fetch
4243
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4244
- * @param {int} [params.until] *swap markets only* the latest time in ms to fetch trades for, only supports the last 30 days timeframe
4245
- * @param {string} [params.lastEndId] *swap markets only* query the data after this tradeId
4246
- * @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
4247
- */
4248
4248
  let methodName = 'fetchMyTrades';
4249
4249
  [methodName, params] = this.handleParamString(params, 'methodName', methodName);
4250
4250
  await this.loadMarkets();
@@ -4381,19 +4381,19 @@ class coincatch extends coincatch$1 {
4381
4381
  const data = this.safeList(response, 'data', []);
4382
4382
  return this.parseTrades(data, market, since, limit);
4383
4383
  }
4384
+ /**
4385
+ * @method
4386
+ * @name coincatch#fetchOrderTrades
4387
+ * @description fetch all the trades made from a single order
4388
+ * @see https://coincatch.github.io/github.io/en/spot/#get-transaction-details
4389
+ * @param {string} id order id
4390
+ * @param {string} symbol unified market symbol
4391
+ * @param {int} [since] the earliest time in ms to fetch trades for
4392
+ * @param {int} [limit] the maximum number of trades to retrieve
4393
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4394
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
4395
+ */
4384
4396
  async fetchOrderTrades(id, symbol = undefined, since = undefined, limit = undefined, params = {}) {
4385
- /**
4386
- * @method
4387
- * @name coincatch#fetchOrderTrades
4388
- * @description fetch all the trades made from a single order
4389
- * @see https://coincatch.github.io/github.io/en/spot/#get-transaction-details
4390
- * @param {string} id order id
4391
- * @param {string} symbol unified market symbol
4392
- * @param {int} [since] the earliest time in ms to fetch trades for
4393
- * @param {int} [limit] the maximum number of trades to retrieve
4394
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4395
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
4396
- */
4397
4397
  const methodName = 'fetchOrderTrades';
4398
4398
  if (symbol === undefined) {
4399
4399
  throw new errors.ArgumentsRequired(this.id + ' ' + methodName + ' () requires a symbol argument');
@@ -4404,16 +4404,16 @@ class coincatch extends coincatch$1 {
4404
4404
  };
4405
4405
  return await this.fetchMyTrades(symbol, since, limit, this.extend(request, params));
4406
4406
  }
4407
+ /**
4408
+ * @method
4409
+ * @name coincatch#fetchMarginMode
4410
+ * @description fetches the margin mode of the trading pair
4411
+ * @see https://coincatch.github.io/github.io/en/mix/#get-single-account
4412
+ * @param {string} symbol unified symbol of the market to fetch the margin mode for
4413
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4414
+ * @returns {object} a [margin mode structure]{@link https://docs.ccxt.com/#/?id=margin-mode-structure}
4415
+ */
4407
4416
  async fetchMarginMode(symbol, params = {}) {
4408
- /**
4409
- * @method
4410
- * @name coincatch#fetchMarginMode
4411
- * @description fetches the margin mode of the trading pair
4412
- * @see https://coincatch.github.io/github.io/en/mix/#get-single-account
4413
- * @param {string} symbol unified symbol of the market to fetch the margin mode for
4414
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4415
- * @returns {object} a [margin mode structure]{@link https://docs.ccxt.com/#/?id=margin-mode-structure}
4416
- */
4417
4417
  await this.loadMarkets();
4418
4418
  const market = this.market(symbol);
4419
4419
  const request = {
@@ -4467,17 +4467,17 @@ class coincatch extends coincatch$1 {
4467
4467
  };
4468
4468
  return this.safeString(types, type, type);
4469
4469
  }
4470
+ /**
4471
+ * @method
4472
+ * @name coincatch#setMarginMode
4473
+ * @description set margin mode to 'cross' or 'isolated'
4474
+ * @see https://coincatch.github.io/github.io/en/mix/#change-margin-mode
4475
+ * @param {string} marginMode 'cross' or 'isolated'
4476
+ * @param {string} symbol unified market symbol
4477
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4478
+ * @returns {object} response from the exchange
4479
+ */
4470
4480
  async setMarginMode(marginMode, symbol = undefined, params = {}) {
4471
- /**
4472
- * @method
4473
- * @name coincatch#setMarginMode
4474
- * @description set margin mode to 'cross' or 'isolated'
4475
- * @see https://coincatch.github.io/github.io/en/mix/#change-margin-mode
4476
- * @param {string} marginMode 'cross' or 'isolated'
4477
- * @param {string} symbol unified market symbol
4478
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4479
- * @returns {object} response from the exchange
4480
- */
4481
4481
  if (symbol === undefined) {
4482
4482
  throw new errors.ArgumentsRequired(this.id + ' setMarginMode() requires a symbol argument');
4483
4483
  }
@@ -4517,16 +4517,16 @@ class coincatch extends coincatch$1 {
4517
4517
  };
4518
4518
  return this.safeString(types, type, type);
4519
4519
  }
4520
+ /**
4521
+ * @method
4522
+ * @name coincatch#fetchPositionMode
4523
+ * @description fetchs the position mode, hedged or one way
4524
+ * @see https://coincatch.github.io/github.io/en/mix/#get-single-account
4525
+ * @param {string} symbol unified symbol of the market to fetch entry for
4526
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4527
+ * @returns {object} an object detailing whether the market is in hedged or one-way mode
4528
+ */
4520
4529
  async fetchPositionMode(symbol = undefined, params = {}) {
4521
- /**
4522
- * @method
4523
- * @name coincatch#fetchPositionMode
4524
- * @description fetchs the position mode, hedged or one way
4525
- * @see https://coincatch.github.io/github.io/en/mix/#get-single-account
4526
- * @param {string} symbol unified symbol of the market to fetch entry for
4527
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4528
- * @returns {object} an object detailing whether the market is in hedged or one-way mode
4529
- */
4530
4530
  if (symbol === undefined) {
4531
4531
  throw new errors.ArgumentsRequired(this.id + ' fetchPositionMode() requires a symbol argument');
4532
4532
  }
@@ -4547,18 +4547,18 @@ class coincatch extends coincatch$1 {
4547
4547
  'hedged': holdMode === 'double_hold',
4548
4548
  };
4549
4549
  }
4550
+ /**
4551
+ * @method
4552
+ * @name coincatch#setPositionMode
4553
+ * @description set hedged to true or false for a market
4554
+ * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Set%20Position%20Mode
4555
+ * @param {bool} hedged set to true to use dualSidePosition
4556
+ * @param {string} symbol unified symbol of the market to fetch entry for
4557
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4558
+ * @param {string} [params.productType] 'umcbl' or 'dmcbl' (default 'umcbl' if symbol is not provided)
4559
+ * @returns {object} response from the exchange
4560
+ */
4550
4561
  async setPositionMode(hedged, symbol = undefined, params = {}) {
4551
- /**
4552
- * @method
4553
- * @name coincatch#setPositionMode
4554
- * @description set hedged to true or false for a market
4555
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Set%20Position%20Mode
4556
- * @param {bool} hedged set to true to use dualSidePosition
4557
- * @param {string} symbol unified symbol of the market to fetch entry for
4558
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4559
- * @param {string} [params.productType] 'umcbl' or 'dmcbl' (default 'umcbl' if symbol is not provided)
4560
- * @returns {object} response from the exchange
4561
- */
4562
4562
  const methodName = 'setPositionMode';
4563
4563
  const defaultProductType = 'umcbl';
4564
4564
  await this.loadMarkets();
@@ -4594,16 +4594,16 @@ class coincatch extends coincatch$1 {
4594
4594
  //
4595
4595
  return await this.privatePostApiMixV1AccountSetPositionMode(this.extend(request, params));
4596
4596
  }
4597
+ /**
4598
+ * @method
4599
+ * @name coincatch#fetchLeverage
4600
+ * @description fetch the set leverage for a market
4601
+ * @see https://coincatch.github.io/github.io/en/mix/#get-single-account
4602
+ * @param {string} symbol unified market symbol
4603
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4604
+ * @returns {object} a [leverage structure]{@link https://docs.ccxt.com/#/?id=leverage-structure}
4605
+ */
4597
4606
  async fetchLeverage(symbol, params = {}) {
4598
- /**
4599
- * @method
4600
- * @name coincatch#fetchLeverage
4601
- * @description fetch the set leverage for a market
4602
- * @see https://coincatch.github.io/github.io/en/mix/#get-single-account
4603
- * @param {string} symbol unified market symbol
4604
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4605
- * @returns {object} a [leverage structure]{@link https://docs.ccxt.com/#/?id=leverage-structure}
4606
- */
4607
4607
  await this.loadMarkets();
4608
4608
  const market = this.market(symbol);
4609
4609
  if (market['type'] !== 'swap') {
@@ -4617,18 +4617,18 @@ class coincatch extends coincatch$1 {
4617
4617
  const data = this.safeDict(response, 'data', {});
4618
4618
  return this.parseLeverage(data, market);
4619
4619
  }
4620
+ /**
4621
+ * @method
4622
+ * @name coincatch#setLeverage
4623
+ * @description set the level of leverage for a market
4624
+ * @see https://hashkeyglobal-apidoc.readme.io/reference/change-futures-leverage-trade
4625
+ * @param {float} leverage the rate of leverage
4626
+ * @param {string} symbol unified market symbol
4627
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4628
+ * @param {string} [params.side] *for isolated margin mode with hedged position mode only* 'long' or 'short'
4629
+ * @returns {object} response from the exchange
4630
+ */
4620
4631
  async setLeverage(leverage, symbol = undefined, params = {}) {
4621
- /**
4622
- * @method
4623
- * @name hashkey#setLeverage
4624
- * @description set the level of leverage for a market
4625
- * @see https://hashkeyglobal-apidoc.readme.io/reference/change-futures-leverage-trade
4626
- * @param {float} leverage the rate of leverage
4627
- * @param {string} symbol unified market symbol
4628
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4629
- * @param {string} [params.side] *for isolated margin mode with hedged position mode only* 'long' or 'short'
4630
- * @returns {object} response from the exchange
4631
- */
4632
4632
  const methodName = 'setLeverage';
4633
4633
  if (symbol === undefined) {
4634
4634
  throw new errors.ArgumentsRequired(this.id + ' ' + methodName + '() requires a symbol argument');
@@ -4770,47 +4770,47 @@ class coincatch extends coincatch$1 {
4770
4770
  'datetime': undefined,
4771
4771
  };
4772
4772
  }
4773
+ /**
4774
+ * @method
4775
+ * @name coincatch#reduceMargin
4776
+ * @description remove margin from a position
4777
+ * @see https://coincatch.github.io/github.io/en/mix/#change-margin
4778
+ * @param {string} symbol unified market symbol
4779
+ * @param {float} amount the amount of margin to remove
4780
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4781
+ * @param {string} [params.side] *for isolated margin mode with hedged position mode only* 'long' or 'short'
4782
+ * @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=reduce-margin-structure}
4783
+ */
4773
4784
  async reduceMargin(symbol, amount, params = {}) {
4774
- /**
4775
- * @method
4776
- * @name coincatch#reduceMargin
4777
- * @description remove margin from a position
4778
- * @see https://coincatch.github.io/github.io/en/mix/#change-margin
4779
- * @param {string} symbol unified market symbol
4780
- * @param {float} amount the amount of margin to remove
4781
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4782
- * @param {string} [params.side] *for isolated margin mode with hedged position mode only* 'long' or 'short'
4783
- * @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=reduce-margin-structure}
4784
- */
4785
4785
  params['methodName'] = 'reduceMargin';
4786
4786
  return await this.modifyMarginHelper(symbol, -amount, 'reduce', params);
4787
4787
  }
4788
+ /**
4789
+ * @method
4790
+ * @name coincatch#addMargin
4791
+ * @description add margin
4792
+ * @see https://coincatch.github.io/github.io/en/mix/#change-margin
4793
+ * @param {string} symbol unified market symbol
4794
+ * @param {float} amount amount of margin to add
4795
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4796
+ * @param {string} [params.side] *for isolated margin mode with hedged position mode only* 'long' or 'short'
4797
+ * @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=add-margin-structure}
4798
+ */
4788
4799
  async addMargin(symbol, amount, params = {}) {
4789
- /**
4790
- * @method
4791
- * @name coincatch#addMargin
4792
- * @description add margin
4793
- * @see https://coincatch.github.io/github.io/en/mix/#change-margin
4794
- * @param {string} symbol unified market symbol
4795
- * @param {float} amount amount of margin to add
4796
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4797
- * @param {string} [params.side] *for isolated margin mode with hedged position mode only* 'long' or 'short'
4798
- * @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=add-margin-structure}
4799
- */
4800
4800
  params['methodName'] = 'addMargin';
4801
4801
  return await this.modifyMarginHelper(symbol, amount, 'add', params);
4802
4802
  }
4803
+ /**
4804
+ * @method
4805
+ * @name coincatch#fetchPosition
4806
+ * @description fetch data on a single open contract trade position
4807
+ * @see https://coincatch.github.io/github.io/en/mix/#get-symbol-position
4808
+ * @param {string} symbol unified market symbol of the market the position is held in, default is undefined
4809
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4810
+ * @param {string} [params.side] 'long' or 'short' *for non-hedged position mode only* (default 'long')
4811
+ * @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
4812
+ */
4803
4813
  async fetchPosition(symbol, params = {}) {
4804
- /**
4805
- * @method
4806
- * @name coincatch#fetchPosition
4807
- * @description fetch data on a single open contract trade position
4808
- * @see https://coincatch.github.io/github.io/en/mix/#get-symbol-position
4809
- * @param {string} symbol unified market symbol of the market the position is held in, default is undefined
4810
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4811
- * @param {string} [parmas.side] 'long' or 'short' *for non-hedged position mode only* (default 'long')
4812
- * @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
4813
- */
4814
4814
  const methodName = 'fetchPosition';
4815
4815
  let side = 'long';
4816
4816
  [side, params] = this.handleOptionAndParams(params, methodName, 'side');
@@ -4826,17 +4826,17 @@ class coincatch extends coincatch$1 {
4826
4826
  }
4827
4827
  return positions[0];
4828
4828
  }
4829
+ /**
4830
+ * @method
4831
+ * @description fetch open positions for a single market
4832
+ * @name coincatch#fetchPositionsForSymbol
4833
+ * @see https://coincatch.github.io/github.io/en/mix/#get-symbol-position
4834
+ * @description fetch all open positions for specific symbol
4835
+ * @param {string} symbol unified market symbol
4836
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4837
+ * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
4838
+ */
4829
4839
  async fetchPositionsForSymbol(symbol, params = {}) {
4830
- /**
4831
- * @method
4832
- * @description fetch open positions for a single market
4833
- * @name coincatch#fetchPositionsForSymbol
4834
- * @see https://coincatch.github.io/github.io/en/mix/#get-symbol-position
4835
- * @description fetch all open positions for specific symbol
4836
- * @param {string} symbol unified market symbol
4837
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4838
- * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
4839
- */
4840
4840
  await this.loadMarkets();
4841
4841
  const market = this.market(symbol);
4842
4842
  const request = {
@@ -4878,18 +4878,18 @@ class coincatch extends coincatch$1 {
4878
4878
  const data = this.safeList(response, 'data', []);
4879
4879
  return this.parsePositions(data, [symbol]);
4880
4880
  }
4881
+ /**
4882
+ * @method
4883
+ * @name coincatch#fetchPositions
4884
+ * @description fetch all open positions
4885
+ * @see https://coincatch.github.io/github.io/en/mix/#get-all-position
4886
+ * @param {string[]} [symbols] list of unified market symbols (all symbols must belong to the same product type)
4887
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4888
+ * @param {string} [params.productType] 'umcbl' or 'dmcbl' (default 'umcbl' if symbols are not provided)
4889
+ * @param {string} [params.marginCoin] the settle currency of the positions, needs to match the productType
4890
+ * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
4891
+ */
4881
4892
  async fetchPositions(symbols = undefined, params = {}) {
4882
- /**
4883
- * @method
4884
- * @name coincatch#fetchPositions
4885
- * @description fetch all open positions
4886
- * @see https://coincatch.github.io/github.io/en/mix/#get-all-position
4887
- * @param {string[]} [symbols] list of unified market symbols (all symbols must belong to the same product type)
4888
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4889
- * @param {string} [params.productType] 'umcbl' or 'dmcbl' (default 'umcbl' if symbols are not provided)
4890
- * @param {string} [params.marginCoin] the settle currency of the positions, needs to match the productType
4891
- * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
4892
- */
4893
4893
  const methodName = 'fetchPositions';
4894
4894
  await this.loadMarkets();
4895
4895
  let productType = 'umcbl';
@@ -5056,29 +5056,29 @@ class coincatch extends coincatch$1 {
5056
5056
  }
5057
5057
  return market;
5058
5058
  }
5059
+ /**
5060
+ * @method
5061
+ * @name coincatch#fetchLedger
5062
+ * @description fetch the history of changes, actions done by the user or operations that altered balance of the user
5063
+ * @see https://coincatch.github.io/github.io/en/spot/#get-bills
5064
+ * @see https://coincatch.github.io/github.io/en/mix/#get-business-account-bill
5065
+ * @param {string} [code] unified currency code
5066
+ * @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
5067
+ * @param {int} [limit] max number of ledger entrys to return, default is undefined
5068
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
5069
+ * @param {int} [params.until] *swap only* the latest time in ms to fetch entries for
5070
+ * @param {string} [params.type] 'spot' or 'swap' (default 'spot')
5071
+ * @param {string} [params.after] *spot only* billId, return the data less than this billId
5072
+ * @param {string} [params.before] *spot only* billId, return the data greater than or equals to this billId
5073
+ * @param {string} [params.groupType] *spot only*
5074
+ * @param {string} [params.bizType] *spot only*
5075
+ * @param {string} [params.productType] *swap only* 'umcbl' or 'dmcbl' (default 'umcbl' or 'dmcbl' if code is provided and code is not equal to 'USDT')
5076
+ * @param {string} [params.business] *swap only*
5077
+ * @param {string} [params.lastEndId] *swap only*
5078
+ * @param {bool} [params.next] *swap only*
5079
+ * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
5080
+ */
5059
5081
  async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
5060
- /**
5061
- * @method
5062
- * @name coincatch#fetchLedger
5063
- * @description fetch the history of changes, actions done by the user or operations that altered balance of the user
5064
- * @see https://coincatch.github.io/github.io/en/spot/#get-bills
5065
- * @see https://coincatch.github.io/github.io/en/mix/#get-business-account-bill
5066
- * @param {string} [code] unified currency code
5067
- * @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
5068
- * @param {int} [limit] max number of ledger entrys to return, default is undefined
5069
- * @param {object} [params] extra parameters specific to the exchange API endpoint
5070
- * @param {int} [params.until] *swap only* the latest time in ms to fetch entries for
5071
- * @param {string} [params.type] 'spot' or 'swap' (default 'spot')
5072
- * @param {string} [params.after] *spot only* billId, return the data less than this billId
5073
- * @param {string} [params.before] *spot only* billId, return the data greater than or equals to this billId
5074
- * @param {string} [params.groupType] *spot only*
5075
- * @param {string} [params.bizType] *spot only*
5076
- * @param {string} [params.productType] *swap only* 'umcbl' or 'dmcbl' (default 'umcbl' or 'dmcbl' if code is provided and code is not equal to 'USDT')
5077
- * @param {string} [params.business] *swap only*
5078
- * @param {string} [params.lastEndId] *swap only*
5079
- * @param {bool} [params.next] *swap only*
5080
- * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
5081
- */
5082
5082
  const methodName = 'fetchLedger';
5083
5083
  await this.loadMarkets();
5084
5084
  const request = {};