Skip to main content
POST
Quote a swap across every viable route

Authorizations

x-api-key
string
header
required

Soft-auth read routes accept x-api-key with a publishable or partner key; money-moving routes require a secret partner key in Authorization: Bearer.

Body

application/json
srcChain
string
required

Source chain identifier. EVM: stringified chain id ("84532", "11155111"). Non-EVM: kebab key ("solana-mainnet", "bitcoin"). Must resolve via chainConfigById to one of the supported chains.

Example:

"11155111"

tokenIn
string
required

Input token address (tokenIn), on srcChain. Format follows srcChain: EVM chains take a 0x-prefixed 40-char hex string, non-EVM chains take that chain's native address format (e.g. base58 for Solana).

Example:

"0x37a351f11e5614FC56e3BFb84aAC940767faC365"

tokenOut
string
required

Output token address (tokenOut), on dstChain (or srcChain when same-chain). Format follows dstChain: EVM chains take a 0x-prefixed 40-char hex string, non-EVM chains take that chain's native address format (e.g. base58 for Solana).

Example:

"0x37a351f11e5614FC56e3BFb84aAC940767faC365"

amountIn
string<uint>
required

Input amount in tokenIn's smallest units. Decimal string (uint256-safe).

Pattern: ^\d+$
Example:

"1000000"

recipient
string
required

Address that will receive tokenOut after the swap. This lives on the DESTINATION chain, so its format follows dstChain — a base58 address for a Solana payout, not a 0x EVM address. Format follows dstChain: EVM chains take a 0x-prefixed 40-char hex string, non-EVM chains take that chain's native address format (e.g. base58 for Solana).

Example:

"0x37a351f11e5614FC56e3BFb84aAC940767faC365"

dstChain
string

Destination chain identifier. When set AND different from srcChain, the request is routed through the cross-chain superswap adapter (Hypermid diamond's SwapAndBridge). When omitted, a same-chain adapter is used.

Example:

"84532"

srcAddress
string

Source-chain SENDER — the wallet that signs + submits the source transaction (transactionRequest.from) and that the inner-swap routers quote against. Distinct from recipient: for a cross-chain swap the sender lives on the SOURCE chain while recipient is the destination payout. When omitted, defaults to recipient at the API boundary (same-chain swaps where sender == payout). REQUIRED when src and dst are in different ecosystems, where that default would be nonsense.

Example:

"0x37a351f11e5614FC56e3BFb84aAC940767faC365"

refundRecipient
string<address>

Destination-chain principal authorised to recover funds via SettlementFacet.sendFallback if the executor fails to deliver before fallbackDelay elapses. Distinct from recipient (happy-path payout target) — useful when the src-tx sender + the dst-side beneficiary live at different addresses (smart wallet sources, aggregator UIs).

When omitted, defaults to recipient at the API boundary — same address receives both happy-path payout AND fallback refund. Pass explicitly only when you want the two split (e.g. recipient = end-user, refundRecipient = treasury).

Stays EVM-only on purpose, unlike recipient: this is a Hypermid diamond concept (SettlementFacet.sendFallback), and the diamond only exists on EVM chains. A non-EVM destination routes over an intent-based rail, which has no claim to recover, so the field is not meaningful there.

Example:

"0x37a351f11e5614FC56e3BFb84aAC940767faC365"

slippageBps
number

Slippage tolerance in basis points (1 = 0.01%). If omitted, the service default applies.

Required range: 1 <= x <= 10000
Example:

50

fee
number

Partner's NET integrator fee as a decimal share of amountIn (0.01 = 1%). The net rate has the same meaning on every rail; providers that split an app fee receive a rail-specific gross declaration so the partner still receives this rate. Converted to basis points server-side, bounded only by the contract hard cap of 1000 bps (10%) — the direct quote API has no per-partner soft cap. The fee is taken from the source token and accrues to the partner's configured fee wallet (set per API key's partner). Rejected (400) if the partner has no fee wallet configured.

Required range: 0 <= x <= 0.1
Example:

0.01

directToRecipient
boolean

Recipient-direct bridge mode. When true the Warp Route delivers the bridged asset straight to recipient on the destination chain — no dst-side claim is registered, so the registrar + executor are NOT involved. Only valid when the recipient wants the bridged asset as-is (no destination swap). Cheaper + faster, but the user receives the bridged token, not an arbitrary outputToken. Defaults false (claim flow).

Example:

false

rawSwap
boolean

Raw-swap mode. When true, a same-chain PulseChain swap returns the DIRECT aggregator router call in transactionRequest instead of the diamond swapOnly wrapper. Set by the diamond executor's settlement path, which runs the destination swap itself from inside SettlementFacet.executeClaim and so needs raw router calldata (the diamond-wrapped target would make the diamond call itself and revert, and its post-fee sizing drops the estimate below the committed floor). Not for user wallets — those want the diamond route so the swap emits SwapCompleted. Defaults false.

Example:

false

Response

200 - application/json
routes
object[]
required

Every live route for the pair. routes[0] is the default POST /quote would pick.