Skip to main content
Orchestra returns errors in a standard envelope. For the envelope shape, see API Overview.

What error codes can the API return?

CodeHTTPEndpointsDescription
unauthorized401All authenticated endpointsMissing or invalid API key.
auth_required401Deposit address resolutionDeposit address derivation requires an authenticated partner context.
missing_idempotency_key400/quote, /submit, /onramp, /reprice/*, /zeroconf/*, all mutating resource endpointsX-Idempotency-Key header missing on a partner-authenticated mutating request.
idempotency_conflict409/quote, /submit, /onramp, /reprice/*, /zeroconf/*, all mutating resource endpointsSame idempotency key reused with a different JSON body.
unsupported_route400/estimate, /quote, /onrampThe (sourceChain, sourceAsset, destinationChain, destinationAsset) combination is not supported.
unsupported_amount_mode400/quote, /onrampamountMode is not supported for the selected route. exact_out is limited to bitcoin:BTC -> (base|solana):USDC and any source -> lightning:BTC.
unsupported_fee_plan400/estimate, /quote, /onrampappFees, affiliateId, or affiliateIds is not supported for the selected route or quote mode. Returned for pure-BTC routes with no stablecoin settlement leg.
invalid_request400/estimate, /quote, /submit, /onramp, /reprice/*, /zeroconf/*Request body failed business validation. Check field constraints.
invalid_query400/status, /order, /historyInvalid query parameters.
invalid_address400/quote, /onrampRecipient or refund address is invalid for the target chain.
invalid_state400/submit, /reprice/*, /zeroconf/*Endpoint was called in the wrong order state. For example, calling /reprice/approve on an order that is not awaiting_approval.
invalid_payout_destination400PUT /v1/affiliates/:affiliateIdThe (payoutChain, payoutAsset) combination is not in the live payout route table.
conflict409/submit, /reprice/*, /zeroconf/*State changed concurrently. Retry the request.
quote_expired409/submitDestination invoice has expired (Lightning). Standard quote expiry does not return this error; expired quotes are repriced at live market rates on submit.
not_found404/status, /order, /submit, /reprice/*, /zeroconf/*Quote or order not found.
amount_too_small400/estimate, /quote, /onrampSwap input is below the Flashnet pool minimum.
amount_too_large400/estimate, /quote, /onrampAmount exceeds the maximum for the selected route.
price_impact_too_high400/estimate, /quote, /onrampQuote exceeds configured price impact constraints.
rate_limited429/routes, /estimate, /quote, /order, /statusToo many requests. Back off and retry. See rate limits for per-endpoint thresholds.
flashnet_error502/submit, /reprice/approveSwap simulation or execution failed inside Flashnet.
internal_error500AnyUnhandled server error. Some malformed JSON or schema violations surface as internal_error. Treat it as a request bug and retry only after fixing the payload.
validation_error400AnyRequest body or query parameters failed schema validation (Zod).
expired409/zeroconf/accept, /zeroconf/declineZeroConf offer has expired.
route_disabled400/estimate, /quote, /onrampThe selected route is temporarily disabled.
service_unavailable503AnyGlobal kill switch is active.
partner_disabled403All authenticated endpointsPartner account is disabled.
forbidden403/status, /order, /submitCross-partner access attempt.
ambiguous_query400/statusMultiple orders match the provided txHash. Narrow the query.
invalid_tx_hash400/submitTransaction hash format is invalid for the source chain.
Endpoint paths are abbreviated. Full paths use the /v1/orchestration/ prefix (e.g. /v1/orchestration/quote). Resource endpoints (/v1/affiliates/*, /v1/webhooks/*, /v1/accumulation-addresses/*, /v1/liquidation-addresses/*) are listed as “all mutating resource endpoints” where applicable.

What are common error scenarios?

Submitting against an expired quote. Quotes expire after 2 minutes. If you call POST /submit after the TTL, the engine reprices the order at live market rates and proceeds. The submit call does not fail. The quote_expired error code applies only to expired Lightning destination invoices (BOLT11), not to general quote expiry. Duplicate idempotency key with a different body. You reuse an X-Idempotency-Key value but change the request payload. The API returns 409 idempotency_conflict. Use a new key for each distinct request. Replaying the exact same request with the same key returns the stored response and sets X-Idempotency-Replayed: true. Unsupported fee plan on a pure-BTC route. You request appFees or affiliateIds on a spark:BTC -> bitcoin:BTC quote. The API returns 400 unsupported_fee_plan. Fee plans require a stablecoin settlement leg. Routes between BTC endpoints with no stablecoin conversion do not support app fees. Repricing an order not in awaiting_approval. You call POST /reprice/approve on an order that has already moved past awaiting_approval. The API returns 400 invalid_state. Check the order status before calling approval endpoints, or handle this error as a no-op if your system retries. ZeroConf offer expired before response. You call POST /zeroconf/accept after the offer’s expiresAt has passed. The API returns 409 expired. The engine falls back to waiting for 1 on-chain confirmation automatically.