Navigation

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

    Python function for Option Greeks

    Python SDK
    0
    5
    91
    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.
    • G
      godboleamit last edited by

      Hi,

      Thanks for providing the feature of option greeks!

      But do you have any dedicated function in python to retrieve these option greeks values?

      E.g. any dedicated function like - individual_order_details(self, qParam) will be helpful.

      If you already dedicated python function, please let us know.

      Thanks!

      G 1 Reply Last reply Reply Quote 0
      • G
        godboleamit @godboleamit last edited by godboleamit

        @godboleamit

        For those who need this function to get Option Greeks.

        1. Please go to the file - smartConnect.py.
        2. Add the following function to the file -
             def getOptionGreeks(self, name, expirydate):
                optiongreeks = self._postRequest("api.market.optiongreeks", {"name": name,"expirydate": expirydate})
                return optiongreeks
        
        1. Add one more line to the routes variable - (Look at the second line)
        "api.allholding": "/rest/secure/angelbroking/portfolio/v1/getAllHolding",
        "api.market.optiongreeks": "/rest/secure/angelbroking/marketData/v1/optionGreek",
        
        "api.individual.order.details": "/rest/secure/angelbroking/order/v1/details/",
        
        1. Call a function as follows -
        optionGreeks = smartApi.getOptionGreeks('TCS', '29FEB2024')
        print(optionGreeks)
        

        You will get the required response.

        charlotteemma4 1 Reply Last reply Reply Quote 0
        • charlotteemma4
          charlotteemma4 @godboleamit last edited by

          @godboleamit .Not works. getOptionGreeks not define

          G 1 Reply Last reply Reply Quote 0
          • G
            godboleamit @charlotteemma4 last edited by

            Hey @hardip, getOptionGreeks() function is not defined. You will need to add this function yourself.

            1 Reply Last reply Reply Quote 0
            • M
              Moderator_1 last edited by

              Hi @godboleamit,

              We are currently working on providing this functionality in Python SDK. It will be released soon.

              Thank you.

              Regards
              SmartAPI Team

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