GetOrders() throws KiteConnect.DataException "The input string '' was not in a correct format"

sukantary
Hi Team,

Since 15-Jul-2026, I have started getting an exception while calling GetOrders() using the latest Tech.Zerodha.KiteConnect v5.2.0 NuGet package.

Environment:
SDK: Tech.Zerodha.KiteConnect 5.2.0
Framework: .NET 10
API:

Kite kite = new Kite(apiKey, AccessToken: accessToken, Debug: false);
var orders = kite.GetOrders();

Exception:

KiteConnect.DataException: 'The input string '' was not in a correct format. {"placed_by":"XXXXXX","account_id":"XXXXXX","order_timestamp":"2026-07-16 13:36:08","order_id":"260716191041454","exchange_order_id":"1700000097508329","parent_order_id":null,"status":"COMPLETE","status_message":null,"status_message_raw":null,"exchange_update_timestamp":"2026-07-16 13:36:08","exchange_timestamp":"2026-07-16 13:36:05","variety":"regular","modified":false,"auction_number":"","exchange":"NFO","tradingsymbol":"BANKNIFTY26JUL58600CE","instrument_token":15847170,"order_type":"LIMIT","transaction_type":"BUY","validity":"DAY","validity_ttl":0,"product":"NRML","quantity":90,"disclosed_quantity":0,"price":279.05,"trigger_price":0,"average_price":279.05,"filled_quantity":90,"pending_quantity":0,"cancelled_quantity":0,"market_protection":0,"meta_raw":null,"meta":{},"tag":null,"guid":"01X7HPYW3HZVKkI"}'

Root Cause:

After decompiling KiteConnect.dll v5.2.0, I found that the Order constructor contains the following code:

AuctionNumber = 0;

if (data.ContainsKey("auction_number"))
{
AuctionNumber = Convert.ToInt32(data["auction_number"]);
}

However, the API is now returning: "auction_number": ""

As a result, Convert.ToInt32("") throws: Input string '' was not in a correct format.

Questions:
1. Has there been any recent change in the Orders API response where auction_number is now returned as an empty string?
2. Is this a known issue in SDK v5.2.0?
3. Will a patched NuGet package be released?

Please fix the issue asap or help me find a workaround.

Thank you.
  • sukantary
    Hi Team,

    This issue is still unresolved. Please fix the issue else please provide any solution or workaround.
  • tonystark
    @sukantary This was an API change which triggered an old bug in the library. You can update to the latest version for the fix - v5.2.1 https://www.nuget.org/packages/Tech.Zerodha.KiteConnect/5.2.1

    Also the library is open source. You can inspect the code here - https://github.com/zerodha/dotnetkiteconnect
  • sukantary
    Thank you for the quick response and for identifying the root cause.

    I upgraded Tech.Zerodha.KiteConnect from v5.2.0 to v5.2.1, and I'm happy to confirm that the issue has been resolved. GetOrders() is now working perfectly.

    I really appreciate the prompt fix and the support from the Kite Connect team. Also, thank you for keeping the library open source - it made it much easier to investigate the issue and understand the root cause.

    Thanks again for the excellent support!
Sign In or Register to comment.