openapi: 3.1.0
info:
  title: cs2.sh API Documentation
  version: 1.0.0
  description: |-
    REST API for Counter-Strike 2 item prices. All `/v1` requests require:

    - `Authorization: Bearer <api_key>`: your API key from the dashboard.
    - `Accept-Encoding: gzip`: successful 2xx responses are gzipped. Error responses are uncompressed even on `/v1` paths.

    **Plan gating.** Demo and Developer plans can call `GET/POST /v1/prices/latest`, `GET /v1/market/buff/latest`, `GET /v1/market/steam/latest`, `GET /v1/schema`, and `GET /v1/fx`; other endpoints return `403 forbidden`. Scale and Enterprise plans have full access.

    **Body limits.** POST endpoints accept up to 100 items per request (max body 1 MiB). Unknown JSON fields are rejected. Values are trimmed and deduped before counting against the cap.

    **Items.** Items are identified by Steam `market_hash_name` (e.g. `USP-S | Printstream (Factory New)`).

    **Variants.** General price, history, archive, liquidity, and BUFF market endpoints can include a `variants` object for Doppler and Gamma Doppler phases or Case Hardened tiers. CSFloat orderbook endpoints support Doppler and Gamma Doppler phases only. Dedicated Steam orderbook and native Steam market-history endpoints do not support variants and do not return a `variants` object.

    **Currency.** Prices are USD by default. Set `currency` in a POST body, or `?currency=` on the GET latest endpoints, to return every price in `AUD`, `CAD`, `CHF`, `CNY`, `EUR`, `GBP`, `JPY`, `NZD`, `SGD`, or `USD`; fields described as USD are then in the requested currency. BUFF, Youpin, and C5Game prices convert from their native CNY price, so `CNY` returns the marketplace's own price; `POST /v1/prices/history` always converts from USD. Latest prices convert at the current rate from `GET /v1/fx`, and historical prices at each observation's UTC-day rate. Liquidity has no prices to convert.
servers:
  - url: https://api.cs2.sh
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Prices
    description: Current and historical price data
  - name: BUFF Market
    description: BUFF market float/fade bucket endpoints
  - name: CSFloat Market
    description: Dedicated CSFloat bid orderbook endpoints
  - name: Steam Market
    description: Dedicated Steam Community Market orderbook and native sale-history endpoints
  - name: Archive
    description: Historical archive data with multi-year coverage
  - name: Liquidity
    description: Liquidity ranking endpoints
  - name: Schema
    description: Full item schema metadata
  - name: FX
    description: Exchange rates used for currency conversion
  - name: Health
    description: Service health monitoring
paths:
  /v1/prices/latest:
    get:
      operationId: getLatestPrices
      summary: Get all latest prices
      description: |
        Returns current prices for all items from all supported marketplaces.

        **Sources and available fields:**
        - `buff`, `youpin`, `steam`: ask, ask_volume, bid, bid_volume
        - `c5game`: ask, ask_volume, bid
        - `csfloat`: ask, ask_volume, bid
        - `skinport`: ask, ask_volume, max_ask, mean_ask, median_ask

        Items with Doppler and Gamma Doppler phases or Case Hardened tiers include a `variants` object. Variant `youpin` objects carry ask, bid, and bid_volume on every Doppler and Gamma Doppler phase, with ask_volume on most items.

        Add `?currency=` to convert every price and `?sources=` to return only the selected sources. Other query parameters are rejected.

        Available on all plans.
      tags:
        - Prices
      parameters:
        - $ref: '#/components/parameters/CurrencyQuery'
        - $ref: '#/components/parameters/SourcesQuery'
      responses:
        '200':
          description: Current prices for all items
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LatestPricesGetResponse'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
    post:
      operationId: getLatestPricesFiltered
      summary: Get latest prices for specific items
      description: Returns current prices for up to 100 specific items. Available on all plans.
      tags:
        - Prices
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LatestPricesPostRequest'
      responses:
        '200':
          description: Current prices for requested items
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LatestPricesPostResponse'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
  /v1/prices/history:
    post:
      operationId: getPriceHistory
      summary: Get historical OHLC prices
      description: |
        Returns continuously updated OHLC (open, high, low, close) price history for the requested items, aggregated from the same data as `GET /v1/prices/latest`. Data begins on December 24, 2025. Use it for short-term price history; the archive endpoints cover the long term.

        Intervals are `5m` (14 days), `30m` (90 days), `1h` (365 days), and `1d` (unlimited). Up to 100 items per request. Available on Scale and Enterprise plans only.
      tags:
        - Prices
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HistoryRequest'
      responses:
        '200':
          description: Historical OHLC data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HistoryResponse'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
  /v1/market/buff/latest:
    get:
      operationId: getBuffMarketLatest
      summary: Get BUFF float and fade buckets for every item
      description: |
        Returns BUFF float and fade buckets for every item. Each item has one or more buckets identified by `bucket_type`: `base`, `float`, `fade`, or `float_fade`. Items with Doppler and Gamma Doppler phases or Case Hardened tiers can include a `variants` object.

        BUFF refreshes float and fade buckets every 10 minutes.

        Prices are USD by default; add `?currency=` to convert them.

        Available on all plans.
      tags:
        - BUFF Market
      parameters:
        - $ref: '#/components/parameters/CurrencyQuery'
      responses:
        '200':
          description: BUFF market float/fade buckets for all items
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BUFFMarketFloatLatestResponse'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
  /v1/market/buff/history:
    post:
      operationId: getBuffMarketHistory
      summary: Get OHLC history for BUFF float and fade buckets
      description: |
        Returns OHLC history for BUFF float and fade buckets, one series per bucket from `GET /v1/market/buff/latest`. Data begins on May 19, 2026.

        Intervals are `30m` (90 days), `1h` (365 days), and `1d` (unlimited); `interval` defaults to `30m`. Up to 100 items per request. Available on Scale and Enterprise plans only.
      tags:
        - BUFF Market
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BUFFMarketFloatHistoryRequest'
      responses:
        '200':
          description: BUFF market float/fade OHLC history
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BUFFMarketFloatHistoryResponse'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
  /v1/market/csfloat/latest:
    get:
      operationId: getCSFloatOrderbookLatest
      summary: Get latest CSFloat buy-order books
      description: |
        Returns the current CSFloat buy-order book for every item with standing orders, including quantities and per-order conditions such as float ranges, paint indexes, applied stickers, applied charms (`keychain` fields), charm-pattern ranges, and paint seeds.

        CSFloat exposes buy orders inconsistently, so this endpoint provides partial data for supported items. Some valid float-range orders may not appear, but all generic buy orders are accurate.

        Orders are price-descending. `top_generic_bid` is the highest order with no conditions; every order carries a `conditions` object (`{}` when it has none). Doppler and Gamma Doppler phase books nest under `variants`, keyed by display name. Books update every ~10-30 minutes depending on item liquidity.

        Prices are USD by default; add `?currency=` to convert them.

        Available on Scale and Enterprise plans only.
      tags:
        - CSFloat Market
      parameters:
        - $ref: '#/components/parameters/CurrencyQuery'
      responses:
        '200':
          description: Latest CSFloat buy-order books for all items with standing orders
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CSFloatBuyOrdersLatestResponse'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
  /v1/market/csfloat/history:
    post:
      operationId: getCSFloatOrderbookHistory
      summary: Get CSFloat buy-order book history
      description: |
        Returns the newest CSFloat buy-order book per `1h` or `1d` UTC bucket for the requested items, with the same book shape as `GET /v1/market/csfloat/latest`. Data begins August 10, 2026.

        This endpoint is a snapshot and selects the newest successful book for the specific interval. For example, the `1h` interval returns the newest book for that item in any given hour.

        Doppler and Gamma Doppler phases nest under their base item. A request naming only a phase returns that phase nested under its base entry.

        Up to 100 items per request. Available on Scale and Enterprise plans only.
      tags:
        - CSFloat Market
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CSFloatBuyOrdersHistoryRequest'
      responses:
        '200':
          description: CSFloat buy-order books grouped by item and bucket
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CSFloatBuyOrdersHistoryResponse'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
  /v1/market/steam/latest:
    get:
      operationId: getSteamLatest
      summary: Get latest Steam full-depth orderbooks
      description: |
        Returns the latest full Steam bid/ask orderbook for all tracked regular items.

        Orderbook depth is columnar. `depth.asks.prices` is sorted ascending, `depth.bids.prices` is sorted descending, and each value in `volumes` corresponds to the price at the same array index. Prices are USD by default; add `?currency=` to convert them.

        Available on all plans.
      tags:
        - Steam Market
      parameters:
        - $ref: '#/components/parameters/CurrencyQuery'
      responses:
        '200':
          description: Latest full-depth Steam orderbooks for tracked regular items
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SteamOrderbookLatestResponse'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
  /v1/market/steam/history:
    post:
      operationId: getSteamHistory
      summary: Get Steam orderbook bucket snapshots
      description: |
        Returns full-depth Steam orderbook snapshots over time. Each bucket contains the latest Steam observation collected inside that interval, with the same columnar depth shape as `GET /v1/market/steam/latest`.

        This is point-in-time depth, not OHLC; prices are not aggregated. Intervals are `1h` (90 days) and `1d` (unlimited).

        Variants are not supported. Up to 100 items per request. Available on Scale and Enterprise plans only.
      tags:
        - Steam Market
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SteamOrderbookHistoryRequest'
      responses:
        '200':
          description: Steam orderbook snapshots grouped by item and bucket
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SteamOrderbookHistoryResponse'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
  /v1/archive/history:
    post:
      operationId: getArchiveHistory
      summary: Get historical archive prices
      description: |
        Returns long-term price history per source from the archive: `ask`, `bid`, `ask_volume`, and `bid_volume` for `buff`, `youpin`, and `c5game`, plus `hourly_volume` and `total_supply` on the `aggregate` source. Data begins in 2023 and updates ~1-2x per day. Use it for long-term price history, total supply, and sale volume.

        `aggregate` is derived from BUFF and Youpin: `ask` is the lower of the two asks and `bid` the higher of the two bids, after any bid above its own platform's ask is discarded, so it can sit above the aggregate ask when the two platforms disagree. On every source a bid above that source's ask is `null`. `hourly_volume` and `total_supply` come from SteamDT and are `null` on buckets where only BUFF or Youpin reported.

        Intervals are `1h` and `1d` (default). `sources` defaults to `aggregate` only. Up to 100 items per request. Available on Scale and Enterprise plans only.
      tags:
        - Archive
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ArchiveHistoryRequest'
      responses:
        '200':
          description: Archive history data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArchiveHistoryResponse'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
  /v1/archive/csfloat:
    post:
      operationId: getArchiveCSFloat
      summary: Get CSFloat sale history
      description: |
        Returns daily CSFloat sale history: `volume` is the number of items sold that day and `price` is the arithmetic average of that day's sales. Data begins in 2022 and updates ~1-2x per day.

        Up to 100 items per request. Available on Scale and Enterprise plans only.
      tags:
        - Archive
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ArchiveCSFloatRequest'
      responses:
        '200':
          description: CSFloat archive data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArchiveCSFloatResponse'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
  /v1/archive/steam:
    post:
      operationId: getArchiveSteam
      summary: Get native Steam sale history
      description: |
        Returns native Steam Community Market sale-history buckets in USD. `price` is Steam's median sale price for the bucket and `volume` is the Steam purchase count. Intervals are `1h` and `1d`, both unlimited in range.

        Variants are not supported. Up to 100 items per request. Available on Scale and Enterprise plans only.
      tags:
        - Archive
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ArchiveSteamRequest'
      responses:
        '200':
          description: Native Steam archive buckets grouped by item
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArchiveSteamResponse'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
  /v1/archive/buff:
    post:
      operationId: getArchiveBuff
      summary: Get BUFF sale history and supply
      description: |
        BUFF variant data includes: Dopplers, Gamma Dopplers, Case Hardened, Marble Fade Fire & Ice, and Crimson Kimono.

        Returns BUFF sale prices and daily total supply from BUFF's sale trends chart.

        BUFF provides more recent history at a higher frequency than older history. A data point only exists where a sale occurred, so illiquid items have larger gaps. Days with supply but no sale have one row with a `null` `sale_price`. `count` is the number of points, not a sale volume.

        Coverage begins September 6, 2024, and requests without `start` and `end` return all collected history. Base items include their Doppler, Gamma Doppler, and Case Hardened variants under `variants`. Updates ~1x per day.

        Up to 100 items per request. Available on Scale and Enterprise plans only.
      tags:
      - Archive
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ArchiveBuffRequest'
      responses:
        '200':
          description: BUFF sales and daily supply
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArchiveBuffResponse'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
  /v1/archive/youpin:
    post:
      operationId: getArchiveYoupin
      summary: Get Youpin sale history
      description: |
        Returns Youpin sale prices at `1h`, `4h`, and `12h` sampling intervals. Youpin publishes one sale per sampling bucket, so when an item sells more than once inside a bucket only the most recent sale is kept. Prices are USD, converted from CNY at each sale date's historical rate.

        Each item carries one independent series per interval under `intervals`, keyed `1h`, `4h`, and `12h`. A key is present only when that interval was observed inside the requested window. `count: 0` with an empty `data` means the interval was observed and nothing sold; an absent key means it was not observed. The same sale can appear at more than one interval, so never sum series. Each point carries `bucket` (start of the sampling bucket), `time` (the actual sale time), and `price`; `count` is the number of points in that series, not a sale volume.

        Coverage: `12h` from November 12, 2025, `4h` from June 27, 2026, and `1h` from July 20, 2026. Roughly 16,000 items are collected (those at or above the `liquid` bucket on `/v1/liquidity/items`), plus Doppler, Gamma Doppler, and Case Hardened variants. Updates ~1-2x per day.

        Up to 100 items per request. Available on Scale and Enterprise plans only.
      tags:
        - Archive
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ArchiveYoupinRequest'
      responses:
        '200':
          description: Youpin sale history
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArchiveYoupinResponse'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
  /v1/liquidity/items:
    get:
      operationId: getItemLiquidity
      summary: Get item liquidity buckets
      description: |
        Returns the latest daily liquidity bucket and estimated sale time for all items.

        Available on Scale and Enterprise plans only.
      tags:
        - Liquidity
      responses:
        '200':
          description: Item liquidity for all items
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemLiquidityGetResponse'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
  /v1/schema:
    get:
      operationId: getSchema
      summary: Get item schema
      description: |
        Returns a single schema containing all Counter-Strike 2 items. It's updated automatically when the game updates and contains ~47,500 items and ~110 collections keyed by `market_hash_name`, with rarities, wears and float ranges, marketplace ids, and item images. Variants are supported. Where applicable, items list their collections and containers.

        The full payload is large, so `Accept-Encoding: gzip` is required.

        Available on all plans.
      tags:
        - Schema
      responses:
        '200':
          description: Full item schema
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SchemaResponse'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/RateLimited'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
  /v1/fx:
    get:
      operationId: getFX
      summary: Get exchange rates
      description: |
        Returns the current USD-based exchange rates used to convert latest prices. Rates update about every hour.

        Available on all plans.
      tags:
        - FX
      responses:
        '200':
          description: Current exchange rates
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FXResponse'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/RateLimited'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /health:
    get:
      operationId: getHealth
      summary: Service health status
      description: |
        Returns current source, variant, endpoint, schema, and aggregate health. No authentication required.

        A populated health response uses HTTP `200` even when `status` is `degraded` or `down`. HTTP `503` means health data is not ready.
      tags:
        - Health
      security: []
      responses:
        '200':
          description: Service health
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HealthResponse'
                example:
                  status: up
                  last_refreshed_at: '2026-09-22T23:22:13.74529485Z'
                  schema_ready: true
                  sources:
                    buff:
                      updated_at: '2026-09-22T23:18:20Z'
                      collected_at: '2026-09-22T23:21:09.233Z'
                      status: up
                    c5game:
                      updated_at: '2026-09-22T23:17:35.487Z'
                      collected_at: '2026-09-22T23:17:40.94Z'
                      status: up
                    csfloat:
                      updated_at: '2026-09-22T23:21:18.723Z'
                      collected_at: '2026-09-22T23:21:18.77Z'
                      status: up
                    skinport:
                      updated_at: '2026-09-22T23:20:50.928Z'
                      collected_at: '2026-09-22T23:20:55.115Z'
                      status: up
                    steam:
                      updated_at: '2026-09-22T23:20:40.127Z'
                      collected_at: '2026-09-22T23:21:10.613Z'
                      status: up
                    youpin:
                      updated_at: '2026-09-22T23:21:33.416Z'
                      collected_at: '2026-09-22T23:21:39.488Z'
                      status: up
                  variants:
                    buff_variant:
                      updated_at: '2026-09-22T23:18:38Z'
                      collected_at: '2026-09-22T23:21:09.233Z'
                      status: up
                    c5game_variant:
                      updated_at: '2026-09-22T23:16:28.766Z'
                      collected_at: '2026-09-22T23:17:50.025Z'
                      status: up
                    csfloat_variant:
                      updated_at: '2026-09-22T23:21:13.89Z'
                      collected_at: '2026-09-22T23:21:30.912Z'
                      status: up
                    skinport_variant:
                      updated_at: '2026-09-22T23:20:50.928Z'
                      collected_at: '2026-09-22T23:20:55.115Z'
                      status: up
                    steam_variant:
                      updated_at: '2026-09-22T23:14:43.412Z'
                      collected_at: '2026-09-22T23:18:54.844Z'
                      status: up
                    youpin_variant:
                      updated_at: '2026-09-22T23:21:23.465Z'
                      collected_at: '2026-09-22T23:21:30.542Z'
                      status: up
                  endpoints:
                    archive/buff:
                      updated_at: '2026-09-22T23:21:54.047Z'
                      collected_at: '2026-09-22T23:21:54.047Z'
                      status: up
                    archive/csfloat:
                      updated_at: '2026-09-22T00:00:00Z'
                      collected_at: '2026-09-22T23:20:43.519Z'
                      status: up
                    archive/history:
                      updated_at: '2026-09-22T05:39:26Z'
                      collected_at: '2026-09-22T05:41:34.129Z'
                      status: up
                    archive/steam:
                      updated_at: '2026-09-22T22:00:00Z'
                      collected_at: '2026-09-22T22:00:00Z'
                      status: up
                    archive/youpin:
                      updated_at: '2026-09-22T23:21:48.223Z'
                      collected_at: '2026-09-22T23:21:48.223Z'
                      status: up
                    fx:
                      updated_at: '2026-09-22T23:00:02Z'
                      collected_at: '2026-09-22T23:00:54.577Z'
                      status: up
                    liquidity:
                      updated_at: '2026-09-22T22:36:43Z'
                      collected_at: '2026-09-22T22:40:03.047Z'
                      status: up
                    liquidity/items:
                      updated_at: '2026-09-22T00:00:00Z'
                      collected_at: '2026-09-22T00:00:11.988Z'
                      status: up
                    market/buff/history:
                      updated_at: '2026-09-22T23:20:54.742Z'
                      collected_at: '2026-09-22T23:20:54.742Z'
                      status: up
                    market/buff/latest:
                      updated_at: '2026-09-22T23:20:54.742Z'
                      collected_at: '2026-09-22T23:20:54.742Z'
                      status: up
                    market/csfloat/latest:
                      updated_at: '2026-09-22T23:20:57.84Z'
                      collected_at: '2026-09-22T23:20:59.603Z'
                      status: up
                    market/steam/history:
                      updated_at: '2026-09-22T23:00:00Z'
                      collected_at: '2026-09-22T23:00:00Z'
                      status: up
                    market/steam/latest:
                      updated_at: '2026-09-22T23:20:12.193Z'
                      collected_at: '2026-09-22T23:20:36.101Z'
                      status: up
                    prices/history:
                      updated_at: '2026-09-22T23:20:00Z'
                      collected_at: '2026-09-22T23:20:00Z'
                      status: up
                    prices/latest:
                      updated_at: '2026-09-22T23:21:33.416Z'
                      collected_at: '2026-09-22T23:21:39.488Z'
                      status: up
                    schema:
                      updated_at: '2026-09-09T22:30:37Z'
                      collected_at: '2026-09-22T22:50:01.201868304Z'
                      status: up
                  stats:
                    total_events: 38662293587
                    market_hash_names: 45546
                    variant_items: 1408
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: |
        API key issued for your cs2.sh account. Demo keys return `401 unauthorized`
        with `demo key expired` after their issued expiry timestamp; duration can differ by issuance channel.
  parameters:
    CurrencyQuery:
      name: currency
      in: query
      required: false
      description: Currency for every price in the response.
      schema:
        type: string
        enum:
          - AUD
          - CAD
          - CHF
          - CNY
          - EUR
          - GBP
          - JPY
          - NZD
          - SGD
          - USD
        default: USD
    SourcesQuery:
      name: sources
      in: query
      required: false
      description: Comma-separated sources to return, e.g. `buff,youpin`. Defaults to all sources. Items with no data in the selected sources are omitted.
      schema:
        type: string
  schemas:
    HealthEntry:
      type: object
      description: Freshness and status for one source, variant collector, or endpoint dataset.
      required:
        - updated_at
        - collected_at
        - status
      properties:
        updated_at:
          type: string
          format: date-time
          description: Most recent source-data timestamp represented by this entry.
        collected_at:
          type: string
          format: date-time
          description: When cs2.sh most recently collected or produced this dataset.
        status:
          type: string
          enum:
            - up
            - degraded
            - down
          description: Health derived from the dataset's expected refresh rate.
    HealthStats:
      type: object
      description: Aggregate database counts at the last health refresh.
      required:
        - total_events
        - market_hash_names
        - variant_items
      properties:
        total_events:
          type: integer
          description: Total stored market-data events.
        market_hash_names:
          type: integer
          description: Unique item names represented in current market data.
        variant_items:
          type: integer
          description: Unique variant item names represented in current market data.
    HealthResponse:
      type: object
      description: Current health of cs2.sh data sources and public datasets.
      required:
        - status
        - last_refreshed_at
        - schema_ready
        - sources
        - variants
        - endpoints
        - stats
      properties:
        status:
          type: string
          enum:
            - up
            - degraded
            - down
          description: Overall API data health.
        last_refreshed_at:
          type: string
          format: date-time
          description: When this health snapshot was generated.
        schema_ready:
          type: boolean
          description: Whether the item schema is available.
        sources:
          type: object
          description: Marketplace health keyed by source.
          additionalProperties:
            $ref: '#/components/schemas/HealthEntry'
        variants:
          type: object
          description: Variant-price health keyed by source collector.
          additionalProperties:
            $ref: '#/components/schemas/HealthEntry'
        endpoints:
          type: object
          description: Dataset health keyed by endpoint name. `fx` reports the exchange rates used for currency conversion.
          additionalProperties:
            $ref: '#/components/schemas/HealthEntry'
        stats:
          $ref: '#/components/schemas/HealthStats'
    SkinportPriceWindow:
      type: object
      description: Skinport-supplied rolling price window. Object is `null` when Skinport has no recent sales for the item.
      required:
        - price
        - max_price
        - mean_price
        - median_price
        - volume
      properties:
        price:
          type: number
          description: Last sale price (USD) within the window.
        max_price:
          type: number
          description: Highest sale price (USD) within the window.
        mean_price:
          type: number
          description: Average sale price (USD) within the window.
        median_price:
          type: number
          description: Median sale price (USD) within the window.
        volume:
          type: integer
          description: Number of sales within the window.
    BUFFSourceData:
      type: object
      description: Price data from BUFF.
      required:
        - updated_at
        - collected_at
        - ask
        - ask_volume
        - bid
        - bid_volume
      properties:
        updated_at:
          type: [string, "null"]
          format: date-time
          description: When BUFF last updated this price.
        collected_at:
          type: [string, "null"]
          format: date-time
          description: When cs2.sh collected this price.
        ask:
          type: [number, "null"]
          description: Lowest ask price (USD).
        ask_volume:
          type: [integer, "null"]
          description: Number of items listed for sale.
        bid:
          type: [number, "null"]
          description: Highest buy-order price (USD).
        bid_volume:
          type: [integer, "null"]
          description: Number of active buy orders.
    YoupinSourceData:
      type: object
      description: Price data from Youpin.
      required:
        - updated_at
        - collected_at
        - ask
        - ask_volume
        - bid
        - bid_volume
      properties:
        updated_at:
          type: [string, "null"]
          format: date-time
          description: When Youpin last updated this price.
        collected_at:
          type: [string, "null"]
          format: date-time
          description: When cs2.sh collected this price.
        ask:
          type: [number, "null"]
          description: Lowest ask price (USD).
        ask_volume:
          type: [integer, "null"]
          description: Number of items listed for sale.
        bid:
          type: [number, "null"]
          description: Highest buy-order price (USD).
        bid_volume:
          type: [integer, "null"]
          description: Number of active buy orders.
    CsfloatSourceData:
      type: object
      description: Current CSFloat listing and buy-order prices.
      required:
        - updated_at
        - collected_at
        - ask
        - ask_volume
        - bid
      properties:
        updated_at:
          type: [string, "null"]
          format: date-time
          description: When CSFloat last updated this price.
        collected_at:
          type: [string, "null"]
          format: date-time
          description: When cs2.sh collected this price.
        ask:
          type: [number, "null"]
          description: Lowest ask price (USD).
        ask_volume:
          type: [integer, "null"]
          description: Number of items listed for sale.
        bid:
          type: [number, "null"]
          description: Highest buy-order price (USD).
    SkinportSourceData:
      type: object
      description: Price data from Skinport, including Skinport-supplied rolling history windows.
      required:
        - updated_at
        - collected_at
        - ask
        - ask_volume
        - max_ask
        - mean_ask
        - median_ask
        - 24h_history
        - 7d_history
        - 30d_history
        - 90d_history
      properties:
        updated_at:
          type: [string, "null"]
          format: date-time
          description: When Skinport last updated this price.
        collected_at:
          type: [string, "null"]
          format: date-time
          description: When cs2.sh collected this price.
        ask:
          type: [number, "null"]
          description: Lowest ask price (USD).
        ask_volume:
          type: [integer, "null"]
          description: Number of items listed for sale.
        max_ask:
          type: [number, "null"]
          description: Highest listing price (USD).
        mean_ask:
          type: [number, "null"]
          description: Average listing price (USD).
        median_ask:
          type: [number, "null"]
          description: Median listing price (USD).
        24h_history:
          oneOf:
            - $ref: '#/components/schemas/SkinportPriceWindow'
            - type: "null"
        7d_history:
          oneOf:
            - $ref: '#/components/schemas/SkinportPriceWindow'
            - type: "null"
        30d_history:
          oneOf:
            - $ref: '#/components/schemas/SkinportPriceWindow'
            - type: "null"
        90d_history:
          oneOf:
            - $ref: '#/components/schemas/SkinportPriceWindow'
            - type: "null"
    SteamSourceData:
      type: object
      description: Price data from the Steam Community Market.
      required:
        - updated_at
        - collected_at
        - ask
        - ask_volume
        - bid
        - bid_volume
      properties:
        updated_at:
          type: [string, "null"]
          format: date-time
          description: When Steam last updated this price.
        collected_at:
          type: [string, "null"]
          format: date-time
          description: When cs2.sh collected this price.
        ask:
          type: [number, "null"]
          description: Lowest ask price (USD).
        ask_volume:
          type: [integer, "null"]
          description: Number of items listed for sale.
        bid:
          type: [number, "null"]
          description: Highest buy-order price (USD).
        bid_volume:
          type: [integer, "null"]
          description: Number of active buy orders.
    C5GameSourceData:
      type: object
      description: Price data from C5Game. Ask and bid come from independent collection passes, so timestamps may differ for the same item.
      required:
        - updated_at
        - collected_at
        - ask
        - ask_volume
        - bid
      properties:
        updated_at:
          type: [string, "null"]
          format: date-time
          description: When C5Game last updated this price.
        collected_at:
          type: [string, "null"]
          format: date-time
          description: When cs2.sh collected this price.
        ask:
          type: [number, "null"]
          description: Lowest ask price (USD).
        ask_volume:
          type: [integer, "null"]
          description: Number of items listed for sale.
        bid:
          type: [number, "null"]
          description: Highest buy-order price (USD).
    Variant:
      type: object
      description: A variant of an item (Doppler or Gamma Doppler phase or Case Hardened tier). `youpin` includes `ask`, `bid`, and `bid_volume` on every Doppler and Gamma Doppler phase, with `ask_volume` on most items.
      required:
        - market_hash_name
        - name
        - display_name
        - version
      properties:
        market_hash_name:
          type: string
          description: The base item's `market_hash_name`. The full variant name is `name`.
        name:
          type: string
          description: The variant's full `market_hash_name`, e.g. `★ Karambit | Doppler (Factory New) | Phase 1`.
        display_name:
          type: string
          description: Human-readable variant label (e.g. `Phase 1`, `Ruby`, `Tier 1`, `Blue Gem`).
        version:
          type: string
          description: Stable variant code. Switch on this in client code.
          enum:
            - p1
            - p2
            - p3
            - p4
            - ruby
            - sapphire
            - blackpearl
            - emerald
            - t1
            - t2
            - t3
            - t4
            - singleblue
        buff:
          $ref: '#/components/schemas/BUFFSourceData'
        youpin:
          $ref: '#/components/schemas/YoupinSourceData'
        csfloat:
          $ref: '#/components/schemas/CsfloatSourceData'
        skinport:
          $ref: '#/components/schemas/SkinportSourceData'
        c5game:
          $ref: '#/components/schemas/C5GameSourceData'
        steam:
          $ref: '#/components/schemas/SteamSourceData'
    Item:
      type: object
      description: Price data for an item across all sources. Every source is present unless `sources` limits the response to the requested ones.
      required:
        - market_hash_name
      properties:
        market_hash_name:
          type: string
          description: Canonical Steam `market_hash_name`.
        buff:
          $ref: '#/components/schemas/BUFFSourceData'
        youpin:
          $ref: '#/components/schemas/YoupinSourceData'
        csfloat:
          $ref: '#/components/schemas/CsfloatSourceData'
        skinport:
          $ref: '#/components/schemas/SkinportSourceData'
        c5game:
          $ref: '#/components/schemas/C5GameSourceData'
        steam:
          $ref: '#/components/schemas/SteamSourceData'
        variants:
          type: object
          description: Per-variant price data for items with Doppler and Gamma Doppler phases or Case Hardened tiers. Keyed by display name.
          additionalProperties:
            $ref: '#/components/schemas/Variant'
    LatestPricesGetResponse:
      type: object
      description: All-items snapshot. Returned by `GET /v1/prices/latest` with shared response metadata.
      required:
        - response_time
        - currency
        - items
      properties:
        response_time:
          type: string
          format: date-time
          description: When the response was generated.
        currency:
          type: string
          description: Currency code for every price in the response. Matches the requested `currency`; defaults to `USD`.
        items:
          type: object
          description: Map of `market_hash_name` to item price data.
          additionalProperties:
            $ref: '#/components/schemas/Item'
      example:
        response_time: '2026-08-23T21:59:56.831728619Z'
        currency: USD
        items:
          USP-S | Printstream (Factory New):
            market_hash_name: USP-S | Printstream (Factory New)
            buff:
              updated_at: '2026-08-23T21:56:49Z'
              collected_at: '2026-08-23T21:59:10.862Z'
              ask: 101.95
              ask_volume: 491
              bid: 97.46
              bid_volume: 50
            youpin:
              updated_at: '2026-08-23T21:58:45.755Z'
              collected_at: '2026-08-23T21:59:14.764Z'
              ask: 98.5
              ask_volume: 510
              bid: 97.01
              bid_volume: 67
            csfloat:
              updated_at: '2026-08-23T21:59:27.65Z'
              collected_at: '2026-08-23T21:59:27.697Z'
              ask: 95
              ask_volume: 241
              bid: 92.6
            skinport:
              updated_at: '2026-08-23T21:59:10.493Z'
              collected_at: '2026-08-23T21:59:18.889Z'
              ask: 105.55
              ask_volume: 61
              max_ask: 590.65
              mean_ask: 166.33
              median_ask: 142.99
              24h_history:
                price: 105.06
                max_price: 127.24
                mean_price: 116.15
                median_price: 116.15
                volume: 2
              7d_history:
                price: 100.34
                max_price: 317.2
                mean_price: 127.22
                median_price: 105.84
                volume: 11
              30d_history:
                price: 100.34
                max_price: 317.2
                mean_price: 121.88
                median_price: 111.06
                volume: 36
              90d_history:
                price: 99.22
                max_price: 317.2
                mean_price: 121.33
                median_price: 117.56
                volume: 144
            steam:
              updated_at: '2026-08-23T21:56:50.48Z'
              collected_at: '2026-08-23T21:57:48.359Z'
              ask: 144.99
              ask_volume: 75
              bid: 143.09
              bid_volume: 2537
            c5game:
              updated_at: '2026-08-23T21:59:19.245Z'
              collected_at: '2026-08-23T21:59:20.273Z'
              ask: 102.41
              ask_volume: 213
              bid: 173.93
    LatestPricesPostRequest:
      type: object
      required:
        - items
      properties:
        items:
          type: array
          items:
            type: string
          maxItems: 100
          description: List of `market_hash_name` values (max 100).
          example:
            - USP-S | Printstream (Factory New)
            - ★ Karambit | Doppler (Factory New)
        sources:
          type: array
          items:
            type: string
            enum:
              - buff
              - youpin
              - csfloat
              - skinport
              - steam
              - c5game
          description: Return only these sources. Defaults to all sources.
          example:
            - buff
            - youpin
            - csfloat
        currency:
          type: string
          enum:
            - AUD
            - CAD
            - CHF
            - CNY
            - EUR
            - GBP
            - JPY
            - NZD
            - SGD
            - USD
          default: USD
          description: Currency for every price in the response.
    LatestPricesPostResponse:
      type: object
      description: Filtered per-item snapshot. Returned by `POST /v1/prices/latest` and includes per-item `errors`.
      required:
        - response_time
        - currency
        - items
      properties:
        response_time:
          type: string
          format: date-time
          description: When the response was generated.
        currency:
          type: string
          description: Currency code for every price in the response. Matches the requested `currency`; defaults to `USD`.
        items:
          type: object
          description: Map of `market_hash_name` to item price data, filtered to the requested items.
          additionalProperties:
            $ref: '#/components/schemas/Item'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ItemError'
          description: Per-item failures alongside successful results (partial success).
      example:
        response_time: '2026-09-22T23:22:27.021330934Z'
        currency: USD
        items:
          USP-S | Printstream (Factory New):
            market_hash_name: USP-S | Printstream (Factory New)
            buff:
              updated_at: '2026-09-22T23:18:50Z'
              collected_at: '2026-09-22T23:21:09.233Z'
              ask: 90.71
              ask_volume: 387
              bid: 90.12
              bid_volume: 43
            youpin:
              updated_at: '2026-09-22T23:19:34.492Z'
              collected_at: '2026-09-22T23:19:59.576Z'
              ask: 93.84
              ask_volume: 479
              bid: 92.2
              bid_volume: 46
            csfloat:
              updated_at: '2026-09-22T23:21:18.723Z'
              collected_at: '2026-09-22T23:21:18.77Z'
              ask: 93.1
              ask_volume: 239
              bid: 89
          ★ Karambit | Doppler (Factory New):
            market_hash_name: ★ Karambit | Doppler (Factory New)
            buff:
              updated_at: '2026-09-22T23:18:28Z'
              collected_at: '2026-09-22T23:21:09.233Z'
              ask: 1226.38
              ask_volume: 1487
              bid: 1191.63
              bid_volume: 66
            youpin:
              updated_at: '2026-09-22T23:20:33.469Z'
              collected_at: '2026-09-22T23:20:49.558Z'
              ask: 1210.32
              ask_volume: 1725
              bid: 1188.65
              bid_volume: 25
            csfloat:
              updated_at: '2026-09-22T23:21:18.723Z'
              collected_at: '2026-09-22T23:21:18.77Z'
              ask: 1213.55
              ask_volume: 1059
              bid: 1160
            variants:
              Phase 2:
                market_hash_name: ★ Karambit | Doppler (Factory New)
                name: ★ Karambit | Doppler (Factory New) | Phase 2
                display_name: Phase 2
                version: p2
                buff:
                  updated_at: '2026-09-22T23:18:28Z'
                  collected_at: '2026-09-22T23:21:09.233Z'
                  ask: 1765.03
                  ask_volume: null
                  bid: 1689.13
                  bid_volume: null
                youpin:
                  updated_at: '2026-09-22T23:20:10.56Z'
                  collected_at: '2026-09-22T23:20:30.874Z'
                  ask: 1759.08
                  ask_volume: null
                  bid: 1717.43
                  bid_volume: 39
                csfloat:
                  updated_at: '2026-09-22T23:19:09.13Z'
                  collected_at: '2026-09-22T23:19:26.276Z'
                  ask: 1750
                  ask_volume: null
                  bid: 1700
              Ruby:
                market_hash_name: ★ Karambit | Doppler (Factory New)
                name: ★ Karambit | Doppler (Factory New) | Ruby
                display_name: Ruby
                version: ruby
                buff:
                  updated_at: '2026-09-22T23:18:28Z'
                  collected_at: '2026-09-22T23:21:09.233Z'
                  ask: 7497.5
                  ask_volume: null
                  bid: 5660.24
                  bid_volume: null
                youpin:
                  updated_at: '2026-09-22T23:21:04.858Z'
                  collected_at: '2026-09-22T23:21:30.542Z'
                  ask: 7409.35
                  ask_volume: null
                  bid: 7152.75
                  bid_volume: 50
                csfloat:
                  updated_at: '2026-09-22T23:21:08.307Z'
                  collected_at: '2026-09-22T23:21:30.912Z'
                  ask: 7222.22
                  ask_volume: null
                  bid: 7030
    BUFFOHLCSourceData:
      type: object
      required:
        - open_ask
        - high_ask
        - low_ask
        - close_ask
        - ask_volume
        - open_bid
        - high_bid
        - low_bid
        - close_bid
        - bid_volume
        - sample_count
        - open_time
        - close_time
      description: OHLC bucket of BUFF prices.
      properties:
        open_ask:
          type: [number, "null"]
          description: First ask price in the bucket.
        high_ask:
          type: [number, "null"]
          description: Highest ask price in the bucket.
        low_ask:
          type: [number, "null"]
          description: Lowest ask price in the bucket.
        close_ask:
          type: [number, "null"]
          description: Last ask price in the bucket.
        ask_volume:
          type: [integer, "null"]
          description: Last observed ask volume in the bucket.
        open_bid:
          type: [number, "null"]
          description: First bid price in the bucket.
        high_bid:
          type: [number, "null"]
          description: Highest bid price in the bucket.
        low_bid:
          type: [number, "null"]
          description: Lowest bid price in the bucket.
        close_bid:
          type: [number, "null"]
          description: Last bid price in the bucket.
        bid_volume:
          type: [integer, "null"]
          description: Last observed bid volume in the bucket.
        sample_count:
          type: integer
          description: Number of underlying 5-minute observations aggregated into this bucket.
        open_time:
          type: [string, "null"]
          format: date-time
          description: Timestamp of the first observation inside this bucket. Distinct from `bucket` (the interval boundary).
        close_time:
          type: [string, "null"]
          format: date-time
          description: Timestamp of the last observation inside this bucket. Distinct from `bucket` (the interval boundary).
    YoupinOHLCSourceData:
      type: object
      required:
        - open_ask
        - high_ask
        - low_ask
        - close_ask
        - ask_volume
        - open_bid
        - high_bid
        - low_bid
        - close_bid
        - bid_volume
        - sample_count
        - open_time
        - close_time
      description: OHLC bucket of Youpin prices.
      properties:
        open_ask:
          type: [number, "null"]
          description: First ask price in the bucket.
        high_ask:
          type: [number, "null"]
          description: Highest ask price in the bucket.
        low_ask:
          type: [number, "null"]
          description: Lowest ask price in the bucket.
        close_ask:
          type: [number, "null"]
          description: Last ask price in the bucket.
        ask_volume:
          type: [integer, "null"]
          description: Last observed ask volume in the bucket.
        open_bid:
          type: [number, "null"]
          description: First bid price in the bucket.
        high_bid:
          type: [number, "null"]
          description: Highest bid price in the bucket.
        low_bid:
          type: [number, "null"]
          description: Lowest bid price in the bucket.
        close_bid:
          type: [number, "null"]
          description: Last bid price in the bucket.
        bid_volume:
          type: [integer, "null"]
          description: Last observed bid volume in the bucket.
        sample_count:
          type: integer
          description: Number of underlying 5-minute observations aggregated into this bucket.
        open_time:
          type: [string, "null"]
          format: date-time
          description: Timestamp of the first observation inside this bucket. Distinct from `bucket` (the interval boundary).
        close_time:
          type: [string, "null"]
          format: date-time
          description: Timestamp of the last observation inside this bucket. Distinct from `bucket` (the interval boundary).
    CsfloatOHLCSourceData:
      type: object
      required:
        - open_ask
        - high_ask
        - low_ask
        - close_ask
        - ask_volume
        - open_bid
        - high_bid
        - low_bid
        - close_bid
        - sample_count
        - open_time
        - close_time
      description: OHLC bucket of CSFloat ask and bid prices.
      properties:
        open_ask:
          type: [number, "null"]
          description: First ask price in the bucket.
        high_ask:
          type: [number, "null"]
          description: Highest ask price in the bucket.
        low_ask:
          type: [number, "null"]
          description: Lowest ask price in the bucket.
        close_ask:
          type: [number, "null"]
          description: Last ask price in the bucket.
        ask_volume:
          type: [integer, "null"]
          description: Last observed ask volume in the bucket.
        open_bid:
          type: [number, "null"]
          description: First bid price in the bucket.
        high_bid:
          type: [number, "null"]
          description: Highest bid price in the bucket.
        low_bid:
          type: [number, "null"]
          description: Lowest bid price in the bucket.
        close_bid:
          type: [number, "null"]
          description: Last bid price in the bucket.
        sample_count:
          type: integer
          description: Number of underlying 5-minute observations aggregated into this bucket.
        open_time:
          type: [string, "null"]
          format: date-time
          description: Timestamp of the first observation inside this bucket. Distinct from `bucket` (the interval boundary).
        close_time:
          type: [string, "null"]
          format: date-time
          description: Timestamp of the last observation inside this bucket. Distinct from `bucket` (the interval boundary).
    SkinportOHLCSourceData:
      type: object
      required:
        - open_ask
        - high_ask
        - low_ask
        - close_ask
        - ask_volume
        - sample_count
        - open_time
        - close_time
      description: OHLC bucket of Skinport ask prices.
      properties:
        open_ask:
          type: [number, "null"]
          description: First ask price in the bucket.
        high_ask:
          type: [number, "null"]
          description: Highest ask price in the bucket.
        low_ask:
          type: [number, "null"]
          description: Lowest ask price in the bucket.
        close_ask:
          type: [number, "null"]
          description: Last ask price in the bucket.
        ask_volume:
          type: [integer, "null"]
          description: Last observed ask volume in the bucket.
        sample_count:
          type: integer
          description: Number of underlying 5-minute observations aggregated into this bucket.
        open_time:
          type: [string, "null"]
          format: date-time
          description: Timestamp of the first observation inside this bucket. Distinct from `bucket` (the interval boundary).
        close_time:
          type: [string, "null"]
          format: date-time
          description: Timestamp of the last observation inside this bucket. Distinct from `bucket` (the interval boundary).
    SteamOHLCSourceData:
      type: object
      required:
        - open_ask
        - high_ask
        - low_ask
        - close_ask
        - ask_volume
        - open_bid
        - high_bid
        - low_bid
        - close_bid
        - bid_volume
        - sample_count
        - open_time
        - close_time
      description: OHLC bucket of Steam Community Market ask and bid prices.
      properties:
        open_ask:
          type: [number, "null"]
          description: First ask price in the bucket.
        high_ask:
          type: [number, "null"]
          description: Highest ask price in the bucket.
        low_ask:
          type: [number, "null"]
          description: Lowest ask price in the bucket.
        close_ask:
          type: [number, "null"]
          description: Last ask price in the bucket.
        ask_volume:
          type: [integer, "null"]
          description: Last observed ask volume in the bucket.
        open_bid:
          type: [number, "null"]
          description: First bid price in the bucket.
        high_bid:
          type: [number, "null"]
          description: Highest bid price in the bucket.
        low_bid:
          type: [number, "null"]
          description: Lowest bid price in the bucket.
        close_bid:
          type: [number, "null"]
          description: Last bid price in the bucket.
        bid_volume:
          type: [integer, "null"]
          description: Last observed bid volume in the bucket.
        sample_count:
          type: integer
          description: Number of underlying 5-minute observations aggregated into this bucket.
        open_time:
          type: [string, "null"]
          format: date-time
          description: Timestamp of the first observation inside this bucket. Distinct from `bucket` (the interval boundary).
        close_time:
          type: [string, "null"]
          format: date-time
          description: Timestamp of the last observation inside this bucket. Distinct from `bucket` (the interval boundary).
    C5GameOHLCSourceData:
      type: object
      required:
        - open_ask
        - high_ask
        - low_ask
        - close_ask
        - ask_volume
        - open_bid
        - high_bid
        - low_bid
        - close_bid
        - sample_count
        - open_time
        - close_time
      description: OHLC bucket of C5Game ask and bid prices.
      properties:
        open_ask:
          type: [number, "null"]
          description: First ask price in the bucket.
        high_ask:
          type: [number, "null"]
          description: Highest ask price in the bucket.
        low_ask:
          type: [number, "null"]
          description: Lowest ask price in the bucket.
        close_ask:
          type: [number, "null"]
          description: Last ask price in the bucket.
        ask_volume:
          type: [integer, "null"]
          description: Last observed ask volume in the bucket.
        open_bid:
          type: [number, "null"]
          description: First bid price in the bucket.
        high_bid:
          type: [number, "null"]
          description: Highest bid price in the bucket.
        low_bid:
          type: [number, "null"]
          description: Lowest bid price in the bucket.
        close_bid:
          type: [number, "null"]
          description: Last bid price in the bucket.
        sample_count:
          type: integer
          description: Number of underlying 5-minute observations aggregated into this bucket.
        open_time:
          type: [string, "null"]
          format: date-time
          description: Timestamp of the first observation inside this bucket. Distinct from `bucket` (the interval boundary).
        close_time:
          type: [string, "null"]
          format: date-time
          description: Timestamp of the last observation inside this bucket. Distinct from `bucket` (the interval boundary).
    HistoryBucket:
      type: object
      required:
        - bucket
      description: A single OHLC time bucket. `bucket` is the interval boundary (UTC-aligned, deterministic); `open_time`/`close_time` on each per-source object are the actual first/last observation timestamps inside it.
      properties:
        bucket:
          type: string
          format: date-time
          description: Start of the time bucket. UTC-aligned to the interval boundary (e.g. `2026-01-08T19:00:00Z` for an `1h` bucket). Deterministic.
        buff:
          $ref: '#/components/schemas/BUFFOHLCSourceData'
        youpin:
          $ref: '#/components/schemas/YoupinOHLCSourceData'
        csfloat:
          $ref: '#/components/schemas/CsfloatOHLCSourceData'
        skinport:
          $ref: '#/components/schemas/SkinportOHLCSourceData'
        c5game:
          $ref: '#/components/schemas/C5GameOHLCSourceData'
        steam:
          $ref: '#/components/schemas/SteamOHLCSourceData'
    HistoryItem:
      type: object
      required:
        - market_hash_name
        - count
        - data
      description: OHLC time-series for a single item.
      properties:
        market_hash_name:
          type: string
          description: Canonical Steam `market_hash_name`.
        count:
          type: integer
          description: Number of buckets in `data`.
        data:
          type: array
          description: OHLC buckets in chronological order.
          items:
            $ref: '#/components/schemas/HistoryBucket'
        variants:
          type: object
          description: Per-variant OHLC time-series for items with Doppler and Gamma Doppler phases or Case Hardened tiers. Keyed by display name.
          additionalProperties:
            $ref: '#/components/schemas/HistoryVariant'
    HistoryVariant:
      type: object
      description: OHLC time-series for one Doppler or Gamma Doppler phase or Case Hardened tier.
      required:
        - market_hash_name
        - name
        - display_name
        - version
        - count
        - data
      properties:
        market_hash_name:
          type: string
          description: The base item's `market_hash_name`. The full variant name is `name`.
        name:
          type: string
          description: The variant's full `market_hash_name`, e.g. `★ Karambit | Doppler (Factory New) | Phase 1`.
        display_name:
          type: string
          description: Human-readable variant label (e.g. `Phase 1`, `Ruby`, `Tier 1`, `Blue Gem`).
        version:
          type: string
          description: Stable variant code. Switch on this in client code.
        count:
          type: integer
          description: Number of buckets in `data`.
        data:
          type: array
          description: OHLC buckets in chronological order.
          items:
            $ref: '#/components/schemas/HistoryBucket'
    HistoryRequest:
      type: object
      required:
        - items
        - start
      properties:
        items:
          type: array
          items:
            type: string
          maxItems: 100
          description: List of `market_hash_name` values (max 100).
          example:
            - USP-S | Printstream (Factory New)
        start:
          type: string
          description: Start date/time as YYYY-MM-DD or RFC3339, inclusive.
          example: '2026-08-19'
        end:
          type: string
          description: End date/time as YYYY-MM-DD or RFC3339, exclusive. Defaults to now.
          example: '2026-08-22'
        sources:
          type: array
          items:
            type: string
            enum:
              - buff
              - youpin
              - csfloat
              - skinport
              - steam
              - c5game
          description: Filter to specific sources. Defaults to all sources.
          example:
            - buff
            - csfloat
        interval:
          type: string
          enum:
            - 5m
            - 30m
            - 1h
            - 1d
          default: 5m
          description: Bucket interval. `5m` is limited to 14 days, `30m` to 90 days, `1h` to 365 days; `1d` is unlimited.
          example: 1h
        currency:
          type: string
          enum:
            - AUD
            - CAD
            - CHF
            - CNY
            - EUR
            - GBP
            - JPY
            - NZD
            - SGD
            - USD
          default: USD
          description: Currency for every price in the response.
    HistoryResponse:
      type: object
      required:
        - response_time
        - currency
        - start
        - end
        - interval
        - items
      description: Response shape for `POST /v1/prices/history`.
      properties:
        response_time:
          type: string
          format: date-time
          description: When the response was generated.
        currency:
          type: string
          description: Currency code for every price in the response. Matches the requested `currency`; defaults to `USD`.
        start:
          type: string
          format: date-time
          description: Effective start of the queried range, floored to the interval boundary. Inclusive.
        end:
          type: string
          format: date-time
          description: Effective end of the queried range, ceiled to the interval boundary. Exclusive.
        interval:
          type: string
          enum:
            - 5m
            - 30m
            - 1h
            - 1d
          description: Requested bucket interval.
        items:
          type: object
          description: Map of `market_hash_name` to OHLC time-series.
          additionalProperties:
            $ref: '#/components/schemas/HistoryItem'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ItemError'
          description: Per-item failures alongside successful results (partial success).
      example:
        response_time: '2026-08-23T22:00:06.628202571Z'
        currency: USD
        start: '2026-08-19T00:00:00Z'
        end: '2026-08-22T00:00:00Z'
        interval: 1h
        items:
          USP-S | Printstream (Factory New):
            market_hash_name: USP-S | Printstream (Factory New)
            count: 72
            data:
              - bucket: '2026-08-19T00:00:00Z'
                buff:
                  open_ask: 96.4
                  high_ask: 96.4
                  low_ask: 96.4
                  close_ask: 96.4
                  ask_volume: 491
                  open_bid: 93.44
                  high_bid: 93.44
                  low_bid: 93.44
                  close_bid: 93.44
                  bid_volume: 37
                  sample_count: 75
                  open_time: '2026-08-19T00:00:56Z'
                  close_time: '2026-08-19T00:58:50Z'
                youpin:
                  open_ask: 96.17
                  high_ask: 96.17
                  low_ask: 96.1
                  close_ask: 96.1
                  ask_volume: 539
                  open_bid: 94.46
                  high_bid: 94.61
                  low_bid: 94.46
                  close_bid: 94.61
                  bid_volume: 65
                  sample_count: 8
                  open_time: '2026-08-19T00:06:21.125Z'
                  close_time: '2026-08-19T00:58:45.114Z'
                csfloat:
                  open_ask: 95.76
                  high_ask: 95.76
                  low_ask: 95.76
                  close_ask: 95.76
                  ask_volume: 243
                  open_bid: 92.1
                  high_bid: 92.1
                  low_bid: 92.1
                  close_bid: 92.1
                  sample_count: 60
                  open_time: '2026-08-19T00:00:06.014Z'
                  close_time: '2026-08-19T00:54:39.374Z'
                skinport:
                  open_ask: 105.49
                  high_ask: 105.49
                  low_ask: 105.49
                  close_ask: 105.49
                  ask_volume: 64
                  sample_count: 60
                  open_time: '2026-08-19T00:00:10.488Z'
                  close_time: '2026-08-19T00:59:10.489Z'
                steam:
                  open_ask: 148.88
                  high_ask: 148.88
                  low_ask: 142.71
                  close_ask: 148.88
                  ask_volume: 70
                  open_bid: 146.02
                  high_bid: 146.02
                  low_bid: 146.02
                  close_bid: 146.02
                  bid_volume: 2649
                  sample_count: 20
                  open_time: '2026-08-19T00:02:12.821Z'
                  close_time: '2026-08-19T00:59:51.255Z'
                c5game:
                  open_ask: 99.42
                  high_ask: 99.42
                  low_ask: 98.63
                  close_ask: 98.63
                  ask_volume: 232
                  open_bid: 172.34
                  high_bid: 172.34
                  low_bid: 172.34
                  close_bid: 172.34
                  sample_count: 12
                  open_time: '2026-08-19T00:04:14.685Z'
                  close_time: '2026-08-19T00:08:44.192Z'
    ItemLiquidityItem:
      type: object
      required:
        - market_hash_name
      description: Item liquidity bucket and estimated sale time for a single item.
      properties:
        market_hash_name:
          type: string
          description: Canonical Steam `market_hash_name`.
        liquidity:
          type: string
          enum:
            - unknown
            - extremely_illiquid
            - very_illiquid
            - illiquid
            - moderate
            - liquid
            - very_liquid
            - extremely_liquid
          description: Item liquidity bucket, recomputed daily.
        estimated_sale_time:
          type: string
          enum:
            - under 1 hour
            - 1 - 2 hours
            - 2 - 6 hours
            - 6 - 12 hours
            - 12 - 24 hours
            - 1 - 2 days
            - 2 - 3 days
            - 3 - 4 days
            - 4 - 5 days
            - 5 - 7 days
            - 7 - 10 days
            - 10 - 14 days
            - 2 - 3 weeks
            - 3 - 4 weeks
            - 1 - 1.5 months
            - 1.5 - 2 months
            - 2+ months
            - unknown
          description: 80th-percentile estimated time for a competitively priced listing to sell.
        variants:
          type: object
          description: Per-variant item liquidity keyed by display name.
          additionalProperties:
            $ref: '#/components/schemas/ItemLiquidityVariant'
    ItemLiquidityVariant:
      type: object
      description: Liquidity bucket and estimated sale time for one Doppler or Gamma Doppler phase or Case Hardened tier.
      required:
        - market_hash_name
        - name
        - display_name
        - version
        - liquidity
        - estimated_sale_time
      properties:
        market_hash_name:
          type: string
          description: The base item's `market_hash_name`. The full variant name is `name`.
        name:
          type: string
          description: The variant's full `market_hash_name`, e.g. `★ Karambit | Doppler (Factory New) | Phase 1`.
        display_name:
          type: string
          description: Human-readable variant label (e.g. `Phase 1`, `Ruby`, `Tier 1`, `Blue Gem`).
        version:
          type: string
          description: Stable variant code. Switch on this in client code.
        liquidity:
          type: string
          description: Item liquidity bucket, recomputed daily.
          enum:
            - unknown
            - extremely_illiquid
            - very_illiquid
            - illiquid
            - moderate
            - liquid
            - very_liquid
            - extremely_liquid
        estimated_sale_time:
          type: string
          description: 80th-percentile estimated time for a competitively priced listing to sell.
          enum:
            - under 1 hour
            - 1 - 2 hours
            - 2 - 6 hours
            - 6 - 12 hours
            - 12 - 24 hours
            - 1 - 2 days
            - 2 - 3 days
            - 3 - 4 days
            - 4 - 5 days
            - 5 - 7 days
            - 7 - 10 days
            - 10 - 14 days
            - 2 - 3 weeks
            - 3 - 4 weeks
            - 1 - 1.5 months
            - 1.5 - 2 months
            - 2+ months
            - unknown
    ItemLiquidityGetResponse:
      type: object
      required:
        - response_time
        - run_date
        - items
      description: All-items liquidity snapshot. Returned by `GET /v1/liquidity/items`.
      properties:
        response_time:
          type: string
          format: date-time
          description: When the snapshot was computed.
        run_date:
          type: string
          format: date
          description: UTC date for the daily computation.
        items:
          type: object
          description: Map of `market_hash_name` to item liquidity data.
          additionalProperties:
            $ref: '#/components/schemas/ItemLiquidityItem'
      example:
        response_time: '2026-08-23T00:00:16.2Z'
        run_date: '2026-08-23'
        items:
          USP-S | Printstream (Factory New):
            market_hash_name: USP-S | Printstream (Factory New)
            liquidity: very_liquid
            estimated_sale_time: 1 - 2 hours
    BUFFMarketFloatRange:
      type: object
      description: Numeric range for a `float` or `fade` bucket. `min` is inclusive, `max` is exclusive.
      properties:
        min:
          type: number
          description: Inclusive lower bound.
        max:
          type: number
          description: Exclusive upper bound.
    BUFFMarketFloatLatestBucket:
      type: object
      required:
        - bucket_id
        - bucket_type
      description: One latest BUFF float or fade range bucket, identified by `bucket_type`.
      properties:
        bucket_id:
          type: string
          description: Stable bucket identifier (e.g. `base`, `float:0.15:0.18`, `variant:p2|float:0.00:0.01`).
        bucket_type:
          type: string
          enum:
            - base
            - float
            - fade
            - float_fade
          description: |
            Bucket stratification.
            - `base`: aggregated across the entire item or variant.
            - `float`: float-range slice (see `float`).
            - `fade`: fade-percentage slice (see `fade`).
            - `float_fade`: combined float and fade slice.
        float:
          $ref: '#/components/schemas/BUFFMarketFloatRange'
        fade:
          $ref: '#/components/schemas/BUFFMarketFloatRange'
        updated_at:
          type: string
          format: date-time
          description: When BUFF last refreshed this bucket.
        collected_at:
          type: string
          format: date-time
          description: When cs2.sh collected this bucket.
        ask:
          type: number
          description: Lowest ask price (USD) in this bucket.
        avg_ask:
          type: number
          description: Average ask price (USD) in the bucket.
        bid:
          type: number
          description: Highest buy-order price (USD) on BUFF.
        ask_volume:
          type: integer
          description: Number of items listed for sale in this bucket.
        bid_volume:
          type: integer
          description: Number of active buy orders against this bucket.
    BUFFMarketFloatHistoryPoint:
      type: object
      required:
        - bucket
        - open_time
        - close_time
      description: A single OHLC observation inside a BUFF market float/fade bucket history.
      properties:
        bucket:
          type: string
          format: date-time
          description: UTC-aligned start of the OHLC interval.
        updated_at:
          type: string
          format: date-time
          description: When BUFF last refreshed the bucket inside this interval.
        collected_at:
          type: string
          format: date-time
          description: When cs2.sh collected the source rows inside this interval.
        open_ask:
          type: number
          description: First ask price (USD) observed in the interval.
        high_ask:
          type: number
          description: Highest ask price (USD) observed in the interval.
        low_ask:
          type: number
          description: Lowest ask price (USD) observed in the interval.
        close_ask:
          type: number
          description: Last ask price (USD) observed in the interval.
        open_avg_ask:
          type: number
          description: First `avg_ask` value observed in the interval.
        high_avg_ask:
          type: number
          description: Highest `avg_ask` value observed in the interval.
        low_avg_ask:
          type: number
          description: Lowest `avg_ask` value observed in the interval.
        close_avg_ask:
          type: number
          description: Last `avg_ask` value observed in the interval.
        open_bid:
          type: number
          description: First bid price (USD) observed in the interval.
        high_bid:
          type: number
          description: Highest bid price (USD) observed in the interval.
        low_bid:
          type: number
          description: Lowest bid price (USD) observed in the interval.
        close_bid:
          type: number
          description: Last bid price (USD) observed in the interval.
        ask_volume:
          type: integer
          description: Last observed ask volume inside the interval.
        bid_volume:
          type: integer
          description: Last observed bid volume inside the interval.
        open_time:
          type: string
          format: date-time
          description: Timestamp of the first observation inside the interval. Distinct from `bucket` (the interval boundary).
        close_time:
          type: string
          format: date-time
          description: Timestamp of the last observation inside the interval. Distinct from `bucket` (the interval boundary).
    BUFFMarketFloatHistoryBucket:
      type: object
      required:
        - bucket_id
        - bucket_type
        - data
      description: OHLC history for one BUFF market bucket. Each entry in `data` is one interval, in chronological order.
      properties:
        bucket_id:
          type: string
          description: Stable bucket identifier (e.g. `fade:99:100`, `variant:p2|float:0.00:0.01`).
        bucket_type:
          type: string
          enum:
            - base
            - float
            - fade
            - float_fade
          description: Bucket stratification. See `BUFFMarketFloatLatestBucket.bucket_type`.
        float:
          $ref: '#/components/schemas/BUFFMarketFloatRange'
        fade:
          $ref: '#/components/schemas/BUFFMarketFloatRange'
        data:
          type: array
          description: OHLC observations for this bucket, chronological.
          items:
            $ref: '#/components/schemas/BUFFMarketFloatHistoryPoint'
    BUFFMarketFloatVariant:
      type: object
      required:
        - market_hash_name
        - name
        - display_name
        - version
        - buckets
      description: BUFF latest data for a single variant of an item (Doppler or Gamma Doppler phase or Case Hardened tier).
      properties:
        market_hash_name:
          type: string
          description: The base item's `market_hash_name`. The full variant name is `name`.
        name:
          type: string
          description: The variant's full `market_hash_name`, e.g. `★ Karambit | Doppler (Factory New) | Phase 1`.
        display_name:
          type: string
          description: Human-readable variant label (e.g. `Phase 1`, `Ruby`, `Tier 1`, `Blue Gem`).
        version:
          type: string
          description: Stable variant code. Switch on this in client code.
        buckets:
          type: array
          description: Latest BUFF buckets for this variant.
          items:
            $ref: '#/components/schemas/BUFFMarketFloatLatestBucket'
    BUFFMarketFloatHistoryVariant:
      type: object
      required:
        - market_hash_name
        - name
        - display_name
        - version
        - buckets
      description: BUFF OHLC history for a single variant of an item.
      properties:
        market_hash_name:
          type: string
          description: The base item's `market_hash_name`. The full variant name is `name`.
        name:
          type: string
          description: The variant's full `market_hash_name`, e.g. `★ Karambit | Doppler (Factory New) | Phase 1`.
        display_name:
          type: string
          description: Human-readable variant label (e.g. `Phase 1`, `Ruby`, `Tier 1`, `Blue Gem`).
        version:
          type: string
          description: Stable variant code. Switch on this in client code.
        buckets:
          type: array
          description: OHLC history per bucket for this variant.
          items:
            $ref: '#/components/schemas/BUFFMarketFloatHistoryBucket'
    BUFFMarketFloatItem:
      type: object
      required:
        - market_hash_name
      description: BUFF market float/fade data for one item.
      properties:
        market_hash_name:
          type: string
          description: Canonical Steam `market_hash_name`.
        buckets:
          type: array
          description: Latest BUFF buckets for the base listing.
          items:
            $ref: '#/components/schemas/BUFFMarketFloatLatestBucket'
        variants:
          type: object
          description: Per-variant BUFF data for items with Doppler and Gamma Doppler phases or Case Hardened tiers. Keyed by display name (e.g. `Phase 1`, `Ruby`, `Tier 1`).
          additionalProperties:
            $ref: '#/components/schemas/BUFFMarketFloatVariant'
    BUFFMarketFloatHistoryItem:
      type: object
      required:
        - market_hash_name
      description: BUFF market float/fade OHLC history for one item.
      properties:
        market_hash_name:
          type: string
          description: Canonical Steam `market_hash_name`.
        buckets:
          type: array
          description: OHLC history for the base listing's buckets.
          items:
            $ref: '#/components/schemas/BUFFMarketFloatHistoryBucket'
        variants:
          type: object
          description: Per-variant OHLC history for items with Doppler and Gamma Doppler phases or Case Hardened tiers. Keyed by display name.
          additionalProperties:
            $ref: '#/components/schemas/BUFFMarketFloatHistoryVariant'
    BUFFMarketFloatLatestResponse:
      type: object
      required:
        - response_time
        - currency
        - items
      description: All-items BUFF float and fade range snapshot. Returned by `GET /v1/market/buff/latest`; all prices are USD.
      properties:
        response_time:
          type: string
          format: date-time
          description: When the response was generated.
        currency:
          type: string
          description: Currency code for every price in the response. Matches the requested `currency`; defaults to `USD`.
        items:
          type: object
          description: Map of `market_hash_name` to per-item BUFF data.
          additionalProperties:
            $ref: '#/components/schemas/BUFFMarketFloatItem'
      example:
        response_time: '2026-08-23T22:00:06.665088573Z'
        currency: USD
        items:
          AK-47 | Case Hardened (Field-Tested):
            market_hash_name: AK-47 | Case Hardened (Field-Tested)
            buckets:
              - bucket_id: base
                bucket_type: base
                updated_at: '2026-08-23T21:46:14Z'
                collected_at: '2026-08-23T21:50:54.847Z'
                ask: 216.49
                avg_ask: 217.84
                bid: 202.35
                ask_volume: 985
                bid_volume: 22
              - bucket_id: float:0.15:0.18
                bucket_type: float
                float:
                  min: 0.15
                  max: 0.18
                updated_at: '2026-08-23T21:46:14Z'
                collected_at: '2026-08-23T21:50:54.847Z'
                ask: 216.93
                avg_ask: 225.31
                bid: 202.35
                ask_volume: 219
                bid_volume: 7
          ★ M9 Bayonet | Doppler (Factory New):
            market_hash_name: ★ M9 Bayonet | Doppler (Factory New)
            variants:
              Phase 2:
                market_hash_name: ★ M9 Bayonet | Doppler (Factory New)
                name: ★ M9 Bayonet | Doppler (Factory New) | Phase 2
                display_name: Phase 2
                version: p2
                buckets:
                  - bucket_id: variant:p2
                    bucket_type: base
                    updated_at: '2026-08-23T21:46:30Z'
                    collected_at: '2026-08-23T21:50:54.847Z'
                    ask: 1217.82
                    avg_ask: 1249.35
                    bid: 1167.98
                    ask_volume: 280
                    bid_volume: 15
                  - bucket_id: variant:p2|float:0.00:0.01
                    bucket_type: float
                    float:
                      min: 0
                      max: 0.01
                    updated_at: '2026-08-23T21:46:30Z'
                    collected_at: '2026-08-23T21:50:54.847Z'
                    ask: 1294.3
                    avg_ask: 1334.61
                    bid: 1178.4
                    ask_volume: 61
                    bid_volume: 19
    BUFFMarketFloatHistoryRequest:
      type: object
      required:
        - items
        - start
      properties:
        items:
          type: array
          items:
            type: string
          maxItems: 100
          description: List of `market_hash_name` values (max 100).
          example:
            - ★ Bayonet | Fade (Factory New)
            - AK-47 | Case Hardened (Field-Tested)
        start:
          type: string
          description: Start date/time as YYYY-MM-DD or RFC3339, inclusive.
          example: '2026-08-19'
        end:
          type: string
          description: End date/time as YYYY-MM-DD or RFC3339, exclusive. Defaults to now.
          example: '2026-08-22'
        interval:
          type: string
          description: Bucket interval. `30m` is limited to 90 days, `1h` to 365 days; `1d` is unlimited.
          enum:
            - 30m
            - 1h
            - 1d
          default: 30m
          example: 1h
        currency:
          type: string
          enum:
            - AUD
            - CAD
            - CHF
            - CNY
            - EUR
            - GBP
            - JPY
            - NZD
            - SGD
            - USD
          default: USD
          description: Currency for every price in the response.
    BUFFMarketFloatHistoryResponse:
      type: object
      required:
        - response_time
        - currency
        - start
        - end
        - interval
        - items
      description: Response shape for `POST /v1/market/buff/history`. Returns OHLC history for each requested BUFF market float/fade bucket.
      properties:
        response_time:
          type: string
          format: date-time
          description: When the response was generated.
        currency:
          type: string
          description: Currency code for every price in the response. Matches the requested `currency`; defaults to `USD`.
        start:
          type: string
          format: date-time
          description: Effective start of the queried range, floored to the interval boundary. Inclusive.
        end:
          type: string
          format: date-time
          description: Effective end of the queried range, ceiled to the interval boundary. Exclusive.
        interval:
          type: string
          enum:
            - 30m
            - 1h
            - 1d
          description: Requested bucket interval.
        items:
          type: object
          description: Map of `market_hash_name` to per-item BUFF history.
          additionalProperties:
            $ref: '#/components/schemas/BUFFMarketFloatHistoryItem'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ItemError'
          description: Per-item failures alongside successful results (partial success).
      example:
        response_time: '2026-08-23T22:00:10.79320126Z'
        currency: USD
        start: '2026-08-19T00:00:00Z'
        end: '2026-08-22T00:00:00Z'
        interval: 1h
        items:
          ★ Bayonet | Fade (Factory New):
            market_hash_name: ★ Bayonet | Fade (Factory New)
            buckets:
              - bucket_id: base
                bucket_type: base
                data:
                  - bucket: '2026-08-19T00:00:00Z'
                    updated_at: '2026-08-19T00:46:26Z'
                    collected_at: '2026-08-19T00:50:54.557Z'
                    open_ask: 351.04
                    high_ask: 351.04
                    low_ask: 350.9
                    close_ask: 350.9
                    open_avg_ask: 355.21
                    high_avg_ask: 355.21
                    low_avg_ask: 355.05
                    close_avg_ask: 355.05
                    open_bid: 336.8
                    high_bid: 336.8
                    low_bid: 336.67
                    close_bid: 336.67
                    ask_volume: 178
                    bid_volume: 15
                    open_time: '2026-08-19T00:00:54.125Z'
                    close_time: '2026-08-19T00:50:54.557Z'
    CSFloatBuyOrder:
      type: object
      description: One standing CSFloat buy order. Its conditions live in `conditions`.
      required:
        - price
        - kind
        - conditions
      properties:
        price:
          type: number
          description: Order price in USD.
        quantity:
          type: integer
          description: Number of items wanted at this price.
        kind:
          type: string
          enum:
            - generic
            - paint_index
            - float
            - sticker
            - keychain_pattern
            - paint_seeds
            - keychain
            - mixed
          description: Summary of the matching rules in `conditions`. `generic` has no rules; `mixed` contains multiple rule families or a rule cs2.sh doesn't recognize.
        conditions:
          $ref: '#/components/schemas/CSFloatBuyOrderConditions'
    CSFloatBuyOrderConditions:
      type: object
      description: Rules a listing must satisfy for this order to buy it. When several rules are present, all must match. Empty for `generic` orders. A `mixed` order can also carry unrecognized CSFloat rule keys verbatim.
      additionalProperties: true
      properties:
        paint_index:
          type: integer
          description: The listing's paint index must equal this value.
        min_float:
          type: number
          description: The listing's float value must be greater than or equal to this value.
        max_float:
          type: number
          description: The listing's float value must be less than or equal to this value.
        stickers:
          type: array
          items:
            $ref: '#/components/schemas/CSFloatStickerCondition'
          description: The listing must satisfy every sticker requirement in this array. Repeating a sticker ID requires multiple copies of that sticker.
        min_keychain_pattern:
          type: integer
          description: The applied charm's pattern value must be greater than or equal to this value.
        max_keychain_pattern:
          type: integer
          description: The applied charm's pattern value must be less than or equal to this value.
        paint_seeds:
          type: array
          items:
            type: integer
          description: The listing's paint seed must equal one of these values.
        keychains:
          type: array
          items:
            $ref: '#/components/schemas/CSFloatKeychainCondition'
          description: The listing must have every charm identified in this array.
    CSFloatStickerCondition:
      type: object
      description: One sticker the listing must have.
      required:
        - sId
      additionalProperties: true
      properties:
        sId:
          type: integer
          description: Numeric CSFloat ID of the sticker the listing must have.
        s:
          type: integer
          minimum: 0
          description: Zero-based slot that must contain this sticker. If omitted, the sticker may be in any slot.
    CSFloatKeychainCondition:
      type: object
      description: One charm the listing must have.
      required:
        - sId
      additionalProperties: true
      properties:
        sId:
          type: integer
          description: Numeric CSFloat ID of the charm the listing must have.
    CSFloatBuyOrdersItem:
      type: object
      description: A base item's buy-order book. Book fields are absent when the entry exists only to carry phase books under `variants`.
      required:
        - market_hash_name
      properties:
        market_hash_name:
          type: string
          description: Canonical Steam `market_hash_name`.
        updated_at:
          type: string
          format: date-time
          description: When this book was last updated.
        collected_at:
          type: string
          format: date-time
          description: When cs2.sh collected this book.
        top_generic_bid:
          type: [number, "null"]
          description: Highest order price (USD) with no conditions. `null` when there are no generic orders.
        orders:
          type: array
          description: Price-descending order ladder.
          items:
            $ref: '#/components/schemas/CSFloatBuyOrder'
        variants:
          type: object
          description: Doppler and Gamma Doppler phase books keyed by display name.
          additionalProperties:
            $ref: '#/components/schemas/CSFloatBuyOrdersVariant'
    CSFloatBuyOrdersVariant:
      type: object
      description: One Doppler or Gamma Doppler phase's buy-order book.
      required:
        - market_hash_name
        - name
        - display_name
        - version
        - updated_at
        - collected_at
        - top_generic_bid
        - orders
      properties:
        market_hash_name:
          type: string
          description: The base item's `market_hash_name`. The full variant name is `name`.
        name:
          type: string
          description: The variant's full `market_hash_name`, e.g. `★ Karambit | Doppler (Factory New) | Phase 1`.
        display_name:
          type: string
          description: Human-readable variant label (e.g. `Phase 2`, `Ruby`).
        version:
          type: string
          description: Stable variant code. Switch on this in client code.
        updated_at:
          type: string
          format: date-time
          description: When this book was last updated.
        collected_at:
          type: string
          format: date-time
          description: When cs2.sh collected this book.
        top_generic_bid:
          type: [number, "null"]
          description: Highest order price (USD) with no conditions. `null` when there are no generic orders.
        orders:
          type: array
          description: Price-descending order ladder.
          items:
            $ref: '#/components/schemas/CSFloatBuyOrder'
    CSFloatBuyOrdersLatestResponse:
      type: object
      description: Current CSFloat buy-order books for every item with standing orders. Returned by `GET /v1/market/csfloat/latest`. A book expires 12 hours after its observation time, the same window as `bid` on `/v1/prices/latest`.
      required:
        - response_time
        - currency
        - items
      properties:
        response_time:
          type: string
          format: date-time
          description: When this snapshot response was generated.
        currency:
          type: string
          description: Currency code for every price in the response. Matches the requested `currency`; defaults to `USD`.
        items:
          type: object
          description: Items with current buy-order books, keyed by `market_hash_name`.
          additionalProperties:
            $ref: '#/components/schemas/CSFloatBuyOrdersItem'
      example:
        response_time: '2026-08-23T21:59:41.701806658Z'
        currency: USD
        items:
          USP-S | Printstream (Factory New):
            market_hash_name: USP-S | Printstream (Factory New)
            updated_at: '2026-08-23T21:54:42.008Z'
            collected_at: '2026-08-23T21:55:35.051Z'
            top_generic_bid: 92.6
            orders:
              - price: 93.3
                quantity: 1
                kind: float
                conditions:
                  min_float: 0
                  max_float: 0.04
              - price: 93.2
                quantity: 1
                kind: float
                conditions:
                  min_float: 0
                  max_float: 0.04
              - price: 92.6
                quantity: 1
                kind: float
                conditions:
                  min_float: 0.03
                  max_float: 0.04
          ★ Karambit | Doppler (Factory New):
            market_hash_name: ★ Karambit | Doppler (Factory New)
            updated_at: '2026-08-23T21:54:42.871Z'
            collected_at: '2026-08-23T21:55:35.051Z'
            top_generic_bid: null
            orders:
              - price: 6800
                quantity: 1
                kind: paint_index
                conditions:
                  paint_index: 415
              - price: 6790
                quantity: 1
                kind: paint_index
                conditions:
                  paint_index: 415
            variants:
              Phase 2:
                market_hash_name: ★ Karambit | Doppler (Factory New)
                name: ★ Karambit | Doppler (Factory New) | Phase 2
                display_name: Phase 2
                version: p2
                updated_at: '2026-08-23T21:57:12.655Z'
                collected_at: '2026-08-23T21:57:35.153Z'
                top_generic_bid: 1190
                orders:
                  - price: 1650
                    quantity: 1
                    kind: paint_index
                    conditions:
                      paint_index: 419
                  - price: 1640
                    quantity: 1
                    kind: paint_index
                    conditions:
                      paint_index: 419
              Ruby:
                market_hash_name: ★ Karambit | Doppler (Factory New)
                name: ★ Karambit | Doppler (Factory New) | Ruby
                display_name: Ruby
                version: ruby
                updated_at: '2026-08-23T21:10:37.529Z'
                collected_at: '2026-08-23T21:11:32.943Z'
                top_generic_bid: 1190
                orders:
                  - price: 6800
                    quantity: 1
                    kind: paint_index
                    conditions:
                      paint_index: 415
                  - price: 6790
                    quantity: 1
                    kind: paint_index
                    conditions:
                      paint_index: 415
    CSFloatBuyOrdersHistoryRequest:
      type: object
      required:
        - items
      properties:
        items:
          type: array
          items:
            type: string
          minItems: 1
          maxItems: 100
          description: List of base or Doppler/Gamma Doppler phase `market_hash_name` values (max 100).
          example:
            - ★ Karambit | Doppler (Factory New)
        start:
          type: string
          description: Start date/time as YYYY-MM-DD or RFC3339, inclusive. Data begins 2026-08-10.
          example: '2026-08-10'
        end:
          type: string
          description: End date/time as YYYY-MM-DD or RFC3339, exclusive. Defaults to now.
          example: '2026-08-23'
        interval:
          type: string
          enum:
            - 1h
            - 1d
          default: 1h
          description: Bucket interval. `1h` is limited to 365 days; `1d` is unlimited.
          example: 1h
        currency:
          type: string
          enum:
            - AUD
            - CAD
            - CHF
            - CNY
            - EUR
            - GBP
            - JPY
            - NZD
            - SGD
            - USD
          default: USD
          description: Currency for every price in the response.
    CSFloatBuyOrdersHistoryPoint:
      type: object
      description: The newest buy-order book observed in one UTC bucket. This is point-in-time book state, not OHLC data.
      required:
        - bucket
        - updated_at
        - collected_at
        - top_generic_bid
        - orders
      properties:
        bucket:
          type: string
          format: date-time
          description: UTC bucket start.
        updated_at:
          type: string
          format: date-time
          description: When the book in this bucket was last updated.
        collected_at:
          type: string
          format: date-time
          description: When cs2.sh collected the book represented by this bucket.
        top_generic_bid:
          type: [number, "null"]
          description: Highest order price (USD) with no conditions. `null` when there are no generic orders.
        orders:
          type: array
          description: Price-descending order ladder.
          items:
            $ref: '#/components/schemas/CSFloatBuyOrder'
    CSFloatBuyOrdersHistoryItem:
      type: object
      description: CSFloat buy-order book history for one base item. Phase series nest under `variants`.
      required:
        - market_hash_name
        - count
        - data
      properties:
        market_hash_name:
          type: string
          description: Canonical Steam `market_hash_name`.
        count:
          type: integer
          description: Number of points in `data`.
        data:
          type: array
          description: Points in chronological order.
          items:
            $ref: '#/components/schemas/CSFloatBuyOrdersHistoryPoint'
        variants:
          type: object
          description: Doppler and Gamma Doppler phase series keyed by display name.
          additionalProperties:
            $ref: '#/components/schemas/CSFloatBuyOrdersHistoryVariant'
    CSFloatBuyOrdersHistoryVariant:
      type: object
      description: CSFloat buy-order book history for one Doppler or Gamma Doppler phase.
      required:
        - market_hash_name
        - name
        - display_name
        - version
        - count
        - data
      properties:
        market_hash_name:
          type: string
          description: The base item's `market_hash_name`. The full variant name is `name`.
        name:
          type: string
          description: The variant's full `market_hash_name`, e.g. `★ Karambit | Doppler (Factory New) | Phase 1`.
        display_name:
          type: string
          description: Human-readable variant label (e.g. `Phase 2`, `Ruby`).
        version:
          type: string
          description: Stable variant code. Switch on this in client code.
        count:
          type: integer
          description: Number of points in `data`.
        data:
          type: array
          description: Points in chronological order.
          items:
            $ref: '#/components/schemas/CSFloatBuyOrdersHistoryPoint'
    CSFloatBuyOrdersHistoryResponse:
      type: object
      description: Response shape for `POST /v1/market/csfloat/history`. Valid requested items with no rows are reported in `errors`.
      required:
        - response_time
        - currency
        - start
        - end
        - interval
        - items
      properties:
        response_time:
          type: string
          format: date-time
          description: When the response was generated.
        currency:
          type: string
          description: Currency code for every price in the response. Matches the requested `currency`; defaults to `USD`.
        start:
          type: string
          format: date-time
          description: Effective start of the queried range, floored to the interval boundary. Inclusive.
        end:
          type: string
          format: date-time
          description: Effective end of the queried range, ceiled to the interval boundary. Exclusive.
        interval:
          type: string
          enum:
            - 1h
            - 1d
          description: Requested bucket interval.
        items:
          type: object
          description: Map of `market_hash_name` to returned buy-order book history.
          additionalProperties:
            $ref: '#/components/schemas/CSFloatBuyOrdersHistoryItem'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ItemError'
          description: Per-item failures alongside successful results (partial success).
      example:
        response_time: '2026-08-23T22:00:11.929760469Z'
        currency: USD
        start: '2026-08-20T00:00:00Z'
        end: '2026-08-22T00:00:00Z'
        interval: 1h
        items:
          ★ Karambit | Doppler (Factory New):
            market_hash_name: ★ Karambit | Doppler (Factory New)
            count: 48
            data:
              - bucket: '2026-08-20T00:00:00Z'
                updated_at: '2026-08-20T00:55:11.258Z'
                collected_at: '2026-08-20T00:56:10.301Z'
                top_generic_bid: null
                orders:
                  - price: 6550
                    quantity: 1
                    kind: paint_index
                    conditions:
                      paint_index: 417
                  - price: 4290
                    quantity: 1
                    kind: paint_index
                    conditions:
                      paint_index: 416
            variants:
              Phase 2:
                market_hash_name: ★ Karambit | Doppler (Factory New)
                name: ★ Karambit | Doppler (Factory New) | Phase 2
                display_name: Phase 2
                version: p2
                count: 46
                data:
                  - bucket: '2026-08-20T00:00:00Z'
                    updated_at: '2026-08-20T00:57:14.824Z'
                    collected_at: '2026-08-20T00:58:10.396Z'
                    top_generic_bid: 1230
                    orders:
                      - price: 1630
                        quantity: 1
                        kind: paint_index
                        conditions:
                          paint_index: 419
                      - price: 1620
                        quantity: 1
                        kind: paint_index
                        conditions:
                          paint_index: 419
    SteamOrderbookTop:
      type: object
      description: 'Top of book for a Steam orderbook: lowest ask and highest bid. Each field is `null` when that side is absent.'
      required:
        - ask
        - ask_volume
        - bid
        - bid_volume
      properties:
        ask:
          type: [number, "null"]
          description: Lowest ask price in USD, or `null` when absent.
        ask_volume:
          type: [integer, "null"]
          description: Total Steam sell-order count, or `null` when absent.
        bid:
          type: [number, "null"]
          description: Highest buy-order price in USD, or `null` when absent.
        bid_volume:
          type: [integer, "null"]
          description: Total Steam buy-order count, or `null` when absent.
    SteamOrderbookDepthSide:
      type: object
      description: One side of the orderbook ladder in columnar form. `prices[i]` pairs with `volumes[i]`; each `volume` is the quantity available at that exact price, not cumulative.
      required:
        - prices
        - volumes
      properties:
        prices:
          type: array
          description: Decimal USD prices. Asks ascending, bids descending.
          items:
            type: number
        volumes:
          type: array
          description: Quantity available at each corresponding price.
          items:
            type: integer
    SteamOrderbookDepth:
      type: object
      description: Full-depth Steam orderbook ladders in columnar form.
      required:
        - ask_levels
        - bid_levels
        - asks
        - bids
      properties:
        ask_levels:
          type: integer
          description: Number of ask levels in `asks`.
        bid_levels:
          type: integer
          description: Number of bid levels in `bids`.
        asks:
          $ref: '#/components/schemas/SteamOrderbookDepthSide'
        bids:
          $ref: '#/components/schemas/SteamOrderbookDepthSide'
    SteamOrderbookItem:
      type: object
      description: Latest full-depth Steam orderbook for one regular item.
      required:
        - updated_at
        - collected_at
        - top
        - depth
      properties:
        updated_at:
          type: string
          format: date-time
          description: When Steam last updated this orderbook.
        collected_at:
          type: string
          format: date-time
          description: When cs2.sh collected this orderbook.
        top:
          $ref: '#/components/schemas/SteamOrderbookTop'
        depth:
          $ref: '#/components/schemas/SteamOrderbookDepth'
    SteamOrderbookLatestResponse:
      type: object
      description: Latest Steam orderbook snapshot for all tracked regular items. Returned by `GET /v1/market/steam/latest`; variants are not supported.
      required:
        - response_time
        - currency
        - items
      properties:
        response_time:
          type: string
          format: date-time
          description: When this snapshot response was generated.
        currency:
          type: string
          description: Currency code for every price in the response. Matches the requested `currency`; defaults to `USD`.
        items:
          type: object
          description: Regular items with current orderbook data, keyed by `market_hash_name`.
          additionalProperties:
            $ref: '#/components/schemas/SteamOrderbookItem'
      example:
        response_time: '2026-08-23T21:59:42.578056003Z'
        currency: USD
        items:
          USP-S | Printstream (Factory New):
            updated_at: '2026-08-23T21:56:50.48Z'
            collected_at: '2026-08-23T21:58:05.789Z'
            top:
              ask: 144.99
              ask_volume: 75
              bid: 143.09
              bid_volume: 2537
            depth:
              ask_levels: 2
              bid_levels: 2
              asks:
                prices: [144.99, 145.38]
                volumes: [1, 1]
              bids:
                prices: [143.09, 142.85]
                volumes: [1, 1]
    SteamOrderbookHistoryRequest:
      type: object
      required:
        - items
        - start
        - interval
      properties:
        items:
          type: array
          items:
            type: string
          minItems: 1
          maxItems: 100
          description: List of regular `market_hash_name` values (max 100). Variants are not supported.
          example:
            - USP-S | Printstream (Factory New)
        start:
          type: string
          description: Start date/time as YYYY-MM-DD or RFC3339, inclusive.
          example: '2026-08-19'
        end:
          type: string
          description: End date/time as YYYY-MM-DD or RFC3339, exclusive. Defaults to now.
          example: '2026-08-22'
        interval:
          type: string
          enum:
            - 1h
            - 1d
          description: Bucket interval. `1h` is limited to 90 days; `1d` is unlimited.
          example: 1h
        currency:
          type: string
          enum:
            - AUD
            - CAD
            - CHF
            - CNY
            - EUR
            - GBP
            - JPY
            - NZD
            - SGD
            - USD
          default: USD
          description: Currency for every price in the response.
    SteamOrderbookHistoryPoint:
      type: object
      description: One latest-in-bucket full-depth Steam orderbook snapshot. This is not OHLC data.
      required:
        - bucket
        - updated_at
        - collected_at
        - top
        - depth
      properties:
        bucket:
          type: string
          format: date-time
          description: UTC bucket start.
        updated_at:
          type: string
          format: date-time
          description: When Steam last updated the orderbook represented by this bucket.
        collected_at:
          type: string
          format: date-time
          description: When cs2.sh collected the orderbook represented by this bucket.
        top:
          $ref: '#/components/schemas/SteamOrderbookTop'
        depth:
          $ref: '#/components/schemas/SteamOrderbookDepth'
    SteamOrderbookHistoryItem:
      type: object
      description: Steam orderbook bucket snapshots for one regular item. No variants are returned.
      required:
        - count
        - data
      properties:
        count:
          type: integer
          description: Number of points in `data`.
        data:
          type: array
          description: Points in chronological order.
          items:
            $ref: '#/components/schemas/SteamOrderbookHistoryPoint'
    SteamOrderbookHistoryResponse:
      type: object
      description: Response shape for `POST /v1/market/steam/history`. Valid regular items with no rows are omitted; if all valid regular items have no rows, `items` is empty.
      required:
        - response_time
        - currency
        - start
        - end
        - interval
        - items
      properties:
        response_time:
          type: string
          format: date-time
          description: When the response was generated.
        currency:
          type: string
          description: Currency code for every price in the response. Matches the requested `currency`; defaults to `USD`.
        start:
          type: string
          format: date-time
          description: Effective start of the queried range, floored to the interval boundary. Inclusive.
        end:
          type: string
          format: date-time
          description: Effective end of the queried range, ceiled to the interval boundary. Exclusive.
        interval:
          type: string
          enum:
            - 1h
            - 1d
          description: Requested bucket interval.
        items:
          type: object
          description: Map of `market_hash_name` to returned orderbook history.
          additionalProperties:
            $ref: '#/components/schemas/SteamOrderbookHistoryItem'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ItemError'
          description: Per-item failures alongside successful results (partial success).
      example:
        response_time: '2026-08-23T22:00:13.545963483Z'
        currency: USD
        start: '2026-08-19T00:00:00Z'
        end: '2026-08-22T00:00:00Z'
        interval: 1h
        items:
          USP-S | Printstream (Factory New):
            count: 72
            data:
              - bucket: '2026-08-19T00:00:00Z'
                updated_at: '2026-08-19T00:59:51.255Z'
                collected_at: '2026-08-19T00:59:56.08Z'
                top:
                  ask: 148.88
                  ask_volume: 70
                  bid: 146.02
                  bid_volume: 2649
                depth:
                  ask_levels: 1
                  bid_levels: 1
                  asks:
                    prices: [148.88]
                    volumes: [1]
                  bids:
                    prices: [146.02]
                    volumes: [1]
    ArchiveSteamRequest:
      type: object
      required:
        - items
        - start
        - interval
      properties:
        items:
          type: array
          items:
            type: string
          minItems: 1
          maxItems: 100
          description: List of regular `market_hash_name` values (max 100). Variants are not supported.
          example:
            - USP-S | Printstream (Factory New)
        start:
          type: string
          description: Start date/time as YYYY-MM-DD or RFC3339, inclusive.
          example: '2025-01-01'
        end:
          type: string
          description: End date/time as YYYY-MM-DD or RFC3339, exclusive. Defaults to now.
          example: '2025-02-01'
        interval:
          type: string
          enum:
            - 1h
            - 1d
          description: Native Steam bucket interval. Both intervals are unlimited in range.
          example: 1d
        currency:
          type: string
          enum:
            - AUD
            - CAD
            - CHF
            - CNY
            - EUR
            - GBP
            - JPY
            - NZD
            - SGD
            - USD
          default: USD
          description: Currency for every price in the response.
    ArchiveSteamBucket:
      type: object
      description: One native Steam sale-history bucket. `price` is Steam's median sale price and `volume` is the Steam purchase count.
      required:
        - bucket
        - price
        - volume
      properties:
        bucket:
          type: string
          format: date-time
          description: Native Steam bucket start.
        price:
          type: [number, "null"]
          description: Steam median sale price in USD.
        volume:
          type: [integer, "null"]
          description: Steam purchase count.
    ArchiveSteamItem:
      type: object
      description: Native Steam sale-history buckets for one regular item. No variants are returned.
      required:
        - market_hash_name
        - count
        - data
      properties:
        market_hash_name:
          type: string
          description: Canonical Steam `market_hash_name`.
        count:
          type: integer
          description: Number of buckets in `data`.
        data:
          type: array
          description: Buckets in chronological order.
          items:
            $ref: '#/components/schemas/ArchiveSteamBucket'
    ArchiveSteamResponse:
      type: object
      description: Response shape for `POST /v1/archive/steam`. Valid regular items with no rows return item-level `not_in_archive`; if every valid regular item has no rows, the endpoint returns `404 not_found`.
      required:
        - response_time
        - currency
        - start
        - end
        - interval
        - items
      properties:
        response_time:
          type: string
          format: date-time
          description: When the response was generated.
        currency:
          type: string
          description: Currency code for every price in the response. Matches the requested `currency`; defaults to `USD`.
        start:
          type: string
          format: date-time
          description: Effective start of the queried range, floored to the interval boundary. Inclusive.
        end:
          type: string
          format: date-time
          description: Effective end of the queried range, ceiled to the interval boundary. Exclusive.
        interval:
          type: string
          enum:
            - 1h
            - 1d
          description: Requested bucket interval.
        items:
          type: object
          description: Map of `market_hash_name` to native Steam sale-history buckets.
          additionalProperties:
            $ref: '#/components/schemas/ArchiveSteamItem'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ItemError'
          description: Per-item failures alongside successful results (partial success).
      example:
        response_time: '2026-08-23T22:00:09.293115Z'
        currency: USD
        start: '2025-01-01T00:00:00Z'
        end: '2025-02-01T00:00:00Z'
        interval: 1d
        items:
          USP-S | Printstream (Factory New):
            market_hash_name: USP-S | Printstream (Factory New)
            count: 31
            data:
              - bucket: '2025-01-01T00:00:00Z'
                price: 150.23
                volume: 7
    ItemError:
      type: object
      required:
        - item
        - code
        - message
      description: Error for one item in a partial-success response.
      properties:
        item:
          type: string
          description: The requested item name that failed.
        code:
          type: string
          enum:
            - unknown_item
            - not_in_cache
            - invalid_format
            - not_in_archive
            - unsupported_variant
            - unsupported_source
          description: Error code.
        message:
          type: string
          description: Human-readable error message.
    ArchiveCSFloatRequest:
      type: object
      required:
        - items
      properties:
        items:
          type: array
          items:
            type: string
          maxItems: 100
          description: List of `market_hash_name` values (max 100).
          example:
            - USP-S | Printstream (Factory New)
        start:
          type: string
          description: Start date/time as YYYY-MM-DD or RFC3339, inclusive. Defaults to 2020-01-01.
          example: '2024-01-01'
        end:
          type: string
          description: End date/time as YYYY-MM-DD or RFC3339, exclusive. Defaults to now.
          example: '2026-08-23'
        currency:
          type: string
          enum:
            - AUD
            - CAD
            - CHF
            - CNY
            - EUR
            - GBP
            - JPY
            - NZD
            - SGD
            - USD
          default: USD
          description: Currency for every price in the response.
    ArchiveCSFloatBucket:
      type: object
      required:
        - date
        - price
        - volume
      description: One day of sale data on CSFloat.
      properties:
        date:
          type: string
          description: Date in `YYYY-MM-DD` format (UTC).
        price:
          type: [number, "null"]
          description: Arithmetic average of all sale prices (USD) that day.
        volume:
          type: integer
          description: Number of sales that day.
    ArchiveCSFloatItem:
      type: object
      required:
        - market_hash_name
        - count
        - data
      description: CSFloat sale time-series for a single item.
      properties:
        market_hash_name:
          type: string
          description: Canonical Steam `market_hash_name`.
        count:
          type: integer
          description: Number of days in `data`.
        data:
          type: array
          description: Daily sale aggregates in chronological order.
          items:
            $ref: '#/components/schemas/ArchiveCSFloatBucket'
        variants:
          type: object
          description: Per-variant CSFloat sale time-series for items with Doppler and Gamma Doppler phases or Case Hardened tiers. Keyed by display name.
          additionalProperties:
            $ref: '#/components/schemas/ArchiveCSFloatVariant'
    ArchiveCSFloatVariant:
      type: object
      description: CSFloat sale time-series for one Doppler or Gamma Doppler phase or Case Hardened tier.
      required:
        - market_hash_name
        - name
        - display_name
        - version
        - count
        - data
      properties:
        market_hash_name:
          type: string
          description: The base item's `market_hash_name`. The full variant name is `name`.
        name:
          type: string
          description: The variant's full `market_hash_name`, e.g. `★ Karambit | Doppler (Factory New) | Phase 1`.
        display_name:
          type: string
          description: Human-readable variant label (e.g. `Phase 1`, `Ruby`, `Tier 1`, `Blue Gem`).
        version:
          type: string
          description: Stable variant code. Switch on this in client code.
        count:
          type: integer
          description: Number of days in `data`.
        data:
          type: array
          description: Daily sale aggregates in chronological order.
          items:
            $ref: '#/components/schemas/ArchiveCSFloatBucket'
    ArchiveCSFloatResponse:
      type: object
      required:
        - response_time
        - currency
        - start
        - end
        - items
      description: Response shape for `POST /v1/archive/csfloat`.
      properties:
        response_time:
          type: string
          format: date-time
          description: When the response was generated.
        currency:
          type: string
          description: Currency code for every price in the response. Matches the requested `currency`; defaults to `USD`.
        start:
          type: string
          format: date-time
          description: Effective start of the queried range, floored to the day boundary. Inclusive.
        end:
          type: string
          format: date-time
          description: Effective end of the queried range, ceiled to the day boundary. Exclusive.
        items:
          type: object
          description: Map of `market_hash_name` to CSFloat sale time-series.
          additionalProperties:
            $ref: '#/components/schemas/ArchiveCSFloatItem'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ItemError'
          description: Per-item failures alongside successful results (partial success).
      example:
        response_time: '2026-08-23T22:00:08.282900466Z'
        currency: USD
        start: '2026-05-25T00:00:00Z'
        end: '2026-08-22T00:00:00Z'
        items:
          USP-S | Printstream (Factory New):
            market_hash_name: USP-S | Printstream (Factory New)
            count: 89
            data:
              - date: '2026-05-25'
                price: 132.03
                volume: 12
              - date: '2026-05-26'
                price: 119.67
                volume: 10
    ArchiveBuffRequest:
      type: object
      additionalProperties: false
      required:
      - items
      properties:
        items:
          type: array
          items:
            type: string
          maxItems: 100
          description: List of `market_hash_name` values (max 100).
          example:
            - ★ Karambit | Doppler (Factory New)
        start:
          type: string
          description: Start date/time as YYYY-MM-DD or RFC3339, inclusive. Defaults to the start of collected history.
          example: '2024-09-01'
        end:
          type: string
          description: End date/time as YYYY-MM-DD or RFC3339, exclusive. Defaults to now.
          example: '2026-09-07'
        currency:
          type: string
          enum:
            - AUD
            - CAD
            - CHF
            - CNY
            - EUR
            - GBP
            - JPY
            - NZD
            - SGD
            - USD
          default: USD
          description: Currency for every price in the response.
    ArchiveBuffPoint:
      type: object
      required:
      - time
      - sale_price
      - total_supply
      description: One BUFF sale, or a supply-only row on a day with no sale.
      properties:
        time:
          type: string
          format: date-time
          description: Sale time, UTC. Supply-only rows are stamped at China midnight (16:00 UTC).
        sale_price:
          type:
          - number
          - 'null'
          minimum: 0
          description: Sale price (USD), converted from CNY at the sale date's historical rate. `null` on supply-only rows and on sales whose date has no stored rate yet.
        total_supply:
          type:
          - integer
          - 'null'
          minimum: 0
          maximum: 9007199254740991
          description: Total supply BUFF reported for the sale's China-calendar day (UTC+8). `null` when no supply was reported that day.
    ArchiveBuffItem:
      type: object
      description: BUFF sales and daily supply for a single item, as one chronological series.
      required:
      - market_hash_name
      - count
      - data
      properties:
        market_hash_name:
          type: string
          description: The base item's `market_hash_name`.
        count:
          type: integer
          minimum: 0
          description: Number of points in `data`.
        data:
          type: array
          items:
            $ref: '#/components/schemas/ArchiveBuffPoint'
          description: Sales and supply-only rows in chronological order, one point per timestamp.
        variants:
          type: object
          description: Per-variant BUFF series for items with Doppler and Gamma Doppler phases or Case Hardened tiers. Keyed by display name and omitted when empty. A variant series never falls back to base history.
          additionalProperties:
            $ref: '#/components/schemas/ArchiveBuffVariant'
    ArchiveBuffVariant:
      type: object
      description: BUFF sales and daily supply for one Doppler or Gamma Doppler phase or Case Hardened tier.
      required:
      - market_hash_name
      - name
      - display_name
      - version
      - count
      - data
      properties:
        market_hash_name:
          type: string
          description: The base item's `market_hash_name`. The full variant name is `name`.
        count:
          type: integer
          minimum: 0
          description: Number of points in `data`.
        data:
          type: array
          items:
            $ref: '#/components/schemas/ArchiveBuffPoint'
          description: Sales and supply-only rows in chronological order, one point per timestamp.
        name:
          type: string
          description: The variant's full `market_hash_name`, e.g. `★ Karambit | Doppler (Factory New) | Phase 2`.
        display_name:
          type: string
          description: Human-readable variant label (e.g. `Phase 1`, `Ruby`, `Tier 1`, `Blue Gem`).
        version:
          type: string
          description: Stable variant code. Switch on this in client code.
    ArchiveBuffResponse:
      type: object
      description: Response shape for `POST /v1/archive/buff`.
      required:
      - response_time
      - currency
      - start
      - end
      - items
      properties:
        response_time:
          type: string
          format: date-time
          description: When the response was generated.
        currency:
          type: string
          description: Currency for sale_price. Matches the requested `currency`; defaults to `USD`.
        start:
          type: string
          format: date-time
          description: Effective start of the queried range, exactly as requested or defaulted. Inclusive.
        end:
          type: string
          format: date-time
          description: Effective end of the queried range, exactly as requested or defaulted. Exclusive.
        items:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/ArchiveBuffItem'
          description: Map of `market_hash_name` to BUFF sale series.
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ItemError'
          description: Per-item failures alongside successful results (partial success).
      example:
        response_time: '2026-09-06T00:30:00Z'
        currency: USD
        start: '2026-09-03T13:00:00Z'
        end: '2026-09-03T20:00:00Z'
        items:
          AK-47 | Redline (Field-Tested):
            market_hash_name: AK-47 | Redline (Field-Tested)
            count: 4
            data:
            - time: '2026-09-03T13:00:00Z'
              sale_price: 38.07
              total_supply: 350680
            - time: '2026-09-03T15:00:00Z'
              sale_price: 52.42
              total_supply: 350680
            - time: '2026-09-03T16:00:00Z'
              sale_price: 62.04
              total_supply: 350713
            - time: '2026-09-03T19:00:00Z'
              sale_price: 41.63
              total_supply: 350713
    ArchiveYoupinRequest:
      type: object
      required:
        - items
      properties:
        items:
          type: array
          items:
            type: string
          maxItems: 100
          description: List of `market_hash_name` values (max 100).
          example:
            - ★ Karambit | Doppler (Factory New)
        start:
          type: string
          description: Start date/time as YYYY-MM-DD or RFC3339, inclusive. Defaults to 180 days ago; floored to the hour.
          example: '2026-02-24'
        end:
          type: string
          description: End date/time as YYYY-MM-DD or RFC3339, exclusive. Defaults to now; ceiled to the hour.
          example: '2026-08-23'
        currency:
          type: string
          enum:
            - AUD
            - CAD
            - CHF
            - CNY
            - EUR
            - GBP
            - JPY
            - NZD
            - SGD
            - USD
          default: USD
          description: Currency for every price in the response.
    ArchiveYoupinPoint:
      type: object
      required:
        - bucket
        - time
        - price
      description: One sale on Youpin. Youpin keeps one sale per sampling bucket, so a point is a real sale, not an aggregate.
      properties:
        bucket:
          type: string
          format: date-time
          description: Start of the sampling bucket.
        time:
          type: string
          format: date-time
          description: Actual sale time inside the bucket.
        price:
          type: [number, "null"]
          description: Sale price (USD), converted from CNY at the sale date's own historical rate, or `null` when no rate for that date could be resolved.
    ArchiveYoupinSeries:
      type: object
      required:
        - count
        - data
      description: Youpin sales at one sampling interval.
      properties:
        count:
          type: integer
          description: Number of points in this series (the length of `data`), not a sale volume. `0` with an empty `data` means the interval was observed and nothing sold.
        data:
          type: array
          description: Sales at this interval, in chronological order.
          items:
            $ref: '#/components/schemas/ArchiveYoupinPoint'
    ArchiveYoupinItem:
      type: object
      required:
        - market_hash_name
        - intervals
      description: Youpin sale history for a single item, with one series per sampling interval.
      properties:
        market_hash_name:
          type: string
          description: Canonical Steam `market_hash_name`.
        intervals:
          type: object
          description: Series keyed by sampling interval (`1h`, `4h`, `12h`). A key is present only when that interval was observed inside the requested window.
          properties:
            1h:
              $ref: '#/components/schemas/ArchiveYoupinSeries'
            4h:
              $ref: '#/components/schemas/ArchiveYoupinSeries'
            12h:
              $ref: '#/components/schemas/ArchiveYoupinSeries'
        variants:
          type: object
          description: Per-variant Youpin sale history for items with Doppler and Gamma Doppler phases or Case Hardened tiers. Keyed by display name and omitted when empty. A variant series never falls back to base history.
          additionalProperties:
            $ref: '#/components/schemas/ArchiveYoupinVariant'
    ArchiveYoupinVariant:
      type: object
      description: Youpin sale history for one Doppler or Gamma Doppler phase or Case Hardened tier, as one independent series per sampling interval.
      required:
        - market_hash_name
        - name
        - display_name
        - version
        - intervals
      properties:
        market_hash_name:
          type: string
          description: The base item's `market_hash_name`. The full variant name is `name`.
        name:
          type: string
          description: The variant's full `market_hash_name`, e.g. `★ Karambit | Doppler (Factory New) | Phase 1`.
        display_name:
          type: string
          description: Human-readable variant label (e.g. `Phase 1`, `Ruby`, `Tier 1`, `Blue Gem`).
        version:
          type: string
          description: Stable variant code. Switch on this in client code.
        intervals:
          type: object
          description: Series for this variant, keyed by sampling interval like the item's `intervals`.
          properties:
            1h:
              $ref: '#/components/schemas/ArchiveYoupinSeries'
            4h:
              $ref: '#/components/schemas/ArchiveYoupinSeries'
            12h:
              $ref: '#/components/schemas/ArchiveYoupinSeries'
    ArchiveYoupinResponse:
      type: object
      required:
        - response_time
        - currency
        - start
        - end
        - items
      description: Response shape for `POST /v1/archive/youpin`.
      properties:
        response_time:
          type: string
          format: date-time
          description: When the response was generated.
        currency:
          type: string
          description: Currency code for every price in the response. Matches the requested `currency`; defaults to `USD`.
        start:
          type: string
          format: date-time
          description: Effective start of the queried range, floored to the 1h boundary. Inclusive.
        end:
          type: string
          format: date-time
          description: Effective end of the queried range, ceiled to the 1h boundary. Exclusive.
        items:
          type: object
          description: Map of `market_hash_name` to Youpin sale series.
          additionalProperties:
            $ref: '#/components/schemas/ArchiveYoupinItem'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ItemError'
          description: Per-item failures alongside successful results (partial success).
      example:
        response_time: '2026-08-23T22:00:08.796888946Z'
        currency: USD
        start: '2026-02-24T00:00:00Z'
        end: '2026-08-23T00:00:00Z'
        items:
          ★ Karambit | Doppler (Factory New):
            market_hash_name: ★ Karambit | Doppler (Factory New)
            intervals:
              1h:
                count: 595
                data:
                  - bucket: '2026-07-21T16:00:00Z'
                    time: '2026-07-21T16:52:38.307Z'
                    price: 1314.88
                  - bucket: '2026-07-21T18:00:00Z'
                    time: '2026-07-21T18:49:58.613Z'
                    price: 8125.64
              4h:
                count: 324
                data:
                  - bucket: '2026-06-27T16:00:00Z'
                    time: '2026-06-27T18:37:02.696Z'
                    price: 1971.09
                  - bucket: '2026-06-27T20:00:00Z'
                    time: '2026-06-27T23:59:41.06Z'
                    price: 1995.59
              12h:
                count: 360
                data:
                  - bucket: '2026-02-24T04:00:00Z'
                    time: '2026-02-24T14:31:07.376Z'
                    price: 1505.36
                  - bucket: '2026-02-24T16:00:00Z'
                    time: '2026-02-25T03:42:29.407Z'
                    price: 2215.6
            variants:
              Phase 2:
                market_hash_name: ★ Karambit | Doppler (Factory New)
                name: ★ Karambit | Doppler (Factory New) | Phase 2
                display_name: Phase 2
                version: p2
                intervals:
                  1h:
                    count: 295
                    data:
                      - bucket: '2026-07-22T22:00:00Z'
                        time: '2026-07-22T22:01:51.055Z'
                        price: 1902.37
                  4h:
                    count: 267
                    data:
                      - bucket: '2026-06-29T00:00:00Z'
                        time: '2026-06-29T01:20:49.596Z'
                        price: 2156.42
                  12h:
                    count: 356
                    data:
                      - bucket: '2026-02-24T04:00:00Z'
                        time: '2026-02-24T14:03:32.869Z'
                        price: 2272.73
    ArchiveHistoryRequest:
      type: object
      required:
        - items
        - start
      properties:
        items:
          type: array
          items:
            type: string
          maxItems: 100
          description: List of `market_hash_name` values (max 100).
          example:
            - USP-S | Printstream (Factory New)
        start:
          type: string
          description: Start date/time as YYYY-MM-DD or RFC3339, inclusive.
          example: '2024-01-01'
        end:
          type: string
          description: End date/time as YYYY-MM-DD or RFC3339, exclusive. Defaults to now.
          example: '2026-08-23'
        sources:
          type: array
          items:
            type: string
            enum:
              - aggregate
              - buff
              - youpin
              - c5game
          description: Filter to specific sources. Defaults to `aggregate` only.
          example:
            - aggregate
            - buff
        interval:
          type: string
          enum:
            - 1h
            - 1d
          default: 1d
          description: Bucket interval.
          example: 1d
        currency:
          type: string
          enum:
            - AUD
            - CAD
            - CHF
            - CNY
            - EUR
            - GBP
            - JPY
            - NZD
            - SGD
            - USD
          default: USD
          description: Currency for every price in the response.
    ArchiveHistoryPlatformData:
      type: object
      required:
        - time
        - ask
        - ask_volume
        - bid
        - bid_volume
        - sample_count
      description: Per-source price data within an archive bucket. `aggregate` prices are derived from BUFF and Youpin; `hourly_volume` and `total_supply` are populated only on the `aggregate` source.
      properties:
        time:
          type: string
          format: date-time
          description: Actual timestamp of the last observation in the bucket. Distinct from the bucket boundary.
        ask:
          type: [number, "null"]
          description: Last observed ask price (USD) in the bucket.
        ask_volume:
          type: [integer, "null"]
          description: Last observed number of items listed for sale.
        bid:
          type: [number, "null"]
          description: Last observed bid price (USD) in the bucket. `null` when it was above the source's ask.
        bid_volume:
          type: [integer, "null"]
          description: Last observed number of buy orders.
        hourly_volume:
          type: [number, "null"]
          description: Aggregated trading volume metric (`aggregate` source only).
        total_supply:
          type: [number, "null"]
          description: Total market supply metric (`aggregate` source only).
        sample_count:
          type: integer
          description: Number of observations aggregated into this bucket.
    ArchiveHistoryBucket:
      type: object
      required:
        - bucket
      description: A single archive time bucket. Each source key is present only when data exists for that source in this bucket.
      properties:
        bucket:
          type: string
          format: date-time
          description: Start of the time bucket (UTC-aligned to the interval boundary).
        aggregate:
          $ref: '#/components/schemas/ArchiveHistoryPlatformData'
        buff:
          $ref: '#/components/schemas/ArchiveHistoryPlatformData'
        youpin:
          $ref: '#/components/schemas/ArchiveHistoryPlatformData'
        c5game:
          $ref: '#/components/schemas/ArchiveHistoryPlatformData'
    ArchiveHistoryItem:
      type: object
      required:
        - market_hash_name
        - count
        - data
      description: Long-term archive time-series for a single item.
      properties:
        market_hash_name:
          type: string
          description: Canonical Steam `market_hash_name`.
        count:
          type: integer
          description: Number of buckets in `data`.
        data:
          type: array
          description: Archive buckets in chronological order.
          items:
            $ref: '#/components/schemas/ArchiveHistoryBucket'
        variants:
          type: object
          description: Per-variant archive time-series for items with Doppler and Gamma Doppler phases or Case Hardened tiers. Keyed by display name.
          additionalProperties:
            $ref: '#/components/schemas/ArchiveHistoryVariant'
    ArchiveHistoryVariant:
      type: object
      description: Long-term archive time-series for one Doppler or Gamma Doppler phase or Case Hardened tier.
      required:
        - market_hash_name
        - name
        - display_name
        - version
        - count
        - data
      properties:
        market_hash_name:
          type: string
          description: The base item's `market_hash_name`. The full variant name is `name`.
        name:
          type: string
          description: The variant's full `market_hash_name`, e.g. `★ Karambit | Doppler (Factory New) | Phase 1`.
        display_name:
          type: string
          description: Human-readable variant label (e.g. `Phase 1`, `Ruby`, `Tier 1`, `Blue Gem`).
        version:
          type: string
          description: Stable variant code. Switch on this in client code.
        count:
          type: integer
          description: Number of buckets in `data`.
        data:
          type: array
          description: Archive buckets in chronological order.
          items:
            $ref: '#/components/schemas/ArchiveHistoryBucket'
    ArchiveHistoryResponse:
      type: object
      required:
        - response_time
        - currency
        - start
        - end
        - interval
        - items
      description: Response shape for `POST /v1/archive/history`.
      properties:
        response_time:
          type: string
          format: date-time
          description: When the response was generated.
        currency:
          type: string
          description: Currency code for every price in the response. Matches the requested `currency`; defaults to `USD`.
        start:
          type: string
          format: date-time
          description: Effective start of the queried range, floored to the interval boundary. Inclusive.
        end:
          type: string
          format: date-time
          description: Effective end of the queried range, ceiled to the interval boundary. Exclusive.
        interval:
          type: string
          enum:
            - 1h
            - 1d
          description: Requested bucket interval.
        items:
          type: object
          description: Map of `market_hash_name` to archive time-series.
          additionalProperties:
            $ref: '#/components/schemas/ArchiveHistoryItem'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ItemError'
          description: Per-item failures alongside successful results (partial success).
      example:
        response_time: '2026-08-23T22:00:07.79126838Z'
        currency: USD
        start: '2026-05-25T00:00:00Z'
        end: '2026-08-22T00:00:00Z'
        interval: 1d
        items:
          USP-S | Printstream (Factory New):
            market_hash_name: USP-S | Printstream (Factory New)
            count: 89
            data:
              - bucket: '2026-05-25T00:00:00Z'
                aggregate:
                  time: '2026-05-25T23:59:08Z'
                  ask: 100.66
                  ask_volume: 1450
                  bid: 98.45
                  bid_volume: 126
                  hourly_volume: 62
                  total_supply: 31551
                  sample_count: 24
                buff:
                  time: '2026-05-25T23:53:08Z'
                  ask: 101.4
                  ask_volume: 450
                  bid: 97.13
                  bid_volume: 28
                  sample_count: 24
                youpin:
                  time: '2026-05-25T23:59:07Z'
                  ask: 100.66
                  ask_volume: 574
                  bid: 98.45
                  bid_volume: 71
                  sample_count: 25
                c5game:
                  time: '2026-05-25T23:59:07Z'
                  ask: 105.22
                  ask_volume: 186
                  bid: 114.79
                  bid_volume: 26
                  sample_count: 25
    SchemaRarity:
      type: object
      description: A rarity tier. Listed in the top-level `rarities` array and referenced by item-level `rarity`.
      required:
        - key
        - name
        - tier
        - color
      properties:
        key:
          type: string
          description: Stable rarity key (e.g. `ancient`, `legendary`).
        name:
          type: string
          description: Display name (e.g. `Covert`, `Classified`).
        tier:
          type: integer
          description: Numeric rarity tier, ascending with rarity.
        color:
          type: string
          description: Hex color for the rarity.
    SchemaCollection:
      type: object
      description: Collection metadata. Keyed by collection name in the top-level `collections` map.
      required:
        - name
        - kind
      properties:
        name:
          type: string
          description: Collection name.
        kind:
          type: string
          description: Collection kind (e.g. `weapon`, `sticker`).
        release_date:
          type: string
          description: Release date (`YYYY-MM-DD`), when known. An item's release date is its collection's.
        released_at:
          type: string
          description: When Valve announced the collection (RFC 3339 UTC), when known.
        update_name:
          type: string
          description: Valve's own name for that update, e.g. `Season 5, Armory, and More`.
        announcement_url:
          type: string
          description: Canonical Steam announcement for that update.
        image:
          type: string
          description: Image URL served from `cs2.sh`, when available.
        steam_image:
          type: string
          description: Official Steam image URL, when available.
    SchemaItemVariant:
      type: object
      description: A Doppler or Gamma Doppler phase or Case Hardened tier listed under a base item's `variants`.
      required:
        - market_hash_name
        - family
        - name
        - image
      properties:
        market_hash_name:
          type: string
          description: Full variant `market_hash_name`.
        family:
          type: string
          enum:
            - doppler
            - gamma_doppler
            - case_hardened
          description: Variant family.
        name:
          type: string
          description: Variant name (e.g. `Phase 2`, `Ruby`, `Tier 1`).
        phase:
          type: string
          description: Phase or gem name. Omitted for Case Hardened.
        color:
          type: string
          description: Hex accent color. Omitted for Case Hardened.
        paint_index:
          type: integer
          description: Paint kit index for this variant.
        image:
          type: string
          description: Image URL served from `cs2.sh`.
        steam_image:
          type: string
          description: Official Steam image URL, when available.
    SchemaItem:
      type: object
      description: One schema record, keyed by `market_hash_name` in the top-level `items` map. Fields that do not apply to the item are omitted.
      required:
        - market_hash_name
        - category
        - image
        - is_tradable
      properties:
        market_hash_name:
          type: string
          description: Canonical Steam `market_hash_name`, matching the price endpoints.
        category:
          type: string
          description: Item category (e.g. `skin`, `sticker`, `container`, `agent`).
        image:
          type: string
          description: Image URL served from `cs2.sh`.
        steam_image:
          type: string
          description: Official Steam image URL, when available.
        is_tradable:
          type: boolean
          description: Whether the item can be traded.
        rarity:
          type: object
          description: Item rarity with `name`, `tier`, and `color`.
          required:
            - name
            - tier
            - color
          properties:
            name:
              type: string
            tier:
              type: integer
            color:
              type: string
        collections:
          type: array
          description: Collections the item belongs to. Omitted when none.
          items:
            type: string
        containers:
          type: array
          description: Containers the item drops from. Omitted when none.
          items:
            type: string
        ids:
          type: object
          description: Marketplace catalog ids where known.
          properties:
            buff:
              type: integer
            youpin:
              type: integer
            c5game:
              type: integer
        def_index:
          type: integer
          description: Item definition index.
        base_name:
          type: string
          description: Base item name without the wear suffix. Skins only.
        weapon:
          type: string
          description: Weapon name. Skins only.
        finish:
          type: string
          description: Finish name. Skins only.
        paint_index:
          type: integer
          description: Paint kit index. Skins only; omitted on Doppler and Gamma Doppler base items.
        wears:
          type: array
          description: Wears the item exists in. Wear-carrying items only.
          items:
            type: string
        has_stattrak:
          type: boolean
          description: Whether a StatTrak version exists. Wear-carrying items only.
        has_souvenir:
          type: boolean
          description: Whether a Souvenir version exists. Wear-carrying items only.
        float_range:
          type: object
          description: Float bounds for this item. Wear-carrying items only.
          required:
            - min
            - max
          properties:
            min:
              type: number
            max:
              type: number
        wear:
          type: string
          description: This item's wear (e.g. `Field-Tested`). Wear-carrying items only.
        wear_float_range:
          type: object
          description: Float bounds for this exact wear row, `float_range` clamped to this wear's bracket. Wear-carrying items only.
          required:
            - min
            - max
          properties:
            min:
              type: number
            max:
              type: number
        stattrak:
          type: boolean
          description: Whether this row is the StatTrak version.
        souvenir:
          type: boolean
          description: Whether this row is the Souvenir version.
        variants:
          type: array
          description: Doppler and Gamma Doppler phases or Case Hardened tiers for this base item.
          items:
            $ref: '#/components/schemas/SchemaItemVariant'
        variant:
          type: object
          description: Back-link on a variant row to its base item.
          required:
            - family
            - name
            - of
          properties:
            family:
              type: string
            name:
              type: string
            of:
              type: string
              description: Base item `market_hash_name`.
        phase:
          type: string
          description: Phase or gem name. Doppler and Gamma Doppler variant rows only.
        color:
          type: string
          description: Hex accent color. Doppler and Gamma Doppler variant rows only.
    SchemaResponse:
      type: object
      description: Response shape for `GET /v1/schema`, the full item schema with metadata keyed by `market_hash_name`.
      required:
        - schema_version
        - generation_id
        - generated_at
        - counts
        - rarities
        - collections
        - items
      properties:
        schema_version:
          type: string
          description: Schema version. Re-sync clients when it changes.
        generation_id:
          type: string
          description: Stable identifier for this schema generation.
        generated_at:
          type: string
          format: date-time
          description: When this schema generation was built.
        counts:
          type: object
          description: Schema entity counts.
          required:
            - items
            - by_category
            - collections
          properties:
            items:
              type: integer
              description: Number of item records.
            by_category:
              type: object
              description: Item count per category.
              additionalProperties:
                type: integer
            collections:
              type: integer
              description: Number of collections.
        rarities:
          type: array
          description: Rarity tiers.
          items:
            $ref: '#/components/schemas/SchemaRarity'
        collections:
          type: object
          description: Collection metadata keyed by collection name.
          additionalProperties:
            $ref: '#/components/schemas/SchemaCollection'
        items:
          type: object
          description: Item records keyed by `market_hash_name`.
          additionalProperties:
            $ref: '#/components/schemas/SchemaItem'
      example:
        schema_version: v3
        generated_at: '2026-08-19T23:15:06Z'
        counts:
          items: 48696
          by_category:
            agent: 63
            collectible: 468
            container: 479
            graffiti: 2111
            highlight_reel: 926
            key: 39
            keychain: 78
            music_kit: 188
            patch: 112
            skin: 21924
            sticker: 11132
            sticker_slab: 11132
            tool: 4
            vanilla_skin: 40
          collections: 110
        rarities:
          - key: default
            name: Stock
            tier: 0
            color: '#b0c3d9'
          - key: common
            name: Consumer Grade
            tier: 1
            color: '#b0c3d9'
          - key: uncommon
            name: Industrial Grade
            tier: 2
            color: '#5e98d9'
          - key: rare
            name: Mil-Spec Grade
            tier: 3
            color: '#4b69ff'
          - key: mythical
            name: Restricted
            tier: 4
            color: '#8847ff'
          - key: legendary
            name: Classified
            tier: 5
            color: '#d32ce6'
          - key: ancient
            name: Covert
            tier: 6
            color: '#eb4b4b'
          - key: immortal
            name: Contraband
            tier: 7
            color: '#e4ae39'
        collections:
          2025 Community Sticker Collection:
            name: 2025 Community Sticker Collection
            kind: sticker
            release_date: '2025-10-01'
            released_at: '2025-10-01T23:42:32Z'
            update_name: Community Maps, Charms, and More
            announcement_url: https://steamcommunity.com/games/CSGO/announcements/detail/498333631688738073
            image: https://cs2.sh/image/5-y5BqjoeymuHNzv
            steam_image: https://cdn.steamstatic.com/apps/730/icons/econ/set_icons/set_community_2025.280d945244b90804541bf84784796793fd3bad00.png
          Auto Racing Sticker Collection:
            name: Auto Racing Sticker Collection
            kind: sticker
            release_date: '2026-07-08'
            released_at: '2026-07-08T22:50:43Z'
            update_name: Season 5, Armory, and More
            announcement_url: https://steamcommunity.com/games/CSGO/announcements/detail/701021228894257509
            image: https://cs2.sh/image/UuGTutGWjf5OvoVM
            steam_image: https://cdn.steamstatic.com/apps/730/icons/econ/set_icons/set_auto_racing.2bb35a9a9c95a4757596a2ebd2085c73529f184b.png
        items:
          USP-S | Printstream (Factory New):
            market_hash_name: USP-S | Printstream (Factory New)
            category: skin
            image: https://cs2.sh/image/N8Agkakkrq4y1Hm1
            steam_image: https://community.akamai.steamstatic.com/economy/image/i0CoZ81Ui0m-9KwlBY1L_18myuGuq1wfhWSaZgMttyVfPaERSR0Wqmu7LAocGIGz3UqlXOLrxM-vMGmW8VNxu5Dx60noTyLkjYbf7itX6vytbbZSI-WsG3SA_v5kue99XD2hkBwqjDGMnYftb3yUPFR0XsNyRrNc5kO5ltziMenr5lONj4kXyi2riywc7y9o5LtQAqQ7uvqAkScWnv4
            is_tradable: true
            rarity:
              name: Covert
              tier: 6
              color: '#eb4b4b'
            collections:
              - The Recoil Collection
            containers:
              - Recoil Case
            ids:
              buff: 900565
              youpin: 102375
              c5game: 1017617021485346800
            def_index: 61
            base_name: USP-S | Printstream
            weapon: USP-S
            finish: Printstream
            wears:
              - Factory New
              - Minimal Wear
              - Field-Tested
              - Well-Worn
              - Battle-Scarred
            has_stattrak: true
            has_souvenir: true
            float_range:
              min: 0
              max: 0.85
            paint_index: 1142
            wear: Factory New
            wear_float_range:
              min: 0
              max: 0.07
            stattrak: false
            souvenir: false
          ★ Karambit | Doppler (Factory New):
            market_hash_name: ★ Karambit | Doppler (Factory New)
            category: skin
            image: https://cs2.sh/image/vJQM7YiSwMZS1GsE
            steam_image: https://community.akamai.steamstatic.com/economy/image/i0CoZ81Ui0m-9KwlBY1L_18myuGuq1wfhWSaZgMttyVfPaERSR0Wqmu7LAocGIGz3UqlXOLrxM-vMGmW8VNxu5Dx60noTyL6kJ_m-B1Q7uCvZaZkNM-SA1iSze91u_FsTju_qhAmoT-Jn4bjJC_4Ml93UtZuRLQPsBawkNfiMbnl5AKMiopCnin7iCJBv31j4rkBBKEg-6zUjV3GY6p9v8dpLWT3Fg
            is_tradable: true
            rarity:
              name: Covert
              tier: 6
              color: '#eb4b4b'
            containers:
              - Chroma Case
              - Chroma 2 Case
              - Chroma 3 Case
            ids:
              buff: 42998
              youpin: 1785
              c5game: 22702
            def_index: 507
            base_name: ★ Karambit | Doppler
            weapon: Karambit
            finish: Doppler
            wears:
              - Factory New
              - Minimal Wear
            has_stattrak: true
            has_souvenir: false
            float_range:
              min: 0
              max: 0.08
            wear: Factory New
            wear_float_range:
              min: 0
              max: 0.07
            stattrak: false
            souvenir: false
            variants:
              - market_hash_name: ★ Karambit | Doppler (Factory New) | Phase 1
                family: doppler
                name: Phase 1
                image: https://cs2.sh/image/f7tv2IWIqPDquMsV
                steam_image: https://community.akamai.steamstatic.com/economy/image/i0CoZ81Ui0m-9KwlBY1L_18myuGuq1wfhWSaZgMttyVfPaERSR0Wqmu7LAocGIGz3UqlXOLrxM-vMGmW8VNxu5Dx60noTyL6kJ_m-B1Q7uCvZaZkNM-SA1iUzv5mvOR7cDm7lA4i4gKJk4jxNWXFb1cpDJR2FOFbsBTql9bjYbzq7gPZiN1MxH7_2ytNuCdpte1UB_Ui5OSJ2GbkVqni
                phase: Phase 1
                color: '#6e1b3a'
                paint_index: 418
        generation_id: 4814468113142569832-20260823T042459Z
    FXResponse:
      type: object
      description: Current exchange rates. Returned by `GET /v1/fx`.
      required:
        - base
        - updated_at
        - collected_at
        - fresh
        - rates
      properties:
        base:
          type: string
          description: Base currency (always `USD`).
        updated_at:
          type: string
          format: date-time
          description: When the rate provider published these rates.
        collected_at:
          type: string
          format: date-time
          description: When cs2.sh collected them.
        fresh:
          type: boolean
          description: '`false` when the rates are more than 2 hours old. Latest-price conversion keeps using them for up to 24 hours.'
        rates:
          type: object
          description: Units of each currency per 1 USD, keyed by currency code.
          additionalProperties:
            type: number
      example:
        base: USD
        updated_at: '2026-09-22T23:00:02Z'
        collected_at: '2026-09-22T23:00:54.577Z'
        fresh: true
        rates:
          AUD: 1.40622087
          CAD: 1.40543053
          CHF: 0.82058071
          CNY: 6.71350215
          EUR: 0.87319354
          GBP: 0.74932836
          JPY: 157.40767305
          NZD: 1.74524572
          SGD: 1.27536852
          USD: 1
    ErrorResponse:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: string
          description: Error code, e.g. `validation_error`, `unauthorized`, `rate_limited`.
        message:
          type: string
          description: Human-readable error message.
        request_id:
          type: string
          format: uuid
          description: Unique request identifier for support.
        details:
          type: object
          description: Additional error details; structure varies by error type.
  responses:
    ValidationError:
      description: Invalid request parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: validation_error
            message: items and start fields are required
            request_id: 550e8400-e29b-41d4-a716-446655440000
            details:
              missing:
                - items
                - start
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: unauthorized
            message: 'missing Authorization header. Send: Authorization: Bearer <api_key>'
            request_id: 550e8400-e29b-41d4-a716-446655440000
    RateLimited:
      description: Too many requests for the key's rate limit
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: rate_limited
            message: 'rate limited. Slow down and retry with backoff. Limits per plan: https://cs2.sh/docs'
            request_id: 550e8400-e29b-41d4-a716-446655440000
    Forbidden:
      description: Requested endpoint is outside your plan. Upgrade to Scale for full access.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: forbidden
            message: 'POST /v1/prices/history is not available on the developer plan. Available: GET /v1/prices/latest, POST /v1/prices/latest, GET /v1/market/buff/latest, GET /v1/market/steam/orderbook/latest, GET /v1/schema, GET /v1/fx. All other endpoints require Scale. If you did not expect this, check the path and method against https://cs2.sh/docs.'
            request_id: 550e8400-e29b-41d4-a716-446655440000
            details:
              plan: developer
              allowed_endpoints:
                - GET /v1/prices/latest
                - POST /v1/prices/latest
                - GET /v1/market/buff/latest
                - GET /v1/market/steam/orderbook/latest
                - GET /v1/schema
                - GET /v1/fx
    ServiceUnavailable:
      description: Service temporarily unavailable
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: service_unavailable
            message: cache unavailable
            request_id: 550e8400-e29b-41d4-a716-446655440000
    GatewayTimeout:
      description: Request timeout
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: timeout
            message: query timeout
            request_id: 550e8400-e29b-41d4-a716-446655440000
    NotFound:
      description: None of the requested items were found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: not_found
            message: no requested items found in latest cache; try /history
            request_id: 550e8400-e29b-41d4-a716-446655440000
            details:
              errors:
                - item: Invalid Item Name
                  code: unknown_item
                  message: item not found in item schema
