KiteConnect .Net Client v5.0.0 Released

tonystark
Hi everyone,

We've released v5.0.0 of the official .Net client library for Kite Connect API. This is a major update with breaking changes.

What's new

● .NET 10 target — The library now targets net10.0 as the previous net6.0 target reached end-of-life.
● Decimal quantities — All quantity fields are now decimal for consistency and to avoid floating point calculation errors.
● Reorganized constants — Constants are now organized into sub classes for better discoverability.
● Market protection for orders for MARKET and SL-M order types.

New constants

Constants have moved from flat names to nested classes. For example:

● Constants.EXCHANGE_NSE → Constants.Exchange.NSE
● Constants.TRANSACTION_TYPE_BUY → Constants.Transaction.Buy
● Constants.ORDER_TYPE_LIMIT → Constants.OrderType.Limit
● Constants.PRODUCT_MIS → Constants.Product.MIS
● Constants.VALIDITY_TTL → Constants.Validity.TTL
● Constants.MODE_FULL → Constants.TickerMode.Full

Install / Update

NuGet Package Manager Console:
Install-Package Tech.Zerodha.KiteConnect -Version 5.0.0

.NET CLI:
dotnet add package Tech.Zerodha.KiteConnect --version 5.0.0

Market protection example

kite.PlaceOrder(
Exchange: Constants.Exchange.NSE,
TradingSymbol: "INFY",
TransactionType: Constants.Transaction.Buy,
Quantity: 1,
OrderType: Constants.OrderType.Market,
Product: Constants.Product.MIS,
MarketProtection: Constants.MarketProtection.Auto // or specify a custom percentage (1-100)
);

Links

● GitHub: https://github.com/zerodhatech/dotnetkiteconnect
● NuGet: https://www.nuget.org/packages/Tech.Zerodha.KiteConnect
  • SamarthaJana
    I am trying to update NuGet package in my existing .Net project and getting following error:
    Could not install package 'Tech.Zerodha.KiteConnect 5.0.0'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.7.2', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
  • tonystark
    @SamarthaJana Which version of the library are you currently using?

    .Net 4.7.2 is a really old version. We had removed support for it ~3 years back. I recommend to upgrade your project target to .Net 10.
  • SamarthaJana
    Thank you for your response.
    I have a project with type "Windows Forms App (.NET Framework)" for which 4.8 is the current latest version.
    The Kite library is only compiled for .Net Core App which is simply of type "Windows Forms App". for which .Net 10 is the latest version.
    I suppose those two are different things.
    I have a third-party dependency that does not work with .Net core yet. I was stuck at KiteConnect 4.1.0 version for that reason. But with new requirements of MarketProtection required for Market orders (and many more new things coming up), I wanted to update the core KiteConnect assembly rather than manipulating price in my order placement logic. (setting limit order with price above / below LTP by some extra amount)
    So, is there any other option available meanwhile?
  • CH7411
    Hi, I have taken the subscription, but still historical data is not working
Sign In or Register to comment.