Skip to main content
GET
/
v1
/
portfolios
/
{portfolio_id}
/
candles
Get Public Product Candles (Beta)
curl --request GET \
  --url https://api.prime.coinbase.com/v1/portfolios/{portfolio_id}/candles
{
  "candles": [
    {
      "timestamp": "2023-11-07T05:31:56Z",
      "open": "50000.00",
      "high": "51000.00",
      "low": "49500.00",
      "close": "50500.00",
      "volume": "1234.56"
    }
  ],
  "pagination": {
    "next_cursor": "<string>",
    "sort_direction": "DESC",
    "has_next": true
  }
}

Path Parameters

portfolio_id
string
required

The portfolio id requesting market data.

Query Parameters

product_id
string
required

The trading pair.

start_time
string<date-time>

Timestamp for starting range of aggregations

end_time
string<date-time>

Timestamp for ending range of aggregations

granularity
enum<string>
required

The timeframe each candle represents.

Available options:
ONE_MINUTE,
FIVE_MINUTES,
FIFTEEN_MINUTES,
ONE_HOUR,
SIX_HOURS,
ONE_DAY,
THIRTY_MINUTE,
TWO_HOUR,
FOUR_HOUR

Response

200 - application/json

A successful response.

candles
Represents a single candle data point · object[]
pagination
object
I