DERIBIT_RETRY_ERROR_CODES

Static DERIBIT_RETRY_ERROR_CODES 

Source
pub static DERIBIT_RETRY_ERROR_CODES: LazyLock<AHashSet<i64>>
Expand description

Deribit error codes that should trigger retries.

Only retry on temporary network/system issues that are likely to resolve. Based on Deribit API documentation error codes.

§Error Code Categories

Retriable (temporary issues):

  • 10028: “too_many_requests” - Rate limit exceeded
  • 10040: “retry” - Explicitly says request should be retried
  • 10041: “settlement_in_progress” - Settlement calculation in progress (few seconds)
  • 10047: “matching_engine_queue_full” - Matching engine queue full
  • 10066: “too_many_concurrent_requests” - Too many concurrent public requests
  • 11051: “system_maintenance” - System under maintenance
  • 11094: “internal_server_error” - Unhandled server error
  • 13028: “temporarily_unavailable” - Service not responding or too slow
  • 13888: “timed_out” - Server timeout processing request

Non-retriable (permanent errors):

  • 10000: “authorization_required” - Auth issue, invalid signature
  • 10004: “order_not_found” - Order can’t be found
  • 10009: “not_enough_funds” - Insufficient funds
  • 10020: “invalid_or_unsupported_instrument” - Invalid instrument name
  • 10029: “not_owner_of_order” - Attempt to operate with not own order
  • 11029: “invalid_arguments” - Invalid input detected
  • 11050: “bad_request” - Request not parsed properly
  • 13004: “invalid_credentials” - Invalid API credentials
  • 13009: “unauthorized” - Wrong/expired token or bad signature
  • 13020: “not_found” - Instrument not found
  • 13021: “forbidden” - Not enough permissions

§References

https://docs.deribit.com/#rpc-error-codes