Crates and features#
The tradersdk facade crate re-exports the workspace. Its default feature full turns on all twenty exchange adapters. With default-features = false you pick what you compile.
Always present#
| Crate | Purpose |
|---|---|
tradersdk-core |
The ExchangeTrader trait, shared models, the error type and the capability table. |
tradersdk-providers |
create_trader, supported_exchanges and ExchangeCredentials. Adapters are compiled in by their features. |
Exchange adapters#
One crate and one feature per exchange, all named tradersdk-<name> / <name>:
bybit, bingx, binance, gate, okx, bitget, mexc, hyperliquid, kraken, kucoin, deribit, phemex, xt, htx, bitfinex, bitmart, coinex, lbank, weex, ourbit.
See Exchanges for what each supports.
Optional crates#
| Crate | Feature | Purpose |
|---|---|---|
tradersdk-trading |
trading |
Position size, PnL, grid and split orders, symbol formatting. |
tradersdk-utils |
utils |
Retry with backoff, time helpers. |
tradersdk-proxy |
proxy |
Proxy rotation and a request scheduler. |
tradersdk-storage |
storage |
Memory cache, JSON file store, PnL tracker. |
tradersdk-price-cache |
price-cache |
USD price file cache with CoinGecko. |
tradersdk-leverage-cache |
leverage-cache |
Leverage limits from a JSON file. |
tradersdk-monitoring |
monitoring |
Detect new and removed markets. |
tradersdk-notifications |
notifications |
Telegram and webhook alerts. |
tradersdk-warming |
warming |
Server-time pings and latency metrics. |
tradersdk-signal |
signal |
Duplicate filter for text signals. |
tradersdk-api |
api |
Axum HTTP server for testing adapters. |
Details and examples: Utility crates.
Separate crates#
| Crate | Notes |
|---|---|
tradersdk-python |
PyO3 module tradersdk, built with maturin. BingX and Bybit only. See Python. |
tradersdk-schema-export |
Binary that writes JSON Schema for the core models. Not published. |
Choosing features#
# Only Bybit and Binance, plus position math
tradersdk = { git = "https://github.com/suenot/tradersdk", default-features = false, features = ["bybit", "binance", "trading"] }
supported_exchanges() returns only the adapters compiled into your build. Asking create_trader for an exchange whose feature is off returns Unsupported exchange: <name>. More in Feature flags.