0

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.

mdalizyx
  • 27
  • 1
  • 7

2 Answers2

1

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.

Petr Hejda
  • 40,554
  • 8
  • 72
  • 100
  • 1
    Good solution. With AcountBalance, you can {Alias}. Then you store a List aliasList for one user to support querying in the future – Long Do Thanh May 22 '22 at 20:48
0

You can query "/fapi/v2/balance" with User's Balances. Every Balance has field "accountAlias", which is unique per user as Binance API Docs states

Eugene
  • 11
  • 5