Jugaad Trader - Zerodha Console API

Introduction

jugaad-trader offers Zerodha Console API as well, you can view your entire portfolio, overall P&L, tax P&L and many other functionality.

How it works

Step 1: Ensure that you are loggen in using jtrader cli

$ jtrader zerodha startsession

Step 2: Let’s load the Zerodha loggin session in our code

from jugaad_trader import Zerodha, Console


kite = Zerodha()

kite.set_access_token()

Step 3: Create Console class object initialized by above kiteobject

cons = Console(kite)

Let’s login to Console portal, if successful it will return True else it will raise Exception

cons.login()
True

Step 4: We are now ready to interact with Console API Dashboard values

cons.dashboard()

Account values

cons.account_values()

Open positions

cons.positions()

Exposure

cons.exposure()

Holding portfolio

cons.portfolio()

Tradebook

cons.tradebook()

Overall P&L

cons.pnl()

P&L Summary

cons.pnl_summary()

Tax P&L

cons.tax_pnl()

Fund balance

cons.fund_balance()

Ledger

cons.ledger()

Interest statement

cons.interest_statement()

Mandates

cons.mandate()