![]() |
VOOZH | about |
dotnet add package DigitalRuby.ExchangeSharp --version 1.2.1
NuGet\Install-Package DigitalRuby.ExchangeSharp -Version 1.2.1
<PackageReference Include="DigitalRuby.ExchangeSharp" Version="1.2.1" />
<PackageVersion Include="DigitalRuby.ExchangeSharp" Version="1.2.1" />Directory.Packages.props
<PackageReference Include="DigitalRuby.ExchangeSharp" />Project file
paket add DigitalRuby.ExchangeSharp --version 1.2.1
#r "nuget: DigitalRuby.ExchangeSharp, 1.2.1"
#:package DigitalRuby.ExchangeSharp@1.2.1
#addin nuget:?package=DigitalRuby.ExchangeSharp&version=1.2.1Install as a Cake Addin
#tool nuget:?package=DigitalRuby.ExchangeSharp&version=1.2.1Install as a Cake Tool
<img src='logo.png' width='600' alt="Project's logo" />
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 https://discord.gg/58ktxXuTVK and chat with other developers.
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 | |
| 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 B | Has public method for Websocket Positions |
| Coinbase (Advanced) | x | x | T R O U | |
| Coincheck | R | |||
| Coinmate | x | x | ||
| Crypto.com | R | |||
| Digifinex | x | x | R B | |
| Dydx | R | |||
| FTX | x | x | T R | |
| FTX.us | x | x | T R | |
| gate.io | 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 B | |
| LBank | x | x | R | |
| Livecoin | x | x | ||
| MEXC | x | x | B | |
| 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 | ||
| ZB.com | wip | R |
The following cryptocurrency services are supported:
Exchange constructors are private, to get access to an exchange in code use:
ExchangeAPI.GetExchangeAPIAsync<T>().
On *nix systems:
curl https://github.com/DigitalRuby/ExchangeSharp/raw/main/install-console.sh | shOn Windows (or manually):
PATH (ctrl + shift + pause|break → Environment Variables)exchange-sharp --help shows all available commandsExchangeSharp 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
ExchangeSharp.ClientWebSocket.RegisterWebSocketCreator(
() => new ExchangeSharpConsole.WebSocket4NetClientWebSocket()
);
See WebSocket4NetClientWebSocket.cs for implementation details.
dotnet add package DigitalRuby.ExchangeSharp --version 1.2.1
PM> Install-Package DigitalRuby.ExchangeSharp -Version 1.2.1
There's a lot of examples on how to use the API in our .
e.g.
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.");
Console.ReadLine(true);
}
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.
Please read the before submitting a pull request.
I'm happy to make customizations to the software for you and keep in private repo, email .
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.
Donation totals: 0.039 BTC, 10.25 LTC
Thanks for visiting!
Jeff Johnson
http://www.digitalruby.com
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 was computed. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 was computed. |
| .NET Framework | net461 net461 was computed. net462 net462 was computed. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
This package is not used by any NuGet packages.
Showing the top 3 popular GitHub repositories that depend on DigitalRuby.ExchangeSharp:
| Repository | Stars |
|---|---|
|
btcpayserver/btcpayserver
Accept Bitcoin payments. Free, open-source & self-hosted, Bitcoin payment processor.
|
|
|
visualHFT/VisualHFT
VisualHFT is a WPF/C# desktop GUI that shows market microstructure in real time. You can track advanced limit‑order‑book dynamics and execution quality, then use its modular plugins to shape the analysis to your workflow.
|
|
|
sthewissen/Mynt
An Azure Functions-based crypto currency trading bot; featuring 10 exchanges, 25 indicators, custom strategy support, backtester and more
|
| Version | Downloads | Last Updated |
|---|---|---|
| 1.2.1 | 9,751 | 8/17/2025 |
| 1.2.0 | 26,328 | 11/27/2024 |
| 1.1.1 | 1,212 | 6/12/2024 |
| 1.1.0 | 6,368 | 1/13/2024 |
| 1.0.4 | 24,153 | 4/14/2023 |
| 1.0.3 | 4,730 | 10/6/2022 |
| 1.0.2 | 29,754 | 5/2/2022 |
| 1.0.1 | 7,697 | 4/9/2022 |
| 1.0.0 | 1,396 | 3/20/2022 |
| 0.9.2 | 2,749 | 1/6/2022 |
| 0.9.1 | 2,236 | 11/9/2021 |
| 0.9.0 | 1,482 | 10/1/2021 |
| 0.8.2 | 1,720 | 8/27/2021 |
| 0.8.1 | 1,573 | 6/24/2021 |
| 0.8.0 | 2,267 | 5/14/2021 |
| 0.7.5 | 2,288 | 3/20/2021 |
| 0.7.4 | 4,710 | 12/4/2020 |
| 0.7.3 | 2,240 | 6/16/2020 |
| 0.7.2 | 5,868 | 4/15/2020 |
| 0.7.1 | 3,178 | 3/18/2020 |