How prices are calculatedCSGOTrader mostly relies on Steam Community Market historical sales data to calculate it's prices. If there is no market data it uses other providers, the whole algorithm is described in plain english below. If you prefer to read the Python code itself you can scroll through this. For popular items with stable market sales it's pretty simple.
- A, If there is more than 5 sold in the past 24 hours and the average price does not differ more than 10% from the past week's average this is what the extension takes as the price of the item. This is the case for most popular items.
- B, If that is not the case the extension takes the last week's average and adjusts it with the general market trend of the last week.
- C, If there were more than 5 sales during the last week and the difference between that and the last month's average is less than 10% this average is taken and used as the price after it gets adjusted by general market trends.
- D, When there is less than 5 sold in the past week or there is no weekly data at all the monthly average is taken after adjusted with market trends.
- E, If there is pricing info on CS.MONEY it takes that price and adjusts with the average difference between CS.MONEY and market prices.
- F, If there is no CS.MONEY price it tries taking the Bitskins price and adjusts with the average difference between Bitskins and market prices.
- G, If there is no Bitskins price it takes a price from a database table where prices are set manually. This is pretty much unused for now. I have built this functionality so I can add prices for new items when there is no data from the providers yet.
- H, If all of the above doesn't happen then the extension does not set any price to the item.
- I, Doppler and Gamma doppler knives have special pricing, if there is price info for the given phase for the knife on CS.MONEY, it takes that price and adjusts with the average difference between CS.MONEY and market prices. If there isn't it falls back to the price calculated by the algorithm above.
Architecture - How the prices are scrapped, processed, stored and served
It all happens on AWS. There is a python script that is responsible for price scraping and another one that updates exchange rates. The price scrapper script runs daily at 3AM UTC. The exchange rates update every 3 hours. Both of these Lambda functions are triggered by CloudWatch events and are executed in a Python 3.7 environment. The pricing script scrapes prices from steamapis.com, CS.MONEY, BITSKINS.COM, LOOT.FARM and CSGO.TM then the extension calculates it's own pricing with the algorithm described above. The pricing data is stored in an S3 Bucket and made available and distributed around the world under the prices.csgotrader.app domain by Cloudfront.
The latest prices are always available at:
and each days pricing is archived in a path like: