Harbor SDK
account
rt.account 只读。它用来决定能不能下单,不能用来挪动资金。
| 方法 | 返回 |
|---|---|
| getBalance | free、used、total,按币种的字符串数量 |
| getPositions | symbol、side(long 或 short)、amount、entryPrice、leverage |
| getLeverage | 该 symbol 的杠杆字符串 |
| getFees | maker 与 taker |
没有提现,也没有划转。现货策略用余额判断还能买多少;合约策略用持仓判断是不是空仓。permissions 里要包含 account。
const positions = await rt.account.getPositions(); const fees = await rt.account.getFees(symbol);
