# Crypto Spot Price API (CoinGecko-based, x402)

> Crypto Spot Price API (CoinGecko-based, x402) is a paid API for AI agents from toolsmith-api.dassad10.workers.dev, paid per call via x402, $0.003/call, status down (last checked 2026-09-15).

Returns live spot prices and 24-hour change for one or more cryptocurrencies, identified by CoinGecko coin IDs, against a chosen fiat or crypto quote currency.

## Facts

- Endpoint: GET https://toolsmith-api.dassad10.workers.dev/t/crypto/spot
- Price: $0.003/call
- Payment: x402
- Status: down
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/crypto-spot-price-api-coingecko-based-x402-291bd043
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_WnPdH7G6vhXCtm9yQRwqc

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 crypto-spot-price-api-coingecko-based-x402-291bd043
```

Example prompt: What are the current spot prices and 24-hour changes for bitcoin, ethereum, and solana in USD? Data should be fresh — within the last minute.

## When to prefer this

Use this endpoint when you need near-real-time cryptocurrency spot prices (fresh within 60 seconds) for up to 25 coins identified by CoinGecko IDs, with 24h change data included. Prefer this over generic finance APIs when you need CoinGecko-sourced data and want a simple GET request with per-call micropayment pricing via x402.

## Known failure modes

- Invalid or misspelled CoinGecko coin ID returns an error or empty result for that coin
- Requesting more than 25 coins at once may be rejected
- Unsupported quote currency (vs) may return an error
- Payment failure (x402) results in 402 response before data is returned
- Upstream CoinGecko API outage causes stale or missing data

## How this service works

Live spot prices for cryptocurrencies with 24h change. Query by CoinGecko ids (comma-separated, e.g. bitcoin,ethereum) and a fiat vs currency. Fresh within 60 seconds. JSON response.

## Output

A JSON object containing spot prices for each requested coin in the specified quote currency, along with 24-hour percentage change figures. Data is guaranteed fresh within 60 seconds.

## 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": [
      "ids"
     ],
     "properties": {
      "vs": {
       "type": "string",
       "description": "Fiat or crypto quote currency, default usd"
      },
      "ids": {
       "type": "string",
       "description": "Comma-separated CoinGecko coin ids, max 25"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/crypto-spot-price-api-coingecko-based-x402-291bd043/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from toolsmith-api.dassad10.workers.dev](https://www.zero.xyz/host/toolsmith-api.dassad10.workers.dev/llms.txt)
