Skip to main content
GET
/
v1
/
token
/
{chain}
/
pair
/
{pair}
/
candles
Pair - Candles
curl --request GET \
  --url https://api.chainstream.io/v1/token/{chain}/pair/{pair}/candles \
  --header 'Authorization: Bearer <token>'
[
  {
    "open": "50.5",
    "close": "51.2",
    "high": "51.8",
    "low": "50.1",
    "volume": "1000000",
    "trades": 42,
    "resolution": "1h",
    "time": 1709251200000,
    "updatedAt": 1709251200000
  }
]

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

chain
enum<string>
required

A chain name listed in supported networks

Available options:
sol,
bsc,
eth
pair
string
required

Trading pair identifier (format: TOKEN_A_ADDRESS-TOKEN_B_ADDRESS). The pair will be automatically sorted

Example:

"9BB6NFEcjBCtnNLFko2FqVQBq8HHM13kCyYcdQbgpump-EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"

Query Parameters

resolution
enum<string>
required

Time resolution for candle data. Note: 1s resolution data is only kept for the last 1 hour; 15s and 30s resolution data is kept for the last 6 hours; 1m resolution data is kept for the last 12 hours; data for other resolutions is stored permanently

Available options:
1s,
15s,
30s,
1m,
3m,
5m,
15m,
30m,
1h,
2h,
4h,
6h,
8h,
12h,
1d,
3d,
1w,
1M
priceType
enum<string>

Price type: usd (default) or native token price

Available options:
usd,
native
from
integer<int64>

Start timestamp (Unix epoch in milliseconds)

Example:

1741647950000

to
integer<int64>

End timestamp (Unix epoch in milliseconds)

Example:

1741700970000

limit
integer<int64>

Number of results per page

Example:

100

Response

200 - application/json
open
string
required

Opening price

Example:

"50.5"

close
string
required

Closing price

Example:

"51.2"

high
string
required

Highest price

Example:

"51.8"

low
string
required

Lowest price

Example:

"50.1"

volume
string
required

Trading volume

Example:

"1000000"

trades
integer<int64>
required

Number of trades in this candle

Example:

42

resolution
enum<string>
required

Time resolution for candle data. Note: 1s resolution data is only kept for the last 1 hour; 15s and 30s resolution data is kept for the last 6 hours; 1m resolution data is kept for the last 12 hours; data for other resolutions is stored permanently

Available options:
1s,
15s,
30s,
1m,
3m,
5m,
15m,
30m,
1h,
2h,
4h,
6h,
8h,
12h,
1d,
3d,
1w,
1M
Example:

"1h"

time
integer<int64>
required

Candle timestamp (Unix epoch in milliseconds)

Example:

1709251200000

updatedAt
integer<int64>
required

Last update timestamp in milliseconds

Example:

1709251200000