A board's raffles with their entries and tickets
API v2 - coming soon.
Coming soon
Needs your v2 key
401 legacy_key. How to get a v2 keyThe newest started raffles of the code's board: each entry's tickets and prize, and whether the prizes are paid. include adds the account ids, exchanged, xpBonus and xpLeft to the entries.
Rate limits: 60 reads a minute per IP across /api/v2 and at most 25 to one path in 2 seconds (429 with Retry-After), and 60 a minute per account across its keyed reads.
partnerKeyx-apikey<token>Your API v2 key (cgw2_...)
code*stringThe affiliate code (letter case ignored)
1 <= length <= 191limit?integerRaffles, newest first, 1 to 20
1 <= value <= 203include?stringFields to add to each row, comma-separated: uuid, exchanged, xpBonus, xpLeft. Absent: none
^(uuid|exchanged|xpBonus|xpLeft)(,(uuid|exchanged|xpBonus|xpLeft))*$currency?stringThe currency of the answer's amounts: COINS (the default, the answer as it always was) or USD, EUR or GBP, converted at the rate the site shows and rounded to two decimals as the site writes them. Anything else is a 400 unknown_currency.
"COINS""COINS""USD""EUR""GBP"OK
application/json- response
raffles*array<>currency?What the amounts were converted to, when currency was USD, EUR or GBP. Absent for coins
curl "https://api.csgowin.com/api/v2/leaderboards/YOUR_CODE/raffles" \ -H "x-apikey: YOUR_V2_KEY"{ "raffles": [ { "periodId": 52, "status": "ended", "startsAt": "2026-11-01T00:00:00.000Z", "endsAt": "2026-11-08T00:00:00.000Z", "paid": true, "prizes": [ 30 ], "prizePool": 30, "entries": [ { "place": 1, "name": "example_player_one", "avatar": null, "level": 12, "vipRank": 3, "wagered": 20, "prize": 30, "tickets": { "count": 2, "start": 1, "end": 2 } } ] } ]}Errors
| Status | When | Body |
|---|---|---|
| 400 | bad_request: an input outside its rules, a cookie sent, or a refusal by the site (the message says which). unknown_currency: currency is not one of COINS, USD, EUR, GBP. | {"error":{"code":"bad_request","message":"limit: Too small: expected number to be >=1"}}{"error":{"code":"unknown_currency","message":"currency is one of COINS, USD, EUR, GBP"}} |
| 401 | missing_key: no key in the x-apikey header. legacy_key: a v1 key - switch to API v2 for a v2 key. invalid_key: not a live API v2 key, or the code is not one of its account’s codes. | {"error":{"code":"missing_key","message":"send your API v2 key in the x-apikey header"}}{"error":{"code":"legacy_key","message":"this is a v1 key: switch to API v2 in Profile > Affiliates > API key to get a v2 key"}}{"error":{"code":"invalid_key","message":"the key is not a live API v2 key of this code"}} |
| 403 | key_blocked: API v2 is blocked for the account - contact support (a new key does not lift it). account_restricted: the account is restricted - contact support. | {"error":{"code":"key_blocked","message":"this key is blocked: contact support"}}{"error":{"code":"account_restricted","message":"this account is restricted: contact support"}} |
| 404 | not_found: no such giveaway, case or period, or the code has no board or giveaways (also every request while API v2 is not open, and every action while actions are not open). | {"error":{"code":"not_found","message":"not found"}} |
| 429 | rate_limited: past a rate limit - wait the Retry-After seconds. | {"error":{"code":"rate_limited","message":"too many requests, please try again later."}} |
| 503 | unavailable: not available for a moment and nothing was done - try again after the Retry-After seconds. | {"error":{"code":"unavailable","message":"temporarily unavailable, please try again shortly."}} |
A creator's leaderboard, ready for an overlay GET
The live periods and the latest ended ones with their standings, the newest raffle state, and the embed page. The same answer for every caller, so a browser on any origin may poll it without a key (no cookie is read). A code that is not the board owner's main code resolves to the owner's board. Poll it every few seconds: it is cached for 5 seconds and secondsLeft is counted from serverTime. include adds the account ids (each player and the creator), exchanged and xpBonus to the rows. Rate limits: 60 reads a minute per IP across /api/v2 and at most 25 to one path in 2 seconds (429 with Retry-After).
A board's past periods with final standings GET
The ended periods of the code's board, races and raffles, the latest first: the final standings, prizes and paid flag. Rate limits: 60 reads a minute per IP across /api/v2 and at most 25 to one path in 2 seconds (429 with Retry-After), and 60 a minute per account across its keyed reads.