How to get Account info with User Data Stream?
See original GitHub issueSorry if this is a bit off topic (using raw Node with ws), but maybe someone who answers could explain how to do this with node-binance-api
? Although just vanilla node answer would be GREATLY appreciated too =)))
I’m using Node and the ws
npm package to work with WebSockets. Got the listenKey as stated in the docs, but I’m unable to get my account info used User Data Stream. I’d prefer to use a stream to read my most current account info (balances, etc) since using the Rest API to do it incurs a penalty (WEIGHT: 5) each time.
The User Data Stream docs say “Account state is updated with the outboundAccountInfo event.” Does that mean that you can only update your account via the stream, but not read your current account info?
I’ve tried doing ws.send('outboundAccountInfo')
and then have a ws.on('message', msg => { console.log(msg)})
but no joy.
DOCS: https://github.com/binance-exchange/binance-official-api-docs/blob/master/user-data-stream.md
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:6 (2 by maintainers)
@jaggedsoft Thank you very much for answering my above question. Can you help create a simple
ws
implementation? What am I missing in the code below? I really want to beat this one 😉@jaggedsoft That’s about the nicest compliment I’ve received in a while!!! It’s all yours. Unfortunately my implementation above does not return any data, but also does not error out =( Thanks for the help all the same!!