API Reference
Orders
Place, cancel, and list orders. Synchronous matcher ack at ~79ms p50. Attribution is the identity; pass session= during a warp to scope into the partitioned book.
/book/v1/ordersREAL
Submit a single order. Returns the matcher-assigned order_id.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
| market | string | yes | e.g. "BTC-PERP". |
| side | string | yes | "buy" | "sell". |
| qty | string | yes | Decimal string. |
| price | string | yes | Decimal string. Required for limit orders. |
| tif | string | no | "gtc" | "ioc" | "fok". Default "gtc". |
| attribution | string | yes | Stable identity string. |
| session | string | no | Warp session id. |
| idempotency_key | string | no | PLANNED Phase B. No-op today. |
Response
| Field | Type | Required | Description |
|---|---|---|---|
| order_id | string | no | UUID assigned by the matcher. |
| t_placed | integer | no | Unix seconds. |
| speed_x | number | no | Session speed (1.0 live). |
Code
curl -s -X POST https://api.taifoon.dev/book/v1/orders \
-H 'Content-Type: application/json' \
-d '{"market":"BTC-PERP","side":"buy","qty":"0.01","price":"75000","tif":"gtc","attribution":"bot-demo"}'Errors
- 400BadRequestMissing field, malformed decimal, unknown market, qty < step_size.
- 409SessionInvalidSession expired or session_id unknown.
/book/v1/ordersREAL
List open orders, optionally filtered by market or attribution.
Query parameters
| Field | Type | Required | Description |
|---|---|---|---|
| market | string | no | Filter by market. |
| attribution | string | no | Filter by attribution. |
| limit | integer | no | Default 100. |
Response
| Field | Type | Required | Description |
|---|---|---|---|
| orders | array | no | Open orders matching the filter. |
Code
curl -s 'https://api.taifoon.dev/book/v1/orders?market=BTC-PERP&limit=3' | jq
/book/v1/orders/{order_id}REAL
Cancel a single order by id. Matcher applies the cancel synchronously.
Code
curl -s -X DELETE https://api.taifoon.dev/book/v1/orders/<order_id>
/book/v1/ordersREAL
Bulk cancel by attribution (and optionally market). Cancels every open order matching the filter atomically. Idempotent; returns the cancelled count.
Query parameters
| Field | Type | Required | Description |
|---|---|---|---|
| attribution | string | yes | Required to prevent accidental venue-wide cancels. |
| market | string | no | Narrow to a single market. |
Code
curl -s -X DELETE 'https://api.taifoon.dev/book/v1/orders?attribution=mm-foo-stratA'
