Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'available balance' via WS? #47

Open
LKresta opened this issue Nov 3, 2022 · 0 comments
Open

'available balance' via WS? #47

LKresta opened this issue Nov 3, 2022 · 0 comments

Comments

@LKresta
Copy link

LKresta commented Nov 3, 2022

Hello,

is there a way to get/compute 'available balance' based on WS notifications?

When REST API is used to obtain account balance (https://www.gate.io/docs/developers/apiv4/en/#query-futures-account) the information includes total and available amounts (and doesn't include any sort of 'valid as of' time). WS notification (https://www.gate.io/docs/developers/futures/ws/en/#positions-notification) only provides total amount and change amount. But the available amount likely does not follow the same change. Is there a way to compute/keep track of it?

E.g. since total = position_margin + order_margin + available and position margin is part of position updates if I had the order_margin I could compute the available amount myself. But I don't know where to get order_margin from/how to keep track of it.

Thanks,
L.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant