Search code examples
binancebinance-api-client

Binance API : How to get Binance User ID using API


How to get Binance User ID using API. I just created a bot and I need unique value to create a bot activation so a user can use my bot only for that account.

That is why I need a User ID by Binance API. How can I get a User ID or get any other unique value like a User ID by API.


Solution

  • Binance does not share any unique ID of each user, most likely for privacy reasons.

    You can partially bypass this limitation by querying balances of each API key. If there are two API keys with the same set of balances, chances are it's the same user. Mind that this solution is not easily scalable. With thousands of users you'll have to run thousands of requests to get their balances. And probably cache these results, so that you don't run into rate limits (number of API requests from your server IP), which introduces another inaccuracies.