Shoonya-Dev / ShoonyaApi-js

30 stars 20 forks source link

get_option_chain api is not implemented #14

Open navnredy opened 1 year ago

navnredy commented 1 year ago

Hello Team,

As in the documentation you have metioned an API get_option_chain, but it is not implemented. Please implement and share the new library

bima-prashanthkb commented 1 year ago

if you add this into RestApi.js file , it should work

self.get_option_chain = function (exchange, tradingsymbol, strikeprice, count) {

      let values          = {}
      values["uid"]       = self.__username
      values["exch"]      = exchange
      values["tsym"]     = tradingsymbol          
      values["strprc"]     = strikeprice.toString();
      values["cnt"]     = count.toString();           

      let reply = post_request("optionchain", values, self.__susertoken);
      return reply;
    };

you can call the function as

api.get_option_chain('NFO', 'NIFTY', '19250', 10);

navnredy commented 1 year ago

Not working.

Anoopvempeny commented 1 year ago

NOT WORKING

88pawankumarjha commented 11 months ago

try this: api.get_option_chain('NFO', 'NIFTY30NOV23F', '20000', 10)

symbol could be current month expiry future