x402 (machine-payable)

Executable EVM swap quote (ready-to-sign tx), paid per call via x402

Firm KyberSwap-routed quote plus a ready-to-sign transaction for the taker's own wallet - non-custodial, no key, no account. Query params: chainId, sellToken and buyToken ('native' or a 0x 40-hex address), sellAmount (integer, base units), taker (0x address), optional ref (referrer 0x address). The returned transaction includes a 1% platform fee in the chain's native coin, on top of the swap. Bad params answer 400 before any payment starts; no-route and upstream errors pass through as 4xx/5xx and are never settled.

get/v1/x402/swap/evm/quote

Request

  • Base URL: https://hostdefi.com/api
  • URL: https://hostdefi.com/api/v1/x402/swap/evm/quote
  • Auth: none required

Response

Quote with executable tx (to, data, value), feeMode, allowanceTarget, gas figures. Settlement receipt in the X-PAYMENT-RESPONSE header.

object required

Changes

No recorded changes to this operation across all 1 revision of this API.