route.to set. Orchestra detects funding, creates the order, and delivers to recipientAddress without a separate confirm call.
Prerequisites
- An Orchestra account. Create one in the dashboard. Flashnet reviews new accounts before enabling API access.
- A server key (
fn_...) from API keys in the dashboard. Keep it on your backend. For browsers and apps, use a scoped client key (fnp_...); see Authentication.
Flow
1
Estimate
Call
GET /v1/orchestration/estimate with the four route fields and amount on every input change. It is public and stateless.2
Quote
Lock the price with Another pair uses the same request shape: 0.001 BTC on Spark into USDC on Solana.
POST /v1/orchestration/quote. Stablecoin on Base into BTC on Spark:Replace
SERVER_KEY with your fn_... key. Use a new X-Idempotency-Key for each operation and reuse it when retrying that same request. Amounts are integer strings in the asset’s smallest unit: "100000" is 0.001 BTC; "50000000" is 50 USDC on Base. Read each asset’s decimals from /routes.3
Pay
Send
amountIn of the source asset to depositAddress before expiresAt. Include depositMemo when returned. Eligible late funding uses refreshed pricing without the original guarantee; some expired submissions are rejected. See Pricing.4
Watch
Poll
GET /v1/orchestration/order?quoteId=QUOTE_ID with a server key until order is non-null, then follow the order on Status by webhook, SSE, or GET /v1/orchestration/status?id=ORDER_ID.Deposit address by source chain
- EVM
- Solana
- Spark
- Bitcoin
- Lightning
Send the quoted token or native asset on the source chain. If detection misses, submit the transaction:
sourceAddress is optional except on shared deposit addresses, where it identifies the sender.txHash, with sourceAddress when required for a shared address.
When to call /submit
POST /v1/orchestration/submit reports funding when detection misses it or you have the transaction id already. Authenticate with the quote’s partner key and send the body for its source chain. Repeating the same deposit returns the existing order.
An order id is not guaranteed at broadcast. Bitcoin and TON paths can require observed deposit proof. After a definitive verification rejection, wait for evidence and use a new idempotency key for the next recovery attempt. Reuse the same key after a timeout or 5xx; see Idempotency. Keep polling and do not send another payment. On success, use the returned orderId and status, plus readToken for client keys.
Quote response
quoteId:q_...; use it for/orderand/submit.depositAddress: where the user sends the source asset. Use this quote’s instructions.depositMemo: memo or tag the deposit must carry; present only on provider routes that require one.amountIn: source amount the price is based on.estimatedOut: destination output; fixed delivery commits to it with timely, full funding. See funding conditions.feeAmount,feeBps: platform fee infeeAssetunits and its rate.totalFeeAmount: sum offeeAmount,roundingFeeAmount,appFeeAmount,sweepFeeAmount, andnetworkCostAmount.feeAsset: denomination of every fee field; see Fees.route: path labels, which may be symbols or asset ids. Do not use them as catalog keys.expiresAt: ISO timestamp, 2 minutes after creation.priceLockMode,lockedMinAmountOut: optional price-lock policy and output floor. A price lock is separate from fixed delivery.readToken: client keys only; bound to this quote and passed on status reads asreadTokenorX-Read-Token.- Exact-out quotes add
amountMode,targetAmountOut,requiredAmountIn,maxAcceptedAmountIn, andinputBufferBps. - Lightning sources add
lightningReceiveRequestId.
Rules
- Use each quote’s returned deposit instructions; do not reuse cached instructions.
- A quote is bound to the partner that created it. Only a key from the same partner can submit it.
affiliateIdandaffiliateIdsrequireAuthorization.- Send
refundAddresswhenever you can. It is required for exact-out, for Lightning destinations, and for deposits from BNB, native TON, Tron, XRP, Litecoin, and Zcash. Without it, Orchestra refunds to the detected source address only when that is safe, and never to an exchange’s shared sender address.