Loading ...

哪位老哥帮忙取一下账户BNB余额,用的exchange.IO

Author: , Created: 2020-11-25 01:05:18, Updated: 2020-11-25 01:25:35

var a123 =exchange.IO("api",“GET”,"/api/v3/account");

这是返回数据

账户BNB可用余额 {“takerCommission”:10,“canTrade”:true,“canDeposit”:true,“permissions”:[“SPOT”],“makerCommission”:10,“buyerCommission”:0,“sellerCommission”:0,“canWithdraw”:true,“updateTime”:1606236477885,“accountType”:“SPOT”,“balances”:[{“asset”:“BTC”,“free”:“0.00000000”,“locked”:“0.00000000”},{“asset”:“LTC”,“free”:“0.00000000”,“locked”:“0.00000000”},{“asset”:“ETH”,“free”:“0.00000000”,“locked”:“0.00000000”},{“asset”:“NEO”,“free”:“0.00000000”,“locked”:“0.00000000”},{“asset”:“BNB”,“free”:“1.46552484”,“locked”:“0.00000000”},{“asset”:“QTUM”,“free”:“0.00000000”,“locked”:“0.00000000”},{“locked”:“0.00000000”,“asset”:“EOS”,“free”:“0.00000000”},{“asset”:“SNT”,“free”:“0.00000000”,“locked”:“0.00000000”},{“asset”:“BNT”,“free”:“0.00000000”,“locked”:“0.00000000”},{“asset”:“GAS”,“free”:“0.00000000”,“locked”:“0.00000000”},{“asset”:“BCC”,“free”:“0.00000000”,“locked”:“0.00000000”}, {“asset”:“USDT”,“free”:“0”,“locked”:“0.00000000”},{“asset”:“HSR”,“free”:“0.00000000”,“locked”:“0.00000000”},{“asset”:“OAX”,“free”:“0.00000000”,“locked”:“0.00000000”},{“asset”:“DNT”,“free”:“0.00000000”,“locked”:“0.00000000”},{“asset”:“MCO”,“free”:“0.00000000”,“locked”:“0.00000000”},{“asset”:“ICN”,“free”:“0.00000000”,“locked”:“0.00000000”},{“asset”:“ZRX”,“free”:“0.00000000”,“locked”:“0.00000000”},{“asset”:“OMG”,“free”:“0.00000000”,“locked”:“0.00000000”},{“asset”:“WTC”,“free”:“0.00000000”,“locked”:“0.00000000”},{“asset”:“YOYO”,“free”:“0.00000000”,“locked”:“0.00000000”},{“asset”:“LRC”,“free”:“0.00000000”,“locked”:“0.00000000”},{“asset”:“TRX”,“free”:“0.00000000”,“locked”:“0.00000000”},{“asset”:“SNGLS”,“free”:“0.00000000”,“locked”:“0.00000000”},{“asset”:“STRAT”,“free”:“0.00000000”,“locked”:“0.00000000”},{“free”:“0.00000000”,“locked”:“0.00000000”,“asset”:“BQX”},{“asset”:“FUN”,“free”:“0.00000000”,“locked”:“0.00000000”},{“asset”:“KNC”,“free”:“0.00000000”,“locked”:“0.00000000”},{“locked”:“0.00000000”,“asset”:“CDT”,“free”:“0.00000000”},{“asset”:“XVG”,“free”:“0.00000000”,“locked”:“0.00000000”},{“asset”:“IOTA”,“free”:“0.00000000”,“locked”:“0.00000000”}

取{“asset”:“BNB”,“free”:“1.46552484”,“locked”:“0.00000000”}, free":“1.46552484”

感谢


More

小草 循环a123.balances,当a123.balances[i].asset=='BNB'就取到了,这些太基础了,先补习一下js的知识

谢谢 谢谢