Skip to main content
A quote gives you deposit instructions, a payment deadline, and the expected output. Choose a destination in the source asset’s 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 as inputs change. Most estimates need no key. Authenticate for affiliate fees or shielded Zcash.
2

Quote

Call POST /v1/orchestration/quote for deposit instructions. This example requests BTC on Spark for USDC on Base.
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 /v2/orchestration/routes.
Another pair uses the same request shape: 0.001 BTC on Spark into USDC on Solana.
3

Pay

Send amountIn of the source asset to depositAddress before expiresAt. Include depositMemo when returned. Eligible late funding for variable quotes uses refreshed pricing; some expired submissions are rejected. Late funding for fixed-output quotes is held for review. 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.

Fixed-output quotes

Fixed-output quotes commit to estimatedOut when the full amountIn is funded before expiresAt. Available to approved partners. Contact your Flashnet representative to request access. Choose a destination in the source asset’s route.fixedTo set on /v2/orchestration/routes, using the same partner key as the quote. Example: POST /v1/orchestration/quote for 50 USDC on Base into USDC on Arbitrum:
Confirm deliveryMode: "fixed" in the response. Send amountIn to depositAddress before expiresAt, then track Order status. Bitcoin funding must be observed by Flashnet before expiry; confirmation can follow later. Underpayment can reduce the payout or require review; overpayment does not increase it. Late funding is held for review. See Pricing and Errors for funding rules and unsupported requests.

EVM funding transactions

Set includeCalldata: true on /quote to receive an unsigned transaction alongside depositAddress. /offramp accepts the same flag. Omitting it or setting it to false leaves transaction out of the response.
The transaction fields are:
  • chainId: numeric EVM chain ID for the source network.
  • to: the token contract for ERC-20 funding, or depositAddress for native funding.
  • data: encoded transfer(depositAddress, amountIn) for ERC-20 funding, or "0x" for native funding.
  • value: decimal string in native smallest units; "0" for ERC-20 funding or the quote’s amountIn for native funding.
This trimmed example transfers 50 USDC on Base to the illustrative deposit address 0x1111111111111111111111111111111111111111. Use the transaction from your own quote.
The wallet calls the token’s transfer function and spends its own balance. No ERC-20 approval, allowance check, or transferFrom call is needed. Keep to set to the returned token contract; the deposit address is encoded in data.
Switch the wallet to transaction.chainId, then send the returned to, data, and value. The wallet supplies the sender, nonce, and gas fees; ERC-20 transfers also require native gas. Convert value with BigInt for viem or ethers, or to a hex quantity for eth_sendTransaction. Never convert amounts through a JavaScript Number. For exact-out quotes, the transaction encodes the finalized source amountIn. The request’s amount is the destination target and must not replace it. Send one funding transaction before expiresAt; Orchestra then detects, sweeps, and executes the deposit. A confirmed funding transaction does not mean the swap is complete. Follow Status, and use submit when you have the funding transaction hash or need recovery. Only EVM sources with known native or ERC-20 metadata support the flag. Unsupported sources return 400 calldata_unsupported_source. A deposit instruction that needs a memo or cannot be encoded returns 502 calldata_unavailable; do not fund partial instructions. The flag is part of the idempotency body: use a new key when changing it, and reuse the same key and body after a timeout or 5xx.

Deposit address by source chain

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.
For TON, Tron, XRP, Litecoin, transparent Zcash, and Hedera, use the returned address and memo or tag exactly. Send native coins with a native transfer and tokens or TON jettons with their token transfer operation. Submit the source transaction ID as txHash, with sourceAddress when required for a shared address. For shielded Zcash, follow the verified receipts by quote ID.

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 /order and /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.
  • transaction: unsigned EVM funding transaction, present only when includeCalldata is true. See EVM funding transactions.
  • amountIn: source amount the price is based on.
  • estimatedOut: destination output; fixed-output quotes commit to it with timely, full funding. See Fixed-output quotes.
  • deliveryMode: "fixed" when fixed delivery applies. Omitted for variable delivery.
  • minimumAmountOut, lightningDeliveryFeeReserveSats: returned by some exact-in, variable quotes that deliver to lightning:BTC; treat both as optional. The reserve covers Lightning routing and is already deducted from estimatedOut; it is a ceiling, not a charged fee. minimumAmountOut is the least the recipient receives after slippage. It is distinct from minAmountOut, which applies to tokens named by address.
  • feeAmount, feeBps: platform fee in feeAsset units and its rate.
  • totalFeeAmount: sum of feeAmount, roundingFeeAmount, appFeeAmount, sweepFeeAmount, and networkCostAmount.
  • 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.
  • minAmountOut, fallback: present when the destination is a token named by address. See Any token.
  • expiresAt: payment deadline, normally 2 minutes after creation. Shielded Zcash quotes allow 30 minutes to pay and carry a separate priceValidUntil.
  • priceLockMode, lockedMinAmountOut: optional price-lock policy and output floor. A price lock is separate from fixed delivery.
  • Shielded Zcash quotes add payment mode, funding, and delivery fields.
  • readToken: client keys only; bound to this quote and passed on status reads as readToken or X-Read-Token.
  • tag: the tag you sent, or null. See Tags.
  • Exact-out quotes add amountMode, targetAmountOut, requiredAmountIn, maxAcceptedAmountIn, and inputBufferBps.
  • Lightning sources add lightningReceiveRequestId, and flexibleAmount: true when the invoice has no amount.

Tags

Set tag to your own reference, such as your order ID or an integrator ID, on /quote, /offramp, or /onramp. It is 1 to 64 letters, digits, ., _, :, or -. Other values return 400 validation_error; null is the same as omitting it. Every order the quote funds carries the tag. It appears on the create response, on /status, /order, and /history, and as data.tag on every order.* webhook, so you can match events to your records without storing Orchestra ids. List a tag’s orders with GET /v1/orchestration/history?tag=order-8412. Your account can block a tag or require a tag approved for that endpoint and route. An omitted or disallowed tag then returns 403 tag_not_allowed. See Errors. A tag is not unique. A second deposit to a reused deposit address creates another order with the same tag, so key records on the order id. The tag is fixed once the quote exists: a replay with a different tag returns 409 idempotency_conflict. Whoever holds the key that creates the quote chooses the tag, so set it from your backend.

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.
  • affiliateId and affiliateIds require Authorization.
  • Send sourceAddress on /quote when you know the sender. It is screened with the recipient and refund addresses, so a sender that is sanctioned, blocked, or already flagged fails at the quote, before the user funds. A sender Orchestra has not seen before is screened in full when the deposit arrives. Write an EVM sourceAddress in lowercase or EIP-55 checksum form. Do not rely on it as a refund address; send refundAddress.
  • A BOLT11 invoice sent as recipientAddress needs at least 20 seconds left when quoted. An expired invoice returns 400 destination_bolt11_expired. One with less than 20 seconds left returns 400 invoice_expiring_soon. A paid invoice returns 409 invoice_already_paid. An invoice already in use for another payout can return 409 invoice_in_flight. POST /v1/lightning/decode reads an invoice’s amount and expiry without paying it.
  • A Tron refundAddress must be T followed by 33 base58 characters, and not a known token contract or burn address. Anything else returns 400 invalid_refund_address. The checksum is not verified, so validate the address yourself.
  • Send refundAddress whenever you can. It is required for exact-out, for Lightning destinations, for a source token named by address, 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.