> 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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.strike.fun/sdk/overview.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
