# Coinbase on Onekey > 12 endpoints for Coinbase (12 stable, 0 beta), 1 to 5 credits each. Category: Finance & markets. One key, one JSON shape. Base URL: https://api.onekey.dev Auth: header `x-api-key: `. Call shape: `GET /v1/{platform}/{endpoint}?{params}`. Every response is `{success, data, metadata, error}`; check `success` first. Cost is in `metadata.credits_charged`. Free when served from cache (0.2 credit for a cached response over 100 KB). Failed and not-found calls are refunded. Status: stable = verified against the live source; beta = not yet verified, fields may be missing. Page: https://onekey.dev/platforms/coinbase Reference (Markdown): https://onekey.dev/docs/api/coinbase.md All docs: https://onekey.dev/llms.txt ## Canonical fields returned Unified-schema fields (same names on every platform), with how many of the 12 mapped Coinbase endpoints return each: - `entity.category` (string): 6 - `entity.id` (string): 6 - `market.price` (number): 6 - `entity.date` (ISO 8601 date): 5 - `market.symbol` (string): 4 - `entity.name` (string): 3 - `market.ask` (number): 2 - `market.bid` (number): 2 - `market.volume24h` (number): 2 - `entity.type` (string): 1 - `market.close` (number): 1 - `market.high` (number): 1 - `market.low` (number): 1 - `market.open` (number): 1 - `market.volume` (number): 1 - plus 18 platform-specific fields under `ext.` ## Endpoints ### coinbase.book Top-of-book (level 1) for an Exchange product. - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/coinbase/book?product=btc-usd` with header `x-api-key: YOUR_API_KEY` - Parameters: - `product` (string, required): Product id, e.g. BTC-USD - Fields returned: `entity.id`, `market.bid`, `market.ask`, `entity.date`, `ext.bestBidSize`, `ext.bestAskSize` - Reference: https://onekey.dev/docs/api/coinbase/book.md ### coinbase.buy_price Coinbase buy price for a currency pair (v2 public prices). - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/coinbase/buy_price?pair=btc-usd` with header `x-api-key: YOUR_API_KEY` - Parameters: - `pair` (string, required): Currency pair, e.g. BTC-USD - Fields returned: `market.symbol`, `entity.category`, `market.price` - Reference: https://onekey.dev/docs/api/coinbase/buy_price.md ### coinbase.candles Candles for an Exchange product (granularity in seconds). - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/coinbase/candles?product=btc-usd` with header `x-api-key: YOUR_API_KEY` - Parameters: - `product` (string, required): Product id, e.g. BTC-USD - `granularity` (string, optional, default 3600): Seconds per candle - Fields returned: `entity.date`, `market.open`, `market.high`, `market.low`, `market.close`, `market.volume` - Reference: https://onekey.dev/docs/api/coinbase/candles.md ### coinbase.currencies Fiat currencies supported by Coinbase (id, name, min size). - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/coinbase/currencies` with header `x-api-key: YOUR_API_KEY` - Parameters: none - Fields returned: `entity.id`, `entity.name`, `ext.minSize` - Reference: https://onekey.dev/docs/api/coinbase/currencies.md ### coinbase.currency Currency details (precision, network confirmations) on Coinbase Exchange. - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/coinbase/currency?currency=btc` with header `x-api-key: YOUR_API_KEY` - Parameters: - `currency` (string, required): Currency code, e.g. BTC - Fields returned: `entity.id`, `entity.name`, `entity.category`, `entity.type`, `market.symbol`, `ext.minSize`, `ext.maxPrecision`, `ext.networkConfirmations` - Reference: https://onekey.dev/docs/api/coinbase/currency.md ### coinbase.product Trading pair details (increments, status) for an Exchange product. - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/coinbase/product?product=btc-usd` with header `x-api-key: YOUR_API_KEY` - Parameters: - `product` (string, required): Product id, e.g. BTC-USD - Fields returned: `entity.id`, `entity.name`, `entity.category`, `ext.baseCurrency`, `ext.quoteCurrency`, `ext.quoteIncrement`, `ext.baseIncrement`, `ext.minMarketFunds`, `ext.tradingDisabled` - Reference: https://onekey.dev/docs/api/coinbase/product.md ### coinbase.sell_price Coinbase sell price for a currency pair (v2 public prices). - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/coinbase/sell_price?pair=btc-usd` with header `x-api-key: YOUR_API_KEY` - Parameters: - `pair` (string, required): Currency pair, e.g. BTC-USD - Fields returned: `market.symbol`, `entity.category`, `market.price` - Reference: https://onekey.dev/docs/api/coinbase/sell_price.md ### coinbase.spot Coinbase spot price for a currency pair (v2 public prices). - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/coinbase/spot?pair=btc-usd` with header `x-api-key: YOUR_API_KEY` - Parameters: - `pair` (string, required): Currency pair, e.g. BTC-USD - Fields returned: `market.symbol`, `entity.category`, `market.price` - Reference: https://onekey.dev/docs/api/coinbase/spot.md ### coinbase.stats 24h stats (open/high/low/last/volume) for an Exchange product. - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/coinbase/stats?product=btc-usd` with header `x-api-key: YOUR_API_KEY` - Parameters: - `product` (string, required): Product id, e.g. BTC-USD - Fields returned: `market.price`, `market.volume24h`, `ext.open24h`, `ext.high24h`, `ext.low24h`, `ext.volume30d` - Reference: https://onekey.dev/docs/api/coinbase/stats.md ### coinbase.ticker Latest ticker for an Exchange product (e.g. BTC-USD). - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/coinbase/ticker?product=btc-usd` with header `x-api-key: YOUR_API_KEY` - Parameters: - `product` (string, required): Product id, e.g. BTC-USD - Fields returned: `entity.id`, `market.price`, `market.bid`, `market.ask`, `market.volume24h`, `entity.date`, `ext.lastSize` - Reference: https://onekey.dev/docs/api/coinbase/ticker.md ### coinbase.time Coinbase server time. - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/coinbase/time` with header `x-api-key: YOUR_API_KEY` - Parameters: none - Fields returned: `entity.date`, `ext.epoch` - Reference: https://onekey.dev/docs/api/coinbase/time.md ### coinbase.trades Latest trades for an Exchange product. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/coinbase/trades?product=btc-usd&limit=10` with header `x-api-key: YOUR_API_KEY` - Parameters: - `product` (string, required): Product id, e.g. BTC-USD - `limit` (string, optional, default 50): Rows (1-100) - Fields returned: `entity.id`, `market.price`, `entity.category`, `entity.date`, `ext.size` - Reference: https://onekey.dev/docs/api/coinbase/trades.md ## Sample request ```bash curl "https://api.onekey.dev/v1/coinbase/book?product=btc-usd" \ -H "x-api-key: YOUR_API_KEY" ```