Hello, My code to calculate available cash is : Float.parseFloat(kc.getMargins("equity").available.cash)
My aim is capture the “Margin available” value i.e net CASH available (in other words the hard cash in my hand to do CNC buy orders) in my account for CNC trading (after certain point of time during day) ..In the screenshot the value is 3840.90. This value I want to capture while placing intraday or CNC buy orders.
I started with intraday with value in “Margin available” field as around 5000. When I used above code, I got available cash value as 9546.25015258789 at some point of time .
I would like to know why. I need to calculate FINAL CASH amount using which I could do CNC trading in between Intraday trading. Help in this regard would be appreciated.
The "Margin available" is the amount left available for CNC or any other use. The "Margin used" is the amount used for your current interday positions. Regardless of the outcomes of your trades, your account value number only gets changed overnight.
Also, note that if you square off your interday positions. Your "Margin available" get's updated instantly with the square off value, so, you can use this "Margin available" to buy CNC positions in say, the end of the day after you square off your positions.
The above would be what would be close to what's returned for your account, you can see that, "Margin available" would be 'net' "account value" would be "cash" "Margin used" would be "debits"
thanks @rishiswethan and @sujith for reply. The statement "The account value or cash is the amount you can withdraw instantly to your bank account" I interpreted this as --the max amount which can be used for CNC trading. Thanks ! Pls close the ticket.
If a stock ABS has 2X margin and you buy one share of it in intraday for 100rs, only 50rs margin gets used from your account
Please understand my specific query to capture the cash I have which I can use to do CNC.
@sujith Any comments?
Also, note that if you square off your interday positions. Your "Margin available" get's updated instantly with the square off value, so, you can use this "Margin available" to buy CNC positions in say, the end of the day after you square off your positions.
{'equity': {'enabled': True, 'net':3840, 'available': {'adhoc_margin': 0, 'cash': 11704, 'collateral': 0, 'intraday_payin': 0}, 'utilised': {'debits': 7863, 'exposure': 0, 'm2m_realised': 0, 'm2m_unrealised': 0, 'option_premium': 0, 'payout': 0, 'span': 0, 'holding_sales': 0, 'turnover': 0}}, 'commodity': {'enabled': True, 'net': 0, 'available': {'adhoc_margin': 0, 'cash': 0, 'collateral': 0, 'intraday_payin': 0}, 'utilised': {'debits': 0, 'exposure': 0, 'm2m_realised': 0, 'm2m_unrealised': 0, 'option_premium': 0, 'payout': 0, 'span': 0, 'holding_sales': 0, 'turnover': 0}}}
The above would be what would be close to what's returned for your account, you can see that,
"Margin available" would be 'net'
"account value" would be "cash"
"Margin used" would be "debits"
The account value or cash is the amount you can withdraw instantly to your bank account
net = free cash, available.cash = total account value, utilized.debits = margin used
Thanks ! Pls close the ticket.