DueDex 1.6.0
See the version list below for details.
dotnet add package DueDex --version 1.6.0
NuGet\Install-Package DueDex -Version 1.6.0
<PackageReference Include="DueDex" Version="1.6.0" />
paket add DueDex --version 1.6.0
#r "nuget: DueDex, 1.6.0"
// Install DueDex as a Cake Addin #addin nuget:?package=DueDex&version=1.6.0 // Install DueDex as a Cake Tool #tool nuget:?package=DueDex&version=1.6.0
DueDex.NET
The official C# client SDK for DueDEX
Installation
The quickest way to install the client SDK is by using the NuGet package:
dotnet add package DueDex
Getting Started
To start using the client, add the following using
directive to your code file:
using DueDex;
Then, create a client to be used throughout the application. The client object is thread-safe and you should store it to be reused:
// Creates an anonymous client to access public APIs ONLY
var anonymousClient = new DueDexClient();
// Creates an anonymous client that connects to the public TESTNET
var anonymousTestnetClient = new DueDexClient(NetworkType.Testnet);
// Creates an authenticated client
var authenticatedClient = new DueDexClient("YOUR_API_KEY", "YOUR_API_SECRET");
// Creates an authenticated client to the public TESTNET
var authenticatedClient = new DueDexClient("YOUR_API_KEY", "YOUR_API_SECRET", NetworkType.Testnet);
You can also provide an ILogger<DueDexClient>
instance to the construtor to log messages and errors.
Using REST APIs
To interact with REST APIs, simply call the awaitable methods in the client class:
// Creates an authenticated client
var client = new DueDexClient("YOUR_API_KEY", "YOUR_API_SECRET");
// Places a new order
var order = await client.NewLimitOrderAsync("BTCUSD", OrderSide.Long, 8000, 100);
// Cancels the order
await client.CancelOrderAsync("BTCUSD", order.OrderId);
Using WebSocket APIs
To interact with WebSocket streams, the application defines handlers to listen to events:
// Creates an authenticated client
var client = new DueDexClient("YOUR_API_KEY", "YOUR_API_SECRET");
// Defines an event handler
client.MatchesUpdated += (object sender, MatchesUpdatedEventArgs eventArgs) =>
{
foreach (var match in eventArgs.NewMatches)
Console.WriteLine($"New match in {match.Instrument}: {match.Size} contracts at price {match.Price}");
};
// Starts the WebSocket connection
client.Subscribe(ChannelType.Matches, "BTCUSD");
client.StartWebSocket();
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Microsoft.Extensions.Logging.Abstractions (>= 2.2.0)
- Newtonsoft.Json (>= 12.0.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.9.7 | 578 | 11/12/2020 |
1.9.6 | 511 | 7/28/2020 |
1.9.5 | 507 | 7/16/2020 |
1.9.4 | 579 | 7/8/2020 |
1.9.3 | 576 | 5/13/2020 |
1.9.2 | 539 | 5/13/2020 |
1.9.1 | 503 | 5/1/2020 |
1.9.0 | 617 | 1/12/2020 |
1.8.0 | 567 | 11/21/2019 |
1.7.0 | 568 | 11/20/2019 |
1.6.0 | 557 | 11/11/2019 |
1.5.0 | 603 | 9/22/2019 |
1.4.0 | 592 | 8/10/2019 |
1.3.0 | 557 | 7/29/2019 |
1.2.1 | 654 | 7/25/2019 |
1.2.0 | 627 | 7/20/2019 |
1.1.0 | 583 | 7/9/2019 |
1.0.0 | 601 | 6/13/2019 |