CTF

Redeem winning outcome tokens after resolution

After a market resolves on-chain, converts the winning outcome tokens into collateral. Only the winning side is needed (losing shares are worthless). NegRisk redeems unwrap wrapped collateral back to the base asset automatically. db_update_failed: true in the response means the on-chain redeem SUCCEEDED but the position-state bookkeeping write failed — funds are safe; retry the call to fix the bookkeeping. Failures return the structured OrderErrorResponse envelope — match on error_details.code.

post/exchanges/{exchange_id}/redeem

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 RESOLVED market.

position_idstring nullable

Position row to mark redeemed after success.

market_idstring nullable

Locates the position when position_id is omitted.

token_idstring nullable

Locates the position when position_id is omitted.

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"
}

Response

Redeem executed on-chain.

tx_hashstring nullable

On-chain transaction hash. null when no transaction was produced — always check success.

amount_redeemedstring required

Decimal string — rust_decimal always serializes as a string.

successboolean required
db_update_failedboolean

OMITTED entirely when false (skip_serializing_if). Present and true only when the on-chain redeem succeeded but the bookkeeping write failed after retries — funds are safe, retry to fix bookkeeping.

Example response

{
  "tx_hash": "0xabc123",
  "amount_redeemed": "100"
}

Changes

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