Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs
    1. Home
    2. 91priyansh
    3. Posts
    9
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Posts made by 91priyansh

    • RE: Getting data from websocket of stock that i did not enter in script

      @admin my code
      exports.watchStockPrice = async (data,socket) => {

      let web_socket = new WebSocket({
          client_code: "DIYD85289",
          feed_token: initSmartApi.getApiCredentials().feedToken,
      });
      
      const tokens = data.tokens;
      await web_socket.connect();
      //
      web_socket.runScript(tokens,"mw");
      
      //setTimeout(() =>{web_socket.close()},5000);
      
      web_socket.on('tick', (data) => {
              sendStockPrice(data,socket.id);
      });
      

      }

      function sendStockPrice(data,socketId) {

      socketInit.getIO().to(socketId).emit("watchStockPrice",data);
      

      }

      posted in Bugs
      9
      91priyansh
    • Getting data from websocket of stock that i did not enter in script

      i am getting stock data from websocket that i did not subscribe in script. is it related to closing websocekt instance? i did not close my web socket instance in nodejs. @admin

      posted in Bugs
      9
      91priyansh
    • RE: Master Instrument list 'exch_seg' keywords change without notification

      @PandaTrade is NFO now fix or not?

      posted in General Discussion
      9
      91priyansh
    • RE: Not getting data from websocket for some stock

      @rjbanna is there any way to determine that now we can close the web_socket ? i am confuse about that..

      posted in Bugs
      9
      91priyansh
    • RE: Not getting data from websocket for some stock

      @rjbanna ok..do you know when should i close the web_socket?

      posted in Bugs
      9
      91priyansh
    • Not getting data from websocket for some stock

      not getting live data for all stock (MCX).
      getting this data constantly for this script 225903
      [{tvalue: 29/03/2021 21:40:38, name: tm}]

      output for script mcx_fo|227886
      [{ak: ok, task: cn, msg: connected}]
      I/flutter (15597): [{ak: ok, task: mw, msg: mw}]
      I/flutter (15597): []

      i have run this script in time 5 to 10 still no proper output
      anyone know y this is happening?
      @admin

      posted in Bugs
      9
      91priyansh
    • is there built in method to find ltp of stock?

      is there any built in method to find ltp of given stock? if any please tell me..@admin

      posted in Bugs
      9
      91priyansh
    • RE: is there any way to find only nfo stock data?

      @rajanprabu Thanks

      posted in General Discussion
      9
      91priyansh
    • RE: is there any way to find only nfo stock data?

      @rajanprabu ok. one off topic question do i need to generate my feed token everyday?

      posted in General Discussion
      9
      91priyansh
    • RE: is there any way to find only nfo stock data?

      @admin sorry i am little confuse here.
      i have this stock information {token: 64814, symbol: RELIANCE29APR21FUT, name: RELIANCE, expiry: 29APR2021, strike: -1.000000, lotsize: 250, instrumenttype: FUTSTK, exch_seg: NFO, tick_size: 5.000000}.
      In order to get new future stock information of reliance ex.25JUN2021 i have to find it from json file. Am I correct? @admin

      posted in General Discussion
      9
      91priyansh
    • RE: is there any way to find only nfo stock data?

      @admin do i need to do it every day? in order to get new nfo stocks data @admin

      posted in General Discussion
      9
      91priyansh
    • is there any way to find only nfo stock data?

      i want to find nfo stocks information? is there any easy way to find or i have to find it from this huge file https://margincalculator.angelbroking.com/OpenAPI_File/files/OpenAPIScripMaster.json @admin

      posted in General Discussion
      9
      91priyansh
    • RE: Where do I get the the full list of available tradingsymbol and symboltoken to fetch the LTP?

      @rajanprabu ok no problem

      posted in General Discussion
      9
      91priyansh
    • RE: Where do I get the the full list of available tradingsymbol and symboltoken to fetch the LTP?

      @rajanprabu how to use in nodejs? thread you mention is for python?

      posted in General Discussion
      9
      91priyansh
    • RE: Where do I get the the full list of available tradingsymbol and symboltoken to fetch the LTP?

      @admin this file keeps loading not able to get proper result

      posted in General Discussion
      9
      91priyansh
    • RE: Not getting data from web-socket

      @admin ohh sorry i was accessing after 4 in evening

      posted in Bugs
      9
      91priyansh
    • RE: How can i use this with dart(flutter)?

      @James-Bond i am using web_socket_channel dart(package) to access websocket. here is my code

      //in dart

      void connectToWS() {
      try {
      channel = IOWebSocketChannel.connect(Uri.parse(
      'wss://omnefeeds.angelbroking.com/NestHtml5Mobile/socket/stream'));

          channel.stream.listen((message) {
          print("Message $message");
        }, onError: (error) {
          print(error);
        });
        
       
        var reqJson = {
          "task": "cn",
          "channel": "",
          "token": "token",
          "user": "clientId",
          "acctid": "clientId"
        };
      
        var req = jsonEncode(reqJson);
      
        channel.sink.add(req);
      
        //
        print("Sent connection request message");
      } catch (e) {
        print(e);
      }
      //
      

      }

      posted in General Discussion
      9
      91priyansh
    • RE: How can i use this with dart(flutter)?

      @admin i am getting data from like this eJyLrlZKzFayUsrPVtJRKkksBrGT84Ds3OJ0EDM/Ly81uSQ1Rak2FgAaGQ1z and eJyLjgUAARUAuQ==. Is there issue from client_side? if any one knows tell me solution?

      posted in General Discussion
      9
      91priyansh
    • RE: How can i use this with dart(flutter)?

      @admin i am getting encoded data from web-socket. i am using dart(flutter). do you know y this is happening? if you have any ref for dart(flutter) it would be great..

      posted in General Discussion
      9
      91priyansh