For information on changes for our US clients, please visit our Support Center article.

A causa dell’incremento della domanda, la verifica dell’account potrebbe subire ritardi. Evita di inviare più richieste e, per ottenere risultati migliori, rivedi in anticipo i requisiti del documento.
Cerca
Why am I getting invalid nonce errors?
An EAPI:Invalid nonce error indicates that an API request was received with a repeated or lower than expected nonce value.
Since the nonce value must be unique and must increase with every request, you may run into errors when trying to make simultaneous requests, or requests in rapid succession, or when attempting to use a single API key for multiple devices/apps/bots.
As an example, two simultaneous API requests might not arrive in the intended order, and if the second request (with a higher nonce) arrives before the first request (with a lower nonce), the first request would be rejected when it finally arrives.
As invalid nonce errors will cause your API requests to fail (your orders not to be placed, for example), invalid nonce errors should not simply be ignored, but should be corrected by improving the nonce creation algorithm (see some solutions below).
 

Solutions

Some potential solutions for invalid nonce errors are as follows:
  1. 1
    Create multiple API keys and use a different key for each simultaneous request, each device/app, each trading bot, etc. Each API key has its own separate nonce value, so the order in which API requests arrive would no longer be an issue.
  2. 2
    Increase the nonce resolution so as to allow additional requests during the same time frame (increasing the nonce resolution from milliseconds to tenths of milliseconds, for example).
  3. 3
    Increase/widen the nonce window for your API keys so as to provide a short time frame during which invalid nonce values would not cause an error. Note that this solution should only be used to overcome networking issues, not as a way to ignore invalid nonce errors entirely.