Optimizing margin required for option straddle using kite margin API

mukesh_Chaudhary
Hi Sujith/Rakesh,

I have been using kite API for intraday trading for more than a year. I am using the strategy[straddle] where I short banknifty weekly option call and put both having same strike price.
I have a function which i call to place the order.


Traded symbols on 12th Mar,2021 are : BANKNIFTY2131836400CE & BANKNIFTY2131836400PE

Sometimes, because of insufficient fund as margin requirement dynamically increases, one of the order goes through but other gets rejected. Overall i have naked put/call naked position which is not intended. I have written a function to handle this using the option margin calculator API. Based on the available fund, it will tell me the the number of lots i can short without running out of fund.


Lets assume i had 2L margin available in my account. As per the API, I am supposed to have 1.78L to place above mentioned two contracts each one lot. These orders will be placed sequentially, which means first option shorting will require margin more than 1.78L. Right? In my case, i had margin for the same so my both orders went through and to my surprise used margin was around 1.1L only as these two options hedge each other to some extent.

My Question is:
How can i short above two contracts with actually used margin instead of number shown by API..here it is 1.1L where as API showed a margin required=1.78L?


Tagged:
Sign In or Register to comment.