> ## 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.

# PUT /v1/account/sources_off — 关闭供应方

> 替换您的账户已关闭的供应方编号列表。

替换您的账户已关闭的供应方列表。每次请发送完整列表：发送的编号为关闭，其余全部开启。空数组会重新开启所有供应方。

修改从您的下一次请求起生效，适用于挂单、深度、价格、两种快照和数据流。编号取自 [`GET /v1/sources`](https://api.csboard.com/zh-Hans/api-reference/get-sources)。

> [!NOTE]
>
> 这只是对展示内容的过滤，不会阻止购买。发送到 `POST /v1/orders` 的挂单 id 无论来自哪个供应方都会成交。

**需要身份验证。** 以 `Authorization: Bearer csb_pub_...` 发送您的密钥。

## 请求体

**sources\_off** `integer[]` *required*

要关闭的供应方编号。未在使用的编号会被拒绝，以免拼写错误悄悄地什么都没关闭。

## 修改之后

* **数据流。** 连接沿用它建立时的列表。请重新连接以应用新列表，并从本地副本中删除已关闭供应方的挂单：它们的 `gone` 不会再到达。
* **快照。** 挂单快照按列表分别构建。尚未有人使用过的列表会返回 `202 snapshot_building`，直到文件就绪。

## 请求示例

```bash theme={null}
curl -X PUT "https://csboard.com/v1/account/sources_off" \
  -H "Authorization: Bearer csb_pub_..." \
  -H "Content-Type: application/json" \
  -d '{ "sources_off": [107, 113] }'
```

## 响应示例

```json theme={null}
{
  "data": {
    "sources_off": [107, 113]
  }
}
```

## 错误码

| HTTP 状态 | 代码 | 含义 |
| - | - | - |
| 400 | `invalid_request` | `sources_off` 缺失、不是整数数组，或包含未在使用的编号。 |
| 401 | `missing_api_key`, `invalid_api_key` | 密钥缺失或无效。 |


## OpenAPI

````yaml PUT /account/sources_off
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: Instant Sell
    description: >-
      Sell CS2, Dota 2 and Rust items from any Steam inventory to the CSBoard
      network and get paid to your balance. Invite-only.
  - name: P2P
    description: >-
      List your own CS2 skins on the CSBoard P2P market. Free — any valid key,
      no balance requirement.
  - name: Merchant lots
    description: >-
      List items that sit in your own Steam accounts, take an order call when
      one sells, report the trade yourself. Off until we switch it on for your
      account. See the Merchant Lots guide.
  - 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:
  /account/sources_off:
    put:
      tags:
        - Account
      summary: Replace the list of suppliers switched off
      description: >-
        Replaces the list: the numbers you send are off, everything else is on;
        an empty array switches every supplier back on. Takes effect on your
        next request. A filter on what you are shown, not a block on buying: a
        listing id sent to `POST /orders` is bought whatever its supplier. An
        open stream connection keeps the list it was opened with.
      operationId: putAccountSourcesOff
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - sources_off
              properties:
                sources_off:
                  type: array
                  items:
                    type: integer
                  description: >-
                    Supplier numbers to switch off, from `GET /sources`. A
                    number that is not in use is refused.
            example:
              sources_off:
                - 107
                - 113
      responses:
        '200':
          description: Saved.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    required:
                      - sources_off
                    properties:
                      sources_off:
                        type: array
                        items:
                          type: integer
                        description: >-
                          Supplier numbers switched off for this account,
                          ascending. Empty = every supplier is on.
              example:
                data:
                  sources_off:
                    - 107
                    - 113
        '400':
          description: >-
            `invalid_request`: `sources_off` is missing, is not an array of
            integers, or names a number that is not in use.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  responses:
    Unauthorized:
      description: Missing or invalid API key (`missing_api_key` or `invalid_api_key`).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: missing_api_key
            detail: >-
              Provide your API key via `Authorization: Bearer csb_pub_…`.
              Generate one at https://csboard.com/profile?tab=api
    RateLimited:
      description: >-
        A per-key limit is spent. The key's own buckets answer
        `rate_limit_exceeded` with `bucket` (`read`, `trading` or `buy_orders`),
        `limit_per_min` and `retry_after_sec`. `Retry-After` is the seconds left
        until the one-minute window restarts (1–60), not a flat 60.
        Endpoint-specific limits (`snapshot_rate_limited` on the price snapshot,
        `rate_limited` on Instant Sell) send only `code` and `detail`.
      headers:
        Retry-After:
          description: >-
            Seconds until the one-minute window restarts (1–60). Waiting that
            long is always enough.
          schema:
            type: integer
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/X-RateLimit-Reset'
        X-RateLimit-Bucket:
          $ref: '#/components/headers/X-RateLimit-Bucket'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RateLimitError'
          example:
            code: rate_limit_exceeded
            detail: >-
              Read rate limit of 100 requests/min exceeded. The counter restarts
              in 23 s. For new listings use GET /v1/listings/stream instead of
              polling.
            bucket: read
            limit_per_min: 100
            retry_after_sec: 23
  schemas:
    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, item_unavailable adds unavailable_ids and, on
        CS2 buys, unknown_ids).
      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
    RateLimitError:
      type: object
      description: >-
        The `429` body of a per-key bucket. Endpoint-specific limits send only
        `code` and `detail`.
      properties:
        code:
          type: string
          description: >-
            `rate_limit_exceeded` for the key's buckets. Endpoint-specific
            limits use their own code (`snapshot_rate_limited`, `rate_limited`).
        detail:
          type: string
          description: Human-readable explanation.
        bucket:
          type: string
          enum:
            - read
            - trading
            - buy_orders
          description: Which bucket is spent.
        limit_per_min:
          type: integer
          description: That bucket's ceiling per minute.
        retry_after_sec:
          type: integer
          minimum: 1
          maximum: 60
          description: >-
            Seconds until the window restarts — the same number as
            `Retry-After`.
      required:
        - code
  headers:
    X-RateLimit-Limit:
      description: >-
        The ceiling per minute of the bucket this call spent (named in
        `X-RateLimit-Bucket`).
      schema:
        type: integer
      example: 3000
    X-RateLimit-Remaining:
      description: Calls left on that bucket in the current one-minute window.
      schema:
        type: integer
        minimum: 0
      example: 2987
    X-RateLimit-Reset:
      description: >-
        Seconds until the one-minute window restarts and the counter starts
        again.
      schema:
        type: integer
        minimum: 1
        maximum: 60
      example: 41
    X-RateLimit-Bucket:
      description: >-
        The bucket this call spent: `read` (reads and every other keyed call) or
        `trading` (buys, order reads, claims, cancels, balance). A `429` from
        the buy-order limit says `buy_orders`.
      schema:
        type: string
        enum:
          - read
          - trading
          - buy_orders
      example: trading
  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. Calls made with a
        key are metered only by that key's own limits — there is no per-IP limit
        on top — and every answer carries `X-RateLimit-Limit`,
        `X-RateLimit-Remaining`, `X-RateLimit-Reset` and `X-RateLimit-Bucket`
        for the bucket the call spent. See [Rate limits](/rate-limits).

````

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