Get Kline

API Description

Retrieves kline (candlestick) data for a specific trading pair. This endpoint provides historical price data including open, high, low, close prices and volume for specified time intervals.

HTTP Request

GET /v4/public/mm/kline

Request Parameters

Parameter
Type
Required
Description

chainId

uint64

Yes

Chain ID (e.g., 143 for Monad mainnet)

symbol

string

Yes

Trading pair symbol (e.g., BTCUSDC)

interval

string

Yes

Kline interval (e.g., 1m, 5m, 15m, 30m, 1h, 4h, 8h, 12h, 1d, 1w, 1M)

start

uint64

No

Start time in Unix timestamp (seconds). Default: 0

end

uint64

No

End time in Unix timestamp (seconds). Default: current time

limit

uint64

No

Number of kline data points to retrieve. Default: 1000, max: 1000

Response Parameters

Parameter
Type
Description

symbol

string

Trading pair symbol

openTime

uint64

Opening time timestamp (Unix timestamp in seconds)

open

float32

Opening price

high

float32

Highest price in the period

low

float32

Lowest price in the period

close

float32

Closing price

closeTime

uint64

Closing time timestamp (Unix timestamp in seconds)

baseVolume

float32

Base asset volume

quoteVolume

float32

Quote asset volume

Request Example

Python (requests)

Note: This endpoint requires API authentication. See Quick Start Guide for signature generation details.

Example with optional time range parameters:

Response Example

Success Response

Error Response

Notes

  • This endpoint requires API authentication (see Quick Start Guide)

  • Required parameters: chainId, symbol, interval

  • Optional parameters: start, end, limit

  • Time format: start and end are Unix timestamps in seconds (not milliseconds)

  • Default values:

    • If start is not provided, defaults to 0 (beginning of time)

    • If end is not provided, defaults to current time

    • If limit is not provided, defaults to 1000

  • Interval format: Use string format like "1m", "5m", "15m", "30m", "1h", "4h", "8h", "12h", "1d", "1w", "1M"

  • Maximum limit: 1000 data points per request

  • Response format: Array of kline objects with OHLCV data

  • Time fields: openTime and closeTime are Unix timestamps in seconds

  • Price fields: open, high, low, close are float32 values

  • Volume fields: baseVolume and quoteVolume are float32 values

  • Kline data is returned in reverse chronological order (newest first)

  • Rate limit: 120 requests per minute

  • Success response has code: 0 (not 200)

Last updated