Documentation index for the binapi2 USD-M Futures client library.
New users should start with the user guide in guide/.
It combines Binance API semantics, crypto derivatives fundamentals, and
binapi2 type mappings in a task-oriented narrative.
| Chapter | Topic |
|---|---|
| Index | Overview, background concepts, reading order |
| 1. Architecture | REST, WebSocket API, and Streams — when to use each |
| 2. Market data | Order book, klines, trades, tickers, mark price, funding, analytics |
| 3. Trading and orders | Order types, lifecycle, REST vs WS API, algo orders |
| 4. Account and positions | Balances, positions, leverage, margin, multi-assets |
| 5. User data stream events | The 10 event types and how to handle them |
| 6. Core types | decimal_t, symbol_t, enums, result<T> |
| Document | Description |
|---|---|
| DESIGN.md | Architecture overview, request dispatch, async model, service classes, configuration, error handling |
| async_architecture.md | Async-first design: API types, execution variants, source layout |
| async_io.md | Async console, logging, and file recording patterns |
| threading_and_io.md | Executor ownership, coroutine environments (cobalt::main, io_thread, manual io_context) |
| streams.md | WebSocket stream components: market, combined, dynamic, user, local order book |
| alternative_runtimes.md | Analysis of 12 alternative async runtimes (Folly, Seastar, liburing4cpp, Fibers, etc.) — latency, throughput, complexity, cost |
| Document | Description |
|---|---|
| data_types.md | Catalog of all C++ request/response types with Binance API doc references |
| json_parsing.md | Glaze deserializer behaviour: required/optional fields, decimal parsing, enums, errors |
| json_parsing_variant.md | Compile-time variant dispatch design notes for user data stream events |
| Document | Description |
|---|---|
| implementation_status.md | Per-endpoint coverage matrix (Binance docs → source files) |
| demo_cli_all_apis.md | Demo CLI command reference (135 commands) + known testnet issues |
| async_demo_ui.md | Interactive TUI demo — layout, per-tab anatomy, extension guide |
| Document | Description |
|---|---|
| secret_provider.md | Credential loading via libsecret / systemd-creds / test providers |
| File | Description |
|---|---|
| rest_benchmark.txt | REST endpoint latency/throughput against mock server |
| stream_parse_benchmark.txt | Stream JSON parsing throughput |