Expand description
Provides an ergonomic wrapper around the OKX v5 REST API – https://www.okx.com/docs-v5/en/.
The core type exported by this module is OKXHttpClient. It offers an
interface to all exchange endpoints currently required by NautilusTrader.
Key responsibilities handled internally:
• Request signing and header composition for private routes (HMAC-SHA256).
• Rate-limiting based on the public OKX specification.
• Zero-copy deserialization of large JSON payloads into domain models.
• Conversion of raw exchange errors into the rich OKXHttpError enum.
§Official documentation
| Endpoint | Reference |
|---|---|
| Market data | https://www.okx.com/docs-v5/en/#rest-api-market-data |
| Account & positions | https://www.okx.com/docs-v5/en/#rest-api-account |
| Funding & asset balances | https://www.okx.com/docs-v5/en/#rest-api-funding |
Structs§
- OKXHttp
Client - Provides a higher-level HTTP client for the OKX REST API.
- OKXRaw
Http Client - Provides a raw HTTP client for interacting with the OKX REST API.
- OKXResponse
- Represents an OKX HTTP response.
Statics§
- OKX_
REST_ QUOTA - Default OKX REST API rate limit: 500 requests per 2 seconds.