Skip to main content
POST
Sponsor gas and set the venue's required allowances on a wallet

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.

Path Parameters

exchange_id
string
required
Example:

"polymarket"

Body

application/json

Body for POST /exchanges/{exchange_id}/prepare-wallet. All three identity fields are mandatory and are VALIDATED against the authenticated caller — they can confirm authority, never grant it.

user_id
string
required
turnkey_org_id
string
required
wallet_address
string
required

Must be a wallet owned by the authenticated caller.

wait_for_confirmation
boolean | null
default:true

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.

Response for POST /exchanges/{exchange_id}/prepare-wallet.

gas_sponsored
boolean
required

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

allowances_set
integer
required

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

confirmation_pending
boolean
required

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

success
boolean
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.

gas_tx_hash
string | null
gas_amount
string | null

Present only when gas was actually sponsored.