| Type | Rule | Example |
|---|---|---|
| Absolute price | price <= X on market M | YouPin Redline FT under ¥140 |
| Cross-market spread | price_A / fx(A) - price_B / fx(B) > Y% | Skinport 8% above YouPin after fees |
| Percent move | change_24h <= -Z% | Dump alert on CSFloat |
| Phase-specific | Same as above + doppler_phase filter | Ruby Karambit only |
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
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
| Rule | Why |
|---|---|
Match doppler_phase | Phase 4 dip ≠ Ruby dip |
count >= 5 | Ignore single-listing noise |
| Stale check | Skip if updated_at older than 15 min on fast markets |
| Fee-adjusted spread | Raw price gap ≠ profit |
| One alert per crossing | Hysteresis 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
| Tool | Best for |
|---|---|
| Live Deals | Pre-computed cross-market gaps, no cron |
| Price Comparison | Saved market pairs + ROI filters |
| Chrome extension Pro | Price alerts while browsing listings |
| Trending | 24h movers without custom rules |
Guide
Production checklist
- Discord testkey or dashboard API key
- Quickstart — verify auth
- Log
updated_atper row — freshness matters - Handle partial POST failures (per-item errors if returned)
- 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.