A command-line tool to calculate the total value of your Steam Market transactions. This utility fetches your Steam Market history and calculates the total value of all your transactions along with providing insights into your most valuable sold items
- Node.js (v14 or higher)
- pnpm (or npm/yarn)
-
Clone the repository:
git clone https://github.com/zevnda/steam-market-history.git cd steam-market-history -
Install dependencies:
pnpm install
-
Build the project:
pnpm build
Run the CLI using:
pnpm startYou can customize the behavior with the following command-line flags:
Usage: pnpm start [options]
Options:
--help Display this help output
--verbose Enable verbose logging for debugging
--top=N Display top N most valuable transactions (default: 10)
--output=PATH Save all transaction data to specified JSON file
Examples:
pnpm start
pnpm start --verbose
pnpm start --top=20
pnpm start --output=data/export.json
pnpm start --top=15 --output=results.json --verbose
The application requires authentication to access your Steam Market history. You'll need to provide the following cookies from your Steam session:
sessionidsteamLoginSecure
And optionally:
steamMachineAuth(if present in cookies list)steamParental(if you have Steam Family View enabled)
- Go to https://steamcommunity.com/ and sign in
- Open the browser Developer Tools (F12)
- Navigate to the Application (Chrome) or Storage (Firefox) tab
- Find Cookies in the left panel and select the
steamcommunity.comdomain - Find and copy the values for the required cookies
The application offers to save your authentication details in a .env file for future use. These details are stored locally and are not uploaded anywhere
Note: The .env file contains sensitive information. Do not share it with others or commit it to version control
To use saved authentication:
- When prompted, type
yto use existing saved authentication - To use new credentials instead, type
n
To delete saved authentication:
- If authentication fails with saved data, you'll be offered to delete the saved data
- Type
yto delete the saved authentication details
- The tool uses your Steam authentication cookies to access your market history
- It makes a GET request to
https://steamcommunity.com/market/myhistory - It paginates through the results to get all available market history pages (500 items per request)
- For each page, it parses the
results_htmlproperty to extract item names and prices - The results are aggregated, sorted by value and displayed to the user
- Make sure you've copied the correct cookie values
- You must get the cookie values from
https://steamcommunity.com/and nothttps://store.steampowered.com/
- You must get the cookie values from
- Cookies expire periodically, so you may need to get fresh values
- If using saved authentication that no longer works, delete it when prompted
- Steam may rate-limit requests if you have a very large market history
- The tool adds a 3-second delay between requests to mitigate this but it's not a perfect solution
- If you encounter rate limiting, try again later
Copyright © 2025 zevnda — GPL-3.0 License