jugaad-py / jugaad-trader

Unofficial python client for Zerodha

Home Page:https://marketsetup.in/documentation/jugaad-trader/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

session is expiring before logging in

Anirudh-1213 opened this issue · 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 i think Zerodha is forcing to use TOTP from Sep 23rd so you need to use TOTP code as mentioned in defect 45. (#45)

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