Error format
error, a stable code. details is human-readable and only present on 4xx responses.
Common errors
400 pair_hash_mismatch
400 pair_hash_mismatch
The pair’s terms changed since you read the card. Fetch
GET /v2/swap/{type}/pairs again, show the new terms, and create with the new hash.400 attribution_conflict
400 attribution_conflict
The request carried both
X-Kaleido-Org-Key and an Authorization API key. Send one.400 missing_sighash
400 missing_sighash
A cooperative claim or refund request had neither
transaction (with index) nor signatureHash. Send the unsigned transaction; the maker computes the sighash.401 invalid_swap_auth
401 invalid_swap_auth
The route needs the swap’s
X-Swap-Auth header and it was missing or wrong. Use the swapAuth from the create response. If it is lost, recover it with POST /v2/swap/{id}/auth/challenge and POST /v2/swap/{id}/auth/recover.409 on swap creation
409 on swap creation
An active swap already exists for this
preimageHash. Use a new preimage for every swap.422 on a claim or refund
422 on a claim or refund
The swap’s state does not allow it: for example a refund after the payout was committed, or a claim before the maker’s lockup exists. Read
GET /v2/swap/{id} and act on the current status.429
429
Rate limited, either per caller or by the rolling creation budget. Wait for
Retry-After.503 trading_halted
503 trading_halted
The maker has stopped taking new swaps. Swaps already in flight still settle.
GET /v2/info shows the halt and its reason.503 pay_through_disabled
503 pay_through_disabled
This maker has not enabled pay-through.
503 on other routes
503 on other routes
A dependency the route needs is unavailable, such as the node or a chain backend. Retry with backoff.
Swaps
The lockup was funded but the swap failed with transaction.lockupFailed
The lockup was funded but the swap failed with transaction.lockupFailed
The amount differed from
expectedAmount, or the swap was funded with more than one transaction. Refund the lockup. For a chain swap, the maker may offer a re-quote instead.No status updates on the WebSocket
No status updates on the WebSocket
Subscribe with
{"op":"subscribe","channel":"swap.update","args":["<id>"]} after connecting, and send {"op":"ping"} periodically. Fall back to GET /v2/swap/{id} after a reconnect.Restore returns no swaps
Restore returns no swaps
Pass the derivation path your keys actually use. Swap SDK keys are derived directly from the swap account xpub, so send
"m"; the default path searches different keys.