# First Dollar On-Chain Quote API

> First Dollar On-Chain Quote API is a paid API for AI agents from firstdollar-api.onrender.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-29).

Fetches a live token swap quote on Base chain given an input token, output token, and amount

## Facts

- Endpoint: GET https://firstdollar-api.onrender.com/quote?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/first-dollar-on-chain-quote-api-68f67e60
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_JOO-tdIKHkS0oCJOl_RU4

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 first-dollar-on-chain-quote-api-68f67e60
```

Example prompt: What's the current on-chain quote for swapping 10.5 USDC to WETH on Base? Give me the live rate right now.

## When to prefer this

Choose this endpoint when you need a real-time, on-chain swap quote specifically on the Base chain and are comfortable paying $0.02 USDC per call via x402 micropayment. Prefer it over off-chain price feeds when accuracy to actual on-chain liquidity matters, or when building agents that need to verify executable swap rates rather than indicative market prices.

## Known failure modes

- Unsupported token symbol or invalid 0x address returns an error
- Token pair with insufficient liquidity may return no quote or a degraded result
- Missing required query parameters (tokenIn, tokenOut, amountIn) results in a validation error
- Payment failure over x402 (insufficient USDC balance or authorization) blocks the response
- Network or RPC issues on Base chain may cause temporary unavailability

## How this service works

Live Base chain reads sold per call over x402 (exact, USDC on Base, $0.02/call).

## Output

Returns a live quote from Base chain for the requested token swap, including the expected output amount for the given input token and amount, reflecting real-time on-chain liquidity and pricing.

## 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",
     "required": [
      "tokenIn",
      "tokenOut",
      "amountIn"
     ],
     "properties": {
      "tokenIn": {
       "type": "string",
       "description": "Input token: symbol (USDC, WETH…) or 0x address"
      },
      "amountIn": {
       "type": "string",
       "description": "Input amount in whole-token units (e.g. 10.5)"
      },
      "tokenOut": {
       "type": "string",
       "description": "Output token: symbol or 0x address"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/first-dollar-on-chain-quote-api-68f67e60/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from firstdollar-api.onrender.com](https://www.zero.xyz/host/firstdollar-api.onrender.com/llms.txt)
