# Omnibook API > Trade binary BTC up/down prediction markets programmatically. ## Docs - [Exchange active/paused state](https://docs.omnibook.xyz/api-reference/exchange/exchange-activepaused-state.md) - [Maintenance windows (static reference data)](https://docs.omnibook.xyz/api-reference/exchange/maintenance-windows-static-reference-data.md) - [Request a withdrawal](https://docs.omnibook.xyz/api-reference/funding/request-a-withdrawal.md): Closed schema (api.md §6A.2). `client_withdrawal_id` is the per-user idempotency key and must be **strictly increasing**: a fresh id (`> hwm`) is forwarded; an equal id (`== hwm`) is treated as an idempotent retry and returns the current phase; a stale id (`< hwm`) returns `409 stale_client_withdraw… - [The user's deposit address](https://docs.omnibook.xyz/api-reference/funding/the-users-deposit-address.md) - [Withdrawal status by client id](https://docs.omnibook.xyz/api-reference/funding/withdrawal-status-by-client-id.md) - [Get a single market](https://docs.omnibook.xyz/api-reference/markets/get-a-single-market.md) - [L2 orderbook (bids-only, both sides)](https://docs.omnibook.xyz/api-reference/markets/l2-orderbook-bids-only-both-sides.md): Bids only, both sides (api.md §4.4). `yes` = YES bids at YES-space ticks; `no` = NO bids at NO-space ticks; each best-first. A NO bid at `t` *is* the YES ask at `100 − t` — asks are derivable, never sent. Level entries are `[tick, aggregate_qty]`; per-order data is never published. - [List markets](https://docs.omnibook.xyz/api-reference/markets/list-markets.md) - [Public trade tape (newest-first)](https://docs.omnibook.xyz/api-reference/markets/public-trade-tape-newest-first.md) - [Cancel an order](https://docs.omnibook.xyz/api-reference/orders-write/cancel-an-order.md): `404 unknown_order` covers unknown, foreign, already-terminal and the cancel-lost-the-race case — deliberately indistinguishable, resolved by `GET /v1/portfolio/orders/{order_id}` (api.md §6.8). - [Decrease an order's quantity (absolute target)](https://docs.omnibook.xyz/api-reference/orders-write/decrease-an-orders-quantity-absolute-target.md): `new_qty` is an **absolute target**, not a delta — idempotent resends. Decrease-in-place keeps time priority; there is no amend endpoint (increase or reprice = cancel + new) (api.md §6.7). - [Mass cancel](https://docs.omnibook.xyz/api-reference/orders-write/mass-cancel.md): Maps to MASS_CANCEL (api.md §6.10). The sequenced command is the acknowledgment — there is no summary event and no count. The resulting CANCELED events stream on the WS `user` channel. - [Place an order](https://docs.omnibook.xyz/api-reference/orders-write/place-an-order.md): Closed request schema — an unknown field is `400 unknown_field`. The `201` reports the **actual sequenced outcome** (the gateway holds the request through ack-by-observation), not a synthesized "accepted". Execution outcomes (post-only cross, FOK/IOC, STP, max-cost) return `201` with `status: "cance… - [Place up to 20 orders](https://docs.omnibook.xyz/api-reference/orders-write/place-up-to-20-orders.md): Fanned into independent commands (api.md §6.9). The response is per-item and index-aligned: each entry is either a placement response or an error object. Partial success is normal, not an error. Costs N write tokens. - [Cash balance (available / reserved)](https://docs.omnibook.xyz/api-reference/portfolio-read/cash-balance-available-reserved.md) - [Get one order](https://docs.omnibook.xyz/api-reference/portfolio-read/get-one-order.md) - [List the caller's orders](https://docs.omnibook.xyz/api-reference/portfolio-read/list-the-callers-orders.md) - [Positions per (market, outcome)](https://docs.omnibook.xyz/api-reference/portfolio-read/positions-per-market-outcome.md) - [The caller's fills (either role), newest-first](https://docs.omnibook.xyz/api-reference/portfolio-read/the-callers-fills-either-role-newest-first.md) - [API keys and scopes](https://docs.omnibook.xyz/concepts/api-keys.md): What a key can do, and the one thing it deliberately cannot. - [Errors](https://docs.omnibook.xyz/concepts/errors.md): One envelope, stable codes, and what to do about each. - [Orders](https://docs.omnibook.xyz/concepts/orders.md): Idempotency, order states, and reading execution outcomes correctly. - [Rate limits](https://docs.omnibook.xyz/concepts/rate-limits.md): Two token buckets per key, and how to back off. - [Rounds and markets](https://docs.omnibook.xyz/concepts/rounds-and-markets.md): 60-second binary markets, and the identifier that is safe to cache. - [Omnibook API](https://docs.omnibook.xyz/index.md): Trade binary BTC up/down prediction markets programmatically. - [Authentication](https://docs.omnibook.xyz/quickstart/authentication.md): Sign requests with an API key using HMAC-SHA256. - [Your first request](https://docs.omnibook.xyz/quickstart/first-request.md): Check the exchange is up and find the round that is trading. - [Place your first order](https://docs.omnibook.xyz/quickstart/place-order.md): Buy YES on the round that is currently trading. - [Channels](https://docs.omnibook.xyz/websocket/channels.md): Three public feeds and one private one. - [WebSocket overview](https://docs.omnibook.xyz/websocket/overview.md): One connection, signed handshake, multiplexed channels. ## OpenAPI Specs - [venue-openapi](https://docs.omnibook.xyz/api-spec/venue-openapi.yaml)