Historic OHLC

Retrieve Open, High, Low, Close (OHLC) candlestick data for a token.

Endpoint

GET https://enterprise.guardis.io/v1/market/ohlc

Authentication

Include your API key in the X-API-Key header.

X-API-Key: your_api_key_here

Query Parameters

Parameter
Type
Required
Description

token_address

string

Yes

The mint address of the token

start

string

No

Start time in ISO 8601 format (e.g., "2024-01-01T00:00:00Z")

end

string

No

End time in ISO 8601 format (e.g., "2024-01-02T00:00:00Z")

interval

string

No

Candle interval: "30s", "1m", "5m", "15m", "30m", "1h", "4h", "1d" (defaults to "5m")

metric

string

No

Whether you need price or market cap


Example Request

curl -X GET "https://enterprise.guardis.io/v1/market/ohlc?token_address=DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263" \
  -H "X-API-Key: your_api_key_here"

With custom time range:


Response Format


Field Reference

Response Structure

Field
Type
Description

timeframes

object

Map of interval names to arrays of OHLC data points

OHLC Data Point

Field
Type
Description

timestamp

string

ISO 8601 timestamp for the start of the candle period

open

string

Opening price at the start of the period

high

string

Highest price during the period

low

string

Lowest price during the period

close

string

Closing price at the end of the period

volume

string

Total trading volume during the period in USD

vwap

string

Volume-weighted average price during the period

Note: Decimal values are returned as strings to preserve precision.


Supported Metrics

Interval
Description

price_usd

Pulls the price in candlesticks

marketcap_usd

Pulls the marketcap in candlestics


Supported Intervals

Interval
Description

30s

30 seconds

1m

1 minute

5m

5 minutes

15m

15 minutes

30m

30 minutes

1h

1 hour

4h

4 hours

1d

1 day


Example Usage

JavaScript:

Python:


Error Responses

Status Code
Description

400

Missing or invalid token_address parameter

401

Missing or invalid API key

404

OHLC data not found for the provided token

500

Internal server error

Last updated