API to get client IP?

Since API calls can be locked with IP access restrictions, it would be helpful if there was an API call that returned the caller’s IP address as seen by Binance.

Hi, this seems to be a concern that would be much easier to be managed locally than having the need to recur to the API call, as the IP address is defined by the client.

The IP address that the client uses to access Binance is not necessarily the IP address that the access comes from.

For example, if the client is behind NAT, the client’s IP address is NOT the address that Binance sees.

Hosting providers, such as AWS, often use internal vs external IP addresses.

Being able to ask Binance the IP address used for access means that the person running said client has the right information for setting the IP restriction.

Try to do one harmless thing on fapi (for e.g. get your futures account balance), if it’s rejected, youcan get the request ip in the reject msg

Do you get the IP if it is blocked for your account?

You’d get something like this:
“code”: -2015,
“msg”: “Invalid API-key, IP, or permissions for action, request ip: xxxx”
Try it yourself