Unable to fetch option data for Banknifty?
-
I have tried below code which to get LTP but it is not sending me the result, instead i am getting error "symbol not found"
LTPDataRequest lreq = new LTPDataRequest();
lreq.exchange = Constants.EXCHANGE_NSE;
lreq.symboltoken = "43573";
lreq.tradingsymbol = "BANKNIFTY15JUL2135700PE";
obj = connect.GetLTPData(lreq);
GetLTPDataResponse ltp = obj.GetLTPDataResponse;Either I assume that SmartAPI doesn't even provide the option chain data, if yes then it is sad because then kindly recommend from where we can get the data. Otherwise, it will destruct the whole purpose of algo trading.
Or I am doing something wrong, which I think I am not because both symbol token and tradingsymbol is right
-
HI @mishipal convert the json to csv.
https://margincalculator.angelbroking.com/OpenAPI_File/files/OpenAPIScripMaster.json -
@TradeMonk bro can you share some code for getting token lists.
-
@asksameer I am creating a windows form application with few controls on it.
Right now, I am not planning for 100% automation. I would like to check for few weeks with different settings.I am using SDK.
-
Are you calling angel api / sdk in C# Console application OR Web application?
-
@TradeMonk They have a file for all the instruments, you can check in the documentation
-
@sts said in Unable to fetch option data for Banknifty?:
NFO
That worked. Thanks.
One more help. How can I get the list of all symboltoken and tradingsymbol?
-
@TradeMonk said in Unable to fetch option data for Banknifty?:
BANKNIFTY15JUL2135700PE
I think your exchange should be NFO, not NSE