python-binance

FAQ

Frequently asked questions about python-binance

Why do I get "Timestamp for this request is not valid"?

This occurs in 2 different cases:

  1. The timestamp sent is outside of the serverTime - recvWindow value
  2. The timestamp sent is more than 1000ms ahead of the server time

Check that your system time is in sync. See this issue for sample code to check the difference.

Why do I get "Signature for this request is not valid"?

A1: One of your parameters may not be in the correct format. Check recvWindow is an integer and not a string.

A2: You may need to regenerate your API Key and Secret.

A3: You may be attempting to access the API from a Chinese IP address, which are restricted by Binance.

How can I debug API issues?

Enable verbose mode to see detailed request and response information:

client = Client(api_key, api_secret, verbose=True)

This logs all HTTP requests and responses, including headers, body, and status codes. See the Configuration guide for more details.

On this page