I have not used this API in a while, today i used it again and things work differently.
i download margin account info using “sapi/v1/margin/account”
i borrow using “sapi/v1/margin/loan”
here is what i do step by step:
- i start with an account without any borrowed ETH
- i borrow 0.02 ETH
- i download margin account info it returns:
{“asset”:“ETH”,“free”:“0.00013811”,“locked”:“0”,“borrowed”:“0.02”,“interest”:“0.00000009”,“netAsset”:“-0.01986198”}
notice how free does not contain the borrowed amount and netAsset is negative - wait for 2 seconds and download margin account info again
{“asset”:“ETH”,“free”:“0.02013811”,“locked”:“0”,“borrowed”:“0.02”,“interest”:“0.00000009”,“netAsset”:“0.00013802”}
notice how now free contains the borrowed amount and netAsset is positive
in the past it would show the borrowed amount also in free as soon as i requested the margin account info.
did something change?
i also noticed delay after i execute an order, it takes sometime until the amount shows up in free.