Introduction#
TraderSDK is an open-source Rust SDK for crypto trading. It puts one trait, ExchangeTrader, in front of 20 exchanges, so a strategy written once can run on Binance, Bybit, OKX or any other supported venue by changing a single string. It covers spot and perpetual markets. A Python wrapper is built from the same code.
use tradersdk::prelude::*;
let trader = create_trader("bybit", credentials, MarketType::Swap)?;
let price = trader.get_current_price("BTCUSDT").await?;
Swap "bybit" for "binance", "okx" or "gate" and the rest of the program stays the same.
What is in the box#
- One trait.
ExchangeTraderdefines market data, account, leverage and order operations in one async interface. See The ExchangeTrader trait. - 20 adapters. One crate per exchange, each behind a Cargo feature flag. See Exchanges for the support matrix.
- Capability reporting. Coverage is not uniform, so each adapter reports what it supports. See Capabilities.
- Trading utilities. PnL and position-sizing helpers, caches, proxy rotation, alerts, market monitoring. See Utilities and the crate list.
- Python bindings. PyO3 wrappers over the same traders. See Python.
What it is not#
TraderSDK is a client library. It does not run a strategy for you, store your history, or hide exchange differences that matter. Where an exchange cannot do something, the SDK tells you through capabilities or returns an error instead of pretending.
Pre-1.0. The trait is stable in shape but not frozen. Minor releases may change it while adapter coverage fills in. Pin a commit if that matters to you. Details in Status.
How these docs are organized#
| Section | Read it when |
|---|---|
| Installation, Quickstart | You want a working program in five minutes. |
| Concepts | You want to understand the design: the trait, capabilities, symbols, errors, feature flags. |
| Guides | You have a task: read prices, place orders, stream order updates, use Python. |
| Reference | You need exact types, crates, per-exchange coverage, or the Python API. |
| FAQ | Something is surprising. |