DueDex 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package DueDex --version 1.0.0
NuGet\Install-Package DueDex -Version 1.0.0
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="DueDex" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DueDex --version 1.0.0
#r "nuget: DueDex, 1.0.0"
#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 DueDex as a Cake Addin
#addin nuget:?package=DueDex&version=1.0.0

// Install DueDex as a Cake Tool
#tool nuget:?package=DueDex&version=1.0.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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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 528 11/12/2020
1.9.6 476 7/28/2020
1.9.5 475 7/16/2020
1.9.4 548 7/8/2020
1.9.3 545 5/13/2020
1.9.2 508 5/13/2020
1.9.1 470 5/1/2020
1.9.0 585 1/12/2020
1.8.0 532 11/21/2019
1.7.0 535 11/20/2019
1.6.0 523 11/11/2019
1.5.0 568 9/22/2019
1.4.0 561 8/10/2019
1.3.0 523 7/29/2019
1.2.1 620 7/25/2019
1.2.0 596 7/20/2019
1.1.0 551 7/9/2019
1.0.0 566 6/13/2019