CTF

Split collateral into a complete outcome-token set

Converts amount of collateral into amount YES and amount NO tokens on-chain, without going through the order book. Does not open a market position — it mints equal tokens on every outcome; both legs are recorded as synthetic BUY fills at price 0.5 so history and PnL stay consistent. NegRisk (multi-outcome) markets are detected from the conditionId and routed through the NegRiskAdapter automatically. Transactions are custodially signed; deposit-wallet users execute gaslessly via the relayer. Identity (user_id/turnkey_org_id/wallet_address) is resolved server-side from the authenticated caller — body fields are optional and must match when present. Because this signs under the user's delegated key it is additionally gated on the installed Turnkey policy version (403 AUTH_POLICY_OUTDATED if stale) and, like the other mutation endpoints, on the service-token/CSRF/API-key check that the API-key triple satisfies automatically. Failures return the structured OrderErrorResponse envelope — match on error_details.code.

post/exchanges/{exchange_id}/ctf/split

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

Split 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'split' required
successboolean required

Example response

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

Changes

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