OHLCV for a Pair of Coin Addresses

Overview

The OHLC-Pair API provides OHLCV (Open, High, Low, Close, Volume) data for a given pair of coins over a specified time range and bucket size.

Endpoint

GET /api/v1/partner/ohlcv-pair

Request Parameters

Parameter
Type
Required
Description

coin_a

string

Yes

The first coin in the pair, represented in a specific format. Example: 0x06864a6f921804860930db6ddbe2e16acdf8504495ea7481637a1c8b9a8fe54b::cetus::CETUS

coin_b

string

Yes

The second coin in the pair, represented in a specific format. Example: 0x2::sui::SUI

bucket

int

Yes

Time bucket size in minutes (e.g., 60 for 1-hour intervals). Choices are: 1, 5, 15, 60(1 hour), 240(4 hours) , 1440(1 day), 10080(1 week), 43200(1 month).

from

int

No

Start timestamp (Unix epoch time in seconds).

to

int

No

End timestamp (Unix epoch time in seconds). Default value: Now()

limit

int

No

Maximum number of data points to return. Max value: 500, Default value: 500

Headers

Header
Required
Description

x-api-key

No

API key for authentication.

Example Request

Response

Success Response

Response Data Format

Each data entry is an array with the following structure:

Index
Field
Description

0

timestamp

Unix timestamp for the bucket period.

1

open

Open price of coin_a in terms of coin_b.

2

high

Highest price during the period.

3

low

Lowest price during the period.

4

close

Closing price of the period.

5

volume_a

Trading volume of coin_a in the period.

6

volume_b

Trading volume of coin_b in the period.

Notes

  • The from and to timestamps should be within a reasonable range to avoid performance issues. If the from and to range is too large, the data will automatically be truncated to a maximum of 500 buckets.

  • The API response is optimized for speed and may include only the most relevant data points based on the limit parameter.


See also: Environment Setup

Last updated