POST /v1/quote Run one quote round across the configured providers and disclose the winner.

Request

Request body

QuoteRequest: Validation and resolution rules, in the order they apply:
  • A non-EVM recipient or sourceAccount that does not decode is EIN0001 with that field as reference. EVM addresses are not format-checked at this point — a malformed one fails later, not as EIN0001.
  • An asset reference whose chain is not the request’s chain is EIN0001 (reference sourceAsset / destAsset, error_params = [reference chain, request chain]).
  • A reference to a declared asset behaves exactly as its key.
  • An undeclared destination reference is forwarded as its address.
  • An undeclared source reference is admitted only on a chain that declares a swap router and a wrapped native — the token-in lane (the proxy swaps it into the wrapped native). An address with no code there (its decimals() call answers empty) is EIN0002, reference no ERC-20 at <chainDomain>:<address>. A contract that is not an ERC-20 passes that probe, and the round then fails at the provider, typically EIN0008 providerRefused. On any other chain an undeclared source is EIN0002 (“accepts no undeclared source”).
  • maxAmountIn on an exact-input request is EIN0001 (reference maxAmountIn).
  • exact-output with a token-in source is EIN0001 (reference swapType): that lane’s price is known only from what the user spends.
  • Source chains are EVM and Solana. Sui and Aptos are supported as destination chains only: a quote whose source is a Sui or Aptos chain is refused. The catalog’s family tells you which rail a chain is on.

Response

data (QuoteResponse): disclosure.signableHash is the value to echo as artifactHash on POST /order. disclosure.signablePayload is the canonical signable form. Its keys a client reads: executionTx:
  • approvals[]: {chainId, token, spender, amount} — send first.
  • steps[]: {chainId, to, data, value, description} — then send in order.
  • chainId is an integer on the hub’s proxy lanes and a chain-domain string on the external aggregator lane; accept both.
  • value is decimal wei. description names the proxy call (wrapAndOpen, swapAndOpenV2).

Behavior

A winner discloses at most one of signPayload and executionTx; which one, what to do with it, and the solver-swap and transfer cases that disclose neither: Step execution. The hub caches a quote round for about 30 seconds: the same request body inside that window answers with the same quoteId and its original expiresAt. Time a quote from when you first received its quoteId, not from your latest request.

Errors

The gateway’s own refusals — a refused credential, a route not open to it, a rate limit, the hub unreachable or too slow — can come back from every route, with an EPX code and a real HTTP status (Errors — gateway codes); EIN0049 (internal, scrubbed) can come back from any route.

Example

Response

Illustrative values; formats follow the Response table. signPayload is the fixture typed data verbatim; signablePayload.quoteId is the provider’s own quote id, not the hub’s quoteId above it. The deadlines are the fixture’s too: witness.expires and orderExpiresAt (4102445200) fall in the year 2100. A live quote carries an orderExpiresAt about 1 800 s after issuedAt, and the firewall refuses one more than 24 h ahead, so a live hub would not serve this sample at its issuedAt.
No executionTx or swapInput (the escrow lane discloses neither); no auction (this is a firm quote, not a decaying winner).

See also