+Coinbase API
Coinbase Exchange prices, candles, order books, trades and movers as clean JSON, read-only.
The API.SH Coinbase API returns public Coinbase Exchange market data as JSON. List every trading pair with its status and trading rules, get a pair's ticker with last price, best bid and ask and 24-hour stats, OHLCV candles, the order book with spread, and recent trades. A movers route ranks every pair in a quote currency by 24-hour change or volume.
- 6 endpoints
- from $1 / 1,000 calls
- 1,000 free credits / month
- failed calls free
GET https://api.api.sh/coinbase/v1/ candles
{ "success": true } What you can build with the Coinbase API
Price charts and backtests
Pull OHLCV candles at your chosen granularity and page back through history for charts and strategy backtests.
Market dashboards
Show top gainers, losers and volume leaders, with each pair's last price and 24-hour range.
Liquidity and spread monitoring
Read the order book's bids, asks and spread, and recent trades with taker side, to watch depth and activity.
Listing and network checks
Track which pairs are online or delisted and look up an asset's supported networks and withdrawal limits.
Coinbase data you get
Field names from real responses. Numbers come parsed, URLs absolute, dates in ISO 8601.
Coinbase API endpoints and prices
Every Coinbase endpoint costs 1 credit per call: credits are $1 per 1,000 on a monthly plan, $2 pay-as-you-go. Pricing
| Coinbase order book /coinbase/ | $1 · $2 PAYG 1 credit |
| Coinbase trading pairs /coinbase/ | $1 · $2 PAYG 1 credit |
| Coinbase candles /coinbase/ | $1 · $2 PAYG 1 credit |
| Coinbase movers /coinbase/ | $1 · $2 PAYG 1 credit |
| Coinbase pair ticker /coinbase/ | $1 · $2 PAYG 1 credit |
| Coinbase recent trades /coinbase/ | $1 · $2 PAYG 1 credit |
Call the Coinbase API
Coinbase candles: GET https://api.api.sh/coinbase/
curl "https://api.api.sh/coinbase/v1/candles?pair=BTC-USD" \
-H "x-api-key: $APISH_KEY" import os, requests
res = requests.get(
"https://api.api.sh/coinbase/v1/candles",
params={"pair": "BTC-USD"},
headers={"x-api-key": os.environ["APISH_KEY"]},
timeout=120,
)
res.raise_for_status()
data = res.json() const url = new URL("https://api.api.sh/coinbase/v1/candles");
url.searchParams.set("pair", "BTC-USD");
const res = await fetch(url, { headers: { "x-api-key": process.env.APISH_KEY } });
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const data = await res.json(); # Google Sheets (API.SH add-on)
=APISH("/coinbase/v1/candles", "pair", "BTC-USD")
# Zapier, Make, n8n (verified node): pick the API.SH app,
# choose "Coinbase" and "Coinbase candles".
# AI agents (Claude, ChatGPT, Cursor): add the
# API.SH MCP server https://api.sh/mcp - Create a free accountConfirm your email and get 1,000 free credits every month. No card needed.
- Create an API keyOne key works for all 482 platforms.
- Send the requestJSON back in one call. Add
output=csvoroutput=ndjsonfor files.
Why API.SH for Coinbase data
- Public data only: no Coinbase login, cookies or account needed
- One key and one response shape for Coinbase and 481 other platforms
- Built and maintained by API.SH, not third-party publishers
- Pay per call; errors on our side cost nothing
- Live status for every endpoint
API.SH vs the official Coinbase API
Coinbase has official APIs through its Developer Platform, including the Exchange API and the Advanced Trade API for trading and market data, with SDKs and API keys. API.SH does not trade; it is a read-only way to get public Coinbase Exchange market data in the same JSON format and with the same key as other exchanges and sites, with no key and secret to manage.
If you only need market data, API.SH saves you managing Coinbase API keys and secrets or running your own data collector: one key, one JSON shape, a fixed price per call.
Coinbase API questions
What Coinbase data can I get?+
Trading pairs with status and trading rules (/coinbase/v1/products), a pair's ticker (/coinbase/v1/ticker), OHLCV candles (/coinbase/v1/candles), the order book (/coinbase/v1/orderbook), recent trades (/coinbase/v1/trades) and 24-hour movers ranked by change or volume (/coinbase/v1/movers).
How much does the Coinbase API cost?+
Every Coinbase endpoint costs 1 credit per call. On a monthly plan 1,000 credits cost $1 (Starter is $50/month for 50,000 credits). Pay-as-you-go is $2 per 1,000 credits, with top-ups from $15 that never expire.
Is there a free trial?+
Yes. Every account gets 1,000 free credits every month. That is 1,000 calls to /coinbase/v1/candles at 1 credit each.
Does Coinbase have an official API?+
Yes. Coinbase offers the Exchange API, Advanced Trade API and other Developer Platform APIs, which you need for trading and account access. API.SH covers public market data only, in one JSON format shared with its other platforms.
Do I need a Coinbase account or API key and secret?+
No. API.SH reads public Coinbase Exchange market data only. No Coinbase account, API key, secret or login is involved, so nothing can touch your funds.
Can I place trades with it?+
No. Every route is read-only market data. To place or manage orders, use Coinbase's own Advanced Trade or Exchange API with your account keys.
Can I get historical price data?+
Yes. /coinbase/v1/candles returns open, high, low, close and volume, oldest first. Pass next_end back as end to page further back in time.
How do I get started?+
1. Sign up at api.sh. 2. Copy your API key from the dashboard. 3. Call /coinbase/v1/ticker with a pair such as BTC-USD, or /coinbase/v1/candles for price history. Request examples and every parameter are in the docs at https://api.sh/docs. You can also use the JS or Python SDK, Google Sheets, Zapier, Make, n8n or the MCP server at https://api.sh/mcp.