Skip to main content
GET
Quote and build
The one call for quotes and swap transactions. Guides: build and execute, fees, streaming, exclude, prefer and JIT, vault zaps, gasless. Other EVM chains: the same call under a chain prefix.

Authorizations

Authorization
string
header
required

Partner key: Authorization: Bearer rk_.... DM @rapidssh. Leave it out for the public tier.

Headers

x-request-id
string

Optional trace ID, echoed in the response header and requestId.

Pattern: ^[A-Za-z0-9._:-]{1,64}$

Query Parameters

in
string
required

Input token address. Zero address for the native token. A supported ERC-4626 vault makes it a zap out.

Pattern: ^0x[0-9a-fA-F]{40}$
out
string
required

Output token address. Zero address for the native token. A supported ERC-4626 vault makes it a zap in.

Pattern: ^0x[0-9a-fA-F]{40}$
amount
string
required

Exact input amount in raw units (vault shares for a zap out). Positive integer, no leading zeros.

Pattern: ^[1-9][0-9]{0,77}$
recipient
string

Receives the output. Setting it returns tx and swap. Not the zero address. Needs a key that can build (or the public tier).

Pattern: ^0x[0-9a-fA-F]{40}$
slippageBps
integer
default:50

Tolerance below the quoted output; sets swap.minOut. With recipient.

Required range: 0 <= x <= 500
minOut
string

Your own minimum output after fees, raw units. Overrides slippageBps. Must not exceed the quoted output. With recipient.

Pattern: ^[0-9]{1,78}$
deadline
integer

Unix seconds after which the swap reverts. Between now and now + 3600. Default now + 600. With recipient.

exclude
string

Pools this quote never uses. One comma-separated list of at most 64 entries: pool or pair addresses (0x + 40 hex), Uniswap v4 / PancakeSwap Infinity pool ids (0x + 64 hex), or hook addresses (every pool with that hook). Robinhood Chain.

prefer
string

Pools to prefer, same syntax as exclude. Partner keys; not with stream or zaps. Robinhood Chain.

preferBps
integer
default:10

With prefer. The most net output (after gas, bps of the normal quote's) given up for the preferred plan.

Required range: 0 <= x <= 50
jit
enum<string>

1: the JIT module picks the best of the quoted plan and its alternates at execution. 0: off for this request. Partner keys, builds only. Robinhood Chain.

Available options:
0,
1
permit2
enum<string>

1: the build takes a Permit2 signature instead of an approval. swap.spender is then Permit2. ERC-20 input, with recipient. Partner keys. Robinhood Chain.

Available options:
1
gasless
enum<string>

1: a gasless swap quote (needs owner). Returns gasless instead of tx. ERC-20 input. Keys with gasless on. Robinhood Chain.

Available options:
1
owner
string

With gasless=1, the wallet that signs. recipient defaults to it.

Pattern: ^0x[0-9a-fA-F]{40}$
stream
enum<string>

1: progressive server-sent events ending with a final quote. live: then live updates. Partner keys. Robinhood Chain.

Available options:
1,
live
visible
enum<string>

With stream=live, 0 makes the stream progressive only.

Available options:
0,
1
streamTx
enum<string>

With stream=live and recipient, changed (default) rebuilds the transaction when the plan or price moved; always on every update.

Available options:
changed,
always
feeBps
enum<integer>

Only for keys without a fixed Route fee. One of 0, 1, 2, 3, 5, 10, 50.

Available options:
0,
1,
2,
3,
5,
10,
50

Response

Route found (and transaction built, if recipient was set).

requestId
string
required
ok
any
required
block
object
required

The block the quote is exact at.

tokenIn
string
required
Pattern: ^0x[0-9a-fA-F]{40}$
tokenOut
string
required
Pattern: ^0x[0-9a-fA-F]{40}$
amountIn
string
required

Unsigned integer as a decimal string.

Pattern: ^[0-9]+$
amountOut
string
required

Output before fees.

Pattern: ^[0-9]+$
swaps
object[]
required

Pool swaps in execution order. Native legs show the wrapped native token.

gas
string

Estimated gas for the swaps.

Pattern: ^[0-9]+$
gasCostOut
string

Estimated gas cost in output-token units.

Pattern: ^[0-9]+$
netOut
string

amountOut - gasCostOut. A ranking figure that ignores fees. Use fee.amountOutAfterFees or swap.netOut for what the user receives.

Pattern: ^[0-9]+$
fee
object

The fees a build takes off amountOut. Not present on zaps (see zap).

tx
object

Present only with recipient. The unsigned transaction.

swap
object

Present only with recipient. The terms the transaction enforces.

permit2
object

With permit2=1: typedData to sign, and signatureOffset / signatureLength (65) where the signature goes in tx.data.

submit
object

Keys with submit and track: ticket for POST /submit, valid validForS seconds.

gasless
object

With gasless=1: contract, order, fee, sponsored, nonce, typedData, approval, ticket, validForS. No tx.

zap
object

Vault zaps: vault, direction (in, out), asset, shares, assets, previewAt, feeBps, partnerFeeBps.

prefer
object

With prefer: applied, costBps, preferredShare, preferBps.