Skip to main content
POST
Close a routed position across both legs of a market link

Authorizations

X-Client-Id
string
header
required

Credential client id (kairos_ck_...). Must be sent together with X-Api-Key and X-Api-Secret.

X-Api-Key
string
header
required

64-char hex API key.

X-Api-Secret
string
header
required

64-char hex API secret.

Body

application/json

Body for POST /orders/route-close.

provider
string
required
market_id
string
required
side
enum<string> | null
Available options:
yes,
no
outcome
string | null
slippage_cents
integer | null
default:5

Defaults to 5. Must be in [1, 99] if provided.

leg_caps
object[] | null

Per-venue size caps. FAIL-CLOSED: when leg_caps is present, any leg with no matching entry is EXCLUDED from the close entirely rather than closed in full.

client_route_id
string | null

Makes a retried close safe. A close this user already placed under the same id is returned (replayed true) and nothing is sold again. An id used by a route-buy is refused with 409.

Response

Close dispatched. Inspect legs[].error.

Response for POST /orders/route-close.

route_order_id
string<uuid>
required
status
string
required

submitting for a new close; a replayed close reports its stored status.

closing
string
required
legs
object[]
required
notes
string[]
required
replayed
boolean

True when an earlier request with the same client_route_id placed this close.