# Create new order **POST /trading/accounts/{account_id}/orders** ## Servers - Production: https://api.example.com/v1 (Production) - Sandbox: https://sandbox.api.example.com/v1 (Sandbox) ## Authentication methods - Api key auth ## Parameters ### Headers - **PRE-ACCESS-KEY** (string) Broker access key identifier. - **PRE-ACCESS-SIGNATURE** (string) Keyed BLAKE2b-256 signature (hex lowercase, 64 characters). - **PRE-ACCESS-TIMESTAMP** (string(date-time)) RFC3339 timestamp with milliseconds (e.g., 2025-10-30T06:00:34.075Z). Must be within clock_skew_tolerance (default 5m) of server time. - **Idempotency-Key** (string) Stable idempotency token reused on retries. Reuse with identical payload => 202. Reuse with different payload => 409 idempotency_key_mismatch. - **Correlation-Id** (string) Optional UUIDv7 correlation identifier (lowercase). Must match RFC4122 UUIDv7 (version nibble '7', variant 8|9|a|b). If present but invalid → 422 invalid_correlation_id (error_code). ### Path parameters - **account_id** (string) Broker-supplied account identifier; length 1..128; charset [A-Za-z0-9._~-]. ### Body: application/json (object) - **market_id** (string) - **side** (string) - **type** (string) - **tif** (string) - **token** (string) - **price** (object) Required for LIMIT orders. Forbidden for MARKET orders. - **qty** (object) Required for LIMIT and MARKET SELL orders. Forbidden for MARKET BUY. - **volume** (object) Required for MARKET BUY orders (total budget). Forbidden for MARKET SELL. - **client_order_id** (string) Client-supplied identifier. Must be unique per broker_id. Reuse of the same ID may lead to unpredictable behavior when using client_order_id for lookups or modifications (e.g., affecting only the latest or an arbitrary order). - **auto_merge** (boolean) Automatically merge YES and NO tokens for this account if they accumulate after this trade. ## Responses ### 201 Order creation command accepted #### Body: application/json (object) - **order_id** (string(uuid)) Internal Order ID (if known or generated). - **client_order_id** (string) Client-supplied identifier (if provided). ### 202 Idempotent replay (command already accepted) #### Body: application/json (object) - **order_id** (string(uuid)) Internal Order ID (if known or generated). - **client_order_id** (string) Client-supplied identifier (if provided). ### 409 Idempotency-Key reused with different payload #### Body: application/json (object) - **error_code** (string) - **message** (string) - **details** (object) ### 422 Validation / semantic error #### Body: application/json (object) - **error_code** (string) - **message** (string) - **details** (object) ### 429 Rate limit exceeded #### Headers - **Retry-After** (integer) Seconds until new window #### Body: application/json (object) - **error_code** (string) - **message** (string) - **details** (object) ### 503 Backpressure / temporary unavailability #### Body: application/json (object) - **error_code** (string) - **message** (string) - **details** (object) [Powered by Bump.sh](https://bump.sh)