Exchanges

Sponsor gas and set the venue's required allowances on a wallet

The one-time onboarding step behind "enable trading": tops the wallet up with sponsored gas if it needs it, then sets every token allowance the venue's contracts require. Both legs are signed custodially with the user's delegated key. wait_for_confirmation defaults to true. The call then blocks until the work completes and the response reports what actually happened. Passing false returns immediately with confirmation_pending: true, success: true, gas_sponsored: false and allowances_set: 0 — success: true there means "accepted", not "done", and a background failure is only logged, never surfaced. Poll the RPC query exchange.getAllowances to find out whether it worked. The three identity fields are mandatory but are validated against the authenticated caller and the wallets it owns; they can confirm authority, never grant it. Self-custody callers on the external-signing lane should use POST /v2/onchain/intent with op: "approvals" instead and pay their own gas. Auth & scope. Requires trade:execute, the mutation gate (this endpoint spends gas-station funds, so a stolen JWT alone must not reach it), wallet ownership, and a current Turnkey policy version.

post/exchanges/{exchange_id}/prepare-wallet

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_idstring required
Example:polymarket

Request body

user_idstring required
turnkey_org_idstring required
wallet_addressstring required

Must be a wallet owned by the authenticated caller.

wait_for_confirmationboolean nullable

Defaults to true — the call blocks until gas sponsorship and allowances are confirmed. Pass false to fire-and-forget: the response returns immediately with confirmation_pending: true, success: true and zeroed result fields, and a background task does the work. A background failure is only logged; the caller is never told.

Response

Wallet prepared, or — when wait_for_confirmation was sent as false — preparation accepted and running in the background.

gas_sponsoredboolean required

Always false when confirmation_pending is true — the work had not run yet.

gas_tx_hashstring nullable
gas_amountstring nullable

Present only when gas was actually sponsored.

allowances_setinteger required

Number of allowances set. Always 0 when confirmation_pending is true.

confirmation_pendingboolean required

true when the caller passed wait_for_confirmation: false and the preparation is still running in the background.

successboolean required

Always true on a 200, INCLUDING the fire-and-forget path where nothing has been attempted yet. It is not evidence the wallet is ready.

Changes

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