# HostDeFi EVM Swap Quote

> HostDeFi EVM Swap Quote is a paid API for AI agents from rpc.hostdefi.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-02).

Returns a best-route EVM swap quote and ready-to-sign transaction object for exchanging tokens on a specified EVM chain

## Facts

- Endpoint: GET https://rpc.hostdefi.com/api/v1/x402/swap/evm/quote?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/hostdefi-evm-swap-quote-eb87c717
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_0HJSyrGdrwFNZXjOWyXLO

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability hostdefi-evm-swap-quote-eb87c717
```

Example prompt: Get me a swap quote on HostDeFi to sell 500000000 USDC (0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48) for native ETH on Ethereum (chain 1) using my wallet 0xAbCd1234abcd1234abcd1234abcd1234abcd1234.

## When to prefer this

Choose this endpoint when you need an EVM-chain token swap quote with transaction calldata ready for wallet signing, especially across Base, Ethereum, or other supported EVM chains. It aggregates routing for best price. Prefer it when operating on EVM chains (not Solana), when you need the raw transaction object rather than just a price, and when a flat 1% fee with no KYC is acceptable.

## Known failure modes

- Invalid or unsupported chainId returns an error response
- Unrecognized token address (buyToken or sellToken) causes routing failure
- Insufficient liquidity for the requested sellAmount results in no route found
- Missing required parameters (taker, chainId, buyToken, sellToken, sellAmount) returns 400-style error
- Payment of 0.01 USDC x402 fee not fulfilled results in 402 Payment Required

## How this service works

HostDeFi is a Solana DEX with a free token safety scanner. Best-route swaps through Jupiter, EVM trading across 7 chains, native bridging, and live token risk grades. No KYC, 1% flat fee.

## Output

Returns a JSON object containing a ready-to-broadcast EVM transaction (to, data, value fields), the expected buy amount, minimum buy amount with slippage, gas estimate, allowance target contract address, fee mode, and a meta plan identifier. The agent can pass this transaction directly to a wallet for signing and broadcasting.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "ref": {
       "type": "string",
       "description": "Optional referrer 0x… address (splits the platform fee)"
      },
      "taker": {
       "type": "string",
       "description": "The wallet (0x…) that will sign and broadcast the returned transaction"
      },
      "chainId": {
       "type": "string",
       "description": "EVM chain id (e.g. 8453 = Base, 1 = Ethereum)"
      },
      "buyToken": {
       "type": "string",
       "description": "'native' or the 0x… address of the token being bought"
      },
      "sellToken": {
       "type": "string",
       "description": "'native' or the 0x… address of the token being sold"
      },
      "sellAmount": {
       "type": "string",
       "description": "Integer amount in the sell token's base units"
      }
     }
    }
   }
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "tx": {
   "to": "0x…",
   "data": "0x…",
   "value": "0x…"
  },
  "meta": {
   "plan": "x402"
  },
  "feeMode": "forwarder",
  "buyAmount": "…",
  "gasEstimate": "…",
  "minBuyAmount": "…",
  "allowanceTarget": "0x…"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/hostdefi-evm-swap-quote-eb87c717/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from rpc.hostdefi.com](https://www.zero.xyz/host/rpc.hostdefi.com/llms.txt)
