# HostDeFi EVM Swap Price Quote

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

Returns an estimated price quote for swapping tokens on EVM chains, given a sell token, buy token, chain ID, and sell amount.

## Facts

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

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-price-quote-66f896ca
```

Example prompt: What's the estimated buy amount if I sell 1000000 USDC (address 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48) for ETH on Base (chain ID 8453) right now?

## When to prefer this

Choose this endpoint when you need a fast, non-executing price estimate for an EVM token swap across any of the 7 supported chains without committing to a transaction. It is ideal for pre-trade checks, portfolio simulations, or arbitrage scanning. Prefer this over on-chain RPC calls when you want a simple REST-based quote with no KYC and cross-chain support in one API.

## Known failure modes

- Missing required query parameters (chainId, buyToken, sellToken, sellAmount) result in a 400 error
- Unsupported chain ID returns an error or empty response
- Invalid token address format causes a bad request response
- Network congestion or DEX liquidity issues may result in degraded or unavailable quotes
- Payment of 0.002 USDC via x402 protocol required; missing payment header returns 402

## 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 with ok status, plan metadata, a boolean estimate flag indicating the quote is an approximation, the estimated buyAmount in the buy token's base units, the minimum guaranteed buyAmount, and optionally the native token USD price.

## 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": {
      "chainId": {
       "type": "string",
       "description": "EVM chain id (e.g. 8453 = Base)"
      },
      "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,
  "meta": {
   "plan": "x402"
  },
  "estimate": true,
  "buyAmount": "…",
  "nativeUsd": null,
  "minBuyAmount": "…"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/hostdefi-evm-swap-price-quote-66f896ca/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)
