Skip to content
LogoLogo

RFQ

Check ERC-20 allowance

POST/api/v1/check_approval

Returns unsigned ERC-20 transactions for the wallet to execute. Sufficient allowance returns null for both payloads. Zero allowance returns approval only. Nonzero but insufficient allowance returns cancel (approve Reactor for zero) and approval (approve Reactor for maxUint256). Execute cancel before approval, atomically when supported or waiting for each transaction to confirm.

Request Body

application/json
walletAddressRequired
string

Token owner whose Reactor allowance is read — the swapper that will sign the order.

chainIdRequired
integer·max 9007199254740991

Chain to run the check on. Must match the single chain this deployment is configured for.

tokenRequired
string

ERC-20 the swapper will spend. Its allowance for the Reactor is what gets checked.

amountRequired
string

Allowance the wallet needs, in the token's smallest unit. No approval is returned once allowance reaches it.

Responses

Request a quote

POST/api/v1/quote

Fans the swap request out to enabled solvers with eligible adapter inventory and returns a non-empty quotes array, best output first, with ties broken by the faster solver response. Each entry contains solver metadata, a quote, and its EIP-712 signing data. Choose an entry, sign its signatureData, and submit its quote to POST /api/v1/order. Responds 404 "No quotes available" when the amount is below the input token's configured minimum, no solver is eligible, or no solver returns a non-zero quote.

Request Body

application/json
tokenInChainIdRequired
integer·max 9007199254740991

Chain the input token lives on. Must equal the single chain this deployment serves or the call 400s.

tokenOutChainIdRequired
integer·max 9007199254740991

Chain of the output token. Must equal tokenInChainId and the deployment's chain.

tokenInRequired
string

Token the swapper is selling. 0x address, case-insensitive and normalized to lowercase.

tokenOutRequired
string

Token the swapper wants to receive. Every outputs[].token must repeat this address.

typeRequired
string·const EXACT_INPUT

Only "EXACT_INPUT" is supported: amount fixes the input and solvers compete on the output amount.

amountRequired
string

Input amount to sell, in tokenIn's smallest unit. Below the token's configured minimum no quote is returned.

swapperRequired
string

Address that must sign the order and, unless an output overrides it, receives the output tokens.

routingPreference
string·const BEST_PRICE·default BEST_PRICE

Only "BEST_PRICE" is accepted and it is the default. It is recorded but does not affect solver selection.

permitAmount
string·const EXACT

Optional, "EXACT" is the only accepted value and it is only stored alongside the quote request.

solverIds
string[]·min 1·max 50

Restricts the auction to these solver ids (1-50 entries). Omit to fan out to every enabled solver.

outputsRequired
object[]·min 1·max 50

Split of the output across recipients: 1-50 entries whose portionBps sum to at most 10000.

Responses

Get solver liquidity

POST/api/v1/liquidity

Returns the adapter inventory available to each eligible solver using the same authorization and live-discount limits as quote construction. Each liquidity value sums adapters[].maxAssets in tokenOut base units, totalLiquidity sums all returned solver values, including shared inventory counted for each solver. Solvers are sorted by liquidity descending. Optional solverId restricts the list and total to one solver and takes precedence over solverIds. Does not request solver quotes or persist quote records. Empty inventory returns 200 with totalLiquidity=0 and solvers=[].

Request Body

application/json
tokenInRequired
string

Token to sell. Must be a deployment input token with a configured liquidity output token.

solverId
string·min 1

Restricts solvers and totalLiquidity to this configured solver. Takes precedence over solverIds. No eligible liquidity returns a zero total and an empty solvers array.

solverIds
string[]·min 1·max 50

Restricts solvers and totalLiquidity to these configured solver ids. Used only when solverId is omitted. Omit both filters to include every eligible enabled solver.

Responses

Publish a discount

POST/api/v1/discount

Publish a signed discount. A signed request with deadline=0 instead cancels (deletes) the discount currently stored for the (adapter, tokenToRedeem) pair. The signer must still produce a valid signature and be authorized for the adapter. Cancellation is backend-only — it stops the discount being served but does not retract the signed object on-chain.

Request Body

application/json
discountRequired
object

The discount terms covered by signature. Resubmit with a fresh nonce to replace a live posting.

signatureRequired
string

Signer's EIP-712 signature over the Discount struct. ECDSA, EIP-1271 and ERC-6492 wallets are accepted.

Responses

Submit an order

POST/api/v1/order

Accepts a quote returned by POST /api/v1/quote together with the swapper's EIP-712 signature over it. The backend re-checks the terms against the stored quote, verifies the signature, re-runs the auction, counter-signs the order with the protocol key and stores it. An unknown quoteId gives 404. An expired quote, or one no solver can still honor, gives 409. Re-posting the same quoteId and signature returns the existing order instead of creating a second one.

Request Body

application/json
quoteRequired
object

The quote object from the selected quotes[] entry returned by POST /api/v1/quote. Its orderInfo must still match the stored quote.

signatureRequired
string

Swapper's EIP-712 signature over the selected entry's signatureData. Verified against the quote's swapper.

Responses

List orders

GET/api/v1/orders

Returns stored orders matching the supplied filters, newest first by default, each carrying the amounts the indexer has seen settled for its on-chain order hash. At least one of orderId, orderIds, orderHash, orderHashes, orderStatus, swapper or filler is required, otherwise the request is rejected with 400.

Query Parameters

limit
integer·max 100

Maximum orders per page, 1-100. Defaults to 20 when omitted.

cursor
string

Token to pass back as cursor for the next page, null when no further orders match.

orderStatus
string

Keep only orders currently in this lifecycle state.

Values
openexpirederrorcancelledfilled
orderId
string <uuid>

Return just the order with this UUID.

orderIds
string

Comma-separated list of 1-50 order UUIDs to fetch in one call.

orderHash
string

Return the order whose on-chain order hash (32-byte hex) matches this value.

orderHashes
string

Comma-separated list of up to 50 on-chain order hashes to fetch in one call.

swapper
string

Keep only orders signed by this wallet — the usual filter for a user's order history.

filler
string

Keep only orders assigned to this solver, and expose the execution fields on its own open orders.

sortKey
string

Timestamp the page is ordered by: createdAt (default) or updatedAt.

Values
createdAtupdatedAt
sort
string

Ordering direction: desc (default, newest first) or asc.

Values
ascdesc

Responses