Skip to Content
CSGOWINAPI
For creators and streamers

Build on your CSGOWIN code

Your leaderboard, raffles and referral figures as JSON - for a stream overlay, a chat bot or your own site.

API v2 adds giveaways, cases, promo codes and daily figures - and, if you choose, tools that act for you Coming soon

It is not open yet. The v1 endpoints below work today and keep working after v2 opens - start with them if you need something running now.

What you can build

A leaderboard overlayYour live board and its standings, on stream or on your own site.

Works today on API v1 Reference →

Raffles and past periodsRaffle winners, entries and tickets, and the final standings of every past period.

Works today on API v1 Reference →

A referral dashboardYour referrals, deposits, wagers and commission - in total, per day or per month.

Works today on API v1 Reference →

Promo code trackingThe promo codes on your code and how often they are used each day.

API v2Coming soon Reference →

Giveaways from your botShow the giveaways you host, or let a bot host one from your balance.

API v2Coming soon Reference →

Cases and schedulesShow your cases and their items, create or remove a case, and schedule your next leaderboard periods.

API v2Coming soon Reference →

Quick start

API v2

Coming soon

API v2 is not open yet - every request to it answers 404 until it launches, and the details on this page may still change. Build on API v1 today - it keeps working. New keys and a one-step switch will arrive with v2.

Replace YOUR_V2_KEY and YOUR_CODE, then paste into a terminal.

Your leaderboard

GET/leaderboards/{code}Full reference →

Your board, ready for a stream overlay or a page: live and recent periods with their standings, and the embed address. It needs no key.

Request

curl "https://api.csgowin.com/api/v2/leaderboards/YOUR_CODE"

Response

{
  "code": "YOUR_CODE",
  "periods": [
    {
      "periodId": 50,
      "status": "live",
      "startsAt": "2026-11-09T00:00:00.000Z",
      "endsAt": "2026-11-16T00:00:00.000Z",
      "prizes": [60, 40],
      "standings": [
        { "place": 1, "name": "example_player_one", "wagered": 1250.5, "prize": 60 }
      ]
    }
  ]
}

What you will hit first

404{ "error": { "code": "not_found", "message": "..." } }The code does not exist or has no leaderboard, or API v2 is not open.
429{ "error": { "code": "rate_limited", "message": "..." } }More than 60 requests a minute from one address. Wait Retry-After seconds.

Your referral totals

GET/affiliates/{code}/summaryFull reference →

Your code's totals and commission, read with your v2 key. Amounts are in coins by default - add ?currency=EUR (or USD, GBP) for the site's other currencies.

Request

curl "https://api.csgowin.com/api/v2/affiliates/YOUR_CODE/summary" \
  -H "x-apikey: YOUR_V2_KEY"

Response

{
  "code": "YOUR_CODE",
  "referrals": 120,
  "activeReferrals": 14,
  "wagered": 18250.4,
  "deposited": 5300,
  "commission": { "earned": 91.25, "claimed": 60, "claimable": 31.25 }
}

What you will hit first

401{ "error": { "code": "legacy_key", "message": "..." } }That is a v1 key. Switch to API v2 in Profile > Affiliates > API key and use the v2 key.
401{ "error": { "code": "invalid_key", "message": "..." } }The key is unknown or revoked, or the code is not one of yours.

Host a giveaway

POST/creators/{code}/giveawaysFull reference →

An action: it takes the prize from your balance at once. It needs a key with Let tools act for me on, and an Idempotency-Key that is new for every giveaway. Replace YOUR_END_TIME with the time entries close, from 1 minute to 31 days ahead, written as YYYY-MM-DDTHH:MM:SSZ in UTC.

Request

curl -X POST "https://api.csgowin.com/api/v2/creators/YOUR_CODE/giveaways" \
  -H "x-apikey: YOUR_V2_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"prize":50,"winners":1,"endsAt":"YOUR_END_TIME","name":"Friday giveaway"}'

Response

{
  "giveawayId": 1234,
  "prize": 50,
  "winners": 1,
  "endsAt": "YOUR_END_TIME",
  "url": "https://csgowin.com/giveaways?id=1234",
  "actionId": 9876,
  "spentToday": 50,
  "dailyLimit": 100
}

What you will hit first

403{ "error": { "code": "actions_not_enabled", "message": "..." } }The key does not have Let tools act for me on.
429{ "error": { "code": "daily_limit_reached", "message": "..." } }The prize would take today's spend over your daily limit. It resets at 00:00 UTC.

API v1

API v1 (legacy) - these endpoints work today and keep working. Get your v1 key and send it as x-apikey from your server or bot - never from a page your viewers load. Referral stats are opt-in per code. How the opt-in works →

Replace YOUR_API_KEY and YOUR_CODE, then paste into a terminal.

Your leaderboard

GET/leaderboard/{code}Full reference →

The live and recently ended leaderboard periods on your code, ranked - what a stream overlay or your own site shows. Prizes are in USD.

Request

curl "https://api.csgowin.com/api/leaderboard/YOUR_CODE" \
  -H "x-apikey: YOUR_API_KEY"

Response

{
  "leaderboards": [
    {
      "id": 10,
      "periodId": 42,
      "active": true,
      "dateStart": "2025-03-01T00:00:00.000Z",
      "dateEnd": "2025-03-08T00:00:00.000Z",
      "prizes": [100, 50, 25],
      "users": [
        { "name": "example_player_one", "rank": "gold", "wagered": 500, "prize": 100 }
      ]
    }
  ]
}

What you will hit first

400{ "error": "requested leaderboard not found" }No leaderboard runs on this code yet, or the code is mistyped.
200{ "leaderboards": [...], "viewerOnCode": false }A wrong key is not refused here: you get the public view. A viewerOnCode field means your key was not used.

Your raffles

GET/leaderboard/{code}/raffleFull reference →

The latest raffle periods on your code with their winners. take is 1 to 20, 3 when left out.

Request

curl "https://api.csgowin.com/api/leaderboard/YOUR_CODE/raffle?take=3" \
  -H "x-apikey: YOUR_API_KEY"

Response

{
  "raffles": [
    {
      "id": 10,
      "periodId": 38,
      "active": false,
      "paid": true,
      "prizes": [5000, 3000, 2000],
      "users": [
        { "name": "example_player_two", "rank": "silver", "wagered": 120000, "prize": 5000 }
      ]
    }
  ]
}

What you will hit first

400{ "error": "requested leaderboard not found" }The key does not belong to this code.
400{ "error": "user not logged in (get leaderboard raffles)" }The x-apikey header is missing: without it the endpoint expects a signed-in site session.

Your referral stats

GET/affiliate/externalFull reference →

Every player on your code with what they deposited, wagered and earned you. Amounts are in coins by default - add &currency=EUR (or USD, GBP) for the site's other currencies.

Request

curl "https://api.csgowin.com/api/affiliate/external?code=YOUR_CODE&take=10" \
  -H "x-apikey: YOUR_API_KEY"

Response

{
  "success": true,
  "count": 1,
  "take": 10,
  "data": [
    {
      "name": "example_player_one",
      "uuid": "example-player-id",
      "level": 5,
      "deposited": 10,
      "wagered": 25,
      "commission": 0.5,
      "createdAt": "2023-01-15T08:30:00.000Z"
    }
  ]
}

What you will hit first

401{ "error": "affiliate not found" }The key does not belong to this code. A wrong key and an unknown code answer the same on purpose.
401{ "error": "External API not enabled for this affiliate, ..." }The key is right but this endpoint is opt-in per code and still off for yours - ask Live Support on csgowin.com, giving your affiliate code. How the opt-in works →