Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

CS2 Trade History Scrapers

A collection of standalone Python scripts that fetch your trade history from CS2 skin marketplaces and export it to CSV.

Each sub-folder is an independent project with its own dependencies and configuration.

Project Platform Auth method Currency
csfloat/ CSFloat Session cookie USD
buff163/ Buff163 Cookie string CNY to USD
dmarket/ DMarket API headers USD
lisskins/ Lis-Skins Cookie string + User-Agent USD

Quick start

Each scraper follows the same three-step flow:

  1. Install: create a venv and install requirements.txt
  2. Configure: copy .env.example to .env and paste your credentials
  3. Run: python scraper.py

Output is a CSV file in the same directory as the script.


csfloat/

Fetches all verified trades via the CSFloat REST API.

Setup:

cd csfloat
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env   # fill in CSFLOAT_SESSION

Run:

python scraper.py

Output: csfloat_history.csv


buff163/

Scrapes buy and sell order history pages from Buff163. CNY prices are converted to USD via a live exchange rate API.

Setup:

cd buff163
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env   # fill in BUFF_COOKIE

Run:

python scraper.py

Output: buff163_history.csv


dmarket/

Fetches trade history from the DMarket exchange API using offset-based pagination.

Setup:

cd dmarket
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env   # fill in DMARKET_AUTH, DMARKET_JKKAT, DMARKET_PAYMENT_SESSION_ID

Run:

python scraper.py

Output: dmarket_history.csv


lisskins/

Scrapes the Lis-Skins profile history page using Chrome browser impersonation (curl_cffi) to bypass bot detection. Account currency must be set to USD.

Setup:

cd lisskins
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env   # fill in LISSKINS_COOKIE and LISSKINS_USER_AGENT

Run:

python scraper.py

Output: lisskins_history.csv


Requirements

  • Python 3.10+
  • Internet access (to reach marketplace APIs and exchange rate APIs)

CSV output format

Column CSFloat Buff163 DMarket Lis-Skins
date βœ“ βœ“ βœ“ βœ“
item_name βœ“ βœ“ βœ“ βœ“
action buy/sell buy/sell buy/sell buy/sell
price_usd βœ“ converted from CNY βœ“ βœ“
original_price βœ“ CNY amount βœ“ n/a
original_currency USD CNY USD n/a
external_id βœ“ βœ“ βœ“ βœ“

About

πŸ”« Python scrapers for CS2 skin marketplace trade history

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Contributors

Languages