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
@@ -499,15 +499,15 @@ class bingx extends bingx$1 {
499
499
  },
500
500
  });
501
501
  }
502
+ /**
503
+ * @method
504
+ * @name bingx#fetchTime
505
+ * @description fetches the current integer timestamp in milliseconds from the bingx server
506
+ * @see https://bingx-api.github.io/docs/#/swapV2/base-info.html#Get%20Server%20Time
507
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
508
+ * @returns {int} the current integer timestamp in milliseconds from the bingx server
509
+ */
502
510
  async fetchTime(params = {}) {
503
- /**
504
- * @method
505
- * @name bingx#fetchTime
506
- * @description fetches the current integer timestamp in milliseconds from the bingx server
507
- * @see https://bingx-api.github.io/docs/#/swapV2/base-info.html#Get%20Server%20Time
508
- * @param {object} [params] extra parameters specific to the exchange API endpoint
509
- * @returns {int} the current integer timestamp in milliseconds from the bingx server
510
- */
511
511
  const response = await this.swapV2PublicGetServerTime(params);
512
512
  //
513
513
  // {
@@ -521,15 +521,15 @@ class bingx extends bingx$1 {
521
521
  const data = this.safeDict(response, 'data');
522
522
  return this.safeInteger(data, 'serverTime');
523
523
  }
524
+ /**
525
+ * @method
526
+ * @name bingx#fetchCurrencies
527
+ * @description fetches all available currencies on an exchange
528
+ * @see https://bingx-api.github.io/docs/#/common/account-api.html#All%20Coins
529
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
530
+ * @returns {object} an associative dictionary of currencies
531
+ */
524
532
  async fetchCurrencies(params = {}) {
525
- /**
526
- * @method
527
- * @name bingx#fetchCurrencies
528
- * @description fetches all available currencies on an exchange
529
- * @see https://bingx-api.github.io/docs/#/common/account-api.html#All%20Coins
530
- * @param {object} [params] extra parameters specific to the exchange API endpoint
531
- * @returns {object} an associative dictionary of currencies
532
- */
533
533
  if (!this.checkRequiredCredentials(false)) {
534
534
  return undefined;
535
535
  }
@@ -836,17 +836,17 @@ class bingx extends bingx$1 {
836
836
  'info': market,
837
837
  });
838
838
  }
839
+ /**
840
+ * @method
841
+ * @name bingx#fetchMarkets
842
+ * @description retrieves data on all markets for bingx
843
+ * @see https://bingx-api.github.io/docs/#/spot/market-api.html#Query%20Symbols
844
+ * @see https://bingx-api.github.io/docs/#/swapV2/market-api.html#Contract%20Information
845
+ * @see https://bingx-api.github.io/docs/#/en-us/cswap/market-api.html#Contract%20Information
846
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
847
+ * @returns {object[]} an array of objects representing market data
848
+ */
839
849
  async fetchMarkets(params = {}) {
840
- /**
841
- * @method
842
- * @name bingx#fetchMarkets
843
- * @description retrieves data on all markets for bingx
844
- * @see https://bingx-api.github.io/docs/#/spot/market-api.html#Query%20Symbols
845
- * @see https://bingx-api.github.io/docs/#/swapV2/market-api.html#Contract%20Information
846
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/market-api.html#Contract%20Information
847
- * @param {object} [params] extra parameters specific to the exchange API endpoint
848
- * @returns {object[]} an array of objects representing market data
849
- */
850
850
  const requests = [this.fetchSwapMarkets(params)];
851
851
  const isSandbox = this.safeBool(this.options, 'sandboxMode', false);
852
852
  if (!isSandbox) {
@@ -860,25 +860,25 @@ class bingx extends bingx$1 {
860
860
  const swapMarkets = this.arrayConcat(linearSwapMarkets, inverseSwapMarkets);
861
861
  return this.arrayConcat(spotMarkets, swapMarkets);
862
862
  }
863
+ /**
864
+ * @method
865
+ * @name bingx#fetchOHLCV
866
+ * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
867
+ * @see https://bingx-api.github.io/docs/#/swapV2/market-api.html#K-Line%20Data
868
+ * @see https://bingx-api.github.io/docs/#/spot/market-api.html#Candlestick%20chart%20data
869
+ * @see https://bingx-api.github.io/docs/#/swapV2/market-api.html#%20K-Line%20Data
870
+ * @see https://bingx-api.github.io/docs/#/en-us/swapV2/market-api.html#K-Line%20Data%20-%20Mark%20Price
871
+ * @see https://bingx-api.github.io/docs/#/en-us/cswap/market-api.html#Get%20K-line%20Data
872
+ * @param {string} symbol unified symbol of the market to fetch OHLCV data for
873
+ * @param {string} timeframe the length of time each candle represents
874
+ * @param {int} [since] timestamp in ms of the earliest candle to fetch
875
+ * @param {int} [limit] the maximum amount of candles to fetch
876
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
877
+ * @param {int} [params.until] timestamp in ms of the latest candle to fetch
878
+ * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
879
+ * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
880
+ */
863
881
  async fetchOHLCV(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
864
- /**
865
- * @method
866
- * @name bingx#fetchOHLCV
867
- * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
868
- * @see https://bingx-api.github.io/docs/#/swapV2/market-api.html#K-Line%20Data
869
- * @see https://bingx-api.github.io/docs/#/spot/market-api.html#Candlestick%20chart%20data
870
- * @see https://bingx-api.github.io/docs/#/swapV2/market-api.html#%20K-Line%20Data
871
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/market-api.html#K-Line%20Data%20-%20Mark%20Price
872
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/market-api.html#Get%20K-line%20Data
873
- * @param {string} symbol unified symbol of the market to fetch OHLCV data for
874
- * @param {string} timeframe the length of time each candle represents
875
- * @param {int} [since] timestamp in ms of the earliest candle to fetch
876
- * @param {int} [limit] the maximum amount of candles to fetch
877
- * @param {object} [params] extra parameters specific to the exchange API endpoint
878
- * @param {int} [params.until] timestamp in ms of the latest candle to fetch
879
- * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
880
- * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
881
- */
882
882
  await this.loadMarkets();
883
883
  let paginate = false;
884
884
  [paginate, params] = this.handleOptionAndParams(params, 'fetchOHLCV', 'paginate', false);
@@ -1014,19 +1014,19 @@ class bingx extends bingx$1 {
1014
1014
  this.safeNumber(ohlcv, 'volume'),
1015
1015
  ];
1016
1016
  }
1017
+ /**
1018
+ * @method
1019
+ * @name bingx#fetchTrades
1020
+ * @description get the list of most recent trades for a particular symbol
1021
+ * @see https://bingx-api.github.io/docs/#/spot/market-api.html#Query%20transaction%20records
1022
+ * @see https://bingx-api.github.io/docs/#/swapV2/market-api.html#The%20latest%20Trade%20of%20a%20Trading%20Pair
1023
+ * @param {string} symbol unified symbol of the market to fetch trades for
1024
+ * @param {int} [since] timestamp in ms of the earliest trade to fetch
1025
+ * @param {int} [limit] the maximum amount of trades to fetch
1026
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1027
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
1028
+ */
1017
1029
  async fetchTrades(symbol, since = undefined, limit = undefined, params = {}) {
1018
- /**
1019
- * @method
1020
- * @name bingx#fetchTrades
1021
- * @description get the list of most recent trades for a particular symbol
1022
- * @see https://bingx-api.github.io/docs/#/spot/market-api.html#Query%20transaction%20records
1023
- * @see https://bingx-api.github.io/docs/#/swapV2/market-api.html#The%20latest%20Trade%20of%20a%20Trading%20Pair
1024
- * @param {string} symbol unified symbol of the market to fetch trades for
1025
- * @param {int} [since] timestamp in ms of the earliest trade to fetch
1026
- * @param {int} [limit] the maximum amount of trades to fetch
1027
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1028
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
1029
- */
1030
1030
  await this.loadMarkets();
1031
1031
  const market = this.market(symbol);
1032
1032
  const request = {
@@ -1248,19 +1248,19 @@ class bingx extends bingx$1 {
1248
1248
  },
1249
1249
  }, market);
1250
1250
  }
1251
+ /**
1252
+ * @method
1253
+ * @name bingx#fetchOrderBook
1254
+ * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
1255
+ * @see https://bingx-api.github.io/docs/#/spot/market-api.html#Query%20depth%20information
1256
+ * @see https://bingx-api.github.io/docs/#/swapV2/market-api.html#Get%20Market%20Depth
1257
+ * @see https://bingx-api.github.io/docs/#/en-us/cswap/market-api.html#Query%20Depth%20Data
1258
+ * @param {string} symbol unified symbol of the market to fetch the order book for
1259
+ * @param {int} [limit] the maximum amount of order book entries to return
1260
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1261
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
1262
+ */
1251
1263
  async fetchOrderBook(symbol, limit = undefined, params = {}) {
1252
- /**
1253
- * @method
1254
- * @name bingx#fetchOrderBook
1255
- * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
1256
- * @see https://bingx-api.github.io/docs/#/spot/market-api.html#Query%20depth%20information
1257
- * @see https://bingx-api.github.io/docs/#/swapV2/market-api.html#Get%20Market%20Depth
1258
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/market-api.html#Query%20Depth%20Data
1259
- * @param {string} symbol unified symbol of the market to fetch the order book for
1260
- * @param {int} [limit] the maximum amount of order book entries to return
1261
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1262
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
1263
- */
1264
1264
  await this.loadMarkets();
1265
1265
  const market = this.market(symbol);
1266
1266
  const request = {
@@ -1344,17 +1344,17 @@ class bingx extends bingx$1 {
1344
1344
  const timestamp = this.safeInteger2(orderbook, 'T', 'ts');
1345
1345
  return this.parseOrderBook(orderbook, market['symbol'], timestamp, 'bids', 'asks', 0, 1);
1346
1346
  }
1347
+ /**
1348
+ * @method
1349
+ * @name bingx#fetchFundingRate
1350
+ * @description fetch the current funding rate
1351
+ * @see https://bingx-api.github.io/docs/#/swapV2/market-api.html#Current%20Funding%20Rate
1352
+ * @see https://bingx-api.github.io/docs/#/en-us/cswap/market-api.html#Price%20&%20Current%20Funding%20Rate
1353
+ * @param {string} symbol unified market symbol
1354
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1355
+ * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
1356
+ */
1347
1357
  async fetchFundingRate(symbol, params = {}) {
1348
- /**
1349
- * @method
1350
- * @name bingx#fetchFundingRate
1351
- * @description fetch the current funding rate
1352
- * @see https://bingx-api.github.io/docs/#/swapV2/market-api.html#Current%20Funding%20Rate
1353
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/market-api.html#Price%20&%20Current%20Funding%20Rate
1354
- * @param {string} symbol unified market symbol
1355
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1356
- * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
1357
- */
1358
1358
  await this.loadMarkets();
1359
1359
  const market = this.market(symbol);
1360
1360
  const request = {
@@ -1386,16 +1386,16 @@ class bingx extends bingx$1 {
1386
1386
  const data = this.safeList(response, 'data', []);
1387
1387
  return this.parseFundingRate(data, market);
1388
1388
  }
1389
+ /**
1390
+ * @method
1391
+ * @name bingx#fetchFundingRates
1392
+ * @description fetch the current funding rate for multiple symbols
1393
+ * @see https://bingx-api.github.io/docs/#/swapV2/market-api.html#Current%20Funding%20Rate
1394
+ * @param {string[]} [symbols] list of unified market symbols
1395
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1396
+ * @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
1397
+ */
1389
1398
  async fetchFundingRates(symbols = undefined, params = {}) {
1390
- /**
1391
- * @method
1392
- * @name bingx#fetchFundingRates
1393
- * @description fetch the current funding rate for multiple symbols
1394
- * @see https://bingx-api.github.io/docs/#/swapV2/market-api.html#Current%20Funding%20Rate
1395
- * @param {string[]} [symbols] list of unified market symbols
1396
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1397
- * @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
1398
- */
1399
1399
  await this.loadMarkets();
1400
1400
  symbols = this.marketSymbols(symbols, 'swap', true);
1401
1401
  const response = await this.swapV2PublicGetQuotePremiumIndex(this.extend(params));
@@ -1436,20 +1436,20 @@ class bingx extends bingx$1 {
1436
1436
  'interval': undefined,
1437
1437
  };
1438
1438
  }
1439
+ /**
1440
+ * @method
1441
+ * @name bingx#fetchFundingRateHistory
1442
+ * @description fetches historical funding rate prices
1443
+ * @see https://bingx-api.github.io/docs/#/swapV2/market-api.html#Funding%20Rate%20History
1444
+ * @param {string} symbol unified symbol of the market to fetch the funding rate history for
1445
+ * @param {int} [since] timestamp in ms of the earliest funding rate to fetch
1446
+ * @param {int} [limit] the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure} to fetch
1447
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1448
+ * @param {int} [params.until] timestamp in ms of the latest funding rate to fetch
1449
+ * @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)
1450
+ * @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
1451
+ */
1439
1452
  async fetchFundingRateHistory(symbol = undefined, since = undefined, limit = undefined, params = {}) {
1440
- /**
1441
- * @method
1442
- * @name bingx#fetchFundingRateHistory
1443
- * @description fetches historical funding rate prices
1444
- * @see https://bingx-api.github.io/docs/#/swapV2/market-api.html#Funding%20Rate%20History
1445
- * @param {string} symbol unified symbol of the market to fetch the funding rate history for
1446
- * @param {int} [since] timestamp in ms of the earliest funding rate to fetch
1447
- * @param {int} [limit] the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure} to fetch
1448
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1449
- * @param {int} [params.until] timestamp in ms of the latest funding rate to fetch
1450
- * @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)
1451
- * @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
1452
- */
1453
1453
  if (symbol === undefined) {
1454
1454
  throw new errors.ArgumentsRequired(this.id + ' fetchFundingRateHistory() requires a symbol argument');
1455
1455
  }
@@ -1507,17 +1507,17 @@ class bingx extends bingx$1 {
1507
1507
  const sorted = this.sortBy(rates, 'timestamp');
1508
1508
  return this.filterBySymbolSinceLimit(sorted, market['symbol'], since, limit);
1509
1509
  }
1510
+ /**
1511
+ * @method
1512
+ * @name bingx#fetchOpenInterest
1513
+ * @description retrieves the open interest of a trading pair
1514
+ * @see https://bingx-api.github.io/docs/#/swapV2/market-api.html#Get%20Swap%20Open%20Positions
1515
+ * @see https://bingx-api.github.io/docs/#/en-us/cswap/market-api.html#Get%20Swap%20Open%20Positions
1516
+ * @param {string} symbol unified CCXT market symbol
1517
+ * @param {object} [params] exchange specific parameters
1518
+ * @returns {object} an open interest structure{@link https://docs.ccxt.com/#/?id=open-interest-structure}
1519
+ */
1510
1520
  async fetchOpenInterest(symbol, params = {}) {
1511
- /**
1512
- * @method
1513
- * @name bingx#fetchOpenInterest
1514
- * @description retrieves the open interest of a trading pair
1515
- * @see https://bingx-api.github.io/docs/#/swapV2/market-api.html#Get%20Swap%20Open%20Positions
1516
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/market-api.html#Get%20Swap%20Open%20Positions
1517
- * @param {string} symbol unified CCXT market symbol
1518
- * @param {object} [params] exchange specific parameters
1519
- * @returns {object} an open interest structure{@link https://docs.ccxt.com/#/?id=open-interest-structure}
1520
- */
1521
1521
  await this.loadMarkets();
1522
1522
  const market = this.market(symbol);
1523
1523
  const request = {
@@ -1601,18 +1601,18 @@ class bingx extends bingx$1 {
1601
1601
  'info': interest,
1602
1602
  }, market);
1603
1603
  }
1604
+ /**
1605
+ * @method
1606
+ * @name bingx#fetchTicker
1607
+ * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
1608
+ * @see https://bingx-api.github.io/docs/#/en-us/swapV2/market-api.html#Get%20Ticker
1609
+ * @see https://bingx-api.github.io/docs/#/en-us/spot/market-api.html#24-hour%20price%20changes
1610
+ * @see https://bingx-api.github.io/docs/#/en-us/cswap/market-api.html#Query%2024-Hour%20Price%20Change
1611
+ * @param {string} symbol unified symbol of the market to fetch the ticker for
1612
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1613
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1614
+ */
1604
1615
  async fetchTicker(symbol, params = {}) {
1605
- /**
1606
- * @method
1607
- * @name bingx#fetchTicker
1608
- * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
1609
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/market-api.html#Get%20Ticker
1610
- * @see https://bingx-api.github.io/docs/#/en-us/spot/market-api.html#24-hour%20price%20changes
1611
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/market-api.html#Query%2024-Hour%20Price%20Change
1612
- * @param {string} symbol unified symbol of the market to fetch the ticker for
1613
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1614
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1615
- */
1616
1616
  await this.loadMarkets();
1617
1617
  const market = this.market(symbol);
1618
1618
  const request = {
@@ -1666,18 +1666,18 @@ class bingx extends bingx$1 {
1666
1666
  const dataDict = this.safeDict(response, 'data', {});
1667
1667
  return this.parseTicker(dataDict, market);
1668
1668
  }
1669
+ /**
1670
+ * @method
1671
+ * @name bingx#fetchTickers
1672
+ * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
1673
+ * @see https://bingx-api.github.io/docs/#/en-us/swapV2/market-api.html#Get%20Ticker
1674
+ * @see https://bingx-api.github.io/docs/#/en-us/spot/market-api.html#24-hour%20price%20changes
1675
+ * @see https://bingx-api.github.io/docs/#/en-us/cswap/market-api.html#Query%2024-Hour%20Price%20Change
1676
+ * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
1677
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1678
+ * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1679
+ */
1669
1680
  async fetchTickers(symbols = undefined, params = {}) {
1670
- /**
1671
- * @method
1672
- * @name bingx#fetchTickers
1673
- * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
1674
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/market-api.html#Get%20Ticker
1675
- * @see https://bingx-api.github.io/docs/#/en-us/spot/market-api.html#24-hour%20price%20changes
1676
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/market-api.html#Query%2024-Hour%20Price%20Change
1677
- * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
1678
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1679
- * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1680
- */
1681
1681
  await this.loadMarkets();
1682
1682
  let market = undefined;
1683
1683
  if (symbols !== undefined) {
@@ -1735,16 +1735,16 @@ class bingx extends bingx$1 {
1735
1735
  const tickers = this.safeList(response, 'data');
1736
1736
  return this.parseTickers(tickers, symbols);
1737
1737
  }
1738
+ /**
1739
+ * @method
1740
+ * @name bingx#fetchMarkPrice
1741
+ * @description fetches mark prices for the market
1742
+ * @see https://bingx-api.github.io/docs/#/en-us/swapV2/market-api.html#Mark%20Price%20and%20Funding%20Rate
1743
+ * @param {string} symbol unified symbol of the market to fetch the ticker for
1744
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1745
+ * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1746
+ */
1738
1747
  async fetchMarkPrice(symbol, params = {}) {
1739
- /**
1740
- * @method
1741
- * @name bingx#fetchMarkPrice
1742
- * @description fetches mark prices for the market
1743
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/market-api.html#Mark%20Price%20and%20Funding%20Rate
1744
- * @param {string} symbol unified symbol of the market to fetch the ticker for
1745
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1746
- * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1747
- */
1748
1748
  await this.loadMarkets();
1749
1749
  const market = this.market(symbol);
1750
1750
  let subType = undefined;
@@ -1793,16 +1793,16 @@ class bingx extends bingx$1 {
1793
1793
  }
1794
1794
  return this.parseTicker(response['data'], market);
1795
1795
  }
1796
+ /**
1797
+ * @method
1798
+ * @name bingx#fetchMarkPrices
1799
+ * @description fetches mark prices for multiple markets
1800
+ * @see https://bingx-api.github.io/docs/#/en-us/swapV2/market-api.html#Mark%20Price%20and%20Funding%20Rate
1801
+ * @param {string[]} [symbols] unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
1802
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1803
+ * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1804
+ */
1796
1805
  async fetchMarkPrices(symbols = undefined, params = {}) {
1797
- /**
1798
- * @method
1799
- * @name bingx#fetchMarkPrices
1800
- * @description fetches mark prices for multiple markets
1801
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/market-api.html#Mark%20Price%20and%20Funding%20Rate
1802
- * @param {string[]} [symbols] unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
1803
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1804
- * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1805
- */
1806
1806
  await this.loadMarkets();
1807
1807
  let market = undefined;
1808
1808
  if (symbols !== undefined) {
@@ -1955,19 +1955,19 @@ class bingx extends bingx$1 {
1955
1955
  'info': ticker,
1956
1956
  }, market);
1957
1957
  }
1958
+ /**
1959
+ * @method
1960
+ * @name bingx#fetchBalance
1961
+ * @description query for balance and get the amount of funds available for trading or funds locked in orders
1962
+ * @see https://bingx-api.github.io/docs/#/spot/trade-api.html#Query%20Assets
1963
+ * @see https://bingx-api.github.io/docs/#/swapV2/account-api.html#Get%20Perpetual%20Swap%20Account%20Asset%20Information
1964
+ * @see https://bingx-api.github.io/docs/#/standard/contract-interface.html#Query%20standard%20contract%20balance
1965
+ * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Query%20Account%20Assets
1966
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1967
+ * @param {boolean} [params.standard] whether to fetch standard contract balances
1968
+ * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
1969
+ */
1958
1970
  async fetchBalance(params = {}) {
1959
- /**
1960
- * @method
1961
- * @name bingx#fetchBalance
1962
- * @description query for balance and get the amount of funds available for trading or funds locked in orders
1963
- * @see https://bingx-api.github.io/docs/#/spot/trade-api.html#Query%20Assets
1964
- * @see https://bingx-api.github.io/docs/#/swapV2/account-api.html#Get%20Perpetual%20Swap%20Account%20Asset%20Information
1965
- * @see https://bingx-api.github.io/docs/#/standard/contract-interface.html#Query%20standard%20contract%20balance
1966
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Query%20Account%20Assets
1967
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1968
- * @param {boolean} [params.standard] whether to fetch standard contract balances
1969
- * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
1970
- */
1971
1971
  await this.loadMarkets();
1972
1972
  let response = undefined;
1973
1973
  let standard = undefined;
@@ -2186,19 +2186,19 @@ class bingx extends bingx$1 {
2186
2186
  }
2187
2187
  return this.safeBalance(result);
2188
2188
  }
2189
+ /**
2190
+ * @method
2191
+ * @name bingx#fetchPositions
2192
+ * @description fetch all open positions
2193
+ * @see https://bingx-api.github.io/docs/#/en-us/swapV2/account-api.html#Query%20position%20data
2194
+ * @see https://bingx-api.github.io/docs/#/en-us/standard/contract-interface.html#position
2195
+ * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Query%20warehouse
2196
+ * @param {string[]|undefined} symbols list of unified market symbols
2197
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2198
+ * @param {boolean} [params.standard] whether to fetch standard contract positions
2199
+ * @returns {object[]} a list of [position structures]{@link https://docs.ccxt.com/#/?id=position-structure}
2200
+ */
2189
2201
  async fetchPositions(symbols = undefined, params = {}) {
2190
- /**
2191
- * @method
2192
- * @name bingx#fetchPositions
2193
- * @description fetch all open positions
2194
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/account-api.html#Query%20position%20data
2195
- * @see https://bingx-api.github.io/docs/#/en-us/standard/contract-interface.html#position
2196
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Query%20warehouse
2197
- * @param {string[]|undefined} symbols list of unified market symbols
2198
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2199
- * @param {boolean} [params.standard] whether to fetch standard contract positions
2200
- * @returns {object[]} a list of [position structures]{@link https://docs.ccxt.com/#/?id=position-structure}
2201
- */
2202
2202
  await this.loadMarkets();
2203
2203
  symbols = this.marketSymbols(symbols);
2204
2204
  let standard = undefined;
@@ -2285,17 +2285,17 @@ class bingx extends bingx$1 {
2285
2285
  const positions = this.safeList(response, 'data', []);
2286
2286
  return this.parsePositions(positions, symbols);
2287
2287
  }
2288
+ /**
2289
+ * @method
2290
+ * @name bingx#fetchPosition
2291
+ * @description fetch data on a single open contract trade position
2292
+ * @see https://bingx-api.github.io/docs/#/en-us/swapV2/account-api.html#Query%20position%20data
2293
+ * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Query%20warehouse
2294
+ * @param {string} symbol unified market symbol of the market the position is held in
2295
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2296
+ * @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
2297
+ */
2288
2298
  async fetchPosition(symbol, params = {}) {
2289
- /**
2290
- * @method
2291
- * @name bingx#fetchPosition
2292
- * @description fetch data on a single open contract trade position
2293
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/account-api.html#Query%20position%20data
2294
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Query%20warehouse
2295
- * @param {string} symbol unified market symbol of the market the position is held in
2296
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2297
- * @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
2298
- */
2299
2299
  await this.loadMarkets();
2300
2300
  const market = this.market(symbol);
2301
2301
  if (!market['swap']) {
@@ -2472,43 +2472,43 @@ class bingx extends bingx$1 {
2472
2472
  'takeProfitPrice': undefined,
2473
2473
  });
2474
2474
  }
2475
+ /**
2476
+ * @method
2477
+ * @name bingx#createMarketOrderWithCost
2478
+ * @description create a market order by providing the symbol, side and cost
2479
+ * @param {string} symbol unified symbol of the market to create an order in
2480
+ * @param {string} side 'buy' or 'sell'
2481
+ * @param {float} cost how much you want to trade in units of the quote currency
2482
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2483
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2484
+ */
2475
2485
  async createMarketOrderWithCost(symbol, side, cost, params = {}) {
2476
- /**
2477
- * @method
2478
- * @name bingx#createMarketOrderWithCost
2479
- * @description create a market order by providing the symbol, side and cost
2480
- * @param {string} symbol unified symbol of the market to create an order in
2481
- * @param {string} side 'buy' or 'sell'
2482
- * @param {float} cost how much you want to trade in units of the quote currency
2483
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2484
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2485
- */
2486
2486
  params['quoteOrderQty'] = cost;
2487
2487
  return await this.createOrder(symbol, 'market', side, cost, undefined, params);
2488
2488
  }
2489
+ /**
2490
+ * @method
2491
+ * @name bingx#createMarketBuyOrderWithCost
2492
+ * @description create a market buy order by providing the symbol and cost
2493
+ * @param {string} symbol unified symbol of the market to create an order in
2494
+ * @param {float} cost how much you want to trade in units of the quote currency
2495
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2496
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2497
+ */
2489
2498
  async createMarketBuyOrderWithCost(symbol, cost, params = {}) {
2490
- /**
2491
- * @method
2492
- * @name bingx#createMarketBuyOrderWithCost
2493
- * @description create a market buy order by providing the symbol and cost
2494
- * @param {string} symbol unified symbol of the market to create an order in
2495
- * @param {float} cost how much you want to trade in units of the quote currency
2496
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2497
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2498
- */
2499
2499
  params['quoteOrderQty'] = cost;
2500
2500
  return await this.createOrder(symbol, 'market', 'buy', cost, undefined, params);
2501
2501
  }
2502
+ /**
2503
+ * @method
2504
+ * @name bingx#createMarketSellOrderWithCost
2505
+ * @description create a market sell order by providing the symbol and cost
2506
+ * @param {string} symbol unified symbol of the market to create an order in
2507
+ * @param {float} cost how much you want to trade in units of the quote currency
2508
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2509
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2510
+ */
2502
2511
  async createMarketSellOrderWithCost(symbol, cost, params = {}) {
2503
- /**
2504
- * @method
2505
- * @name bingx#createMarketSellOrderWithCost
2506
- * @description create a market sell order by providing the symbol and cost
2507
- * @param {string} symbol unified symbol of the market to create an order in
2508
- * @param {float} cost how much you want to trade in units of the quote currency
2509
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2510
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2511
- */
2512
2512
  params['quoteOrderQty'] = cost;
2513
2513
  return await this.createOrder(symbol, 'market', 'sell', cost, undefined, params);
2514
2514
  }
@@ -2718,39 +2718,39 @@ class bingx extends bingx$1 {
2718
2718
  params = this.omit(params, ['hedged', 'triggerPrice', 'stopLossPrice', 'takeProfitPrice', 'trailingAmount', 'trailingPercent', 'trailingType', 'takeProfit', 'stopLoss', 'clientOrderId']);
2719
2719
  return this.extend(request, params);
2720
2720
  }
2721
+ /**
2722
+ * @method
2723
+ * @name bingx#createOrder
2724
+ * @description create a trade order
2725
+ * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Trade%20order
2726
+ * @see https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Create%20an%20Order
2727
+ * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Trade%20order
2728
+ * @param {string} symbol unified symbol of the market to create an order in
2729
+ * @param {string} type 'market' or 'limit'
2730
+ * @param {string} side 'buy' or 'sell'
2731
+ * @param {float} amount how much you want to trade in units of the base currency
2732
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
2733
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2734
+ * @param {string} [params.clientOrderId] a unique id for the order
2735
+ * @param {bool} [params.postOnly] true to place a post only order
2736
+ * @param {string} [params.timeInForce] spot supports 'PO', 'GTC' and 'IOC', swap supports 'PO', 'GTC', 'IOC' and 'FOK'
2737
+ * @param {bool} [params.reduceOnly] *swap only* true or false whether the order is reduce only
2738
+ * @param {float} [params.triggerPrice] triggerPrice at which the attached take profit / stop loss order will be triggered
2739
+ * @param {float} [params.stopLossPrice] stop loss trigger price
2740
+ * @param {float} [params.takeProfitPrice] take profit trigger price
2741
+ * @param {float} [params.cost] the quote quantity that can be used as an alternative for the amount
2742
+ * @param {float} [params.trailingAmount] *swap only* the quote amount to trail away from the current market price
2743
+ * @param {float} [params.trailingPercent] *swap only* the percent to trail away from the current market price
2744
+ * @param {object} [params.takeProfit] *takeProfit object in params* containing the triggerPrice at which the attached take profit order will be triggered
2745
+ * @param {float} [params.takeProfit.triggerPrice] take profit trigger price
2746
+ * @param {object} [params.stopLoss] *stopLoss object in params* containing the triggerPrice at which the attached stop loss order will be triggered
2747
+ * @param {float} [params.stopLoss.triggerPrice] stop loss trigger price
2748
+ * @param {boolean} [params.test] *swap only* whether to use the test endpoint or not, default is false
2749
+ * @param {string} [params.positionSide] *contracts only* "BOTH" for one way mode, "LONG" for buy side of hedged mode, "SHORT" for sell side of hedged mode
2750
+ * @param {boolean} [params.hedged] *swap only* whether the order is in hedged mode or one way mode
2751
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2752
+ */
2721
2753
  async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
2722
- /**
2723
- * @method
2724
- * @name bingx#createOrder
2725
- * @description create a trade order
2726
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Trade%20order
2727
- * @see https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Create%20an%20Order
2728
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Trade%20order
2729
- * @param {string} symbol unified symbol of the market to create an order in
2730
- * @param {string} type 'market' or 'limit'
2731
- * @param {string} side 'buy' or 'sell'
2732
- * @param {float} amount how much you want to trade in units of the base currency
2733
- * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
2734
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2735
- * @param {string} [params.clientOrderId] a unique id for the order
2736
- * @param {bool} [params.postOnly] true to place a post only order
2737
- * @param {string} [params.timeInForce] spot supports 'PO', 'GTC' and 'IOC', swap supports 'PO', 'GTC', 'IOC' and 'FOK'
2738
- * @param {bool} [params.reduceOnly] *swap only* true or false whether the order is reduce only
2739
- * @param {float} [params.triggerPrice] triggerPrice at which the attached take profit / stop loss order will be triggered
2740
- * @param {float} [params.stopLossPrice] stop loss trigger price
2741
- * @param {float} [params.takeProfitPrice] take profit trigger price
2742
- * @param {float} [params.cost] the quote quantity that can be used as an alternative for the amount
2743
- * @param {float} [params.trailingAmount] *swap only* the quote amount to trail away from the current market price
2744
- * @param {float} [params.trailingPercent] *swap only* the percent to trail away from the current market price
2745
- * @param {object} [params.takeProfit] *takeProfit object in params* containing the triggerPrice at which the attached take profit order will be triggered
2746
- * @param {float} [params.takeProfit.triggerPrice] take profit trigger price
2747
- * @param {object} [params.stopLoss] *stopLoss object in params* containing the triggerPrice at which the attached stop loss order will be triggered
2748
- * @param {float} [params.stopLoss.triggerPrice] stop loss trigger price
2749
- * @param {boolean} [params.test] *swap only* whether to use the test endpoint or not, default is false
2750
- * @param {string} [params.positionSide] *contracts only* "BOTH" for one way mode, "LONG" for buy side of hedged mode, "SHORT" for sell side of hedged mode
2751
- * @param {boolean} [params.hedged] *swap only* whether the order is in hedged mode or one way mode
2752
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2753
- */
2754
2754
  await this.loadMarkets();
2755
2755
  const market = this.market(symbol);
2756
2756
  const test = this.safeBool(params, 'test', false);
@@ -2846,18 +2846,18 @@ class bingx extends bingx$1 {
2846
2846
  }
2847
2847
  return this.parseOrder(result, market);
2848
2848
  }
2849
+ /**
2850
+ * @method
2851
+ * @name bingx#createOrders
2852
+ * @description create a list of trade orders
2853
+ * @see https://bingx-api.github.io/docs/#/spot/trade-api.html#Batch%20Placing%20Orders
2854
+ * @see https://bingx-api.github.io/docs/#/swapV2/trade-api.html#Bulk%20order
2855
+ * @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
2856
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2857
+ * @param {boolean} [params.sync] *spot only* if true, multiple orders are ordered serially and all orders do not require the same symbol/side/type
2858
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2859
+ */
2849
2860
  async createOrders(orders, params = {}) {
2850
- /**
2851
- * @method
2852
- * @name bingx#createOrders
2853
- * @description create a list of trade orders
2854
- * @see https://bingx-api.github.io/docs/#/spot/trade-api.html#Batch%20Placing%20Orders
2855
- * @see https://bingx-api.github.io/docs/#/swapV2/trade-api.html#Bulk%20order
2856
- * @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
2857
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2858
- * @param {boolean} [params.sync] *spot only* if true, multiple orders are ordered serially and all orders do not require the same symbol/side/type
2859
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2860
- */
2861
2861
  await this.loadMarkets();
2862
2862
  const ordersRequests = [];
2863
2863
  const marketIds = [];
@@ -3365,20 +3365,20 @@ class bingx extends bingx$1 {
3365
3365
  };
3366
3366
  return this.safeString(statuses, status, status);
3367
3367
  }
3368
+ /**
3369
+ * @method
3370
+ * @name bingx#cancelOrder
3371
+ * @description cancels an open order
3372
+ * @see https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Cancel%20Order
3373
+ * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Cancel%20Order
3374
+ * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Cancel%20an%20Order
3375
+ * @param {string} id order id
3376
+ * @param {string} symbol unified symbol of the market the order was made in
3377
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3378
+ * @param {string} [params.clientOrderId] a unique id for the order
3379
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
3380
+ */
3368
3381
  async cancelOrder(id, symbol = undefined, params = {}) {
3369
- /**
3370
- * @method
3371
- * @name bingx#cancelOrder
3372
- * @description cancels an open order
3373
- * @see https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Cancel%20Order
3374
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Cancel%20Order
3375
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Cancel%20an%20Order
3376
- * @param {string} id order id
3377
- * @param {string} symbol unified symbol of the market the order was made in
3378
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3379
- * @param {string} [params.clientOrderId] a unique id for the order
3380
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
3381
- */
3382
3382
  if (symbol === undefined) {
3383
3383
  throw new errors.ArgumentsRequired(this.id + ' cancelOrder() requires a symbol argument');
3384
3384
  }
@@ -3513,18 +3513,18 @@ class bingx extends bingx$1 {
3513
3513
  const order = this.safeDict(data, 'order', data);
3514
3514
  return this.parseOrder(order, market);
3515
3515
  }
3516
+ /**
3517
+ * @method
3518
+ * @name bingx#cancelAllOrders
3519
+ * @description cancel all open orders
3520
+ * @see https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Cancel%20orders%20by%20symbol
3521
+ * @see https://bingx-api.github.io/docs/#/swapV2/trade-api.html#Cancel%20All%20Orders
3522
+ * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Cancel%20all%20orders
3523
+ * @param {string} [symbol] unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
3524
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3525
+ * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
3526
+ */
3516
3527
  async cancelAllOrders(symbol = undefined, params = {}) {
3517
- /**
3518
- * @method
3519
- * @name bingx#cancelAllOrders
3520
- * @description cancel all open orders
3521
- * @see https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Cancel%20orders%20by%20symbol
3522
- * @see https://bingx-api.github.io/docs/#/swapV2/trade-api.html#Cancel%20All%20Orders
3523
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Cancel%20all%20orders
3524
- * @param {string} [symbol] unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
3525
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3526
- * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
3527
- */
3528
3528
  if (symbol === undefined) {
3529
3529
  throw new errors.ArgumentsRequired(this.id + ' cancelAllOrders() requires a symbol argument');
3530
3530
  }
@@ -3658,19 +3658,19 @@ class bingx extends bingx$1 {
3658
3658
  const orders = this.safeList2(data, 'success', 'orders', []);
3659
3659
  return this.parseOrders(orders);
3660
3660
  }
3661
+ /**
3662
+ * @method
3663
+ * @name bingx#cancelOrders
3664
+ * @description cancel multiple orders
3665
+ * @see https://bingx-api.github.io/docs/#/swapV2/trade-api.html#Cancel%20a%20Batch%20of%20Orders
3666
+ * @see https://bingx-api.github.io/docs/#/spot/trade-api.html#Cancel%20a%20Batch%20of%20Orders
3667
+ * @param {string[]} ids order ids
3668
+ * @param {string} symbol unified market symbol, default is undefined
3669
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3670
+ * @param {string[]} [params.clientOrderIds] client order ids
3671
+ * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
3672
+ */
3661
3673
  async cancelOrders(ids, symbol = undefined, params = {}) {
3662
- /**
3663
- * @method
3664
- * @name bingx#cancelOrders
3665
- * @description cancel multiple orders
3666
- * @see https://bingx-api.github.io/docs/#/swapV2/trade-api.html#Cancel%20a%20Batch%20of%20Orders
3667
- * @see https://bingx-api.github.io/docs/#/spot/trade-api.html#Cancel%20a%20Batch%20of%20Orders
3668
- * @param {string[]} ids order ids
3669
- * @param {string} symbol unified market symbol, default is undefined
3670
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3671
- * @param {string[]} [params.clientOrderIds] client order ids
3672
- * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
3673
- */
3674
3674
  if (symbol === undefined) {
3675
3675
  throw new errors.ArgumentsRequired(this.id + ' cancelOrders() requires a symbol argument');
3676
3676
  }
@@ -3766,18 +3766,18 @@ class bingx extends bingx$1 {
3766
3766
  const success = this.safeList2(data, 'success', 'orders', []);
3767
3767
  return this.parseOrders(success);
3768
3768
  }
3769
+ /**
3770
+ * @method
3771
+ * @name bingx#cancelAllOrdersAfter
3772
+ * @description dead man's switch, cancel all orders after the given timeout
3773
+ * @see https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Cancel%20all%20orders%20in%20countdown
3774
+ * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Cancel%20all%20orders%20in%20countdown
3775
+ * @param {number} timeout time in milliseconds, 0 represents cancel the timer
3776
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3777
+ * @param {string} [params.type] spot or swap market
3778
+ * @returns {object} the api result
3779
+ */
3769
3780
  async cancelAllOrdersAfter(timeout, params = {}) {
3770
- /**
3771
- * @method
3772
- * @name bingx#cancelAllOrdersAfter
3773
- * @description dead man's switch, cancel all orders after the given timeout
3774
- * @see https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Cancel%20all%20orders%20in%20countdown
3775
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Cancel%20all%20orders%20in%20countdown
3776
- * @param {number} timeout time in milliseconds, 0 represents cancel the timer
3777
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3778
- * @param {string} [params.type] spot or swap market
3779
- * @returns {object} the api result
3780
- */
3781
3781
  await this.loadMarkets();
3782
3782
  const isActive = (timeout > 0);
3783
3783
  const request = {
@@ -3809,19 +3809,19 @@ class bingx extends bingx$1 {
3809
3809
  //
3810
3810
  return response;
3811
3811
  }
3812
+ /**
3813
+ * @method
3814
+ * @name bingx#fetchOrder
3815
+ * @description fetches information on an order made by the user
3816
+ * @see https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Query%20Order%20details
3817
+ * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Query%20Order%20details
3818
+ * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Query%20Order
3819
+ * @param {string} id the order id
3820
+ * @param {string} symbol unified symbol of the market the order was made in
3821
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3822
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
3823
+ */
3812
3824
  async fetchOrder(id, symbol = undefined, params = {}) {
3813
- /**
3814
- * @method
3815
- * @name bingx#fetchOrder
3816
- * @description fetches information on an order made by the user
3817
- * @see https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Query%20Order%20details
3818
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Query%20Order%20details
3819
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Query%20Order
3820
- * @param {string} id the order id
3821
- * @param {string} symbol unified symbol of the market the order was made in
3822
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3823
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
3824
- */
3825
3825
  if (symbol === undefined) {
3826
3826
  throw new errors.ArgumentsRequired(this.id + ' fetchOrder() requires a symbol argument');
3827
3827
  }
@@ -3950,20 +3950,20 @@ class bingx extends bingx$1 {
3950
3950
  const order = this.safeDict(data, 'order', data);
3951
3951
  return this.parseOrder(order, market);
3952
3952
  }
3953
+ /**
3954
+ * @method
3955
+ * @name bingx#fetchOrders
3956
+ * @description fetches information on multiple orders made by the user
3957
+ * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#User's%20All%20Orders
3958
+ * @param {string} symbol unified market symbol of the market orders were made in
3959
+ * @param {int} [since] the earliest time in ms to fetch orders for
3960
+ * @param {int} [limit] the maximum number of order structures to retrieve
3961
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3962
+ * @param {int} [params.until] the latest time in ms to fetch entries for
3963
+ * @param {int} [params.orderId] Only return subsequent orders, and return the latest order by default
3964
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
3965
+ */
3953
3966
  async fetchOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
3954
- /**
3955
- * @method
3956
- * @name bingx#fetchOrders
3957
- * @description fetches information on multiple orders made by the user
3958
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#User's%20All%20Orders
3959
- * @param {string} symbol unified market symbol of the market orders were made in
3960
- * @param {int} [since] the earliest time in ms to fetch orders for
3961
- * @param {int} [limit] the maximum number of order structures to retrieve
3962
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3963
- * @param {int} [params.until] the latest time in ms to fetch entries for
3964
- * @param {int} [params.orderId] Only return subsequent orders, and return the latest order by default
3965
- * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
3966
- */
3967
3967
  await this.loadMarkets();
3968
3968
  const request = {};
3969
3969
  let market = undefined;
@@ -4045,20 +4045,20 @@ class bingx extends bingx$1 {
4045
4045
  const orders = this.safeList(data, 'orders', []);
4046
4046
  return this.parseOrders(orders, market, since, limit);
4047
4047
  }
4048
+ /**
4049
+ * @method
4050
+ * @name bingx#fetchOpenOrders
4051
+ * @description fetch all unfilled currently open orders
4052
+ * @see https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Current%20Open%20Orders
4053
+ * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Current%20All%20Open%20Orders
4054
+ * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Query%20all%20current%20pending%20orders
4055
+ * @param {string} symbol unified market symbol
4056
+ * @param {int} [since] the earliest time in ms to fetch open orders for
4057
+ * @param {int} [limit] the maximum number of open order structures to retrieve
4058
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4059
+ * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
4060
+ */
4048
4061
  async fetchOpenOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
4049
- /**
4050
- * @method
4051
- * @name bingx#fetchOpenOrders
4052
- * @description fetch all unfilled currently open orders
4053
- * @see https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Current%20Open%20Orders
4054
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Current%20All%20Open%20Orders
4055
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Query%20all%20current%20pending%20orders
4056
- * @param {string} symbol unified market symbol
4057
- * @param {int} [since] the earliest time in ms to fetch open orders for
4058
- * @param {int} [limit] the maximum number of open order structures to retrieve
4059
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4060
- * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
4061
- */
4062
4062
  await this.loadMarkets();
4063
4063
  let market = undefined;
4064
4064
  const request = {};
@@ -4195,65 +4195,65 @@ class bingx extends bingx$1 {
4195
4195
  const orders = this.safeList(data, 'orders', []);
4196
4196
  return this.parseOrders(orders, market, since, limit);
4197
4197
  }
4198
+ /**
4199
+ * @method
4200
+ * @name bingx#fetchClosedOrders
4201
+ * @description fetches information on multiple closed orders made by the user
4202
+ * @see https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Query%20Order%20history
4203
+ * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Query%20Order%20history
4204
+ * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#User's%20History%20Orders
4205
+ * @see https://bingx-api.github.io/docs/#/standard/contract-interface.html#Historical%20order
4206
+ * @param {string} symbol unified market symbol of the closed orders
4207
+ * @param {int} [since] timestamp in ms of the earliest order
4208
+ * @param {int} [limit] the max number of closed orders to return
4209
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4210
+ * @param {int} [params.until] the latest time in ms to fetch orders for
4211
+ * @param {boolean} [params.standard] whether to fetch standard contract orders
4212
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
4213
+ */
4198
4214
  async fetchClosedOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
4199
- /**
4200
- * @method
4201
- * @name bingx#fetchClosedOrders
4202
- * @description fetches information on multiple closed orders made by the user
4203
- * @see https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Query%20Order%20history
4204
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Query%20Order%20history
4205
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#User's%20History%20Orders
4206
- * @see https://bingx-api.github.io/docs/#/standard/contract-interface.html#Historical%20order
4207
- * @param {string} symbol unified market symbol of the closed orders
4208
- * @param {int} [since] timestamp in ms of the earliest order
4209
- * @param {int} [limit] the max number of closed orders to return
4210
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4211
- * @param {int} [params.until] the latest time in ms to fetch orders for
4212
- * @param {boolean} [params.standard] whether to fetch standard contract orders
4213
- * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
4214
- */
4215
4215
  await this.loadMarkets();
4216
4216
  const orders = await this.fetchCanceledAndClosedOrders(symbol, since, limit, params);
4217
4217
  return this.filterBy(orders, 'status', 'closed');
4218
4218
  }
4219
+ /**
4220
+ * @method
4221
+ * @name bingx#fetchCanceledOrders
4222
+ * @description fetches information on multiple canceled orders made by the user
4223
+ * @see https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Query%20Order%20history
4224
+ * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Query%20Order%20history
4225
+ * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#User's%20History%20Orders
4226
+ * @see https://bingx-api.github.io/docs/#/standard/contract-interface.html#Historical%20order
4227
+ * @param {string} symbol unified market symbol of the canceled orders
4228
+ * @param {int} [since] timestamp in ms of the earliest order
4229
+ * @param {int} [limit] the max number of canceled orders to return
4230
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4231
+ * @param {int} [params.until] the latest time in ms to fetch orders for
4232
+ * @param {boolean} [params.standard] whether to fetch standard contract orders
4233
+ * @returns {object} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
4234
+ */
4219
4235
  async fetchCanceledOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
4220
- /**
4221
- * @method
4222
- * @name bingx#fetchCanceledOrders
4223
- * @description fetches information on multiple canceled orders made by the user
4224
- * @see https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Query%20Order%20history
4225
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Query%20Order%20history
4226
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#User's%20History%20Orders
4227
- * @see https://bingx-api.github.io/docs/#/standard/contract-interface.html#Historical%20order
4228
- * @param {string} symbol unified market symbol of the canceled orders
4229
- * @param {int} [since] timestamp in ms of the earliest order
4230
- * @param {int} [limit] the max number of canceled orders to return
4231
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4232
- * @param {int} [params.until] the latest time in ms to fetch orders for
4233
- * @param {boolean} [params.standard] whether to fetch standard contract orders
4234
- * @returns {object} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
4235
- */
4236
4236
  await this.loadMarkets();
4237
4237
  const orders = await this.fetchCanceledAndClosedOrders(symbol, since, limit, params);
4238
4238
  return this.filterBy(orders, 'status', 'canceled');
4239
4239
  }
4240
+ /**
4241
+ * @method
4242
+ * @name bingx#fetchCanceledAndClosedOrders
4243
+ * @description fetches information on multiple closed orders made by the user
4244
+ * @see https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Query%20Order%20history
4245
+ * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Query%20Order%20history
4246
+ * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#User's%20History%20Orders
4247
+ * @see https://bingx-api.github.io/docs/#/standard/contract-interface.html#Historical%20order
4248
+ * @param {string} [symbol] unified market symbol of the market orders were made in
4249
+ * @param {int} [since] the earliest time in ms to fetch orders for
4250
+ * @param {int} [limit] the maximum number of order structures to retrieve
4251
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4252
+ * @param {int} [params.until] the latest time in ms to fetch orders for
4253
+ * @param {boolean} [params.standard] whether to fetch standard contract orders
4254
+ * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
4255
+ */
4240
4256
  async fetchCanceledAndClosedOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
4241
- /**
4242
- * @method
4243
- * @name bingx#fetchCanceledAndClosedOrders
4244
- * @description fetches information on multiple closed orders made by the user
4245
- * @see https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Query%20Order%20history
4246
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Query%20Order%20history
4247
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#User's%20History%20Orders
4248
- * @see https://bingx-api.github.io/docs/#/standard/contract-interface.html#Historical%20order
4249
- * @param {string} [symbol] unified market symbol of the market orders were made in
4250
- * @param {int} [since] the earliest time in ms to fetch orders for
4251
- * @param {int} [limit] the maximum number of order structures to retrieve
4252
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4253
- * @param {int} [params.until] the latest time in ms to fetch orders for
4254
- * @param {boolean} [params.standard] whether to fetch standard contract orders
4255
- * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
4256
- */
4257
4257
  if (symbol === undefined) {
4258
4258
  throw new errors.ArgumentsRequired(this.id + ' fetchClosedOrders() requires a symbol argument');
4259
4259
  }
@@ -4392,19 +4392,19 @@ class bingx extends bingx$1 {
4392
4392
  const orders = this.safeList(data, 'orders', []);
4393
4393
  return this.parseOrders(orders, market, since, limit);
4394
4394
  }
4395
+ /**
4396
+ * @method
4397
+ * @name bingx#transfer
4398
+ * @description transfer currency internally between wallets on the same account
4399
+ * @see https://bingx-api.github.io/docs/#/spot/account-api.html#User%20Universal%20Transfer
4400
+ * @param {string} code unified currency code
4401
+ * @param {float} amount amount to transfer
4402
+ * @param {string} fromAccount account to transfer from
4403
+ * @param {string} toAccount account to transfer to
4404
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4405
+ * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
4406
+ */
4395
4407
  async transfer(code, amount, fromAccount, toAccount, params = {}) {
4396
- /**
4397
- * @method
4398
- * @name bingx#transfer
4399
- * @description transfer currency internally between wallets on the same account
4400
- * @see https://bingx-api.github.io/docs/#/spot/account-api.html#User%20Universal%20Transfer
4401
- * @param {string} code unified currency code
4402
- * @param {float} amount amount to transfer
4403
- * @param {string} fromAccount account to transfer from
4404
- * @param {string} toAccount account to transfer to
4405
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4406
- * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
4407
- */
4408
4408
  await this.loadMarkets();
4409
4409
  const currency = this.currency(code);
4410
4410
  const accountsByType = this.safeDict(this.options, 'accountsByType', {});
@@ -4433,18 +4433,18 @@ class bingx extends bingx$1 {
4433
4433
  'status': undefined,
4434
4434
  };
4435
4435
  }
4436
+ /**
4437
+ * @method
4438
+ * @name bingx#fetchTransfers
4439
+ * @description fetch a history of internal transfers made on an account
4440
+ * @see https://bingx-api.github.io/docs/#/spot/account-api.html#Query%20User%20Universal%20Transfer%20History%20(USER_DATA)
4441
+ * @param {string} [code] unified currency code of the currency transferred
4442
+ * @param {int} [since] the earliest time in ms to fetch transfers for
4443
+ * @param {int} [limit] the maximum number of transfers structures to retrieve
4444
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4445
+ * @returns {object[]} a list of [transfer structures]{@link https://docs.ccxt.com/#/?id=transfer-structure}
4446
+ */
4436
4447
  async fetchTransfers(code = undefined, since = undefined, limit = undefined, params = {}) {
4437
- /**
4438
- * @method
4439
- * @name bingx#fetchTransfers
4440
- * @description fetch a history of internal transfers made on an account
4441
- * @see https://bingx-api.github.io/docs/#/spot/account-api.html#Query%20User%20Universal%20Transfer%20History%20(USER_DATA)
4442
- * @param {string} [code] unified currency code of the currency transferred
4443
- * @param {int} [since] the earliest time in ms to fetch transfers for
4444
- * @param {int} [limit] the maximum number of transfers structures to retrieve
4445
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4446
- * @returns {object[]} a list of [transfer structures]{@link https://docs.ccxt.com/#/?id=transfer-structure}
4447
- */
4448
4448
  await this.loadMarkets();
4449
4449
  let currency = undefined;
4450
4450
  if (code !== undefined) {
@@ -4510,16 +4510,16 @@ class bingx extends bingx$1 {
4510
4510
  'status': status,
4511
4511
  };
4512
4512
  }
4513
+ /**
4514
+ * @method
4515
+ * @name bingx#fetchDepositAddressesByNetwork
4516
+ * @description fetch the deposit addresses for a currency associated with this account
4517
+ * @see https://bingx-api.github.io/docs/#/en-us/common/wallet-api.html#Query%20Main%20Account%20Deposit%20Address
4518
+ * @param {string} code unified currency code
4519
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4520
+ * @returns {object} a dictionary [address structures]{@link https://docs.ccxt.com/#/?id=address-structure}, indexed by the network
4521
+ */
4513
4522
  async fetchDepositAddressesByNetwork(code, params = {}) {
4514
- /**
4515
- * @method
4516
- * @name bingx#fetchDepositAddressesByNetwork
4517
- * @description fetch the deposit addresses for a currency associated with this account
4518
- * @see https://bingx-api.github.io/docs/#/en-us/common/wallet-api.html#Query%20Main%20Account%20Deposit%20Address
4519
- * @param {string} code unified currency code
4520
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4521
- * @returns {object} a dictionary [address structures]{@link https://docs.ccxt.com/#/?id=address-structure}, indexed by the network
4522
- */
4523
4523
  await this.loadMarkets();
4524
4524
  const currency = this.currency(code);
4525
4525
  const defaultRecvWindow = this.safeInteger(this.options, 'recvWindow');
@@ -4553,17 +4553,17 @@ class bingx extends bingx$1 {
4553
4553
  const parsed = this.parseDepositAddresses(data, [currency['code']], false);
4554
4554
  return this.indexBy(parsed, 'network');
4555
4555
  }
4556
+ /**
4557
+ * @method
4558
+ * @name bingx#fetchDepositAddress
4559
+ * @description fetch the deposit address for a currency associated with this account
4560
+ * @see https://bingx-api.github.io/docs/#/en-us/common/wallet-api.html#Query%20Main%20Account%20Deposit%20Address
4561
+ * @param {string} code unified currency code
4562
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4563
+ * @param {string} [params.network] The chain of currency. This only apply for multi-chain currency, and there is no need for single chain currency
4564
+ * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
4565
+ */
4556
4566
  async fetchDepositAddress(code, params = {}) {
4557
- /**
4558
- * @method
4559
- * @name bingx#fetchDepositAddress
4560
- * @description fetch the deposit address for a currency associated with this account
4561
- * @see https://bingx-api.github.io/docs/#/en-us/common/wallet-api.html#Query%20Main%20Account%20Deposit%20Address
4562
- * @param {string} code unified currency code
4563
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4564
- * @param {string} [params.network] The chain of currency. This only apply for multi-chain currency, and there is no need for single chain currency
4565
- * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
4566
- */
4567
4567
  const network = this.safeString(params, 'network');
4568
4568
  params = this.omit(params, ['network']);
4569
4569
  const addressStructures = await this.fetchDepositAddressesByNetwork(code, params);
@@ -4609,18 +4609,18 @@ class bingx extends bingx$1 {
4609
4609
  'tag': tag,
4610
4610
  };
4611
4611
  }
4612
+ /**
4613
+ * @method
4614
+ * @name bingx#fetchDeposits
4615
+ * @description fetch all deposits made to an account
4616
+ * @see https://bingx-api.github.io/docs/#/spot/account-api.html#Deposit%20History(supporting%20network)
4617
+ * @param {string} [code] unified currency code
4618
+ * @param {int} [since] the earliest time in ms to fetch deposits for
4619
+ * @param {int} [limit] the maximum number of deposits structures to retrieve
4620
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4621
+ * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
4622
+ */
4612
4623
  async fetchDeposits(code = undefined, since = undefined, limit = undefined, params = {}) {
4613
- /**
4614
- * @method
4615
- * @name bingx#fetchDeposits
4616
- * @description fetch all deposits made to an account
4617
- * @see https://bingx-api.github.io/docs/#/spot/account-api.html#Deposit%20History(supporting%20network)
4618
- * @param {string} [code] unified currency code
4619
- * @param {int} [since] the earliest time in ms to fetch deposits for
4620
- * @param {int} [limit] the maximum number of deposits structures to retrieve
4621
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4622
- * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
4623
- */
4624
4624
  await this.loadMarkets();
4625
4625
  const request = {};
4626
4626
  let currency = undefined;
@@ -4654,18 +4654,18 @@ class bingx extends bingx$1 {
4654
4654
  //
4655
4655
  return this.parseTransactions(response, currency, since, limit);
4656
4656
  }
4657
+ /**
4658
+ * @method
4659
+ * @name bingx#fetchWithdrawals
4660
+ * @description fetch all withdrawals made from an account
4661
+ * @see https://bingx-api.github.io/docs/#/spot/account-api.html#Withdraw%20History%20(supporting%20network)
4662
+ * @param {string} [code] unified currency code
4663
+ * @param {int} [since] the earliest time in ms to fetch withdrawals for
4664
+ * @param {int} [limit] the maximum number of withdrawals structures to retrieve
4665
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4666
+ * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
4667
+ */
4657
4668
  async fetchWithdrawals(code = undefined, since = undefined, limit = undefined, params = {}) {
4658
- /**
4659
- * @method
4660
- * @name bingx#fetchWithdrawals
4661
- * @description fetch all withdrawals made from an account
4662
- * @see https://bingx-api.github.io/docs/#/spot/account-api.html#Withdraw%20History%20(supporting%20network)
4663
- * @param {string} [code] unified currency code
4664
- * @param {int} [since] the earliest time in ms to fetch withdrawals for
4665
- * @param {int} [limit] the maximum number of withdrawals structures to retrieve
4666
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4667
- * @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
4668
- */
4669
4669
  await this.loadMarkets();
4670
4670
  const request = {};
4671
4671
  let currency = undefined;
@@ -4816,18 +4816,18 @@ class bingx extends bingx$1 {
4816
4816
  };
4817
4817
  return this.safeString(statuses, status, status);
4818
4818
  }
4819
+ /**
4820
+ * @method
4821
+ * @name bingx#setMarginMode
4822
+ * @description set margin mode to 'cross' or 'isolated'
4823
+ * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Change%20Margin%20Type
4824
+ * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Set%20Margin%20Type
4825
+ * @param {string} marginMode 'cross' or 'isolated'
4826
+ * @param {string} symbol unified market symbol
4827
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4828
+ * @returns {object} response from the exchange
4829
+ */
4819
4830
  async setMarginMode(marginMode, symbol = undefined, params = {}) {
4820
- /**
4821
- * @method
4822
- * @name bingx#setMarginMode
4823
- * @description set margin mode to 'cross' or 'isolated'
4824
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Change%20Margin%20Type
4825
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Set%20Margin%20Type
4826
- * @param {string} marginMode 'cross' or 'isolated'
4827
- * @param {string} symbol unified market symbol
4828
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4829
- * @returns {object} response from the exchange
4830
- */
4831
4831
  if (symbol === undefined) {
4832
4832
  throw new errors.ArgumentsRequired(this.id + ' setMarginMode() requires a symbol argument');
4833
4833
  }
@@ -4868,17 +4868,17 @@ class bingx extends bingx$1 {
4868
4868
  };
4869
4869
  return await this.setMargin(symbol, amount, this.extend(request, params));
4870
4870
  }
4871
+ /**
4872
+ * @method
4873
+ * @name bingx#setMargin
4874
+ * @description Either adds or reduces margin in an isolated position in order to set the margin to a specific value
4875
+ * @see https://bingx-api.github.io/docs/#/swapV2/trade-api.html#Adjust%20isolated%20margin
4876
+ * @param {string} symbol unified market symbol of the market to set margin in
4877
+ * @param {float} amount the amount to set the margin to
4878
+ * @param {object} [params] parameters specific to the bingx api endpoint
4879
+ * @returns {object} A [margin structure]{@link https://docs.ccxt.com/#/?id=add-margin-structure}
4880
+ */
4871
4881
  async setMargin(symbol, amount, params = {}) {
4872
- /**
4873
- * @method
4874
- * @name bingx#setMargin
4875
- * @description Either adds or reduces margin in an isolated position in order to set the margin to a specific value
4876
- * @see https://bingx-api.github.io/docs/#/swapV2/trade-api.html#Adjust%20isolated%20margin
4877
- * @param {string} symbol unified market symbol of the market to set margin in
4878
- * @param {float} amount the amount to set the margin to
4879
- * @param {object} [params] parameters specific to the bingx api endpoint
4880
- * @returns {object} A [margin structure]{@link https://docs.ccxt.com/#/?id=add-margin-structure}
4881
- */
4882
4882
  const type = this.safeInteger(params, 'type'); // 1 increase margin 2 decrease margin
4883
4883
  if (type === undefined) {
4884
4884
  throw new errors.ArgumentsRequired(this.id + ' setMargin() requires a type parameter either 1 (increase margin) or 2 (decrease margin)');
@@ -4927,17 +4927,17 @@ class bingx extends bingx$1 {
4927
4927
  'datetime': undefined,
4928
4928
  };
4929
4929
  }
4930
+ /**
4931
+ * @method
4932
+ * @name bingx#fetchLeverage
4933
+ * @description fetch the set leverage for a market
4934
+ * @see https://bingx-api.github.io/docs/#/swapV2/trade-api.html#Query%20Leverage
4935
+ * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Query%20Leverage
4936
+ * @param {string} symbol unified market symbol
4937
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4938
+ * @returns {object} a [leverage structure]{@link https://docs.ccxt.com/#/?id=leverage-structure}
4939
+ */
4930
4940
  async fetchLeverage(symbol, params = {}) {
4931
- /**
4932
- * @method
4933
- * @name bingx#fetchLeverage
4934
- * @description fetch the set leverage for a market
4935
- * @see https://bingx-api.github.io/docs/#/swapV2/trade-api.html#Query%20Leverage
4936
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Query%20Leverage
4937
- * @param {string} symbol unified market symbol
4938
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4939
- * @returns {object} a [leverage structure]{@link https://docs.ccxt.com/#/?id=leverage-structure}
4940
- */
4941
4941
  await this.loadMarkets();
4942
4942
  const market = this.market(symbol);
4943
4943
  const request = {
@@ -5025,19 +5025,19 @@ class bingx extends bingx$1 {
5025
5025
  'shortLeverage': this.safeInteger(leverage, 'shortLeverage'),
5026
5026
  };
5027
5027
  }
5028
+ /**
5029
+ * @method
5030
+ * @name bingx#setLeverage
5031
+ * @description set the level of leverage for a market
5032
+ * @see https://bingx-api.github.io/docs/#/swapV2/trade-api.html#Switch%20Leverage
5033
+ * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Modify%20Leverage
5034
+ * @param {float} leverage the rate of leverage
5035
+ * @param {string} symbol unified market symbol
5036
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
5037
+ * @param {string} [params.side] hedged: ['long' or 'short']. one way: ['both']
5038
+ * @returns {object} response from the exchange
5039
+ */
5028
5040
  async setLeverage(leverage, symbol = undefined, params = {}) {
5029
- /**
5030
- * @method
5031
- * @name bingx#setLeverage
5032
- * @description set the level of leverage for a market
5033
- * @see https://bingx-api.github.io/docs/#/swapV2/trade-api.html#Switch%20Leverage
5034
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Modify%20Leverage
5035
- * @param {float} leverage the rate of leverage
5036
- * @param {string} symbol unified market symbol
5037
- * @param {object} [params] extra parameters specific to the exchange API endpoint
5038
- * @param {string} [params.side] hedged: ['long' or 'short']. one way: ['both']
5039
- * @returns {object} response from the exchange
5040
- */
5041
5041
  if (symbol === undefined) {
5042
5042
  throw new errors.ArgumentsRequired(this.id + ' setLeverage() requires a symbol argument');
5043
5043
  }
@@ -5089,23 +5089,23 @@ class bingx extends bingx$1 {
5089
5089
  //
5090
5090
  }
5091
5091
  }
5092
+ /**
5093
+ * @method
5094
+ * @name bingx#fetchMyTrades
5095
+ * @description fetch all trades made by the user
5096
+ * @see https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Query%20transaction%20details
5097
+ * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Query%20historical%20transaction%20orders
5098
+ * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Query%20Order%20Trade%20Detail
5099
+ * @param {string} [symbol] unified market symbol
5100
+ * @param {int} [since] the earliest time in ms to fetch trades for
5101
+ * @param {int} [limit] the maximum number of trades structures to retrieve
5102
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
5103
+ * @param {int} [params.until] timestamp in ms for the ending date filter, default is undefined
5104
+ * @param {string} params.trandingUnit COIN (directly represent assets such as BTC and ETH) or CONT (represents the number of contract sheets)
5105
+ * @param {string} params.orderId the order id required for inverse swap
5106
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
5107
+ */
5092
5108
  async fetchMyTrades(symbol = undefined, since = undefined, limit = undefined, params = {}) {
5093
- /**
5094
- * @method
5095
- * @name bingx#fetchMyTrades
5096
- * @description fetch all trades made by the user
5097
- * @see https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Query%20transaction%20details
5098
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Query%20historical%20transaction%20orders
5099
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Query%20Order%20Trade%20Detail
5100
- * @param {string} [symbol] unified market symbol
5101
- * @param {int} [since] the earliest time in ms to fetch trades for
5102
- * @param {int} [limit] the maximum number of trades structures to retrieve
5103
- * @param {object} [params] extra parameters specific to the exchange API endpoint
5104
- * @param {int} [params.until] timestamp in ms for the ending date filter, default is undefined
5105
- * @param {string} params.trandingUnit COIN (directly represent assets such as BTC and ETH) or CONT (represents the number of contract sheets)
5106
- * @param {string} params.orderId the order id required for inverse swap
5107
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
5108
- */
5109
5109
  if (symbol === undefined) {
5110
5110
  throw new errors.ArgumentsRequired(this.id + ' fetchMyTrades() requires a symbol argument');
5111
5111
  }
@@ -5291,35 +5291,35 @@ class bingx extends bingx$1 {
5291
5291
  }
5292
5292
  return result;
5293
5293
  }
5294
+ /**
5295
+ * @method
5296
+ * @name bingx#fetchDepositWithdrawFees
5297
+ * @description fetch deposit and withdraw fees
5298
+ * @see https://bingx-api.github.io/docs/#/common/account-api.html#All%20Coins'%20Information
5299
+ * @param {string[]|undefined} codes list of unified currency codes
5300
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
5301
+ * @returns {object} a list of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
5302
+ */
5294
5303
  async fetchDepositWithdrawFees(codes = undefined, params = {}) {
5295
- /**
5296
- * @method
5297
- * @name bingx#fetchDepositWithdrawFees
5298
- * @description fetch deposit and withdraw fees
5299
- * @see https://bingx-api.github.io/docs/#/common/account-api.html#All%20Coins'%20Information
5300
- * @param {string[]|undefined} codes list of unified currency codes
5301
- * @param {object} [params] extra parameters specific to the exchange API endpoint
5302
- * @returns {object} a list of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
5303
- */
5304
5304
  await this.loadMarkets();
5305
5305
  const response = await this.walletsV1PrivateGetCapitalConfigGetall(params);
5306
5306
  const coins = this.safeList(response, 'data');
5307
5307
  return this.parseDepositWithdrawFees(coins, codes, 'coin');
5308
5308
  }
5309
+ /**
5310
+ * @method
5311
+ * @name bingx#withdraw
5312
+ * @description make a withdrawal
5313
+ * @see https://bingx-api.github.io/docs/#/en-us/spot/wallet-api.html#Withdraw
5314
+ * @param {string} code unified currency code
5315
+ * @param {float} amount the amount to withdraw
5316
+ * @param {string} address the address to withdraw to
5317
+ * @param {string} [tag]
5318
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
5319
+ * @param {int} [params.walletType] 1 fund account, 2 standard account, 3 perpetual account
5320
+ * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
5321
+ */
5309
5322
  async withdraw(code, amount, address, tag = undefined, params = {}) {
5310
- /**
5311
- * @method
5312
- * @name bingx#withdraw
5313
- * @description make a withdrawal
5314
- * @see https://bingx-api.github.io/docs/#/en-us/spot/wallet-api.html#Withdraw
5315
- * @param {string} code unified currency code
5316
- * @param {float} amount the amount to withdraw
5317
- * @param {string} address the address to withdraw to
5318
- * @param {string} [tag]
5319
- * @param {object} [params] extra parameters specific to the exchange API endpoint
5320
- * @param {int} [params.walletType] 1 fund account, 2 standard account, 3 perpetual account
5321
- * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
5322
- */
5323
5323
  [tag, params] = this.handleWithdrawTagAndParams(tag, params);
5324
5324
  this.checkAddress(address);
5325
5325
  await this.loadMarkets();
@@ -5377,20 +5377,20 @@ class bingx extends bingx$1 {
5377
5377
  }
5378
5378
  return sortedParams;
5379
5379
  }
5380
+ /**
5381
+ * @method
5382
+ * @name bingx#fetchMyLiquidations
5383
+ * @description retrieves the users liquidated positions
5384
+ * @see https://bingx-api.github.io/docs/#/swapV2/trade-api.html#User's%20Force%20Orders
5385
+ * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Query%20force%20orders
5386
+ * @param {string} [symbol] unified CCXT market symbol
5387
+ * @param {int} [since] the earliest time in ms to fetch liquidations for
5388
+ * @param {int} [limit] the maximum number of liquidation structures to retrieve
5389
+ * @param {object} [params] exchange specific parameters for the bingx api endpoint
5390
+ * @param {int} [params.until] timestamp in ms of the latest liquidation
5391
+ * @returns {object} an array of [liquidation structures]{@link https://docs.ccxt.com/#/?id=liquidation-structure}
5392
+ */
5380
5393
  async fetchMyLiquidations(symbol = undefined, since = undefined, limit = undefined, params = {}) {
5381
- /**
5382
- * @method
5383
- * @name bingx#fetchMyLiquidations
5384
- * @description retrieves the users liquidated positions
5385
- * @see https://bingx-api.github.io/docs/#/swapV2/trade-api.html#User's%20Force%20Orders
5386
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Query%20force%20orders
5387
- * @param {string} [symbol] unified CCXT market symbol
5388
- * @param {int} [since] the earliest time in ms to fetch liquidations for
5389
- * @param {int} [limit] the maximum number of liquidation structures to retrieve
5390
- * @param {object} [params] exchange specific parameters for the bingx api endpoint
5391
- * @param {int} [params.until] timestamp in ms of the latest liquidation
5392
- * @returns {object} an array of [liquidation structures]{@link https://docs.ccxt.com/#/?id=liquidation-structure}
5393
- */
5394
5394
  await this.loadMarkets();
5395
5395
  let request = {
5396
5396
  'autoCloseType': 'LIQUIDATION',
@@ -5519,19 +5519,19 @@ class bingx extends bingx$1 {
5519
5519
  'datetime': this.iso8601(timestamp),
5520
5520
  });
5521
5521
  }
5522
+ /**
5523
+ * @method
5524
+ * @name bingx#closePosition
5525
+ * @description closes open positions for a market
5526
+ * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#One-Click%20Close%20All%20Positions
5527
+ * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Close%20all%20positions%20in%20bulk
5528
+ * @param {string} symbol Unified CCXT market symbol
5529
+ * @param {string} [side] not used by bingx
5530
+ * @param {object} [params] extra parameters specific to the bingx api endpoint
5531
+ * @param {string|undefined} [params.positionId] the id of the position you would like to close
5532
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
5533
+ */
5522
5534
  async closePosition(symbol, side = undefined, params = {}) {
5523
- /**
5524
- * @method
5525
- * @name bingx#closePosition
5526
- * @description closes open positions for a market
5527
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#One-Click%20Close%20All%20Positions
5528
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Close%20all%20positions%20in%20bulk
5529
- * @param {string} symbol Unified CCXT market symbol
5530
- * @param {string} [side] not used by bingx
5531
- * @param {object} [params] extra parameters specific to the bingx api endpoint
5532
- * @param {string|undefined} [params.positionId] the id of the position you would like to close
5533
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
5534
- */
5535
5535
  await this.loadMarkets();
5536
5536
  const market = this.market(symbol);
5537
5537
  const positionId = this.safeString(params, 'positionId');
@@ -5591,17 +5591,17 @@ class bingx extends bingx$1 {
5591
5591
  const data = this.safeDict(response, 'data');
5592
5592
  return this.parseOrder(data, market);
5593
5593
  }
5594
+ /**
5595
+ * @method
5596
+ * @name bitget#closePositions
5597
+ * @description closes open positions for a market
5598
+ * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#One-Click%20Close%20All%20Positions
5599
+ * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Close%20all%20positions%20in%20bulk
5600
+ * @param {object} [params] extra parameters specific to the bingx api endpoint
5601
+ * @param {string} [params.recvWindow] request valid time window value
5602
+ * @returns {object[]} [a list of position structures]{@link https://docs.ccxt.com/#/?id=position-structure}
5603
+ */
5594
5604
  async closeAllPositions(params = {}) {
5595
- /**
5596
- * @method
5597
- * @name bitget#closePositions
5598
- * @description closes open positions for a market
5599
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#One-Click%20Close%20All%20Positions
5600
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Close%20all%20positions%20in%20bulk
5601
- * @param {object} [params] extra parameters specific to the bingx api endpoint
5602
- * @param {string} [params.recvWindow] request valid time window value
5603
- * @returns {object[]} [a list of position structures]{@link https://docs.ccxt.com/#/?id=position-structure}
5604
- */
5605
5605
  await this.loadMarkets();
5606
5606
  const defaultRecvWindow = this.safeInteger(this.options, 'recvWindow');
5607
5607
  const recvWindow = this.safeInteger(this.parseParams, 'recvWindow', defaultRecvWindow);
@@ -5655,16 +5655,16 @@ class bingx extends bingx$1 {
5655
5655
  }
5656
5656
  return positions;
5657
5657
  }
5658
+ /**
5659
+ * @method
5660
+ * @name bingx#fetchPositionMode
5661
+ * @description fetchs the position mode, hedged or one way, hedged for binance is set identically for all linear markets or all inverse markets
5662
+ * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Get%20Position%20Mode
5663
+ * @param {string} symbol unified symbol of the market to fetch the order book for
5664
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
5665
+ * @returns {object} an object detailing whether the market is in hedged or one-way mode
5666
+ */
5658
5667
  async fetchPositionMode(symbol = undefined, params = {}) {
5659
- /**
5660
- * @method
5661
- * @name bingx#fetchPositionMode
5662
- * @description fetchs the position mode, hedged or one way, hedged for binance is set identically for all linear markets or all inverse markets
5663
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Get%20Position%20Mode
5664
- * @param {string} symbol unified symbol of the market to fetch the order book for
5665
- * @param {object} [params] extra parameters specific to the exchange API endpoint
5666
- * @returns {object} an object detailing whether the market is in hedged or one-way mode
5667
- */
5668
5668
  const response = await this.swapV1PrivateGetPositionSideDual(params);
5669
5669
  //
5670
5670
  // {
@@ -5683,17 +5683,17 @@ class bingx extends bingx$1 {
5683
5683
  'hedged': (dualSidePosition === 'true'),
5684
5684
  };
5685
5685
  }
5686
+ /**
5687
+ * @method
5688
+ * @name bingx#setPositionMode
5689
+ * @description set hedged to true or false for a market
5690
+ * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Set%20Position%20Mode
5691
+ * @param {bool} hedged set to true to use dualSidePosition
5692
+ * @param {string} symbol not used by bingx setPositionMode ()
5693
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
5694
+ * @returns {object} response from the exchange
5695
+ */
5686
5696
  async setPositionMode(hedged, symbol = undefined, params = {}) {
5687
- /**
5688
- * @method
5689
- * @name bingx#setPositionMode
5690
- * @description set hedged to true or false for a market
5691
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Set%20Position%20Mode
5692
- * @param {bool} hedged set to true to use dualSidePosition
5693
- * @param {string} symbol not used by bingx setPositionMode ()
5694
- * @param {object} [params] extra parameters specific to the exchange API endpoint
5695
- * @returns {object} response from the exchange
5696
- */
5697
5697
  let dualSidePosition = undefined;
5698
5698
  if (hedged) {
5699
5699
  dualSidePosition = 'true';
@@ -5714,38 +5714,38 @@ class bingx extends bingx$1 {
5714
5714
  //
5715
5715
  return await this.swapV1PrivatePostPositionSideDual(this.extend(request, params));
5716
5716
  }
5717
+ /**
5718
+ * @method
5719
+ * @name bingx#editOrder
5720
+ * @description cancels an order and places a new order
5721
+ * @see https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Cancel%20order%20and%20place%20a%20new%20order // spot
5722
+ * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Cancel%20an%20order%20and%20then%20Place%20a%20new%20order // swap
5723
+ * @param {string} id order id
5724
+ * @param {string} symbol unified symbol of the market to create an order in
5725
+ * @param {string} type 'market' or 'limit'
5726
+ * @param {string} side 'buy' or 'sell'
5727
+ * @param {float} amount how much of the currency you want to trade in units of the base currency
5728
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
5729
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
5730
+ * @param {string} [params.stopPrice] Trigger price used for TAKE_STOP_LIMIT, TAKE_STOP_MARKET, TRIGGER_LIMIT, TRIGGER_MARKET order types.
5731
+ * @param {object} [params.takeProfit] *takeProfit object in params* containing the triggerPrice at which the attached take profit order will be triggered
5732
+ * @param {float} [params.takeProfit.triggerPrice] take profit trigger price
5733
+ * @param {object} [params.stopLoss] *stopLoss object in params* containing the triggerPrice at which the attached stop loss order will be triggered
5734
+ * @param {float} [params.stopLoss.triggerPrice] stop loss trigger price
5735
+ *
5736
+ * EXCHANGE SPECIFIC PARAMETERS
5737
+ * @param {string} [params.cancelClientOrderID] the user-defined id of the order to be canceled, 1-40 characters, different orders cannot use the same clientOrderID, only supports a query range of 2 hours
5738
+ * @param {string} [params.cancelRestrictions] cancel orders with specified status, NEW: New order, PENDING: Pending order, PARTIALLY_FILLED: Partially filled
5739
+ * @param {string} [params.cancelReplaceMode] STOP_ON_FAILURE - if the cancel order fails, it will not continue to place a new order, ALLOW_FAILURE - regardless of whether the cancel order succeeds or fails, it will continue to place a new order
5740
+ * @param {float} [params.quoteOrderQty] order amount
5741
+ * @param {string} [params.newClientOrderId] custom order id consisting of letters, numbers, and _, 1-40 characters, different orders cannot use the same newClientOrderId.
5742
+ * @param {string} [params.positionSide] *contract only* position direction, required for single position as BOTH, for both long and short positions only LONG or SHORT can be chosen, defaults to LONG if empty
5743
+ * @param {string} [params.reduceOnly] *contract only* true or false, default=false for single position mode. this parameter is not accepted for both long and short positions mode
5744
+ * @param {float} [params.priceRate] *contract only* for type TRAILING_STOP_Market or TRAILING_TP_SL, Max = 1
5745
+ * @param {string} [params.workingType] *contract only* StopPrice trigger price types, MARK_PRICE (default), CONTRACT_PRICE, or INDEX_PRICE
5746
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
5747
+ */
5717
5748
  async editOrder(id, symbol, type, side, amount = undefined, price = undefined, params = {}) {
5718
- /**
5719
- * @method
5720
- * @name bingx#editOrder
5721
- * @description cancels an order and places a new order
5722
- * @see https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Cancel%20order%20and%20place%20a%20new%20order // spot
5723
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Cancel%20an%20order%20and%20then%20Place%20a%20new%20order // swap
5724
- * @param {string} id order id
5725
- * @param {string} symbol unified symbol of the market to create an order in
5726
- * @param {string} type 'market' or 'limit'
5727
- * @param {string} side 'buy' or 'sell'
5728
- * @param {float} amount how much of the currency you want to trade in units of the base currency
5729
- * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
5730
- * @param {object} [params] extra parameters specific to the exchange API endpoint
5731
- * @param {string} [params.stopPrice] Trigger price used for TAKE_STOP_LIMIT, TAKE_STOP_MARKET, TRIGGER_LIMIT, TRIGGER_MARKET order types.
5732
- * @param {object} [params.takeProfit] *takeProfit object in params* containing the triggerPrice at which the attached take profit order will be triggered
5733
- * @param {float} [params.takeProfit.triggerPrice] take profit trigger price
5734
- * @param {object} [params.stopLoss] *stopLoss object in params* containing the triggerPrice at which the attached stop loss order will be triggered
5735
- * @param {float} [params.stopLoss.triggerPrice] stop loss trigger price
5736
- *
5737
- * EXCHANGE SPECIFIC PARAMETERS
5738
- * @param {string} [params.cancelClientOrderID] the user-defined id of the order to be canceled, 1-40 characters, different orders cannot use the same clientOrderID, only supports a query range of 2 hours
5739
- * @param {string} [params.cancelRestrictions] cancel orders with specified status, NEW: New order, PENDING: Pending order, PARTIALLY_FILLED: Partially filled
5740
- * @param {string} [params.cancelReplaceMode] STOP_ON_FAILURE - if the cancel order fails, it will not continue to place a new order, ALLOW_FAILURE - regardless of whether the cancel order succeeds or fails, it will continue to place a new order
5741
- * @param {float} [params.quoteOrderQty] order amount
5742
- * @param {string} [params.newClientOrderId] custom order id consisting of letters, numbers, and _, 1-40 characters, different orders cannot use the same newClientOrderId.
5743
- * @param {string} [params.positionSide] *contract only* position direction, required for single position as BOTH, for both long and short positions only LONG or SHORT can be chosen, defaults to LONG if empty
5744
- * @param {string} [params.reduceOnly] *contract only* true or false, default=false for single position mode. this parameter is not accepted for both long and short positions mode
5745
- * @param {float} [params.priceRate] *contract only* for type TRAILING_STOP_Market or TRAILING_TP_SL, Max = 1
5746
- * @param {string} [params.workingType] *contract only* StopPrice trigger price types, MARK_PRICE (default), CONTRACT_PRICE, or INDEX_PRICE
5747
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
5748
- */
5749
5749
  await this.loadMarkets();
5750
5750
  const market = this.market(symbol);
5751
5751
  const request = this.createOrderRequest(symbol, type, side, amount, price, params);
@@ -5852,17 +5852,17 @@ class bingx extends bingx$1 {
5852
5852
  const data = this.safeDict(response, 'data');
5853
5853
  return this.parseOrder(data, market);
5854
5854
  }
5855
+ /**
5856
+ * @method
5857
+ * @name bingx#fetchMarginMode
5858
+ * @description fetches the margin mode of the trading pair
5859
+ * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Query%20Margin%20Type
5860
+ * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Query%20Margin%20Type
5861
+ * @param {string} symbol unified symbol of the market to fetch the margin mode for
5862
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
5863
+ * @returns {object} a [margin mode structure]{@link https://docs.ccxt.com/#/?id=margin-mode-structure}
5864
+ */
5855
5865
  async fetchMarginMode(symbol, params = {}) {
5856
- /**
5857
- * @method
5858
- * @name bingx#fetchMarginMode
5859
- * @description fetches the margin mode of the trading pair
5860
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Query%20Margin%20Type
5861
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Query%20Margin%20Type
5862
- * @param {string} symbol unified symbol of the market to fetch the margin mode for
5863
- * @param {object} [params] extra parameters specific to the exchange API endpoint
5864
- * @returns {object} a [margin mode structure]{@link https://docs.ccxt.com/#/?id=margin-mode-structure}
5865
- */
5866
5866
  await this.loadMarkets();
5867
5867
  const market = this.market(symbol);
5868
5868
  const request = {
@@ -5910,18 +5910,18 @@ class bingx extends bingx$1 {
5910
5910
  'marginMode': marginType,
5911
5911
  };
5912
5912
  }
5913
+ /**
5914
+ * @method
5915
+ * @name bingx#fetchTradingFee
5916
+ * @description fetch the trading fees for a market
5917
+ * @see https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Query%20Trading%20Commission%20Rate
5918
+ * @see https://bingx-api.github.io/docs/#/en-us/swapV2/account-api.html#Query%20Trading%20Commission%20Rate
5919
+ * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Query%20Trade%20Commission%20Rate
5920
+ * @param {string} symbol unified market symbol
5921
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
5922
+ * @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
5923
+ */
5913
5924
  async fetchTradingFee(symbol, params = {}) {
5914
- /**
5915
- * @method
5916
- * @name bingx#fetchTradingFee
5917
- * @description fetch the trading fees for a market
5918
- * @see https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Query%20Trading%20Commission%20Rate
5919
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/account-api.html#Query%20Trading%20Commission%20Rate
5920
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Query%20Trade%20Commission%20Rate
5921
- * @param {string} symbol unified market symbol
5922
- * @param {object} [params] extra parameters specific to the exchange API endpoint
5923
- * @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
5924
- */
5925
5925
  await this.loadMarkets();
5926
5926
  const market = this.market(symbol);
5927
5927
  const request = {