jugaad-trader icon indicating copy to clipboard operation
jugaad-trader copied to clipboard

session is expiring before logging in

Open Anirudh-1213 opened this issue 2 years ago • 1 comments

`from jugaad_trader import Zerodha

user_id = "USERID" password = "PASSWORD" pin = "PIN"

kite = Zerodha(user_id, password, pin)

print(kite.login())

print(kite.orders())

Set access token loads the stored session.

Name chosen to keep it compatible with kiteconnect.

Get profile

print(profile := kite.profile())

Get margin

margins = kite.margins() print(margins)

Get holdings

holdings = kite.holdings() print(holdings)

Get today's positions

positions = kite.positions() print(positions)

Get today's orders

orders = kite.orders() print(orders)`

Anirudh-1213 avatar Sep 25 '22 03:09 Anirudh-1213

@Anirudh-1213 i think Zerodha is forcing to use TOTP from Sep 23rd so you need to use TOTP code as mentioned in defect 45. (https://github.com/jugaad-py/jugaad-trader/issues/45)

https://support.zerodha.com/category/your-zerodha-account/login-credentials/login-credentials-of-trading-platforms/articles/enable-device-lock

ssheikh098 avatar Sep 25 '22 03:09 ssheikh098