Buy/Sell Trade API calls failing arbitrarily with "Internal Error"

ramatius
Hi,
For the past 2-3 days, Many of the calls to buy/sell trades (both in CM & FNO) have been failing with "Internal Server Error". It is not happening all the time, but only arbitrarily. So the initial trades from my system go through & get converted to real trades, but many of the squareoff/stoploss trades have been erroring out. Heavy losses incurred due this vexing problem.

There is nothing wrong from my side - the margins are available, internet connection is fine and the API server is responding to every API call.

I have called Zerodha support, but unable to reach the right person(s) - they are busy with other calls. The promised "will arrange for call back asap" hasn't come in so far.

Please look into this immediately and correct the problem and/or tell me what is going wrong.

Appreciate your quick response on this.
Tagged:
  • Vivek
    @ramatius We checked our logs and there seems to be very few connection timeout errors from our side but these are very few in numbers (less than 0.0001%) of our total orders. Please provide us your request and response logs and we might be able to debug it.
  • sujith
    Hi @ramatius,
    Can you provide us more information with what params you tried and paste stacktrace here?
  • sujith
    And also error message of kite exception would be helpful.
  • ramatius
    I have sent my trade log (with returned msg from kiteconnect) to vivek as a private msg. Please see and let me know.
  • ramatius
    Today also it has failed,

    INFO : Sending trade to market for DR0886 TCS-EQ, SHORT, MARKET, 29, NSE
    INFO : Response : HTTP/1.1 500 Internal Server Error
    Date: Tue, 11 Apr 2017 03:52:12 GMT
    Server: Microsoft-IIS/10.0
    Content-Length: 201
    Content-Type: text/html; charset=UTF-8
    Client-Date: Tue, 11 Apr 2017 03:52:12 GMT
    Client-Peer: 122.166.199.36:443
    Client-Response-Num: 1
    Client-SSL-Cert-Issuer: /CN=TEMPLETREE
    Client-SSL-Cert-Subject: /CN=TEMPLETREE
    Client-SSL-Cipher: ECDHE-RSA-AES256-GCM-SHA384
    Client-SSL-Socket-Class: Net::SSL
    Client-SSL-Warning: Peer certificate not verified
    X-Powered-By: PHP/7.0.15
    X-Powered-By: ASP.NET

    Array
    (
    [user_id] => DR0886
    [tsym] => TCS-EQ
    [quantity] => 29
    [exchange] => NSE
    [otype] => MARKET
    [ttype] => SELL
    [algo] => algo_42
    )
  • sujith
    Hi @ramatius,
    Is this response header?
  • sujith
    @ramatius,
    We don't use Microsoft server. Please do paste KiteException.message and code here.
  • ramatius
    Hi Sujith, We are are PHP to connect to your server and call PHP from algo script to get the data. The response I posted here is the response from the PHP. Will try to get the KiteException message & code in the PHP and send across to you.
  • ramatius
    The PHP $kite->orderPlace() API is returning only the order_id. How do I get the error msg & code? Can't find it in the documentation...
Sign In or Register to comment.