# HostDeFi EVM Swap Quote

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

Returns a best-route EVM token swap quote with a ready-to-sign transaction object for a given chain, sell token, buy token, and amount.

## Facts

- Endpoint: GET https://hostdefi.com/api/v1/x402/swap/evm/quote
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/hostdefi-evm-swap-quote-6581c138
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_2FPM9qKtsv7TddINnhi2c

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-6581c138
```

Example prompt: Get me a swap quote to sell 1000000 USDC (0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48) for native ETH on Ethereum mainnet (chain ID 1) using my wallet 0xAbCd...1234 — no KYC, just the best route and the transaction I need to sign.

## When to prefer this

Use this endpoint when you need a non-custodial, no-KYC EVM swap quote with ready-to-sign transaction calldata across multiple EVM chains (Base, Ethereum, and others). Prefer it over Solana-specific endpoints when trading ERC-20 or native EVM tokens. Choose it over CEX APIs when the user wants self-custody and no account creation.

## Known failure modes

- Unsupported chainId returns an error or empty route
- Invalid or unrecognized token address returns a routing failure
- sellAmount of zero or below minimum returns a quote error
- Insufficient liquidity for the pair returns no viable route
- Missing required parameters (taker, sellToken, buyToken, sellAmount) returns a 400-style error
- Payment not fulfilled (x402) results in 402 response before quote is returned

## How this service works

HostDeFi is a non-custodial Solana DEX. Best-route swaps through Jupiter, EVM trading across 7 chains, native bridging, and live token risk grades. No KYC, no accounts, no custody.

## Output

Returns a JSON object with ok=true, a tx object containing the to address, calldata (data), and value needed to broadcast the swap, plus metadata including the plan, feeMode (forwarder), estimated buyAmount, minBuyAmount (after slippage), gasEstimate, and the allowanceTarget for ERC-20 approvals.

## 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-6581c138/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from hostdefi.com](https://www.zero.xyz/host/hostdefi.com/llms.txt)
