DigitalRuby.ExchangeSharp 1.0.3

.NET Standard 2.0
dotnet add package DigitalRuby.ExchangeSharp --version 1.0.3
NuGet\Install-Package DigitalRuby.ExchangeSharp -Version 1.0.3
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DigitalRuby.ExchangeSharp" Version="1.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DigitalRuby.ExchangeSharp --version 1.0.3
#r "nuget: DigitalRuby.ExchangeSharp, 1.0.3"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install DigitalRuby.ExchangeSharp as a Cake Addin
#addin nuget:?package=DigitalRuby.ExchangeSharp&version=1.0.3

// Install DigitalRuby.ExchangeSharp as a Cake Tool
#tool nuget:?package=DigitalRuby.ExchangeSharp&version=1.0.3

<img src='logo.png' width='600' alt="Project's logo" />

Github Sponsorship



ExchangeSharp is a C# framework/lib and console app for trading and communicating with various exchange API end points for cryptocurrency assets. Many exchanges are supported, along with web sockets, withdraws and more!

Feel free to visit the discord channel at and chat with other developers.


  • Many exchanges supported with public, private and web socket API
  • Easy to use code and API
  • Optional global market symbol normalization, since each exchange has their own way of doing market symbols
  • Runs anywhere .NET runs. (Windows, Mac, Linux, Containers, Serverless, iOS, Android, etc.)
  • Can be used from many different C# platforms
  • Has a great CLI that enables you to use all features from all exchanges right from your command line.


The following cryptocurrency exchanges are supported:
(Web socket key: T = tickers, R = trades, B = orderbook / delta orderbook, O = private orders, U = user data)

Exchange Name Public REST Private REST Web Socket Notes
ApolloX x x T R B O U
Aquanow wip x
Binance x x T R B O U
Binance Jersey x x T R B O U Ceased operations
Binance.US x x T R B O U
Binance DEX R
Bitbank x x
Bitfinex x x T R O
Bitflyer R
Bithumb x R
BitMEX x x R O
Bitstamp x x R
Bittrex x x T R
BL3P x x R B Trades stream does not send trade's ids.
Bleutrade x x
BtcTurk R
BTSE x x
Bybit x x R Has public method for Websocket Positions
Coinbase x x T R O U
Coincheck R
Coinmate x x R
Digifinex x x R B
Dydx R
FTX x x T R x x T R x x R
Gemini x x T R B
HitBTC x x R
Huobi x x R B
Kraken x x R Dark order symbols not supported
KuCoin x x T R
LBank x x R
Livecoin x x
NDAX x x T R
OKCoin x x R B
OKEx x x T R B O
Poloniex x x T R B
UPbit R
YoBit x x wip R

The following cryptocurrency services are supported:

  • Cryptowatch (partial)

Exchange constructors are private, to get access to an exchange in code use:


Installing the CLI

On *nix systems:

  • Run this command curl | sh

On Windows (or manually):

  • Download the latest binaries for your OS.
  • Unzip it into a folder that is in your environment variable PATH (ctrl + shift + pause|break → Environment Variables)
  • Use it from your preferred command-line emulator (e.g. Powershell, cmd, etc.)
  • exchange-sharp --help shows all available commands


ExchangeSharp uses marketSymbol to refer to markets, or pairs of currencies.

Please send pull requests if you have made a change that you feel is worthwhile, want a bug fixed or want a new feature. You can also donate to get new features.



If you must use an older Windows (older than win8.1), you'll need to use the Websocket4Net nuget package, and override the web socket implementation by calling

    () => new ExchangeSharpConsole.WebSocket4NetClientWebSocket()

See WebSocket4NetClientWebSocket.cs for implementation details.


dotnet CLI

dotnet add package DigitalRuby.ExchangeSharp --version 1.0.3

Package Manager on VS

PM> Install-Package DigitalRuby.ExchangeSharp -Version 1.0.3


Creating an order

There's a lot of examples on how to use the API in our console application.
e.g. ExampleOption.cs

Getting ticker info via Web Sockets
public static async Task Main(string[] args)
    // create a web socket connection to Binance. Note you can Dispose the socket anytime to shut it down.
    using var api = await ExchangeAPI.GetExchangeAPIAsync<ExchangeBinanceAPI>();
    // the web socket will handle disconnects and attempt to re-connect automatically.
    using var socket = await api.GetTickersWebSocket(tickers =>
        Console.WriteLine("{0} tickers, first: {1}", tickers.Count, tickers.First());

    Console.WriteLine("Press ENTER to shutdown.");


Private api calls like placing orders require you to call LoadApiKeys first. You can generate an api keys file by running the bundled console application and choosing the generate key file option.


ExchangeSharp uses NLog internally currently. To log, use ExchangeSharp.Logger.

Do not use Console.WriteLine to log messages in the lib project.

Provide your own nlog.config or app.config nlog configuration if you want to change logging settings or turn logging off.


The ExchageAPI class provides a method caching mechanism. Use MethodCachePolicy to put caching behind public methods, or clear to remove caching. Some methods are cached by default. You can set ExchangeAPI.UseDefaultMethodCachePolicy to false to stop all caching as well.

You can also set request cache policy if you want to tweak how the http caching behaves.

How to contribute

Please read the contributing guideline before submitting a pull request.


I'm happy to make customizations to the software for you and keep in private repo, email

Donations Gratefully Accepted

Believe it or not, donations are quite rare. I've posted publicly the total donation amounts below. If ExchangeSharp has helped you in any way, please consider donating.

Donate with Bitcoin

Donate with Litecoin

Donate with Ethereum


Donation totals: 0.039 BTC, 10.25 LTC

Thanks for visiting!

Jeff Johnson

Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows
.NET Core netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.0 netstandard2.1
.NET Framework net461 net462 net463 net47 net471 net472 net48 net481
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen40 tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories (2)

Showing the top 2 popular GitHub repositories that depend on DigitalRuby.ExchangeSharp:

Repository Stars
Accept Bitcoin payments. Free, open-source & self-hosted, Bitcoin payment processor.
GUI for enterprise level high frequency trading systems, making focus on visualizing market microstructure analytics, such Limit Order Book dynamic, latencies, execution quality, and other analytics. WPF & C#
Version Downloads Last updated
1.0.3 1,695 10/6/2022
1.0.2 14,333 5/2/2022
1.0.1 4,374 4/9/2022
1.0.0 423 3/20/2022
0.9.2 1,214 1/6/2022
0.9.1 1,156 11/9/2021
0.9.0 493 10/1/2021
0.8.2 687 8/27/2021
0.8.1 548 6/24/2021
0.8.0 1,278 5/14/2021
0.7.5 1,198 3/20/2021
0.7.4 3,020 12/4/2020
0.7.3 1,126 6/16/2020
0.7.2 4,836 4/15/2020
0.7.1 1,909 3/18/2020
0.7.0 852 2/12/2020
0.6.4 1,156 1/8/2020
0.6.3 39,582 11/10/2019
0.6.2 16,055 10/4/2019
0.6.1 535 9/20/2019 742 8/28/2019 564 8/20/2019 2,616 5/10/2019