> ## Documentation Index
> Fetch the complete documentation index at: https://api.csboard.com/llms.txt
> Use this file to discover all available pages before exploring further.

# GET /v1/games — игры, которые можно передать в appId

> Список игр, доступных вашему ключу через appId — CS2, Dota 2 и Rust, — и можно ли в каждой из них покупать.

CSBoard продаёт предметы CS2, Dota 2 и Rust. Игра выбирается параметром `appId` — это appId из самого Steam: `730` для CS2, `570` для Dota 2, `252490` для Rust. Эндпоинт возвращает игры, доступные вашему ключу, и для каждой — можно ли там ещё и покупать (`tradable`).

**Требуется аутентификация.** Отправьте ключ как `Authorization: Bearer csb_pub_...`. Баланс не нужен, так что проверить это можно ещё до пополнения счёта.

## Пример запроса

```bash theme={null}
curl https://csboard.com/v1/games \
  -H "Authorization: Bearer csb_pub_..."
```

## Пример ответа

```json theme={null}
{
  "games": [
    { "appId": 730, "name": "CS2", "tradable": true },
    { "appId": 570, "name": "Dota 2", "tradable": true },
    { "appId": 252490, "name": "Rust", "tradable": true }
  ]
}
```

Игру с `tradable: false` можно читать через эндпоинты рыночных данных, но покупать в ней пока нельзя.

## Где работает `appId`

| Эндпоинт | Как передать |
| - | - |
| [`GET /v1/listings`](/ru/api-reference/get-listings) | Query-параметр `appId` |
| [`GET /v1/prices`](/ru/api-reference/get-prices) | Query-параметр `appId` |
| [`GET /v1/listings/availability`](/ru/api-reference/get-listings-availability) | Query-параметр `appId` |
| [`POST /v1/orders`](/ru/api-reference/post-orders) | Поле тела `appId` |
| [`GET /v1/public/prices`](/ru/api-reference/get-public-prices) | Query-параметр `appId` (ключ не нужен) |

Если не передавать `appId`, каждый эндпоинт отвечает по CS2 — ровно так же, как до появления параметра.

## Что меняется для Dota 2 и Rust

* **Та же форма ответа.** У строк Dota 2 и Rust те же ключи, что и у строк CS2, поэтому один парсер читает все три игры. Поля, которые есть только в CS2, — `wear`, `doppler_phase`, `float_value`, `paint_seed`, `inspect_link`, `tradable_at`, `listed_at` — равны `null`, а `stickers` — `[]`.
* **Фильтры только для CS2 отклоняются, а не игнорируются.** `wear`, `min_float`, `max_float`, `stat_trak`, `souvenir`, `available_after` или `sort=newest` вместе с `appId` Dota 2 или Rust дают `400 invalid_param`. В `GET /v1/prices` только для CS2 лишь `wear`.
* **Заказы ставятся в очередь.** Заказ Dota 2 или Rust отвечает `delivery: "pending"` и `expected_minutes: null`. Следите за ним через [`GET /v1/orders/{id}`](/ru/api-reference/get-order).
* **ID принадлежат своей игре.** Покупайте и проверяйте id с тем же `appId`, с которым вы их получили.

Эти эндпоинты остаются **только для CS2** и не читают `appId`: [`GET /v1/listings/stream`](/ru/api-reference/get-listings-stream), [`GET /v1/prices/snapshot.ndjson.gz`](/ru/api-reference/get-prices-snapshot) и [`POST /v1/market/buy`](/ru/api-reference/post-market-buy).

## Коды ошибок

`appId`, который ваш ключ использовать не может — неизвестный, отключённый или не открытый для вас, — даёт `400 unsupported_game`. В теле ответа перечислено, что вам доступно:

```json theme={null}
{
  "code": "unsupported_game",
  "detail": "appId 440 is not available to this key. Supported: 730 (CS2), 570 (Dota 2), 252490 (Rust).",
  "supported_app_ids": [730, 570, 252490]
}
```

В `POST /v1/orders` поле `supported_app_ids` перечисляет игры, в которых вы можете **покупать**.

| HTTP-статус | Код | Значение |
| - | - | - |
| 401 | `missing_api_key` / `invalid_api_key` | Отсутствует или некорректный API-ключ. |
| 429 | `rate_limit_exceeded` | Превышен поминутный лимит вашего ключа. Подождите время, указанное в заголовке `Retry-After`. |


## OpenAPI

````yaml GET /games
openapi: 3.1.0
info:
  title: CSBoard API
  version: 1.0.0
  description: >-
    Market data over the CSBoard marketplace — live listings, floats, stickers,
    minAsk prices, FX rates — plus opt-in buying straight from your balance.
    Free to read, key-gated, built for automation.
  contact:
    name: CSBoard
    url: https://csboard.com/docs
servers:
  - url: https://csboard.com/v1
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Status
    description: Liveness and freshness probes.
  - name: Market data
    description: Read the live catalog, prices, and FX rates.
  - name: Trading
    description: Buy listings from your CSBoard balance. Opt-in, key-gated.
  - name: P2P
    description: >-
      List your own CS2 skins on the CSBoard P2P market. Free — any valid key,
      no balance requirement.
  - name: Account
    description: Your balance, settled funds, and trading status.
  - name: Webhooks
    description: Register an endpoint and receive signed order updates instead of polling.
paths:
  /games:
    get:
      tags:
        - Market data
      summary: Games you can pass as appId
      description: >-
        The games this key may read with `appId`, CS2 first, and whether it may
        also buy there (`tradable`). Key only — no balance requirement, so you
        can check it before funding.
      operationId: listGames
      responses:
        '200':
          description: Games available to this key.
          content:
            application/json:
              schema:
                type: object
                properties:
                  games:
                    type: array
                    items:
                      $ref: '#/components/schemas/Game'
                required:
                  - games
              example:
                games:
                  - appId: 730
                    name: CS2
                    tradable: true
                  - appId: 570
                    name: Dota 2
                    tradable: true
                  - appId: 252490
                    name: Rust
                    tradable: true
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  schemas:
    Game:
      type: object
      properties:
        appId:
          type: integer
          description: Steam appId — the value to pass as `appId`.
          example: 570
        name:
          type: string
          description: Display name, e.g. `CS2`, `Dota 2`, `Rust`.
        tradable:
          type: boolean
          description: >-
            Whether this key may also buy in this game (`POST /orders` with this
            `appId`). `false` means read-only for now.
      required:
        - appId
        - name
        - tradable
    Error:
      type: object
      description: >-
        All errors return { code, detail }. Some carry extra fields (e.g.
        price_moved adds current_total_usd, insufficient_balance adds
        required_usd/current_usd).
      properties:
        code:
          type: string
          description: >-
            Machine-readable error code, e.g. rate_limit_exceeded,
            trading_not_enabled, price_moved.
        detail:
          type: string
          description: Human-readable explanation.
      required:
        - code
  responses:
    Unauthorized:
      description: Missing or invalid API key (`missing_api_key` or `invalid_api_key`).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: missing_api_key
            detail: >-
              Provide your API key via `Authorization: Bearer csb_pub_…`.
              Generate one at https://csboard.com/profile?tab=api
    RateLimited:
      description: >-
        Rate limit exceeded. Includes a Retry-After header (60 seconds on the
        per-key limits).
      headers:
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: rate_limit_exceeded
            detail: Rate limit of 100 requests/min exceeded.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Send your key as a Bearer token on every request: `Authorization: Bearer
        csb_pub_...`. Generate keys in your CSBoard profile.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.