TraderSDKdocs

Concepts

Feature flags#

The tradersdk facade crate uses Cargo features so you only compile what you use.

[dependencies]
tradersdk = { git = "https://github.com/suenot/tradersdk", default-features = false, features = ["bybit", "binance", "notifications"] }

Exchanges#

The default feature full enables all 20 exchanges. Each exchange also has its own feature, named as the string you pass to create_trader:

binance, bybit, okx, gate, bitget, bingx, mexc, kucoin, htx, kraken, deribit, hyperliquid, bitfinex, bitmart, coinex, lbank, phemex, xt, weex, ourbit.

Enabling an exchange feature compiles the adapter and registers it in create_trader. supported_exchanges() returns the names compiled into your build.

Optional utilities#

These re-export the supporting crates from the facade:

Feature Crate What it adds
trading tradersdk-trading PnL, position sizing, symbol formatting, exit grids.
utils tradersdk-utils Retry, rate limiting, circuit breaking.
storage tradersdk-storage In-memory TTL cache, file persistence.
notifications tradersdk-notifications Telegram and webhook alerts.
monitoring tradersdk-monitoring Detects markets added to or removed from an exchange.
proxy tradersdk-proxy Proxy rotation with cooldown, request scheduling.
warming tradersdk-warming Connection pre-warming.
signal tradersdk-signal Signal parsing and routing.
price-cache tradersdk-price-cache Price cache with CoinGecko backfill.
leverage-cache tradersdk-leverage-cache Per-symbol leverage limits, cached.
api tradersdk-api HTTP API for exercising adapters.

Not every feature re-exports its crate as a module of tradersdk. If you do not see the module you expect, depend on the crate directly. See the crate reference.

Using one crate without the facade#

Each crate stands alone. If you only need the trait and models, depend on tradersdk-core. If you need one exchange, depend on the adapter crate:

tradersdk-core = { git = "https://github.com/suenot/tradersdk" }
tradersdk-bybit = { git = "https://github.com/suenot/tradersdk" }

Edit this page on GitHub ↗