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

# PATCH /v1/p2p/listings/{id} — изменение цены листинга

> Измените цену одного из ваших активных листингов на P2P-маркете CSBoard. Действует та же нижняя граница цены, что и при публикации.

Меняет цену одного из ваших листингов в статусе `active`. Передайте новую `price_usd` в целых центах, от `0.10` до `100000`. В ответе — обновлённый листинг, где `commission_usd` и `seller_payout_usd` пересчитаны под новую цену.

Действует та же нижняя граница, что и при публикации, и обойти её подтверждением нельзя: цена ниже половины нашей рыночной цены на предмет получает `422 price_below_market` с `market_usd` и `floor_usd`. Цену проданного или продающегося листинга изменить уже нельзя.

**Требуется аутентификация.** Отправьте ключ как `Authorization: Bearer csb_pub_...`. Учитывается в лимите P2P-записей ключа — 30 запросов в минуту.

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

```bash theme={null}
curl -X PATCH https://csboard.com/v1/p2p/listings/cm1xq8z4k0003ab12cd34ef56 \
  -H "Authorization: Bearer csb_pub_..." \
  -H "Content-Type: application/json" \
  -d '{ "price_usd": 11.50 }'
```

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

```json theme={null}
{
  "id": "cm1xq8z4k0003ab12cd34ef56",
  "status": "active",
  "price_usd": 11.5,
  "currency": "USD",
  "commission_usd": 0.23,
  "seller_payout_usd": 11.27,
  "market_hash_name": "AK-47 | Redline (Field-Tested)",
  "item_name": "AK-47 | Redline (Field-Tested)",
  "asset_id": "38451927734",
  "operational_asset_id": "5b0c1f7e-3d2a-4c8e-9a61-2f4d8b7e1c30",
  "float_value": 0.2711,
  "needs_resync": false,
  "created_at": "2026-10-02T12:04:11.000Z",
  "updated_at": "2026-10-02T13:20:00.000Z"
}
```

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

| HTTP-статус | Код | Значение |
| - | - | - |
| 400 | `invalid_request` | Некорректное тело или цена вне диапазона `0.10`–`100000` либо с более чем двумя знаками после запятой. |
| 400 | `listing_not_active` | Листинг продан, находится в процессе продажи или снят. |
| 403 | `not_owner` | Листинг принадлежит другому аккаунту. |
| 403 | `account_banned` / `ip_not_allowed` | Аккаунт заблокирован или запрос пришёл с адреса вне IP-allowlist ключа. |
| 404 | `listing_not_found` | Листинга с таким id нет. |
| 422 | `price_below_market` | Цена ниже половины нашей рыночной цены. См. `market_usd` и `floor_usd`. |
| 429 | `rate_limit_exceeded` | Больше 30 P2P-записей за эту минуту или превышен общий лимит ключа. Подождите время, указанное в заголовке `Retry-After`. |
| 503 | `p2p_disabled` / `p2p_reprice_disabled` | P2P-маркет или изменение цен на нём сейчас отключены. |


## OpenAPI

````yaml PATCH /p2p/listings/{id}
openapi: 3.1.0
info:
  title: CSBoard API
  version: 1.0.0
  description: >-
    Market data over the CSBoard marketplace — live listings, floats, stickers,
    minAsk prices, FX rates — plus opt-in buying straight from your balance.
    Free to read, key-gated, built for automation.
  contact:
    name: CSBoard
    url: https://csboard.com/docs
servers:
  - url: https://csboard.com/v1
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Status
    description: Liveness and freshness probes.
  - name: Market data
    description: Read the live catalog, prices, and FX rates.
  - name: Trading
    description: Buy listings from your CSBoard balance. Opt-in, key-gated.
  - name: P2P
    description: >-
      List your own CS2 skins on the CSBoard P2P market. Free — any valid key,
      no balance requirement.
  - name: Account
    description: Your balance, settled funds, and trading status.
  - name: Webhooks
    description: Register an endpoint and receive signed order updates instead of polling.
paths:
  /p2p/listings/{id}:
    patch:
      tags:
        - P2P
      summary: Change a listing's price
      description: >-
        Move the asking price of one of your `active` listings. The same floor
        as publishing applies: a price under half of our market price answers
        `422 price_below_market`. Counts toward the 30 requests/minute P2P write
        limit of the key.
      operationId: updateP2PListingPrice
      parameters:
        - name: id
          in: path
          required: true
          description: Listing id from `POST /p2p/listings` or `GET /p2p/listings`.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - price_usd
              additionalProperties: false
              properties:
                price_usd:
                  type: number
                  minimum: 0.1
                  maximum: 100000
                  multipleOf: 0.01
                  description: >-
                    Asking price in USD, whole cents (`12.34`; `12.345` is
                    refused, not rounded). It may not be under half of our
                    market price for the item — see `price_below_market`.
            example:
              price_usd: 11.5
      responses:
        '200':
          description: The updated listing.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/P2PListing'
              example:
                id: cm1xq8z4k0003ab12cd34ef56
                status: active
                price_usd: 11.5
                currency: USD
                commission_usd: 0.23
                seller_payout_usd: 11.27
                market_hash_name: AK-47 | Redline (Field-Tested)
                item_name: AK-47 | Redline (Field-Tested)
                asset_id: '38451927734'
                operational_asset_id: 5b0c1f7e-3d2a-4c8e-9a61-2f4d8b7e1c30
                float_value: 0.2711
                needs_resync: false
                created_at: '2026-10-02T12:04:11.000Z'
                updated_at: '2026-10-02T13:20:00.000Z'
        '400':
          description: A malformed price, or the listing is not `active`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                invalid_request:
                  summary: Malformed body
                  value:
                    code: invalid_request
                    detail: >-
                      price_usd must be 0.10 to 100000 USD with at most two
                      decimals
                listing_not_active:
                  summary: Sold, mid-sale or removed
                  value:
                    code: listing_not_active
                    detail: Can only edit active listings
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: >-
            Forbidden — not your listing, an account ban, or the key's IP
            allowlist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                not_owner:
                  summary: Someone else's listing
                  value:
                    code: not_owner
                    detail: Not your listing
                account_banned:
                  summary: Account banned
                  value:
                    code: account_banned
                    detail: This account is banned.
                ip_not_allowed:
                  summary: Request from outside the key's IP allowlist
                  value:
                    code: ip_not_allowed
                    detail: >-
                      This API key is restricted to an IP allowlist and
                      203.0.113.7 is not on it. Update it at
                      https://csboard.com/profile?tab=api
        '404':
          description: No such listing.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                listing_not_found:
                  summary: Not found
                  value:
                    code: listing_not_found
                    detail: Listing not found
        '422':
          description: >-
            The price is under half of our market price for this item. Over a
            key it cannot be confirmed past.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                price_below_market:
                  summary: Under half of market
                  value:
                    code: price_below_market
                    detail: >-
                      price_usd 4 is under the minimum 255.16 for this item
                      (market ~510.32). Listings made with an API key cannot go
                      below it.
                    market_usd: 510.32
                    floor_usd: 255.16
                    price_usd: 4
        '429':
          $ref: '#/components/responses/P2PWriteLimited'
        '503':
          description: The P2P market, or price changes on it, are switched off.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                p2p_disabled:
                  summary: P2P market unavailable
                  value:
                    code: p2p_disabled
                    detail: The P2P market is not available right now.
                p2p_reprice_disabled:
                  summary: Price changes unavailable
                  value:
                    code: p2p_reprice_disabled
                    detail: Price changes are not available right now.
components:
  schemas:
    P2PListing:
      type: object
      properties:
        id:
          type: string
          description: Listing id — use it with `PATCH` / `DELETE /p2p/listings/{id}`.
        status:
          type: string
          description: >-
            `active` — on sale. `trade_pending`, `trade_sent`,
            `verification_hold` — sold and mid-delivery.
            `reconciliation_required` — off the shelf because a full inventory
            read no longer saw the item (`needs_resync: true`).
        price_usd:
          type: number
          description: What the buyer pays.
        currency:
          type: string
          enum:
            - USD
        commission_usd:
          type: number
          description: Our fee on this listing, taken from the seller's side.
        seller_payout_usd:
          type: number
          description: >-
            What a sale credits to your balance: `price_usd` minus
            `commission_usd`.
        market_hash_name:
          type: string
        item_name:
          type: string
        asset_id:
          type: string
          description: Steam asset id of the listed copy.
        operational_asset_id:
          type:
            - string
            - 'null'
        float_value:
          type:
            - number
            - 'null'
        needs_resync:
          type: boolean
          description: >-
            `true` when the listing was taken off the shelf because your
            inventory no longer showed the item. It cannot be revived in place —
            publish the item again once it is back.
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - id
        - status
        - price_usd
        - currency
        - commission_usd
        - seller_payout_usd
        - market_hash_name
        - asset_id
        - needs_resync
        - created_at
        - updated_at
      example:
        id: cm1xq8z4k0003ab12cd34ef56
        status: active
        price_usd: 12.34
        currency: USD
        commission_usd: 0.25
        seller_payout_usd: 12.09
        market_hash_name: AK-47 | Redline (Field-Tested)
        item_name: AK-47 | Redline (Field-Tested)
        asset_id: '38451927734'
        operational_asset_id: 5b0c1f7e-3d2a-4c8e-9a61-2f4d8b7e1c30
        float_value: 0.2711
        needs_resync: false
        created_at: '2026-10-02T12:04:11.000Z'
        updated_at: '2026-10-02T12:04:11.000Z'
    Error:
      type: object
      description: >-
        All errors return { code, detail }. Some carry extra fields (e.g.
        price_moved adds current_total_usd, insufficient_balance adds
        required_usd/current_usd).
      properties:
        code:
          type: string
          description: >-
            Machine-readable error code, e.g. rate_limit_exceeded,
            trading_not_enabled, price_moved.
        detail:
          type: string
          description: Human-readable explanation.
      required:
        - code
  responses:
    Unauthorized:
      description: Missing or invalid API key (`missing_api_key` or `invalid_api_key`).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: missing_api_key
            detail: >-
              Provide your API key via `Authorization: Bearer csb_pub_…`.
              Generate one at https://csboard.com/profile?tab=api
    P2PWriteLimited:
      description: >-
        More than 30 P2P writes (publish, reprice, remove) in the current minute
        on this key. Wait `Retry-After` seconds.
      headers:
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: rate_limit_exceeded
            detail: P2P write limit of 30/min exceeded.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Send your key as a Bearer token on every request: `Authorization: Bearer
        csb_pub_...`. Generate keys in your CSBoard profile.

````

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