Skip to content
LogoLogo

RFQ

Check ERC-20 allowance

POST/api/v1/check_approval

Reads the wallet's ERC-20 allowance for the Reactor contract and returns an approve() transaction when it is below the requested amount. Call it before submitting an order so the Reactor holds a large enough allowance for the input token.

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 every enabled solver that has eligible adapter inventory for the tokenIn/tokenOut pair, keeps the highest total output (ties broken by the faster solver response), and returns it with the EIP-712 payload the swapper signs. Call it before POST /api/v1/order, which consumes the returned quoteId, orderInfo and the swapper's signature. Responds 404 "No quotes available" when the amount is below the input token's configured minimum, when no solver is eligible, or when 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

Quote liquidity levels

POST/api/v1/liquidity

Runs a full solver auction at every trade size configured for the given input token and returns each solver's offer plus its gap to the oracle price. Use it to plot a depth/price-impact curve before requesting an executable quote. Results are pure price probes, are not persisted, and carry no quoteId, so they cannot back an order. Responds 400 when the token has no configured ladder and 404 when no solver quoted any size.

Request Body

application/json
tokenInRequired
string

Token to sell. Must be an enabled deployment input token that has a configured liquidity ladder.

solverIds
string[]·min 1·max 50

Restricts the auction to these configured solver ids (1-50). Omit to poll every 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 returned by POST /api/v1/quote. Its orderInfo must still match the stored quote.

signatureRequired
string

Swapper's EIP-712 signature over the quote'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