> ## 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.

# Pricing

> Retail stays 0 bps. Integrators can set their own swap fee and get paid their share automatically.

RAVN itself never charges a swap fee. Direct users on the consumer app pay **zero RAVN markup**,
full stop, and that doesn't change below. What's new: **integrators can now set their own fee**
on their API key and RAVN automatically collects and pays out their share. Every successful
quote still exposes a `fee` object so you can read the applied fee programmatically.

## Retail is always free

A bare no-fee key, an anonymous call, or the consumer app: all **0 bps**, permanently. Venue or
network costs that appear in a quote (for example gas on non-gasless routes) are not RAVN fees;
they're part of the route economics RAVN ranks for best execution.

## Setting your own fee

Any self-serve key can set its own swap fee, from 0 up to a **100 bps (1%) cap**, via
[`PATCH /v1/keys`](/api-reference/keys):

```bash theme={null}
curl -s -X PATCH https://app.ravn.exchange/api/v1/keys \
  -H 'x-api-key: rvn_live_your_key_here' \
  -H 'content-type: application/json' \
  -d '{ "feeBps": 20 }'
```

This is entirely your own price; RAVN doesn't add anything on top of it. It applies to every
swap made with your `x-api-key` header, whether over REST or the MCP server (see
[Fee by access path](#fee-by-access-path) for how x402 differs). Enterprise keys work
differently: their fee is set directly by RAVN as part of a custom arrangement (see
[Enterprise fee arrangements](#enterprise-fee-arrangements)) rather than through this endpoint.

## What you actually receive

RAVN keeps a **fixed 40% of whatever fee you collect**, and pays the rest to you. It is never a
fee on top of yours. On most venues that's the whole story. On a couple of venues, the venue
itself takes a cut of the fee before RAVN ever receives it, which reduces both sides
proportionally:

| Venue(s) | You receive | RAVN receives | Taken by the venue first |
| - | - | - | - |
| 0x Gasless, 0x Swap, Bebop, CoW Protocol, Across, Relay, Mayan, Chainflip, THORChain, Nordstern, Fly Trade, KyberSwap | 60% | 40% | None |
| NEAR Intents | 30% | 20% | 50%, 1Click's own fee-split |
| Jupiter | 48% | 32% | 20%, the Referral Program's own cut |
| Eco Routes, Houdini Swap, Layerswap, Rift | Not supported | N/A | N/A |
| OKX DEX | Not yet: races only on requests with no fee | N/A | N/A |
| 0x Solana | Not yet: a fee set on your key isn't charged on its fills | N/A | N/A |

<Note>
  **NEAR Intents can charge the end user slightly more than your declared `feeBps`** at low fee
  values. 1Click enforces its own minimum fee floor (20 bps, or 1 bp on stablecoin/same-asset
  pairs); if your declared fee is smaller than that floor, 1Click tops itself up out of the user's
  side rather than out of your share. The `fee.bps` on the quote always reports the honest total
  actually charged, not your raw declared value. Read it from the quote rather than assuming it
  equals what you set.
</Note>

Eco Routes, Houdini Swap, Layerswap, and Rift have no integrator-fee mechanism at all: a fee set
on your key silently cannot apply there, which is exactly what the quote's `fee.supported: false`
tells you (see below). Every other live venue reports `supported: true`. OKX DEX can carry a fee,
but RAVN doesn't send one yet, so it sits out any request that carries your fee and only wins
fee-free ones.

## The fee object on every quote

Every successful [`POST /quote`](/api-reference/quote) includes:

```json theme={null}
"fee": { "bps": 20, "amount": "1000000", "token": { }, "supported": true }
```

* `bps`: the fee actually applied to this quote. `0` if your key has no fee set, or if the
  winning venue doesn't support fees at all.
* `token`: the token the fee is deducted in. This is the **output** token on every venue except
  **Fly Trade** and **Mayan**, which take the fee out of the **input** (sold) token before the
  swap. It is also the token your share is paid in.
* `amount`: that fee in `token`'s smallest unit. On output-side venues the quoted `output.amount`
  is already net of the fee, so `amount` is the gross fee grossed up from it
  (`net × bps / (10000 − bps)`), not `net × bps`. It's the same arithmetic RAVN's ledger books
  and pays you on.
* `supported`: `false` means this venue has **no fee mechanism**, so your key's `feeBps`
  couldn't apply here regardless of its value (`bps` will read `0`). `true` with `bps: 0` means
  the venue can carry a fee, but either your key has none set or the fee genuinely rounded to
  zero: a real, intentional zero, not a limitation.

Each entry in `alternatives` carries the same four fields for its own venue. Don't hard-code an
assumption either way: read `fee.bps`, `fee.amount`, `fee.token`, and `fee.supported` from each
quote rather than inferring them from your key's configured `feeBps`.

## Getting paid

Register a payout address per ecosystem with [`PATCH /v1/keys`](/api-reference/keys):
`payoutAddresses.evm`, `.solana`, and `.thorchain`. If you haven't registered an address for an
ecosystem, your earned balance in it simply **accrues unpaid** rather than RAVN guessing where to
send it. That's the same fail-closed, never-guess posture described in [Security](/security).

A swap only counts toward your payout once it has reached `settled` in RAVN's ledger, and that
depends on you:

* **Report every swap to [`/status`](/api-reference/status#settlement) until it's terminal.** On
  same-chain venues (0x Swap, 0x Solana, Nordstern, Fly Trade, KyberSwap, OKX DEX, Jupiter, Mayan same-chain) the
  `ref` is the transaction hash you broadcast, and RAVN verifies that receipt on-chain before it
  marks the swap settled: mined, not reverted, moved the quoted input amount, and (for an ERC-20
  fee) the fee actually arrived. A swap you never report never becomes payable.
* One `ref` settles exactly one swap. A hash can't be reused across quotes.
* Swaps quoted with `sandbox: true` are never metered and never paid.

Payouts run on scheduled jobs, not per-swap in real time:

| Venue group | Paid in | Cadence | Minimum |
| - | - | - | - |
| EVM and Solana in-kind: 0x, CoW, Across, Relay, Mayan, Jupiter, Nordstern, Fly Trade, KyberSwap, NEAR Intents | The token the fee actually landed in (`fee.token` on the quote) | Monthly, on the 1st at 03:30 UTC (09:00 IST) | \$5 per token balance; smaller balances carry forward to the next run |
| THORChain | Always native RUNE | Scheduled job | \$2; smaller balances carry forward |
| Bebop | Native ETH on Ethereum mainnet | Monthly, only after Bebop's own invoice for the month has landed (triggered deliberately, not on a fixed timer) | \$5 |
| Chainflip | On-chain, see below | Scheduled job | None |

<Warning>
  This automated payout system is new and we're not going to overclaim its track record. Only the
  THORChain payout path has actually sent a real payout so far (a live-confirmed RUNE transfer).
  The EVM/Solana, Chainflip, and Bebop payout paths exist and are wired up, but haven't yet been
  proven with real funds in production. There is no SLA on the exact time a run lands.
</Warning>

**Chainflip is structurally different from the rest.** Once you've set a fee and registered an
EVM payout address, RAVN registers you as a real on-chain Chainflip "Affiliate." Your share of
the fee then accrues on Chainflip's own chain as part of the swap itself, outside RAVN's ledger,
and a scheduled job withdraws it to the Ethereum address bound at registration.

## Fee by access path

<Note>
  An integrator fee is tied to your API key, so it only applies when you actually send your
  `x-api-key` header. That includes the [x402](/ai-agents/x402-payments) endpoints: pay per call
  without a key and you quote at the 0% default; pay per call *and* send your key and your fee
  applies, credited to you like any other keyed swap.
</Note>

| Access path | Swap fee | Access / call cost |
| - | - | - |
| Anonymous REST (no key) | 0 bps, fixed | Free (rate-limited) |
| Self-serve API key | Whatever you set, 0 to 100 bps | Free ([get a key](/tools/get-api-key)) |
| Enterprise key | Custom, set by RAVN | Free / custom |
| [MCP server](/ai-agents/mcp-server) | Same as your key, if you pass one | Free |
| [x402 quote / execute](/ai-agents/x402-payments) | 0 bps without a key; whatever your key sets if you also send `x-api-key` | Optional USDC call fee (\$0.001 quote, \$0.01 execute) |

The x402 amounts are **API access fees**, not swap fees. They pay for the HTTP call when you
choose the metered door. See [x402 Payments](/ai-agents/x402-payments).

Rate limits and keys live on [Authentication](/authentication).

## Enterprise fee arrangements

Need a dedicated fee schedule, rev-share, or custom rate limits? DM
[@ravnexchange](https://x.com/ravnexchange) or reach out via
[ravn.exchange](https://ravn.exchange) with a short note on what you are building.


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