Paribu.Api 1.0.0

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

// Install Paribu.Api as a Cake Tool
#tool nuget:?package=Paribu.Api&version=1.0.0

Paribu.Api

A .Net wrapper for the Paribu API, including all features the API provides using clear and readable objects.

If you think something is broken, something is missing or have any questions, please open an Issue

Donations

Donations are greatly appreciated and a motivation to keep improving.

BTC: 33WbRKqt7wXARVdAJSu1G1x3QnbyPtZ2bH
ETH: 0x65b02db9b67b73f5f1e983ae10796f91ded57b64
USDT (TRX): TXwqoD7doMESgitfWa8B2gHL7HuweMmNBJ

Installation

Nuget version Nuget downloads Available on Nuget.

PM> Install-Package Paribu.Api

To get started with Paribu.Api first you will need to get the library itself. The easiest way to do this is to install the package into your project using NuGet. Using Visual Studio this can be done in two ways.

Using the package manager

In Visual Studio right click on your solution and select 'Manage NuGet Packages for solution...'. A screen will appear which initially shows the currently installed packages. In the top bit select 'Browse'. This will let you download net package from the NuGet server. In the search box type 'Paribu.Api' and hit enter. The Paribu.Api package should come up in the results. After selecting the package you can then on the right hand side select in which projects in your solution the package should install. After you've selected all project you wish to install and use Paribu.Api in hit 'Install' and the package will be downloaded and added to you projects.

Using the package manager console

In Visual Studio in the top menu select 'Tools' → 'NuGet Package Manager' → 'Package Manager Console'. This should open up a command line interface. On top of the interface there is a dropdown menu where you can select the Default Project. This is the project that Paribu.Api will be installed in. After selecting the correct project type Install-Package Paribu.Api in the command line interface. This should install the latest version of the package in your project.

After doing either of above steps you should now be ready to actually start using Paribu.Api.

Getting started

After installing it's time to actually use it. To get started we have to add the Paribu.Api namespace: using Paribu.Api;.

Paribu.Api provides two clients to interact with the Paribu API. The ParibuRestClient provides all rest API calls. The ParibuStreamClient provides functions to interact with the websocket provided by the Paribu API. Both clients are disposable and as such can be used in a usingstatement.

Rest Api Examples

Public Endpoints

// Rest Api Client
var api = new ParibuClient();

/* Public Endpoints */
var p01 = await api.GetInitialsAsync();
var p02 = await api.GetTickersAsync();
var p03 = await api.GetMarketDataAsync("btc-tl");
var p04 = await api.GetChartDataAsync("btc-tl");
var p05 = await api.RegisterAsync("John Doe", "a@b.com", "532XXXXXXX", "Pa55w0rd");
var p06 = await api.RegisterTwoFactorAsync(p05.Data.Token, "---CODE---");
var p07 = await api.LoginAsync("532XXXXXXX", "Pa55w0rd");
var p08 = await api.LoginTwoFactorAsync(p07.Data.Token, "---CODE---");
api.SetAccessToken(p08.Data.Token);
            
/* Private Endpoints */
var p11 = await api.GetUserInitialsAsync();
var p12 = await api.GetOpenOrdersAsync();
var p13 = await api.PlaceOrderAsync("usdt-tl", OrderSide.Sell, OrderType.Limit, 110.0m, 10.0m, 11.0m);
var p14 = await api.CancelOrderAsync("j1kwxq9l-eyr6-7yzg-ogkd-6gp843dzvn5o");
var p15 = await api.CancelOrdersAsync("usdt-tl");
var p16 = await api.CancelOrdersAsync("all");
var p21 = await api.GetAlertsAsync();
var p22 = await api.SetAlertAsync("usdt-tl", 9.25m);
var p23 = await api.SetAlertAsync("usdt-tl", 10.25m);
var p24 = await api.SetAlertAsync("btc-tl", 620000m);
var p25 = await api.SetAlertAsync("btc-tl", 660000m);
var p26 = await api.CancelAlertAsync("1z4r65mv-qe3l-29oj-l40d-278ydpnxj90g");
var p27 = await api.CancelAlertsAsync("eth-tl");
var p28 = await api.CancelAlertsAsync("all");
var p31 = await api.GetBalancesAsync();
var p32 = await api.GetDepositAddressesAsync();
var p33 = await api.WithdrawAsync("tl", 1000.0m, "---IBAN---");
var p34 = await api.WithdrawAsync("usdt", 100.0m, "---USDT-ADDRESS---", "", "trx");
var p35 = await api.CancelWithdrawalAsync(p34.Data.Id);

Websocket Api Examples

The Paribu.Api socket client provides several socket endpoint to which can be subscribed.

Core » Public Feeds

var ws = new ParibuStreamClient();
/* Tickers */
var sub01 = await ws.SubscribeToTickersAsync((data) =>
{
    if (data != null)
    {
        Console.WriteLine($"Ticker State >> {data.Symbol} " +
            (data.Open.HasValue ? $"O:{data.Open} " : "") +
            (data.High.HasValue ? $"H:{data.High} " : "") +
            (data.Low.HasValue ? $"L:{data.Low} " : "") +
            (data.Close.HasValue ? $"C:{data.Close} " : "") +
            (data.Volume.HasValue ? $"V:{data.Volume} " : "") +
            (data.Change.HasValue ? $"CH:{data.Change} " : "") +
            (data.ChangePercent.HasValue ? $"CP:{data.ChangePercent} " : "") +
            (data.Average24H.HasValue ? $"Avg:{data.Average24H} " : "") +
            (data.VolumeQuote.HasValue ? $"G:{data.VolumeQuote} " : "") +
            (data.Bid.HasValue ? $"Bid:{data.Bid} " : "") +
            (data.Ask.HasValue ? $"Ask:{data.Ask} " : "") +
            (data.EBid.HasValue ? $"EBid:{data.EBid} " : "") +
            (data.EAsk.HasValue ? $"EAsk:{data.EAsk} " : "")
            );
    }
}, (data) =>
{
    if (data != null)
    {
        Console.WriteLine($"Ticker Prices >> {data.Symbol} C:{data.Prices.Count()} P:{string.Join(',', data.Prices)}");
    }
});

/* Order Book & Trades */
var sub02 = await ws.SubscribeToMarketDataAsync("btc-tl", (data) =>
{
    if (data != null)
    {
        Console.WriteLine($"Book Update >> {data.Symbol} " +
            $"AsksToAdd:{data.AsksToAdd.Count} " +
            $"BidsToAdd:{data.BidsToAdd.Count} " +
            $"AsksToRemove:{data.AsksToRemove.Count} " +
            $"BidsToRemove:{data.BidsToRemove.Count} "
            );
    }
}, (data) =>
{
    if (data != null)
    {
        Console.WriteLine($"New Trade >> {data.Symbol} T:{data.Timestamp} P:{data.Price} A:{data.Amount} S:{data.Side}");
    }
});

// Unsubscribe
_ = ws.Unsubscribe(sub01.Data);
_ = ws.Unsubscribe(sub02.Data);

Release Notes

  • Version 1.0.0 - 26 Mar 2023
    • First Release
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 is compatible. 
.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.2.2 7,797 2/22/2024
1.2.1 7,583 2/12/2024
1.2.0 12,024 12/17/2023
1.1.5 420 12/16/2023
1.1.1 752 5/1/2023
1.1.0 625 5/1/2023
1.0.0 734 3/26/2023

Version 1.0.0 - 26 Mar 2023