Skip to content

Steam market program with Telegram bot, returns data for average prices and quantities sold for given items and dates

Notifications You must be signed in to change notification settings

jstanczewski/steam_community_market

Repository files navigation

SteamMarket program with Telegram bot

This program requests data from Steam Market and calculates the average prices and quantities sold for given items for given dates.

What exactly does it do

data_gathering_for_custom_items.py first takes a game_id which the user wants to check the items for, then it sets cookies using STEAM_LOGIN_SECURE. This is a unique and private key, so the user has to provide their own key.
Then it initiates it and takes a list of items which the user wants the data for. The list is prefilled with 25 items from CS:GO so that the user knows what format the names must be in and can test the app quickly, but those can be easily edited.
After that item_prices() and item_quantity() functions are started, and they each send a request based on the game_id provided earlier. These functions use the SteamMarket library.
All the prices are averaged and quantities summed for every unique day.
Then some output is printed(average price today, percentage price change, etc.) and an fstring is returned(it's needed for the telegram_bot.py).
The program repeats itself in the loop for as long as there are items in the list, then finishes.

Telegram bot

telegram_bot.py once again takes the items' names list, an api_key for the Telegram bot, and a chat_id for the chat which we want to send the data in.
It then starts a loop, which takes the data from item_prices() and item_quantity() functions and transforms it into a url.
The url gets sent in a request, and the loop continues. The user can freely change the sleep() function's argument however They want.

Purpose of this program

The purpose is to automate the process of checking the price and quantity data for items on the Steam Market.
It's mainly useful to people who are interested in selling and/or buying items from the Steam Market.

About

Steam market program with Telegram bot, returns data for average prices and quantities sold for given items and dates

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages