How to organize OHLC

I am looking for “tick” data out of the WebSocket’s data (Python based). The documentation says it provides data every 1 or 30 minutes. Is there a better way to get the data I need?
I tried using ltp, but it’s not very accurate.

You can refer to the market data WebSocket example, which also supplies real-time Last Traded Price (LTP) via the WebSocket. In addition to 1-minute and 30-minute intervals, it provides you with real-time LTP under the “ltpc” key.

Here’s the provided example JSON structure for better clarity:

{
  "ltpc": {
    "ltp": 41282.2,
    "ltt": "1676284200000",
    "cp": 41559.4
  }
}

We will update the documentation to ensure easier understanding.

Hope this helps. Thanks

Dear @Pradeep_Jaiswar,
Thanks for your response.

I am looking for real-time tick data for “OHLC” that is not confined to 1-minute or 30-minute intervals. Your assistance in finding this specific data would be valuable. Thank you.

Best Regards

At least help me to understand the intervals here…

Why 1-min & 30-m is showing twice, which one should be considered in calculation for 1-min OHLC ?

Mode: full -->The full option offers comprehensive information, including the latest trade prices, D5 depth, 1-minute, 30-minute, and daily candlestick data, along with some additional details.

{
  "type": "live_feed",
  "feeds": {
    "NSE_FO|56685": {
      "ff": {
        "marketFF": {
          "ltpc": {
            "ltp": 391.7,
            "ltt": "1696312537931",
            "ltq": "15",
            "cp": 231.75
          },
          "marketLevel": {
            "bidAskQuote": [
              {
                "bq": 105,
                "bp": 392,
                "bno": 1,
                "aq": 390,
                "ap": 392.35,
                "ano": 5
              },
              {
                "bq": 90,
                "bp": 391.65,
                "bno": 1,
                "aq": 570,
                "ap": 392.4,
                "ano": 5
              },
              {
                "bq": 240,
                "bp": 391.6,
                "bno": 1,
                "aq": 150,
                "ap": 392.45,
                "ano": 2
              },
              {
                "bq": 135,
                "bp": 391.55,
                "bno": 3,
                "aq": 105,
                "ap": 392.5,
                "ano": 2
              },
              {
                "bq": 180,
                "bp": 391.5,
                "bno": 3,
                "aq": 270,
                "ap": 392.55,
                "ano": 2
              }
            ]
          },
          "optionGreeks": {
            "iv": 0.13329173624515533,
            "delta": -0.8087616562843323,
            "theta": -32.79747772216797,
            "gamma": 0.0006851385696791112,
            "vega": 8.128129005432129
          },
          "marketOHLC": {
            "ohlc": [
              {
                "interval": "1d",
                "open": 247.95,
                "high": 451.55,
                "low": 247.95,
                "close": 391.5,
                "volume": 8962920,
                "ts": "1696271400000"
              },
              {
                "interval": "I1",
                "open": 379.95,
                "high": 391.5,
                "low": 340.05,
                "close": 391.5,
                "volume": 179355,
                "ts": "1696312440000"
              },
              {
                "interval": "I1",
                "open": 391.5,
                "high": 396.2,
                "low": 387.6,
                "close": 391.7,
                "volume": 39570,
                "ts": "1696312500000"
              },
              {
                "interval": "I30",
                "open": 402.65,
                "high": 420.35,
                "low": 365,
                "close": 403.55,
                "volume": 886335,
                "ts": "1696310100000"
              },
              {
                "interval": "I30",
                "open": 403.45,
                "high": 416,
                "low": 340.05,
                "close": 391.7,
                "volume": 429270,
                "ts": "1696311900000"
              }
            ]
          },
          "eFeedDetails": {
            "atp": 399.04,
            "cp": 231.75,
            "vtt": "8963835",
            "oi": 859755,
            "tbq": 88755,
            "tsq": 115635,
            "lc": 0.05,
            "uc": 1676.25,
            "fp": 391.7,
            "fv": 15,
            "dhoi": 1074120,
            "dloi": 854265,
            "poi": 882450
          }
        }
      }
    }
  }
}

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

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

{
    "interval": "I1",
    "open": 379.95,
    "high": 391.5,
    "low": 340.05,
    "close": 391.5,
    "volume": 179355,
    "ts": "1696312440000" (corresponding to 11:24:00)
}

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

{
    "interval": "I1",
    "open": 391.5,
    "high": 396.2,
    "low": 387.6,
    "close": 391.7,
    "volume": 39570,
    "ts": "1696312500000" (corresponding to 11:25:00)
}

The same concept applies to the 30-minute candle, and we will incorporate this information into the forthcoming documentation update.