jugaad-py / jugaad-trader

Unofficial python client for Zerodha
https://marketsetup.in/documentation/jugaad-trader/
157 stars 112 forks source link

session is expiring before logging in #48

Open Anirudh-1213 opened 2 years ago

Anirudh-1213 commented 2 years ago

`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)`

ssheikh098 commented 2 years ago

@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