> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ravn.exchange/llms.txt
> Use this file to discover all available pages before exploring further.

# POST /execute

> Turn a quote into an actionable execution payload.

Takes the opaque `quoteToken` from [`/quote`](/api-reference/quote) and returns one of three
shapes tagged by `executionType`. See [Execution Types](/execution-types) for the branch logic.

## Request

<ParamField body="quoteToken" type="string" required>The opaque token from `/quote`.</ParamField>
<ParamField body="destinationAddress" type="string">Late-bound recipient. Only Chainflip, Houdini Swap, Layerswap, Mayan, NEAR Intents, and Rift bind the recipient at execute time. Every other venue fixes it when it prices the quote, and a different address here is rejected with `400 INVALID_REQUEST`, so supply it on [`/quote`](/api-reference/quote) for those. Houdini Swap pays `userAddress` when no recipient was given anywhere, so a Houdini swap into a different ecosystem needs one.</ParamField>
<ParamField body="refundAddress" type="string">Late-bound refund address, honoured by the same venues as `destinationAddress`; elsewhere a different one is rejected with `400 INVALID_REQUEST`. A Bitcoin-source Rift swap needs a Bitcoin refund address, here or on `/quote`.</ParamField>

No API key required (see [Authentication](/authentication) for the optional higher-limit tiers).

```bash theme={null}
curl -s -X POST https://app.ravn.exchange/api/v1/execute \
  -H 'content-type: application/json' \
  -d '{ "quoteToken": "<from /quote>" }'
```

## Response

One of three payloads:

<CodeGroup>
  ```json TRANSACTION theme={null}
  { "executionType": "TRANSACTION",
    "quoteToken": "…opaque…",
    "approval": { "to": "0x…", "data": "0x095ea7b3…", "value": "0", "chainId": 1 },
    "transaction": { "to": "0x…", "data": "0x…", "value": "0", "chainId": 1 } }
  ```

  ```json SIGNATURE theme={null}
  { "executionType": "SIGNATURE",
    "quoteToken": "…opaque…",
    "approval": { "to": "0x…", "data": "0x095ea7b3…", "value": "0", "chainId": 1 },
    "typedData": { }, "approvalData": { },
    "submit": { "url": "/api/v1/submit-signature" } }
  ```

  ```json DEPOSIT theme={null}
  { "executionType": "DEPOSIT",
    "quoteToken": "…opaque…",
    "deposit": { "address": "0x…", "amount": "1000000000000000000", "chainId": 1,
                 "expiresAt": "2026-10-02T12:15:00.000Z" },
    "statusRef": "0x…" }
  ```
</CodeGroup>

<Note>
  Every type returns a `quoteToken`. Use **that** token, not the one from `/quote`, for
  [`/submit-signature`](/api-reference/submit-signature) and [`/status`](/api-reference/status).
  It carries anything bound at execute time: a two-hop RAVN route (`venue.id` is `compose`) is rebound
  to its second hop here, and `/submit-signature` refuses that quote's original token.
</Note>

<Note>
  `TRANSACTION` and `SIGNATURE` can carry an optional `statusRef`, the venue's own tracking key
  (on a two-hop RAVN route, the packed hop-2 handle). On `TRANSACTION`, poll
  [`/status`](/api-reference/status) with that `statusRef` when present, otherwise with the hash
  of the transaction you broadcast. On `SIGNATURE`, poll with the `statusRef` that
  [`/submit-signature`](/api-reference/submit-signature) returns. Poll it until terminal. On
  same-chain venues that report is what settles the swap in RAVN's ledger, and an unreported swap
  never earns a fee payout. See [Settlement](/api-reference/status#settlement).
</Note>

<Note>
  `approval` appears on `TRANSACTION` and `SIGNATURE` when the input ERC-20 needs an allowance. On
  `TRANSACTION`, send it and wait for it to be **mined** before `transaction`, or the swap reverts on
  `transferFrom`. On `SIGNATURE` (CoW, Bebop), land it before submitting or the order is accepted and
  silently never fills. See [Execution types](/execution-types#the-approval-step).
</Note>

<Warning>
  `deposit.expiresAt` (ISO 8601), when present, is when the deposit must have **arrived**,
  confirmed on the origin chain, not when it must be sent. Houdini Swap, for example, sets 7 to 15
  minutes. Send well ahead: a deposit that lands later reaches an expired order, the venue no
  longer honours the quoted price, and recovering the funds can need the venue's support.
</Warning>

<Warning>
  Returns `410 QUOTE_EXPIRED` if the quote has expired, `400 QUOTE_INVALID` if the token is
  malformed or tampered with, or `400 QUOTE_NOT_EXECUTABLE` if the quote was a preview only
  (`executable: false` on [`/quote`](/api-reference/quote)). Request a fresh quote and retry in
  every case.
</Warning>

<Note>
  If the `quoteToken` came from a [sandbox](/sandbox-mode) quote, this returns a realistically
  shaped payload with no funds moved, except for THORChain (BTC source), Chainflip, and Houdini
  Swap, which return `500 INTERNAL` instead: none of them can be sandboxed. Exclude them via
  `excludeVenues` on [`/quote`](/api-reference/quote) while testing. A sandbox Rift execute still
  opens a real, unfunded Rift order, so never send funds to its deposit address.
</Note>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.