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
@@ -200,34 +200,34 @@ export default class binance extends binanceRest {
200
200
  }
201
201
  return stream;
202
202
  }
203
+ /**
204
+ * @method
205
+ * @name binance#watchLiquidations
206
+ * @description watch the public liquidations of a trading pair
207
+ * @see https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/Liquidation-Order-Streams
208
+ * @see https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/Liquidation-Order-Streams
209
+ * @param {string} symbol unified CCXT market symbol
210
+ * @param {int} [since] the earliest time in ms to fetch liquidations for
211
+ * @param {int} [limit] the maximum number of liquidation structures to retrieve
212
+ * @param {object} [params] exchange specific parameters for the bitmex api endpoint
213
+ * @returns {object} an array of [liquidation structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#liquidation-structure}
214
+ */
203
215
  async watchLiquidations(symbol, since = undefined, limit = undefined, params = {}) {
204
- /**
205
- * @method
206
- * @name binance#watchLiquidations
207
- * @description watch the public liquidations of a trading pair
208
- * @see https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/Liquidation-Order-Streams
209
- * @see https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/Liquidation-Order-Streams
210
- * @param {string} symbol unified CCXT market symbol
211
- * @param {int} [since] the earliest time in ms to fetch liquidations for
212
- * @param {int} [limit] the maximum number of liquidation structures to retrieve
213
- * @param {object} [params] exchange specific parameters for the bitmex api endpoint
214
- * @returns {object} an array of [liquidation structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#liquidation-structure}
215
- */
216
216
  return await this.watchLiquidationsForSymbols([symbol], since, limit, params);
217
217
  }
218
+ /**
219
+ * @method
220
+ * @name binance#watchLiquidationsForSymbols
221
+ * @description watch the public liquidations of a trading pair
222
+ * @see https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/All-Market-Liquidation-Order-Streams
223
+ * @see https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/All-Market-Liquidation-Order-Streams
224
+ * @param {string[]} symbols list of unified market symbols
225
+ * @param {int} [since] the earliest time in ms to fetch liquidations for
226
+ * @param {int} [limit] the maximum number of liquidation structures to retrieve
227
+ * @param {object} [params] exchange specific parameters for the bitmex api endpoint
228
+ * @returns {object} an array of [liquidation structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#liquidation-structure}
229
+ */
218
230
  async watchLiquidationsForSymbols(symbols = undefined, since = undefined, limit = undefined, params = {}) {
219
- /**
220
- * @method
221
- * @name binance#watchLiquidationsForSymbols
222
- * @description watch the public liquidations of a trading pair
223
- * @see https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/All-Market-Liquidation-Order-Streams
224
- * @see https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/All-Market-Liquidation-Order-Streams
225
- * @param {string} symbol unified CCXT market symbol
226
- * @param {int} [since] the earliest time in ms to fetch liquidations for
227
- * @param {int} [limit] the maximum number of liquidation structures to retrieve
228
- * @param {object} [params] exchange specific parameters for the bitmex api endpoint
229
- * @returns {object} an array of [liquidation structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#liquidation-structure}
230
- */
231
231
  await this.loadMarkets();
232
232
  const subscriptionHashes = [];
233
233
  const messageHashes = [];
@@ -421,34 +421,34 @@ export default class binance extends binanceRest {
421
421
  'datetime': this.iso8601(timestamp),
422
422
  });
423
423
  }
424
+ /**
425
+ * @method
426
+ * @name binance#watchMyLiquidations
427
+ * @description watch the private liquidations of a trading pair
428
+ * @see https://developers.binance.com/docs/derivatives/usds-margined-futures/user-data-streams/Event-Order-Update
429
+ * @see https://developers.binance.com/docs/derivatives/coin-margined-futures/user-data-streams/Event-Order-Update
430
+ * @param {string} symbol unified CCXT market symbol
431
+ * @param {int} [since] the earliest time in ms to fetch liquidations for
432
+ * @param {int} [limit] the maximum number of liquidation structures to retrieve
433
+ * @param {object} [params] exchange specific parameters for the bitmex api endpoint
434
+ * @returns {object} an array of [liquidation structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#liquidation-structure}
435
+ */
424
436
  async watchMyLiquidations(symbol, since = undefined, limit = undefined, params = {}) {
425
- /**
426
- * @method
427
- * @name binance#watchMyLiquidations
428
- * @description watch the private liquidations of a trading pair
429
- * @see https://developers.binance.com/docs/derivatives/usds-margined-futures/user-data-streams/Event-Order-Update
430
- * @see https://developers.binance.com/docs/derivatives/coin-margined-futures/user-data-streams/Event-Order-Update
431
- * @param {string} symbol unified CCXT market symbol
432
- * @param {int} [since] the earliest time in ms to fetch liquidations for
433
- * @param {int} [limit] the maximum number of liquidation structures to retrieve
434
- * @param {object} [params] exchange specific parameters for the bitmex api endpoint
435
- * @returns {object} an array of [liquidation structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#liquidation-structure}
436
- */
437
437
  return this.watchMyLiquidationsForSymbols([symbol], since, limit, params);
438
438
  }
439
+ /**
440
+ * @method
441
+ * @name binance#watchMyLiquidationsForSymbols
442
+ * @description watch the private liquidations of a trading pair
443
+ * @see https://developers.binance.com/docs/derivatives/usds-margined-futures/user-data-streams/Event-Order-Update
444
+ * @see https://developers.binance.com/docs/derivatives/coin-margined-futures/user-data-streams/Event-Order-Update
445
+ * @param {string[]} symbols list of unified market symbols
446
+ * @param {int} [since] the earliest time in ms to fetch liquidations for
447
+ * @param {int} [limit] the maximum number of liquidation structures to retrieve
448
+ * @param {object} [params] exchange specific parameters for the bitmex api endpoint
449
+ * @returns {object} an array of [liquidation structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#liquidation-structure}
450
+ */
439
451
  async watchMyLiquidationsForSymbols(symbols, since = undefined, limit = undefined, params = {}) {
440
- /**
441
- * @method
442
- * @name binance#watchMyLiquidationsForSymbols
443
- * @description watch the private liquidations of a trading pair
444
- * @see https://developers.binance.com/docs/derivatives/usds-margined-futures/user-data-streams/Event-Order-Update
445
- * @see https://developers.binance.com/docs/derivatives/coin-margined-futures/user-data-streams/Event-Order-Update
446
- * @param {string} symbol unified CCXT market symbol
447
- * @param {int} [since] the earliest time in ms to fetch liquidations for
448
- * @param {int} [limit] the maximum number of liquidation structures to retrieve
449
- * @param {object} [params] exchange specific parameters for the bitmex api endpoint
450
- * @returns {object} an array of [liquidation structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#liquidation-structure}
451
- */
452
452
  await this.loadMarkets();
453
453
  symbols = this.marketSymbols(symbols, undefined, true, true, true);
454
454
  const market = this.getMarketFromSymbols(symbols);
@@ -541,22 +541,22 @@ export default class binance extends binanceRest {
541
541
  client.resolve([liquidation], 'myLiquidations');
542
542
  client.resolve([liquidation], 'myLiquidations::' + symbol);
543
543
  }
544
+ /**
545
+ * @method
546
+ * @name binance#watchOrderBook
547
+ * @see https://binance-docs.github.io/apidocs/spot/en/#partial-book-depth-streams
548
+ * @see https://binance-docs.github.io/apidocs/spot/en/#diff-depth-stream
549
+ * @see https://binance-docs.github.io/apidocs/futures/en/#partial-book-depth-streams
550
+ * @see https://binance-docs.github.io/apidocs/futures/en/#diff-book-depth-streams
551
+ * @see https://binance-docs.github.io/apidocs/delivery/en/#partial-book-depth-streams
552
+ * @see https://binance-docs.github.io/apidocs/delivery/en/#diff-book-depth-streams
553
+ * @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
554
+ * @param {string} symbol unified symbol of the market to fetch the order book for
555
+ * @param {int} [limit] the maximum amount of order book entries to return
556
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
557
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
558
+ */
544
559
  async watchOrderBook(symbol, limit = undefined, params = {}) {
545
- /**
546
- * @method
547
- * @name binance#watchOrderBook
548
- * @see https://binance-docs.github.io/apidocs/spot/en/#partial-book-depth-streams
549
- * @see https://binance-docs.github.io/apidocs/spot/en/#diff-depth-stream
550
- * @see https://binance-docs.github.io/apidocs/futures/en/#partial-book-depth-streams
551
- * @see https://binance-docs.github.io/apidocs/futures/en/#diff-book-depth-streams
552
- * @see https://binance-docs.github.io/apidocs/delivery/en/#partial-book-depth-streams
553
- * @see https://binance-docs.github.io/apidocs/delivery/en/#diff-book-depth-streams
554
- * @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
555
- * @param {string} symbol unified symbol of the market to fetch the order book for
556
- * @param {int} [limit] the maximum amount of order book entries to return
557
- * @param {object} [params] extra parameters specific to the exchange API endpoint
558
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
559
- */
560
560
  //
561
561
  // todo add support for <levels>-snapshots (depth)
562
562
  // https://github.com/binance-exchange/binance-official-api-docs/blob/master/web-socket-streams.md#partial-book-depth-streams // <symbol>@depth<levels>@100ms or <symbol>@depth<levels> (1000ms)
@@ -596,22 +596,22 @@ export default class binance extends binanceRest {
596
596
  //
597
597
  return await this.watchOrderBookForSymbols([symbol], limit, params);
598
598
  }
599
+ /**
600
+ * @method
601
+ * @name binance#watchOrderBookForSymbols
602
+ * @see https://binance-docs.github.io/apidocs/spot/en/#partial-book-depth-streams
603
+ * @see https://binance-docs.github.io/apidocs/spot/en/#diff-depth-stream
604
+ * @see https://binance-docs.github.io/apidocs/futures/en/#partial-book-depth-streams
605
+ * @see https://binance-docs.github.io/apidocs/futures/en/#diff-book-depth-streams
606
+ * @see https://binance-docs.github.io/apidocs/delivery/en/#partial-book-depth-streams
607
+ * @see https://binance-docs.github.io/apidocs/delivery/en/#diff-book-depth-streams
608
+ * @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
609
+ * @param {string[]} symbols unified array of symbols
610
+ * @param {int} [limit] the maximum amount of order book entries to return
611
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
612
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
613
+ */
599
614
  async watchOrderBookForSymbols(symbols, limit = undefined, params = {}) {
600
- /**
601
- * @method
602
- * @name binance#watchOrderBookForSymbols
603
- * @see https://binance-docs.github.io/apidocs/spot/en/#partial-book-depth-streams
604
- * @see https://binance-docs.github.io/apidocs/spot/en/#diff-depth-stream
605
- * @see https://binance-docs.github.io/apidocs/futures/en/#partial-book-depth-streams
606
- * @see https://binance-docs.github.io/apidocs/futures/en/#diff-book-depth-streams
607
- * @see https://binance-docs.github.io/apidocs/delivery/en/#partial-book-depth-streams
608
- * @see https://binance-docs.github.io/apidocs/delivery/en/#diff-book-depth-streams
609
- * @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
610
- * @param {string[]} symbols unified array of symbols
611
- * @param {int} [limit] the maximum amount of order book entries to return
612
- * @param {object} [params] extra parameters specific to the exchange API endpoint
613
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
614
- */
615
615
  await this.loadMarkets();
616
616
  symbols = this.marketSymbols(symbols, undefined, false, true, true);
617
617
  const firstMarket = this.market(symbols[0]);
@@ -659,21 +659,21 @@ export default class binance extends binanceRest {
659
659
  const orderbook = await this.watchMultiple(url, messageHashes, this.extend(request, params), messageHashes, subscription);
660
660
  return orderbook.limit();
661
661
  }
662
+ /**
663
+ * @method
664
+ * @name binance#unWatchOrderBookForSymbols
665
+ * @see https://binance-docs.github.io/apidocs/spot/en/#partial-book-depth-streams
666
+ * @see https://binance-docs.github.io/apidocs/spot/en/#diff-depth-stream
667
+ * @see https://binance-docs.github.io/apidocs/futures/en/#partial-book-depth-streams
668
+ * @see https://binance-docs.github.io/apidocs/futures/en/#diff-book-depth-streams
669
+ * @see https://binance-docs.github.io/apidocs/delivery/en/#partial-book-depth-streams
670
+ * @see https://binance-docs.github.io/apidocs/delivery/en/#diff-book-depth-streams
671
+ * @description unWatches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
672
+ * @param {string[]} symbols unified array of symbols
673
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
674
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
675
+ */
662
676
  async unWatchOrderBookForSymbols(symbols, params = {}) {
663
- /**
664
- * @method
665
- * @name binance#unWatchOrderBookForSymbols
666
- * @see https://binance-docs.github.io/apidocs/spot/en/#partial-book-depth-streams
667
- * @see https://binance-docs.github.io/apidocs/spot/en/#diff-depth-stream
668
- * @see https://binance-docs.github.io/apidocs/futures/en/#partial-book-depth-streams
669
- * @see https://binance-docs.github.io/apidocs/futures/en/#diff-book-depth-streams
670
- * @see https://binance-docs.github.io/apidocs/delivery/en/#partial-book-depth-streams
671
- * @see https://binance-docs.github.io/apidocs/delivery/en/#diff-book-depth-streams
672
- * @description unWatches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
673
- * @param {string[]} symbols unified array of symbols
674
- * @param {object} [params] extra parameters specific to the exchange API endpoint
675
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
676
- */
677
677
  await this.loadMarkets();
678
678
  symbols = this.marketSymbols(symbols, undefined, false, true, true);
679
679
  const firstMarket = this.market(symbols[0]);
@@ -717,35 +717,35 @@ export default class binance extends binanceRest {
717
717
  };
718
718
  return await this.watchMultiple(url, messageHashes, this.extend(request, params), messageHashes, subscription);
719
719
  }
720
+ /**
721
+ * @method
722
+ * @name binance#unWatchOrderBook
723
+ * @see https://binance-docs.github.io/apidocs/spot/en/#partial-book-depth-streams
724
+ * @see https://binance-docs.github.io/apidocs/spot/en/#diff-depth-stream
725
+ * @see https://binance-docs.github.io/apidocs/futures/en/#partial-book-depth-streams
726
+ * @see https://binance-docs.github.io/apidocs/futures/en/#diff-book-depth-streams
727
+ * @see https://binance-docs.github.io/apidocs/delivery/en/#partial-book-depth-streams
728
+ * @see https://binance-docs.github.io/apidocs/delivery/en/#diff-book-depth-streams
729
+ * @description unWatches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
730
+ * @param {string} symbol unified array of symbols
731
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
732
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
733
+ */
720
734
  async unWatchOrderBook(symbol, params = {}) {
721
- /**
722
- * @method
723
- * @name binance#unWatchOrderBook
724
- * @see https://binance-docs.github.io/apidocs/spot/en/#partial-book-depth-streams
725
- * @see https://binance-docs.github.io/apidocs/spot/en/#diff-depth-stream
726
- * @see https://binance-docs.github.io/apidocs/futures/en/#partial-book-depth-streams
727
- * @see https://binance-docs.github.io/apidocs/futures/en/#diff-book-depth-streams
728
- * @see https://binance-docs.github.io/apidocs/delivery/en/#partial-book-depth-streams
729
- * @see https://binance-docs.github.io/apidocs/delivery/en/#diff-book-depth-streams
730
- * @description unWatches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
731
- * @param {string} symbol unified array of symbols
732
- * @param {object} [params] extra parameters specific to the exchange API endpoint
733
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
734
- */
735
735
  return await this.unWatchOrderBookForSymbols([symbol], params);
736
736
  }
737
+ /**
738
+ * @method
739
+ * @name binance#fetchOrderBookWs
740
+ * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
741
+ * @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#order-book
742
+ * @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/websocket-api/Order-Book
743
+ * @param {string} symbol unified symbol of the market to fetch the order book for
744
+ * @param {int} [limit] the maximum amount of order book entries to return
745
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
746
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
747
+ */
737
748
  async fetchOrderBookWs(symbol, limit = undefined, params = {}) {
738
- /**
739
- * @method
740
- * @name binance#fetchOrderBookWs
741
- * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
742
- * @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#order-book
743
- * @see https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/websocket-api/Order-Book
744
- * @param {string} symbol unified symbol of the market to fetch the order book for
745
- * @param {int} [limit] the maximum amount of order book entries to return
746
- * @param {object} [params] extra parameters specific to the exchange API endpoint
747
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
748
- */
749
749
  await this.loadMarkets();
750
750
  const market = this.market(symbol);
751
751
  const payload = {
@@ -1037,22 +1037,22 @@ export default class binance extends binanceRest {
1037
1037
  }
1038
1038
  this.cleanCache(subscription);
1039
1039
  }
1040
+ /**
1041
+ * @method
1042
+ * @name binance#watchTradesForSymbols
1043
+ * @description get the list of most recent trades for a list of symbols
1044
+ * @see https://binance-docs.github.io/apidocs/spot/en/#aggregate-trade-streams
1045
+ * @see https://binance-docs.github.io/apidocs/spot/en/#trade-streams
1046
+ * @see https://binance-docs.github.io/apidocs/futures/en/#aggregate-trade-streams
1047
+ * @see https://binance-docs.github.io/apidocs/delivery/en/#aggregate-trade-streams
1048
+ * @param {string[]} symbols unified symbol of the market to fetch trades for
1049
+ * @param {int} [since] timestamp in ms of the earliest trade to fetch
1050
+ * @param {int} [limit] the maximum amount of trades to fetch
1051
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1052
+ * @param {string} [params.name] the name of the method to call, 'trade' or 'aggTrade', default is 'trade'
1053
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
1054
+ */
1040
1055
  async watchTradesForSymbols(symbols, since = undefined, limit = undefined, params = {}) {
1041
- /**
1042
- * @method
1043
- * @name binance#watchTradesForSymbols
1044
- * @description get the list of most recent trades for a list of symbols
1045
- * @see https://binance-docs.github.io/apidocs/spot/en/#aggregate-trade-streams
1046
- * @see https://binance-docs.github.io/apidocs/spot/en/#trade-streams
1047
- * @see https://binance-docs.github.io/apidocs/futures/en/#aggregate-trade-streams
1048
- * @see https://binance-docs.github.io/apidocs/delivery/en/#aggregate-trade-streams
1049
- * @param {string[]} symbols unified symbol of the market to fetch trades for
1050
- * @param {int} [since] timestamp in ms of the earliest trade to fetch
1051
- * @param {int} [limit] the maximum amount of trades to fetch
1052
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1053
- * @param {string} [params.name] the name of the method to call, 'trade' or 'aggTrade', default is 'trade'
1054
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
1055
- */
1056
1056
  await this.loadMarkets();
1057
1057
  symbols = this.marketSymbols(symbols, undefined, false, true, true);
1058
1058
  let streamHash = 'multipleTrades';
@@ -1100,20 +1100,20 @@ export default class binance extends binanceRest {
1100
1100
  }
1101
1101
  return this.filterBySinceLimit(trades, since, limit, 'timestamp', true);
1102
1102
  }
1103
+ /**
1104
+ * @method
1105
+ * @name binance#unWatchTradesForSymbols
1106
+ * @description unsubscribes from the trades channel
1107
+ * @see https://binance-docs.github.io/apidocs/spot/en/#aggregate-trade-streams
1108
+ * @see https://binance-docs.github.io/apidocs/spot/en/#trade-streams
1109
+ * @see https://binance-docs.github.io/apidocs/futures/en/#aggregate-trade-streams
1110
+ * @see https://binance-docs.github.io/apidocs/delivery/en/#aggregate-trade-streams
1111
+ * @param {string[]} symbols unified symbol of the market to fetch trades for
1112
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1113
+ * @param {string} [params.name] the name of the method to call, 'trade' or 'aggTrade', default is 'trade'
1114
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
1115
+ */
1103
1116
  async unWatchTradesForSymbols(symbols, params = {}) {
1104
- /**
1105
- * @method
1106
- * @name binance#unWatchTradesForSymbols
1107
- * @description unsubscribes from the trades channel
1108
- * @see https://binance-docs.github.io/apidocs/spot/en/#aggregate-trade-streams
1109
- * @see https://binance-docs.github.io/apidocs/spot/en/#trade-streams
1110
- * @see https://binance-docs.github.io/apidocs/futures/en/#aggregate-trade-streams
1111
- * @see https://binance-docs.github.io/apidocs/delivery/en/#aggregate-trade-streams
1112
- * @param {string[]} symbols unified symbol of the market to fetch trades for
1113
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1114
- * @param {string} [params.name] the name of the method to call, 'trade' or 'aggTrade', default is 'trade'
1115
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
1116
- */
1117
1117
  await this.loadMarkets();
1118
1118
  symbols = this.marketSymbols(symbols, undefined, false, true, true);
1119
1119
  let streamHash = 'multipleTrades';
@@ -1162,39 +1162,39 @@ export default class binance extends binanceRest {
1162
1162
  };
1163
1163
  return await this.watchMultiple(url, messageHashes, this.extend(request, query), messageHashes, subscription);
1164
1164
  }
1165
+ /**
1166
+ * @method
1167
+ * @name binance#unWatchTrades
1168
+ * @description unsubscribes from the trades channel
1169
+ * @see https://binance-docs.github.io/apidocs/spot/en/#aggregate-trade-streams
1170
+ * @see https://binance-docs.github.io/apidocs/spot/en/#trade-streams
1171
+ * @see https://binance-docs.github.io/apidocs/futures/en/#aggregate-trade-streams
1172
+ * @see https://binance-docs.github.io/apidocs/delivery/en/#aggregate-trade-streams
1173
+ * @param {string} symbol unified symbol of the market to fetch trades for
1174
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1175
+ * @param {string} [params.name] the name of the method to call, 'trade' or 'aggTrade', default is 'trade'
1176
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
1177
+ */
1165
1178
  async unWatchTrades(symbol, params = {}) {
1166
- /**
1167
- * @method
1168
- * @name binance#unWatchTrades
1169
- * @description unsubscribes from the trades channel
1170
- * @see https://binance-docs.github.io/apidocs/spot/en/#aggregate-trade-streams
1171
- * @see https://binance-docs.github.io/apidocs/spot/en/#trade-streams
1172
- * @see https://binance-docs.github.io/apidocs/futures/en/#aggregate-trade-streams
1173
- * @see https://binance-docs.github.io/apidocs/delivery/en/#aggregate-trade-streams
1174
- * @param {string} symbol unified symbol of the market to fetch trades for
1175
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1176
- * @param {string} [params.name] the name of the method to call, 'trade' or 'aggTrade', default is 'trade'
1177
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
1178
- */
1179
1179
  await this.loadMarkets();
1180
1180
  return await this.unWatchTradesForSymbols([symbol], params);
1181
1181
  }
1182
+ /**
1183
+ * @method
1184
+ * @name binance#watchTrades
1185
+ * @description get the list of most recent trades for a particular symbol
1186
+ * @see https://binance-docs.github.io/apidocs/spot/en/#aggregate-trade-streams
1187
+ * @see https://binance-docs.github.io/apidocs/spot/en/#trade-streams
1188
+ * @see https://binance-docs.github.io/apidocs/futures/en/#aggregate-trade-streams
1189
+ * @see https://binance-docs.github.io/apidocs/delivery/en/#aggregate-trade-streams
1190
+ * @param {string} symbol unified symbol of the market to fetch trades for
1191
+ * @param {int} [since] timestamp in ms of the earliest trade to fetch
1192
+ * @param {int} [limit] the maximum amount of trades to fetch
1193
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1194
+ * @param {string} [params.name] the name of the method to call, 'trade' or 'aggTrade', default is 'trade'
1195
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
1196
+ */
1182
1197
  async watchTrades(symbol, since = undefined, limit = undefined, params = {}) {
1183
- /**
1184
- * @method
1185
- * @name binance#watchTrades
1186
- * @description get the list of most recent trades for a particular symbol
1187
- * @see https://binance-docs.github.io/apidocs/spot/en/#aggregate-trade-streams
1188
- * @see https://binance-docs.github.io/apidocs/spot/en/#trade-streams
1189
- * @see https://binance-docs.github.io/apidocs/futures/en/#aggregate-trade-streams
1190
- * @see https://binance-docs.github.io/apidocs/delivery/en/#aggregate-trade-streams
1191
- * @param {string} symbol unified symbol of the market to fetch trades for
1192
- * @param {int} [since] timestamp in ms of the earliest trade to fetch
1193
- * @param {int} [limit] the maximum amount of trades to fetch
1194
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1195
- * @param {string} [params.name] the name of the method to call, 'trade' or 'aggTrade', default is 'trade'
1196
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
1197
- */
1198
1198
  params['callerMethodName'] = 'watchTrades';
1199
1199
  return await this.watchTradesForSymbols([symbol], since, limit, params);
1200
1200
  }
@@ -1379,22 +1379,22 @@ export default class binance extends binanceRest {
1379
1379
  this.trades[symbol] = tradesArray;
1380
1380
  client.resolve(tradesArray, messageHash);
1381
1381
  }
1382
+ /**
1383
+ * @method
1384
+ * @name binance#watchOHLCV
1385
+ * @description watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
1386
+ * @see https://binance-docs.github.io/apidocs/spot/en/#kline-candlestick-data
1387
+ * @see https://binance-docs.github.io/apidocs/futures/en/#kline-candlestick-data
1388
+ * @see https://binance-docs.github.io/apidocs/delivery/en/#kline-candlestick-data
1389
+ * @param {string} symbol unified symbol of the market to fetch OHLCV data for
1390
+ * @param {string} timeframe the length of time each candle represents
1391
+ * @param {int} [since] timestamp in ms of the earliest candle to fetch
1392
+ * @param {int} [limit] the maximum amount of candles to fetch
1393
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1394
+ * @param {object} [params.timezone] if provided, kline intervals are interpreted in that timezone instead of UTC, example '+08:00'
1395
+ * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
1396
+ */
1382
1397
  async watchOHLCV(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
1383
- /**
1384
- * @method
1385
- * @name binance#watchOHLCV
1386
- * @description watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
1387
- * @see https://binance-docs.github.io/apidocs/spot/en/#kline-candlestick-data
1388
- * @see https://binance-docs.github.io/apidocs/futures/en/#kline-candlestick-data
1389
- * @see https://binance-docs.github.io/apidocs/delivery/en/#kline-candlestick-data
1390
- * @param {string} symbol unified symbol of the market to fetch OHLCV data for
1391
- * @param {string} timeframe the length of time each candle represents
1392
- * @param {int} [since] timestamp in ms of the earliest candle to fetch
1393
- * @param {int} [limit] the maximum amount of candles to fetch
1394
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1395
- * @param {object} [params.timezone] if provided, kline intervals are interpreted in that timezone instead of UTC, example '+08:00'
1396
- * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
1397
- */
1398
1398
  await this.loadMarkets();
1399
1399
  const market = this.market(symbol);
1400
1400
  symbol = market['symbol'];
@@ -1402,21 +1402,21 @@ export default class binance extends binanceRest {
1402
1402
  const result = await this.watchOHLCVForSymbols([[symbol, timeframe]], since, limit, params);
1403
1403
  return result[symbol][timeframe];
1404
1404
  }
1405
+ /**
1406
+ * @method
1407
+ * @name binance#watchOHLCVForSymbols
1408
+ * @description watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
1409
+ * @see https://binance-docs.github.io/apidocs/spot/en/#kline-candlestick-data
1410
+ * @see https://binance-docs.github.io/apidocs/futures/en/#kline-candlestick-data
1411
+ * @see https://binance-docs.github.io/apidocs/delivery/en/#kline-candlestick-data
1412
+ * @param {string[][]} symbolsAndTimeframes array of arrays containing unified symbols and timeframes to fetch OHLCV data for, example [['BTC/USDT', '1m'], ['LTC/USDT', '5m']]
1413
+ * @param {int} [since] timestamp in ms of the earliest candle to fetch
1414
+ * @param {int} [limit] the maximum amount of candles to fetch
1415
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1416
+ * @param {object} [params.timezone] if provided, kline intervals are interpreted in that timezone instead of UTC, example '+08:00'
1417
+ * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
1418
+ */
1405
1419
  async watchOHLCVForSymbols(symbolsAndTimeframes, since = undefined, limit = undefined, params = {}) {
1406
- /**
1407
- * @method
1408
- * @name binance#watchOHLCVForSymbols
1409
- * @description watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
1410
- * @see https://binance-docs.github.io/apidocs/spot/en/#kline-candlestick-data
1411
- * @see https://binance-docs.github.io/apidocs/futures/en/#kline-candlestick-data
1412
- * @see https://binance-docs.github.io/apidocs/delivery/en/#kline-candlestick-data
1413
- * @param {string[][]} symbolsAndTimeframes array of arrays containing unified symbols and timeframes to fetch OHLCV data for, example [['BTC/USDT', '1m'], ['LTC/USDT', '5m']]
1414
- * @param {int} [since] timestamp in ms of the earliest candle to fetch
1415
- * @param {int} [limit] the maximum amount of candles to fetch
1416
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1417
- * @param {object} [params.timezone] if provided, kline intervals are interpreted in that timezone instead of UTC, example '+08:00'
1418
- * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
1419
- */
1420
1420
  await this.loadMarkets();
1421
1421
  let klineType = undefined;
1422
1422
  [klineType, params] = this.handleParamString2(params, 'channel', 'name', 'kline');
@@ -1468,19 +1468,19 @@ export default class binance extends binanceRest {
1468
1468
  const filtered = this.filterBySinceLimit(candles, since, limit, 0, true);
1469
1469
  return this.createOHLCVObject(symbol, timeframe, filtered);
1470
1470
  }
1471
+ /**
1472
+ * @method
1473
+ * @name binance#unWatchOHLCVForSymbols
1474
+ * @description unWatches historical candlestick data containing the open, high, low, and close price, and the volume of a market
1475
+ * @see https://binance-docs.github.io/apidocs/spot/en/#kline-candlestick-data
1476
+ * @see https://binance-docs.github.io/apidocs/futures/en/#kline-candlestick-data
1477
+ * @see https://binance-docs.github.io/apidocs/delivery/en/#kline-candlestick-data
1478
+ * @param {string[][]} symbolsAndTimeframes array of arrays containing unified symbols and timeframes to fetch OHLCV data for, example [['BTC/USDT', '1m'], ['LTC/USDT', '5m']]
1479
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1480
+ * @param {object} [params.timezone] if provided, kline intervals are interpreted in that timezone instead of UTC, example '+08:00'
1481
+ * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
1482
+ */
1471
1483
  async unWatchOHLCVForSymbols(symbolsAndTimeframes, params = {}) {
1472
- /**
1473
- * @method
1474
- * @name binance#unWatchOHLCVForSymbols
1475
- * @description unWatches historical candlestick data containing the open, high, low, and close price, and the volume of a market
1476
- * @see https://binance-docs.github.io/apidocs/spot/en/#kline-candlestick-data
1477
- * @see https://binance-docs.github.io/apidocs/futures/en/#kline-candlestick-data
1478
- * @see https://binance-docs.github.io/apidocs/delivery/en/#kline-candlestick-data
1479
- * @param {string[][]} symbolsAndTimeframes array of arrays containing unified symbols and timeframes to fetch OHLCV data for, example [['BTC/USDT', '1m'], ['LTC/USDT', '5m']]
1480
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1481
- * @param {object} [params.timezone] if provided, kline intervals are interpreted in that timezone instead of UTC, example '+08:00'
1482
- * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
1483
- */
1484
1484
  await this.loadMarkets();
1485
1485
  let klineType = undefined;
1486
1486
  [klineType, params] = this.handleParamString2(params, 'channel', 'name', 'kline');
@@ -1535,20 +1535,20 @@ export default class binance extends binanceRest {
1535
1535
  params = this.omit(params, 'callerMethodName');
1536
1536
  return await this.watchMultiple(url, messageHashes, this.extend(request, params), messageHashes, subscribe);
1537
1537
  }
1538
+ /**
1539
+ * @method
1540
+ * @name binance#unWatchOHLCV
1541
+ * @description unWatches historical candlestick data containing the open, high, low, and close price, and the volume of a market
1542
+ * @see https://binance-docs.github.io/apidocs/spot/en/#kline-candlestick-data
1543
+ * @see https://binance-docs.github.io/apidocs/futures/en/#kline-candlestick-data
1544
+ * @see https://binance-docs.github.io/apidocs/delivery/en/#kline-candlestick-data
1545
+ * @param {string} symbol unified symbol of the market to fetch OHLCV data for
1546
+ * @param {string} timeframe the length of time each candle represents
1547
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1548
+ * @param {object} [params.timezone] if provided, kline intervals are interpreted in that timezone instead of UTC, example '+08:00'
1549
+ * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
1550
+ */
1538
1551
  async unWatchOHLCV(symbol, timeframe = '1m', params = {}) {
1539
- /**
1540
- * @method
1541
- * @name binance#unWatchOHLCV
1542
- * @description unWatches historical candlestick data containing the open, high, low, and close price, and the volume of a market
1543
- * @see https://binance-docs.github.io/apidocs/spot/en/#kline-candlestick-data
1544
- * @see https://binance-docs.github.io/apidocs/futures/en/#kline-candlestick-data
1545
- * @see https://binance-docs.github.io/apidocs/delivery/en/#kline-candlestick-data
1546
- * @param {string} symbol unified symbol of the market to fetch OHLCV data for
1547
- * @param {string} timeframe the length of time each candle represents
1548
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1549
- * @param {object} [params.timezone] if provided, kline intervals are interpreted in that timezone instead of UTC, example '+08:00'
1550
- * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
1551
- */
1552
1552
  await this.loadMarkets();
1553
1553
  const market = this.market(symbol);
1554
1554
  symbol = market['symbol'];
@@ -1620,17 +1620,17 @@ export default class binance extends binanceRest {
1620
1620
  const resolveData = [symbol, unifiedTimeframe, stored];
1621
1621
  client.resolve(resolveData, messageHash);
1622
1622
  }
1623
+ /**
1624
+ * @method
1625
+ * @name binance#fetchTickerWs
1626
+ * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
1627
+ * @param {string} symbol unified symbol of the market to fetch the ticker for
1628
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1629
+ * @param {string} [params.method] method to use can be ticker.price or ticker.book
1630
+ * @param {boolean} [params.returnRateLimits] return the rate limits for the exchange
1631
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1632
+ */
1623
1633
  async fetchTickerWs(symbol, params = {}) {
1624
- /**
1625
- * @method
1626
- * @name binance#fetchTickerWs
1627
- * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
1628
- * @param {string} symbol unified symbol of the market to fetch the ticker for
1629
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1630
- * @param {string} [params.method] method to use can be ticker.price or ticker.book
1631
- * @param {boolean} [params.returnRateLimits] return the rate limits for the exchange
1632
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1633
- */
1634
1634
  await this.loadMarkets();
1635
1635
  const market = this.market(symbol);
1636
1636
  const payload = {
@@ -1660,23 +1660,23 @@ export default class binance extends binanceRest {
1660
1660
  const ticker = await this.watch(url, messageHash, message, messageHash, subscription);
1661
1661
  return ticker;
1662
1662
  }
1663
+ /**
1664
+ * @method
1665
+ * @name binance#fetchOHLCVWs
1666
+ * @description query historical candlestick data containing the open, high, low, and close price, and the volume of a market
1667
+ * @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#klines
1668
+ * @param {string} symbol unified symbol of the market to query OHLCV data for
1669
+ * @param {string} timeframe the length of time each candle represents
1670
+ * @param {int} since timestamp in ms of the earliest candle to fetch
1671
+ * @param {int} limit the maximum amount of candles to fetch
1672
+ * @param {object} params extra parameters specific to the exchange API endpoint
1673
+ * @param {int} params.until timestamp in ms of the earliest candle to fetch
1674
+ *
1675
+ * EXCHANGE SPECIFIC PARAMETERS
1676
+ * @param {string} params.timeZone default=0 (UTC)
1677
+ * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
1678
+ */
1663
1679
  async fetchOHLCVWs(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
1664
- /**
1665
- * @method
1666
- * @name binance#fetchOHLCVWs
1667
- * @description query historical candlestick data containing the open, high, low, and close price, and the volume of a market
1668
- * @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#klines
1669
- * @param {string} symbol unified symbol of the market to query OHLCV data for
1670
- * @param {string} timeframe the length of time each candle represents
1671
- * @param {int} since timestamp in ms of the earliest candle to fetch
1672
- * @param {int} limit the maximum amount of candles to fetch
1673
- * @param {object} params extra parameters specific to the exchange API endpoint
1674
- * @param {int} params.until timestamp in ms of the earliest candle to fetch
1675
- *
1676
- * EXCHANGE SPECIFIC PARAMETERS
1677
- * @param {string} params.timeZone default=0 (UTC)
1678
- * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
1679
- */
1680
1680
  await this.loadMarkets();
1681
1681
  const market = this.market(symbol);
1682
1682
  const marketType = this.getMarketType('fetchOHLCVWs', market, params);
@@ -1752,54 +1752,54 @@ export default class binance extends binanceRest {
1752
1752
  const messageHash = this.safeString(message, 'id');
1753
1753
  client.resolve(parsed, messageHash);
1754
1754
  }
1755
+ /**
1756
+ * @method
1757
+ * @name binance#watchTicker
1758
+ * @see https://binance-docs.github.io/apidocs/spot/en/#individual-symbol-mini-ticker-stream
1759
+ * @see https://binance-docs.github.io/apidocs/spot/en/#individual-symbol-ticker-streams
1760
+ * @see https://binance-docs.github.io/apidocs/futures/en/#all-market-mini-tickers-stream
1761
+ * @see https://binance-docs.github.io/apidocs/futures/en/#individual-symbol-ticker-streams
1762
+ * @see https://binance-docs.github.io/apidocs/delivery/en/#all-market-mini-tickers-stream
1763
+ * @see https://binance-docs.github.io/apidocs/delivery/en/#individual-symbol-ticker-streams
1764
+ * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
1765
+ * @param {string} symbol unified symbol of the market to fetch the ticker for
1766
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1767
+ * @param {string} [params.name] stream to use can be ticker or miniTicker
1768
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1769
+ */
1755
1770
  async watchTicker(symbol, params = {}) {
1756
- /**
1757
- * @method
1758
- * @name binance#watchTicker
1759
- * @see https://binance-docs.github.io/apidocs/spot/en/#individual-symbol-mini-ticker-stream
1760
- * @see https://binance-docs.github.io/apidocs/spot/en/#individual-symbol-ticker-streams
1761
- * @see https://binance-docs.github.io/apidocs/futures/en/#all-market-mini-tickers-stream
1762
- * @see https://binance-docs.github.io/apidocs/futures/en/#individual-symbol-ticker-streams
1763
- * @see https://binance-docs.github.io/apidocs/delivery/en/#all-market-mini-tickers-stream
1764
- * @see https://binance-docs.github.io/apidocs/delivery/en/#individual-symbol-ticker-streams
1765
- * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
1766
- * @param {string} symbol unified symbol of the market to fetch the ticker for
1767
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1768
- * @param {string} [params.name] stream to use can be ticker or miniTicker
1769
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1770
- */
1771
1771
  await this.loadMarkets();
1772
1772
  symbol = this.symbol(symbol);
1773
1773
  const tickers = await this.watchTickers([symbol], this.extend(params, { 'callerMethodName': 'watchTicker' }));
1774
1774
  return tickers[symbol];
1775
1775
  }
1776
+ /**
1777
+ * @method
1778
+ * @name binance#watchMarkPrice
1779
+ * @see https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/Mark-Price-Stream
1780
+ * @description watches a mark price for a specific market
1781
+ * @param {string} symbol unified symbol of the market to fetch the ticker for
1782
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1783
+ * @param {boolean} [params.use1sFreq] *default is true* if set to true, the mark price will be updated every second, otherwise every 3 seconds
1784
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1785
+ */
1776
1786
  async watchMarkPrice(symbol, params = {}) {
1777
- /**
1778
- * @method
1779
- * @name binance#watchMarkPrice
1780
- * @see https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/Mark-Price-Stream
1781
- * @description watches a mark price for a specific market
1782
- * @param {string} symbol unified symbol of the market to fetch the ticker for
1783
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1784
- * @param {boolean} [params.use1sFreq] *default is true* if set to true, the mark price will be updated every second, otherwise every 3 seconds
1785
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1786
- */
1787
1787
  await this.loadMarkets();
1788
1788
  symbol = this.symbol(symbol);
1789
1789
  const tickers = await this.watchMarkPrices([symbol], this.extend(params, { 'callerMethodName': 'watchMarkPrice' }));
1790
1790
  return tickers[symbol];
1791
1791
  }
1792
+ /**
1793
+ * @method
1794
+ * @name binance#watchMarkPrices
1795
+ * @see https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/Mark-Price-Stream-for-All-market
1796
+ * @description watches the mark price for all markets
1797
+ * @param {string[]} symbols unified symbol of the market to fetch the ticker for
1798
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1799
+ * @param {boolean} [params.use1sFreq] *default is true* if set to true, the mark price will be updated every second, otherwise every 3 seconds
1800
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1801
+ */
1792
1802
  async watchMarkPrices(symbols = undefined, params = {}) {
1793
- /**
1794
- * @method
1795
- * @name binance#watchMarkPrices
1796
- * @see https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/Mark-Price-Stream-for-All-market
1797
- * @description watches the mark price for all markets
1798
- * @param {string[]} symbols unified symbol of the market to fetch the ticker for
1799
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1800
- * @param {boolean} [params.use1sFreq] *default is true* if set to true, the mark price will be updated every second, otherwise every 3 seconds
1801
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1802
- */
1803
1803
  let channelName = undefined;
1804
1804
  // for now watchmarkPrice uses the same messageHash as watchTicker
1805
1805
  // so it's impossible to watch both at the same time
@@ -1811,21 +1811,21 @@ export default class binance extends binanceRest {
1811
1811
  }
1812
1812
  return this.filterByArray(this.tickers, 'symbol', symbols);
1813
1813
  }
1814
+ /**
1815
+ * @method
1816
+ * @name binance#watchTickers
1817
+ * @see https://binance-docs.github.io/apidocs/spot/en/#individual-symbol-mini-ticker-stream
1818
+ * @see https://binance-docs.github.io/apidocs/spot/en/#individual-symbol-ticker-streams
1819
+ * @see https://binance-docs.github.io/apidocs/futures/en/#all-market-mini-tickers-stream
1820
+ * @see https://binance-docs.github.io/apidocs/futures/en/#individual-symbol-ticker-streams
1821
+ * @see https://binance-docs.github.io/apidocs/delivery/en/#all-market-mini-tickers-stream
1822
+ * @see https://binance-docs.github.io/apidocs/delivery/en/#individual-symbol-ticker-streams
1823
+ * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
1824
+ * @param {string[]} symbols unified symbol of the market to fetch the ticker for
1825
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1826
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1827
+ */
1814
1828
  async watchTickers(symbols = undefined, params = {}) {
1815
- /**
1816
- * @method
1817
- * @name binance#watchTickers
1818
- * @see https://binance-docs.github.io/apidocs/spot/en/#individual-symbol-mini-ticker-stream
1819
- * @see https://binance-docs.github.io/apidocs/spot/en/#individual-symbol-ticker-streams
1820
- * @see https://binance-docs.github.io/apidocs/futures/en/#all-market-mini-tickers-stream
1821
- * @see https://binance-docs.github.io/apidocs/futures/en/#individual-symbol-ticker-streams
1822
- * @see https://binance-docs.github.io/apidocs/delivery/en/#all-market-mini-tickers-stream
1823
- * @see https://binance-docs.github.io/apidocs/delivery/en/#individual-symbol-ticker-streams
1824
- * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
1825
- * @param {string[]} symbols unified symbol of the market to fetch the ticker for
1826
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1827
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1828
- */
1829
1829
  let channelName = undefined;
1830
1830
  [channelName, params] = this.handleOptionAndParams(params, 'watchTickers', 'name', 'ticker');
1831
1831
  if (channelName === 'bookTicker') {
@@ -1837,21 +1837,21 @@ export default class binance extends binanceRest {
1837
1837
  }
1838
1838
  return this.filterByArray(this.tickers, 'symbol', symbols);
1839
1839
  }
1840
+ /**
1841
+ * @method
1842
+ * @name binance#unWatchTickers
1843
+ * @see https://binance-docs.github.io/apidocs/spot/en/#individual-symbol-mini-ticker-stream
1844
+ * @see https://binance-docs.github.io/apidocs/spot/en/#individual-symbol-ticker-streams
1845
+ * @see https://binance-docs.github.io/apidocs/futures/en/#all-market-mini-tickers-stream
1846
+ * @see https://binance-docs.github.io/apidocs/futures/en/#individual-symbol-ticker-streams
1847
+ * @see https://binance-docs.github.io/apidocs/delivery/en/#all-market-mini-tickers-stream
1848
+ * @see https://binance-docs.github.io/apidocs/delivery/en/#individual-symbol-ticker-streams
1849
+ * @description unWatches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
1850
+ * @param {string[]} symbols unified symbol of the market to fetch the ticker for
1851
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1852
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1853
+ */
1840
1854
  async unWatchTickers(symbols = undefined, params = {}) {
1841
- /**
1842
- * @method
1843
- * @name binance#unWatchTickers
1844
- * @see https://binance-docs.github.io/apidocs/spot/en/#individual-symbol-mini-ticker-stream
1845
- * @see https://binance-docs.github.io/apidocs/spot/en/#individual-symbol-ticker-streams
1846
- * @see https://binance-docs.github.io/apidocs/futures/en/#all-market-mini-tickers-stream
1847
- * @see https://binance-docs.github.io/apidocs/futures/en/#individual-symbol-ticker-streams
1848
- * @see https://binance-docs.github.io/apidocs/delivery/en/#all-market-mini-tickers-stream
1849
- * @see https://binance-docs.github.io/apidocs/delivery/en/#individual-symbol-ticker-streams
1850
- * @description unWatches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
1851
- * @param {string[]} symbols unified symbol of the market to fetch the ticker for
1852
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1853
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1854
- */
1855
1855
  let channelName = undefined;
1856
1856
  [channelName, params] = this.handleOptionAndParams(params, 'watchTickers', 'name', 'ticker');
1857
1857
  if (channelName === 'bookTicker') {
@@ -1929,35 +1929,35 @@ export default class binance extends binanceRest {
1929
1929
  };
1930
1930
  return await this.watchMultiple(url, subMessageHashes, this.extend(request, params), subMessageHashes, subscription);
1931
1931
  }
1932
+ /**
1933
+ * @method
1934
+ * @name binance#unWatchTicker
1935
+ * @see https://binance-docs.github.io/apidocs/spot/en/#individual-symbol-mini-ticker-stream
1936
+ * @see https://binance-docs.github.io/apidocs/spot/en/#individual-symbol-ticker-streams
1937
+ * @see https://binance-docs.github.io/apidocs/futures/en/#all-market-mini-tickers-stream
1938
+ * @see https://binance-docs.github.io/apidocs/futures/en/#individual-symbol-ticker-streams
1939
+ * @see https://binance-docs.github.io/apidocs/delivery/en/#all-market-mini-tickers-stream
1940
+ * @see https://binance-docs.github.io/apidocs/delivery/en/#individual-symbol-ticker-streams
1941
+ * @description unWatches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
1942
+ * @param {string} symbol unified symbol of the market to fetch the ticker for
1943
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1944
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1945
+ */
1932
1946
  async unWatchTicker(symbol, params = {}) {
1933
- /**
1934
- * @method
1935
- * @name binance#unWatchTicker
1936
- * @see https://binance-docs.github.io/apidocs/spot/en/#individual-symbol-mini-ticker-stream
1937
- * @see https://binance-docs.github.io/apidocs/spot/en/#individual-symbol-ticker-streams
1938
- * @see https://binance-docs.github.io/apidocs/futures/en/#all-market-mini-tickers-stream
1939
- * @see https://binance-docs.github.io/apidocs/futures/en/#individual-symbol-ticker-streams
1940
- * @see https://binance-docs.github.io/apidocs/delivery/en/#all-market-mini-tickers-stream
1941
- * @see https://binance-docs.github.io/apidocs/delivery/en/#individual-symbol-ticker-streams
1942
- * @description unWatches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
1943
- * @param {string} symbol unified symbol of the market to fetch the ticker for
1944
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1945
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1946
- */
1947
1947
  return await this.unWatchTickers([symbol], params);
1948
1948
  }
1949
+ /**
1950
+ * @method
1951
+ * @name binance#watchBidsAsks
1952
+ * @description watches best bid & ask for symbols
1953
+ * @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#symbol-order-book-ticker
1954
+ * @see https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/All-Book-Tickers-Stream
1955
+ * @see https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/All-Book-Tickers-Stream
1956
+ * @param {string[]} symbols unified symbol of the market to fetch the ticker for
1957
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1958
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1959
+ */
1949
1960
  async watchBidsAsks(symbols = undefined, params = {}) {
1950
- /**
1951
- * @method
1952
- * @name binance#watchBidsAsks
1953
- * @description watches best bid & ask for symbols
1954
- * @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#symbol-order-book-ticker
1955
- * @see https://developers.binance.com/docs/derivatives/usds-margined-futures/websocket-market-streams/All-Book-Tickers-Stream
1956
- * @see https://developers.binance.com/docs/derivatives/coin-margined-futures/websocket-market-streams/All-Book-Tickers-Stream
1957
- * @param {string[]} symbols unified symbol of the market to fetch the ticker for
1958
- * @param {object} [params] extra parameters specific to the exchange API endpoint
1959
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
1960
- */
1961
1961
  await this.loadMarkets();
1962
1962
  symbols = this.marketSymbols(symbols, undefined, true, false, true);
1963
1963
  const result = await this.watchMultiTickerHelper('watchBidsAsks', 'bookTicker', symbols, params);
@@ -2502,20 +2502,20 @@ export default class binance extends binanceRest {
2502
2502
  future.resolve();
2503
2503
  client.resolve(this.balance[type], type + ':balance');
2504
2504
  }
2505
+ /**
2506
+ * @method
2507
+ * @name binance#fetchBalanceWs
2508
+ * @description fetch balance and get the amount of funds available for trading or funds locked in orders
2509
+ * @see https://developers.binance.com/docs/derivatives/usds-margined-futures/account/websocket-api/Futures-Account-Balance
2510
+ * @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#account-information-user_data
2511
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2512
+ * @param {string|undefined} [params.type] 'future', 'delivery', 'savings', 'funding', or 'spot'
2513
+ * @param {string|undefined} [params.marginMode] 'cross' or 'isolated', for margin trading, uses this.options.defaultMarginMode if not passed, defaults to undefined/None/null
2514
+ * @param {string[]|undefined} [params.symbols] unified market symbols, only used in isolated margin mode
2515
+ * @param {string|undefined} [params.method] method to use. Can be account.balance, account.status, v2/account.balance or v2/account.status
2516
+ * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
2517
+ */
2505
2518
  async fetchBalanceWs(params = {}) {
2506
- /**
2507
- * @method
2508
- * @name binance#fetchBalanceWs
2509
- * @description fetch balance and get the amount of funds available for trading or funds locked in orders
2510
- * @see https://developers.binance.com/docs/derivatives/usds-margined-futures/account/websocket-api/Futures-Account-Balance
2511
- * @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#account-information-user_data
2512
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2513
- * @param {string|undefined} [params.type] 'future', 'delivery', 'savings', 'funding', or 'spot'
2514
- * @param {string|undefined} [params.marginMode] 'cross' or 'isolated', for margin trading, uses this.options.defaultMarginMode if not passed, defaults to undefined/None/null
2515
- * @param {string[]|undefined} [params.symbols] unified market symbols, only used in isolated margin mode
2516
- * @param {string|undefined} [params.method] method to use. Can be account.balance, account.status, v2/account.balance or v2/account.status
2517
- * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
2518
- */
2519
2519
  await this.loadMarkets();
2520
2520
  const type = this.getMarketType('fetchBalanceWs', undefined, params);
2521
2521
  if (type !== 'spot' && type !== 'future') {
@@ -2610,30 +2610,30 @@ export default class binance extends binanceRest {
2610
2610
  const parsedBalances = this.parseBalanceCustom(result);
2611
2611
  client.resolve(parsedBalances, messageHash);
2612
2612
  }
2613
+ /**
2614
+ * @method
2615
+ * @name binance#fetchPositionWs
2616
+ * @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/Position-Information
2617
+ * @description fetch data on an open position
2618
+ * @param {string} symbol unified market symbol of the market the position is held in
2619
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2620
+ * @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
2621
+ */
2613
2622
  async fetchPositionWs(symbol, params = {}) {
2614
- /**
2615
- * @method
2616
- * @name binance#fetchPositionWs
2617
- * @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/Position-Information
2618
- * @description fetch data on an open position
2619
- * @param {string} symbol unified market symbol of the market the position is held in
2620
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2621
- * @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
2622
- */
2623
2623
  return await this.fetchPositionsWs([symbol], params);
2624
2624
  }
2625
+ /**
2626
+ * @method
2627
+ * @name binance#fetchPositionsWs
2628
+ * @description fetch all open positions
2629
+ * @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/Position-Information
2630
+ * @param {string[]} [symbols] list of unified market symbols
2631
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2632
+ * @param {boolean} [params.returnRateLimits] set to true to return rate limit informations, defaults to false.
2633
+ * @param {string|undefined} [params.method] method to use. Can be account.position or v2/account.position
2634
+ * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
2635
+ */
2625
2636
  async fetchPositionsWs(symbols = undefined, params = {}) {
2626
- /**
2627
- * @method
2628
- * @name binance#fetchPositionsWs
2629
- * @description fetch all open positions
2630
- * @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/Position-Information
2631
- * @param {string[]} [symbols] list of unified market symbols
2632
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2633
- * @param {boolean} [params.returnRateLimits] set to true to return rate limit informations, defaults to false.
2634
- * @param {string|undefined} [params.method] method to use. Can be account.position or v2/account.position
2635
- * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
2636
- */
2637
2637
  await this.loadMarkets();
2638
2638
  symbols = this.marketSymbols(symbols, 'swap', true, true, true);
2639
2639
  const url = this.urls['api']['ws']['ws-api']['future'];
@@ -2705,15 +2705,15 @@ export default class binance extends binanceRest {
2705
2705
  }
2706
2706
  client.resolve(positions, messageHash);
2707
2707
  }
2708
+ /**
2709
+ * @method
2710
+ * @name binance#watchBalance
2711
+ * @description watch balance and get the amount of funds available for trading or funds locked in orders
2712
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2713
+ * @param {boolean} [params.portfolioMargin] set to true if you would like to watch the balance of a portfolio margin account
2714
+ * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
2715
+ */
2708
2716
  async watchBalance(params = {}) {
2709
- /**
2710
- * @method
2711
- * @name binance#watchBalance
2712
- * @description watch balance and get the amount of funds available for trading or funds locked in orders
2713
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2714
- * @param {boolean} [params.portfolioMargin] set to true if you would like to watch the balance of a portfolio margin account
2715
- * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
2716
- */
2717
2717
  await this.loadMarkets();
2718
2718
  await this.authenticate(params);
2719
2719
  const defaultType = this.safeString(this.options, 'defaultType', 'spot');
@@ -2865,23 +2865,23 @@ export default class binance extends binanceRest {
2865
2865
  }
2866
2866
  return type;
2867
2867
  }
2868
+ /**
2869
+ * @method
2870
+ * @name binance#createOrderWs
2871
+ * @description create a trade order
2872
+ * @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#place-new-order-trade
2873
+ * @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/New-Order
2874
+ * @param {string} symbol unified symbol of the market to create an order in
2875
+ * @param {string} type 'market' or 'limit'
2876
+ * @param {string} side 'buy' or 'sell'
2877
+ * @param {float} amount how much of currency you want to trade in units of base currency
2878
+ * @param {float|undefined} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
2879
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
2880
+ * @param {boolean} params.test test order, default false
2881
+ * @param {boolean} params.returnRateLimits set to true to return rate limit information, default false
2882
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2883
+ */
2868
2884
  async createOrderWs(symbol, type, side, amount, price = undefined, params = {}) {
2869
- /**
2870
- * @method
2871
- * @name binance#createOrderWs
2872
- * @description create a trade order
2873
- * @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#place-new-order-trade
2874
- * @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/New-Order
2875
- * @param {string} symbol unified symbol of the market to create an order in
2876
- * @param {string} type 'market' or 'limit'
2877
- * @param {string} side 'buy' or 'sell'
2878
- * @param {float} amount how much of currency you want to trade in units of base currency
2879
- * @param {float|undefined} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
2880
- * @param {object} [params] extra parameters specific to the exchange API endpoint
2881
- * @param {boolean} params.test test order, default false
2882
- * @param {boolean} params.returnRateLimits set to true to return rate limit information, default false
2883
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
2884
- */
2885
2885
  await this.loadMarkets();
2886
2886
  const market = this.market(symbol);
2887
2887
  const marketType = this.getMarketType('createOrderWs', market, params);
@@ -3013,22 +3013,22 @@ export default class binance extends binanceRest {
3013
3013
  const orders = this.parseOrders(result);
3014
3014
  client.resolve(orders, messageHash);
3015
3015
  }
3016
+ /**
3017
+ * @method
3018
+ * @name binance#editOrderWs
3019
+ * @description edit a trade order
3020
+ * @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#cancel-and-replace-order-trade
3021
+ * @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/Modify-Order
3022
+ * @param {string} id order id
3023
+ * @param {string} symbol unified symbol of the market to create an order in
3024
+ * @param {string} type 'market' or 'limit'
3025
+ * @param {string} side 'buy' or 'sell'
3026
+ * @param {float} amount how much of the currency you want to trade in units of the base currency
3027
+ * @param {float|undefined} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
3028
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3029
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
3030
+ */
3016
3031
  async editOrderWs(id, symbol, type, side, amount = undefined, price = undefined, params = {}) {
3017
- /**
3018
- * @method
3019
- * @name binance#editOrderWs
3020
- * @description edit a trade order
3021
- * @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#cancel-and-replace-order-trade
3022
- * @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/Modify-Order
3023
- * @param {string} id order id
3024
- * @param {string} symbol unified symbol of the market to create an order in
3025
- * @param {string} type 'market' or 'limit'
3026
- * @param {string} side 'buy' or 'sell'
3027
- * @param {float} amount how much of the currency you want to trade in units of the base currency
3028
- * @param {float|undefined} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
3029
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3030
- * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
3031
- */
3032
3032
  await this.loadMarkets();
3033
3033
  const market = this.market(symbol);
3034
3034
  const marketType = this.getMarketType('editOrderWs', market, params);
@@ -3169,19 +3169,19 @@ export default class binance extends binanceRest {
3169
3169
  }
3170
3170
  client.resolve(order, messageHash);
3171
3171
  }
3172
+ /**
3173
+ * @method
3174
+ * @name binance#cancelOrderWs
3175
+ * @description cancel multiple orders
3176
+ * @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#cancel-order-trade
3177
+ * @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/Cancel-Order
3178
+ * @param {string} id order id
3179
+ * @param {string} [symbol] unified market symbol, default is undefined
3180
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3181
+ * @param {string|undefined} [params.cancelRestrictions] Supported values: ONLY_NEW - Cancel will succeed if the order status is NEW. ONLY_PARTIALLY_FILLED - Cancel will succeed if order status is PARTIALLY_FILLED.
3182
+ * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
3183
+ */
3172
3184
  async cancelOrderWs(id, symbol = undefined, params = {}) {
3173
- /**
3174
- * @method
3175
- * @name binance#cancelOrderWs
3176
- * @description cancel multiple orders
3177
- * @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#cancel-order-trade
3178
- * @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/Cancel-Order
3179
- * @param {string} id order id
3180
- * @param {string} symbol unified market symbol, default is undefined
3181
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3182
- * @param {string|undefined} [params.cancelRestrictions] Supported values: ONLY_NEW - Cancel will succeed if the order status is NEW. ONLY_PARTIALLY_FILLED - Cancel will succeed if order status is PARTIALLY_FILLED.
3183
- * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
3184
- */
3185
3185
  await this.loadMarkets();
3186
3186
  if (symbol === undefined) {
3187
3187
  throw new BadRequest(this.id + ' cancelOrderWs requires a symbol');
@@ -3215,16 +3215,16 @@ export default class binance extends binanceRest {
3215
3215
  };
3216
3216
  return await this.watch(url, messageHash, message, messageHash, subscription);
3217
3217
  }
3218
+ /**
3219
+ * @method
3220
+ * @name binance#cancelAllOrdersWs
3221
+ * @description cancel all open orders in a market
3222
+ * @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#cancel-open-orders-trade
3223
+ * @param {string} [symbol] unified market symbol of the market to cancel orders in
3224
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3225
+ * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
3226
+ */
3218
3227
  async cancelAllOrdersWs(symbol = undefined, params = {}) {
3219
- /**
3220
- * @method
3221
- * @name binance#cancelAllOrdersWs
3222
- * @description cancel all open orders in a market
3223
- * @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#cancel-open-orders-trade
3224
- * @param {string} symbol unified market symbol of the market to cancel orders in
3225
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3226
- * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
3227
- */
3228
3228
  await this.loadMarkets();
3229
3229
  const market = this.market(symbol);
3230
3230
  const type = this.getMarketType('cancelAllOrdersWs', market, params);
@@ -3250,17 +3250,18 @@ export default class binance extends binanceRest {
3250
3250
  };
3251
3251
  return await this.watch(url, messageHash, message, messageHash, subscription);
3252
3252
  }
3253
+ /**
3254
+ * @method
3255
+ * @name binance#fetchOrderWs
3256
+ * @description fetches information on an order made by the user
3257
+ * @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#query-order-user_data
3258
+ * @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/Query-Order
3259
+ * @param {string} id order id
3260
+ * @param {string} [symbol] unified symbol of the market the order was made in
3261
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3262
+ * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
3263
+ */
3253
3264
  async fetchOrderWs(id, symbol = undefined, params = {}) {
3254
- /**
3255
- * @method
3256
- * @name binance#fetchOrderWs
3257
- * @description fetches information on an order made by the user
3258
- * @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#query-order-user_data
3259
- * @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/Query-Order
3260
- * @param {string} symbol unified symbol of the market the order was made in
3261
- * @param {object} params extra parameters specific to the exchange API endpoint
3262
- * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
3263
- */
3264
3265
  await this.loadMarkets();
3265
3266
  if (symbol === undefined) {
3266
3267
  throw new BadRequest(this.id + ' cancelOrderWs requires a symbol');
@@ -3296,22 +3297,22 @@ export default class binance extends binanceRest {
3296
3297
  };
3297
3298
  return await this.watch(url, messageHash, message, messageHash, subscription);
3298
3299
  }
3300
+ /**
3301
+ * @method
3302
+ * @name binance#fetchOrdersWs
3303
+ * @description fetches information on multiple orders made by the user
3304
+ * @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#query-order-list-user_data
3305
+ * @param {string} symbol unified market symbol of the market orders were made in
3306
+ * @param {int|undefined} [since] the earliest time in ms to fetch orders for
3307
+ * @param {int|undefined} [limit] the maximum number of order structures to retrieve
3308
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3309
+ * @param {int} [params.orderId] order id to begin at
3310
+ * @param {int} [params.startTime] earliest time in ms to retrieve orders for
3311
+ * @param {int} [params.endTime] latest time in ms to retrieve orders for
3312
+ * @param {int} [params.limit] the maximum number of order structures to retrieve
3313
+ * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
3314
+ */
3299
3315
  async fetchOrdersWs(symbol = undefined, since = undefined, limit = undefined, params = {}) {
3300
- /**
3301
- * @method
3302
- * @name binance#fetchOrdersWs
3303
- * @description fetches information on multiple orders made by the user
3304
- * @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#query-order-list-user_data
3305
- * @param {string} symbol unified market symbol of the market orders were made in
3306
- * @param {int|undefined} [since] the earliest time in ms to fetch orders for
3307
- * @param {int|undefined} [limit] the maximum number of order structures to retrieve
3308
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3309
- * @param {int} [params.orderId] order id to begin at
3310
- * @param {int} [params.startTime] earliest time in ms to retrieve orders for
3311
- * @param {int} [params.endTime] latest time in ms to retrieve orders for
3312
- * @param {int} [params.limit] the maximum number of order structures to retrieve
3313
- * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
3314
- */
3315
3316
  await this.loadMarkets();
3316
3317
  if (symbol === undefined) {
3317
3318
  throw new BadRequest(this.id + ' fetchOrdersWs requires a symbol');
@@ -3341,18 +3342,18 @@ export default class binance extends binanceRest {
3341
3342
  const orders = await this.watch(url, messageHash, message, messageHash, subscription);
3342
3343
  return this.filterBySymbolSinceLimit(orders, symbol, since, limit);
3343
3344
  }
3345
+ /**
3346
+ * @method
3347
+ * @name binance#fetchClosedOrdersWs
3348
+ * @description fetch closed orders
3349
+ * @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#query-order-list-user_data
3350
+ * @param {string} symbol unified market symbol
3351
+ * @param {int} [since] the earliest time in ms to fetch open orders for
3352
+ * @param {int} [limit] the maximum number of open orders structures to retrieve
3353
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3354
+ * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
3355
+ */
3344
3356
  async fetchClosedOrdersWs(symbol = undefined, since = undefined, limit = undefined, params = {}) {
3345
- /**
3346
- * @method
3347
- * @name binance#fetchClosedOrdersWs
3348
- * @description fetch closed orders
3349
- * @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#query-order-list-user_data
3350
- * @param {string} symbol unified market symbol
3351
- * @param {int} [since] the earliest time in ms to fetch open orders for
3352
- * @param {int} [limit] the maximum number of open orders structures to retrieve
3353
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3354
- * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
3355
- */
3356
3357
  const orders = await this.fetchOrdersWs(symbol, since, limit, params);
3357
3358
  const closedOrders = [];
3358
3359
  for (let i = 0; i < orders.length; i++) {
@@ -3363,18 +3364,18 @@ export default class binance extends binanceRest {
3363
3364
  }
3364
3365
  return closedOrders;
3365
3366
  }
3367
+ /**
3368
+ * @method
3369
+ * @name binance#fetchOpenOrdersWs
3370
+ * @description fetch all unfilled currently open orders
3371
+ * @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#current-open-orders-user_data
3372
+ * @param {string} symbol unified market symbol
3373
+ * @param {int|undefined} [since] the earliest time in ms to fetch open orders for
3374
+ * @param {int|undefined} [limit] the maximum number of open orders structures to retrieve
3375
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3376
+ * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
3377
+ */
3366
3378
  async fetchOpenOrdersWs(symbol = undefined, since = undefined, limit = undefined, params = {}) {
3367
- /**
3368
- * @method
3369
- * @name binance#fetchOpenOrdersWs
3370
- * @description fetch all unfilled currently open orders
3371
- * @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#current-open-orders-user_data
3372
- * @param {string} symbol unified market symbol
3373
- * @param {int|undefined} [since] the earliest time in ms to fetch open orders for
3374
- * @param {int|undefined} [limit] the maximum number of open orders structures to retrieve
3375
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3376
- * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
3377
- */
3378
3379
  await this.loadMarkets();
3379
3380
  const market = this.market(symbol);
3380
3381
  const type = this.getMarketType('fetchOpenOrdersWs', market, params);
@@ -3403,22 +3404,22 @@ export default class binance extends binanceRest {
3403
3404
  const orders = await this.watch(url, messageHash, message, messageHash, subscription);
3404
3405
  return this.filterBySymbolSinceLimit(orders, symbol, since, limit);
3405
3406
  }
3407
+ /**
3408
+ * @method
3409
+ * @name binance#watchOrders
3410
+ * @description watches information on multiple orders made by the user
3411
+ * @see https://developers.binance.com/docs/binance-spot-api-docs/user-data-stream#order-update
3412
+ * @see https://developers.binance.com/docs/margin_trading/trade-data-stream/Event-Order-Update
3413
+ * @see https://developers.binance.com/docs/derivatives/usds-margined-futures/user-data-streams/Event-Order-Update
3414
+ * @param {string} symbol unified market symbol of the market the orders were made in
3415
+ * @param {int} [since] the earliest time in ms to fetch orders for
3416
+ * @param {int} [limit] the maximum number of order structures to retrieve
3417
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3418
+ * @param {string|undefined} [params.marginMode] 'cross' or 'isolated', for spot margin
3419
+ * @param {boolean} [params.portfolioMargin] set to true if you would like to watch portfolio margin account orders
3420
+ * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
3421
+ */
3406
3422
  async watchOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
3407
- /**
3408
- * @method
3409
- * @name binance#watchOrders
3410
- * @description watches information on multiple orders made by the user
3411
- * @see https://developers.binance.com/docs/binance-spot-api-docs/user-data-stream#order-update
3412
- * @see https://developers.binance.com/docs/margin_trading/trade-data-stream/Event-Order-Update
3413
- * @see https://developers.binance.com/docs/derivatives/usds-margined-futures/user-data-streams/Event-Order-Update
3414
- * @param {string} symbol unified market symbol of the market the orders were made in
3415
- * @param {int} [since] the earliest time in ms to fetch orders for
3416
- * @param {int} [limit] the maximum number of order structures to retrieve
3417
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3418
- * @param {string|undefined} [params.marginMode] 'cross' or 'isolated', for spot margin
3419
- * @param {boolean} [params.portfolioMargin] set to true if you would like to watch portfolio margin account orders
3420
- * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
3421
- */
3422
3423
  await this.loadMarkets();
3423
3424
  let messageHash = 'orders';
3424
3425
  let market = undefined;
@@ -3702,16 +3703,18 @@ export default class binance extends binanceRest {
3702
3703
  this.handleOrder(client, message);
3703
3704
  this.handleMyLiquidation(client, message);
3704
3705
  }
3706
+ /**
3707
+ * @method
3708
+ * @name binance#watchPositions
3709
+ * @description watch all open positions
3710
+ * @param {string[]|undefined} symbols list of unified market symbols
3711
+ * @param {number} [since] since timestamp
3712
+ * @param {number} [limit] limit
3713
+ * @param {object} params extra parameters specific to the exchange API endpoint
3714
+ * @param {boolean} [params.portfolioMargin] set to true if you would like to watch positions in a portfolio margin account
3715
+ * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure}
3716
+ */
3705
3717
  async watchPositions(symbols = undefined, since = undefined, limit = undefined, params = {}) {
3706
- /**
3707
- * @method
3708
- * @name binance#watchPositions
3709
- * @description watch all open positions
3710
- * @param {string[]|undefined} symbols list of unified market symbols
3711
- * @param {object} params extra parameters specific to the exchange API endpoint
3712
- * @param {boolean} [params.portfolioMargin] set to true if you would like to watch positions in a portfolio margin account
3713
- * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure}
3714
- */
3715
3718
  await this.loadMarkets();
3716
3719
  let market = undefined;
3717
3720
  let messageHash = '';
@@ -3924,20 +3927,20 @@ export default class binance extends binanceRest {
3924
3927
  'marginRatio': undefined,
3925
3928
  });
3926
3929
  }
3930
+ /**
3931
+ * @method
3932
+ * @name binance#fetchMyTradesWs
3933
+ * @description fetch all trades made by the user
3934
+ * @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#account-trade-history-user_data
3935
+ * @param {string} symbol unified market symbol
3936
+ * @param {int|undefined} [since] the earliest time in ms to fetch trades for
3937
+ * @param {int|undefined} [limit] the maximum number of trades structures to retrieve
3938
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3939
+ * @param {int} [params.endTime] the latest time in ms to fetch trades for
3940
+ * @param {int} [params.fromId] first trade Id to fetch
3941
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
3942
+ */
3927
3943
  async fetchMyTradesWs(symbol = undefined, since = undefined, limit = undefined, params = {}) {
3928
- /**
3929
- * @method
3930
- * @name binance#fetchMyTradesWs
3931
- * @description fetch all trades made by the user
3932
- * @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#account-trade-history-user_data
3933
- * @param {string} symbol unified market symbol
3934
- * @param {int|undefined} [since] the earliest time in ms to fetch trades for
3935
- * @param {int|undefined} [limit] the maximum number of trades structures to retrieve
3936
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3937
- * @param {int} [params.endTime] the latest time in ms to fetch trades for
3938
- * @param {int} [params.fromId] first trade Id to fetch
3939
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
3940
- */
3941
3944
  await this.loadMarkets();
3942
3945
  if (symbol === undefined) {
3943
3946
  throw new BadRequest(this.id + ' fetchMyTradesWs requires a symbol');
@@ -3977,21 +3980,21 @@ export default class binance extends binanceRest {
3977
3980
  const trades = await this.watch(url, messageHash, message, messageHash, subscription);
3978
3981
  return this.filterBySymbolSinceLimit(trades, symbol, since, limit);
3979
3982
  }
3983
+ /**
3984
+ * @method
3985
+ * @name binance#fetchTradesWs
3986
+ * @description fetch all trades made by the user
3987
+ * @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#recent-trades
3988
+ * @param {string} symbol unified market symbol
3989
+ * @param {int} [since] the earliest time in ms to fetch trades for
3990
+ * @param {int} [limit] the maximum number of trades structures to retrieve, default=500, max=1000
3991
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3992
+ *
3993
+ * EXCHANGE SPECIFIC PARAMETERS
3994
+ * @param {int} [params.fromId] trade ID to begin at
3995
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
3996
+ */
3980
3997
  async fetchTradesWs(symbol = undefined, since = undefined, limit = undefined, params = {}) {
3981
- /**
3982
- * @method
3983
- * @name binance#fetchTradesWs
3984
- * @description fetch all trades made by the user
3985
- * @see https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#recent-trades
3986
- * @param {string} symbol unified market symbol
3987
- * @param {int} [since] the earliest time in ms to fetch trades for
3988
- * @param {int} [limit] the maximum number of trades structures to retrieve, default=500, max=1000
3989
- * @param {object} [params] extra parameters specific to the exchange API endpoint
3990
- *
3991
- * EXCHANGE SPECIFIC PARAMETERS
3992
- * @param {int} [params.fromId] trade ID to begin at
3993
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
3994
- */
3995
3998
  await this.loadMarkets();
3996
3999
  if (symbol === undefined) {
3997
4000
  throw new BadRequest(this.id + ' fetchTradesWs () requires a symbol argument');
@@ -4075,18 +4078,18 @@ export default class binance extends binanceRest {
4075
4078
  const trades = this.parseTrades(result);
4076
4079
  client.resolve(trades, messageHash);
4077
4080
  }
4081
+ /**
4082
+ * @method
4083
+ * @name binance#watchMyTrades
4084
+ * @description watches information on multiple trades made by the user
4085
+ * @param {string} symbol unified market symbol of the market orders were made in
4086
+ * @param {int} [since] the earliest time in ms to fetch orders for
4087
+ * @param {int} [limit] the maximum number of order structures to retrieve
4088
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
4089
+ * @param {boolean} [params.portfolioMargin] set to true if you would like to watch trades in a portfolio margin account
4090
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
4091
+ */
4078
4092
  async watchMyTrades(symbol = undefined, since = undefined, limit = undefined, params = {}) {
4079
- /**
4080
- * @method
4081
- * @name binance#watchMyTrades
4082
- * @description watches information on multiple trades made by the user
4083
- * @param {string} symbol unified market symbol of the market orders were made in
4084
- * @param {int} [since] the earliest time in ms to fetch orders for
4085
- * @param {int} [limit] the maximum number of order structures to retrieve
4086
- * @param {object} [params] extra parameters specific to the exchange API endpoint
4087
- * @param {boolean} [params.portfolioMargin] set to true if you would like to watch trades in a portfolio margin account
4088
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
4089
- */
4090
4093
  await this.loadMarkets();
4091
4094
  let type = undefined;
4092
4095
  let market = undefined;