# Coinbase Exchange Crypto Market Data API

> Coinbase Exchange Crypto Market Data API is a paid API for AI agents from x402-trends-server.onrender.com, paid per call via x402, $0.05/call, status unknown (last checked 2026-09-16).

Returns live cryptocurrency price and market data (last price, bid/ask, 24h OHLCV, 30d volume) for Coinbase Exchange trading pairs like BTC-USD, ETH-USD, and SOL-USD.

## Facts

- Endpoint: GET https://x402-trends-server.onrender.com/api/crypto-market
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/coinbase-exchange-crypto-market-data-api-c4a01424
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_QuCyywgDR6Elv6mE1jObi

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 coinbase-exchange-crypto-market-data-api-c4a01424
```

Example prompt: What's the current price of Ethereum right now — including the best bid and ask, and the 24-hour high, low, and volume on Coinbase?

## When to prefer this

Use this endpoint when you need real-time or near-real-time cryptocurrency market data from Coinbase Exchange, specifically for popular pairs like BTC-USD, ETH-USD, or SOL-USD. Prefer this over general financial data APIs when you need Coinbase-specific prices, bid/ask spreads, or 30-day volume figures. It is well-suited for agents monitoring crypto prices, performing spread analysis, or enriching financial dashboards with live market snapshots.

## Known failure modes

- Unsupported trading pair returns an error or null fields
- Network timeout if Coinbase Exchange API is unavailable
- Stale data served from cache during high-volatility periods
- Invalid pair format (e.g. missing dash) may return a bad request error
- Rate limiting or payment failure results in 402 response

## How this service works

Get live cryptocurrency price and market data from Coinbase Exchange for BTC, ETH, SOL, and other supported trading pairs. Use this crypto market API for last price, best bid and ask, 24-hour open/high/low/volume, and 30-day volume. Defaults to BTC-USD.

## Output

Returns a JSON object containing: trading pair, last traded price, best bid, best ask, 24-hour open/high/low prices, 24-hour volume, 30-day volume, ticker timestamp, retrieval timestamp, and a flag indicating whether the data was served from cache. Source attribution and payment confirmation are also included.

## 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": [],
     "properties": {
      "pair": {
       "type": "string",
       "description": "Coinbase Exchange trading pair such as BTC-USD, ETH-USD, or SOL-USD. Defaults to BTC-USD."
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "status",
      "source",
      "pair",
      "price",
      "bestBid",
      "bestAsk",
      "open24h",
      "high24h",
      "low24h",
      "volume24h",
      "volume30d",
      "retrievedAt",
      "cached"
     ],
     "properties": {
      "pair": {
       "type": "string"
      },
      "price": {
       "type": [
        "string",
        "null"
       ]
      },
      "cached": {
       "type": "boolean"
      },
      "low24h": {
       "type": [
        "string",
        "null"
       ]
      },
      "source": {
       "type": "string"
      },
      "status": {
       "type": "string"
      },
      "bestAsk": {
       "type": [
        "string",
        "null"
       ]
      },
      "bestBid": {
       "type": [
        "string",
        "null"
       ]
      },
      "high24h": {
       "type": [
        "string",
        "null"
       ]
      },
      "last24h": {
       "type": [
        "string",
        "null"
       ]
      },
      "open24h": {
       "type": [
        "string",
        "null"
       ]
      },
      "payment": {
       "type": "string"
      },
      "volume24h": {
       "type": [
        "string",
        "null"
       ]
      },
      "volume30d": {
       "type": [
        "string",
        "null"
       ]
      },
      "tickerTime": {
       "type": [
        "string",
        "null"
       ]
      },
      "retrievedAt": {
       "type": "string"
      },
      "lastTradeSize": {
       "type": [
        "string",
        "null"
       ]
      }
     },
     "additionalProperties": false
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/coinbase-exchange-crypto-market-data-api-c4a01424/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-trends-server.onrender.com](https://www.zero.xyz/host/x402-trends-server.onrender.com/llms.txt)
