> ## Documentation Index
> Fetch the complete documentation index at: https://docs.graylayer.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Coinbase

> Spot exchange market data via Coinbase Exchange

<Card title="Join the Graylayer Discord" icon="discord" href="https://discord.gg/UxGa5C4C2A" horizontal>
  Request an API key in **#api-key-request** under the Community tab.
</Card>

**Platform key:** `coinbase` · **Upstream:** `https://api.exchange.coinbase.com`

All listed endpoints are public—no platform credentials needed. US-friendly.

```bash theme={null}
curl -H "X-API-Key: your_key" \
  http://gateway.graylayer.tech/api/v1/coinbase/products
```

## Products

| Method | Path                     | Description         |
| ------ | ------------------------ | ------------------- |
| GET    | `/products`              | List all products   |
| GET    | `/products/{id}`         | Get product details |
| GET    | `/products/{id}/ticker`  | Current ticker      |
| GET    | `/products/{id}/book`    | Order book          |
| GET    | `/products/{id}/trades`  | Recent trades       |
| GET    | `/products/{id}/candles` | OHLCV candlesticks  |

### Candle parameters

| Parameter     | Type    | Description                                          |
| ------------- | ------- | ---------------------------------------------------- |
| `start`       | string  | ISO 8601 start time                                  |
| `end`         | string  | ISO 8601 end time                                    |
| `granularity` | integer | Seconds per candle: 60, 300, 900, 3600, 21600, 86400 |

<CodeGroup>
  ```bash List products theme={null}
  curl -H "X-API-Key: your_key" \
    http://gateway.graylayer.tech/api/v1/coinbase/products
  ```

  ```bash BTC-USD ticker theme={null}
  curl -H "X-API-Key: your_key" \
    http://gateway.graylayer.tech/api/v1/coinbase/products/BTC-USD/ticker
  ```

  ```bash Order book theme={null}
  curl -H "X-API-Key: your_key" \
    "http://gateway.graylayer.tech/api/v1/coinbase/products/BTC-USD/book?level=2"
  ```

  ```bash Candles (hourly) theme={null}
  curl -H "X-API-Key: your_key" \
    "http://gateway.graylayer.tech/api/v1/coinbase/products/BTC-USD/candles?granularity=3600"
  ```
</CodeGroup>

## Reference data

| Method | Path          | Description                   |
| ------ | ------------- | ----------------------------- |
| GET    | `/currencies` | List all supported currencies |
| GET    | `/time`       | Server time                   |

```bash theme={null}
curl -H "X-API-Key: your_key" \
  http://gateway.graylayer.tech/api/v1/coinbase/currencies
```

## WebSocket

Real-time Coinbase market data via WebSocket proxy. See [Coinbase WebSockets](/websockets/coinbase).
