How can we get option greeks (gamma) data for past 1 week in zerodha/dhan?
Hi @rahulcse56 ,
You can refer the below library to get option greeks data :
c = mibian.BS([1.4565, 1.45, 1, 30], volatility=20)
# ([underlyingPrice, strikePrice, interestRate, daysToExpiration], volatility=x, callPrice=y, putPrice=z)
c.gamma # Returns the option gamma
- underlyingPrice → Current market price of the asset (e.g., stock, currency).
- strikePrice → Option’s strike price.
- interestRate → Risk-free interest rate.
- daysToExpiration → Number of calendar days until the option expires.
volatility=20→ The implied volatility (20% here).
sorry did not understand what are you suggesting…
There is no direct api call to get option greeks, we will need to use mibian to get historical greeks.