Info needed for ohlc in websockets market-data-feed

Below is the ohlc market data feed for one of the stocks.

The 1 minute and 30 minute interval has two sets of ohlc data whereas 1 day interval has only one.

  1. Can you please explain the difference for those repeating intervals ?

  2. Also, what is the conversion format for “ts” which i suppose are ticks ?

                "ohlc": [
                            {
                                "interval": "1d",
                                "open": 221.0,
                                "high": 223.9,
                                "low": 221.0,
                                "close": 223.1,
                                "volume": 3056331,
                                "ts": "1696876200000"
                            },
                            {
                                "interval": "I1",
                                "open": 223.05,
                                "high": 223.15,
                                "low": 223.0,
                                "close": 223.1,
                                "volume": 7935,
                                "ts": "1696917060000"
                            },
                            {
                                "interval": "I1",
                                "open": 223.1,
                                "high": 223.15,
                                "low": 223.0,
                                "close": 223.0,
                                "volume": 36037,
                                "ts": "1696917120000"
                            },
                            {
                                "interval": "I30",
                                "open": 223.25,
                                "high": 223.45,
                                "low": 222.55,
                                "close": 222.9,
                                "volume": 538296,
                                "ts": "1696914900000"
                            },
                            {
                                "interval": "I30",
                                "open": 222.95,
                                "high": 223.15,
                                "low": 222.9,
                                "close": 223.0,
                                "volume": 105713,
                                "ts": "1696916700000"
                            }
                        ]

Two candles represent the current and previous periods, distinguished by their respective timestamps for 1 minute and 30 minutes. In the provided example, there are two one-minute candles:

The first candle, timestamped at 1696917060000, is as follows:

{
  "interval": "I1",
  "open": 223.05,
  "high": 223.15,
  "low": 223,
  "close": 223.1,
  "volume": 7935,
  "ts": "1696917060000" //(corresponding to 11:21:00)
}

The second candle, timestamped at 1696917120000, is as follows:

{
  "interval": "I1",
  "open": 223.1,
  "high": 223.15,
  "low": 223,
  "close": 223,
  "volume": 36037,
  "ts": "1696917120000" //(corresponding to 11:22:00)
}

The same concept applies to the 30-minute candle. 1 day’s single candle represents the previous day’s candle.

We will incorporate this information into the forthcoming documentation update.

Thanks for the quick updates @Pradeep_Jaiswar .

I checked for Timestamp, it is in utc.

1 Like