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)

    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.


  • Hi @chinmaya2495

    Please let us know what actual error your facing also share with error screenshot


  • @admin hello,
    i am getting this Screenshot 2025-11-17 102155.jpg


  • @chinmaya2495 its taking trades, but whenever its scanning, this 'something went wrong' message gets displayed


  • Hi @chinmaya2495

    Please let us know with the request json you are hitting.