ccxt 4.1.43 → 4.1.45

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 (383) hide show
  1. package/README.md +3 -3
  2. package/change.sh +2 -4
  3. package/dist/ccxt.browser.js +12641 -12877
  4. package/dist/ccxt.browser.min.js +9 -9
  5. package/dist/cjs/ccxt.js +1 -1
  6. package/dist/cjs/src/ace.js +4 -6
  7. package/dist/cjs/src/ascendex.js +65 -67
  8. package/dist/cjs/src/bigone.js +109 -113
  9. package/dist/cjs/src/binance.js +274 -269
  10. package/dist/cjs/src/bingx.js +117 -117
  11. package/dist/cjs/src/bit2c.js +6 -8
  12. package/dist/cjs/src/bitbank.js +19 -19
  13. package/dist/cjs/src/bitbns.js +5 -15
  14. package/dist/cjs/src/bitfinex.js +73 -75
  15. package/dist/cjs/src/bitfinex2.js +60 -62
  16. package/dist/cjs/src/bitflyer.js +4 -12
  17. package/dist/cjs/src/bitforex.js +4 -8
  18. package/dist/cjs/src/bitget.js +355 -355
  19. package/dist/cjs/src/bithumb.js +39 -45
  20. package/dist/cjs/src/bitmart.js +100 -95
  21. package/dist/cjs/src/bitmex.js +113 -117
  22. package/dist/cjs/src/bitopro.js +18 -28
  23. package/dist/cjs/src/bitpanda.js +8 -8
  24. package/dist/cjs/src/bitrue.js +23 -31
  25. package/dist/cjs/src/bitso.js +212 -212
  26. package/dist/cjs/src/bitstamp.js +95 -95
  27. package/dist/cjs/src/bittrex.js +28 -28
  28. package/dist/cjs/src/bitvavo.js +37 -42
  29. package/dist/cjs/src/bl3p.js +18 -18
  30. package/dist/cjs/src/blockchaincom.js +24 -24
  31. package/dist/cjs/src/btcalpha.js +27 -27
  32. package/dist/cjs/src/btctradeua.js +2 -4
  33. package/dist/cjs/src/btcturk.js +6 -6
  34. package/dist/cjs/src/bybit.js +50 -247
  35. package/dist/cjs/src/cex.js +107 -109
  36. package/dist/cjs/src/coinbase.js +179 -179
  37. package/dist/cjs/src/coinbasepro.js +115 -115
  38. package/dist/cjs/src/coincheck.js +21 -21
  39. package/dist/cjs/src/coinex.js +26 -43
  40. package/dist/cjs/src/coinfalcon.js +54 -56
  41. package/dist/cjs/src/coinlist.js +150 -150
  42. package/dist/cjs/src/coinmate.js +69 -71
  43. package/dist/cjs/src/coinone.js +11 -15
  44. package/dist/cjs/src/coinsph.js +113 -121
  45. package/dist/cjs/src/coinspot.js +28 -28
  46. package/dist/cjs/src/cryptocom.js +32 -32
  47. package/dist/cjs/src/currencycom.js +54 -58
  48. package/dist/cjs/src/delta.js +3 -3
  49. package/dist/cjs/src/deribit.js +285 -284
  50. package/dist/cjs/src/exmo.js +41 -41
  51. package/dist/cjs/src/gate.js +176 -180
  52. package/dist/cjs/src/gemini.js +5 -7
  53. package/dist/cjs/src/hitbtc.js +316 -127
  54. package/dist/cjs/src/hollaex.js +79 -81
  55. package/dist/cjs/src/huobi.js +270 -279
  56. package/dist/cjs/src/huobijp.js +126 -128
  57. package/dist/cjs/src/idex.js +202 -202
  58. package/dist/cjs/src/indodax.js +4 -10
  59. package/dist/cjs/src/kraken.js +161 -161
  60. package/dist/cjs/src/krakenfutures.js +223 -223
  61. package/dist/cjs/src/kucoin.js +122 -122
  62. package/dist/cjs/src/kucoinfutures.js +130 -135
  63. package/dist/cjs/src/kuna.js +24 -24
  64. package/dist/cjs/src/latoken.js +70 -70
  65. package/dist/cjs/src/lbank.js +6 -6
  66. package/dist/cjs/src/lbank2.js +35 -35
  67. package/dist/cjs/src/luno.js +6 -8
  68. package/dist/cjs/src/lykke.js +4 -4
  69. package/dist/cjs/src/mercado.js +24 -34
  70. package/dist/cjs/src/mexc.js +177 -187
  71. package/dist/cjs/src/ndax.js +9 -8
  72. package/dist/cjs/src/oceanex.js +11 -13
  73. package/dist/cjs/src/okcoin.js +65 -65
  74. package/dist/cjs/src/okx.js +81 -86
  75. package/dist/cjs/src/phemex.js +122 -143
  76. package/dist/cjs/src/poloniex.js +43 -43
  77. package/dist/cjs/src/poloniexfutures.js +98 -102
  78. package/dist/cjs/src/pro/alpaca.js +174 -174
  79. package/dist/cjs/src/pro/ascendex.js +151 -151
  80. package/dist/cjs/src/pro/binance.js +278 -278
  81. package/dist/cjs/src/pro/bingx.js +136 -136
  82. package/dist/cjs/src/pro/bitfinex.js +38 -38
  83. package/dist/cjs/src/pro/bitfinex2.js +57 -57
  84. package/dist/cjs/src/pro/bitget.js +227 -227
  85. package/dist/cjs/src/pro/bitmart.js +100 -102
  86. package/dist/cjs/src/pro/bitmex.js +584 -584
  87. package/dist/cjs/src/pro/bitopro.js +49 -49
  88. package/dist/cjs/src/pro/bitpanda.js +249 -249
  89. package/dist/cjs/src/pro/bitrue.js +79 -83
  90. package/dist/cjs/src/pro/bitstamp.js +61 -63
  91. package/dist/cjs/src/pro/bittrex.js +107 -107
  92. package/dist/cjs/src/pro/bitvavo.js +118 -122
  93. package/dist/cjs/src/pro/blockchaincom.js +169 -169
  94. package/dist/cjs/src/pro/bybit.js +57 -57
  95. package/dist/cjs/src/pro/cex.js +201 -205
  96. package/dist/cjs/src/pro/coinbase.js +4 -4
  97. package/dist/cjs/src/pro/coinbasepro.js +95 -95
  98. package/dist/cjs/src/pro/coinex.js +232 -232
  99. package/dist/cjs/src/pro/cryptocom.js +32 -32
  100. package/dist/cjs/src/pro/currencycom.js +108 -108
  101. package/dist/cjs/src/pro/deribit.js +140 -140
  102. package/dist/cjs/src/pro/exmo.js +72 -72
  103. package/dist/cjs/src/pro/gate.js +160 -160
  104. package/dist/cjs/src/pro/gemini.js +135 -135
  105. package/dist/cjs/src/pro/hitbtc.js +10 -10
  106. package/dist/cjs/src/pro/hollaex.js +88 -88
  107. package/dist/cjs/src/pro/huobi.js +277 -277
  108. package/dist/cjs/src/pro/huobijp.js +71 -71
  109. package/dist/cjs/src/pro/idex.js +58 -58
  110. package/dist/cjs/src/pro/independentreserve.js +29 -29
  111. package/dist/cjs/src/pro/kraken.js +113 -113
  112. package/dist/cjs/src/pro/krakenfutures.js +58 -58
  113. package/dist/cjs/src/pro/kucoin.js +95 -95
  114. package/dist/cjs/src/pro/kucoinfutures.js +100 -100
  115. package/dist/cjs/src/pro/luno.js +42 -42
  116. package/dist/cjs/src/pro/mexc.js +98 -98
  117. package/dist/cjs/src/pro/ndax.js +24 -24
  118. package/dist/cjs/src/pro/okcoin.js +104 -104
  119. package/dist/cjs/src/pro/okx.js +161 -161
  120. package/dist/cjs/src/pro/phemex.js +295 -295
  121. package/dist/cjs/src/pro/poloniex.js +79 -79
  122. package/dist/cjs/src/pro/poloniexfutures.js +172 -172
  123. package/dist/cjs/src/pro/probit.js +87 -87
  124. package/dist/cjs/src/pro/upbit.js +66 -66
  125. package/dist/cjs/src/pro/wazirx.js +11 -11
  126. package/dist/cjs/src/pro/whitebit.js +80 -84
  127. package/dist/cjs/src/pro/woo.js +78 -78
  128. package/dist/cjs/src/probit.js +45 -49
  129. package/dist/cjs/src/tidex.js +9 -9
  130. package/dist/cjs/src/tokocrypto.js +60 -64
  131. package/dist/cjs/src/upbit.js +157 -157
  132. package/dist/cjs/src/wavesexchange.js +127 -129
  133. package/dist/cjs/src/wazirx.js +4 -10
  134. package/dist/cjs/src/whitebit.js +66 -70
  135. package/dist/cjs/src/woo.js +244 -246
  136. package/dist/cjs/src/yobit.js +12 -16
  137. package/dist/cjs/src/zonda.js +103 -103
  138. package/js/ccxt.d.ts +1 -1
  139. package/js/ccxt.js +1 -1
  140. package/js/src/abstract/bequant.d.ts +37 -7
  141. package/js/src/abstract/binance.d.ts +1 -0
  142. package/js/src/abstract/binancecoinm.d.ts +1 -0
  143. package/js/src/abstract/binanceus.d.ts +1 -0
  144. package/js/src/abstract/binanceusdm.d.ts +1 -0
  145. package/js/src/abstract/bitcoincom.d.ts +37 -7
  146. package/js/src/abstract/bybit.d.ts +16 -195
  147. package/js/src/abstract/fmfwio.d.ts +37 -7
  148. package/js/src/abstract/hitbtc.d.ts +37 -7
  149. package/js/src/abstract/hitbtc3.d.ts +37 -7
  150. package/js/src/abstract/okex.d.ts +6 -1
  151. package/js/src/abstract/okex5.d.ts +6 -1
  152. package/js/src/abstract/okx.d.ts +6 -1
  153. package/js/src/ace.d.ts +10 -10
  154. package/js/src/ace.js +5 -7
  155. package/js/src/alpaca.d.ts +4 -4
  156. package/js/src/ascendex.d.ts +12 -36
  157. package/js/src/ascendex.js +65 -67
  158. package/js/src/base/types.d.ts +8 -0
  159. package/js/src/bigone.d.ts +12 -50
  160. package/js/src/bigone.js +110 -114
  161. package/js/src/binance.d.ts +9 -66
  162. package/js/src/binance.js +274 -269
  163. package/js/src/bingx.d.ts +11 -35
  164. package/js/src/bingx.js +117 -117
  165. package/js/src/bit2c.d.ts +9 -9
  166. package/js/src/bit2c.js +7 -9
  167. package/js/src/bitbank.d.ts +11 -51
  168. package/js/src/bitbank.js +19 -19
  169. package/js/src/bitbns.d.ts +10 -30
  170. package/js/src/bitbns.js +5 -15
  171. package/js/src/bitfinex.d.ts +10 -58
  172. package/js/src/bitfinex.js +73 -75
  173. package/js/src/bitfinex2.d.ts +5 -29
  174. package/js/src/bitfinex2.js +60 -62
  175. package/js/src/bitflyer.d.ts +11 -51
  176. package/js/src/bitflyer.js +4 -12
  177. package/js/src/bitforex.d.ts +9 -9
  178. package/js/src/bitforex.js +5 -9
  179. package/js/src/bitget.d.ts +8 -28
  180. package/js/src/bitget.js +355 -355
  181. package/js/src/bithumb.d.ts +11 -51
  182. package/js/src/bithumb.js +39 -45
  183. package/js/src/bitmart.d.ts +12 -69
  184. package/js/src/bitmart.js +100 -95
  185. package/js/src/bitmex.d.ts +8 -56
  186. package/js/src/bitmex.js +113 -117
  187. package/js/src/bitopro.d.ts +13 -85
  188. package/js/src/bitopro.js +18 -28
  189. package/js/src/bitpanda.d.ts +13 -51
  190. package/js/src/bitpanda.js +8 -8
  191. package/js/src/bitrue.d.ts +13 -53
  192. package/js/src/bitrue.js +23 -31
  193. package/js/src/bitso.d.ts +13 -73
  194. package/js/src/bitso.js +212 -212
  195. package/js/src/bitstamp.d.ts +14 -66
  196. package/js/src/bitstamp.js +95 -95
  197. package/js/src/bitstamp1.d.ts +9 -9
  198. package/js/src/bittrex.d.ts +14 -58
  199. package/js/src/bittrex.js +28 -28
  200. package/js/src/bitvavo.d.ts +9 -45
  201. package/js/src/bitvavo.js +37 -42
  202. package/js/src/bl3p.d.ts +8 -8
  203. package/js/src/bl3p.js +18 -18
  204. package/js/src/blockchaincom.d.ts +13 -93
  205. package/js/src/blockchaincom.js +24 -24
  206. package/js/src/btcalpha.d.ts +11 -31
  207. package/js/src/btcalpha.js +27 -27
  208. package/js/src/btcbox.d.ts +8 -8
  209. package/js/src/btcmarkets.d.ts +12 -60
  210. package/js/src/btctradeua.d.ts +8 -8
  211. package/js/src/btctradeua.js +3 -5
  212. package/js/src/btcturk.d.ts +7 -7
  213. package/js/src/btcturk.js +6 -6
  214. package/js/src/bybit.d.ts +9 -47
  215. package/js/src/bybit.js +50 -247
  216. package/js/src/cex.d.ts +9 -9
  217. package/js/src/cex.js +107 -109
  218. package/js/src/coinbase.d.ts +10 -10
  219. package/js/src/coinbase.js +179 -179
  220. package/js/src/coinbasepro.d.ts +9 -57
  221. package/js/src/coinbasepro.js +115 -115
  222. package/js/src/coincheck.d.ts +10 -30
  223. package/js/src/coincheck.js +21 -21
  224. package/js/src/coinex.d.ts +9 -53
  225. package/js/src/coinex.js +26 -43
  226. package/js/src/coinfalcon.d.ts +9 -53
  227. package/js/src/coinfalcon.js +55 -57
  228. package/js/src/coinlist.d.ts +23 -61
  229. package/js/src/coinlist.js +150 -150
  230. package/js/src/coinmate.d.ts +10 -58
  231. package/js/src/coinmate.js +70 -72
  232. package/js/src/coinone.d.ts +10 -10
  233. package/js/src/coinone.js +11 -15
  234. package/js/src/coinsph.d.ts +14 -74
  235. package/js/src/coinsph.js +113 -121
  236. package/js/src/coinspot.d.ts +10 -10
  237. package/js/src/coinspot.js +28 -28
  238. package/js/src/cryptocom.d.ts +6 -46
  239. package/js/src/cryptocom.js +32 -32
  240. package/js/src/currencycom.d.ts +9 -33
  241. package/js/src/currencycom.js +54 -58
  242. package/js/src/delta.d.ts +10 -10
  243. package/js/src/delta.js +3 -3
  244. package/js/src/deribit.d.ts +14 -50
  245. package/js/src/deribit.js +285 -284
  246. package/js/src/digifinex.d.ts +12 -50
  247. package/js/src/exmo.d.ts +10 -106
  248. package/js/src/exmo.js +41 -41
  249. package/js/src/gate.d.ts +7 -51
  250. package/js/src/gate.js +176 -180
  251. package/js/src/gemini.d.ts +10 -48
  252. package/js/src/gemini.js +5 -7
  253. package/js/src/hitbtc.d.ts +8 -55
  254. package/js/src/hitbtc.js +317 -128
  255. package/js/src/hollaex.d.ts +13 -70
  256. package/js/src/hollaex.js +79 -81
  257. package/js/src/huobi.d.ts +7 -53
  258. package/js/src/huobi.js +270 -279
  259. package/js/src/huobijp.d.ts +9 -55
  260. package/js/src/huobijp.js +127 -129
  261. package/js/src/idex.d.ts +13 -89
  262. package/js/src/idex.js +202 -202
  263. package/js/src/independentreserve.d.ts +9 -9
  264. package/js/src/indodax.d.ts +11 -51
  265. package/js/src/indodax.js +4 -10
  266. package/js/src/kraken.d.ts +9 -53
  267. package/js/src/kraken.js +161 -161
  268. package/js/src/krakenfutures.d.ts +6 -6
  269. package/js/src/krakenfutures.js +223 -223
  270. package/js/src/kucoin.d.ts +7 -47
  271. package/js/src/kucoin.js +122 -122
  272. package/js/src/kucoinfutures.d.ts +6 -6
  273. package/js/src/kucoinfutures.js +130 -135
  274. package/js/src/kuna.d.ts +15 -107
  275. package/js/src/kuna.js +25 -24
  276. package/js/src/latoken.d.ts +9 -33
  277. package/js/src/latoken.js +70 -70
  278. package/js/src/lbank.d.ts +10 -64
  279. package/js/src/lbank.js +6 -6
  280. package/js/src/lbank2.d.ts +8 -29
  281. package/js/src/lbank2.js +35 -35
  282. package/js/src/luno.d.ts +10 -10
  283. package/js/src/luno.js +6 -8
  284. package/js/src/lykke.d.ts +12 -50
  285. package/js/src/lykke.js +4 -4
  286. package/js/src/mercado.d.ts +8 -48
  287. package/js/src/mercado.js +24 -34
  288. package/js/src/mexc.d.ts +11 -49
  289. package/js/src/mexc.js +177 -187
  290. package/js/src/ndax.d.ts +11 -47
  291. package/js/src/ndax.js +9 -8
  292. package/js/src/novadax.d.ts +13 -61
  293. package/js/src/oceanex.d.ts +8 -8
  294. package/js/src/oceanex.js +11 -13
  295. package/js/src/okcoin.d.ts +11 -55
  296. package/js/src/okcoin.js +65 -65
  297. package/js/src/okx.d.ts +10 -98
  298. package/js/src/okx.js +81 -86
  299. package/js/src/paymium.d.ts +8 -8
  300. package/js/src/phemex.d.ts +8 -27
  301. package/js/src/phemex.js +122 -143
  302. package/js/src/poloniex.d.ts +8 -56
  303. package/js/src/poloniex.js +43 -43
  304. package/js/src/poloniexfutures.d.ts +10 -10
  305. package/js/src/poloniexfutures.js +98 -102
  306. package/js/src/pro/alpaca.d.ts +2 -2
  307. package/js/src/pro/alpaca.js +174 -174
  308. package/js/src/pro/ascendex.js +151 -151
  309. package/js/src/pro/binance.d.ts +2 -19
  310. package/js/src/pro/binance.js +278 -278
  311. package/js/src/pro/bingx.js +136 -136
  312. package/js/src/pro/bitfinex.d.ts +2 -2
  313. package/js/src/pro/bitfinex.js +38 -38
  314. package/js/src/pro/bitfinex2.js +57 -57
  315. package/js/src/pro/bitget.js +227 -227
  316. package/js/src/pro/bitmart.js +100 -102
  317. package/js/src/pro/bitmex.js +584 -584
  318. package/js/src/pro/bitopro.js +49 -49
  319. package/js/src/pro/bitpanda.js +249 -249
  320. package/js/src/pro/bitrue.js +79 -83
  321. package/js/src/pro/bitstamp.js +62 -64
  322. package/js/src/pro/bittrex.js +107 -107
  323. package/js/src/pro/bitvavo.js +119 -123
  324. package/js/src/pro/blockchaincom.js +169 -169
  325. package/js/src/pro/bybit.js +57 -57
  326. package/js/src/pro/cex.js +202 -206
  327. package/js/src/pro/coinbase.js +4 -4
  328. package/js/src/pro/coinbasepro.d.ts +2 -2
  329. package/js/src/pro/coinbasepro.js +95 -95
  330. package/js/src/pro/coinex.js +232 -232
  331. package/js/src/pro/cryptocom.js +32 -32
  332. package/js/src/pro/currencycom.js +108 -108
  333. package/js/src/pro/deribit.js +140 -140
  334. package/js/src/pro/exmo.js +72 -72
  335. package/js/src/pro/gate.js +160 -160
  336. package/js/src/pro/gemini.js +135 -135
  337. package/js/src/pro/hitbtc.js +10 -10
  338. package/js/src/pro/hollaex.js +88 -88
  339. package/js/src/pro/huobi.js +277 -277
  340. package/js/src/pro/huobijp.js +71 -71
  341. package/js/src/pro/idex.js +58 -58
  342. package/js/src/pro/independentreserve.js +29 -29
  343. package/js/src/pro/kraken.js +113 -113
  344. package/js/src/pro/krakenfutures.js +58 -58
  345. package/js/src/pro/kucoin.js +95 -95
  346. package/js/src/pro/kucoinfutures.js +100 -100
  347. package/js/src/pro/luno.d.ts +2 -2
  348. package/js/src/pro/luno.js +42 -42
  349. package/js/src/pro/mexc.js +98 -98
  350. package/js/src/pro/ndax.js +24 -24
  351. package/js/src/pro/okcoin.js +104 -104
  352. package/js/src/pro/okx.js +161 -161
  353. package/js/src/pro/phemex.js +295 -295
  354. package/js/src/pro/poloniex.js +79 -79
  355. package/js/src/pro/poloniexfutures.js +172 -172
  356. package/js/src/pro/probit.js +87 -87
  357. package/js/src/pro/upbit.js +66 -66
  358. package/js/src/pro/wazirx.js +11 -11
  359. package/js/src/pro/whitebit.js +81 -85
  360. package/js/src/pro/woo.js +78 -78
  361. package/js/src/probit.d.ts +12 -50
  362. package/js/src/probit.js +46 -50
  363. package/js/src/tidex.d.ts +8 -62
  364. package/js/src/tidex.js +9 -9
  365. package/js/src/timex.d.ts +11 -44
  366. package/js/src/tokocrypto.d.ts +11 -61
  367. package/js/src/tokocrypto.js +61 -65
  368. package/js/src/upbit.d.ts +7 -51
  369. package/js/src/upbit.js +157 -157
  370. package/js/src/wavesexchange.d.ts +9 -49
  371. package/js/src/wavesexchange.js +128 -130
  372. package/js/src/wazirx.d.ts +9 -9
  373. package/js/src/wazirx.js +5 -11
  374. package/js/src/whitebit.d.ts +9 -55
  375. package/js/src/whitebit.js +66 -70
  376. package/js/src/woo.d.ts +10 -48
  377. package/js/src/woo.js +245 -247
  378. package/js/src/yobit.d.ts +3 -3
  379. package/js/src/yobit.js +12 -16
  380. package/js/src/zaif.d.ts +10 -50
  381. package/js/src/zonda.d.ts +8 -48
  382. package/js/src/zonda.js +103 -103
  383. package/package.json +2 -1
package/js/src/binance.js CHANGED
@@ -862,6 +862,7 @@ export default class binance extends Exchange {
862
862
  'klines': 0.4,
863
863
  'uiKlines': 0.4,
864
864
  'ticker/24hr': { 'cost': 0.4, 'noSymbol': 16 },
865
+ 'ticker': { 'cost': 0.4, 'noSymbol': 16 },
865
866
  'ticker/price': { 'cost': 0.4, 'noSymbol': 0.8 },
866
867
  'ticker/bookTicker': { 'cost': 0.4, 'noSymbol': 0.8 },
867
868
  'exchangeInfo': 4,
@@ -2590,16 +2591,16 @@ export default class binance extends Exchange {
2590
2591
  // spot
2591
2592
  //
2592
2593
  // {
2593
- // makerCommission: 10,
2594
- // takerCommission: 10,
2595
- // buyerCommission: 0,
2596
- // sellerCommission: 0,
2597
- // canTrade: true,
2598
- // canWithdraw: true,
2599
- // canDeposit: true,
2600
- // updateTime: 1575357359602,
2601
- // accountType: "MARGIN",
2602
- // balances: [
2594
+ // "makerCommission": 10,
2595
+ // "takerCommission": 10,
2596
+ // "buyerCommission": 0,
2597
+ // "sellerCommission": 0,
2598
+ // "canTrade": true,
2599
+ // "canWithdraw": true,
2600
+ // "canDeposit": true,
2601
+ // "updateTime": 1575357359602,
2602
+ // "accountType": "MARGIN",
2603
+ // "balances": [
2603
2604
  // { asset: "BTC", free: "0.00219821", locked: "0.00000000" },
2604
2605
  // ]
2605
2606
  // }
@@ -2624,43 +2625,43 @@ export default class binance extends Exchange {
2624
2625
  // margin (isolated)
2625
2626
  //
2626
2627
  // {
2627
- // info: {
2628
- // assets: [
2628
+ // "info": {
2629
+ // "assets": [
2629
2630
  // {
2630
- // baseAsset: {
2631
- // asset: '1INCH',
2632
- // borrowEnabled: true,
2633
- // borrowed: '0',
2634
- // free: '0',
2635
- // interest: '0',
2636
- // locked: '0',
2637
- // netAsset: '0',
2638
- // netAssetOfBtc: '0',
2639
- // repayEnabled: true,
2640
- // totalAsset: '0'
2631
+ // "baseAsset": {
2632
+ // "asset": "1INCH",
2633
+ // "borrowEnabled": true,
2634
+ // "borrowed": "0",
2635
+ // "free": "0",
2636
+ // "interest": "0",
2637
+ // "locked": "0",
2638
+ // "netAsset": "0",
2639
+ // "netAssetOfBtc": "0",
2640
+ // "repayEnabled": true,
2641
+ // "totalAsset": "0"
2641
2642
  // },
2642
- // quoteAsset: {
2643
- // asset: 'USDT',
2644
- // borrowEnabled: true,
2645
- // borrowed: '0',
2646
- // free: '11',
2647
- // interest: '0',
2648
- // locked: '0',
2649
- // netAsset: '11',
2650
- // netAssetOfBtc: '0.00054615',
2651
- // repayEnabled: true,
2652
- // totalAsset: '11'
2643
+ // "quoteAsset": {
2644
+ // "asset": "USDT",
2645
+ // "borrowEnabled": true,
2646
+ // "borrowed": "0",
2647
+ // "free": "11",
2648
+ // "interest": "0",
2649
+ // "locked": "0",
2650
+ // "netAsset": "11",
2651
+ // "netAssetOfBtc": "0.00054615",
2652
+ // "repayEnabled": true,
2653
+ // "totalAsset": "11"
2653
2654
  // },
2654
- // symbol: '1INCHUSDT',
2655
- // isolatedCreated: true,
2656
- // marginLevel: '999',
2657
- // marginLevelStatus: 'EXCESSIVE',
2658
- // marginRatio: '5',
2659
- // indexPrice: '0.59184331',
2660
- // liquidatePrice: '0',
2661
- // liquidateRate: '0',
2662
- // tradeEnabled: true,
2663
- // enabled: true
2655
+ // "symbol": "1INCHUSDT",
2656
+ // "isolatedCreated": true,
2657
+ // "marginLevel": "999",
2658
+ // "marginLevelStatus": "EXCESSIVE",
2659
+ // "marginRatio": "5",
2660
+ // "indexPrice": "0.59184331",
2661
+ // "liquidatePrice": "0",
2662
+ // "liquidateRate": "0",
2663
+ // "tradeEnabled": true,
2664
+ // "enabled": true
2664
2665
  // },
2665
2666
  // ]
2666
2667
  // }
@@ -2852,49 +2853,49 @@ export default class binance extends Exchange {
2852
2853
  parseTicker(ticker, market = undefined) {
2853
2854
  //
2854
2855
  // {
2855
- // symbol: 'ETHBTC',
2856
- // priceChange: '0.00068700',
2857
- // priceChangePercent: '2.075',
2858
- // weightedAvgPrice: '0.03342681',
2859
- // prevClosePrice: '0.03310300',
2860
- // lastPrice: '0.03378900',
2861
- // lastQty: '0.07700000',
2862
- // bidPrice: '0.03378900',
2863
- // bidQty: '7.16800000',
2864
- // askPrice: '0.03379000',
2865
- // askQty: '24.00000000',
2866
- // openPrice: '0.03310200',
2867
- // highPrice: '0.03388900',
2868
- // lowPrice: '0.03306900',
2869
- // volume: '205478.41000000',
2870
- // quoteVolume: '6868.48826294',
2871
- // openTime: 1601469986932,
2872
- // closeTime: 1601556386932,
2873
- // firstId: 196098772,
2874
- // lastId: 196186315,
2875
- // count: 87544
2856
+ // "symbol": "ETHBTC",
2857
+ // "priceChange": "0.00068700",
2858
+ // "priceChangePercent": "2.075",
2859
+ // "weightedAvgPrice": "0.03342681",
2860
+ // "prevClosePrice": "0.03310300",
2861
+ // "lastPrice": "0.03378900",
2862
+ // "lastQty": "0.07700000",
2863
+ // "bidPrice": "0.03378900",
2864
+ // "bidQty": "7.16800000",
2865
+ // "askPrice": "0.03379000",
2866
+ // "askQty": "24.00000000",
2867
+ // "openPrice": "0.03310200",
2868
+ // "highPrice": "0.03388900",
2869
+ // "lowPrice": "0.03306900",
2870
+ // "volume": "205478.41000000",
2871
+ // "quoteVolume": "6868.48826294",
2872
+ // "openTime": 1601469986932,
2873
+ // "closeTime": 1601556386932,
2874
+ // "firstId": 196098772,
2875
+ // "lastId": 196186315,
2876
+ // "count": 87544
2876
2877
  // }
2877
2878
  //
2878
2879
  // coinm
2879
2880
  //
2880
2881
  // {
2881
- // baseVolume: '214549.95171161',
2882
- // closeTime: '1621965286847',
2883
- // count: '1283779',
2884
- // firstId: '152560106',
2885
- // highPrice: '39938.3',
2886
- // lastId: '153843955',
2887
- // lastPrice: '37993.4',
2888
- // lastQty: '1',
2889
- // lowPrice: '36457.2',
2890
- // openPrice: '37783.4',
2891
- // openTime: '1621878840000',
2892
- // pair: 'BTCUSD',
2893
- // priceChange: '210.0',
2894
- // priceChangePercent: '0.556',
2895
- // symbol: 'BTCUSD_PERP',
2896
- // volume: '81990451',
2897
- // weightedAvgPrice: '38215.08713747'
2882
+ // "baseVolume": "214549.95171161",
2883
+ // "closeTime": "1621965286847",
2884
+ // "count": "1283779",
2885
+ // "firstId": "152560106",
2886
+ // "highPrice": "39938.3",
2887
+ // "lastId": "153843955",
2888
+ // "lastPrice": "37993.4",
2889
+ // "lastQty": "1",
2890
+ // "lowPrice": "36457.2",
2891
+ // "openPrice": "37783.4",
2892
+ // "openTime": "1621878840000",
2893
+ // "pair": "BTCUSD",
2894
+ // "priceChange": "210.0",
2895
+ // "priceChangePercent": "0.556",
2896
+ // "symbol": "BTCUSD_PERP",
2897
+ // "volume": "81990451",
2898
+ // "weightedAvgPrice": "38215.08713747"
2898
2899
  // }
2899
2900
  //
2900
2901
  // eapi: fetchTicker, fetchTickers
@@ -3029,11 +3030,13 @@ export default class binance extends Exchange {
3029
3030
  * @name binance#fetchTicker
3030
3031
  * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
3031
3032
  * @see https://binance-docs.github.io/apidocs/spot/en/#24hr-ticker-price-change-statistics // spot
3033
+ * @see https://binance-docs.github.io/apidocs/spot/en/#rolling-window-price-change-statistics // spot
3032
3034
  * @see https://binance-docs.github.io/apidocs/futures/en/#24hr-ticker-price-change-statistics // swap
3033
3035
  * @see https://binance-docs.github.io/apidocs/delivery/en/#24hr-ticker-price-change-statistics // future
3034
3036
  * @see https://binance-docs.github.io/apidocs/voptions/en/#24hr-ticker-price-change-statistics // option
3035
3037
  * @param {string} symbol unified symbol of the market to fetch the ticker for
3036
3038
  * @param {object} [params] extra parameters specific to the binance api endpoint
3039
+ * @param {boolean} [params.rolling] (spot only) default false, if true, uses the rolling 24 hour ticker endpoint /api/v3/ticker
3037
3040
  * @returns {object} a [ticker structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure}
3038
3041
  */
3039
3042
  await this.loadMarkets();
@@ -3052,7 +3055,14 @@ export default class binance extends Exchange {
3052
3055
  response = await this.dapiPublicGetTicker24hr(this.extend(request, params));
3053
3056
  }
3054
3057
  else {
3055
- response = await this.publicGetTicker24hr(this.extend(request, params));
3058
+ const rolling = this.safeValue(params, 'rolling', false);
3059
+ params = this.omit(params, 'rolling');
3060
+ if (rolling) {
3061
+ response = await this.publicGetTicker(this.extend(request, params));
3062
+ }
3063
+ else {
3064
+ response = await this.publicGetTicker24hr(this.extend(request, params));
3065
+ }
3056
3066
  }
3057
3067
  if (Array.isArray(response)) {
3058
3068
  const firstTicker = this.safeValue(response, 0, {});
@@ -3725,7 +3735,7 @@ export default class binance extends Exchange {
3725
3735
  // to the maximum limit may be returned to satisfy other parameters
3726
3736
  // - if both limit and time window is set and time window contains more
3727
3737
  // trades than the limit then the last trades from the window are returned
3728
- // - 'tradeId' accepted and returned by this method is "aggregate" trade id
3738
+ // - "tradeId" accepted and returned by this method is "aggregate" trade id
3729
3739
  // which is different from actual trade id
3730
3740
  // - setting both fromId and time window results in error
3731
3741
  const response = await this[method](this.extend(request, params));
@@ -5234,9 +5244,7 @@ export default class binance extends Exchange {
5234
5244
  * @param {object} [params] extra parameters specific to the binance api endpoint
5235
5245
  * @returns {object[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
5236
5246
  */
5237
- if (symbol === undefined) {
5238
- throw new ArgumentsRequired(this.id + ' fetchOrderTrades() requires a symbol argument');
5239
- }
5247
+ this.checkRequiredSymbol('fetchOrderTrades', symbol);
5240
5248
  await this.loadMarkets();
5241
5249
  const market = this.market(symbol);
5242
5250
  const type = this.safeString(params, 'type', market['type']);
@@ -5886,7 +5894,7 @@ export default class binance extends Exchange {
5886
5894
  //
5887
5895
  // withdraw
5888
5896
  //
5889
- // { id: '9a67628b16ba4988ae20d329333f16bc' }
5897
+ // { id: "9a67628b16ba4988ae20d329333f16bc" }
5890
5898
  //
5891
5899
  const id = this.safeString2(transaction, 'id', 'orderNo');
5892
5900
  const address = this.safeString(transaction, 'address');
@@ -5924,9 +5932,10 @@ export default class binance extends Exchange {
5924
5932
  if (feeCost !== undefined) {
5925
5933
  fee = { 'currency': code, 'cost': feeCost };
5926
5934
  }
5927
- let internal = this.safeInteger(transaction, 'transferType');
5928
- if (internal !== undefined) {
5929
- internal = internal ? true : false;
5935
+ const internalInteger = this.safeInteger(transaction, 'transferType');
5936
+ let internal = undefined;
5937
+ if (internalInteger !== undefined) {
5938
+ internal = internalInteger ? true : false;
5930
5939
  }
5931
5940
  const network = this.safeString(transaction, 'network');
5932
5941
  return {
@@ -5968,12 +5977,12 @@ export default class binance extends Exchange {
5968
5977
  // fetchTransfers
5969
5978
  //
5970
5979
  // {
5971
- // timestamp: 1614640878000,
5972
- // asset: 'USDT',
5973
- // amount: '25',
5974
- // type: 'MAIN_UMFUTURE',
5975
- // status: 'CONFIRMED',
5976
- // tranId: 43000126248
5980
+ // "timestamp": 1614640878000,
5981
+ // "asset": "USDT",
5982
+ // "amount": "25",
5983
+ // "type": "MAIN_UMFUTURE",
5984
+ // "status": "CONFIRMED",
5985
+ // "tranId": 43000126248
5977
5986
  // }
5978
5987
  //
5979
5988
  const id = this.safeString(transfer, 'tranId');
@@ -6193,15 +6202,15 @@ export default class binance extends Exchange {
6193
6202
  const response = await this.sapiGetAssetTransfer(this.extend(request, params));
6194
6203
  //
6195
6204
  // {
6196
- // total: 3,
6197
- // rows: [
6205
+ // "total": 3,
6206
+ // "rows": [
6198
6207
  // {
6199
- // timestamp: 1614640878000,
6200
- // asset: 'USDT',
6201
- // amount: '25',
6202
- // type: 'MAIN_UMFUTURE',
6203
- // status: 'CONFIRMED',
6204
- // tranId: 43000126248
6208
+ // "timestamp": 1614640878000,
6209
+ // "asset": "USDT",
6210
+ // "amount": "25",
6211
+ // "type": "MAIN_UMFUTURE",
6212
+ // "status": "CONFIRMED",
6213
+ // "tranId": 43000126248
6205
6214
  // },
6206
6215
  // ]
6207
6216
  // }
@@ -6237,14 +6246,14 @@ export default class binance extends Exchange {
6237
6246
  const response = await this.sapiGetCapitalDepositAddress(this.extend(request, params));
6238
6247
  //
6239
6248
  // {
6240
- // currency: 'XRP',
6241
- // address: 'rEb8TK3gBgk5auZkwc6sHnwrGVJH8DuaLh',
6242
- // tag: '108618262',
6243
- // info: {
6244
- // coin: 'XRP',
6245
- // address: 'rEb8TK3gBgk5auZkwc6sHnwrGVJH8DuaLh',
6246
- // tag: '108618262',
6247
- // url: 'https://bithomp.com/explorer/rEb8TK3gBgk5auZkwc6sHnwrGVJH8DuaLh'
6249
+ // "currency": "XRP",
6250
+ // "address": "rEb8TK3gBgk5auZkwc6sHnwrGVJH8DuaLh",
6251
+ // "tag": "108618262",
6252
+ // "info": {
6253
+ // "coin": "XRP",
6254
+ // "address": "rEb8TK3gBgk5auZkwc6sHnwrGVJH8DuaLh",
6255
+ // "tag": "108618262",
6256
+ // "url": "https://bithomp.com/explorer/rEb8TK3gBgk5auZkwc6sHnwrGVJH8DuaLh"
6248
6257
  // }
6249
6258
  // }
6250
6259
  //
@@ -6300,79 +6309,79 @@ export default class binance extends Exchange {
6300
6309
  //
6301
6310
  // [
6302
6311
  // {
6303
- // coin: 'BAT',
6304
- // depositAllEnable: true,
6305
- // withdrawAllEnable: true,
6306
- // name: 'Basic Attention Token',
6307
- // free: '0',
6308
- // locked: '0',
6309
- // freeze: '0',
6310
- // withdrawing: '0',
6311
- // ipoing: '0',
6312
- // ipoable: '0',
6313
- // storage: '0',
6314
- // isLegalMoney: false,
6315
- // trading: true,
6316
- // networkList: [
6312
+ // "coin": "BAT",
6313
+ // "depositAllEnable": true,
6314
+ // "withdrawAllEnable": true,
6315
+ // "name": "Basic Attention Token",
6316
+ // "free": "0",
6317
+ // "locked": "0",
6318
+ // "freeze": "0",
6319
+ // "withdrawing": "0",
6320
+ // "ipoing": "0",
6321
+ // "ipoable": "0",
6322
+ // "storage": "0",
6323
+ // "isLegalMoney": false,
6324
+ // "trading": true,
6325
+ // "networkList": [
6317
6326
  // {
6318
- // network: 'BNB',
6319
- // coin: 'BAT',
6320
- // withdrawIntegerMultiple: '0.00000001',
6321
- // isDefault: false,
6322
- // depositEnable: true,
6323
- // withdrawEnable: true,
6324
- // depositDesc: '',
6325
- // withdrawDesc: '',
6326
- // specialTips: 'The name of this asset is Basic Attention Token (BAT). Both a MEMO and an Address are required to successfully deposit your BEP2 tokens to Binance.',
6327
- // name: 'BEP2',
6328
- // resetAddressStatus: false,
6329
- // addressRegex: '^(bnb1)[0-9a-z]{38}$',
6330
- // memoRegex: '^[0-9A-Za-z\\-_]{1,120}$',
6331
- // withdrawFee: '0.27',
6332
- // withdrawMin: '0.54',
6333
- // withdrawMax: '10000000000',
6334
- // minConfirm: '1',
6335
- // unLockConfirm: '0'
6327
+ // "network": "BNB",
6328
+ // "coin": "BAT",
6329
+ // "withdrawIntegerMultiple": "0.00000001",
6330
+ // "isDefault": false,
6331
+ // "depositEnable": true,
6332
+ // "withdrawEnable": true,
6333
+ // "depositDesc": '',
6334
+ // "withdrawDesc": '',
6335
+ // "specialTips": "The name of this asset is Basic Attention Token (BAT). Both a MEMO and an Address are required to successfully deposit your BEP2 tokens to Binance.",
6336
+ // "name": "BEP2",
6337
+ // "resetAddressStatus": false,
6338
+ // "addressRegex": "^(bnb1)[0-9a-z]{38}$",
6339
+ // "memoRegex": "^[0-9A-Za-z\\-_]{1,120}$",
6340
+ // "withdrawFee": "0.27",
6341
+ // "withdrawMin": "0.54",
6342
+ // "withdrawMax": "10000000000",
6343
+ // "minConfirm": "1",
6344
+ // "unLockConfirm": "0"
6336
6345
  // },
6337
6346
  // {
6338
- // network: 'BSC',
6339
- // coin: 'BAT',
6340
- // withdrawIntegerMultiple: '0.00000001',
6341
- // isDefault: false,
6342
- // depositEnable: true,
6343
- // withdrawEnable: true,
6344
- // depositDesc: '',
6345
- // withdrawDesc: '',
6346
- // specialTips: 'The name of this asset is Basic Attention Token. Please ensure you are depositing Basic Attention Token (BAT) tokens under the contract address ending in 9766e.',
6347
- // name: 'BEP20 (BSC)',
6348
- // resetAddressStatus: false,
6349
- // addressRegex: '^(0x)[0-9A-Fa-f]{40}$',
6350
- // memoRegex: '',
6351
- // withdrawFee: '0.27',
6352
- // withdrawMin: '0.54',
6353
- // withdrawMax: '10000000000',
6354
- // minConfirm: '15',
6355
- // unLockConfirm: '0'
6347
+ // "network": "BSC",
6348
+ // "coin": "BAT",
6349
+ // "withdrawIntegerMultiple": "0.00000001",
6350
+ // "isDefault": false,
6351
+ // "depositEnable": true,
6352
+ // "withdrawEnable": true,
6353
+ // "depositDesc": '',
6354
+ // "withdrawDesc": '',
6355
+ // "specialTips": "The name of this asset is Basic Attention Token. Please ensure you are depositing Basic Attention Token (BAT) tokens under the contract address ending in 9766e.",
6356
+ // "name": "BEP20 (BSC)",
6357
+ // "resetAddressStatus": false,
6358
+ // "addressRegex": "^(0x)[0-9A-Fa-f]{40}$",
6359
+ // "memoRegex": '',
6360
+ // "withdrawFee": "0.27",
6361
+ // "withdrawMin": "0.54",
6362
+ // "withdrawMax": "10000000000",
6363
+ // "minConfirm": "15",
6364
+ // "unLockConfirm": "0"
6356
6365
  // },
6357
6366
  // {
6358
- // network: 'ETH',
6359
- // coin: 'BAT',
6360
- // withdrawIntegerMultiple: '0.00000001',
6361
- // isDefault: true,
6362
- // depositEnable: true,
6363
- // withdrawEnable: true,
6364
- // depositDesc: '',
6365
- // withdrawDesc: '',
6366
- // specialTips: 'The name of this asset is Basic Attention Token. Please ensure you are depositing Basic Attention Token (BAT) tokens under the contract address ending in 887ef.',
6367
- // name: 'ERC20',
6368
- // resetAddressStatus: false,
6369
- // addressRegex: '^(0x)[0-9A-Fa-f]{40}$',
6370
- // memoRegex: '',
6371
- // withdrawFee: '27',
6372
- // withdrawMin: '54',
6373
- // withdrawMax: '10000000000',
6374
- // minConfirm: '12',
6375
- // unLockConfirm: '0'
6367
+ // "network": "ETH",
6368
+ // "coin": "BAT",
6369
+ // "withdrawIntegerMultiple": "0.00000001",
6370
+ // "isDefault": true,
6371
+ // "depositEnable": true,
6372
+ // "withdrawEnable": true,
6373
+ // "depositDesc": '',
6374
+ // "withdrawDesc": '',
6375
+ // "specialTips": "The name of this asset is Basic Attention Token. Please ensure you are depositing Basic Attention Token (BAT) tokens under the contract address ending in 887ef.",
6376
+ // "name": "ERC20",
6377
+ // "resetAddressStatus": false,
6378
+ // "addressRegex": "^(0x)[0-9A-Fa-f]{40}$",
6379
+ // "memoRegex": '',
6380
+ // "withdrawFee": "27",
6381
+ // "withdrawMin": "54",
6382
+ // "withdrawMax": "10000000000",
6383
+ // "minConfirm": "12",
6384
+ // "unLockConfirm": "0"
6376
6385
  // }
6377
6386
  // ]
6378
6387
  // }
@@ -6414,39 +6423,39 @@ export default class binance extends Exchange {
6414
6423
  //
6415
6424
  // [
6416
6425
  // {
6417
- // coin: 'BAT',
6418
- // depositAllEnable: true,
6419
- // withdrawAllEnable: true,
6420
- // name: 'Basic Attention Token',
6421
- // free: '0',
6422
- // locked: '0',
6423
- // freeze: '0',
6424
- // withdrawing: '0',
6425
- // ipoing: '0',
6426
- // ipoable: '0',
6427
- // storage: '0',
6428
- // isLegalMoney: false,
6429
- // trading: true,
6430
- // networkList: [
6426
+ // "coin": "BAT",
6427
+ // "depositAllEnable": true,
6428
+ // "withdrawAllEnable": true,
6429
+ // "name": "Basic Attention Token",
6430
+ // "free": "0",
6431
+ // "locked": "0",
6432
+ // "freeze": "0",
6433
+ // "withdrawing": "0",
6434
+ // "ipoing": "0",
6435
+ // "ipoable": "0",
6436
+ // "storage": "0",
6437
+ // "isLegalMoney": false,
6438
+ // "trading": true,
6439
+ // "networkList": [
6431
6440
  // {
6432
- // network: 'BNB',
6433
- // coin: 'BAT',
6434
- // withdrawIntegerMultiple: '0.00000001',
6435
- // isDefault: false,
6436
- // depositEnable: true,
6437
- // withdrawEnable: true,
6438
- // depositDesc: '',
6439
- // withdrawDesc: '',
6440
- // specialTips: 'The name of this asset is Basic Attention Token (BAT). Both a MEMO and an Address are required to successfully deposit your BEP2 tokens to Binance.',
6441
- // name: 'BEP2',
6442
- // resetAddressStatus: false,
6443
- // addressRegex: '^(bnb1)[0-9a-z]{38}$',
6444
- // memoRegex: '^[0-9A-Za-z\\-_]{1,120}$',
6445
- // withdrawFee: '0.27',
6446
- // withdrawMin: '0.54',
6447
- // withdrawMax: '10000000000',
6448
- // minConfirm: '1',
6449
- // unLockConfirm: '0'
6441
+ // "network": "BNB",
6442
+ // "coin": "BAT",
6443
+ // "withdrawIntegerMultiple": "0.00000001",
6444
+ // "isDefault": false,
6445
+ // "depositEnable": true,
6446
+ // "withdrawEnable": true,
6447
+ // "depositDesc": '',
6448
+ // "withdrawDesc": '',
6449
+ // "specialTips": "The name of this asset is Basic Attention Token (BAT). Both a MEMO and an Address are required to successfully deposit your BEP2 tokens to Binance.",
6450
+ // "name": "BEP2",
6451
+ // "resetAddressStatus": false,
6452
+ // "addressRegex": "^(bnb1)[0-9a-z]{38}$",
6453
+ // "memoRegex": "^[0-9A-Za-z\\-_]{1,120}$",
6454
+ // "withdrawFee": "0.27",
6455
+ // "withdrawMin": "0.54",
6456
+ // "withdrawMax": "10000000000",
6457
+ // "minConfirm": "1",
6458
+ // "unLockConfirm": "0"
6450
6459
  // },
6451
6460
  // ...
6452
6461
  // ]
@@ -6458,39 +6467,39 @@ export default class binance extends Exchange {
6458
6467
  parseDepositWithdrawFee(fee, currency = undefined) {
6459
6468
  //
6460
6469
  // {
6461
- // coin: 'BAT',
6462
- // depositAllEnable: true,
6463
- // withdrawAllEnable: true,
6464
- // name: 'Basic Attention Token',
6465
- // free: '0',
6466
- // locked: '0',
6467
- // freeze: '0',
6468
- // withdrawing: '0',
6469
- // ipoing: '0',
6470
- // ipoable: '0',
6471
- // storage: '0',
6472
- // isLegalMoney: false,
6473
- // trading: true,
6474
- // networkList: [
6470
+ // "coin": "BAT",
6471
+ // "depositAllEnable": true,
6472
+ // "withdrawAllEnable": true,
6473
+ // "name": "Basic Attention Token",
6474
+ // "free": "0",
6475
+ // "locked": "0",
6476
+ // "freeze": "0",
6477
+ // "withdrawing": "0",
6478
+ // "ipoing": "0",
6479
+ // "ipoable": "0",
6480
+ // "storage": "0",
6481
+ // "isLegalMoney": false,
6482
+ // "trading": true,
6483
+ // "networkList": [
6475
6484
  // {
6476
- // network: 'BNB',
6477
- // coin: 'BAT',
6478
- // withdrawIntegerMultiple: '0.00000001',
6479
- // isDefault: false,
6480
- // depositEnable: true,
6481
- // withdrawEnable: true,
6482
- // depositDesc: '',
6483
- // withdrawDesc: '',
6484
- // specialTips: 'The name of this asset is Basic Attention Token (BAT). Both a MEMO and an Address are required to successfully deposit your BEP2 tokens to Binance.',
6485
- // name: 'BEP2',
6486
- // resetAddressStatus: false,
6487
- // addressRegex: '^(bnb1)[0-9a-z]{38}$',
6488
- // memoRegex: '^[0-9A-Za-z\\-_]{1,120}$',
6489
- // withdrawFee: '0.27',
6490
- // withdrawMin: '0.54',
6491
- // withdrawMax: '10000000000',
6492
- // minConfirm: '1',
6493
- // unLockConfirm: '0'
6485
+ // "network": "BNB",
6486
+ // "coin": "BAT",
6487
+ // "withdrawIntegerMultiple": "0.00000001",
6488
+ // "isDefault": false,
6489
+ // "depositEnable": true,
6490
+ // "withdrawEnable": true,
6491
+ // "depositDesc": '',
6492
+ // "withdrawDesc": '',
6493
+ // "specialTips": "The name of this asset is Basic Attention Token (BAT). Both a MEMO and an Address are required to successfully deposit your BEP2 tokens to Binance.",
6494
+ // "name": "BEP2",
6495
+ // "resetAddressStatus": false,
6496
+ // "addressRegex": "^(bnb1)[0-9a-z]{38}$",
6497
+ // "memoRegex": "^[0-9A-Za-z\\-_]{1,120}$",
6498
+ // "withdrawFee": "0.27",
6499
+ // "withdrawMin": "0.54",
6500
+ // "withdrawMax": "10000000000",
6501
+ // "minConfirm": "1",
6502
+ // "unLockConfirm": "0"
6494
6503
  // },
6495
6504
  // ...
6496
6505
  // ]
@@ -7996,9 +8005,7 @@ export default class binance extends Exchange {
7996
8005
  * @param {object} [params] extra parameters specific to the binance api endpoint
7997
8006
  * @returns {object} response from the exchange
7998
8007
  */
7999
- if (symbol === undefined) {
8000
- throw new ArgumentsRequired(this.id + ' setLeverage() requires a symbol argument');
8001
- }
8008
+ this.checkRequiredSymbol('setLeverage', symbol);
8002
8009
  // WARNING: THIS WILL INCREASE LIQUIDATION PRICE FOR OPEN ISOLATED LONG POSITIONS
8003
8010
  // AND DECREASE LIQUIDATION PRICE FOR OPEN ISOLATED SHORT POSITIONS
8004
8011
  if ((leverage < 1) || (leverage > 125)) {
@@ -8034,9 +8041,7 @@ export default class binance extends Exchange {
8034
8041
  * @param {object} [params] extra parameters specific to the binance api endpoint
8035
8042
  * @returns {object} response from the exchange
8036
8043
  */
8037
- if (symbol === undefined) {
8038
- throw new ArgumentsRequired(this.id + ' setMarginMode() requires a symbol argument');
8039
- }
8044
+ this.checkRequiredSymbol('setMarginMode', symbol);
8040
8045
  //
8041
8046
  // { "code": -4048 , "msg": "Margin type cannot be changed if there exists position." }
8042
8047
  //
@@ -8559,10 +8564,10 @@ export default class binance extends Exchange {
8559
8564
  const orderidlistLength = orderidlist.length;
8560
8565
  const origclientorderidlistLength = orderidlist.length;
8561
8566
  if (orderidlistLength > 0) {
8562
- query = query + '&orderidlist=[' + orderidlist.join(',') + ']';
8567
+ query = query + '&' + 'orderidlist=[' + orderidlist.join(',') + ']';
8563
8568
  }
8564
8569
  if (origclientorderidlistLength > 0) {
8565
- query = query + '&origclientorderidlist=[' + origclientorderidlist.join(',') + ']';
8570
+ query = query + '&' + 'origclientorderidlist=[' + origclientorderidlist.join(',') + ']';
8566
8571
  }
8567
8572
  }
8568
8573
  else {
@@ -8928,10 +8933,10 @@ export default class binance extends Exchange {
8928
8933
  const response = await this.sapiPostGiftcardCreateCode(this.extend(request, params));
8929
8934
  //
8930
8935
  // {
8931
- // code: '000000',
8932
- // message: 'success',
8933
- // data: { referenceNo: '0033002404219823', code: 'AP6EXTLKNHM6CEX7' },
8934
- // success: true
8936
+ // "code": "000000",
8937
+ // "message": "success",
8938
+ // "data": { referenceNo: "0033002404219823", code: "AP6EXTLKNHM6CEX7" },
8939
+ // "success": true
8935
8940
  // }
8936
8941
  //
8937
8942
  const data = this.safeValue(response, 'data');
@@ -8961,13 +8966,13 @@ export default class binance extends Exchange {
8961
8966
  const response = await this.sapiPostGiftcardRedeemCode(this.extend(request, params));
8962
8967
  //
8963
8968
  // {
8964
- // code: '000000',
8965
- // message: 'success',
8966
- // data: {
8967
- // referenceNo: '0033002404219823',
8968
- // identityNo: '10316431732801474560'
8969
+ // "code": "000000",
8970
+ // "message": "success",
8971
+ // "data": {
8972
+ // "referenceNo": "0033002404219823",
8973
+ // "identityNo": "10316431732801474560"
8969
8974
  // },
8970
- // success: true
8975
+ // "success": true
8971
8976
  // }
8972
8977
  //
8973
8978
  return response;
@@ -8988,10 +8993,10 @@ export default class binance extends Exchange {
8988
8993
  const response = await this.sapiGetGiftcardVerify(this.extend(request, params));
8989
8994
  //
8990
8995
  // {
8991
- // code: '000000',
8992
- // message: 'success',
8993
- // data: { valid: true },
8994
- // success: true
8996
+ // "code": "000000",
8997
+ // "message": "success",
8998
+ // "data": { valid: true },
8999
+ // "success": true
8995
9000
  // }
8996
9001
  //
8997
9002
  return response;
@@ -9162,7 +9167,7 @@ export default class binance extends Exchange {
9162
9167
  * @param {int} [limit] default 30, max 500
9163
9168
  * @param {object} [params] exchange specific parameters
9164
9169
  * @param {int} [params.until] the time(ms) of the latest record to retrieve as a unix timestamp
9165
- * @returns {object} an array of [open interest history structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#interest-history-structure}
9170
+ * @returns {object} an array of [open interest structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#open-interest-structure}
9166
9171
  */
9167
9172
  if (timeframe === '1m') {
9168
9173
  throw new BadRequest(this.id + 'fetchOpenInterestHistory cannot use the 1m timeframe');
@@ -9229,7 +9234,7 @@ export default class binance extends Exchange {
9229
9234
  * @see https://binance-docs.github.io/apidocs/voptions/en/#open-interest
9230
9235
  * @param {string} symbol unified CCXT market symbol
9231
9236
  * @param {object} [params] exchange specific parameters
9232
- * @returns {object} an open interest structure{@link https://github.com/ccxt/ccxt/wiki/Manual#interest-history-structure}
9237
+ * @returns {object} an open interest structure{@link https://github.com/ccxt/ccxt/wiki/Manual#open-interest-structure}
9233
9238
  */
9234
9239
  await this.loadMarkets();
9235
9240
  const market = this.market(symbol);