Overview
The Rust SDK provides:
- structured
LimitlessError variants
- HTTP
ApiError details with status, method, URL, and response payload
- reusable retry helpers via
with_retry and RetryableClient
- optional logging hooks for retry visibility
Error types
All SDK methods return:
LimitlessError
Inspecting API errors
Authentication-required errors
The SDK fails early for authenticated methods when no credentials are configured:
with_retry
Use with_retry() to wrap any async operation:
By default, retries are enabled for:
429
500
502
503
504
- connection failures
- timeouts
425 Too Early is not retried by default. If the API body has a trading-mode code, refresh maintenance status and do not retry the same blocked action. Otherwise, treat POST /orders failures as receive-window failures and rebuild a fresh signed order.
RetryableClient
Use RetryableClient when you want a retrying HTTP transport wrapper:
You can still build the root Client from the same HttpClient:
Retry callbacks
Attach a callback to observe retry attempts:
Logging
Retry helpers accept an optional SharedLogger. Use ConsoleLogger during integration work:
For trading systems, treat InvalidInput and AuthenticationRequired as non-retryable. Retries are most useful for transient HTTP failures, rate limits, and network timeouts.