DueDex 1.2.1

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

// Install DueDex as a Cake Tool
#tool nuget:?package=DueDex&version=1.2.1

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 519 11/12/2020
1.9.6 475 7/28/2020
1.9.5 473 7/16/2020
1.9.4 546 7/8/2020
1.9.3 543 5/13/2020
1.9.2 507 5/13/2020
1.9.1 470 5/1/2020
1.9.0 583 1/12/2020
1.8.0 531 11/21/2019
1.7.0 534 11/20/2019
1.6.0 522 11/11/2019
1.5.0 566 9/22/2019
1.4.0 560 8/10/2019
1.3.0 522 7/29/2019
1.2.1 618 7/25/2019
1.2.0 596 7/20/2019
1.1.0 550 7/9/2019
1.0.0 565 6/13/2019