Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs
    1. Home
    2. chinmaya2495
    3. Posts
    C
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 3
    • Best 0
    • Groups 0

    Posts made by chinmaya2495

    • Persistent JSON Decode/No Data Error on GetOptionChain & GetExpiryDate

      Dear SmartAPI Team,

      I am experiencing severe and persistent API instability when attempting to fetch options data, particularly during live market hours (9:30 AM - 11:00 AM IST). The issue prevents my automated strategy from running.

      Client Code: C86719

      The core problem occurs with two key API calls:

      1. GET EXPIRY DATE (getOptionExpiryDate)

        • Endpoint: https://apiconnect.angelone.in/rest/secure/angelbroking/marketData/v1/getOptionExpiryDate
        • Failure Mode: This call frequently fails after market open. It returns a Status: 200 (Success), but the response body is empty or corrupted (non-JSON). This causes my Python script to fail with a json.JSONDecodeError (Expecting value: line 1 column 1).
      2. GET OPTION CHAIN (getOptionChain)

        • Failure Mode: If I bypass the expiry lookup by hardcoding the date, the getOptionChain call fails next.
        • Log: My bot logs "API unstable/Contracts not available for ATM [Strike]. Retrying..." This happens even for valid, liquid ATM strikes.

      My Application Logic (To Help You Replicate)

      My bot is a high-frequency intraday strategy that must run on the 5-MINUTE timeframe for options.

      1. On Start (9:30 AM): The bot's first task is to find the ATM Nifty strike and the nearest weekly expiry. To do this, it calls getOptionExpiryDate and getOptionChain. (This is where it fails with the errors above.)

      2. Main Loop (Every 30 seconds):

        • Once it has the CE and PE tokens, the bot enters a fast loop.
        • In this loop, it calls getCandleData for the 5-MINUTE interval on the specific option tokens (e.g., Token 51105) to check for an EMA crossover.
        • This secondary call to getCandleData (for NFO tokens) also frequently fails during the day, returning AB1004: Something Went Wrong.

      Impact: The instability of getOptionExpiryDate and getOptionChain during market open makes it impossible to automate the selection of option contracts. The subsequent instability of getCandleData for NFO tokens makes the strategy unreliable.

      Please investigate the server-side instability for these critical NFO data endpoints during active trading hours.

      Thank you.

      posted in Python SDK
      C
      chinmaya2495
    • [{"ak":"nk","task":"hb","msg":"hb"}] Message show in websocket api

      websocket data not getting..

      posted in General Discussion
      C
      chinmaya2495
    • RE: Not Getting Data from websocket

      Same issue i am also not getting data it shows exact same thing

      posted in Bugs
      C
      chinmaya2495