A C# .netstandard client library for the Kucoin REST and Websocket Spot and Futures API focusing on clear usage and models
Kucoin.Net is a strongly typed client library for accessing the Kucoin REST and Websocket API. All data is mapped to readable models and enum values. Additional features include an implementation for maintaining a client side order book, easy integration with other exchange client libraries and more.
The library is targeting both .NET Standard 2.0
and .NET Standard 2.1
for optimal compatibility
.NET implementation | Version Support |
---|---|
.NET Core | 2.0 and higher |
.NET Framework | 4.6.1 and higher |
Mono | 5.4 and higher |
Xamarin.iOS | 10.14 and higher |
Xamarin.Android | 8.0 and higher |
UWP | 10.0.16299 and higher |
Unity | 2018.1 and higher |
dotnet add package Kucoin.Net
REST Endpoints
// Get the ETH/USDT ticker via rest request
var restClient = new KucoinRestClient();
var tickerResult = await restClient.SpotApi.ExchangeData.GetTickerAsync("ETH-USDT");
var lastPrice = tickerResult.Data.LastPrice;
Websocket streams
// Subscribe to ETH/USDT ticker updates via the websocket API
var socketClient = new KucoinSocketClient();
var tickerSubscriptionResult = socketClient.SpotApi.SubscribeToTickerUpdatesAsync("ETH-USDT", (update) =>
{
var lastPrice = update.Data.LastPrice;
});
For information on the clients, dependency injection, response processing and more see the Kucoin.Net documentation, CryptoExchange.Net documentation, or have a look at the examples here or here.
Kraken.Net is based on the CryptoExchange.Net base library. Other exchange API implementations based on the CryptoExchange.Net base library are available and follow the same logic.
CryptoExchange.Net also allows for easy access to different exchange API's.
Exchange | Repository | Nuget |
---|---|---|
Binance | JKorf/Binance.Net | |
BingX | JKorf/BingX.Net | |
Bitfinex | JKorf/Bitfinex.Net | |
Bitget | JKorf/Bitget.Net | |
Bybit | JKorf/Bybit.Net | |
CoinEx | JKorf/CoinEx.Net | |
CoinGecko | JKorf/CoinGecko.Net | |
Huobi | JKorf/Huobi.Net | |
Kraken | JKorf/Kraken.Net | |
Mexc | JKorf/Mexc.Net | |
OKX | JKorf/OKX.Net |
A Discord server is available here. Feel free to join for discussion and/or questions around the CryptoExchange.Net and implementation libraries.
API | Supported | Location |
---|---|---|
Account Basic Info | ✓ | restClient.SpotApi.Account / restClient.FuturesApi.Account |
Account Sub-Account | X | |
Funding Overview | ✓ | restClient.SpotApi.Account |
Funding Deposit | ✓ | restClient.SpotApi.Account |
Funding Withdrawal | ✓ | restClient.SpotApi.Account |
Funding Transfer | ✓ | restClient.SpotApi.Account |
Funding Trade Fee | ✓ | restClient.SpotApi.Account |
Spot Trading Market Data | ✓ | restClient.SpotApi.ExchangeData |
Spot Trading HF Trade | ✓ | restClient.SpotApi.ProAccount |
Spot Trading Orders | ✓ | restClient.SpotApi.Trading |
Spot Trading Fills | ✓ | restClient.SpotApi.Trading |
Spot Trading Stop Order | ✓ | restClient.SpotApi.Trading |
Margin Trading Margin HT Trade | X | |
Margin Trading Margin Orders | ✓ | restClient.SpotApi.Trading |
Margin Trading Margin Info | ✓ | restClient.SpotApi.ExchangeData |
Margin Trading Isolated Margin | ✓ | restClient.SpotApi.ExchangeData / restClient.SpotApi.Account |
Margin Trading Margin Trading(V3) | ✓ | restClient.SpotApi.Margin |
Margin Trading Lending Market(V3) | ✓ | restClient.SpotApi.Margin |
Futures Trading Market Data | ✓ | restClient.FuturesApi.ExchangeData |
Futures Trading Orders | ✓ | restClient.FuturesApi.Trading |
Futures Trading Fills | ✓ | restClient.FuturesApi.Trading |
Futures Trading Positions | ✓ | restClient.FuturesApi.Acount / restClient.FuturesApi.Trading |
Futures Trading Risk Limit | ✓ | restClient.FuturesApi.Acount |
Futures Trading Funding Fees | ✓ | restClient.FuturesApi.ExchangeData |
API | Supported | Location |
---|---|---|
Spot Public | ✓ | socketClient.SpotApi |
Spot Private | ✓ | socketClient.SpotApi |
Margin Public | ✓ | socketClient.SpotApi |
Margin Private | ✓ | socketClient.SpotApi |
Futures Public | ✓ | socketClient.FuturesApi |
Futures Private | ✓ | socketClient.FuturesApi |
I develop and maintain this package on my own for free in my spare time, any support is greatly appreciated.
Make a one time donation in a crypto currency of your choice. If you prefer to donate a currency not listed here please contact me.
Btc: bc1q277a5n54s2l2mzlu778ef7lpkwhjhyvghuv8qf
Eth: 0xcb1b63aCF9fef2755eBf4a0506250074496Ad5b7
USDT (TRX) TKigKeJPXZYyMVDgMyXxMf17MWYia92Rjd
Alternatively, sponsor me on Github using Github Sponsors.
Version 5.5.4 - 04 May 2024
Version 5.5.3 - 04 May 2024
Version 5.5.2 - 01 May 2024
Version 5.5.1 - 28 Apr 2024
Version 5.5.0 - 23 Apr 2024
Version 5.4.1 - 18 Apr 2024
Version 5.4.0 - 18 Apr 2024
Version 5.3.3 - 03 Apr 2024
Version 5.3.2 - 25 Mar 2024
Version 5.3.1 - 24 Mar 2024
Version 5.3.0 - 16 Mar 2024
Version 5.2.0 - 25 Feb 2024
Version 5.1.0 - 23 Dec 2023
Version 5.0.8 - 03 Dec 2023
Version 5.0.7 - 07 Nov 2023
Version 5.0.6 - 29 Oct 2023
Version 5.0.5 - 24 Oct 2023
Version 5.0.4 - 09 Oct 2023
Version 5.0.3 - 25 Aug 2023
Version 5.0.2 - 23 Jul 2023
Version 5.0.1 - 11 Jul 2023
Version 5.0.0 - 25 Jun 2023
Version 4.3.3 - 15 Apr 2023
Version 4.3.2 - 18 Mar 2023
Version 4.3.1 - 14 Feb 2023
Version 4.3.0 - 05 Feb 2023
Version 4.2.1 - 21 Nov 2022
Version 4.2.0 - 17 Nov 2022
Version 4.1.0 - 11 Oct 2022
Version 4.0.17 - 15 Aug 2022
Version 4.0.16 - 31 Jul 2022
Version 4.0.15 - 18 Jul 2022
Version 4.0.14 - 16 Jul 2022
Version 4.0.13 - 10 Jul 2022
Version 4.0.12 - 12 Jun 2022
Version 4.0.11 - 24 May 2022
Version 4.0.10 - 22 May 2022
Version 4.0.9 - 08 May 2022
Version 4.0.8 - 01 May 2022
Version 4.0.7 - 21 Apr 2022
Version 4.0.6 - 14 Apr 2022
Version 4.0.5 - 10 Mar 2022
Version 4.0.4 - 08 Mar 2022
Version 4.0.3 - 01 Mar 2022
Version 4.0.2 - 27 Feb 2022
Version 4.0.1 - 24 Feb 2022
Version 4.0.0 - 18 Feb 2022
Added Github.io page for documentation: https://jkorf.github.io/Kucoin.Net/
Added unit tests for parsing the returned JSON for each endpoint and subscription
Added AddKucoin extension method on IServiceCollection for easy dependency injection
Added URL reference to API endpoint documentation for each endpoint
Added default rate limiter
Refactored client structure to be consistent across exchange implementations
Renamed various properties to be consistent across exchange implementations
Cleaned up project structure
Fixed various models
Updated CryptoExchange.Net, see https://github.com/JKorf/CryptoExchange.Net#release-notes
See https://jkorf.github.io/Kucoin.Net/MigrationGuide.html for additional notes for updating from V3 to V4
Version 3.1.6 - 04 Nov 2021
Version 3.1.5 - 03 Nov 2021
Version 3.1.4 - 08 Oct 2021
Version 3.1.3 - 06 Oct 2021
Version 3.1.2 - 05 Oct 2021
Version 3.1.1 - 29 Sep 2021
params
to IEnumerable<string>
Version 3.1.0 - 20 Sep 2021
Version 3.0.10 - 20 Sep 2021
Version 3.0.9 - 15 Sep 2021
Version 3.0.8 - 14 Sep 2021
Version 3.0.7 - 14 Sep 2021
Version 3.0.6 - 03 Sep 2021
Version 3.0.5 - 02 Sep 2021
Version 3.0.4 - 26 Aug 2021
Version 3.0.3 - 24 Aug 2021
Version 3.0.2 - 13 Aug 2021
Version 3.0.1 - 13 Aug 2021
Version 3.0.0 - 12 Aug 2021
Version 3.0.0-beta3 - 09 Aug 2021
Version 3.0.0-beta2 - 26 Jul 2021
Version 3.0.0-beta1 - 09 Jul 2021
Version 2.3.9 - 05 mei 2021
Version 2.3.8 - 04 mei 2021
Version 2.3.7 - 28 apr 2021
Version 2.3.6 - 19 apr 2021
Version 2.3.5 - 30 mrt 2021
Version 2.3.4 - 16 mrt 2021
Version 2.3.3 - 16 mrt 2021
Version 2.3.2 - 16 mrt 2021
Version 2.3.1 - 05 mrt 2021
Version 2.3.0 - 04 mrt 2021
Version 2.2.1 - 01 mrt 2021
Version 2.2.0 - 01 mrt 2021
Version 2.1.2 - 22 jan 2021
Version 2.1.1 - 14 jan 2021
Version 2.1.0 - 21 dec 2020
Version 2.0.17 - 11 dec 2020
Version 2.0.16 - 11 dec 2020
Version 2.0.15 - 19 nov 2020
Version 2.0.14 - 08 Oct 2020
Version 2.0.13 - 28 Aug 2020
Version 2.0.12 - 12 Aug 2020
Version 2.0.11 - 05 Aug 2020
Version 2.0.10 - 03 Aug 2020
Version 2.0.9 - 22 Jul 2020
Version 2.0.8 - 22 Jul 2020
Version 2.0.7 - 20 Jul 2020
Version 2.0.6 - 07 Jul 2020
Version 2.0.5 - 21 Jun 2020
Version 2.0.4 - 16 Jun 2020
Version 2.0.3 - 07 Jun 2020
Version 2.0.2 - 03 Mar 2020
Version 2.0.1 - 23 Oct 2019
Version 2.0.0 - 23 Oct 2019
Version 1.0.4 - 30 Sep 2019
Version 1.0.3 - 23 Sep 2019
Version 1.0.2 - 07 Aug 2019
Version 1.0.1 - 05 Aug 2019
Version 1.0.0 - 09 jul 2019
Version 0.0.2 - 14 may 2019
Version 0.0.1 - 09 may 2019