Limitless Exchange Rust SDK
v1.0.7 | Rust SDK parity with the existing Limitless SDK surface
Rust SDK for interacting with the Limitless Exchange API.
This crate is a parity-driven Rust port of the existing Limitless SDK surface. The current implementation includes:
- shared HTTP client with API key, identity-header, and HMAC auth support
- typed API errors and retry helpers
- root
Client - markets, portfolio, and market-pages services
- partner api-token, partner-account, and server-wallet services
- order builder, validator, EIP-712 signer, and order client
- delegated-order service
- websocket types and socket.io client surface
USE AT YOUR OWN RISK
This SDK is provided "as-is" without any warranties or guarantees. Trading on prediction markets involves financial risk. By using this SDK, you acknowledge that:
- You are responsible for testing the SDK thoroughly before using it in production
- The SDK authors are not liable for any financial losses or damages
- You should review and understand the code before executing any trades
- It is recommended to test all functionality on testnet or with small amounts first
- The SDK may contain bugs or unexpected behavior despite best efforts
ALWAYS TEST BEFORE USING IN PRODUCTION WITH REAL FUNDS
For production use, we strongly recommend:
- Running comprehensive tests with your specific use case
- Starting with small transaction amounts
- Monitoring all transactions carefully
- Having proper error handling and recovery mechanisms
Geographic Restrictions
Important: Limitless restricts order placement from US locations due to regulatory requirements and compliance with international sanctions. Before placing orders, builders should verify their location complies with applicable regulations.
Status
This is the first full-surface parity pass. The crate is implemented against the Go SDK shape and verified locally with:
cargo fmtcargo check --examplescargo test
Installation
[]
= "1.0.7"
Authentication Modes
- Public read-only endpoints: no authentication required. Use these for active markets, market pages, and orderbooks.
- API key authentication: required for portfolio and standard order-placement flows.
- HMAC-scoped authentication: used for partner/delegated/server-wallet flows and can also authenticate websocket position streams.
The SDK reads LIMITLESS_API_KEY automatically when present, or you can configure credentials explicitly with Client::builder().
Quick Start
Public Market Data
use ;
async
Authenticated Portfolio Access
use env;
use Client;
async
Signed Order Placement
use env;
use ;
async
Workflow Guide
- Public market discovery: examples/active_markets.rs
- Custom client builder and logging: examples/custom_client.rs
- Market-page discovery and filtered browsing: examples/market_pages.rs
- Portfolio and cursor-based history: examples/portfolio.rs
- User-order retrieval and market cancel-all: examples/user_orders.rs
- Signed CLOB orders:
- NegRisk order flow: examples/negrisk_order.rs
- Delegated partner flows:
- delegated order: examples/delegated_order.rs
- delegated FOK order: examples/delegated_fok_order.rs
- API-token revoke flow: examples/api_token_revoke.rs
- Server-wallet redeem/withdraw flow: examples/server_wallet_redeem_withdraw.rs
- WebSocket subscriptions:
- orderbook: examples/websocket_orderbook.rs
- positions and transactions: examples/websocket_positions.rs
Examples
The repository includes the same example catalog as the Go SDK under examples/:
cargo run --example active_marketscargo run --example custom_clientcargo run --example market_pagescargo run --example portfoliocargo run --example user_orderscargo run --example api_tokenscargo run --example api_token_revokecargo run --example clob_gtc_ordercargo run --example clob_fak_ordercargo run --example clob_fok_ordercargo run --example negrisk_ordercargo run --example delegated_ordercargo run --example delegated_fok_ordercargo run --example e2e_fok_flowcargo run --example server_wallet_redeem_withdrawcargo run --example websocket_orderbookcargo run --example websocket_positions
See examples/README.md for required environment variables and per-example notes.