SteamMarketSDK.Core.Contracts
1.0.2
dotnet add package SteamMarketSDK.Core.Contracts --version 1.0.2
NuGet\Install-Package SteamMarketSDK.Core.Contracts -Version 1.0.2
<PackageReference Include="SteamMarketSDK.Core.Contracts" Version="1.0.2" />
paket add SteamMarketSDK.Core.Contracts --version 1.0.2
#r "nuget: SteamMarketSDK.Core.Contracts, 1.0.2"
// Install SteamMarketSDK.Core.Contracts as a Cake Addin #addin nuget:?package=SteamMarketSDK.Core.Contracts&version=1.0.2 // Install SteamMarketSDK.Core.Contracts as a Cake Tool #tool nuget:?package=SteamMarketSDK.Core.Contracts&version=1.0.2
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 | Versions 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. |
-
net8.0
- SteamKit2 (>= 2.5.0)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on SteamMarketSDK.Core.Contracts:
Package | Downloads |
---|---|
SteamMarketSDK.Core.SteamGuard
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 |
|
SteamMarketSDK
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.