SteamMarketSDK.Core.SteamGuard
1.0.1
See the version list below for details.
dotnet add package SteamMarketSDK.Core.SteamGuard --version 1.0.1
NuGet\Install-Package SteamMarketSDK.Core.SteamGuard -Version 1.0.1
<PackageReference Include="SteamMarketSDK.Core.SteamGuard" Version="1.0.1" />
paket add SteamMarketSDK.Core.SteamGuard --version 1.0.1
#r "nuget: SteamMarketSDK.Core.SteamGuard, 1.0.1"
// Install SteamMarketSDK.Core.SteamGuard as a Cake Addin #addin nuget:?package=SteamMarketSDK.Core.SteamGuard&version=1.0.1 // Install SteamMarketSDK.Core.SteamGuard as a Cake Tool #tool nuget:?package=SteamMarketSDK.Core.SteamGuard&version=1.0.1
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
- Newtonsoft.Json (>= 13.0.3)
- SteamKit2 (>= 2.5.0)
- SteamMarketSDK.Core.Contracts (>= 1.0.1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on SteamMarketSDK.Core.SteamGuard:
Package | Downloads |
---|---|
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.