Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs
    1. Home
    2. gulshan
    G
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    gulshan

    @gulshan

    0
    Reputation
    1
    Posts
    1
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    gulshan Follow

    Best posts made by gulshan

    This user hasn't posted anything yet.

    Latest posts made by gulshan

    • Unable to Fetch LTP & Historical Data for NIFTY 50 & Other Indices via Angel One API

      I am facing an issue where I am unable to fetch live market data (LTP) or historical candle data for NIFTY 50 and other indices using the SmartAPI.

      Issue Summary:

      • I used the correct token for NIFTY 50 (99926000) from your Scrip Master file (https://margincalculator.angelbroking.com/OpenAPI_File/files/OpenAPIScripMaster.json).
        {"token":"99926000","symbol":"Nifty 50","name":"NIFTY","expiry":"","strike":"0.000000","lotsize":"1","instrumenttype":"AMXIDX","exch_seg":"NSE","tick_size":"0.000000"},
      • I tried fetching both LTP and historical data but did not receive any response.
      • I also tried changing the exchange from NSE to NFO, but it did not resolve the issue.

      Steps I Tried & Results:

      1️⃣ Fetching LTP for NIFTY 50

      ltp_data = smartApi.ltpData("NSE", "99926000")
      print("LTP Response:", ltp_data)
      
      • Expected Outcome: It should return the last traded price (LTP) for NIFTY 50.
      • Actual Outcome: No data received / Empty response.

      2️⃣ Fetching Historical Data for NIFTY 50 Spot (NSE)

      historicParam = {
          "exchange": "NSE",
          "symboltoken": "99926000",
          "interval": "ONE_HOUR",
          "fromdate": "2025-03-01 09:15",
          "todate": "2025-03-03 15:30"
      }
      
      data = smartApi.getCandleData(historicParam)
      print("Historical Data Response:", data)
      
      • Expected Outcome: It should return historical OHLC candle data for NIFTY 50.
      • Actual Outcome: No data received / Empty response.

      3️⃣ Fetching Historical Data for NIFTY Futures (NFO)

      historicParam = {
          "exchange": "NFO",
          "symboltoken": "99926000",
          "interval": "ONE_HOUR",
          "fromdate": "2025-03-01 09:15",
          "todate": "2025-03-03 15:30"
      }
      
      data = smartApi.getCandleData(historicParam)
      print("Historical Data Response:", data)
      
      • Expected Outcome: It should return historical OHLC candle data for NIFTY Futures.
      • Actual Outcome: No data received / Empty response.
      posted in Python SDK
      G
      gulshan