Coinbase APIcoinbase.com ↗
Access Coinbase cryptocurrency market data via API. Get top gainers, top losers, and ranked coin listings with price changes across hour, day, week, month, and year.
What is the Coinbase API?
This API exposes cryptocurrency market data from Coinbase across 3 endpoints, returning price, market cap, 24-hour volume, and percent changes over five time periods for each coin. The get_top_gainers endpoint surfaces coins sorted by largest positive price movement, while get_top_losers returns the worst performers, and list_coins provides a fully sortable paginated catalog of the broader market.
curl -X GET 'https://api.parse.bot/scraper/48ffd0a1-24c2-4fc7-ac88-1b9966606c10/get_top_gainers?page=1&limit=5&filter=all¤cy=USD&resolution=hour' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace coinbase-com-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: Coinbase cryptocurrency market data — bounded, re-runnable."""
from parse_apis.coinbase_cryptocurrency_market_data_api import (
Coinbase, Sort, Order, Resolution, Filter, InvalidInput
)
client = Coinbase()
# List top coins by market rank
for coin in client.coins.list(sort=Sort.RANK, order=Order.ASC, limit=5):
print(coin.name, coin.symbol, coin.rank, coin.price)
# Fetch today's top gainers filtered to listed coins only
gainer = client.coins.top_gainers(filter=Filter.LISTED, resolution=Resolution.DAY, limit=1).first()
if gainer:
print(f"Top gainer: {gainer.name} ({gainer.symbol}) +{gainer.percent_change_day}")
# Fetch top losers for the past week
for loser in client.coins.top_losers(resolution=Resolution.WEEK, limit=3):
print(f"Loser: {loser.name} ({loser.symbol}) change={loser.percent_change_week}")
# Use volume sort to find high-activity coins
for coin in client.coins.list(sort=Sort.VOLUME, order=Order.DESC, filter=Filter.LISTED, limit=3):
print(f"High volume: {coin.name} vol={coin.volume_24h} cap={coin.market_cap}")
# Handle errors gracefully
try:
for coin in client.coins.list(sort=Sort.MARKET_CAP, order=Order.DESC, limit=2):
print(coin.name, coin.market_cap)
except InvalidInput as exc:
print(f"Invalid input: {exc}")
print("exercised: coins.list / coins.top_gainers / coins.top_losers + Sort/Order/Resolution/Filter enums")
Get coins with the highest percent change, sorted by biggest gainers first. Returns price, percent changes across multiple time periods, market cap, and volume for each coin. Paginates by page number.
| Param | Type | Description |
|---|---|---|
| page | integer | Page number for pagination. |
| limit | integer | Number of coins per page. |
| filter | string | Filter type for coin listing. |
| currency | string | Quote currency for prices (e.g. USD, EUR). |
| resolution | string | Time period for sorting by percent change. |
{
"type": "object",
"fields": {
"page": "integer, current page number",
"sort": "string, sort field used",
"coins": "array of coin objects with name, symbol, slug, id, price, percent changes, market_cap, volume_24h, image_url, rank",
"limit": "integer, requested page size",
"order": "string, sort order used",
"resolution": "string, time resolution used",
"total_returned": "integer, number of coins returned in this page"
}
}About the Coinbase API
What the API Returns
All three endpoints return the same core coin object structure: name, symbol, slug, id, price, market_cap, volume_24h, image_url, rank, and percent change fields spanning hour, day, week, month, and year intervals. The currency parameter lets you denominate prices in USD, EUR, or other quote currencies. Each response includes pagination metadata — page, limit, total_returned, sort, order, and resolution — so you can reliably walk through large result sets.
Endpoint Breakdown
get_top_gainers and get_top_losers are pre-sorted views focused on directional price movement. Both accept a resolution parameter (hour, day, week, month, year) to control which time window determines the ranking, and a filter parameter (all or listed) to narrow scope. list_coins is the general-purpose endpoint: it accepts an explicit sort field (rank, percent_change, market_cap, or volume) and an order field (asc or desc), making it suitable for building ranked tables or screeners sorted by any combination.
Pagination and Filtering
All three endpoints support page and limit parameters. Iterating pages with a consistent limit value and checking total_returned against limit is a straightforward way to determine when you have reached the last page. The filter parameter distinguishes between all tracked coins and only those actively listed on Coinbase, which matters when you want exchange-tradeable assets specifically versus broader market coverage.
The Coinbase API is a managed, monitored endpoint for coinbase.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when coinbase.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official coinbase.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Build a real-time crypto dashboard showing the top 10 daily gainers and losers by percent change
- Screen for coins with the highest weekly volume to identify trending assets
- Construct a market cap-ranked leaderboard using
list_coinssorted bymarket_capdescending - Alert system that monitors
get_top_losersover thehourresolution to flag sudden price drops - Filter Coinbase-listed coins only to display a tradeable watchlist with current prices in EUR
- Track rank changes over time by periodically calling
list_coinssorted byrankand storing snapshots - Compare monthly versus yearly percent change fields to identify coins recovering from longer-term downtrends
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does Coinbase have an official developer API?+
What does the `resolution` parameter control, and how does it affect `get_top_gainers`?+
resolution parameter selects which time window's percent change is used for sorting. Passing resolution=hour ranks coins by their price movement in the last hour, while week ranks by seven-day performance. The response still includes percent change values for all five periods (hour, day, week, month, year) regardless of which resolution drives the sort order.What is the difference between `filter=all` and `filter=listed`?+
filter=listed restricts results to coins actively listed for trading on Coinbase. filter=all includes a broader set of tracked coins that may not be directly tradeable on the exchange. If you are building a tool for Coinbase users who need to act on the data, listed is the more relevant filter.Does the API return historical OHLCV candlestick data or order book depth?+
Are individual coin detail pages — like description, circulating supply, or all-time high — included?+
name, symbol, slug, id, price, market_cap, volume_24h, image_url, rank, and percent change fields. Fields like circulating supply, total supply, all-time high price, or project descriptions are not in the current response shape. You can fork this API on Parse and revise it to pull those fields from a coin detail endpoint.