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

# POST /v1/sell/orders/{id}/cancel: Cancel an Instant Sell Order

> Cancel a sell order before the seller accepts any of its trade offers.

Cancel a sell order while it is `pending` or `offer_sent` and no offer has been accepted. Nothing has been credited at that point, so nothing is reversed. Once the seller accepts an offer the order can no longer be cancelled.

The Steam trade offer itself is not withdrawn. Its items stay committed until that offer expires, so selling them again right away answers `409 active_order_exists`.

**Authentication required.** Send your key as `Authorization: Bearer csb_pub_...`.

## Path parameters

<ParamField path="id" type="string" required>
  The order `id`.
</ParamField>

## Response fields

The sell order after cancelling, in the shape described on [`POST /v1/sell/orders`](/api-reference/post-sell-orders#response-fields).

## Example request

```bash theme={null}
curl -X POST https://csboard.com/v1/sell/orders/cmgk2x9a10001qs01sell0001/cancel \
  -H "Authorization: Bearer csb_pub_..."
```

## Error codes

| HTTP status | Code | Meaning |
| - | - | - |
| 401 | `invalid_api_key` | Missing or invalid API key. |
| 404 | `order_not_found` | No such sell order on your account. |
| 409 | `not_cancellable` | The order is past `offer_sent`, or one of its offers was already accepted. |


## OpenAPI

````yaml POST /sell/orders/{id}/cancel
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: Account
    description: Your balance, settled funds, and trading status.
  - name: Webhooks
    description: Register an endpoint and receive signed order updates instead of polling.
paths:
  /sell/orders/{id}/cancel:
    post:
      tags:
        - Instant Sell
      summary: Cancel a sell order
      description: >-
        Allowed while the order is `pending` or `offer_sent` and no offer has
        been accepted. Later answers `409 not_cancellable`.
      operationId: cancelSellOrder
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The order after cancelling.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SellOrder'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: No such sell order on this account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: order_not_found
                detail: No such sell order on this account.
        '409':
          description: The order can no longer be cancelled.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: not_cancellable
                detail: Only pending or offer_sent orders can be cancelled.
components:
  schemas:
    SellOrder:
      type: object
      required:
        - id
        - app_id
        - status
        - currency
        - total_usd
        - credited_usd
        - created_at
        - trade_offer_ids
        - offers
      properties:
        id:
          type: string
        external_id:
          type:
            - string
            - 'null'
        app_id:
          type: integer
          description: 'Steam app of the sale: `730`, `570` or `252490`.'
        status:
          type: string
          enum:
            - pending
            - offer_sent
            - received
            - completed
            - cancelled
            - failed
        currency:
          type: string
          enum:
            - USD
        total_usd:
          type: number
          description: What the whole order books, in USD.
        credited_usd:
          type: number
          description: What has already reached your balance. Grows offer by offer.
        created_at:
          type: string
          format: date-time
        unhold_at:
          type:
            - string
            - 'null'
          format: date-time
          description: Latest expected credit time across the offers, once known.
        trade_offer_ids:
          type: array
          items:
            type: string
          description: >-
            Every Steam trade offer the seller should expect. Offers that never
            went out are not listed.
        offers:
          type: array
          items:
            $ref: '#/components/schemas/SellOffer'
        fail_reason:
          type:
            - string
            - 'null'
          description: >-
            `cancelled_by_merchant`, `offer_declined`, `offer_expired`,
            `invalid_trade_url`, `item_not_tradable`, `reversed`, `price_drift`
            or `failed`.
    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
    SellOffer:
      type: object
      properties:
        offer_group:
          type: string
          description: >-
            `a`, `b`, and so on, in the order the offers were created. Matches
            the quote's `offer_group` when you sell the whole quoted inventory.
        trade_offer_id:
          type:
            - string
            - 'null'
          description: Steam trade offer id, once the offer exists.
        status:
          type: string
          enum:
            - pending
            - offer_sent
            - received
            - completed
            - cancelled
            - failed
        amount_usd:
          type: number
          description: What this offer books, in USD.
        expires_at:
          type:
            - string
            - 'null'
          format: date-time
        items:
          type: array
          items:
            $ref: '#/components/schemas/SellOrderItem'
        bot:
          $ref: '#/components/schemas/SellBot'
    SellOrderItem:
      type: object
      properties:
        asset_id:
          type:
            - string
            - 'null'
        market_hash_name:
          type:
            - string
            - 'null'
        price_usd:
          type:
            - number
            - 'null'
          description: What this item books, in USD.
        status:
          type: string
          enum:
            - pending
            - offer_sent
            - received
            - completed
            - cancelled
            - failed
          description: The status of the offer this item rides in.
    SellBot:
      type:
        - object
        - 'null'
      description: >-
        The Steam account sending this offer. Show it to the seller so they can
        check the incoming offer.
      properties:
        name:
          type:
            - string
            - 'null'
        avatar:
          type:
            - string
            - 'null'
        steam_id:
          type:
            - string
            - 'null'
        profile_url:
          type:
            - string
            - 'null'
        level:
          type:
            - integer
            - 'null'
  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
  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.