Endpoints

Create an order

Returns an unsigned v0 transaction, base64-encoded. Deserialize it, have your user sign it, and submit it. No other user signature is required.

POST/cloak/v1/order
Examples in

Body

FieldDescription
quoteobjectrequiredThe complete, unchanged quote object from POST /quote.
senderAddressstringrequiredMust match the quote.
recipientAddressstringrequiredMust match the quote.
feeBpsintegerconditionalMust match the quote.
feeRecipientAddressstringconditionalRequired when feeBps > 0.

Headers

HeaderDescription
X-Idempotency-KeystringoptionalStrongly recommended. Without one we fall back to the quoteId. See Idempotency.

Request

Request
curl -sS -X POST "https://api.veilo.network/cloak/v1/order" \
  -H "Authorization: Bearer $VEILO_KEY" \
  -H "Content-Type: application/json" \
  -H "X-Idempotency-Key: $(uuidgen)" \
  -d "{
        \"quote\": $QUOTE_OBJECT,
        \"senderAddress\":       \"SENDER_SOLANA_ADDRESS\",
        \"recipientAddress\":    \"RECIPIENT_SOLANA_ADDRESS\",
        \"feeBps\":              50,
        \"feeRecipientAddress\": \"PARTNER_FEE_WALLET_ADDRESS\"
      }"

Response

200 · application/json
{
  "success": true,
  "order": {
    "trackingId":            "TRACKING_ID",
    "transaction":           "<base64>",     // UNSIGNED v0 transaction
    "transactionEncoding":   "base64",
    "amountIn":          "10091009518",
    "amountOut":         "10000000000",
    "sourceSymbol":          "USDC",
    "destinationSymbol":     "USDC",
    "eta":                   300,
    "expiration":            "2026-08-26T11:52:27.000Z",
    "blockhashExpiresAtSlot": 123456789
  }
}

Order and transaction expiry are different

expiration is the order's deadline, tens of minutes, enforced on-chain. The transaction can expire sooner, usually in 60 to 90 seconds.

If submission fails on an expired blockhash, call refresh rather than re-quoting.

Next: sign and submit the transaction, then poll the status.