Need sample code for calling - login with TOTP Secret key and option chain method in python package
from firstock import firstock
import pyotp
userId = “”
password = “”
totpsecret = “”
apikey = “”
vendorCode = “”
totp = pyotp.TOTP(totpsecret)
login = firstock.login(
userId=userId,
password=password,
TOTP=totp.now(),
vendorCode=vendorCode,
apiKey=apikey,
)
print(login)
optionChain = firstock.optionChain(
userId= userId,
exchange=“NFO”,
symbol=“NIFTY”,
strikePrice=“25000”,
expiry= “14OCT25”,
count=“5”
)
print(optionChain)
Please find the attached code
@Rohit_S Thanks for the quick reply


