Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.flashnet.xyz/llms.txt

Use this file to discover all available pages before exploring further.

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, /zeroconf/*, all mutating resource endpointsX-Idempotency-Key header missing on a partner-authenticated mutating request.
idempotency_conflict409/quote, /submit, /onramp, /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, /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, /zeroconf/*Endpoint was called in the wrong order state. For example, calling /zeroconf/accept 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, /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 always repriced at live market rates on submit.
not_found404/status, /order, /submit, /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/submitSwap 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.

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.
CodeTerminal statusDescription
slippage_exceededrefundingrefundedPool price moved past the quote’s slippageBps between deposit and execution. Order refunds automatically; no partner action required.
exact_out_insufficient_inputrefundingrefundedThe deposit was below requiredAmountIn for an exact-out strict order.
exact_out_input_above_maxrefundingrefundedThe deposit exceeded maxAcceptedAmountIn for an exact-out strict order.
exact_out_target_not_metrefundingrefundedThe pool could not deliver targetAmountOut at execution time.
duplicate_lightning_invoicefailedA destination Lightning BOLT11 invoice was reused. Single-use invoices cannot settle twice.

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.