SteamMarketSDK.Common 1.0.0

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

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

SteamMarketSDK

Here is the library which you can use to interact with your account on SteamCommunity.

2-Factor

First of all you have to get your 2-factor authorization data. You can get it here by SteamDesktopAuthenticator

It's time to create your SteamClient. Now you need to open your maFile and copy your secrets to SteamGuardAuthenticator when you create an instance.

		var serializedSteamGuard = Configuration["steamGuard"];

		ISteamGuardAuthenticator? steamGuardAuthenticator =
			JsonSerializer.Deserialize<SteamGuardAuthenticator>(serializedSteamGuard);

		var httpClientHandler = new HttpClientHandler
		{
			CookieContainer = new CookieContainer(),
			UseCookies = true,
			AutomaticDecompression = DecompressionMethods.All
		};

		var steamHttpClient = new SteamHttpClient(httpClientHandler, new StemConverter(), true);
		if (!Configuration["username"].IsNullOrEmpty() && !Configuration["password"].IsNullOrEmpty())
		{
			var steamAuthCredentials = new SteamAuthCredentials
			{
				Login = Configuration["username"] ?? throw new InvalidOperationException(),
				Password = Configuration["password"] ?? throw new InvalidOperationException(),
				MachineName = Configuration["machineName"] ?? $"PrettyPC-{Guid.NewGuid()}"
			};

			steamHttpClient
				.AuthorizeViaOAuthAsync(steamAuthCredentials, steamGuardAuthenticator, CancellationToken.None)
				.GetAwaiter().GetResult();
		}
        
        //here is you have authorized HTTPClient

To be honest you don't need use an authorized client for all operations, but some of them will not work without it. When your HttpClient is ready you can put in any Wrapper you want.

IMarketWrapper MarketWrapper = new MarketWrapper(steamHttpClient);

Here is a list of supporting functions:

	Task<CancelBuyOrderResponse> CancelBuyOrderAsync(long buyOrderId, CancellationToken cancellationToken);

	Task<bool> CancelSellOrderAsync(long listingId, CancellationToken cancellationToken);

	Task<CreateBuyOrderResponse> CreateBuyOrderAsync(CreateBuyOrderRequest createBuyOrderRequest,
		CancellationToken cancellationToken);

	Task<CreateSellOrderResponse> CreateSellOrderAsync(CreateSellOrderRequest createSellOrderRequest,
		CancellationToken cancellationToken);

	Task<AccountInfoResponse> GetAccountInfoAsync(CancellationToken cancellationToken);

	Task<BuyOrderStatusResponse> GetBuyOrderStatusAsync(long buyOrderId, CancellationToken cancellationToken);

	Task<long> GetItemNameIdAsync(long appId, string marketHashName, CancellationToken cancellationToken);

	Task<ItemOrdersActivityResponse> GetItemOrdersActivityAsync(long itemNameId, long currency,
		string language = "english", string country = "US", CancellationToken cancellationToken = default);

	Task<MyListingsResponse> GetListingsAsync(long offset, long count, CancellationToken cancellationToken);

	Task<PriceHistoryResponse> GetPriceHistoryAsync(long appId, string marketHashName,
		CancellationToken cancellationToken);

	Task<PriceOverviewResponse> GetPriceOverviewAsync(PriceOverviewRequest priceRequest,
		CancellationToken cancellationToken);

	Task<MyHistoryResponse> GetTradeHistoryAsync(long offset, long count, CancellationToken cancellationToken);

Other contracts you can find in Contracts → Interfaces

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on SteamMarketSDK.Common:

Package Downloads
SteamMarketSDK.Contracts

Here is the library which you can use to interact with your Steam Account on SteamCommunity. Get your inventory, prices on market, create a purschase request etc

SteamMarketSDK.Core

Here is the library which you can use to interact with your Steam Account on SteamCommunity. Get your inventory, prices on market, create a purschase request etc

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.2 114 10/15/2024
1.0.1 108 9/26/2024
1.0.0 128 9/22/2024