Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs

    smartAPI.optionGreek not able to fetch data

    Python SDK
    0
    4
    39
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      abhijitpa1992 last edited by

      Hello Team,

      I am trying to fetch the option greek data

      orderparams = {
      "name": "TCS",
      "expiry": "30MAY2024"
      }

      I am getting a response
      response {'message': 'Invalid expiry date', 'errorcode': 'AB9022', 'status': False, 'data': None}

      I am running this on sunday. Is it the reason I am not getting any data...?

      M S 2 Replies Last reply Reply Quote 0
      • V
        vivekkr1010101 last edited by

        I am also facing same issue optionGreek always gives wrong invalid date error

        optionGreek({"name":TCS","expirydate":"29AUG2024"})

        Request: {'name': '{name}', 'expirydate': '{expiry}'}, Response: {'message': 'Invalid expiry date', 'errorcode': 'AB9022', 'status': False, 'data': None}

        1 Reply Last reply Reply Quote 0
        • M
          Moderator_3 @abhijitpa1992 last edited by

          @abhijitpa1992 If you run it on Sunday, you'll still get the data if data available because we passed May 30th in the request, so you will receive the data for May 30th if avail else no data avail you can receive on response.

          Regards,
          SmartAPI Team

          1 Reply Last reply Reply Quote 0
          • S
            Sanadiip @abhijitpa1992 last edited by

            I am also facing the same issue..not fetching option greek data... Pls check if the syntax is correct.

            orderparams = {
            "name": "BANKNIFTY18SEP2451800CE",
            "expiry": "18SEP2024"
            }
            optionGreek=smartApi.optionGreek(orderparams)
            logger.info(f"OptionGreek : {optionGreek}")

            [E 240913 15:55:53 smartConnect:243] Error occurred while making a POST request to https://apiconnect.angelone.in/rest/secure/angelbroking/marketData/v1/optionGreek. Error: Invalid expiry date. URL: https://apiconnect.angelone.in/rest/secure/angelbroking/marketData/v1/optionGreek, Headers: {'Content-type': 'application/json', 'X-ClientLocalIP': '127.0.0.1', 'X-ClientPublicIP': '106.193.147.98', 'X-MACAddress': '80:81:1f:ea:10:7c', 'Accept': 'application/json', 'X-PrivateKey': 'A6m1pZof', 'X-UserType': 'USER', 'X-SourceID': 'WEB'}, Request: {'name': 'BANKNIFTY18SEP2451800CE', 'expiry': '18SEP2024'}, Response: {'message': 'Invalid expiry date', 'errorcode': 'AB9022', 'status': False, 'data': None}

            1 Reply Last reply Reply Quote 0
            • First post
              Last post