TarkovMarket.Net 1.2.2

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

// Install TarkovMarket.Net as a Cake Tool
#tool nuget:?package=TarkovMarket.Net&version=1.2.2                

TarkovMarket.NET

NuGet

C# wrapper for Escape from Tarkov API provided by https://tarkov-market.com

Note

The API is maintained and provided by tarkov-market.com and all credits go to them. This project just wraps the API for easy usage in C#.

Contribute

Feel free to contribute.

Installation

To add TarkovMarket.NET to your project, run the following command in the NuGet Package Manager Console:

Install-Package TarkovMarket.NET

Getting API key

You can get your API key from here: https://www.patreon.com/tarkov_market

Usage

Basic example, getting the price of the specified Item in German language.

var client = new TarkovMarketClient("api-key-here");
var response = await client.GetItemByNameAsync("ledx", Lang.German).ConfigureAwait(false);
var listItems = response.ItemsAsList;
Console.WriteLine($"{listItems[0].Name} Price: {listItems[0].Price}");

Basic example, getting all Items in default language(English)

var client = new TarkovMarketClient("api-key-here");
var response = await client.GetAllItemsAsync("ledx").ConfigureAwait(false);
File.WriteAllText("items.json", response.ItemsAsString);

Basic example, getting the tax of the specified Item.

var client = new TarkovMarketClient("api-key-here");
var response = await client.GetItemByNameAsync("ledx", Lang.German).ConfigureAwait(false);
var listItems = response.ItemsAsList;

// custom prices
var tax = Tax.Base(basePrice: 10000, price: 100000);

// target item
Console.WriteLine($"Tax: {listItems[0].Tax}\nTax With Int Center: {listItems[0].TaxWithIntCenter}");

Basic example, getting the items info from Raw BSG API

var client = new TarkovMarketClient("api-key-here");
var items = await client.GetBsgRawAsync().ConfigureAwait(false); // English only

foreach (var item in items)
{
    Console.WriteLine(item.Value.Props.Name);
    Console.WriteLine(item.Value.Props.Prefab?.Path); // Recommended to handle NullReferenceException or use Null-conditional operator
}
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 netcoreapp3.1 is compatible. 
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.3.0 730 5/20/2022
1.2.2 696 2/2/2021
1.2.1 714 12/2/2020
1.2.0 796 11/29/2020
1.1.1 724 11/29/2020
1.1.0 744 11/29/2020
1.0.4 691 11/28/2020
1.0.3 816 11/28/2020
1.0.2 844 11/28/2020