Closed bda2206 closed 4 years ago
Hi @bda2206
You can get balance by this request
x.Socket.send.getMarginLevel().then(r => console.log(r))
You will get this response type
{
balance: number
credit: number
currency: string
equity: number
margin: number
margin_free: number
margin_level: number
}
This docs (https://peterszombati.github.io/xapi-node/) can help you in the future every commands are exists in functions in xapi-node
Hi, final question I hope, How do I getBalance? I've set up the same callback as for trades but nothing ever comes through. is there a command to request the info to the callback?
Oh I see I get a balance if there are trades going. but not before?
thanks