binance / binance-api-postman

Postman collection for Binance Public API, including spot, margin, futures, etc.
MIT License
1.32k stars 883 forks source link

401 Unauthorized on some (but not all) test-services?! #70

Closed TAFKAMW closed 3 years ago

TAFKAMW commented 3 years ago

I'm tyring to follow the (very excellent) 'Binance API Series Pt. I – Spot Trading with Postman'.

Of course I did the steps for creating a test user (1610642226219045601), but still I get a '401 Unauthorized' error with the JSON-response below for several of the services that are described in the tutorial. Among the failing services are very relevant ones like /account and /order.

{
    "code": -2015,
    "msg": "Invalid API-key, IP, or permissions for action."
}

I'm guessing it has something to do with the signature that has to be filled in for these services? Postman is so kind as to generate these, but I can imagine this should be some fixed value, since it is supposed to "prove that we’re the account holder."?!

2pd commented 3 years ago

The official postman collection hashes the signature before sending the request automatically. Please check if you have created the environment file and provide the correct API key. Also please check the base url:

Use the base url where the API key is created.