py5paisa icon indicating copy to clipboard operation
py5paisa copied to clipboard

nifty and banifty index scriptcode

Open kasrthiksacoe opened this issue 2 years ago • 2 comments

  • 5paisa Python SDK version: latest
  • Python version: 3.9
  • Operating System: windows

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 ?

kasrthiksacoe avatar Mar 06 '22 15:03 kasrthiksacoe

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)

intronix avatar Mar 09 '22 22:03 intronix

@intronix Can you share the get_OptionScriptCode function also

IshaanKanwar avatar Apr 22 '22 07:04 IshaanKanwar