GuidesAPI ReferenceChangelog
Guides

Error

Status Codes & Error Handling

HTTP status codes, the error body, and endpoint-specific conditions for the Conversion API.

Error Object

Errors follow the platform-wide RFC 7807 style body. The code field is the stable application error code; see Error Codes for the full list.

{
  "code": "00020001",
  "status": 400,
  "detail": "Quote has expired",
  "instance": "/v1/customers/14f20ebd-893b-11f0-b308-2eaa4f6974f2/conversions/hedge",
  "trace_id": "d49d5864-49f0-4130-96ba-6a3c0cfa85a0",
  "time": "2026-02-05T10:08:07.857Z"
}
FieldTypeDescription
codestringStable application error code.
statusintegerHTTP status code.
detailstringHuman-readable description. May be null.
issuesarrayOptional structured issue details, when provided.
instancestringRequest path. May be null.
trace_idstringTrace identifier. Include it in support requests.
timestringISO 8601 timestamp of the error.

Conversion Error Codes

Any guidance below to request or execute a new quote applies only when there is no earlier Execute Quote request with an unknown outcome. Otherwise, first follow Resolving an Execute Quote timeout; an error response to a later request does not resolve the earlier operation.

codeHTTPWhen
00020000408Quote request timed out; the liquidity provider did not respond. Retry the quote.
00020001400Quote expired. Request a replacement only if no earlier execution has an unresolved outcome.
00020002400Quote construction or pricing failed.
00020003400Insufficient available balance in the pay asset.
00020004400Pair is disabled for this direction, or the amount is outside the pair's min/max.
00020005400Pricing changed. Re-quote and execute only if no earlier execution has an unresolved outcome.
00020006400Generic trading error.
00000001400Business rule validation failed (for example both or neither amount supplied).
00000002400Invalid payload or parameters.
00000005404Conversion not found for the supplied transaction_id.
00000006409Quote has already been consumed. This does not confirm that an order was created or completed.
00000010400Invalid request format (for example a quote_id that is not a UUID).

Create Quote — Status & Errors

Endpoint: POST /v1/customers/{customer_id}/conversions/quote

HTTPExample codeWhen
201Quote priced successfully
40000000001, 00000002, 00020004Both amounts supplied or neither; unsupported asset; amount out of bounds
40000020002, 00020005Pricing failed or must be re-requested
40100010000Missing or invalid authentication
405Wrong HTTP method for the path
40800020000Liquidity provider did not respond in time
50000000000Unexpected server error

Execute Quote — Status & Errors

Endpoint: POST /v1/customers/{customer_id}/conversions/hedge

HTTPExample codeWhen
201Conversion order created; order_status is PENDING
40000000010quote_id is not a valid UUID
40000020001Quote expired, unknown, or does not belong to this customer
40000020003Insufficient available balance in the pay asset
40100010000Missing or invalid authentication
405Wrong HTTP method for the path
40900000006Quote has already been consumed; order creation or completion is not confirmed
50000000000Unexpected server error

Get Conversion — Status & Errors

Endpoint: GET /v1/customers/{customer_id}/conversions/order?transaction_id={transaction_id}

HTTPExample codeWhen
200Conversion returned
40000000002Missing or malformed transaction_id
40100010000Missing or invalid authentication
40400000005No conversion with that transaction_id exists for this customer
405Wrong HTTP method for the path
50000000000Unexpected server error

A conversion belonging to another customer is reported as 404, not 403.

Idempotency, Retries & Timeouts

Execute Quote does not accept an Idempotency-Key header. Retrying is controlled by the quote instead: a quote_id is single-use and expires after 30 seconds.

TopicGuidance
Idempotency keyNot supported on any conversion endpoint. Do not send Idempotency-Key; it has no effect.
Retrying Execute QuoteTreat an interrupted execution as outcome unknown. Reconcile it before deciding whether another conversion is needed.
Client timeout on executeThe request may still be running or may have created an order. Do not submit a replacement conversion while its outcome is unknown.
Quote lifetime30 seconds (expire_time, valid_until_timestamp). Expiry prevents a new execution of that quote; it does not resolve an earlier execution's outcome.
Retrying readsGet Conversion and List Transactions are safe to retry with exponential backoff (for example 200 ms → 400 ms → 800 ms, with jitter).
Trace IDsLog trace_id from error responses for support correlation.

Resolving an Execute Quote timeout

If Execute Quote times out before you receive a transaction_id, keep the operation in an outcome unknown state:

  1. Record the customer, quote_id, request time, assets, amounts, and any available trace_id.
  2. Use List Transactions with transaction_action=CONVERSION and a time window around the request (created_after and created_before). Include a margin for clock differences and inspect all pages. The list has no quote_id filter and its items do not contain quote_id.
  3. For candidate transactions, call Get Conversion with their transaction_id and compare the returned quote_id. If it matches, the order exists; track its order_status and the conversion.completed / conversion.failed webhook to determine the outcome. Finding an order does not by itself mean the conversion completed.
  4. If no match is found, retry the read-only reconciliation with backoff. An empty list can precede the original request's commit and does not prove that nothing executed. If you still cannot resolve the outcome, contact support with the recorded identifiers and request time.

Do not create and execute a replacement quote while the original outcome is unknown. Different quotes do not share an economic-operation idempotency key and could both execute. Only decide whether to initiate another conversion after the original operation has been reconciled.

A consumed or expired quote, a 409 response, or the absence of an order in one query does not establish the original operation's final outcome. The current API does not provide a direct quote-to-order lookup; use the reconciliation steps above rather than treating one of these signals as permission to start over.



Did this page help you?