It is dynamic, so it keeps changing. I have manually verified it when market hours got over. Then number you get using the code exactly matches with margin required for a basket.
usage:
extracting Bank nifty LTP and line of code for same is
NIFTY_BANK_LTP = u.ltp(get_instrument_by_symbol('NSE', 'NIFTY BANK'))[str(get_instrument_by_symbol('NSE', 'NIFTY BANK'))]['last_price']
Python defenition code to get instrument token by exchange name and symbol:
def get_instrument_by_symbol(exchange, symbol):
global symbol_dict,u,token_dict,global_instrument_var
if (exchange not in symbol_dict.keys()):
symbol_dict[…
Found a video where people have implemented fully automated trading script in python
https://youtube.com/watch?v=FCshuy9gTOQ&t=251s&ab_channel=Brahmastra