Get an EVM swap quote
Get a gasless EVM token swap quote. Requires the relayer to be configured with a swapChain (see FacilitatorOptions). Returns a quote ID, expected amounts, and EIP-712 typed data for the swap authorization.
This endpoint is available only when the EVM swap rail is configured. If swapChain is absent, BuckspayClient.swap() fails with SWAP_FAILED.
Authorizations
Server-held API key. Injected by the BFF (createRelayRoute / createSignerProxyRoute from @buckspay/nextjs). This key must only appear in server-side code and must never be shipped to a browser bundle.
Body
Request body for POST /swap/quote. Corresponds to the body built in buckspayFacilitator.quoteSwap().
EVM chain for the swap. Must match the swapChain configured in buckspayFacilitator.
avalanche, celo, polygon, base, avalanche-fuji, polygon-amoy, base-sepolia, celo-sepolia EVM address of the payer (0x-prefixed).
EVM address where the buy-token is settled. For self-custody swaps this equals payer.
EVM contract address of the sell token.
EVM contract address of the buy token.
Amount to sell in the sell token's minimal units, as a decimal string.
^\d+$Response
Swap quote computed.
Swap quote returned by POST /swap/quote. Mirrors the swapQuoteResponseSchema zod schema in @buckspay/relayer.
Unique identifier for this quote.
Actual sell amount (may differ from requested amount after routing).
^\d+$Expected amount of buy token received.
^\d+$Minimum buy amount after slippage. The client enforces this floor before submitting.
^\d+$EIP-712 typed data string for the swap authorization. Required if needsAuthorization is true.
Whether the payer must sign the EIP-712 typedData before submitting the swap.
Liquidity source or aggregator used to build the quote.
ISO 8601 timestamp after which the quote is invalid.

