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
@@ -486,15 +486,15 @@ export default class coincatch extends Exchange {
486
486
  return cost;
487
487
  }
488
488
  }
489
+ /**
490
+ * @method
491
+ * @name coincatch#fetchTime
492
+ * @description fetches the current integer timestamp in milliseconds from the exchange server
493
+ * @see https://coincatch.github.io/github.io/en/spot/#get-server-time
494
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
495
+ * @returns {int} the current integer timestamp in milliseconds from the exchange server
496
+ */
489
497
  async fetchTime(params = {}) {
490
- /**
491
- * @method
492
- * @name coincatch#fetchTime
493
- * @description fetches the current integer timestamp in milliseconds from the exchange server
494
- * @see https://coincatch.github.io/github.io/en/spot/#get-server-time
495
- * @param {object} [params] extra parameters specific to the exchange API endpoint
496
- * @returns {int} the current integer timestamp in milliseconds from the exchange server
497
- */
498
498
  const response = await this.publicGetApiSpotV1PublicTime(params);
499
499
  //
500
500
  // {
@@ -506,15 +506,15 @@ export default class coincatch extends Exchange {
506
506
  //
507
507
  return this.safeInteger(response, 'data');
508
508
  }
509
+ /**
510
+ * @method
511
+ * @name coincatch#fetchCurrencies
512
+ * @description fetches all available currencies on an exchange
513
+ * @see https://coincatch.github.io/github.io/en/spot/#get-coin-list
514
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
515
+ * @returns {object} an associative dictionary of currencies
516
+ */
509
517
  async fetchCurrencies(params = {}) {
510
- /**
511
- * @method
512
- * @name coincatch#fetchCurrencies
513
- * @description fetches all available currencies on an exchange
514
- * @see https://coincatch.github.io/github.io/en/spot/#get-coin-list
515
- * @param {object} [params] extra parameters specific to the exchange API endpoint
516
- * @returns {object} an associative dictionary of currencies
517
- */
518
518
  const response = await this.publicGetApiSpotV1PublicCurrencies(params);
519
519
  const data = this.safeList(response, 'data', []);
520
520
  //
@@ -627,16 +627,16 @@ export default class coincatch extends Exchange {
627
627
  }
628
628
  return result;
629
629
  }
630
+ /**
631
+ * @method
632
+ * @name coincatch#fetchMarkets
633
+ * @description retrieves data on all markets for the exchange
634
+ * @see https://coincatch.github.io/github.io/en/spot/#get-all-tickers
635
+ * @see https://coincatch.github.io/github.io/en/mix/#get-all-symbols
636
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
637
+ * @returns {object[]} an array of objects representing market data
638
+ */
630
639
  async fetchMarkets(params = {}) {
631
- /**
632
- * @method
633
- * @name coincatch#fetchMarkets
634
- * @description retrieves data on all markets for the exchange
635
- * @see https://coincatch.github.io/github.io/en/spot/#get-all-tickers
636
- * @see https://coincatch.github.io/github.io/en/mix/#get-all-symbols
637
- * @param {object} [params] extra parameters specific to the exchange API endpoint
638
- * @returns {object[]} an array of objects representing market data
639
- */
640
640
  let response = await this.publicGetApiSpotV1MarketTickers(params);
641
641
  //
642
642
  // {
@@ -944,17 +944,17 @@ export default class coincatch extends Exchange {
944
944
  };
945
945
  return result;
946
946
  }
947
+ /**
948
+ * @method
949
+ * @name coincatch#fetchTicker
950
+ * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
951
+ * @see https://coincatch.github.io/github.io/en/spot/#get-single-ticker
952
+ * @see https://coincatch.github.io/github.io/en/mix/#get-single-symbol-ticker
953
+ * @param {string} symbol unified symbol of the market to fetch the ticker for
954
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
955
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
956
+ */
947
957
  async fetchTicker(symbol, params = {}) {
948
- /**
949
- * @method
950
- * @name coincatch#fetchTicker
951
- * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
952
- * @see https://coincatch.github.io/github.io/en/spot/#get-single-ticker
953
- * @see https://coincatch.github.io/github.io/en/mix/#get-single-symbol-ticker
954
- * @param {string} symbol unified symbol of the market to fetch the ticker for
955
- * @param {object} [params] extra parameters specific to the exchange API endpoint
956
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
957
- */
958
958
  await this.loadMarkets();
959
959
  const market = this.market(symbol);
960
960
  const request = {
@@ -1027,19 +1027,19 @@ export default class coincatch extends Exchange {
1027
1027
  const data = this.safeDict(response, 'data', {});
1028
1028
  return this.parseTicker(data, market);
1029
1029
  }
1030
+ /**
1031
+ * @method
1032
+ * @name coincatch#fetchTickers
1033
+ * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
1034
+ * @see https://coincatch.github.io/github.io/en/spot/#get-all-tickers
1035
+ * @see https://coincatch.github.io/github.io/en/mix/#get-all-symbol-ticker
1036
+ * @param {string[]} [symbols] unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
1037
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1038
+ * @param {string} [params.type] 'spot' or 'swap' (default 'spot')
1039
+ * @param {string} [params.productType] 'umcbl' or 'dmcbl' (default 'umcbl') - USDT perpetual contract or Universal margin perpetual contract
1040
+ * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1041
+ */
1030
1042
  async fetchTickers(symbols = undefined, params = {}) {
1031
- /**
1032
- * @method
1033
- * @name coincatch#fetchTickers
1034
- * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
1035
- * @see https://coincatch.github.io/github.io/en/spot/#get-all-tickers
1036
- * @see https://coincatch.github.io/github.io/en/mix/#get-all-symbol-ticker
1037
- * @param {string[]} [symbols] unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
1038
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1039
- * @param {string} [params.type] 'spot' or 'swap' (default 'spot')
1040
- * @param {string} [params.productType] 'umcbl' or 'dmcbl' (default 'umcbl') - USDT perpetual contract or Universal margin perpetual contract
1041
- * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1042
- */
1043
1043
  const methodName = 'fetchTickers';
1044
1044
  await this.loadMarkets();
1045
1045
  symbols = this.marketSymbols(symbols, undefined, true, true);
@@ -1202,19 +1202,19 @@ export default class coincatch extends Exchange {
1202
1202
  'info': ticker,
1203
1203
  }, market);
1204
1204
  }
1205
+ /**
1206
+ * @method
1207
+ * @name coincatch#fetchOrderBook
1208
+ * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
1209
+ * @see https://coincatch.github.io/github.io/en/spot/#get-merged-depth-data
1210
+ * @see https://coincatch.github.io/github.io/en/mix/#get-merged-depth-data
1211
+ * @param {string} symbol unified symbol of the market to fetch the order book for
1212
+ * @param {int} [limit] the maximum amount of order book entries to return (maximum and default value is 100)
1213
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1214
+ * @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
1215
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
1216
+ */
1205
1217
  async fetchOrderBook(symbol, limit = undefined, params = {}) {
1206
- /**
1207
- * @method
1208
- * @name coincatch#fetchOrderBook
1209
- * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
1210
- * @see https://coincatch.github.io/github.io/en/spot/#get-merged-depth-data
1211
- * @see https://coincatch.github.io/github.io/en/mix/#get-merged-depth-data
1212
- * @param {string} symbol unified symbol of the market to fetch the order book for
1213
- * @param {int} [limit] the maximum amount of order book entries to return (maximum and default value is 100)
1214
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1215
- * @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
1216
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
1217
- */
1218
1218
  await this.loadMarkets();
1219
1219
  const methodName = 'fetchOrderBook';
1220
1220
  const market = this.market(symbol);
@@ -1258,22 +1258,22 @@ export default class coincatch extends Exchange {
1258
1258
  const timestamp = this.safeInteger(data, 'ts');
1259
1259
  return this.parseOrderBook(data, symbol, timestamp, 'bids', 'asks');
1260
1260
  }
1261
+ /**
1262
+ * @method
1263
+ * @name coincatch#fetchOHLCV
1264
+ * @see https://coincatch.github.io/github.io/en/spot/#get-candle-data
1265
+ * @see https://coincatch.github.io/github.io/en/mix/#get-candle-data
1266
+ * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
1267
+ * @param {string} symbol unified symbol of the market to fetch OHLCV data for
1268
+ * @param {string} timeframe the length of time each candle represents
1269
+ * @param {int} [since] timestamp in ms of the earliest candle to fetch
1270
+ * @param {int} [limit] the maximum amount of candles to fetch (default 100)
1271
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1272
+ * @param {int} [params.until] timestamp in ms of the latest candle to fetch
1273
+ * @param {string} [params.price] "mark" for mark price candles
1274
+ * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
1275
+ */
1261
1276
  async fetchOHLCV(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
1262
- /**
1263
- * @method
1264
- * @name coincatch#fetchOHLCV
1265
- * @see https://coincatch.github.io/github.io/en/spot/#get-candle-data
1266
- * @see https://coincatch.github.io/github.io/en/mix/#get-candle-data
1267
- * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
1268
- * @param {string} symbol unified symbol of the market to fetch OHLCV data for
1269
- * @param {string} timeframe the length of time each candle represents
1270
- * @param {int} [since] timestamp in ms of the earliest candle to fetch
1271
- * @param {int} [limit] the maximum amount of candles to fetch (default 100)
1272
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1273
- * @param {int} [params.until] timestamp in ms of the latest candle to fetch
1274
- * @param {string} [params.price] "mark" for mark price candles
1275
- * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
1276
- */
1277
1277
  const methodName = 'fetchOHLCV';
1278
1278
  await this.loadMarkets();
1279
1279
  const market = this.market(symbol);
@@ -1373,20 +1373,20 @@ export default class coincatch extends Exchange {
1373
1373
  this.safeNumber2(ohlcv, 'baseVol', 5),
1374
1374
  ];
1375
1375
  }
1376
+ /**
1377
+ * @method
1378
+ * @name coincatch#fetchTrades
1379
+ * @description get the list of most recent trades for a particular symbol
1380
+ * @see https://coincatch.github.io/github.io/en/spot/#get-recent-trades
1381
+ * @see https://coincatch.github.io/github.io/en/mix/#get-fills
1382
+ * @param {string} symbol unified symbol of the market to fetch trades for
1383
+ * @param {int} [since] timestamp in ms of the earliest trade to fetch
1384
+ * @param {int} [limit] the maximum amount of trades to fetch
1385
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1386
+ * @param {int} [params.until] timestamp in ms of the latest entry to fetch
1387
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
1388
+ */
1376
1389
  async fetchTrades(symbol, since = undefined, limit = undefined, params = {}) {
1377
- /**
1378
- * @method
1379
- * @name coincatch#fetchTrades
1380
- * @description get the list of most recent trades for a particular symbol
1381
- * @see https://coincatch.github.io/github.io/en/spot/#get-recent-trades
1382
- * @see https://coincatch.github.io/github.io/en/mix/#get-fills
1383
- * @param {string} symbol unified symbol of the market to fetch trades for
1384
- * @param {int} [since] timestamp in ms of the earliest trade to fetch
1385
- * @param {int} [limit] the maximum amount of trades to fetch
1386
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1387
- * @param {int} [params.until] timestamp in ms of the latest entry to fetch
1388
- * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
1389
- */
1390
1390
  const methodName = 'fetchTrades';
1391
1391
  await this.loadMarkets();
1392
1392
  const market = this.market(symbol);
@@ -1546,16 +1546,16 @@ export default class coincatch extends Exchange {
1546
1546
  'info': trade,
1547
1547
  }, market);
1548
1548
  }
1549
+ /**
1550
+ * @method
1551
+ * @name coincatch#fetchFundingRate
1552
+ * @description fetch the current funding rate
1553
+ * @see https://coincatch.github.io/github.io/en/mix/#get-current-funding-rate
1554
+ * @param {string} symbol unified market symbol
1555
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1556
+ * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
1557
+ */
1549
1558
  async fetchFundingRate(symbol, params = {}) {
1550
- /**
1551
- * @method
1552
- * @name coincatch#fetchFundingRate
1553
- * @description fetch the current funding rate
1554
- * @see https://coincatch.github.io/github.io/en/mix/#get-current-funding-rate
1555
- * @param {string} symbol unified market symbol
1556
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1557
- * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
1558
- */
1559
1559
  await this.loadMarkets();
1560
1560
  const market = this.market(symbol);
1561
1561
  const marketId = market['id'];
@@ -1610,20 +1610,20 @@ export default class coincatch extends Exchange {
1610
1610
  }
1611
1611
  return [request, paramsOmited];
1612
1612
  }
1613
+ /**
1614
+ * @method
1615
+ * @name coincatch#fetchFundingRateHistory
1616
+ * @description fetches historical funding rate prices
1617
+ * @see https://coincatch.github.io/github.io/en/mix/#get-history-funding-rate
1618
+ * @param {string} symbol unified symbol of the market to fetch the funding rate history for
1619
+ * @param {int} [since] timestamp in ms of the earliest funding rate to fetch
1620
+ * @param {int} [limit] the maximum amount of entries to fetch
1621
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1622
+ * @param {int} [params.pageNo] the page number to fetch
1623
+ * @param {bool} [params.nextPage] whether to query the next page (default false)
1624
+ * @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
1625
+ */
1613
1626
  async fetchFundingRateHistory(symbol = undefined, since = undefined, limit = undefined, params = {}) {
1614
- /**
1615
- * @method
1616
- * @name coincatch#fetchFundingRateHistory
1617
- * @description fetches historical funding rate prices
1618
- * @see https://coincatch.github.io/github.io/en/mix/#get-history-funding-rate
1619
- * @param {string} symbol unified symbol of the market to fetch the funding rate history for
1620
- * @param {int} [since] timestamp in ms of the earliest funding rate to fetch
1621
- * @param {int} [limit] the maximum amount of entries to fetch
1622
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1623
- * @param {int} [params.pageNo] the page number to fetch
1624
- * @param {bool} [params.nextPage] whether to query the next page (default false)
1625
- * @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
1626
- */
1627
1627
  if (symbol === undefined) {
1628
1628
  throw new ArgumentsRequired(this.id + ' fetchFundingRateHistory() requires a symbol argument');
1629
1629
  }
@@ -1671,21 +1671,21 @@ export default class coincatch extends Exchange {
1671
1671
  const sorted = this.sortBy(rates, 'timestamp');
1672
1672
  return this.filterBySinceLimit(sorted, since, limit);
1673
1673
  }
1674
+ /**
1675
+ * @method
1676
+ * @name coincatch#fetchBalance
1677
+ * @description query for balance and get the amount of funds available for trading or funds locked in orders
1678
+ * @see https://coincatch.github.io/github.io/en/spot/#get-account-assets
1679
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1680
+ * @param {string} [params.type] 'spot' or 'swap' - the type of the market to fetch balance for (default 'spot')
1681
+ * @param {string} [params.productType] *swap only* 'umcbl' or 'dmcbl' (default 'umcbl')
1682
+ * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
1683
+ */
1674
1684
  async fetchBalance(params = {}) {
1675
- /**
1676
- * @method
1677
- * @name coincatch#fetchBalance
1678
- * @description query for balance and get the amount of funds available for trading or funds locked in orders
1679
- * @see https://coincatch.github.io/github.io/en/spot/#get-account-assets
1680
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1681
- * @param {string} [params.type] 'spot' or 'swap' - the type of the market to fetch balance for (default 'spot')
1682
- * @param {string} [params.productType] *swap only* 'umcbl' or 'dmcbl' (default 'umcbl')
1683
- * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
1684
- */
1685
1685
  await this.loadMarkets();
1686
1686
  const methodName = 'fetchBalance';
1687
- let marketType = 'spot';
1688
- [marketType, params] = this.handleMarketTypeAndParams(methodName, undefined, params, marketType);
1687
+ let marketType = undefined;
1688
+ [marketType, params] = this.handleMarketTypeAndParams(methodName, undefined, params);
1689
1689
  let response = undefined;
1690
1690
  if (marketType === 'spot') {
1691
1691
  //
@@ -1797,20 +1797,20 @@ export default class coincatch extends Exchange {
1797
1797
  }
1798
1798
  return this.safeBalance(result);
1799
1799
  }
1800
+ /**
1801
+ * @method
1802
+ * @name coincatch#transfer
1803
+ * @description transfer currency internally between wallets on the same account
1804
+ * @see https://coincatch.github.io/github.io/en/spot/#transfer
1805
+ * @param {string} code unified currency code
1806
+ * @param {float} amount amount to transfer
1807
+ * @param {string} fromAccount 'spot' or 'swap' or 'mix_usdt' or 'mix_usd' - account to transfer from
1808
+ * @param {string} toAccount 'spot' or 'swap' or 'mix_usdt' or 'mix_usd' - account to transfer to
1809
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1810
+ * @param {string} [params.clientOrderId] a unique id for the transfer
1811
+ * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
1812
+ */
1800
1813
  async transfer(code, amount, fromAccount, toAccount, params = {}) {
1801
- /**
1802
- * @method
1803
- * @name coincatch#transfer
1804
- * @description transfer currency internally between wallets on the same account
1805
- * @see https://coincatch.github.io/github.io/en/spot/#transfer
1806
- * @param {string} code unified currency code
1807
- * @param {float} amount amount to transfer
1808
- * @param {string} fromAccount 'spot' or 'swap' or 'mix_usdt' or 'mix_usd' - account to transfer from
1809
- * @param {string} toAccount 'spot' or 'swap' or 'mix_usdt' or 'mix_usd' - account to transfer to
1810
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1811
- * @param {string} [params.clientOrderId] a unique id for the transfer
1812
- * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
1813
- */
1814
1814
  await this.loadMarkets();
1815
1815
  const currency = this.currency(code);
1816
1816
  if (fromAccount === 'swap') {
@@ -1873,17 +1873,17 @@ export default class coincatch extends Exchange {
1873
1873
  'info': transfer,
1874
1874
  };
1875
1875
  }
1876
+ /**
1877
+ * @method
1878
+ * @name coincatch#fetchDepositAddress
1879
+ * @description fetch the deposit address for a currency associated with this account
1880
+ * @see https://coincatch.github.io/github.io/en/spot/#get-coin-address
1881
+ * @param {string} code unified currency code
1882
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1883
+ * @param {string} [params.network] network for fetch deposit address
1884
+ * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
1885
+ */
1876
1886
  async fetchDepositAddress(code, params = {}) {
1877
- /**
1878
- * @method
1879
- * @name coincatch#fetchDepositAddress
1880
- * @description fetch the deposit address for a currency associated with this account
1881
- * @see https://coincatch.github.io/github.io/en/spot/#get-coin-address
1882
- * @param {string} code unified currency code
1883
- * @param {string} [params.network] network for fetch deposit address
1884
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1885
- * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
1886
- */
1887
1887
  await this.loadMarkets();
1888
1888
  const currency = this.currency(code);
1889
1889
  const request = {
@@ -1940,21 +1940,21 @@ export default class coincatch extends Exchange {
1940
1940
  'info': depositAddress,
1941
1941
  };
1942
1942
  }
1943
+ /**
1944
+ * @method
1945
+ * @name coincatch#fetchDeposits
1946
+ * @description fetch all deposits made to an account
1947
+ * @see https://coincatch.github.io/github.io/en/spot/#get-deposit-list
1948
+ * @param {string} code unified currency code of the currency transferred
1949
+ * @param {int} [since] the earliest time in ms to fetch transfers for (default 24 hours ago)
1950
+ * @param {int} [limit] the maximum number of transfer structures to retrieve (not used by exchange)
1951
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1952
+ * @param {int} [params.until] the latest time in ms to fetch transfers for (default time now)
1953
+ * @param {int} [params.pageNo] pageNo default 1
1954
+ * @param {int} [params.pageSize] pageSize (default 20, max 100)
1955
+ * @returns {object[]} a list of [transfer structures]{@link https://docs.ccxt.com/#/?id=transfer-structure}
1956
+ */
1943
1957
  async fetchDeposits(code = undefined, since = undefined, limit = undefined, params = {}) {
1944
- /**
1945
- * @method
1946
- * @name coincatch#fetchDeposits
1947
- * @description fetch all deposits made to an account
1948
- * @see https://coincatch.github.io/github.io/en/spot/#get-deposit-list
1949
- * @param {string} code unified currency code of the currency transferred
1950
- * @param {int} [since] the earliest time in ms to fetch transfers for (default 24 hours ago)
1951
- * @param {int} [limit] the maximum number of transfer structures to retrieve (not used by exchange)
1952
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1953
- * @param {int} [params.until] the latest time in ms to fetch transfers for (default time now)
1954
- * @param {int} [params.pageNo] pageNo default 1
1955
- * @param {int} [params.pageSize] pageSize (default 20, max 100)
1956
- * @returns {object[]} a list of [transfer structures]{@link https://docs.ccxt.com/#/?id=transfer-structure}
1957
- */
1958
1958
  const methodName = 'fetchDeposits';
1959
1959
  await this.loadMarkets();
1960
1960
  const request = {};
@@ -2002,22 +2002,22 @@ export default class coincatch extends Exchange {
2002
2002
  const data = this.safeList(response, 'data', []);
2003
2003
  return this.parseTransactions(data, currency, since, limit);
2004
2004
  }
2005
+ /**
2006
+ * @method
2007
+ * @name coincatch#fetchWithdrawals
2008
+ * @description fetch all withdrawals made from an account
2009
+ * @see https://coincatch.github.io/github.io/en/spot/#get-withdraw-list-v2
2010
+ * @param {string} code unified currency code of the currency transferred
2011
+ * @param {int} [since] the earliest time in ms to fetch transfers for (default 24 hours ago)
2012
+ * @param {int} [limit] the maximum number of transfer structures to retrieve (default 50, max 200)
2013
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2014
+ * @param {int} [params.until] the latest time in ms to fetch transfers for (default time now)
2015
+ * @param {string} [params.clientOid] clientOid
2016
+ * @param {string} [params.orderId] The response orderId
2017
+ * @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.
2018
+ * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
2019
+ */
2005
2020
  async fetchWithdrawals(code = undefined, since = undefined, limit = undefined, params = {}) {
2006
- /**
2007
- * @method
2008
- * @name coincatch#fetchWithdrawals
2009
- * @description fetch all withdrawals made from an account
2010
- * @see https://coincatch.github.io/github.io/en/spot/#get-withdraw-list-v2
2011
- * @param {string} code unified currency code of the currency transferred
2012
- * @param {int} [since] the earliest time in ms to fetch transfers for (default 24 hours ago)
2013
- * @param {int} [limit] the maximum number of transfer structures to retrieve (default 50, max 200)
2014
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2015
- * @param {int} [params.until] the latest time in ms to fetch transfers for (default time now)
2016
- * @param {string} [params.clientOid] clientOid
2017
- * @param {string} [params.orderId] The response orderId
2018
- * @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.
2019
- * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
2020
- */
2021
2021
  const methodName = 'fetchWithdrawals';
2022
2022
  await this.loadMarkets();
2023
2023
  const request = {};
@@ -2043,22 +2043,22 @@ export default class coincatch extends Exchange {
2043
2043
  const data = this.safeList(response, 'data', []);
2044
2044
  return this.parseTransactions(data, currency, since, limit);
2045
2045
  }
2046
+ /**
2047
+ * @method
2048
+ * @name coincatch#withdraw
2049
+ * @description make a withdrawal
2050
+ * @see https://coincatch.github.io/github.io/en/spot/#withdraw
2051
+ * @param {string} code unified currency code
2052
+ * @param {float} amount the amount to withdraw
2053
+ * @param {string} address the address to withdraw to
2054
+ * @param {string} [tag]
2055
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2056
+ * @param {string} params.network network for withdraw (mandatory)
2057
+ * @param {string} [params.remark] remark
2058
+ * @param {string} [params.clientOid] custom id
2059
+ * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
2060
+ */
2046
2061
  async withdraw(code, amount, address, tag = undefined, params = {}) {
2047
- /**
2048
- * @method
2049
- * @name coincatch#withdraw
2050
- * @description make a withdrawal
2051
- * @see https://coincatch.github.io/github.io/en/spot/#withdraw
2052
- * @param {string} code unified currency code
2053
- * @param {float} amount the amount to withdraw
2054
- * @param {string} address the address to withdraw to
2055
- * @param {string} [tag]
2056
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2057
- * @param {string} params.network network for withdraw (mandatory)
2058
- * @param {string} [params.remark] remark
2059
- * @param {string} [params.clientOid] custom id
2060
- * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
2061
- */
2062
2062
  [tag, params] = this.handleWithdrawTagAndParams(tag, params);
2063
2063
  await this.loadMarkets();
2064
2064
  const currency = this.currency(code);
@@ -2169,17 +2169,17 @@ export default class coincatch extends Exchange {
2169
2169
  'fee': fee,
2170
2170
  };
2171
2171
  }
2172
+ /**
2173
+ * @method
2174
+ * @name coincatch#createMarketBuyOrderWithCost
2175
+ * @description create a market buy order by providing the symbol and cost
2176
+ * @see https://coincatch.github.io/github.io/en/spot/#place-order
2177
+ * @param {string} symbol unified symbol of the market to create an order in
2178
+ * @param {float} cost how much you want to trade in units of the quote currency
2179
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2180
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2181
+ */
2172
2182
  async createMarketBuyOrderWithCost(symbol, cost, params = {}) {
2173
- /**
2174
- * @method
2175
- * @name coincatch#createMarketBuyOrderWithCost
2176
- * @description create a market buy order by providing the symbol and cost
2177
- * @see https://coincatch.github.io/github.io/en/spot/#place-order
2178
- * @param {string} symbol unified symbol of the market to create an order in
2179
- * @param {float} cost how much you want to trade in units of the quote currency
2180
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2181
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2182
- */
2183
2183
  await this.loadMarkets();
2184
2184
  const methodName = 'createMarketBuyOrderWithCost';
2185
2185
  const market = this.market(symbol);
@@ -2190,28 +2190,28 @@ export default class coincatch extends Exchange {
2190
2190
  params['createMarketBuyOrderRequiresPrice'] = false;
2191
2191
  return await this.createOrder(symbol, 'market', 'buy', cost, undefined, params);
2192
2192
  }
2193
+ /**
2194
+ * @method
2195
+ * @name coincatch#createOrder
2196
+ * @description create a trade order
2197
+ * @see https://coincatch.github.io/github.io/en/spot/#place-order
2198
+ * @see https://coincatch.github.io/github.io/en/spot/#place-plan-order
2199
+ * @see https://coincatch.github.io/github.io/en/mix/#place-order
2200
+ * @see https://coincatch.github.io/github.io/en/mix/#place-plan-order
2201
+ * @param {string} symbol unified symbol of the market to create an order in
2202
+ * @param {string} type 'market' or 'limit' or 'LIMIT_MAKER' for spot, 'market' or 'limit' or 'STOP' for swap
2203
+ * @param {string} side 'buy' or 'sell'
2204
+ * @param {float} amount how much of you want to trade in units of the base currency
2205
+ * @param {float} [price] the price that the order is to be fulfilled, in units of the quote currency, ignored in market orders
2206
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2207
+ * @param {float} [params.cost] *spot market buy only* the quote quantity that can be used as an alternative for the amount
2208
+ * @param {float} [params.triggerPrice] the price that the order is to be triggered
2209
+ * @param {bool} [params.postOnly] if true, the order will only be posted to the order book and not executed immediately
2210
+ * @param {string} [params.timeInForce] 'GTC', 'IOC', 'FOK' or 'PO'
2211
+ * @param {string} [params.clientOrderId] a unique id for the order - is mandatory for swap
2212
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2213
+ */
2193
2214
  async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
2194
- /**
2195
- * @method
2196
- * @name coincatch#createOrder
2197
- * @description create a trade order
2198
- * @see https://coincatch.github.io/github.io/en/spot/#place-order
2199
- * @see https://coincatch.github.io/github.io/en/spot/#place-plan-order
2200
- * @see https://coincatch.github.io/github.io/en/mix/#place-order
2201
- * @see https://coincatch.github.io/github.io/en/mix/#place-plan-order
2202
- * @param {string} symbol unified symbol of the market to create an order in
2203
- * @param {string} type 'market' or 'limit' or 'LIMIT_MAKER' for spot, 'market' or 'limit' or 'STOP' for swap
2204
- * @param {string} side 'buy' or 'sell'
2205
- * @param {float} amount how much of you want to trade in units of the base currency
2206
- * @param {float} [price] the price that the order is to be fulfilled, in units of the quote currency, ignored in market orders
2207
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2208
- * @param {float} [params.cost] *spot market buy only* the quote quantity that can be used as an alternative for the amount
2209
- * @param {float} [params.triggerPrice] the price that the order is to be triggered
2210
- * @param {bool} [params.postOnly] if true, the order will only be posted to the order book and not executed immediately
2211
- * @param {string} [params.timeInForce] 'GTC', 'IOC', 'FOK' or 'PO'
2212
- * @param {string} [params.clientOrderId] a unique id for the order - is mandatory for swap
2213
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2214
- */
2215
2215
  await this.loadMarkets();
2216
2216
  params['methodName'] = this.safeString(params, 'methodName', 'createOrder');
2217
2217
  const market = this.market(symbol);
@@ -2225,26 +2225,26 @@ export default class coincatch extends Exchange {
2225
2225
  throw new NotSupported(this.id + ' createOrder() is not supported for ' + market['type'] + ' type of markets');
2226
2226
  }
2227
2227
  }
2228
+ /**
2229
+ * @method
2230
+ * @name coincatch#createSpotOrder
2231
+ * @description create a trade order on spot market
2232
+ * @see https://coincatch.github.io/github.io/en/spot/#place-order
2233
+ * @see https://coincatch.github.io/github.io/en/spot/#place-plan-order
2234
+ * @param {string} symbol unified symbol of the market to create an order in
2235
+ * @param {string} type 'market' or 'limit'
2236
+ * @param {string} side 'buy' or 'sell'
2237
+ * @param {float} amount how much of you want to trade in units of the base currency
2238
+ * @param {float} [price] the price that the order is to be fulfilled, in units of the quote currency, ignored in market orders
2239
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2240
+ * @param {float} [params.cost] *market buy only* the quote quantity that can be used as an alternative for the amount
2241
+ * @param {float} [params.triggerPrice] the price that the order is to be triggered at
2242
+ * @param {bool} [params.postOnly] if true, the order will only be posted to the order book and not executed immediately
2243
+ * @param {string} [params.timeInForce] 'GTC', 'IOC', 'FOK' or 'PO'
2244
+ * @param {string} [params.clientOrderId] a unique id for the order (max length 40)
2245
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2246
+ */
2228
2247
  async createSpotOrder(symbol, type, side, amount, price = undefined, params = {}) {
2229
- /**
2230
- * @method
2231
- * @name coincatch#createSpotOrder
2232
- * @description create a trade order on spot market
2233
- * @see https://coincatch.github.io/github.io/en/spot/#place-order
2234
- * @see https://coincatch.github.io/github.io/en/spot/#place-plan-order
2235
- * @param {string} symbol unified symbol of the market to create an order in
2236
- * @param {string} type 'market' or 'limit'
2237
- * @param {string} side 'buy' or 'sell'
2238
- * @param {float} amount how much of you want to trade in units of the base currency
2239
- * @param {float} [price] the price that the order is to be fulfilled, in units of the quote currency, ignored in market orders
2240
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2241
- * @param {float} [params.cost] *market buy only* the quote quantity that can be used as an alternative for the amount
2242
- * @param {float} [params.triggerPrice] the price that the order is to be triggered at
2243
- * @param {bool} [params.postOnly] if true, the order will only be posted to the order book and not executed immediately
2244
- * @param {string} [params.timeInForce] 'GTC', 'IOC', 'FOK' or 'PO'
2245
- * @param {string} [params.clientOrderId] a unique id for the order (max length 40)
2246
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2247
- */
2248
2248
  await this.loadMarkets();
2249
2249
  params['methodName'] = this.safeString(params, 'methodName', 'createSpotOrder');
2250
2250
  const request = this.createSpotOrderRequest(symbol, type, side, amount, price, params);
@@ -2275,7 +2275,7 @@ export default class coincatch extends Exchange {
2275
2275
  /**
2276
2276
  * @method
2277
2277
  * @ignore
2278
- * @name hashkey#createSpotOrderRequest
2278
+ * @name coincatch#createSpotOrderRequest
2279
2279
  * @description helper function to build request
2280
2280
  * @param {string} symbol unified symbol of the market to create an order in
2281
2281
  * @param {string} type 'market' or 'limit'
@@ -2393,33 +2393,33 @@ export default class coincatch extends Exchange {
2393
2393
  };
2394
2394
  return result;
2395
2395
  }
2396
+ /**
2397
+ * @method
2398
+ * @name coincatch#createSwapOrder
2399
+ * @description create a trade order on swap market
2400
+ * @see https://coincatch.github.io/github.io/en/mix/#place-order
2401
+ * @see https://coincatch.github.io/github.io/en/mix/#place-plan-order
2402
+ * @see https://coincatch.github.io/github.io/en/mix/#place-stop-order
2403
+ * @param {string} symbol unified symbol of the market to create an order in
2404
+ * @param {string} type 'market' or 'limit'
2405
+ * @param {string} side 'buy' or 'sell'
2406
+ * @param {float} amount how much of you want to trade in units of the base currency
2407
+ * @param {float} [price] the price that the order is to be fulfilled, in units of the quote currency, ignored in market orders
2408
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2409
+ * @param {bool} [params.postOnly] *non-trigger orders only* if true, the order will only be posted to the order book and not executed immediately
2410
+ * @param {bool} [params.reduceOnly] true or false whether the order is reduce only
2411
+ * @param {string} [params.timeInForce] *non-trigger orders only* 'GTC', 'FOK', 'IOC' or 'PO'
2412
+ * @param {string} [params.clientOrderId] a unique id for the order
2413
+ * @param {float} [params.triggerPrice] the price that the order is to be triggered at
2414
+ * @param {float} [params.stopLossPrice] The price at which a stop loss order is triggered at
2415
+ * @param {float} [params.takeProfitPrice] The price at which a take profit order is triggered at
2416
+ * @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)
2417
+ * @param {float} [params.takeProfit.triggerPrice] take profit trigger price
2418
+ * @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)
2419
+ * @param {float} [params.stopLoss.triggerPrice] stop loss trigger price
2420
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2421
+ */
2396
2422
  async createSwapOrder(symbol, type, side, amount, price = undefined, params = {}) {
2397
- /**
2398
- * @method
2399
- * @name coincatch#createSwapOrder
2400
- * @description create a trade order on swap market
2401
- * @see https://coincatch.github.io/github.io/en/mix/#place-order
2402
- * @see https://coincatch.github.io/github.io/en/mix/#place-plan-order
2403
- * @see https://coincatch.github.io/github.io/en/mix/#place-stop-order
2404
- * @param {string} symbol unified symbol of the market to create an order in
2405
- * @param {string} type 'market' or 'limit'
2406
- * @param {string} side 'buy' or 'sell'
2407
- * @param {float} amount how much of you want to trade in units of the base currency
2408
- * @param {float} [price] the price that the order is to be fulfilled, in units of the quote currency, ignored in market orders
2409
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2410
- * @param {bool} [params.postOnly] *non-trigger orders only* if true, the order will only be posted to the order book and not executed immediately
2411
- * @param {bool} [params.reduceOnly] true or false whether the order is reduce only
2412
- * @param {string} [params.timeInForce] *non-trigger orders only* 'GTC', 'FOK', 'IOC' or 'PO'
2413
- * @param {string} [params.clientOrderId] a unique id for the order
2414
- * @param {float} [params.triggerPrice] the price that the order is to be triggered at
2415
- * @param {float} [params.stopLossPrice] The price at which a stop loss order is triggered at
2416
- * @param {float} [params.takeProfitPrice] The price at which a take profit order is triggered at
2417
- * @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)
2418
- * @param {float} [params.takeProfit.triggerPrice] take profit trigger price
2419
- * @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)
2420
- * @param {float} [params.stopLoss.triggerPrice] stop loss trigger price
2421
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2422
- */
2423
2423
  params['methodName'] = this.safeString(params, 'methodName', 'createSwapOrder');
2424
2424
  await this.loadMarkets();
2425
2425
  const market = this.market(symbol);
@@ -2455,7 +2455,7 @@ export default class coincatch extends Exchange {
2455
2455
  /**
2456
2456
  * @method
2457
2457
  * @ignore
2458
- * @name hashkey#createSwapOrderRequest
2458
+ * @name coincatch#createSwapOrderRequest
2459
2459
  * @description helper function to build request
2460
2460
  * @param {string} symbol unified symbol of the market to create an order in
2461
2461
  * @param {string} type 'market' or 'limit'
@@ -2616,21 +2616,21 @@ export default class coincatch extends Exchange {
2616
2616
  params = this.omit(params, ['stopLoss', 'takeProfit', 'stopLossPrice', 'takeProfitPrice', 'triggerPrice', 'stopPrice', 'trailingPercent', 'trailingTriggerPrice']);
2617
2617
  return this.extend(request, params);
2618
2618
  }
2619
+ /**
2620
+ * @method
2621
+ * @name coincatch#createOrderWithTakeProfitAndStopLoss
2622
+ * @description *swap markets only* create an order with a stop loss or take profit attached (type 3)
2623
+ * @param {string} symbol unified symbol of the market to create an order in
2624
+ * @param {string} type 'market' or 'limit'
2625
+ * @param {string} side 'buy' or 'sell'
2626
+ * @param {float} amount how much you want to trade in units of the base currency or the number of contracts
2627
+ * @param {float} [price] the price to fulfill the order, in units of the quote currency, ignored in market orders
2628
+ * @param {float} [takeProfit] the take profit price, in units of the quote currency
2629
+ * @param {float} [stopLoss] the stop loss price, in units of the quote currency
2630
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2631
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2632
+ */
2619
2633
  async createOrderWithTakeProfitAndStopLoss(symbol, type, side, amount, price = undefined, takeProfit = undefined, stopLoss = undefined, params = {}) {
2620
- /**
2621
- * @method
2622
- * @name coincatch#createOrderWithTakeProfitAndStopLoss
2623
- * @description *swap markets only* create an order with a stop loss or take profit attached (type 3)
2624
- * @param {string} symbol unified symbol of the market to create an order in
2625
- * @param {string} type 'market' or 'limit'
2626
- * @param {string} side 'buy' or 'sell'
2627
- * @param {float} amount how much you want to trade in units of the base currency or the number of contracts
2628
- * @param {float} [price] the price to fulfill the order, in units of the quote currency, ignored in market orders
2629
- * @param {float} [takeProfit] the take profit price, in units of the quote currency
2630
- * @param {float} [stopLoss] the stop loss price, in units of the quote currency
2631
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2632
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2633
- */
2634
2634
  const methodName = 'createOrderWithTakeProfitAndStopLoss';
2635
2635
  await this.loadMarkets();
2636
2636
  const market = this.market(symbol);
@@ -2649,17 +2649,17 @@ export default class coincatch extends Exchange {
2649
2649
  };
2650
2650
  return this.safeString(timeInForceMap, timeInForce, timeInForce);
2651
2651
  }
2652
+ /**
2653
+ * @method
2654
+ * @name coincatch#createOrders
2655
+ * @description create a list of trade orders (all orders should be of the same symbol)
2656
+ * @see https://hashkeyglobal-apidoc.readme.io/reference/create-multiple-orders
2657
+ * @see https://hashkeyglobal-apidoc.readme.io/reference/batch-create-new-futures-order
2658
+ * @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)
2659
+ * @param {object} [params] extra parameters specific to the api endpoint
2660
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2661
+ */
2652
2662
  async createOrders(orders, params = {}) {
2653
- /**
2654
- * @method
2655
- * @name coincatch#createOrders
2656
- * @description create a list of trade orders (all orders should be of the same symbol)
2657
- * @see https://hashkeyglobal-apidoc.readme.io/reference/create-multiple-orders
2658
- * @see https://hashkeyglobal-apidoc.readme.io/reference/batch-create-new-futures-order
2659
- * @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)
2660
- * @param {object} [params] extra parameters specific to the api endpoint
2661
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2662
- */
2663
2663
  await this.loadMarkets();
2664
2664
  // same symbol for all orders
2665
2665
  const methodName = 'createOrders';
@@ -2785,21 +2785,21 @@ export default class coincatch extends Exchange {
2785
2785
  throw new NotSupported(this.id + ' ' + methodName + '() is not supported for ' + market['type'] + ' type of markets');
2786
2786
  }
2787
2787
  }
2788
+ /**
2789
+ * @method
2790
+ * @name coincatch#editOrder
2791
+ * @description edit a trade trigger, stop-looss or take-profit order
2792
+ * @see https://coincatch.github.io/github.io/en/spot/#modify-plan-order
2793
+ * @param {string} id order id
2794
+ * @param {string} symbol unified symbol of the market to create an order in
2795
+ * @param {string} type 'market' or 'limit'
2796
+ * @param {string} side 'buy' or 'sell'
2797
+ * @param {float} amount how much of currency you want to trade in units of base currency
2798
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
2799
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2800
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2801
+ */
2788
2802
  async editOrder(id, symbol, type, side, amount = undefined, price = undefined, params = {}) {
2789
- /**
2790
- * @method
2791
- * @name coincatch#editOrder
2792
- * @description edit a trade trigger, stop-looss or take-profit order
2793
- * @see https://coincatch.github.io/github.io/en/spot/#modify-plan-order
2794
- * @param {string} id order id
2795
- * @param {string} symbol unified symbol of the market to create an order in
2796
- * @param {string} type 'market' or 'limit'
2797
- * @param {string} side 'buy' or 'sell'
2798
- * @param {float} amount how much of currency you want to trade in units of base currency
2799
- * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
2800
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2801
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2802
- */
2803
2803
  const methodName = 'editOrder';
2804
2804
  // only trigger, stop-looss or take-profit orders can be edited
2805
2805
  params['methodName'] = methodName;
@@ -2813,25 +2813,25 @@ export default class coincatch extends Exchange {
2813
2813
  throw new NotSupported(this.id + ' ' + methodName + '() is not supported for ' + market['type'] + ' type of markets');
2814
2814
  }
2815
2815
  }
2816
+ /**
2817
+ * @method
2818
+ * @name coincatch#editSpotOrder
2819
+ * @ignore
2820
+ * @description edit a trade order
2821
+ * @see https://coincatch.github.io/github.io/en/spot/#modify-plan-order
2822
+ * @param {string} id order id
2823
+ * @param {string} symbol unified symbol of the market to create an order in
2824
+ * @param {string} type 'market' or 'limit'
2825
+ * @param {string} side 'buy' or 'sell'
2826
+ * @param {float} amount how much of currency you want to trade in units of base currency
2827
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
2828
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2829
+ * @param {string} [params.clientOrderId] a unique id for the order that can be used as an alternative for the id
2830
+ * @param {string} params.triggerPrice *mandatory* the price that the order is to be triggered at
2831
+ * @param {float} [params.cost] *market buy only* the quote quantity that can be used as an alternative for the amount
2832
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2833
+ */
2816
2834
  async editSpotOrder(id, symbol, type, side, amount, price = undefined, params = {}) {
2817
- /**
2818
- * @method
2819
- * @name coincatch#editSpotOrder
2820
- * @ignore
2821
- * @description edit a trade order
2822
- * @see https://coincatch.github.io/github.io/en/spot/#modify-plan-order
2823
- * @param {string} id order id
2824
- * @param {string} symbol unified symbol of the market to create an order in
2825
- * @param {string} type 'market' or 'limit'
2826
- * @param {string} side 'buy' or 'sell'
2827
- * @param {float} amount how much of currency you want to trade in units of base currency
2828
- * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
2829
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2830
- * @param {string} [params.clientOrderId] a unique id for the order that can be used as an alternative for the id
2831
- * @param {string} params.triggerPrice *mandatory* the price that the order is to be triggered at
2832
- * @param {float} [params.cost] *market buy only* the quote quantity that can be used as an alternative for the amount
2833
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2834
- */
2835
2835
  await this.loadMarkets();
2836
2836
  let methodName = 'editSpotOrder';
2837
2837
  [methodName, params] = this.handleParamString(params, 'methodName', methodName);
@@ -2889,20 +2889,20 @@ export default class coincatch extends Exchange {
2889
2889
  const data = this.safeDict(response, 'data', {});
2890
2890
  return this.parseOrder(data, market);
2891
2891
  }
2892
+ /**
2893
+ * @method
2894
+ * @name coincatch#fetchOrder
2895
+ * @description fetches information on an order made by the user (non-trigger orders only)
2896
+ * @see https://coincatch.github.io/github.io/en/spot/#get-order-details
2897
+ * @see https://coincatch.github.io/github.io/en/mix/#get-order-details
2898
+ * @param {string} id the order id
2899
+ * @param {string} symbol unified symbol of the market the order was made in (is mandatory for swap)
2900
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2901
+ * @param {string} [params.type] 'spot' or 'swap' - the type of the market to fetch entry for (default 'spot')
2902
+ * @param {string} [params.clientOrderId] a unique id for the order that can be used as an alternative for the id
2903
+ * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2904
+ */
2892
2905
  async fetchOrder(id, symbol = undefined, params = {}) {
2893
- /**
2894
- * @method
2895
- * @name coincatch#fetchOrder
2896
- * @description fetches information on an order made by the user (non-trigger orders only)
2897
- * @see https://coincatch.github.io/github.io/en/spot/#get-order-details
2898
- * @see https://coincatch.github.io/github.io/en/mix/#get-order-details
2899
- * @param {string} id the order id
2900
- * @param {string} symbol unified symbol of the market the order was made in (is mandatory for swap)
2901
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2902
- * @param {string} [params.type] 'spot' or 'swap' - the type of the market to fetch entry for (default 'spot')
2903
- * @param {string} [params.clientOrderId] a unique id for the order that can be used as an alternative for the id
2904
- * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2905
- */
2906
2906
  const methodName = 'fetchOrder';
2907
2907
  // for non-trigger orders only
2908
2908
  await this.loadMarkets();
@@ -3021,27 +3021,27 @@ export default class coincatch extends Exchange {
3021
3021
  }
3022
3022
  return this.parseOrder(order, market);
3023
3023
  }
3024
+ /**
3025
+ * @method
3026
+ * @name coincatch#fetchOpenOrders
3027
+ * @description fetch all unfilled currently open orders
3028
+ * @see https://coincatch.github.io/github.io/en/spot/#get-order-list
3029
+ * @see https://coincatch.github.io/github.io/en/spot/#get-current-plan-orders
3030
+ * @see https://coincatch.github.io/github.io/en/mix/#get-open-order
3031
+ * @see https://coincatch.github.io/github.io/en/mix/#get-all-open-order
3032
+ * @see https://coincatch.github.io/github.io/en/mix/#get-plan-order-tpsl-list
3033
+ * @param {string} [symbol] unified market symbol of the market orders were made in
3034
+ * @param {int} [since] the earliest time in ms to fetch orders for
3035
+ * @param {int} [limit] the maximum number of order structures to retrieve
3036
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3037
+ * @param {boolean} [params.trigger] true if fetching trigger orders (default false)
3038
+ * @param {string} [params.type] 'spot' or 'swap' - the type of the market to fetch entries for (default 'spot')
3039
+ * @param {string} [params.productType] *swap only* 'umcbl' or 'dmcbl' - the product type of the market to fetch entries for (default 'umcbl')
3040
+ * @param {string} [params.marginCoin] *swap only* the margin coin of the market to fetch entries for
3041
+ * @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)
3042
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
3043
+ */
3024
3044
  async fetchOpenOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
3025
- /**
3026
- * @method
3027
- * @name coincatch#fetchOpenOrders
3028
- * @description fetch all unfilled currently open orders
3029
- * @see https://coincatch.github.io/github.io/en/spot/#get-order-list
3030
- * @see https://coincatch.github.io/github.io/en/spot/#get-current-plan-orders
3031
- * @see https://coincatch.github.io/github.io/en/mix/#get-open-order
3032
- * @see https://coincatch.github.io/github.io/en/mix/#get-all-open-order
3033
- * @see https://coincatch.github.io/github.io/en/mix/#get-plan-order-tpsl-list
3034
- * @param {string} [symbol] unified market symbol of the market orders were made in
3035
- * @param {int} [since] the earliest time in ms to fetch orders for
3036
- * @param {int} [limit] the maximum number of order structures to retrieve
3037
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3038
- * @param {boolean} [params.trigger] true if fetching trigger orders (default false)
3039
- * @param {string} [params.type] 'spot' or 'swap' - the type of the market to fetch entries for (default 'spot')
3040
- * @param {string} [params.productType] *swap only* 'umcbl' or 'dmcbl' - the product type of the market to fetch entries for (default 'umcbl')
3041
- * @param {string} [params.marginCoin] *swap only* the margin coin of the market to fetch entries for
3042
- * @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)
3043
- * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
3044
- */
3045
3045
  const methodName = 'fetchOpenOrders';
3046
3046
  await this.loadMarkets();
3047
3047
  let market = undefined;
@@ -3061,22 +3061,22 @@ export default class coincatch extends Exchange {
3061
3061
  throw new NotSupported(this.id + ' ' + methodName + '() is not supported for ' + marketType + ' type of markets');
3062
3062
  }
3063
3063
  }
3064
+ /**
3065
+ * @method
3066
+ * @ignore
3067
+ * @name coincatch#fetchOpenSpotOrders
3068
+ * @description fetch all unfilled currently open orders for spot markets
3069
+ * @see https://coincatch.github.io/github.io/en/spot/#get-order-list
3070
+ * @see https://coincatch.github.io/github.io/en/spot/#get-current-plan-orders
3071
+ * @param {string} [symbol] unified market symbol of the market orders were made in
3072
+ * @param {int} [since] the earliest time in ms to fetch orders for
3073
+ * @param {int} [limit] the maximum number of order structures to retrieve
3074
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3075
+ * @param {boolean} [params.trigger] true if fetching trigger orders (default false)
3076
+ * @param {string} [params.lastEndId] *for trigger orders only* the last order id to fetch entries after
3077
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
3078
+ */
3064
3079
  async fetchOpenSpotOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
3065
- /**
3066
- * @method
3067
- * @ignore
3068
- * @name coincatch#fetchOpenSpotOrders
3069
- * @description fetch all unfilled currently open orders for spot markets
3070
- * @see https://coincatch.github.io/github.io/en/spot/#get-order-list
3071
- * @see https://coincatch.github.io/github.io/en/spot/#get-current-plan-orders
3072
- * @param {string} [symbol] unified market symbol of the market orders were made in
3073
- * @param {int} [since] the earliest time in ms to fetch orders for
3074
- * @param {int} [limit] the maximum number of order structures to retrieve
3075
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3076
- * @param {boolean} [params.trigger] true if fetching trigger orders (default false)
3077
- * @param {string} [params.lastEndId] *for trigger orders only* the last order id to fetch entries after
3078
- * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
3079
- */
3080
3080
  await this.loadMarkets();
3081
3081
  let methodName = 'fetchOpenSpotOrders';
3082
3082
  [methodName, params] = this.handleParamString(params, 'methodName', methodName);
@@ -3163,25 +3163,25 @@ export default class coincatch extends Exchange {
3163
3163
  }
3164
3164
  return this.parseOrders(result, market, since, limit);
3165
3165
  }
3166
+ /**
3167
+ * @method
3168
+ * @ignore
3169
+ * @name coincatch#fetchOpenSwapOrders
3170
+ * @description fetch all unfilled currently open orders for swap markets
3171
+ * @see https://coincatch.github.io/github.io/en/mix/#get-open-order
3172
+ * @see https://coincatch.github.io/github.io/en/mix/#get-all-open-order
3173
+ * @see https://coincatch.github.io/github.io/en/mix/#get-plan-order-tpsl-list
3174
+ * @param {string} [symbol] unified market symbol of the market orders were made in
3175
+ * @param {int} [since] the earliest time in ms to fetch orders for
3176
+ * @param {int} [limit] the maximum number of order structures to retrieve
3177
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3178
+ * @param {boolean} [params.trigger] true if fetching trigger orders (default false)
3179
+ * @param {string} [params.isPlan] 'plan' or 'profit_loss' ('plan' (default) for trigger (plan) orders, 'profit_loss' for stop-loss and take-profit orders)
3180
+ * @param {string} [params.productType] 'umcbl' or 'dmcbl' - the product type of the market to fetch entries for (default 'umcbl')
3181
+ * @param {string} [params.marginCoin] the margin coin of the market to fetch entries for
3182
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
3183
+ */
3166
3184
  async fetchOpenSwapOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
3167
- /**
3168
- * @method
3169
- * @ignore
3170
- * @name coincatch#fetchOpenSwapOrders
3171
- * @description fetch all unfilled currently open orders for swap markets
3172
- * @see https://coincatch.github.io/github.io/en/mix/#get-open-order
3173
- * @see https://coincatch.github.io/github.io/en/mix/#get-all-open-order
3174
- * @see https://coincatch.github.io/github.io/en/mix/#get-plan-order-tpsl-list
3175
- * @param {string} [symbol] unified market symbol of the market orders were made in
3176
- * @param {int} [since] the earliest time in ms to fetch orders for
3177
- * @param {int} [limit] the maximum number of order structures to retrieve
3178
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3179
- * @param {boolean} [params.trigger] true if fetching trigger orders (default false)
3180
- * @param {string} [params.isPlan] 'plan' or 'profit_loss' ('plan' (default) for trigger (plan) orders, 'profit_loss' for stop-loss and take-profit orders)
3181
- * @param {string} [params.productType] 'umcbl' or 'dmcbl' - the product type of the market to fetch entries for (default 'umcbl')
3182
- * @param {string} [params.marginCoin] the margin coin of the market to fetch entries for
3183
- * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
3184
- */
3185
3185
  await this.loadMarkets();
3186
3186
  let methodName = 'fetchOpenSwapOrders';
3187
3187
  [methodName, params] = this.handleParamString(params, 'methodName', methodName);
@@ -3297,27 +3297,27 @@ export default class coincatch extends Exchange {
3297
3297
  const data = this.safeList(response, 'data', []);
3298
3298
  return this.parseOrders(data, market, since, limit);
3299
3299
  }
3300
+ /**
3301
+ * @method
3302
+ * @name coincatch#fetchCanceledAndClosedOrders
3303
+ * @description fetches information on multiple canceled and closed orders made by the user
3304
+ * @see https://coincatch.github.io/github.io/en/spot/#get-order-list
3305
+ * @see https://coincatch.github.io/github.io/en/spot/#get-history-plan-orders
3306
+ * @see https://coincatch.github.io/github.io/en/mix/#get-history-orders
3307
+ * @see https://coincatch.github.io/github.io/en/mix/#get-producttype-history-orders
3308
+ * @see https://coincatch.github.io/github.io/en/mix/#get-history-plan-orders-tpsl
3309
+ * @param {string} symbol *is mandatory* unified market symbol of the market orders were made in
3310
+ * @param {int} [since] the earliest time in ms to fetch orders for
3311
+ * @param {int} [limit] the maximum number of order structures to retrieve
3312
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3313
+ * @param {int} [params.until] the latest time in ms to fetch orders for
3314
+ * @param {boolean} [params.trigger] true if fetching trigger orders (default false)
3315
+ * @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)
3316
+ * @param {string} [params.type] 'spot' or 'swap' - the type of the market to fetch entries for (default 'spot')
3317
+ * @param {string} [params.productType] *swap only* 'umcbl' or 'dmcbl' - the product type of the market to fetch entries for (default 'umcbl')
3318
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
3319
+ */
3300
3320
  async fetchCanceledAndClosedOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
3301
- /**
3302
- * @method
3303
- * @name coincatch#fetchCanceledAndClosedOrders
3304
- * @description fetches information on multiple canceled and closed orders made by the user
3305
- * @see https://coincatch.github.io/github.io/en/spot/#get-order-list
3306
- * @see https://coincatch.github.io/github.io/en/spot/#get-history-plan-orders
3307
- * @see https://coincatch.github.io/github.io/en/mix/#get-history-orders
3308
- * @see https://coincatch.github.io/github.io/en/mix/#get-producttype-history-orders
3309
- * @see https://coincatch.github.io/github.io/en/mix/#get-history-plan-orders-tpsl
3310
- * @param {string} symbol *is mandatory* unified market symbol of the market orders were made in
3311
- * @param {int} [since] the earliest time in ms to fetch orders for
3312
- * @param {int} [limit] the maximum number of order structures to retrieve
3313
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3314
- * @param {int} [params.until] the latest time in ms to fetch orders for
3315
- * @param {boolean} [params.trigger] true if fetching trigger orders (default false)
3316
- * @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)
3317
- * @param {string} [params.type] 'spot' or 'swap' - the type of the market to fetch entries for (default 'spot')
3318
- * @param {string} [params.productType] *swap only* 'umcbl' or 'dmcbl' - the product type of the market to fetch entries for (default 'umcbl')
3319
- * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
3320
- */
3321
3321
  const methodName = 'fetchCanceledAndClosedOrders';
3322
3322
  await this.loadMarkets();
3323
3323
  let market = undefined;
@@ -3337,23 +3337,23 @@ export default class coincatch extends Exchange {
3337
3337
  throw new NotSupported(this.id + ' ' + methodName + '() is not supported for ' + marketType + ' type of markets');
3338
3338
  }
3339
3339
  }
3340
+ /**
3341
+ * @method
3342
+ * @ignore
3343
+ * @name coincatch#fetchCanceledAndClosedSpotOrders
3344
+ * @description fetches information on multiple canceled and closed orders made by the user on spot markets
3345
+ * @see https://coincatch.github.io/github.io/en/spot/#get-order-history
3346
+ * @see https://coincatch.github.io/github.io/en/spot/#get-history-plan-orders
3347
+ * @param {string} symbol *is mandatory* unified market symbol of the market orders were made in
3348
+ * @param {int} [since] the earliest time in ms to fetch orders for
3349
+ * @param {int} [limit] the maximum number of order structures to retrieve
3350
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3351
+ * @param {int} [params.until] *for trigger orders only* the latest time in ms to fetch orders for
3352
+ * @param {boolean} [params.trigger] true if fetching trigger orders (default false)
3353
+ * @param {string} [params.lastEndId] *for trigger orders only* the last order id to fetch entries after
3354
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
3355
+ */
3340
3356
  async fetchCanceledAndClosedSpotOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
3341
- /**
3342
- * @method
3343
- * @ignore
3344
- * @name coincatch#fetchCanceledAndClosedSpotOrders
3345
- * @description fetches information on multiple canceled and closed orders made by the user on spot markets
3346
- * @see https://coincatch.github.io/github.io/en/spot/#get-order-history
3347
- * @see https://coincatch.github.io/github.io/en/spot/#get-history-plan-orders
3348
- * @param {string} symbol *is mandatory* unified market symbol of the market orders were made in
3349
- * @param {int} [since] the earliest time in ms to fetch orders for
3350
- * @param {int} [limit] the maximum number of order structures to retrieve
3351
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3352
- * @param {int} [params.until] *for trigger orders only* the latest time in ms to fetch orders for
3353
- * @param {boolean} [params.trigger] true if fetching trigger orders (default false)
3354
- * @param {string} [params.lastEndId] *for trigger orders only* the last order id to fetch entries after
3355
- * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
3356
- */
3357
3357
  let methodName = 'fetchCanceledAndClosedSpotOrders';
3358
3358
  [methodName, params] = this.handleParamString(params, 'methodName', methodName);
3359
3359
  if (symbol === undefined) {
@@ -3483,25 +3483,25 @@ export default class coincatch extends Exchange {
3483
3483
  }
3484
3484
  return this.parseOrders(result, market, since, limit);
3485
3485
  }
3486
+ /**
3487
+ * @method
3488
+ * @ignore
3489
+ * @name coincatch#fetchCanceledAndClosedSwapOrders
3490
+ * @description fetches information on multiple canceled and closed orders made by the user on swap markets
3491
+ * @see https://coincatch.github.io/github.io/en/mix/#get-history-orders
3492
+ * @see https://coincatch.github.io/github.io/en/mix/#get-producttype-history-orders
3493
+ * @see https://coincatch.github.io/github.io/en/mix/#get-history-plan-orders-tpsl
3494
+ * @param {string} [symbol] unified market symbol of the market orders were made in
3495
+ * @param {int} [since] the earliest time in ms to fetch orders for
3496
+ * @param {int} [limit] the maximum number of order structures to retrieve
3497
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3498
+ * @param {int} [params.until] the latest time in ms to fetch orders for
3499
+ * @param {boolean} [params.trigger] true if fetching trigger orders (default false)
3500
+ * @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)
3501
+ * @param {string} [params.productType] *swap only* 'umcbl' or 'dmcbl' - the product type of the market to fetch entries for (default 'umcbl')
3502
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
3503
+ */
3486
3504
  async fetchCanceledAndClosedSwapOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
3487
- /**
3488
- * @method
3489
- * @ignore
3490
- * @name coincatch#fetchCanceledAndClosedSwapOrders
3491
- * @description fetches information on multiple canceled and closed orders made by the user on swap markets
3492
- * @see https://coincatch.github.io/github.io/en/mix/#get-history-orders
3493
- * @see https://coincatch.github.io/github.io/en/mix/#get-producttype-history-orders
3494
- * @see https://coincatch.github.io/github.io/en/mix/#get-history-plan-orders-tpsl
3495
- * @param {string} [symbol] unified market symbol of the market orders were made in
3496
- * @param {int} [since] the earliest time in ms to fetch orders for
3497
- * @param {int} [limit] the maximum number of order structures to retrieve
3498
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3499
- * @param {int} [params.until] the latest time in ms to fetch orders for
3500
- * @param {boolean} [params.trigger] true if fetching trigger orders (default false)
3501
- * @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)
3502
- * @param {string} [params.productType] *swap only* 'umcbl' or 'dmcbl' - the product type of the market to fetch entries for (default 'umcbl')
3503
- * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
3504
- */
3505
3505
  let methodName = 'fetchCanceledAndClosedSwapOrders';
3506
3506
  [methodName, params] = this.handleParamString(params, 'methodName', methodName);
3507
3507
  let requestSince = since;
@@ -3643,24 +3643,24 @@ export default class coincatch extends Exchange {
3643
3643
  }
3644
3644
  return this.parseOrders(result, market);
3645
3645
  }
3646
+ /**
3647
+ * @method
3648
+ * @name coincatch#cancelOrder
3649
+ * @description cancels an open order
3650
+ * @see https://coincatch.github.io/github.io/en/spot/#cancel-order-v2
3651
+ * @see https://coincatch.github.io/github.io/en/spot/#cancel-plan-order
3652
+ * @see https://coincatch.github.io/github.io/en/mix/#cancel-order
3653
+ * @see https://coincatch.github.io/github.io/en/mix/#cancel-plan-order-tpsl
3654
+ * @param {string} id order id
3655
+ * @param {string} symbol unified symbol of the market the order was made in
3656
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3657
+ * @param {string} [params.clientOrderId] a unique id for the order that can be used as an alternative for the id
3658
+ * @param {bool} [params.trigger] true for canceling a trigger order (default false)
3659
+ * @param {bool} [params.stop] *swap only* an alternative for trigger param
3660
+ * @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
3661
+ * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
3662
+ */
3646
3663
  async cancelOrder(id, symbol = undefined, params = {}) {
3647
- /**
3648
- * @method
3649
- * @name coincatch#cancelOrder
3650
- * @description cancels an open order
3651
- * @see https://coincatch.github.io/github.io/en/spot/#cancel-order-v2
3652
- * @see https://coincatch.github.io/github.io/en/spot/#cancel-plan-order
3653
- * @see https://coincatch.github.io/github.io/en/mix/#cancel-order
3654
- * @see https://coincatch.github.io/github.io/en/mix/#cancel-plan-order-tpsl
3655
- * @param {string} id order id
3656
- * @param {string} symbol unified symbol of the market the order was made in
3657
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3658
- * @param {string} [params.clientOrderId] a unique id for the order that can be used as an alternative for the id
3659
- * @param {bool} [params.trigger] true for canceling a trigger order (default false)
3660
- * @param {bool} [params.stop] *swap only* an alternative for trigger param
3661
- * @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
3662
- * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
3663
- */
3664
3664
  const methodName = 'cancelOrder';
3665
3665
  if (symbol === undefined) {
3666
3666
  throw new ArgumentsRequired(this.id + ' ' + methodName + ' () requires a symbol argument');
@@ -3715,26 +3715,26 @@ export default class coincatch extends Exchange {
3715
3715
  const data = this.safeDict(response, 'data', {});
3716
3716
  return this.parseOrder(data, market);
3717
3717
  }
3718
+ /**
3719
+ * @method
3720
+ * @name coincatch#cancelAllOrders
3721
+ * @description cancels all open orders
3722
+ * @see https://coincatch.github.io/github.io/en/spot/#cancel-all-orders
3723
+ * @see https://coincatch.github.io/github.io/en/spot/#batch-cancel-plan-orders
3724
+ * @see https://coincatch.github.io/github.io/en/mix/#batch-cancel-order
3725
+ * @see https://coincatch.github.io/github.io/en/mix/#cancel-order-by-symbol
3726
+ * @see https://coincatch.github.io/github.io/en/mix/#cancel-plan-order-tpsl-by-symbol
3727
+ * @see https://coincatch.github.io/github.io/en/mix/#cancel-all-trigger-order-tpsl
3728
+ * @param {string} [symbol] unified symbol of the market the orders were made in
3729
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3730
+ * @param {string} [params.type] 'spot' or 'swap' - the type of the market to cancel orders for (default 'spot')
3731
+ * @param {bool} [params.trigger] true for canceling a trigger orders (default false)
3732
+ * @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')
3733
+ * @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
3734
+ * @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
3735
+ * @returns {object} response from the exchange
3736
+ */
3718
3737
  async cancelAllOrders(symbol = undefined, params = {}) {
3719
- /**
3720
- * @method
3721
- * @name coincatch#cancelAllOrders
3722
- * @description cancels all open orders
3723
- * @see https://coincatch.github.io/github.io/en/spot/#cancel-all-orders
3724
- * @see https://coincatch.github.io/github.io/en/spot/#batch-cancel-plan-orders
3725
- * @see https://coincatch.github.io/github.io/en/mix/#batch-cancel-order
3726
- * @see https://coincatch.github.io/github.io/en/mix/#cancel-order-by-symbol
3727
- * @see https://coincatch.github.io/github.io/en/mix/#cancel-plan-order-tpsl-by-symbol
3728
- * @see https://coincatch.github.io/github.io/en/mix/#cancel-all-trigger-order-tpsl
3729
- * @param {string} [symbol] unified symbol of the market the orders were made in
3730
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3731
- * @param {string} [params.type] 'spot' or 'swap' - the type of the market to cancel orders for (default 'spot')
3732
- * @param {bool} [params.trigger] true for canceling a trigger orders (default false)
3733
- * @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')
3734
- * @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
3735
- * @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
3736
- * @returns {object} response from the exchange
3737
- */
3738
3738
  const methodName = 'cancelAllOrders';
3739
3739
  await this.loadMarkets();
3740
3740
  let market = undefined;
@@ -3850,18 +3850,18 @@ export default class coincatch extends Exchange {
3850
3850
  order['info'] = response;
3851
3851
  return [order];
3852
3852
  }
3853
+ /**
3854
+ * @method
3855
+ * @name coincatch#cancelOrders
3856
+ * @description cancel multiple non-trigger orders
3857
+ * @see https://coincatch.github.io/github.io/en/spot/#cancel-order-in-batch-v2-single-instruments
3858
+ * @param {string[]} ids order ids
3859
+ * @param {string} symbol *is mandatory* unified market symbol
3860
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3861
+ * @param {string[]} [params.clientOrderIds] client order ids
3862
+ * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
3863
+ */
3853
3864
  async cancelOrders(ids, symbol = undefined, params = {}) {
3854
- /**
3855
- * @method
3856
- * @name coincatch#cancelOrders
3857
- * @description cancel multiple non-trigger orders
3858
- * @see https://coincatch.github.io/github.io/en/spot/#cancel-order-in-batch-v2-single-instruments
3859
- * @param {string[]} ids order ids
3860
- * @param {string} symbol *is mandatory* unified market symbol
3861
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3862
- * @param {string[]} [params.clientOrderIds] client order ids
3863
- * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
3864
- */
3865
3865
  const methodName = 'cancelOrders';
3866
3866
  // only non-trigger and not tp/sl orders can be canceled via cancelOrders
3867
3867
  if (symbol === undefined) {
@@ -4232,22 +4232,22 @@ export default class coincatch extends Exchange {
4232
4232
  }
4233
4233
  return result;
4234
4234
  }
4235
+ /**
4236
+ * @method
4237
+ * @name coincatch#fetchMyTrades
4238
+ * @description fetch all trades made by the user
4239
+ * @see https://coincatch.github.io/github.io/en/spot/#get-transaction-details
4240
+ * @see https://coincatch.github.io/github.io/en/mix/#get-order-fill-detail
4241
+ * @see https://coincatch.github.io/github.io/en/mix/#get-producttype-order-fill-detail
4242
+ * @param {string} symbol *is mandatory* unified market symbol
4243
+ * @param {int} [since] the earliest time in ms to fetch trades for
4244
+ * @param {int} [limit] the maximum amount of trades to fetch
4245
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4246
+ * @param {int} [params.until] *swap markets only* the latest time in ms to fetch trades for, only supports the last 30 days timeframe
4247
+ * @param {string} [params.lastEndId] *swap markets only* query the data after this tradeId
4248
+ * @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
4249
+ */
4235
4250
  async fetchMyTrades(symbol = undefined, since = undefined, limit = undefined, params = {}) {
4236
- /**
4237
- * @method
4238
- * @name coincatch#fetchMyTrades
4239
- * @description fetch all trades made by the user
4240
- * @see https://coincatch.github.io/github.io/en/spot/#get-transaction-details
4241
- * @see https://coincatch.github.io/github.io/en/mix/#get-order-fill-detail
4242
- * @see https://coincatch.github.io/github.io/en/mix/#get-producttype-order-fill-detail
4243
- * @param {string} symbol *is mandatory* unified market symbol
4244
- * @param {int} [since] the earliest time in ms to fetch trades for
4245
- * @param {int} [limit] the maximum amount of trades to fetch
4246
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4247
- * @param {int} [params.until] *swap markets only* the latest time in ms to fetch trades for, only supports the last 30 days timeframe
4248
- * @param {string} [params.lastEndId] *swap markets only* query the data after this tradeId
4249
- * @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
4250
- */
4251
4251
  let methodName = 'fetchMyTrades';
4252
4252
  [methodName, params] = this.handleParamString(params, 'methodName', methodName);
4253
4253
  await this.loadMarkets();
@@ -4384,19 +4384,19 @@ export default class coincatch extends Exchange {
4384
4384
  const data = this.safeList(response, 'data', []);
4385
4385
  return this.parseTrades(data, market, since, limit);
4386
4386
  }
4387
+ /**
4388
+ * @method
4389
+ * @name coincatch#fetchOrderTrades
4390
+ * @description fetch all the trades made from a single order
4391
+ * @see https://coincatch.github.io/github.io/en/spot/#get-transaction-details
4392
+ * @param {string} id order id
4393
+ * @param {string} symbol unified market symbol
4394
+ * @param {int} [since] the earliest time in ms to fetch trades for
4395
+ * @param {int} [limit] the maximum number of trades to retrieve
4396
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4397
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
4398
+ */
4387
4399
  async fetchOrderTrades(id, symbol = undefined, since = undefined, limit = undefined, params = {}) {
4388
- /**
4389
- * @method
4390
- * @name coincatch#fetchOrderTrades
4391
- * @description fetch all the trades made from a single order
4392
- * @see https://coincatch.github.io/github.io/en/spot/#get-transaction-details
4393
- * @param {string} id order id
4394
- * @param {string} symbol unified market symbol
4395
- * @param {int} [since] the earliest time in ms to fetch trades for
4396
- * @param {int} [limit] the maximum number of trades to retrieve
4397
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4398
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
4399
- */
4400
4400
  const methodName = 'fetchOrderTrades';
4401
4401
  if (symbol === undefined) {
4402
4402
  throw new ArgumentsRequired(this.id + ' ' + methodName + ' () requires a symbol argument');
@@ -4407,16 +4407,16 @@ export default class coincatch extends Exchange {
4407
4407
  };
4408
4408
  return await this.fetchMyTrades(symbol, since, limit, this.extend(request, params));
4409
4409
  }
4410
+ /**
4411
+ * @method
4412
+ * @name coincatch#fetchMarginMode
4413
+ * @description fetches the margin mode of the trading pair
4414
+ * @see https://coincatch.github.io/github.io/en/mix/#get-single-account
4415
+ * @param {string} symbol unified symbol of the market to fetch the margin mode for
4416
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4417
+ * @returns {object} a [margin mode structure]{@link https://docs.ccxt.com/#/?id=margin-mode-structure}
4418
+ */
4410
4419
  async fetchMarginMode(symbol, params = {}) {
4411
- /**
4412
- * @method
4413
- * @name coincatch#fetchMarginMode
4414
- * @description fetches the margin mode of the trading pair
4415
- * @see https://coincatch.github.io/github.io/en/mix/#get-single-account
4416
- * @param {string} symbol unified symbol of the market to fetch the margin mode for
4417
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4418
- * @returns {object} a [margin mode structure]{@link https://docs.ccxt.com/#/?id=margin-mode-structure}
4419
- */
4420
4420
  await this.loadMarkets();
4421
4421
  const market = this.market(symbol);
4422
4422
  const request = {
@@ -4470,17 +4470,17 @@ export default class coincatch extends Exchange {
4470
4470
  };
4471
4471
  return this.safeString(types, type, type);
4472
4472
  }
4473
+ /**
4474
+ * @method
4475
+ * @name coincatch#setMarginMode
4476
+ * @description set margin mode to 'cross' or 'isolated'
4477
+ * @see https://coincatch.github.io/github.io/en/mix/#change-margin-mode
4478
+ * @param {string} marginMode 'cross' or 'isolated'
4479
+ * @param {string} symbol unified market symbol
4480
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4481
+ * @returns {object} response from the exchange
4482
+ */
4473
4483
  async setMarginMode(marginMode, symbol = undefined, params = {}) {
4474
- /**
4475
- * @method
4476
- * @name coincatch#setMarginMode
4477
- * @description set margin mode to 'cross' or 'isolated'
4478
- * @see https://coincatch.github.io/github.io/en/mix/#change-margin-mode
4479
- * @param {string} marginMode 'cross' or 'isolated'
4480
- * @param {string} symbol unified market symbol
4481
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4482
- * @returns {object} response from the exchange
4483
- */
4484
4484
  if (symbol === undefined) {
4485
4485
  throw new ArgumentsRequired(this.id + ' setMarginMode() requires a symbol argument');
4486
4486
  }
@@ -4520,16 +4520,16 @@ export default class coincatch extends Exchange {
4520
4520
  };
4521
4521
  return this.safeString(types, type, type);
4522
4522
  }
4523
+ /**
4524
+ * @method
4525
+ * @name coincatch#fetchPositionMode
4526
+ * @description fetchs the position mode, hedged or one way
4527
+ * @see https://coincatch.github.io/github.io/en/mix/#get-single-account
4528
+ * @param {string} symbol unified symbol of the market to fetch entry for
4529
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4530
+ * @returns {object} an object detailing whether the market is in hedged or one-way mode
4531
+ */
4523
4532
  async fetchPositionMode(symbol = undefined, params = {}) {
4524
- /**
4525
- * @method
4526
- * @name coincatch#fetchPositionMode
4527
- * @description fetchs the position mode, hedged or one way
4528
- * @see https://coincatch.github.io/github.io/en/mix/#get-single-account
4529
- * @param {string} symbol unified symbol of the market to fetch entry for
4530
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4531
- * @returns {object} an object detailing whether the market is in hedged or one-way mode
4532
- */
4533
4533
  if (symbol === undefined) {
4534
4534
  throw new ArgumentsRequired(this.id + ' fetchPositionMode() requires a symbol argument');
4535
4535
  }
@@ -4550,18 +4550,18 @@ export default class coincatch extends Exchange {
4550
4550
  'hedged': holdMode === 'double_hold',
4551
4551
  };
4552
4552
  }
4553
+ /**
4554
+ * @method
4555
+ * @name coincatch#setPositionMode
4556
+ * @description set hedged to true or false for a market
4557
+ * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Set%20Position%20Mode
4558
+ * @param {bool} hedged set to true to use dualSidePosition
4559
+ * @param {string} symbol unified symbol of the market to fetch entry for
4560
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4561
+ * @param {string} [params.productType] 'umcbl' or 'dmcbl' (default 'umcbl' if symbol is not provided)
4562
+ * @returns {object} response from the exchange
4563
+ */
4553
4564
  async setPositionMode(hedged, symbol = undefined, params = {}) {
4554
- /**
4555
- * @method
4556
- * @name coincatch#setPositionMode
4557
- * @description set hedged to true or false for a market
4558
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Set%20Position%20Mode
4559
- * @param {bool} hedged set to true to use dualSidePosition
4560
- * @param {string} symbol unified symbol of the market to fetch entry for
4561
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4562
- * @param {string} [params.productType] 'umcbl' or 'dmcbl' (default 'umcbl' if symbol is not provided)
4563
- * @returns {object} response from the exchange
4564
- */
4565
4565
  const methodName = 'setPositionMode';
4566
4566
  const defaultProductType = 'umcbl';
4567
4567
  await this.loadMarkets();
@@ -4597,16 +4597,16 @@ export default class coincatch extends Exchange {
4597
4597
  //
4598
4598
  return await this.privatePostApiMixV1AccountSetPositionMode(this.extend(request, params));
4599
4599
  }
4600
+ /**
4601
+ * @method
4602
+ * @name coincatch#fetchLeverage
4603
+ * @description fetch the set leverage for a market
4604
+ * @see https://coincatch.github.io/github.io/en/mix/#get-single-account
4605
+ * @param {string} symbol unified market symbol
4606
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4607
+ * @returns {object} a [leverage structure]{@link https://docs.ccxt.com/#/?id=leverage-structure}
4608
+ */
4600
4609
  async fetchLeverage(symbol, params = {}) {
4601
- /**
4602
- * @method
4603
- * @name coincatch#fetchLeverage
4604
- * @description fetch the set leverage for a market
4605
- * @see https://coincatch.github.io/github.io/en/mix/#get-single-account
4606
- * @param {string} symbol unified market symbol
4607
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4608
- * @returns {object} a [leverage structure]{@link https://docs.ccxt.com/#/?id=leverage-structure}
4609
- */
4610
4610
  await this.loadMarkets();
4611
4611
  const market = this.market(symbol);
4612
4612
  if (market['type'] !== 'swap') {
@@ -4620,18 +4620,18 @@ export default class coincatch extends Exchange {
4620
4620
  const data = this.safeDict(response, 'data', {});
4621
4621
  return this.parseLeverage(data, market);
4622
4622
  }
4623
+ /**
4624
+ * @method
4625
+ * @name coincatch#setLeverage
4626
+ * @description set the level of leverage for a market
4627
+ * @see https://hashkeyglobal-apidoc.readme.io/reference/change-futures-leverage-trade
4628
+ * @param {float} leverage the rate of leverage
4629
+ * @param {string} symbol unified market symbol
4630
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4631
+ * @param {string} [params.side] *for isolated margin mode with hedged position mode only* 'long' or 'short'
4632
+ * @returns {object} response from the exchange
4633
+ */
4623
4634
  async setLeverage(leverage, symbol = undefined, params = {}) {
4624
- /**
4625
- * @method
4626
- * @name hashkey#setLeverage
4627
- * @description set the level of leverage for a market
4628
- * @see https://hashkeyglobal-apidoc.readme.io/reference/change-futures-leverage-trade
4629
- * @param {float} leverage the rate of leverage
4630
- * @param {string} symbol unified market symbol
4631
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4632
- * @param {string} [params.side] *for isolated margin mode with hedged position mode only* 'long' or 'short'
4633
- * @returns {object} response from the exchange
4634
- */
4635
4635
  const methodName = 'setLeverage';
4636
4636
  if (symbol === undefined) {
4637
4637
  throw new ArgumentsRequired(this.id + ' ' + methodName + '() requires a symbol argument');
@@ -4773,47 +4773,47 @@ export default class coincatch extends Exchange {
4773
4773
  'datetime': undefined,
4774
4774
  };
4775
4775
  }
4776
+ /**
4777
+ * @method
4778
+ * @name coincatch#reduceMargin
4779
+ * @description remove margin from a position
4780
+ * @see https://coincatch.github.io/github.io/en/mix/#change-margin
4781
+ * @param {string} symbol unified market symbol
4782
+ * @param {float} amount the amount of margin to remove
4783
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4784
+ * @param {string} [params.side] *for isolated margin mode with hedged position mode only* 'long' or 'short'
4785
+ * @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=reduce-margin-structure}
4786
+ */
4776
4787
  async reduceMargin(symbol, amount, params = {}) {
4777
- /**
4778
- * @method
4779
- * @name coincatch#reduceMargin
4780
- * @description remove margin from a position
4781
- * @see https://coincatch.github.io/github.io/en/mix/#change-margin
4782
- * @param {string} symbol unified market symbol
4783
- * @param {float} amount the amount of margin to remove
4784
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4785
- * @param {string} [params.side] *for isolated margin mode with hedged position mode only* 'long' or 'short'
4786
- * @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=reduce-margin-structure}
4787
- */
4788
4788
  params['methodName'] = 'reduceMargin';
4789
4789
  return await this.modifyMarginHelper(symbol, -amount, 'reduce', params);
4790
4790
  }
4791
+ /**
4792
+ * @method
4793
+ * @name coincatch#addMargin
4794
+ * @description add margin
4795
+ * @see https://coincatch.github.io/github.io/en/mix/#change-margin
4796
+ * @param {string} symbol unified market symbol
4797
+ * @param {float} amount amount of margin to add
4798
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4799
+ * @param {string} [params.side] *for isolated margin mode with hedged position mode only* 'long' or 'short'
4800
+ * @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=add-margin-structure}
4801
+ */
4791
4802
  async addMargin(symbol, amount, params = {}) {
4792
- /**
4793
- * @method
4794
- * @name coincatch#addMargin
4795
- * @description add margin
4796
- * @see https://coincatch.github.io/github.io/en/mix/#change-margin
4797
- * @param {string} symbol unified market symbol
4798
- * @param {float} amount amount of margin to add
4799
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4800
- * @param {string} [params.side] *for isolated margin mode with hedged position mode only* 'long' or 'short'
4801
- * @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=add-margin-structure}
4802
- */
4803
4803
  params['methodName'] = 'addMargin';
4804
4804
  return await this.modifyMarginHelper(symbol, amount, 'add', params);
4805
4805
  }
4806
+ /**
4807
+ * @method
4808
+ * @name coincatch#fetchPosition
4809
+ * @description fetch data on a single open contract trade position
4810
+ * @see https://coincatch.github.io/github.io/en/mix/#get-symbol-position
4811
+ * @param {string} symbol unified market symbol of the market the position is held in, default is undefined
4812
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4813
+ * @param {string} [params.side] 'long' or 'short' *for non-hedged position mode only* (default 'long')
4814
+ * @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
4815
+ */
4806
4816
  async fetchPosition(symbol, params = {}) {
4807
- /**
4808
- * @method
4809
- * @name coincatch#fetchPosition
4810
- * @description fetch data on a single open contract trade position
4811
- * @see https://coincatch.github.io/github.io/en/mix/#get-symbol-position
4812
- * @param {string} symbol unified market symbol of the market the position is held in, default is undefined
4813
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4814
- * @param {string} [parmas.side] 'long' or 'short' *for non-hedged position mode only* (default 'long')
4815
- * @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
4816
- */
4817
4817
  const methodName = 'fetchPosition';
4818
4818
  let side = 'long';
4819
4819
  [side, params] = this.handleOptionAndParams(params, methodName, 'side');
@@ -4829,17 +4829,17 @@ export default class coincatch extends Exchange {
4829
4829
  }
4830
4830
  return positions[0];
4831
4831
  }
4832
+ /**
4833
+ * @method
4834
+ * @description fetch open positions for a single market
4835
+ * @name coincatch#fetchPositionsForSymbol
4836
+ * @see https://coincatch.github.io/github.io/en/mix/#get-symbol-position
4837
+ * @description fetch all open positions for specific symbol
4838
+ * @param {string} symbol unified market symbol
4839
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4840
+ * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
4841
+ */
4832
4842
  async fetchPositionsForSymbol(symbol, params = {}) {
4833
- /**
4834
- * @method
4835
- * @description fetch open positions for a single market
4836
- * @name coincatch#fetchPositionsForSymbol
4837
- * @see https://coincatch.github.io/github.io/en/mix/#get-symbol-position
4838
- * @description fetch all open positions for specific symbol
4839
- * @param {string} symbol unified market symbol
4840
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4841
- * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
4842
- */
4843
4843
  await this.loadMarkets();
4844
4844
  const market = this.market(symbol);
4845
4845
  const request = {
@@ -4881,18 +4881,18 @@ export default class coincatch extends Exchange {
4881
4881
  const data = this.safeList(response, 'data', []);
4882
4882
  return this.parsePositions(data, [symbol]);
4883
4883
  }
4884
+ /**
4885
+ * @method
4886
+ * @name coincatch#fetchPositions
4887
+ * @description fetch all open positions
4888
+ * @see https://coincatch.github.io/github.io/en/mix/#get-all-position
4889
+ * @param {string[]} [symbols] list of unified market symbols (all symbols must belong to the same product type)
4890
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4891
+ * @param {string} [params.productType] 'umcbl' or 'dmcbl' (default 'umcbl' if symbols are not provided)
4892
+ * @param {string} [params.marginCoin] the settle currency of the positions, needs to match the productType
4893
+ * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
4894
+ */
4884
4895
  async fetchPositions(symbols = undefined, params = {}) {
4885
- /**
4886
- * @method
4887
- * @name coincatch#fetchPositions
4888
- * @description fetch all open positions
4889
- * @see https://coincatch.github.io/github.io/en/mix/#get-all-position
4890
- * @param {string[]} [symbols] list of unified market symbols (all symbols must belong to the same product type)
4891
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4892
- * @param {string} [params.productType] 'umcbl' or 'dmcbl' (default 'umcbl' if symbols are not provided)
4893
- * @param {string} [params.marginCoin] the settle currency of the positions, needs to match the productType
4894
- * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
4895
- */
4896
4896
  const methodName = 'fetchPositions';
4897
4897
  await this.loadMarkets();
4898
4898
  let productType = 'umcbl';
@@ -5059,29 +5059,29 @@ export default class coincatch extends Exchange {
5059
5059
  }
5060
5060
  return market;
5061
5061
  }
5062
+ /**
5063
+ * @method
5064
+ * @name coincatch#fetchLedger
5065
+ * @description fetch the history of changes, actions done by the user or operations that altered balance of the user
5066
+ * @see https://coincatch.github.io/github.io/en/spot/#get-bills
5067
+ * @see https://coincatch.github.io/github.io/en/mix/#get-business-account-bill
5068
+ * @param {string} [code] unified currency code
5069
+ * @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
5070
+ * @param {int} [limit] max number of ledger entrys to return, default is undefined
5071
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
5072
+ * @param {int} [params.until] *swap only* the latest time in ms to fetch entries for
5073
+ * @param {string} [params.type] 'spot' or 'swap' (default 'spot')
5074
+ * @param {string} [params.after] *spot only* billId, return the data less than this billId
5075
+ * @param {string} [params.before] *spot only* billId, return the data greater than or equals to this billId
5076
+ * @param {string} [params.groupType] *spot only*
5077
+ * @param {string} [params.bizType] *spot only*
5078
+ * @param {string} [params.productType] *swap only* 'umcbl' or 'dmcbl' (default 'umcbl' or 'dmcbl' if code is provided and code is not equal to 'USDT')
5079
+ * @param {string} [params.business] *swap only*
5080
+ * @param {string} [params.lastEndId] *swap only*
5081
+ * @param {bool} [params.next] *swap only*
5082
+ * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
5083
+ */
5062
5084
  async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
5063
- /**
5064
- * @method
5065
- * @name coincatch#fetchLedger
5066
- * @description fetch the history of changes, actions done by the user or operations that altered balance of the user
5067
- * @see https://coincatch.github.io/github.io/en/spot/#get-bills
5068
- * @see https://coincatch.github.io/github.io/en/mix/#get-business-account-bill
5069
- * @param {string} [code] unified currency code
5070
- * @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
5071
- * @param {int} [limit] max number of ledger entrys to return, default is undefined
5072
- * @param {object} [params] extra parameters specific to the exchange API endpoint
5073
- * @param {int} [params.until] *swap only* the latest time in ms to fetch entries for
5074
- * @param {string} [params.type] 'spot' or 'swap' (default 'spot')
5075
- * @param {string} [params.after] *spot only* billId, return the data less than this billId
5076
- * @param {string} [params.before] *spot only* billId, return the data greater than or equals to this billId
5077
- * @param {string} [params.groupType] *spot only*
5078
- * @param {string} [params.bizType] *spot only*
5079
- * @param {string} [params.productType] *swap only* 'umcbl' or 'dmcbl' (default 'umcbl' or 'dmcbl' if code is provided and code is not equal to 'USDT')
5080
- * @param {string} [params.business] *swap only*
5081
- * @param {string} [params.lastEndId] *swap only*
5082
- * @param {bool} [params.next] *swap only*
5083
- * @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger-structure}
5084
- */
5085
5085
  const methodName = 'fetchLedger';
5086
5086
  await this.loadMarkets();
5087
5087
  const request = {};