formula to calculate total fund available in account

shivdas_b
shivdas_b edited October 2023 in Python client
Hii all,

I need one help.
I am not able to find total_fund in account (considering pledging margin, liquid_collateral, stock_collateral)
can someone please write a formula for me to calculate total_fund

fund = {'enabled': True, 'net': 2851.3, 'available': {'adhoc_margin': 0, 'cash': 4768.8, 'opening_balance': 4768.8, 'live_balance': 2851.3, 'collateral': 0, 'intraday_payin': 0}, 'utilised': {'debits': 1917.5, 'exposure': 0, 'm2m_realised': 0, 'm2m_unrealised': 0, 'option_premium': 0, 'payout': 0, 'span': 0, 'holding_sales': 0, 'turnover': 0, 'liquid_collateral': 0, 'stock_collateral': 0, 'delivery': 0}}

-> currently I am using following :
total_fund = data['available']['live_balance'] + data['utilised']['debits'] + fund['utilised']['liquid_collateral'] + data['utilised']['stock_collateral']

(the idea behind this is to know - how much I total fund is there in my account and how much i am utilising)
Tagged:
Sign In or Register to comment.