CTF

Merge a complete outcome-token set back into collateral

Burns amount YES and amount NO tokens and returns amount collateral — recover capital from matched inventory without waiting for resolution. Requires holding at least amount of every outcome token. Recorded as two synthetic SELL fills at price 0.5. NegRisk routing, custodial signing, the Turnkey policy-version gate, the service-token/CSRF/API-key mutation gate, and server-side identity resolution behave exactly as on split.

post/exchanges/{exchange_id}/ctf/merge

Request

  • Base URL
    https://execution.kairos.trade
  • Auth
    API key in header X-Client-Id and API key in header X-Api-Key and API key in header X-Api-Secret

Path parameters

exchange_id'polymarket' | 'predictfun' | 'kalshi' | 'opinion' required

Venue. Split/merge require an on-chain CTF (polymarket, predictfun). Kalshi settles off-exchange — redeem only.

Request body

condition_idstring required

CTF conditionId of the market (0x…).

market_idstring nullable

OPTIONAL. Only enriches the synthetic BUY/SELL trade-log legs with the market's YES/NO token ids — the on-chain split/merge itself needs only condition_id + amount. When omitted the market context is resolved from condition_id; if it cannot be resolved either way the on-chain action still succeeds and only the best-effort trade-log enrichment is skipped.

amountstring required

Decimal string. Units of collateral (split) or complete sets (merge). Must be > 0. An unquoted JSON number is also accepted, but it round-trips through a binary float — send the string form to preserve every digit.

user_idstring nullable

Optional. Must match the authenticated caller when present — identity is resolved server-side and these fields can never widen scope to another user.

turnkey_org_idstring nullable

Optional. Must match the authenticated caller when present.

wallet_addressstring nullable

Optional wallet override; honored only if the wallet is owned by the caller. Omit to let the server resolve the signer wallet.

Example request

{
  "condition_id": "0x1234abcd",
  "market_id": "570362",
  "amount": "100"
}

Response

Merge executed on-chain.

tx_hashstring nullable

On-chain transaction hash. null when the action completed without producing one — always check success.

amountstring required

Decimal string — rust_decimal always serializes as a string.

condition_idstring required
action'merge' required
successboolean required

Example response

{
  "tx_hash": "0xabc123",
  "amount": "290",
  "condition_id": "0x1234abcd"
}

Changes

No recorded changes to this operation across all 1 revision of this API.