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 ID

  • instrument (required): Instrument address (lowercase)

  • expiry (required): Expiry timestamp

  • interval (required): K-line interval. Supported values:

    • 1m - 1 minute

    • 5m - 5 minutes

    • 15m - 15 minutes

    • 30m - 30 minutes

    • 1h - 1 hour

    • 4h - 4 hours

    • 8h - 8 hours

    • 12h - 12 hours

    • 1d - 1 day

    • 1w - 1 week

    • 1M - 1 month

  • type (required): Must be "kline"

Data Stream Message

Data Fields

  • interval: K-line interval

  • open: Opening price

  • high: Highest price

  • low: Lowest price

  • close: Closing price

  • baseVolume: Base asset volume

  • quoteVolume: Quote asset volume

  • volumeUSD: Volume in USD

  • timestamp: Timestamp of the K-line

  • startTime: Start time of the K-line period

  • endTime: End time of the K-line period

Last updated