Build with the API

How to Build a CS2 Skin Price Alert Bot

Poll POST /v1/prices/latest on a schedule, track (market_hash_name, doppler_phase) state, fire alerts on threshold crossings with hysteresis — or skip code and use Live Deals + the Chrome extension.

Quick start

Copy-paste curl example

Authenticate with your Bearer API key. Full reference in the API docs and data coverage.

curl -s -X POST "https://api.cspriceapi.com/v1/prices/latest" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "items": [
      "AK-47 | Redline (Field-Tested)",
      "M4A1-S | Printstream (Field-Tested)"
    ],
    "markets": "youpin,skinport,csfloat"
  }'

Overview

Alert types that work

TypeRuleExample
Absolute priceprice <= X on market MYouPin Redline FT under ¥140
Cross-market spreadprice_A / fx(A) - price_B / fx(B) > Y%Skinport 8% above YouPin after fees
Percent movechange_24h <= -Z%Dump alert on CSFloat
Phase-specificSame as above + doppler_phase filterRuby Karambit only

Guide

Architecture

┌─────────────┐     every N min      ┌──────────────────┐
│  Scheduler  │ ──────────────────► │ POST /v1/prices/  │
│  (cron)     │                     │ latest (≤100)     │
└─────────────┘                     └────────┬─────────┘
                                           │
                                           ▼
                                  ┌──────────────────┐
                                  │ State store      │
                                  │ prev price, phase│
                                  └────────┬─────────┘
                                           │
              crossing detected            ▼
                                  ┌──────────────────┐
                                  │ Discord / TG /   │
                                  │ webhook          │
                                  └──────────────────┘

Respect plan rate limits. Batch up to 100 items per POST.

Guide

Poll example

curl -s -X POST "https://api.cspriceapi.com/v1/prices/latest" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "items": [
      "AK-47 | Redline (Field-Tested)",
      "M4A1-S | Printstream (Field-Tested)"
    ],
    "markets": "youpin,skinport,csfloat"
  }'

Guide

Crossing logic (with hysteresis)

Avoid alert spam when price oscillates ±0.5%:

def crossed_below(prev: float | None, curr: float, threshold: float, hysteresis: float = 0.005) -> bool:
    if prev is None:
        return curr <= threshold
    # Fire when crossing down through threshold; reset when clearly above
    if prev > threshold >= curr:
        return True
    if curr > threshold * (1 + hysteresis):
        return "reset"  # allow re-arm
    return False

Store armed per (name, phase, market, rule_id).

Guide

Discord webhook (minimal)

import requests

def notify_discord(webhook_url: str, content: str) -> None:
    requests.post(webhook_url, json={"content": content}, timeout=10)

# Example message
msg = (
    "🔔 **AK-47 | Redline (FT)** YouPin ¥138.50 "
    "(crossed below ¥140)\n"
    "Skinport: €17.90 | CSFloat: $124\n"
    "<https://cspriceapi.com/apps/pricecomparison>"
)
notify_discord("https://discord.com/api/webhooks/...", msg)

Guide

Rules that prevent false alerts

RuleWhy
Match doppler_phasePhase 4 dip ≠ Ruby dip
count >= 5Ignore single-listing noise
Stale checkSkip if updated_at older than 15 min on fast markets
Fee-adjusted spreadRaw price gap ≠ profit
One alert per crossingHysteresis re-arm

Guide

Buy-order alerts (exit price)

Monitor YouPin bids for "someone wants to buy above X":

curl -s "https://api.cspriceapi.com/v1/prices/youpin/buyorder" \
  -H "Authorization: Bearer YOUR_API_KEY"

Compare top bid movement vs your inventory fair value.

Guide

No-code alternatives

ToolBest for
Live DealsPre-computed cross-market gaps, no cron
Price ComparisonSaved market pairs + ROI filters
Chrome extension ProPrice alerts while browsing listings
Trending24h movers without custom rules

Guide

Production checklist

  1. Discord testkey or dashboard API key
  2. Quickstart — verify auth
  3. Log updated_at per row — freshness matters
  4. Handle partial POST failures (per-item errors if returned)
  5. Backtest thresholds on history before live alerts

Related

Continue reading

More guides

Related Build with the API

Ready to integrate?

Interactive Scalar docs, OpenAPI YAML and machine-readable Markdown mirrors for every endpoint.