Calculate total value of account?

healthsecure15
I am trying to calculate the total value of account at the start of the trading day.

1- I get the value of console portfolio - Matches completely.
2- Run kite.margins()

{'enabled': True, 'net': 300000, 'available': {'adhoc_margin': 0, 'cash': 1126089.1, 'opening_balance': 1126089.1, 'live_balance': -104955.50928200013, 'collateral': 5070134.5, 'intraday_payin': 0}, 'utilised': {'debits': 2416935.468563, 'exposure': 383813.616062, 'm2m_realised': 37755, 'm2m_unrealised': 0, 'option_premium': 0, 'payout': 0, 'span': 1987968.1025, 'holding_sales': 0, 'turnover': 0, 'liquid_collateral': 0, 'stock_collateral': 5070134.5, 'delivery': 0}}

When I add console portfolio value to

kite.margins()['equity']['available']['cash']

The value is higher than value shown on console main landing page.

Any ideas on what is to be added subtracted to the portfolio downloaded from console and margins from kite.margins() to get the exact value of the account?

TIA
  • rakeshr
    1- I get the value of console portfolio - Matches completely.
    Didn't get? We don't have console API for this data. Can you explain the source of this data in more detail with fields?
Sign In or Register to comment.