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 exceeded10040: “retry” - Explicitly says request should be retried10041: “settlement_in_progress” - Settlement calculation in progress (few seconds)10047: “matching_engine_queue_full” - Matching engine queue full10066: “too_many_concurrent_requests” - Too many concurrent public requests11051: “system_maintenance” - System under maintenance11094: “internal_server_error” - Unhandled server error13028: “temporarily_unavailable” - Service not responding or too slow13888: “timed_out” - Server timeout processing request
Non-retriable (permanent errors):
10000: “authorization_required” - Auth issue, invalid signature10004: “order_not_found” - Order can’t be found10009: “not_enough_funds” - Insufficient funds10020: “invalid_or_unsupported_instrument” - Invalid instrument name10029: “not_owner_of_order” - Attempt to operate with not own order11029: “invalid_arguments” - Invalid input detected11050: “bad_request” - Request not parsed properly13004: “invalid_credentials” - Invalid API credentials13009: “unauthorized” - Wrong/expired token or bad signature13020: “not_found” - Instrument not found13021: “forbidden” - Not enough permissions