how to get token on nifty option to trade it
-
is there any endpoint for option chain or is there any way to get token to trade in options.
-
@Tanay1907 please use instrument master data.
https://margincalculator.angelone.in/OpenAPI_File/files/OpenAPIScripMaster.json
-
@Tanay1907 You can use below code to get token if you are using python
def get_symbol_token(trading_symbol, exchange="NFO"): url = "https://apiconnect.angelbroking.com/rest/secure/angelbroking/order/v1/searchScrip" payload = {"exchange": exchange, "searchscrip": trading_symbol} response = requests.post(url, json=payload, headers=headers) #print(response.text) data = response.json() if data.get("status") and "data" in data and len(data["data"]) > 0: return data["data"][0]["symboltoken"] print(f"[❌] Symbol token not found for {trading_symbol}") return None
in trading_symbol you need pass strike like below
BANKNIFTY27FEB2548300PE