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
package/js/src/mexc.js CHANGED
@@ -817,16 +817,16 @@ export default class mexc extends Exchange {
817
817
  },
818
818
  });
819
819
  }
820
+ /**
821
+ * @method
822
+ * @name mexc#fetchStatus
823
+ * @description the latest known information on the availability of the exchange API
824
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#test-connectivity
825
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-the-server-time
826
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
827
+ * @returns {object} a [status structure]{@link https://docs.ccxt.com/#/?id=exchange-status-structure}
828
+ */
820
829
  async fetchStatus(params = {}) {
821
- /**
822
- * @method
823
- * @name mexc#fetchStatus
824
- * @description the latest known information on the availability of the exchange API
825
- * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#test-connectivity
826
- * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-the-server-time
827
- * @param {object} [params] extra parameters specific to the exchange API endpoint
828
- * @returns {object} a [status structure]{@link https://docs.ccxt.com/#/?id=exchange-status-structure}
829
- */
830
830
  const [marketType, query] = this.handleMarketTypeAndParams('fetchStatus', undefined, params);
831
831
  let response = undefined;
832
832
  let status = undefined;
@@ -856,16 +856,16 @@ export default class mexc extends Exchange {
856
856
  'info': response,
857
857
  };
858
858
  }
859
+ /**
860
+ * @method
861
+ * @name mexc#fetchTime
862
+ * @description fetches the current integer timestamp in milliseconds from the exchange server
863
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#check-server-time
864
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-the-server-time
865
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
866
+ * @returns {int} the current integer timestamp in milliseconds from the exchange server
867
+ */
859
868
  async fetchTime(params = {}) {
860
- /**
861
- * @method
862
- * @name mexc#fetchTime
863
- * @description fetches the current integer timestamp in milliseconds from the exchange server
864
- * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#check-server-time
865
- * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-the-server-time
866
- * @param {object} [params] extra parameters specific to the exchange API endpoint
867
- * @returns {int} the current integer timestamp in milliseconds from the exchange server
868
- */
869
869
  const [marketType, query] = this.handleMarketTypeAndParams('fetchTime', undefined, params);
870
870
  let response = undefined;
871
871
  if (marketType === 'spot') {
@@ -884,15 +884,15 @@ export default class mexc extends Exchange {
884
884
  }
885
885
  return undefined;
886
886
  }
887
+ /**
888
+ * @method
889
+ * @name mexc#fetchCurrencies
890
+ * @description fetches all available currencies on an exchange
891
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#query-the-currency-information
892
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
893
+ * @returns {object} an associative dictionary of currencies
894
+ */
887
895
  async fetchCurrencies(params = {}) {
888
- /**
889
- * @method
890
- * @name mexc#fetchCurrencies
891
- * @description fetches all available currencies on an exchange
892
- * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#query-the-currency-information
893
- * @param {object} [params] extra parameters specific to the exchange API endpoint
894
- * @returns {object} an associative dictionary of currencies
895
- */
896
896
  // this endpoint requires authentication
897
897
  // while fetchCurrencies is a public API method by design
898
898
  // therefore we check the keys here
@@ -1029,16 +1029,16 @@ export default class mexc extends Exchange {
1029
1029
  }
1030
1030
  return result;
1031
1031
  }
1032
+ /**
1033
+ * @method
1034
+ * @name mexc#fetchMarkets
1035
+ * @description retrieves data on all markets for mexc
1036
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#exchange-information
1037
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-the-contract-information
1038
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1039
+ * @returns {object[]} an array of objects representing market data
1040
+ */
1032
1041
  async fetchMarkets(params = {}) {
1033
- /**
1034
- * @method
1035
- * @name mexc#fetchMarkets
1036
- * @description retrieves data on all markets for mexc
1037
- * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#exchange-information
1038
- * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-the-contract-information
1039
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1040
- * @returns {object[]} an array of objects representing market data
1041
- */
1042
1042
  if (this.options['adjustForTimeDifference']) {
1043
1043
  await this.loadTimeDifference();
1044
1044
  }
@@ -1047,16 +1047,16 @@ export default class mexc extends Exchange {
1047
1047
  const [spotMarket, swapMarket] = await Promise.all([spotMarketPromise, swapMarketPromise]);
1048
1048
  return this.arrayConcat(spotMarket, swapMarket);
1049
1049
  }
1050
+ /**
1051
+ * @ignore
1052
+ * @method
1053
+ * @name mexc#fetchMarkets
1054
+ * @description retrieves data on all spot markets for mexc
1055
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#exchange-information
1056
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1057
+ * @returns {object[]} an array of objects representing market data
1058
+ */
1050
1059
  async fetchSpotMarkets(params = {}) {
1051
- /**
1052
- * @ignore
1053
- * @method
1054
- * @name mexc#fetchMarkets
1055
- * @description retrieves data on all spot markets for mexc
1056
- * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#exchange-information
1057
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1058
- * @returns {object[]} an array of objects representing market data
1059
- */
1060
1060
  const response = await this.spotPublicGetExchangeInfo(params);
1061
1061
  //
1062
1062
  // {
@@ -1173,16 +1173,16 @@ export default class mexc extends Exchange {
1173
1173
  }
1174
1174
  return result;
1175
1175
  }
1176
+ /**
1177
+ * @ignore
1178
+ * @method
1179
+ * @name mexc#fetchMarkets
1180
+ * @description retrieves data on all swap markets for mexc
1181
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-the-contract-information
1182
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1183
+ * @returns {object[]} an array of objects representing market data
1184
+ */
1176
1185
  async fetchSwapMarkets(params = {}) {
1177
- /**
1178
- * @ignore
1179
- * @method
1180
- * @name mexc#fetchMarkets
1181
- * @description retrieves data on all swap markets for mexc
1182
- * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-the-contract-information
1183
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1184
- * @returns {object[]} an array of objects representing market data
1185
- */
1186
1186
  const currentRl = this.rateLimit;
1187
1187
  this.setProperty(this, 'rateLimit', 10); // see comment: https://github.com/ccxt/ccxt/pull/23698
1188
1188
  const response = await this.contractPublicGetDetail(params);
@@ -1297,18 +1297,18 @@ export default class mexc extends Exchange {
1297
1297
  }
1298
1298
  return result;
1299
1299
  }
1300
+ /**
1301
+ * @method
1302
+ * @name mexc#fetchOrderBook
1303
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#order-book
1304
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-the-contract-s-depth-information
1305
+ * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
1306
+ * @param {string} symbol unified symbol of the market to fetch the order book for
1307
+ * @param {int} [limit] the maximum amount of order book entries to return
1308
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1309
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
1310
+ */
1300
1311
  async fetchOrderBook(symbol, limit = undefined, params = {}) {
1301
- /**
1302
- * @method
1303
- * @name mexc#fetchOrderBook
1304
- * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#order-book
1305
- * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-the-contract-s-depth-information
1306
- * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
1307
- * @param {string} symbol unified symbol of the market to fetch the order book for
1308
- * @param {int} [limit] the maximum amount of order book entries to return
1309
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1310
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
1311
- */
1312
1312
  await this.loadMarkets();
1313
1313
  const market = this.market(symbol);
1314
1314
  const request = {
@@ -1374,21 +1374,21 @@ export default class mexc extends Exchange {
1374
1374
  }
1375
1375
  return [price, amount];
1376
1376
  }
1377
+ /**
1378
+ * @method
1379
+ * @name mexc#fetchTrades
1380
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#recent-trades-list
1381
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#compressed-aggregate-trades-list
1382
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-contract-transaction-data
1383
+ * @description get the list of most recent trades for a particular symbol
1384
+ * @param {string} symbol unified symbol of the market to fetch trades for
1385
+ * @param {int} [since] timestamp in ms of the earliest trade to fetch
1386
+ * @param {int} [limit] the maximum amount of trades to fetch
1387
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1388
+ * @param {int} [params.until] *spot only* *since must be defined* the latest time in ms to fetch entries for
1389
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
1390
+ */
1377
1391
  async fetchTrades(symbol, since = undefined, limit = undefined, params = {}) {
1378
- /**
1379
- * @method
1380
- * @name mexc#fetchTrades
1381
- * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#recent-trades-list
1382
- * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#compressed-aggregate-trades-list
1383
- * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-contract-transaction-data
1384
- * @description get the list of most recent trades for a particular symbol
1385
- * @param {string} symbol unified symbol of the market to fetch trades for
1386
- * @param {int} [since] timestamp in ms of the earliest trade to fetch
1387
- * @param {int} [limit] the maximum amount of trades to fetch
1388
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1389
- * @param {int} [params.until] *spot only* *since must be defined* the latest time in ms to fetch entries for
1390
- * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
1391
- */
1392
1392
  await this.loadMarkets();
1393
1393
  const market = this.market(symbol);
1394
1394
  const request = {
@@ -1650,22 +1650,22 @@ export default class mexc extends Exchange {
1650
1650
  }
1651
1651
  return id;
1652
1652
  }
1653
+ /**
1654
+ * @method
1655
+ * @name mexc#fetchOHLCV
1656
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#kline-candlestick-data
1657
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#k-line-data
1658
+ * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
1659
+ * @param {string} symbol unified symbol of the market to fetch OHLCV data for
1660
+ * @param {string} timeframe the length of time each candle represents
1661
+ * @param {int} [since] timestamp in ms of the earliest candle to fetch
1662
+ * @param {int} [limit] the maximum amount of candles to fetch
1663
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1664
+ * @param {int} [params.until] timestamp in ms of the latest candle to fetch
1665
+ * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
1666
+ * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
1667
+ */
1653
1668
  async fetchOHLCV(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
1654
- /**
1655
- * @method
1656
- * @name mexc#fetchOHLCV
1657
- * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#kline-candlestick-data
1658
- * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#k-line-data
1659
- * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
1660
- * @param {string} symbol unified symbol of the market to fetch OHLCV data for
1661
- * @param {string} timeframe the length of time each candle represents
1662
- * @param {int} [since] timestamp in ms of the earliest candle to fetch
1663
- * @param {int} [limit] the maximum amount of candles to fetch
1664
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1665
- * @param {int} [params.until] timestamp in ms of the latest candle to fetch
1666
- * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
1667
- * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
1668
- */
1669
1669
  await this.loadMarkets();
1670
1670
  const market = this.market(symbol);
1671
1671
  const maxLimit = (market['spot']) ? 1000 : 2000;
@@ -1772,17 +1772,17 @@ export default class mexc extends Exchange {
1772
1772
  this.safeNumber(ohlcv, 5),
1773
1773
  ];
1774
1774
  }
1775
+ /**
1776
+ * @method
1777
+ * @name mexc#fetchTickers
1778
+ * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
1779
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#24hr-ticker-price-change-statistics
1780
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-contract-trend-data
1781
+ * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
1782
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1783
+ * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1784
+ */
1775
1785
  async fetchTickers(symbols = undefined, params = {}) {
1776
- /**
1777
- * @method
1778
- * @name mexc#fetchTickers
1779
- * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
1780
- * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#24hr-ticker-price-change-statistics
1781
- * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-contract-trend-data
1782
- * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
1783
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1784
- * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1785
- */
1786
1786
  await this.loadMarkets();
1787
1787
  const request = {};
1788
1788
  let market = undefined;
@@ -1862,17 +1862,17 @@ export default class mexc extends Exchange {
1862
1862
  }
1863
1863
  return this.parseTickers(tickers, symbols);
1864
1864
  }
1865
+ /**
1866
+ * @method
1867
+ * @name mexc#fetchTicker
1868
+ * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
1869
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#24hr-ticker-price-change-statistics
1870
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-contract-trend-data
1871
+ * @param {string} symbol unified symbol of the market to fetch the ticker for
1872
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1873
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1874
+ */
1865
1875
  async fetchTicker(symbol, params = {}) {
1866
- /**
1867
- * @method
1868
- * @name mexc#fetchTicker
1869
- * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
1870
- * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#24hr-ticker-price-change-statistics
1871
- * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-contract-trend-data
1872
- * @param {string} symbol unified symbol of the market to fetch the ticker for
1873
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1874
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1875
- */
1876
1876
  await this.loadMarkets();
1877
1877
  const market = this.market(symbol);
1878
1878
  const [marketType, query] = this.handleMarketTypeAndParams('fetchTicker', market, params);
@@ -2054,16 +2054,16 @@ export default class mexc extends Exchange {
2054
2054
  'info': ticker,
2055
2055
  }, market);
2056
2056
  }
2057
+ /**
2058
+ * @method
2059
+ * @name mexc#fetchBidsAsks
2060
+ * @description fetches the bid and ask price and volume for multiple markets
2061
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#symbol-order-book-ticker
2062
+ * @param {string[]|undefined} symbols unified symbols of the markets to fetch the bids and asks for, all markets are returned if not assigned
2063
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2064
+ * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
2065
+ */
2057
2066
  async fetchBidsAsks(symbols = undefined, params = {}) {
2058
- /**
2059
- * @method
2060
- * @name mexc#fetchBidsAsks
2061
- * @description fetches the bid and ask price and volume for multiple markets
2062
- * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#symbol-order-book-ticker
2063
- * @param {string[]|undefined} symbols unified symbols of the markets to fetch the bids and asks for, all markets are returned if not assigned
2064
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2065
- * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
2066
- */
2067
2067
  await this.loadMarkets();
2068
2068
  let market = undefined;
2069
2069
  let isSingularMarket = false;
@@ -2097,17 +2097,17 @@ export default class mexc extends Exchange {
2097
2097
  }
2098
2098
  return this.parseTickers(tickers, symbols);
2099
2099
  }
2100
+ /**
2101
+ * @method
2102
+ * @name mexc#createMarketBuyOrderWithCost
2103
+ * @description create a market buy order by providing the symbol and cost
2104
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#new-order
2105
+ * @param {string} symbol unified symbol of the market to create an order in
2106
+ * @param {float} cost how much you want to trade in units of the quote currency
2107
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2108
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2109
+ */
2100
2110
  async createMarketBuyOrderWithCost(symbol, cost, params = {}) {
2101
- /**
2102
- * @method
2103
- * @name mexc#createMarketBuyOrderWithCost
2104
- * @description create a market buy order by providing the symbol and cost
2105
- * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#new-order
2106
- * @param {string} symbol unified symbol of the market to create an order in
2107
- * @param {float} cost how much you want to trade in units of the quote currency
2108
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2109
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2110
- */
2111
2111
  await this.loadMarkets();
2112
2112
  const market = this.market(symbol);
2113
2113
  if (!market['spot']) {
@@ -2116,17 +2116,17 @@ export default class mexc extends Exchange {
2116
2116
  params['cost'] = cost;
2117
2117
  return await this.createOrder(symbol, 'market', 'buy', 0, undefined, params);
2118
2118
  }
2119
+ /**
2120
+ * @method
2121
+ * @name mexc#createMarketSellOrderWithCost
2122
+ * @description create a market sell order by providing the symbol and cost
2123
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#new-order
2124
+ * @param {string} symbol unified symbol of the market to create an order in
2125
+ * @param {float} cost how much you want to trade in units of the quote currency
2126
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2127
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2128
+ */
2119
2129
  async createMarketSellOrderWithCost(symbol, cost, params = {}) {
2120
- /**
2121
- * @method
2122
- * @name mexc#createMarketSellOrderWithCost
2123
- * @description create a market sell order by providing the symbol and cost
2124
- * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#new-order
2125
- * @param {string} symbol unified symbol of the market to create an order in
2126
- * @param {float} cost how much you want to trade in units of the quote currency
2127
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2128
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2129
- */
2130
2130
  await this.loadMarkets();
2131
2131
  const market = this.market(symbol);
2132
2132
  if (!market['spot']) {
@@ -2135,34 +2135,34 @@ export default class mexc extends Exchange {
2135
2135
  params['cost'] = cost;
2136
2136
  return await this.createOrder(symbol, 'market', 'sell', 0, undefined, params);
2137
2137
  }
2138
+ /**
2139
+ * @method
2140
+ * @name mexc#createOrder
2141
+ * @description create a trade order
2142
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#new-order
2143
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#order-under-maintenance
2144
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#trigger-order-under-maintenance
2145
+ * @param {string} symbol unified symbol of the market to create an order in
2146
+ * @param {string} type 'market' or 'limit'
2147
+ * @param {string} side 'buy' or 'sell'
2148
+ * @param {float} amount how much of currency you want to trade in units of base currency
2149
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
2150
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2151
+ * @param {string} [params.marginMode] only 'isolated' is supported for spot-margin trading
2152
+ * @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
2153
+ * @param {bool} [params.postOnly] if true, the order will only be posted if it will be a maker order
2154
+ * @param {bool} [params.reduceOnly] *contract only* indicates if this order is to reduce the size of a position
2155
+ * @param {bool} [params.hedged] *swap only* true for hedged mode, false for one way mode, default is false
2156
+ *
2157
+ * EXCHANGE SPECIFIC PARAMETERS
2158
+ * @param {int} [params.leverage] *contract only* leverage is necessary on isolated margin
2159
+ * @param {long} [params.positionId] *contract only* it is recommended to fill in this parameter when closing a position
2160
+ * @param {string} [params.externalOid] *contract only* external order ID
2161
+ * @param {int} [params.positionMode] *contract only* 1:hedge, 2:one-way, default: the user's current config
2162
+ * @param {boolean} [params.test] *spot only* whether to use the test endpoint or not, default is false
2163
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2164
+ */
2138
2165
  async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
2139
- /**
2140
- * @method
2141
- * @name mexc#createOrder
2142
- * @description create a trade order
2143
- * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#new-order
2144
- * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#order-under-maintenance
2145
- * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#trigger-order-under-maintenance
2146
- * @param {string} symbol unified symbol of the market to create an order in
2147
- * @param {string} type 'market' or 'limit'
2148
- * @param {string} side 'buy' or 'sell'
2149
- * @param {float} amount how much of currency you want to trade in units of base currency
2150
- * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
2151
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2152
- * @param {string} [params.marginMode] only 'isolated' is supported for spot-margin trading
2153
- * @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
2154
- * @param {bool} [params.postOnly] if true, the order will only be posted if it will be a maker order
2155
- * @param {bool} [params.reduceOnly] *contract only* indicates if this order is to reduce the size of a position
2156
- * @param {bool} [params.hedged] *swap only* true for hedged mode, false for one way mode, default is false
2157
- *
2158
- * EXCHANGE SPECIFIC PARAMETERS
2159
- * @param {int} [params.leverage] *contract only* leverage is necessary on isolated margin
2160
- * @param {long} [params.positionId] *contract only* it is recommended to fill in this parameter when closing a position
2161
- * @param {string} [params.externalOid] *contract only* external order ID
2162
- * @param {int} [params.positionMode] *contract only* 1:hedge, 2:one-way, default: the user's current config
2163
- * @param {boolean} [params.test] *spot only* whether to use the test endpoint or not, default is false
2164
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2165
- */
2166
2166
  await this.loadMarkets();
2167
2167
  const market = this.market(symbol);
2168
2168
  const [marginMode, query] = this.handleMarginModeAndParams('createOrder', params);
@@ -2224,24 +2224,24 @@ export default class mexc extends Exchange {
2224
2224
  }
2225
2225
  return this.extend(request, params);
2226
2226
  }
2227
+ /**
2228
+ * @ignore
2229
+ * @method
2230
+ * @name mexc#createSpotOrder
2231
+ * @description create a trade order
2232
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#new-order
2233
+ * @param {string} market unified symbol of the market to create an order in
2234
+ * @param {string} type 'market' or 'limit'
2235
+ * @param {string} side 'buy' or 'sell'
2236
+ * @param {float} amount how much of currency you want to trade in units of base currency
2237
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
2238
+ * @param {string} [marginMode] only 'isolated' is supported for spot-margin trading
2239
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2240
+ * @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
2241
+ * @param {bool} [params.postOnly] if true, the order will only be posted if it will be a maker order
2242
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2243
+ */
2227
2244
  async createSpotOrder(market, type, side, amount, price = undefined, marginMode = undefined, params = {}) {
2228
- /**
2229
- * @ignore
2230
- * @method
2231
- * @name mexc#createSpotOrder
2232
- * @description create a trade order
2233
- * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#new-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 currency you want to trade in units of base currency
2238
- * @param {float} [price] the price at which 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 {string} [params.marginMode] only 'isolated' is supported for spot-margin trading
2241
- * @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
2242
- * @param {bool} [params.postOnly] if true, the order will only be posted if it will be a maker order
2243
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2244
- */
2245
2245
  await this.loadMarkets();
2246
2246
  const test = this.safeBool(params, 'test', false);
2247
2247
  params = this.omit(params, 'test');
@@ -2283,34 +2283,34 @@ export default class mexc extends Exchange {
2283
2283
  }
2284
2284
  return order;
2285
2285
  }
2286
+ /**
2287
+ * @ignore
2288
+ * @method
2289
+ * @name mexc#createOrder
2290
+ * @description create a trade order
2291
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#new-order
2292
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#order-under-maintenance
2293
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#trigger-order-under-maintenance
2294
+ * @param {string} market unified symbol of the market to create an order in
2295
+ * @param {string} type 'market' or 'limit'
2296
+ * @param {string} side 'buy' or 'sell'
2297
+ * @param {float} amount how much of currency you want to trade in units of base currency
2298
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
2299
+ * @param {string} [marginMode] only 'isolated' is supported for spot-margin trading
2300
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2301
+ * @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
2302
+ * @param {bool} [params.postOnly] if true, the order will only be posted if it will be a maker order
2303
+ * @param {bool} [params.reduceOnly] indicates if this order is to reduce the size of a position
2304
+ * @param {bool} [params.hedged] *swap only* true for hedged mode, false for one way mode, default is false
2305
+ *
2306
+ * EXCHANGE SPECIFIC PARAMETERS
2307
+ * @param {int} [params.leverage] leverage is necessary on isolated margin
2308
+ * @param {long} [params.positionId] it is recommended to fill in this parameter when closing a position
2309
+ * @param {string} [params.externalOid] external order ID
2310
+ * @param {int} [params.positionMode] 1:hedge, 2:one-way, default: the user's current config
2311
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2312
+ */
2286
2313
  async createSwapOrder(market, type, side, amount, price = undefined, marginMode = undefined, params = {}) {
2287
- /**
2288
- * @ignore
2289
- * @method
2290
- * @name mexc#createOrder
2291
- * @description create a trade order
2292
- * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#new-order
2293
- * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#order-under-maintenance
2294
- * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#trigger-order-under-maintenance
2295
- * @param {string} symbol unified symbol of the market to create an order in
2296
- * @param {string} type 'market' or 'limit'
2297
- * @param {string} side 'buy' or 'sell'
2298
- * @param {float} amount how much of currency you want to trade in units of base currency
2299
- * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
2300
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2301
- * @param {string} [params.marginMode] only 'isolated' is supported for spot-margin trading
2302
- * @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
2303
- * @param {bool} [params.postOnly] if true, the order will only be posted if it will be a maker order
2304
- * @param {bool} [params.reduceOnly] indicates if this order is to reduce the size of a position
2305
- * @param {bool} [params.hedged] *swap only* true for hedged mode, false for one way mode, default is false
2306
- *
2307
- * EXCHANGE SPECIFIC PARAMETERS
2308
- * @param {int} [params.leverage] leverage is necessary on isolated margin
2309
- * @param {long} [params.positionId] it is recommended to fill in this parameter when closing a position
2310
- * @param {string} [params.externalOid] external order ID
2311
- * @param {int} [params.positionMode] 1:hedge, 2:one-way, default: the user's current config
2312
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2313
- */
2314
2314
  await this.loadMarkets();
2315
2315
  const symbol = market['symbol'];
2316
2316
  const unavailableContracts = this.safeValue(this.options, 'unavailableContracts', {});
@@ -2430,16 +2430,16 @@ export default class mexc extends Exchange {
2430
2430
  const data = this.safeString(response, 'data');
2431
2431
  return this.safeOrder({ 'id': data }, market);
2432
2432
  }
2433
+ /**
2434
+ * @method
2435
+ * @name mexc#createOrders
2436
+ * @description *spot only* *all orders must have the same symbol* create a list of trade orders
2437
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#batch-orders
2438
+ * @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
2439
+ * @param {object} [params] extra parameters specific to api endpoint
2440
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2441
+ */
2433
2442
  async createOrders(orders, params = {}) {
2434
- /**
2435
- * @method
2436
- * @name mexc#createOrders
2437
- * @description *spot only* *all orders must have the same symbol* create a list of trade orders
2438
- * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#batch-orders
2439
- * @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
2440
- * @param {object} [params] extra parameters specific to api endpoint
2441
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2442
- */
2443
2443
  await this.loadMarkets();
2444
2444
  const ordersRequests = [];
2445
2445
  let symbol = undefined;
@@ -2494,18 +2494,19 @@ export default class mexc extends Exchange {
2494
2494
  //
2495
2495
  return this.parseOrders(response);
2496
2496
  }
2497
+ /**
2498
+ * @method
2499
+ * @name mexc#fetchOrder
2500
+ * @description fetches information on an order made by the user
2501
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#query-order
2502
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#query-the-order-based-on-the-order-number
2503
+ * @param {string} id order id
2504
+ * @param {string} symbol unified symbol of the market the order was made in
2505
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2506
+ * @param {string} [params.marginMode] only 'isolated' is supported, for spot-margin trading
2507
+ * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2508
+ */
2497
2509
  async fetchOrder(id, symbol = undefined, params = {}) {
2498
- /**
2499
- * @method
2500
- * @name mexc#fetchOrder
2501
- * @description fetches information on an order made by the user
2502
- * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#query-order
2503
- * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#query-the-order-based-on-the-order-number
2504
- * @param {string} symbol unified symbol of the market the order was made in
2505
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2506
- * @param {string} [params.marginMode] only 'isolated' is supported, for spot-margin trading
2507
- * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2508
- */
2509
2510
  if (symbol === undefined) {
2510
2511
  throw new ArgumentsRequired(this.id + ' fetchOrder() requires a symbol argument');
2511
2512
  }
@@ -2618,22 +2619,22 @@ export default class mexc extends Exchange {
2618
2619
  }
2619
2620
  return this.parseOrder(data, market);
2620
2621
  }
2622
+ /**
2623
+ * @method
2624
+ * @name mexc#fetchOrders
2625
+ * @description fetches information on multiple orders made by the user
2626
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#all-orders
2627
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-all-of-the-user-39-s-historical-orders
2628
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#gets-the-trigger-order-list
2629
+ * @param {string} symbol unified market symbol of the market orders were made in
2630
+ * @param {int} [since] the earliest time in ms to fetch orders for
2631
+ * @param {int} [limit] the maximum number of order structures to retrieve
2632
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2633
+ * @param {int} [params.until] the latest time in ms to fetch orders for
2634
+ * @param {string} [params.marginMode] only 'isolated' is supported, for spot-margin trading
2635
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
2636
+ */
2621
2637
  async fetchOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
2622
- /**
2623
- * @method
2624
- * @name mexc#fetchOrders
2625
- * @description fetches information on multiple orders made by the user
2626
- * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#all-orders
2627
- * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-all-of-the-user-39-s-historical-orders
2628
- * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#gets-the-trigger-order-list
2629
- * @param {string} symbol unified market symbol of the market orders were made in
2630
- * @param {int} [since] the earliest time in ms to fetch orders for
2631
- * @param {int} [limit] the maximum number of order structures to retrieve
2632
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2633
- * @param {int} [params.until] the latest time in ms to fetch orders for
2634
- * @param {string} [params.marginMode] only 'isolated' is supported, for spot-margin trading
2635
- * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
2636
- */
2637
2638
  await this.loadMarkets();
2638
2639
  const request = {};
2639
2640
  let market = undefined;
@@ -2871,21 +2872,21 @@ export default class mexc extends Exchange {
2871
2872
  return this.parseOrders(data, market);
2872
2873
  }
2873
2874
  }
2875
+ /**
2876
+ * @method
2877
+ * @name mexc#fetchOpenOrders
2878
+ * @description fetch all unfilled currently open orders
2879
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#current-open-orders
2880
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-all-of-the-user-39-s-historical-orders
2881
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#gets-the-trigger-order-list
2882
+ * @param {string} symbol unified market symbol
2883
+ * @param {int} [since] the earliest time in ms to fetch open orders for
2884
+ * @param {int} [limit] the maximum number of open orders structures to retrieve
2885
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2886
+ * @param {string} [params.marginMode] only 'isolated' is supported, for spot-margin trading
2887
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
2888
+ */
2874
2889
  async fetchOpenOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
2875
- /**
2876
- * @method
2877
- * @name mexc#fetchOpenOrders
2878
- * @description fetch all unfilled currently open orders
2879
- * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#current-open-orders
2880
- * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-all-of-the-user-39-s-historical-orders
2881
- * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#gets-the-trigger-order-list
2882
- * @param {string} symbol unified market symbol
2883
- * @param {int} [since] the earliest time in ms to fetch open orders for
2884
- * @param {int} [limit] the maximum number of open orders structures to retrieve
2885
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2886
- * @param {string} [params.marginMode] only 'isolated' is supported, for spot-margin trading
2887
- * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
2888
- */
2889
2890
  await this.loadMarkets();
2890
2891
  const request = {};
2891
2892
  let market = undefined;
@@ -2965,36 +2966,36 @@ export default class mexc extends Exchange {
2965
2966
  return await this.fetchOrdersByState(2, symbol, since, limit, params);
2966
2967
  }
2967
2968
  }
2969
+ /**
2970
+ * @method
2971
+ * @name mexc#fetchClosedOrders
2972
+ * @description fetches information on multiple closed orders made by the user
2973
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#all-orders
2974
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-all-of-the-user-39-s-historical-orders
2975
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#gets-the-trigger-order-list
2976
+ * @param {string} symbol unified market symbol of the market orders were made in
2977
+ * @param {int} [since] the earliest time in ms to fetch orders for
2978
+ * @param {int} [limit] the maximum number of order structures to retrieve
2979
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2980
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
2981
+ */
2968
2982
  async fetchClosedOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
2969
- /**
2970
- * @method
2971
- * @name mexc#fetchClosedOrders
2972
- * @description fetches information on multiple closed orders made by the user
2973
- * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#all-orders
2974
- * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-all-of-the-user-39-s-historical-orders
2975
- * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#gets-the-trigger-order-list
2976
- * @param {string} symbol unified market symbol of the market orders were made in
2977
- * @param {int} [since] the earliest time in ms to fetch orders for
2978
- * @param {int} [limit] the maximum number of order structures to retrieve
2979
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2980
- * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
2981
- */
2982
2983
  return await this.fetchOrdersByState(3, symbol, since, limit, params);
2983
2984
  }
2985
+ /**
2986
+ * @method
2987
+ * @name mexc#fetchCanceledOrders
2988
+ * @description fetches information on multiple canceled orders made by the user
2989
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#all-orders
2990
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-all-of-the-user-39-s-historical-orders
2991
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#gets-the-trigger-order-list
2992
+ * @param {string} symbol unified market symbol of the market orders were made in
2993
+ * @param {int} [since] timestamp in ms of the earliest order, default is undefined
2994
+ * @param {int} [limit] max number of orders to return, default is undefined
2995
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2996
+ * @returns {object} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
2997
+ */
2984
2998
  async fetchCanceledOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
2985
- /**
2986
- * @method
2987
- * @name mexc#fetchCanceledOrders
2988
- * @description fetches information on multiple canceled orders made by the user
2989
- * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#all-orders
2990
- * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-all-of-the-user-39-s-historical-orders
2991
- * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#gets-the-trigger-order-list
2992
- * @param {string} symbol unified market symbol of the market orders were made in
2993
- * @param {int} [since] timestamp in ms of the earliest order, default is undefined
2994
- * @param {int} [limit] max number of orders to return, default is undefined
2995
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2996
- * @returns {object} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
2997
- */
2998
2999
  return await this.fetchOrdersByState(4, symbol, since, limit, params);
2999
3000
  }
3000
3001
  async fetchOrdersByState(state, symbol = undefined, since = undefined, limit = undefined, params = {}) {
@@ -3013,20 +3014,20 @@ export default class mexc extends Exchange {
3013
3014
  return await this.fetchOrders(symbol, since, limit, this.extend(request, params));
3014
3015
  }
3015
3016
  }
3017
+ /**
3018
+ * @method
3019
+ * @name mexc#cancelOrder
3020
+ * @description cancels an open order
3021
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#cancel-order
3022
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#cancel-the-order-under-maintenance
3023
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#cancel-the-stop-limit-trigger-order-under-maintenance
3024
+ * @param {string} id order id
3025
+ * @param {string} symbol unified symbol of the market the order was made in
3026
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3027
+ * @param {string} [params.marginMode] only 'isolated' is supported for spot-margin trading
3028
+ * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
3029
+ */
3016
3030
  async cancelOrder(id, symbol = undefined, params = {}) {
3017
- /**
3018
- * @method
3019
- * @name mexc#cancelOrder
3020
- * @description cancels an open order
3021
- * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#cancel-order
3022
- * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#cancel-the-order-under-maintenance
3023
- * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#cancel-the-stop-limit-trigger-order-under-maintenance
3024
- * @param {string} id order id
3025
- * @param {string} symbol unified symbol of the market the order was made in
3026
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3027
- * @param {string} [params.marginMode] only 'isolated' is supported for spot-margin trading
3028
- * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
3029
- */
3030
3031
  await this.loadMarkets();
3031
3032
  const request = {};
3032
3033
  let market = undefined;
@@ -3133,17 +3134,17 @@ export default class mexc extends Exchange {
3133
3134
  }
3134
3135
  return this.parseOrder(data, market);
3135
3136
  }
3137
+ /**
3138
+ * @method
3139
+ * @name mexc#cancelOrders
3140
+ * @description cancel multiple orders
3141
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#cancel-the-order-under-maintenance
3142
+ * @param {string[]} ids order ids
3143
+ * @param {string} symbol unified market symbol, default is undefined
3144
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3145
+ * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
3146
+ */
3136
3147
  async cancelOrders(ids, symbol = undefined, params = {}) {
3137
- /**
3138
- * @method
3139
- * @name mexc#cancelOrders
3140
- * @description cancel multiple orders
3141
- * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#cancel-the-order-under-maintenance
3142
- * @param {string[]} ids order ids
3143
- * @param {string} symbol unified market symbol, default is undefined
3144
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3145
- * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
3146
- */
3147
3148
  await this.loadMarkets();
3148
3149
  const market = (symbol !== undefined) ? this.market(symbol) : undefined;
3149
3150
  const [marketType] = this.handleMarketTypeAndParams('cancelOrders', market, params);
@@ -3169,19 +3170,19 @@ export default class mexc extends Exchange {
3169
3170
  return this.parseOrders(data, market);
3170
3171
  }
3171
3172
  }
3173
+ /**
3174
+ * @method
3175
+ * @name mexc#cancelAllOrders
3176
+ * @description cancel all open orders
3177
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#cancel-all-open-orders-on-a-symbol
3178
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#cancel-all-orders-under-a-contract-under-maintenance
3179
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#cancel-all-trigger-orders-under-maintenance
3180
+ * @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
3181
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3182
+ * @param {string} [params.marginMode] only 'isolated' is supported for spot-margin trading
3183
+ * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
3184
+ */
3172
3185
  async cancelAllOrders(symbol = undefined, params = {}) {
3173
- /**
3174
- * @method
3175
- * @name mexc#cancelAllOrders
3176
- * @description cancel all open orders
3177
- * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#cancel-all-open-orders-on-a-symbol
3178
- * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#cancel-all-orders-under-a-contract-under-maintenance
3179
- * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#cancel-all-trigger-orders-under-maintenance
3180
- * @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
3181
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3182
- * @param {string} [params.marginMode] only 'isolated' is supported for spot-margin trading
3183
- * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
3184
- */
3185
3186
  await this.loadMarkets();
3186
3187
  const market = (symbol !== undefined) ? this.market(symbol) : undefined;
3187
3188
  const request = {};
@@ -3575,16 +3576,16 @@ export default class mexc extends Exchange {
3575
3576
  }
3576
3577
  return undefined;
3577
3578
  }
3579
+ /**
3580
+ * @method
3581
+ * @name mexc#fetchAccounts
3582
+ * @description fetch all the accounts associated with a profile
3583
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#account-information
3584
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-all-informations-of-user-39-s-asset
3585
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3586
+ * @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/#/?id=account-structure} indexed by the account type
3587
+ */
3578
3588
  async fetchAccounts(params = {}) {
3579
- /**
3580
- * @method
3581
- * @name mexc#fetchAccounts
3582
- * @description fetch all the accounts associated with a profile
3583
- * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#account-information
3584
- * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-all-informations-of-user-39-s-asset
3585
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3586
- * @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/#/?id=account-structure} indexed by the account type
3587
- */
3588
3589
  // TODO: is the below endpoints suitable for fetchAccounts?
3589
3590
  const [marketType, query] = this.handleMarketTypeAndParams('fetchAccounts', undefined, params);
3590
3591
  await this.loadMarkets();
@@ -3604,16 +3605,16 @@ export default class mexc extends Exchange {
3604
3605
  }
3605
3606
  return result;
3606
3607
  }
3608
+ /**
3609
+ * @method
3610
+ * @name mexc#fetchTradingFees
3611
+ * @description fetch the trading fees for multiple markets
3612
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#account-information
3613
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-all-informations-of-user-39-s-asset
3614
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3615
+ * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
3616
+ */
3607
3617
  async fetchTradingFees(params = {}) {
3608
- /**
3609
- * @method
3610
- * @name mexc#fetchTradingFees
3611
- * @description fetch the trading fees for multiple markets
3612
- * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#account-information
3613
- * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-all-informations-of-user-39-s-asset
3614
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3615
- * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
3616
- */
3617
3618
  await this.loadMarkets();
3618
3619
  const response = await this.fetchAccountHelper('spot', params);
3619
3620
  let makerFee = this.safeString(response, 'makerCommission');
@@ -3757,18 +3758,18 @@ export default class mexc extends Exchange {
3757
3758
  account['debt'] = Precise.stringAdd(debt, interest);
3758
3759
  return account;
3759
3760
  }
3761
+ /**
3762
+ * @method
3763
+ * @name mexc#fetchBalance
3764
+ * @description query for balance and get the amount of funds available for trading or funds locked in orders
3765
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#account-information
3766
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-all-informations-of-user-39-s-asset
3767
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#isolated-account
3768
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3769
+ * @param {string} [params.symbols] // required for margin, market id's separated by commas
3770
+ * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
3771
+ */
3760
3772
  async fetchBalance(params = {}) {
3761
- /**
3762
- * @method
3763
- * @name mexc#fetchBalance
3764
- * @description query for balance and get the amount of funds available for trading or funds locked in orders
3765
- * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#account-information
3766
- * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-all-informations-of-user-39-s-asset
3767
- * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#isolated-account
3768
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3769
- * @param {string} [params.symbols] // required for margin, market id's separated by commas
3770
- * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
3771
- */
3772
3773
  await this.loadMarkets();
3773
3774
  let marketType = undefined;
3774
3775
  const request = {};
@@ -3891,20 +3892,20 @@ export default class mexc extends Exchange {
3891
3892
  //
3892
3893
  return this.customParseBalance(response, marketType);
3893
3894
  }
3895
+ /**
3896
+ * @method
3897
+ * @name mexc#fetchMyTrades
3898
+ * @description fetch all trades made by the user
3899
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#account-trade-list
3900
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-all-transaction-details-of-the-user-s-order
3901
+ * @param {string} symbol unified market symbol
3902
+ * @param {int} [since] the earliest time in ms to fetch trades for
3903
+ * @param {int} [limit] the maximum number of trades structures to retrieve
3904
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3905
+ * @param {int} [params.until] the latest time in ms to fetch trades for
3906
+ * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
3907
+ */
3894
3908
  async fetchMyTrades(symbol = undefined, since = undefined, limit = undefined, params = {}) {
3895
- /**
3896
- * @method
3897
- * @name mexc#fetchMyTrades
3898
- * @description fetch all trades made by the user
3899
- * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#account-trade-list
3900
- * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-all-transaction-details-of-the-user-s-order
3901
- * @param {string} symbol unified market symbol
3902
- * @param {int} [since] the earliest time in ms to fetch trades for
3903
- * @param {int} [limit] the maximum number of trades structures to retrieve
3904
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3905
- * @param {int} [params.until] the latest time in ms to fetch trades for
3906
- * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
3907
- */
3908
3909
  if (symbol === undefined) {
3909
3910
  throw new ArgumentsRequired(this.id + ' fetchMyTrades() requires a symbol argument');
3910
3911
  }
@@ -3990,20 +3991,20 @@ export default class mexc extends Exchange {
3990
3991
  }
3991
3992
  return this.parseTrades(trades, market, since, limit);
3992
3993
  }
3994
+ /**
3995
+ * @method
3996
+ * @name mexc#fetchOrderTrades
3997
+ * @description fetch all the trades made from a single order
3998
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#account-trade-list
3999
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#query-the-order-based-on-the-order-number
4000
+ * @param {string} id order id
4001
+ * @param {string} symbol unified market symbol
4002
+ * @param {int} [since] the earliest time in ms to fetch trades for
4003
+ * @param {int} [limit] the maximum number of trades to retrieve
4004
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4005
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
4006
+ */
3993
4007
  async fetchOrderTrades(id, symbol = undefined, since = undefined, limit = undefined, params = {}) {
3994
- /**
3995
- * @method
3996
- * @name mexc#fetchOrderTrades
3997
- * @description fetch all the trades made from a single order
3998
- * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#account-trade-list
3999
- * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#query-the-order-based-on-the-order-number
4000
- * @param {string} id order id
4001
- * @param {string} symbol unified market symbol
4002
- * @param {int} [since] the earliest time in ms to fetch trades for
4003
- * @param {int} [limit] the maximum number of trades to retrieve
4004
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4005
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
4006
- */
4007
4008
  await this.loadMarkets();
4008
4009
  const request = {};
4009
4010
  let market = undefined;
@@ -4090,43 +4091,43 @@ export default class mexc extends Exchange {
4090
4091
  // }
4091
4092
  return response;
4092
4093
  }
4094
+ /**
4095
+ * @method
4096
+ * @name mexc#reduceMargin
4097
+ * @description remove margin from a position
4098
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#increase-or-decrease-margin
4099
+ * @param {string} symbol unified market symbol
4100
+ * @param {float} amount the amount of margin to remove
4101
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4102
+ * @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=reduce-margin-structure}
4103
+ */
4093
4104
  async reduceMargin(symbol, amount, params = {}) {
4094
- /**
4095
- * @method
4096
- * @name mexc#reduceMargin
4097
- * @description remove margin from a position
4098
- * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#increase-or-decrease-margin
4099
- * @param {string} symbol unified market symbol
4100
- * @param {float} amount the amount of margin to remove
4101
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4102
- * @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=reduce-margin-structure}
4103
- */
4104
4105
  return await this.modifyMarginHelper(symbol, amount, 'SUB', params);
4105
4106
  }
4107
+ /**
4108
+ * @method
4109
+ * @name mexc#addMargin
4110
+ * @description add margin
4111
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#increase-or-decrease-margin
4112
+ * @param {string} symbol unified market symbol
4113
+ * @param {float} amount amount of margin to add
4114
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4115
+ * @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=add-margin-structure}
4116
+ */
4106
4117
  async addMargin(symbol, amount, params = {}) {
4107
- /**
4108
- * @method
4109
- * @name mexc#addMargin
4110
- * @description add margin
4111
- * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#increase-or-decrease-margin
4112
- * @param {string} symbol unified market symbol
4113
- * @param {float} amount amount of margin to add
4114
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4115
- * @returns {object} a [margin structure]{@link https://docs.ccxt.com/#/?id=add-margin-structure}
4116
- */
4117
4118
  return await this.modifyMarginHelper(symbol, amount, 'ADD', params);
4118
4119
  }
4120
+ /**
4121
+ * @method
4122
+ * @name mexc#setLeverage
4123
+ * @description set the level of leverage for a market
4124
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#switch-leverage
4125
+ * @param {float} leverage the rate of leverage
4126
+ * @param {string} symbol unified market symbol
4127
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4128
+ * @returns {object} response from the exchange
4129
+ */
4119
4130
  async setLeverage(leverage, symbol = undefined, params = {}) {
4120
- /**
4121
- * @method
4122
- * @name mexc#setLeverage
4123
- * @description set the level of leverage for a market
4124
- * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#switch-leverage
4125
- * @param {float} leverage the rate of leverage
4126
- * @param {string} symbol unified market symbol
4127
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4128
- * @returns {object} response from the exchange
4129
- */
4130
4131
  await this.loadMarkets();
4131
4132
  const request = {
4132
4133
  'leverage': leverage,
@@ -4150,18 +4151,18 @@ export default class mexc extends Exchange {
4150
4151
  }
4151
4152
  return await this.contractPrivatePostPositionChangeLeverage(this.extend(request, params));
4152
4153
  }
4154
+ /**
4155
+ * @method
4156
+ * @name mexc#fetchFundingHistory
4157
+ * @description fetch the history of funding payments paid and received on this account
4158
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-details-of-user-s-funding-rate
4159
+ * @param {string} symbol unified market symbol
4160
+ * @param {int} [since] the earliest time in ms to fetch funding history for
4161
+ * @param {int} [limit] the maximum number of funding history structures to retrieve
4162
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4163
+ * @returns {object} a [funding history structure]{@link https://docs.ccxt.com/#/?id=funding-history-structure}
4164
+ */
4153
4165
  async fetchFundingHistory(symbol = undefined, since = undefined, limit = undefined, params = {}) {
4154
- /**
4155
- * @method
4156
- * @name mexc#fetchFundingHistory
4157
- * @description fetch the history of funding payments paid and received on this account
4158
- * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-details-of-user-s-funding-rate
4159
- * @param {string} symbol unified market symbol
4160
- * @param {int} [since] the earliest time in ms to fetch funding history for
4161
- * @param {int} [limit] the maximum number of funding history structures to retrieve
4162
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4163
- * @returns {object} a [funding history structure]{@link https://docs.ccxt.com/#/?id=funding-history-structure}
4164
- */
4165
4166
  await this.loadMarkets();
4166
4167
  let market = undefined;
4167
4168
  const request = {
@@ -4271,28 +4272,28 @@ export default class mexc extends Exchange {
4271
4272
  'interval': intervalString,
4272
4273
  };
4273
4274
  }
4275
+ /**
4276
+ * @method
4277
+ * @name mexc#fetchFundingInterval
4278
+ * @description fetch the current funding rate interval
4279
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-contract-funding-rate
4280
+ * @param {string} symbol unified market symbol
4281
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4282
+ * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
4283
+ */
4274
4284
  async fetchFundingInterval(symbol, params = {}) {
4275
- /**
4276
- * @method
4277
- * @name mexc#fetchFundingInterval
4278
- * @description fetch the current funding rate interval
4279
- * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-contract-funding-rate
4280
- * @param {string} symbol unified market symbol
4281
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4282
- * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
4283
- */
4284
4285
  return await this.fetchFundingRate(symbol, params);
4285
4286
  }
4287
+ /**
4288
+ * @method
4289
+ * @name mexc#fetchFundingRate
4290
+ * @description fetch the current funding rate
4291
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-contract-funding-rate
4292
+ * @param {string} symbol unified market symbol
4293
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4294
+ * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
4295
+ */
4286
4296
  async fetchFundingRate(symbol, params = {}) {
4287
- /**
4288
- * @method
4289
- * @name mexc#fetchFundingRate
4290
- * @description fetch the current funding rate
4291
- * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-contract-funding-rate
4292
- * @param {string} symbol unified market symbol
4293
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4294
- * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
4295
- */
4296
4297
  await this.loadMarkets();
4297
4298
  const market = this.market(symbol);
4298
4299
  const request = {
@@ -4317,18 +4318,18 @@ export default class mexc extends Exchange {
4317
4318
  const result = this.safeValue(response, 'data', {});
4318
4319
  return this.parseFundingRate(result, market);
4319
4320
  }
4321
+ /**
4322
+ * @method
4323
+ * @name mexc#fetchFundingRateHistory
4324
+ * @description fetches historical funding rate prices
4325
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-contract-funding-rate-history
4326
+ * @param {string} symbol unified symbol of the market to fetch the funding rate history for
4327
+ * @param {int} [since] not used by mexc, but filtered internally by ccxt
4328
+ * @param {int} [limit] mexc limit is page_size default 20, maximum is 100
4329
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4330
+ * @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
4331
+ */
4320
4332
  async fetchFundingRateHistory(symbol = undefined, since = undefined, limit = undefined, params = {}) {
4321
- /**
4322
- * @method
4323
- * @name mexc#fetchFundingRateHistory
4324
- * @description fetches historical funding rate prices
4325
- * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-contract-funding-rate-history
4326
- * @param {string} symbol unified symbol of the market to fetch the funding rate history for
4327
- * @param {int} [since] not used by mexc, but filtered internally by ccxt
4328
- * @param {int} [limit] mexc limit is page_size default 20, maximum is 100
4329
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4330
- * @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
4331
- */
4332
4333
  if (symbol === undefined) {
4333
4334
  throw new ArgumentsRequired(this.id + ' fetchFundingRateHistory() requires a symbol argument');
4334
4335
  }
@@ -4386,16 +4387,16 @@ export default class mexc extends Exchange {
4386
4387
  const sorted = this.sortBy(rates, 'timestamp');
4387
4388
  return this.filterBySymbolSinceLimit(sorted, market['symbol'], since, limit);
4388
4389
  }
4390
+ /**
4391
+ * @method
4392
+ * @name mexc#fetchLeverageTiers
4393
+ * @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes, if a market has a leverage tier of 0, then the leverage tiers cannot be obtained for this market
4394
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-the-contract-information
4395
+ * @param {string[]} [symbols] list of unified market symbols
4396
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4397
+ * @returns {object} a dictionary of [leverage tiers structures]{@link https://docs.ccxt.com/#/?id=leverage-tiers-structure}, indexed by market symbols
4398
+ */
4389
4399
  async fetchLeverageTiers(symbols = undefined, params = {}) {
4390
- /**
4391
- * @method
4392
- * @name mexc#fetchLeverageTiers
4393
- * @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes, if a market has a leverage tier of 0, then the leverage tiers cannot be obtained for this market
4394
- * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-the-contract-information
4395
- * @param {string[]} [symbols] list of unified market symbols
4396
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4397
- * @returns {object} a dictionary of [leverage tiers structures]{@link https://docs.ccxt.com/#/?id=leverage-tiers-structure}, indexed by market symbols
4398
- */
4399
4400
  await this.loadMarkets();
4400
4401
  symbols = this.marketSymbols(symbols, 'swap', true, true);
4401
4402
  const response = await this.contractPublicGetDetail(params);
@@ -4486,6 +4487,7 @@ export default class mexc extends Exchange {
4486
4487
  // "isHidden": false
4487
4488
  // }
4488
4489
  //
4490
+ const marketId = this.safeString(info, 'symbol');
4489
4491
  let maintenanceMarginRate = this.safeString(info, 'maintenanceMarginRate');
4490
4492
  let initialMarginRate = this.safeString(info, 'initialMarginRate');
4491
4493
  const maxVol = this.safeString(info, 'maxVol');
@@ -4499,6 +4501,7 @@ export default class mexc extends Exchange {
4499
4501
  return [
4500
4502
  {
4501
4503
  'tier': 0,
4504
+ 'symbol': this.safeSymbol(marketId, market, undefined, 'contract'),
4502
4505
  'currency': this.safeCurrencyCode(quoteId),
4503
4506
  'minNotional': undefined,
4504
4507
  'maxNotional': undefined,
@@ -4512,6 +4515,7 @@ export default class mexc extends Exchange {
4512
4515
  const cap = Precise.stringAdd(floor, riskIncrVol);
4513
4516
  tiers.push({
4514
4517
  'tier': this.parseNumber(Precise.stringDiv(cap, riskIncrVol)),
4518
+ 'symbol': this.safeSymbol(marketId, market, undefined, 'contract'),
4515
4519
  'currency': this.safeCurrencyCode(quoteId),
4516
4520
  'minNotional': this.parseNumber(floor),
4517
4521
  'maxNotional': this.parseNumber(cap),
@@ -4546,16 +4550,16 @@ export default class mexc extends Exchange {
4546
4550
  'tag': this.safeString(depositAddress, 'memo'),
4547
4551
  };
4548
4552
  }
4553
+ /**
4554
+ * @method
4555
+ * @name mexc#fetchDepositAddressesByNetwork
4556
+ * @description fetch a dictionary of addresses for a currency, indexed by network
4557
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#deposit-address-supporting-network
4558
+ * @param {string} code unified currency code of the currency for the deposit address
4559
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4560
+ * @returns {object} a dictionary of [address structures]{@link https://docs.ccxt.com/#/?id=address-structure} indexed by the network
4561
+ */
4549
4562
  async fetchDepositAddressesByNetwork(code, params = {}) {
4550
- /**
4551
- * @method
4552
- * @name mexc#fetchDepositAddressesByNetwork
4553
- * @description fetch a dictionary of addresses for a currency, indexed by network
4554
- * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#deposit-address-supporting-network
4555
- * @param {string} code unified currency code of the currency for the deposit address
4556
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4557
- * @returns {object} a dictionary of [address structures]{@link https://docs.ccxt.com/#/?id=address-structure} indexed by the network
4558
- */
4559
4563
  await this.loadMarkets();
4560
4564
  const currency = this.currency(code);
4561
4565
  const request = {
@@ -4595,17 +4599,17 @@ export default class mexc extends Exchange {
4595
4599
  const addressStructures = this.parseDepositAddresses(response, undefined, false);
4596
4600
  return this.indexBy(addressStructures, 'network');
4597
4601
  }
4602
+ /**
4603
+ * @method
4604
+ * @name mexc#createDepositAddress
4605
+ * @description create a currency deposit address
4606
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#generate-deposit-address-supporting-network
4607
+ * @param {string} code unified currency code of the currency for the deposit address
4608
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4609
+ * @param {string} [params.network] the blockchain network name
4610
+ * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
4611
+ */
4598
4612
  async createDepositAddress(code, params = {}) {
4599
- /**
4600
- * @method
4601
- * @name mexc#createDepositAddress
4602
- * @description create a currency deposit address
4603
- * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#generate-deposit-address-supporting-network
4604
- * @param {string} code unified currency code of the currency for the deposit address
4605
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4606
- * @param {string} [params.network] the blockchain network name
4607
- * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
4608
- */
4609
4613
  await this.loadMarkets();
4610
4614
  const currency = this.currency(code);
4611
4615
  const request = {
@@ -4640,17 +4644,17 @@ export default class mexc extends Exchange {
4640
4644
  // }
4641
4645
  return this.parseDepositAddress(response, currency);
4642
4646
  }
4647
+ /**
4648
+ * @method
4649
+ * @name mexc#fetchDepositAddress
4650
+ * @description fetch the deposit address for a currency associated with this account
4651
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#deposit-address-supporting-network
4652
+ * @param {string} code unified currency code
4653
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4654
+ * @param {string} [params.network] the chain of currency, this only apply for multi-chain currency, and there is no need for single chain currency
4655
+ * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
4656
+ */
4643
4657
  async fetchDepositAddress(code, params = {}) {
4644
- /**
4645
- * @method
4646
- * @name mexc#fetchDepositAddress
4647
- * @description fetch the deposit address for a currency associated with this account
4648
- * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#deposit-address-supporting-network
4649
- * @param {string} code unified currency code
4650
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4651
- * @param {string} [params.network] the chain of currency, this only apply for multi-chain currency, and there is no need for single chain currency
4652
- * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
4653
- */
4654
4658
  const network = this.safeString(params, 'network');
4655
4659
  const addressStructures = await this.fetchDepositAddressesByNetwork(code, params);
4656
4660
  let result = undefined;
@@ -4674,18 +4678,18 @@ export default class mexc extends Exchange {
4674
4678
  }
4675
4679
  return result;
4676
4680
  }
4681
+ /**
4682
+ * @method
4683
+ * @name mexc#fetchDeposits
4684
+ * @description fetch all deposits made to an account
4685
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#deposit-history-supporting-network
4686
+ * @param {string} code unified currency code
4687
+ * @param {int} [since] the earliest time in ms to fetch deposits for
4688
+ * @param {int} [limit] the maximum number of deposits structures to retrieve
4689
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4690
+ * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
4691
+ */
4677
4692
  async fetchDeposits(code = undefined, since = undefined, limit = undefined, params = {}) {
4678
- /**
4679
- * @method
4680
- * @name mexc#fetchDeposits
4681
- * @description fetch all deposits made to an account
4682
- * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#deposit-history-supporting-network
4683
- * @param {string} code unified currency code
4684
- * @param {int} [since] the earliest time in ms to fetch deposits for
4685
- * @param {int} [limit] the maximum number of deposits structures to retrieve
4686
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4687
- * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
4688
- */
4689
4693
  await this.loadMarkets();
4690
4694
  const request = {
4691
4695
  // 'coin': currency['id'] + network example: USDT-TRX,
@@ -4734,18 +4738,18 @@ export default class mexc extends Exchange {
4734
4738
  //
4735
4739
  return this.parseTransactions(response, currency, since, limit);
4736
4740
  }
4741
+ /**
4742
+ * @method
4743
+ * @name mexc#fetchWithdrawals
4744
+ * @description fetch all withdrawals made from an account
4745
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#withdraw-history-supporting-network
4746
+ * @param {string} code unified currency code
4747
+ * @param {int} [since] the earliest time in ms to fetch withdrawals for
4748
+ * @param {int} [limit] the maximum number of withdrawals structures to retrieve
4749
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4750
+ * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
4751
+ */
4737
4752
  async fetchWithdrawals(code = undefined, since = undefined, limit = undefined, params = {}) {
4738
- /**
4739
- * @method
4740
- * @name mexc#fetchWithdrawals
4741
- * @description fetch all withdrawals made from an account
4742
- * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#withdraw-history-supporting-network
4743
- * @param {string} code unified currency code
4744
- * @param {int} [since] the earliest time in ms to fetch withdrawals for
4745
- * @param {int} [limit] the maximum number of withdrawals structures to retrieve
4746
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4747
- * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
4748
- */
4749
4753
  await this.loadMarkets();
4750
4754
  const request = {
4751
4755
  // 'coin': currency['id'],
@@ -4911,16 +4915,16 @@ export default class mexc extends Exchange {
4911
4915
  const statuses = this.safeValue(statusesByType, type, {});
4912
4916
  return this.safeString(statuses, status, status);
4913
4917
  }
4918
+ /**
4919
+ * @method
4920
+ * @name mexc#fetchPosition
4921
+ * @description fetch data on a single open contract trade position
4922
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-the-user-s-history-position-information
4923
+ * @param {string} symbol unified market symbol of the market the position is held in, default is undefined
4924
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4925
+ * @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
4926
+ */
4914
4927
  async fetchPosition(symbol, params = {}) {
4915
- /**
4916
- * @method
4917
- * @name mexc#fetchPosition
4918
- * @description fetch data on a single open contract trade position
4919
- * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-the-user-s-history-position-information
4920
- * @param {string} symbol unified market symbol of the market the position is held in, default is undefined
4921
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4922
- * @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
4923
- */
4924
4928
  await this.loadMarkets();
4925
4929
  const market = this.market(symbol);
4926
4930
  const request = {
@@ -4929,16 +4933,16 @@ export default class mexc extends Exchange {
4929
4933
  const response = await this.fetchPositions(undefined, this.extend(request, params));
4930
4934
  return this.safeValue(response, 0);
4931
4935
  }
4936
+ /**
4937
+ * @method
4938
+ * @name mexc#fetchPositions
4939
+ * @description fetch all open positions
4940
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-the-user-s-history-position-information
4941
+ * @param {string[]|undefined} symbols list of unified market symbols
4942
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4943
+ * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
4944
+ */
4932
4945
  async fetchPositions(symbols = undefined, params = {}) {
4933
- /**
4934
- * @method
4935
- * @name mexc#fetchPositions
4936
- * @description fetch all open positions
4937
- * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-the-user-s-history-position-information
4938
- * @param {string[]|undefined} symbols list of unified market symbols
4939
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4940
- * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
4941
- */
4942
4946
  await this.loadMarkets();
4943
4947
  const response = await this.contractPrivateGetPositionOpenPositions(params);
4944
4948
  //
@@ -5077,17 +5081,17 @@ export default class mexc extends Exchange {
5077
5081
  'lastUpdateTimestamp': undefined,
5078
5082
  });
5079
5083
  }
5084
+ /**
5085
+ * @method
5086
+ * @name mexc#fetchTransfer
5087
+ * @description fetches a transfer
5088
+ * @see https://mexcdevelop.github.io/apidocs/spot_v2_en/#internal-assets-transfer-order-inquiry
5089
+ * @param {string} id transfer id
5090
+ * @param {string} [code] not used by mexc fetchTransfer
5091
+ * @param {object} params extra parameters specific to the exchange api endpoint
5092
+ * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
5093
+ */
5080
5094
  async fetchTransfer(id, code = undefined, params = {}) {
5081
- /**
5082
- * @method
5083
- * @name mexc#fetchTransfer
5084
- * @description fetches a transfer
5085
- * @see https://mexcdevelop.github.io/apidocs/spot_v2_en/#internal-assets-transfer-order-inquiry
5086
- * @param {string} id transfer id
5087
- * @param {string} [code] not used by mexc fetchTransfer
5088
- * @param {object} params extra parameters specific to the exchange api endpoint
5089
- * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
5090
- */
5091
5095
  const [marketType, query] = this.handleMarketTypeAndParams('fetchTransfer', undefined, params);
5092
5096
  await this.loadMarkets();
5093
5097
  if (marketType === 'spot') {
@@ -5116,19 +5120,19 @@ export default class mexc extends Exchange {
5116
5120
  }
5117
5121
  return undefined;
5118
5122
  }
5123
+ /**
5124
+ * @method
5125
+ * @name mexc#fetchTransfers
5126
+ * @description fetch a history of internal transfers made on an account
5127
+ * @see https://mexcdevelop.github.io/apidocs/spot_v2_en/#get-internal-assets-transfer-records
5128
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-the-user-39-s-asset-transfer-records
5129
+ * @param {string} code unified currency code of the currency transferred
5130
+ * @param {int} [since] the earliest time in ms to fetch transfers for
5131
+ * @param {int} [limit] the maximum number of transfers structures to retrieve
5132
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
5133
+ * @returns {object[]} a list of [transfer structures]{@link https://docs.ccxt.com/#/?id=transfer-structure}
5134
+ */
5119
5135
  async fetchTransfers(code = undefined, since = undefined, limit = undefined, params = {}) {
5120
- /**
5121
- * @method
5122
- * @name mexc#fetchTransfers
5123
- * @description fetch a history of internal transfers made on an account
5124
- * @see https://mexcdevelop.github.io/apidocs/spot_v2_en/#get-internal-assets-transfer-records
5125
- * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-the-user-39-s-asset-transfer-records
5126
- * @param {string} code unified currency code of the currency transferred
5127
- * @param {int} [since] the earliest time in ms to fetch transfers for
5128
- * @param {int} [limit] the maximum number of transfers structures to retrieve
5129
- * @param {object} [params] extra parameters specific to the exchange API endpoint
5130
- * @returns {object[]} a list of [transfer structures]{@link https://docs.ccxt.com/#/?id=transfer-structure}
5131
- */
5132
5136
  const [marketType, query] = this.handleMarketTypeAndParams('fetchTransfers', undefined, params);
5133
5137
  await this.loadMarkets();
5134
5138
  const request = {};
@@ -5205,20 +5209,20 @@ export default class mexc extends Exchange {
5205
5209
  }
5206
5210
  return this.parseTransfers(resultList, currency, since, limit);
5207
5211
  }
5212
+ /**
5213
+ * @method
5214
+ * @name mexc#transfer
5215
+ * @description transfer currency internally between wallets on the same account
5216
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#user-universal-transfer
5217
+ * @param {string} code unified currency code
5218
+ * @param {float} amount amount to transfer
5219
+ * @param {string} fromAccount account to transfer from
5220
+ * @param {string} toAccount account to transfer to
5221
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
5222
+ * @param {string} [params.symbol] market symbol required for margin account transfers eg:BTCUSDT
5223
+ * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
5224
+ */
5208
5225
  async transfer(code, amount, fromAccount, toAccount, params = {}) {
5209
- /**
5210
- * @method
5211
- * @name mexc#transfer
5212
- * @description transfer currency internally between wallets on the same account
5213
- * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#user-universal-transfer
5214
- * @param {string} code unified currency code
5215
- * @param {float} amount amount to transfer
5216
- * @param {string} fromAccount account to transfer from
5217
- * @param {string} toAccount account to transfer to
5218
- * @param {object} [params] extra parameters specific to the exchange API endpoint
5219
- * @param {string} [params.symbol] market symbol required for margin account transfers eg:BTCUSDT
5220
- * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
5221
- */
5222
5226
  await this.loadMarkets();
5223
5227
  const currency = this.currency(code);
5224
5228
  const accounts = {
@@ -5338,19 +5342,19 @@ export default class mexc extends Exchange {
5338
5342
  };
5339
5343
  return this.safeString(statuses, status, status);
5340
5344
  }
5345
+ /**
5346
+ * @method
5347
+ * @name mexc#withdraw
5348
+ * @description make a withdrawal
5349
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#withdraw-new
5350
+ * @param {string} code unified currency code
5351
+ * @param {float} amount the amount to withdraw
5352
+ * @param {string} address the address to withdraw to
5353
+ * @param {string} tag
5354
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
5355
+ * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
5356
+ */
5341
5357
  async withdraw(code, amount, address, tag = undefined, params = {}) {
5342
- /**
5343
- * @method
5344
- * @name mexc#withdraw
5345
- * @description make a withdrawal
5346
- * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#withdraw-new
5347
- * @param {string} code unified currency code
5348
- * @param {float} amount the amount to withdraw
5349
- * @param {string} address the address to withdraw to
5350
- * @param {string} tag
5351
- * @param {object} [params] extra parameters specific to the exchange API endpoint
5352
- * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
5353
- */
5354
5358
  await this.loadMarkets();
5355
5359
  const currency = this.currency(code);
5356
5360
  [tag, params] = this.handleWithdrawTagAndParams(tag, params);
@@ -5379,17 +5383,17 @@ export default class mexc extends Exchange {
5379
5383
  //
5380
5384
  return this.parseTransaction(response, currency);
5381
5385
  }
5386
+ /**
5387
+ * @method
5388
+ * @name mexc#setPositionMode
5389
+ * @description set hedged to true or false for a market
5390
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#change-position-mode
5391
+ * @param {bool} hedged set to true to use dualSidePosition
5392
+ * @param {string} symbol not used by mexc setPositionMode ()
5393
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
5394
+ * @returns {object} response from the exchange
5395
+ */
5382
5396
  async setPositionMode(hedged, symbol = undefined, params = {}) {
5383
- /**
5384
- * @method
5385
- * @name mexc#setPositionMode
5386
- * @description set hedged to true or false for a market
5387
- * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#change-position-mode
5388
- * @param {bool} hedged set to true to use dualSidePosition
5389
- * @param {string} symbol not used by mexc setPositionMode ()
5390
- * @param {object} [params] extra parameters specific to the exchange API endpoint
5391
- * @returns {object} response from the exchange
5392
- */
5393
5397
  const request = {
5394
5398
  'positionMode': hedged ? 1 : 2, // 1 Hedge, 2 One-way, before changing position mode make sure that there are no active orders, planned orders, or open positions, the risk limit level will be reset to 1
5395
5399
  };
@@ -5402,16 +5406,16 @@ export default class mexc extends Exchange {
5402
5406
  //
5403
5407
  return response;
5404
5408
  }
5409
+ /**
5410
+ * @method
5411
+ * @name mexc#fetchPositionMode
5412
+ * @description fetchs the position mode, hedged or one way, hedged for binance is set identically for all linear markets or all inverse markets
5413
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-position-mode
5414
+ * @param {string} symbol not used by mexc fetchPositionMode
5415
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
5416
+ * @returns {object} an object detailing whether the market is in hedged or one-way mode
5417
+ */
5405
5418
  async fetchPositionMode(symbol = undefined, params = {}) {
5406
- /**
5407
- * @method
5408
- * @name mexc#fetchPositionMode
5409
- * @description fetchs the position mode, hedged or one way, hedged for binance is set identically for all linear markets or all inverse markets
5410
- * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-position-mode
5411
- * @param {string} symbol not used by mexc fetchPositionMode
5412
- * @param {object} [params] extra parameters specific to the exchange API endpoint
5413
- * @returns {object} an object detailing whether the market is in hedged or one-way mode
5414
- */
5415
5419
  const response = await this.contractPrivateGetPositionPositionMode(params);
5416
5420
  //
5417
5421
  // {
@@ -5426,16 +5430,16 @@ export default class mexc extends Exchange {
5426
5430
  'hedged': (positionMode === 1),
5427
5431
  };
5428
5432
  }
5433
+ /**
5434
+ * @method
5435
+ * @name mexc#fetchTransactionFees
5436
+ * @description fetch deposit and withdrawal fees
5437
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#query-the-currency-information
5438
+ * @param {string[]|undefined} codes returns fees for all currencies if undefined
5439
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
5440
+ * @returns {object[]} a list of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
5441
+ */
5429
5442
  async fetchTransactionFees(codes = undefined, params = {}) {
5430
- /**
5431
- * @method
5432
- * @name mexc#fetchTransactionFees
5433
- * @description fetch deposit and withdrawal fees
5434
- * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#query-the-currency-information
5435
- * @param {string[]|undefined} codes returns fees for all currencies if undefined
5436
- * @param {object} [params] extra parameters specific to the exchange API endpoint
5437
- * @returns {object[]} a list of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
5438
- */
5439
5443
  await this.loadMarkets();
5440
5444
  const response = await this.spotPrivateGetCapitalConfigGetall(params);
5441
5445
  //
@@ -5524,16 +5528,16 @@ export default class mexc extends Exchange {
5524
5528
  }
5525
5529
  return result;
5526
5530
  }
5531
+ /**
5532
+ * @method
5533
+ * @name mexc#fetchDepositWithdrawFees
5534
+ * @description fetch deposit and withdrawal fees
5535
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#query-the-currency-information
5536
+ * @param {string[]|undefined} codes returns fees for all currencies if undefined
5537
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
5538
+ * @returns {object[]} a list of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
5539
+ */
5527
5540
  async fetchDepositWithdrawFees(codes = undefined, params = {}) {
5528
- /**
5529
- * @method
5530
- * @name mexc#fetchDepositWithdrawFees
5531
- * @description fetch deposit and withdrawal fees
5532
- * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#query-the-currency-information
5533
- * @param {string[]|undefined} codes returns fees for all currencies if undefined
5534
- * @param {object} [params] extra parameters specific to the exchange API endpoint
5535
- * @returns {object[]} a list of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
5536
- */
5537
5541
  await this.loadMarkets();
5538
5542
  const response = await this.spotPrivateGetCapitalConfigGetall(params);
5539
5543
  //
@@ -5613,16 +5617,16 @@ export default class mexc extends Exchange {
5613
5617
  }
5614
5618
  return this.assignDefaultDepositWithdrawFees(result);
5615
5619
  }
5620
+ /**
5621
+ * @method
5622
+ * @name mexc#fetchLeverage
5623
+ * @description fetch the set leverage for a market
5624
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-leverage
5625
+ * @param {string} symbol unified market symbol
5626
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
5627
+ * @returns {object} a [leverage structure]{@link https://docs.ccxt.com/#/?id=leverage-structure}
5628
+ */
5616
5629
  async fetchLeverage(symbol, params = {}) {
5617
- /**
5618
- * @method
5619
- * @name mexc#fetchLeverage
5620
- * @description fetch the set leverage for a market
5621
- * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-leverage
5622
- * @param {string} symbol unified market symbol
5623
- * @param {object} [params] extra parameters specific to the exchange API endpoint
5624
- * @returns {object} a [leverage structure]{@link https://docs.ccxt.com/#/?id=leverage-structure}
5625
- */
5626
5630
  await this.loadMarkets();
5627
5631
  const market = this.market(symbol);
5628
5632
  const request = {
@@ -5704,22 +5708,22 @@ export default class mexc extends Exchange {
5704
5708
  }
5705
5709
  return [marginMode, params];
5706
5710
  }
5711
+ /**
5712
+ * @method
5713
+ * @name mexc#fetchPositionsHistory
5714
+ * @description fetches historical positions
5715
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-the-user-s-history-position-information
5716
+ * @param {string[]} [symbols] unified contract symbols
5717
+ * @param {int} [since] not used by mexc fetchPositionsHistory
5718
+ * @param {int} [limit] the maximum amount of candles to fetch, default=1000
5719
+ * @param {object} [params] extra parameters specific to the exchange api endpoint
5720
+ *
5721
+ * EXCHANGE SPECIFIC PARAMETERS
5722
+ * @param {int} [params.type] position type,1: long, 2: short
5723
+ * @param {int} [params.page_num] current page number, default is 1
5724
+ * @returns {object[]} a list of [position structures]{@link https://docs.ccxt.com/#/?id=position-structure}
5725
+ */
5707
5726
  async fetchPositionsHistory(symbols = undefined, since = undefined, limit = undefined, params = {}) {
5708
- /**
5709
- * @method
5710
- * @name mexc#fetchPositionsHistory
5711
- * @description fetches historical positions
5712
- * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-the-user-s-history-position-information
5713
- * @param {string[]} [symbols] unified contract symbols
5714
- * @param {int} [since] not used by mexc fetchPositionsHistory
5715
- * @param {int} [limit] the maximum amount of candles to fetch, default=1000
5716
- * @param {object} params extra parameters specific to the exchange api endpoint
5717
- *
5718
- * EXCHANGE SPECIFIC PARAMETERS
5719
- * @param {int} type position type,1: long, 2: short
5720
- * @param {int} page_num current page number, default is 1
5721
- * @returns {object[]} a list of [position structures]{@link https://docs.ccxt.com/#/?id=position-structure}
5722
- */
5723
5727
  await this.loadMarkets();
5724
5728
  const request = {};
5725
5729
  if (symbols !== undefined) {
@@ -5777,19 +5781,19 @@ export default class mexc extends Exchange {
5777
5781
  const positions = this.parsePositions(data, symbols, params);
5778
5782
  return this.filterBySinceLimit(positions, since, limit);
5779
5783
  }
5784
+ /**
5785
+ * @method
5786
+ * @name mexc#setMarginMode
5787
+ * @description set margin mode to 'cross' or 'isolated'
5788
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#switch-leverage
5789
+ * @param {string} marginMode 'cross' or 'isolated'
5790
+ * @param {string} [symbol] required when there is no position, else provide params["positionId"]
5791
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
5792
+ * @param {string} [params.positionId] required when a position is set
5793
+ * @param {string} [params.direction] "long" or "short" required when there is no position
5794
+ * @returns {object} response from the exchange
5795
+ */
5780
5796
  async setMarginMode(marginMode, symbol = undefined, params = {}) {
5781
- /**
5782
- * @method
5783
- * @name mexc#setMarginMode
5784
- * @description set margin mode to 'cross' or 'isolated'
5785
- * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#switch-leverage
5786
- * @param {string} marginMode 'cross' or 'isolated'
5787
- * @param {string} [symbol] required when there is no position, else provide params["positionId"]
5788
- * @param {object} [params] extra parameters specific to the exchange API endpoint
5789
- * @param {string} [params.positionId] required when a position is set
5790
- * @param {string} [params.direction] "long" or "short" required when there is no position
5791
- * @returns {object} response from the exchange
5792
- */
5793
5797
  await this.loadMarkets();
5794
5798
  const market = this.market(symbol);
5795
5799
  if (market['spot']) {