#steam #trading #networking #api-calls #confirmation #tradeoffer

steam-trading

Create, accept and deny trade offers without your mobile device

3 releases (breaking)

0.6.0 Feb 7, 2024
0.5.0 Jun 10, 2022
0.4.2 Nov 12, 2021

#830 in Network programming

Download history 5/week @ 2024-02-04 10/week @ 2024-02-18 22/week @ 2024-02-25 1/week @ 2024-03-03 43/week @ 2024-03-24 29/week @ 2024-03-31

72 downloads per month

MIT license

16MB
8K SLoC

Steam-Trading

Crate version on crates.io Crate documentation on docs.rs Crate license

This library provides functionality regarding Steam Trade.

You can create accept, deny and create new trade offers, and in the future automatically keep track of statuses changes of offers through auto managed API calls.

This will include getting new Assetids after the trade is complete among other features.

To use it, add this to your Cargo.toml:

[dependencies.steam-trading]
version = "^0.4"

Implemented

  • Abstractions of Trade Offers, and assets to make offers easy to use;
  • Create and send a new trade offer;
  • Accept and Deny trade offers;

lib.rs:

Steam trade manager is the module that allows you to automate trade offers, by extending SteamAuthenticator.

It inherently needs SteamAuthenticator as a dependency, since we need cookies from Steam Community and Steam Store to be able to create and accept trade offers, along with mobile confirmations.

IT IS VERY IMPORTANT THAT STEAM GUARD IS ENABLED ON THE ACCOUNT BEING USED, WITH MOBILE CONFIRMATIONS.

Currently, SteamAuthenticator is "stateless", in comparison of alternatives such as Node.js. This means that it does not need to stay up running and react to events.

But this also means that you will need to keep track of trades and polling yourself, but it won't be much work, since there are convenience functions for almost every need.

Perhaps the event based trading experience will be an extension someday, but for now this works fine.

Compiles on stable Rust.

Dependencies

~47–64MB
~1M SLoC