Skip to content

Repository files navigation

CSFloat Trading Bot

Automated tooling for scanning CSFloat listings, generating trade leads, and maintaining buy-order strategies.

Features

  • Scan a list of skins and score opportunities by EV + volume/sales heuristics.
  • Send Discord alerts for qualified opportunities.
  • Manage/reprice existing buy orders (autobid).
  • Scrape and build candidate skin lists from newest CSFloat listings.
  • Simple Flask dashboard for viewing local bid state.

Requirements

  • Python 3.10+
  • Install dependencies (recommended in a virtualenv):
pip install requests numpy flask discord-webhook selenium tqdm

For scraper/price_scraping.py, you also need a Chrome/Chromium webdriver.

Configuration

Create config.py (or copy from config.example.py):

API_URL = "https://csfloat.com/api/v1"
API_KEY_CSF = "YOUR_CSFLOAT_API_KEY"
COOKIE = ""  # optional ("session=..." or raw session value)
DISCORD_WEBHOOK_URL = "https://discord.com/api/webhooks/..."

REQUEST_TIMEOUT_SECONDS = 20
MIN_REQUEST_INTERVAL_SECONDS = 0.35
MAX_RETRIES = 4

Important:

  • config.py is gitignored.
  • Treat API_KEY_CSF as secret.

Primary Usage

1) Build/refresh candidate list from newest listings

python3 scraper/newest_market_scrape.py \
  --min-price 10 \
  --max-price 500 \
  --pages 6 \
  --delay 0.6 \
  --out-csv output/newest_10_500_candidates.csv \
  --out-list output/newest_10_500_candidates.txt

2) Run screener (single pass)

python3 screen.py --input output/newest_10_500_candidates.txt --output output/hits.csv

Useful screener flags:

  • --threshold, --min-price, --max-price
  • --strategy-delay, --min-similar-sales, --min-vol
  • --send-alert / --no-send-alert
  • --start-at, --n-iters, --loop-delay

3) Run autobid manager (live)

python3 -u bid.py --threshold 0.045 --delay 120

4) Run autobid in safe dry-run mode (no buy/cancel actions)

python3 -u bid.py --threshold 0.045 --delay 1 --max-cycles 1 --dry-run

File-by-File Usage Reference

  • screen.py: CLI entrypoint for screener.
    • Usage: python3 screen.py --input <path> [--output <path>] [--start-at N] [--n-iters N]
  • screener.py: Screener class (loads item list, executes strategy loop).
  • screener_config.py: Default screening thresholds and heuristic selection.
  • strategy/ArbitrageStrategy.py: Core opportunity logic and alert trigger conditions.
  • tools.py: CSFloat API client helpers, retries/rate-limit handling, listing/sales/order functions.
  • autobid/bidtools.py: Buy-order maintenance logic.
    • Key functions: autobid(...), try_update_buy_order(...), dry-run support.
  • bid.py: Autobid CLI runner (--threshold, --delay, --max-cycles, --dry-run).
  • visual.py: Discord webhook helpers (send_webhook, send_webhook_msg).
  • stats.py: Outlier removal helper (remove_outliers_iqr).
  • heuristics/harvey.py: Heuristic scoring functions (harvey, hamilton).
  • scraper/newest_market_scrape.py: Pull newest CSFloat listings and generate candidate files.
  • scraper/price_scraping.py: Selenium scraper for csgoskins.gg pricing by skin list.
  • scrape.py: Simple runner for price_scraping.py (expects data/relevant_skins.txt).
  • dashboard.py: Flask app exposing local bid state.
    • Run: python3 dashboard.py then open http://127.0.0.1:5000
  • templates/index.html: Dashboard template.
  • db/database.py: Lightweight JSON-backed local datastore utility.
  • clear_db.py: Clears local cache DB (db/cache).
  • config.example.py: Example configuration template.
  • autobid/orders.txt: Scratch/notes file (not required by runtime).
  • bids.json: Legacy/placeholder JSON file.
  • db/cache: Local cache store file.

Operational Notes

  • CSFloat API can rate-limit aggressively. Keep request delay conservative.
  • If you see repeated 429s, increase delays and reduce candidate set size.
  • send_alert=True sends Discord notifications but does not buy by itself.
  • Buy placement happens through add_buy_order paths (primarily autobid logic).

About

couter-strike skin arbitrage trading bot

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages