Getting TimeOut Exception in GetQuote

Gyan.Sikdar
Hi Team,

I am trying to get the current Quote from socket and putting in array shown below

for each (MyTradeData Item in tradeArray)
{

CurrentQuote[i] = kite.GetQuote("NSE", Item.TradeSymbol............) // Example code : I am getting timeout Exception here
}
  • sujith
    Hi @Gyan.Sikdar,
    We have informed the concerned team. We will let you know once it is fixed.
  • Gyan.Sikdar
    Gyan.Sikdar edited September 2017
    Hello @sujith, Is there any update on this ? Actually while developing and testing our App we have to subscribe payed service, So looking forward for an quick response.

    1. I have debugged the issue and found that When I connected via my mobile hotspot its working very fine, But when I connect via my ISP (PPPoE, 10mbps fiber connection) its throwing timeout Exception.

    2. How do I can read data from ticker ? I have subscribed to 50 stocks, I could see the response in my console.
  • tonystark
    Hi @Gyan.Sikdar,

    1. We have informed the team. They are looking into it.
    2. You can try example code from our repo.
  • Gyan.Sikdar
    Hello @ajinasokan,

    Thanks for the quick response.

    1. When I can get a resolution because without that I can't test my app, Is there any way to pause my subscription until issue will be resolved ?
    2. I have used the same base code you have mentioned, I cant see the example in code reading data from ticker, I was using kite.GetQuote I think this is direct request from the server which lead to Exception too many request if try to put request for 50 stocks even though time interval is 4 seconds for each request.
    My requirement is :
    Seem Ticker is working fine I want to read data from ticker
  • sujith
    @Gyan.Sikdar,
    Can you let us know tradingsymbol for which you are trying and HTTP status code?

    You can't request to websockets. It will keep streaming data. You need to store it once you get it inside onTick() and read from there.
  • Gyan.Sikdar
    Thank you!! for response, I am facing issue with App internet access when I am connected via by ISP as mentioned above, Is there any Web Proxy setting need to be set in my application. Because I am not getting any error when I am connected via my mobile hotspot.
  • Gyan.Sikdar
    Also Could you please elaborate how we can store data on onTick() using a data type of Tick MyTick[i], something like this Ticker MyTicker.onTick(MyTick[i]); ? Sorry! But I am new in C#.net so don't know much.
  • tonystark
    Hi @Gyan.Sikdar,

    If you want to set proxy you can do that in Internet Options in Control Panel. Our library uses the system proxy connection for ticker connections.

    You may store tick data to file like this:
    private static void onTick(Tick TickData)
    {
    TextWriter tw = new StreamWriter("tickdata.txt", true);
    tw.WriteLine(JsonSerialize(TickData));
    tw.Close();
    }
    When you need the data you can read the same file and parse it. If you need all the previous ticks it is better to use databases like SQLite.
  • Gyan.Sikdar
    Hello @ ajinasokan,
    Thank you :) for the code, But I couldn't understand why my app is throwing Time out exception, also its taking too much time for login when Connecting via My ISP its Skylink fibernet 10mbps, Hope internet speed would not be a problem because mobile gives me speed of 3-4mbps and its working very fine.
  • Gyan.Sikdar
    Gyan.Sikdar edited September 2017
    Hello @ ajinasokan,

    Is it Possible to get compiled throw source code for kite.cs
    I am geeting following error if I add source files instead of dll reference

    1. Severity Code Description Project File Line Suppression State
    Error CS0103 The name 'HttpUtility' does not exist in the current context KiteConnect Sample C:\Users\good\Desktop\MyData\Trading\dotnetkiteconnect-master_V_1.0.0\KiteConnect Sample\Kite.cs 836 Active

    2. Severity Code Description Project File Line Suppression State
    Error CS0246 The type or namespace name 'TextFieldParser' could not be found (are you missing a using directive or an assembly reference?) KiteConnect Sample C:\Users\good\Desktop\MyData\Trading\dotnetkiteconnect-master_V_1.0.0\KiteConnect Sample\Kite.cs 919 Active


  • tonystark
    Hi @Gyan.Sikdar,

    These errors are due to missing references. You can add these references by looking at the original project. But it is better to add the complete project into your solution rather than adding the individual files.
Sign In or Register to comment.