> For the complete documentation index, see [llms.txt](https://docs.strike.fun/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.strike.fun/sdk/overview.md).

# Overview

The Strike SDK is a Rust crate for programmatic trading on Strike prediction markets. It wraps all on-chain interactions — order placement, collateral management, event streaming, and market reads — into a typed, async API.

## Design Philosophy

The SDK is **on-chain first**. All trading operations go directly to BNB Chain via RPC. Live data (events, balances, market state) comes from a WSS subscription or RPC reads. The [indexer](/sdk/indexer.md) is available for startup snapshots (fetching all markets, orderbook state, wallet positions, redeem backlog), but is never in the critical trading path.

## Features

| Feature               | Description                                                                               |
| --------------------- | ----------------------------------------------------------------------------------------- |
| Order management      | Place, cancel, and replace orders in batch transactions                                   |
| Event streaming       | Real-time WSS subscriptions with auto-reconnect                                           |
| Vault & tokens        | USDT approval, balance queries, outcome token / position operations                       |
| On-chain market reads | Market counts/IDs plus `market_meta(factory_market_id)` for factory-to-orderbook metadata |
| Indexer client        | REST client for market snapshots, wallet positions, redeem backlog, and orderbook state   |
| Nonce manager         | Optional `nonce-manager` feature flag for bots sending rapid transactions                 |

Wallet position helpers normalize known schema drift in filled-position and redeemable payloads, so integrations can use stable accessors instead of decoding multiple indexer variants themselves.

## Preset Configs

Use `StrikeConfig::bsc_mainnet()` for BSC mainnet with default RPC, WSS, and indexer endpoints. See [Client Configuration](/sdk/client.md) for custom setups.

## Feature Flags

```toml
[dependencies]
strike-sdk = "0.2"           # nonce-manager enabled by default
strike-sdk = { version = "0.2", default-features = false }  # disable nonce-manager
```

The `nonce-manager` feature enables `NonceSender`, a local nonce tracker for rapid transaction sending. It re-syncs and retries on simple nonce drift, and handles pending mempool conflicts conservatively without blind replacement retries. Enabled by default — disable it if you manage nonces externally.

## Installation

Add to your `Cargo.toml`:

```toml
[dependencies]
strike-sdk = "0.2"
tokio = { version = "1", features = ["full"] }
```

Or via cargo:

```bash
cargo add strike-sdk
```

## Links

* [crates.io/crates/strike-sdk](https://crates.io/crates/strike-sdk)
* [docs.rs/strike-sdk](https://docs.rs/strike-sdk)
* [GitHub](https://github.com/ayazabbas/strike)

## Coming Soon

* Python SDK

## Next Steps

* [Quick Start](/sdk/quickstart.md) — connect and place your first order
* [Client Configuration](/sdk/client.md) — RPC, WSS, and wallet setup
* [Example Bots](/sdk/examples.md) — runnable examples
