OpenApi-5p / py5paisa

Official Python SDK for 5paisa APIs natively written in VB .NET
https://5paisa.github.io
92 stars 68 forks source link

nifty and banifty index scriptcode #137

Open kasrthiksacoe opened 2 years ago

kasrthiksacoe commented 2 years ago

Description

Is there any scrip code to get the nifty index and banknifty index . Any automatic selection of option using the index data script code for VIX

5 pasia can you update on this ?

intronix commented 2 years ago

def get_IndexScriptCode(client,symbol): symbol=symbol.upper() req=[{"Exch":"N","ExchType":"C","Symbol":symbol}] res=client.fetch_market_feed(req) token=res['Data'][0]['Token'] return token

Usage : token = get_OptionScriptCode(client, 'BANKNIFTY', StrikePrice, Expiry, Option Type)

IshaanKanwar commented 2 years ago

@intronix Can you share the get_OptionScriptCode function also