# x402-data-api Crypto Spot Price

> x402-data-api Crypto Spot Price is a paid API for AI agents from x402-data-api.onrender.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-13).

Returns current USD spot price and 24-hour percent change for any CoinGecko-identified crypto asset

## Facts

- Endpoint: GET https://x402-data-api.onrender.com/api/price/:coin
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-data-api-crypto-spot-price-8b884a47
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_v70lvTKDlZW55Rq0jhNzZ

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 x402-data-api-crypto-spot-price-8b884a47
```

Example prompt: What's the current USD price of solana and how much has it changed in the last 24 hours?

## When to prefer this

Use this endpoint when you need a fast, cheap USD spot price and 24-hour change for a single crypto asset by CoinGecko id. Ideal for trading bots, price alert systems, or analytics pipelines that need high-volume, low-cost price lookups without full market data. If you need multi-timeframe changes (1h/7d/30d), market cap, or volume, prefer the sibling enriched market report endpoint instead.

## Known failure modes

- Invalid or unknown CoinGecko coin id returns an error — agent must use exact CoinGecko ids like 'bitcoin', not ticker symbols like 'BTC'
- Payment not fulfilled (x402 micropayment of $0.001 USDC not processed) results in 402 Payment Required response
- Network or upstream CoinGecko API outage may cause 503 or timeout
- Missing required coin query parameter returns a 400 error

## How this service works

Current USD spot price and 24-hour percent change for any crypto asset by CoinGecko id. Cheap, high-volume price lookups for trading and analytics agents.

## Output

Returns a JSON object with the coin's CoinGecko id, current USD spot price as a number, 24-hour percent change as a decimal, and a timestamp of when the data was fetched.

## 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"
    },
    "pathParams": {
     "type": "object"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "coin"
     ],
     "properties": {
      "coin": {
       "type": "string",
       "description": "CoinGecko asset id, e.g. bitcoin, ethereum, solana"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "ts": {
       "type": "string"
      },
      "usd": {
       "type": "number"
      },
      "coin": {
       "type": "string"
      },
      "change_24h_pct": {
       "type": "number"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-data-api-crypto-spot-price-8b884a47/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-data-api.onrender.com](https://www.zero.xyz/host/x402-data-api.onrender.com/llms.txt)
