Overview
The Limitless Exchange Python SDK (limitless-sdk) is an async-first Python client built on top of aiohttp. It provides:
- Fully asynchronous HTTP and WebSocket clients
- Pydantic models for type-safe request and response handling
- Automatic venue caching for EIP-712 order signing
- Built-in retry logic for transient API failures
- WebSocket streaming with auto-reconnect
The SDK requires Python 3.9+ and uses
async/await throughout. All network calls must be awaited inside an asyncio event loop.Installation
Quick Start
Authentication
The SDK authenticates using an API key passed via theX-API-Key header.
- Environment variable (recommended)
- Explicit parameter
Set the
LIMITLESS_API_KEY environment variable. The HttpClient loads it automatically:Client constructor
The recommended entrypoint is the rootClient class, which composes all domain services (markets, portfolio, orders, API tokens, partner accounts, delegated orders):
| Parameter | Type | Default | Description |
|---|---|---|---|
base_url | str | https://api.limitless.exchange | API base URL |
api_key | str | None | None (reads LIMITLESS_API_KEY env) | API key for authentication |
hmac_credentials | HMACCredentials | None | None | HMAC credentials for scoped API token auth (see Programmatic API) |
additional_headers | dict | None | None | Extra headers merged into every request |
HttpClient (lower-level)
You can also useHttpClient directly for more control:
Logging
The SDK provides aConsoleLogger with configurable log levels for debugging:
| Level | Description |
|---|---|
LogLevel.DEBUG | Verbose output including headers, venue cache operations, and raw payloads |
LogLevel.INFO | General operational messages |
LogLevel.WARN | Warnings about potential issues |
LogLevel.ERROR | Errors only |
Source Code
The SDK is open source. Contributions and issue reports are welcome.GitHub Repository
Browse the source, report issues, and contribute at github.com/limitless-labs-group/limitless-sdk
Disclaimer
Next Steps
Markets
Discover markets, fetch orderbooks, and understand venue caching.
Market Pages
Browse markets by category with navigation, filters, and pagination.
Trading & Orders
Place GTC and FOK orders, cancel orders, and manage token approvals.
Portfolio & Positions
Track your open positions and trading history.
API Tokens
Derive, list, and revoke scoped HMAC tokens for partner integrations.
Partner Accounts
Create sub-accounts with server wallets or EOA verification.
Delegated Orders
Place orders on behalf of sub-accounts with server-side signing.
WebSocket Streaming
Subscribe to real-time orderbook and price updates.
Error Handling & Retry
Retry logic, error types, and debugging strategies.