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?

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.

Order-lifecycle error codes

These surface on order records (order.errorCode) and webhook payloads, not as HTTP responses. They indicate why an order moved to refunding or failed. Order error messages are sanitized before they are stored or delivered publicly. Use errorCode for programmatic handling. errorMessage is partner-safe copy and does not include provider diagnostics, database errors, or stack details.

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. Execution is still bounded by the quote’s slippageBps. If the pool has moved past that tolerance, the order refunds automatically with slippage_exceeded. The quote_expired HTTP 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. Market moved against the quote. The deposit arrives and the pool has shifted past slippageBps. The order moves to refunding with errorCode=slippage_exceeded. No action is needed. The refund is automatic. 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.