K-line Data
Subscribe to K-line data updates for a specific instrument and interval.
Subscribe Request
{
"id": 1,
"method": "SUBSCRIBE",
"params": {
"chainId": 143,
"instrument": "0x73ada1ea346cc3908f41cf67a040f0acd7808be0",
"expiry": 4294967295,
"interval": "1m",
"type": "kline"
}
}Unsubscribe Request
{
"id": 1,
"method": "UNSUBSCRIBE",
"params": {
"chainId": 143,
"instrument": "0x73ada1ea346cc3908f41cf67a040f0acd7808be0",
"expiry": 4294967295,
"interval": "1m",
"type": "kline"
}
}Parameter Description
chainId(required): Chain IDinstrument(required): Instrument address (lowercase)expiry(required): Expiry timestampinterval(required): K-line interval. Supported values:1m- 1 minute5m- 5 minutes15m- 15 minutes30m- 30 minutes1h- 1 hour4h- 4 hours8h- 8 hours12h- 12 hours1d- 1 day1w- 1 week1M- 1 month
type(required): Must be"kline"
Data Stream Message
Data Fields
interval: K-line intervalopen: Opening pricehigh: Highest pricelow: Lowest priceclose: Closing pricebaseVolume: Base asset volumequoteVolume: Quote asset volumevolumeUSD: Volume in USDtimestamp: Timestamp of the K-linestartTime: Start time of the K-line periodendTime: End time of the K-line period
Last updated