DMarket Inventory/items API

User inventory, deposits and withdrawals.

Operations 4

GET /marketplace-api/v2/user/inventory List user inventory #
POST /marketplace-api/v1/user-inventory/sync Sync inventory with Steam #
POST /exchange/v1/withdraw-assets Withdraw assets #
GET /exchange/v1/customized-fees List low-fee items #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/dmarket-inventory-items-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

dmarket-inventory-items-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: DMarket trading Inventory/items API
  description: Welcome to the DMarket Trading API section.
  version: v2.0.0
  x-logo:
    url: logo.svg
    backgroundColor: '#FFFFFF'
    altText: DMarket logo
servers:
- url: https://api.dmarket.com
security:
- ApiKey: []
  SignDate: []
  RequestSign: []
tags:
- name: Inventory Items
  description: User inventory, deposits and withdrawals.
paths:
  /marketplace-api/v2/user/inventory:
    get:
      tags:
      - Inventory Items
      summary: List user inventory
      description: 'Get user inventory details. Both 3rd party (e.g. Steam) and DMarket inventories are merged into one list. Prices are returned as integer cents. ''gameId'' param values are: CS2 - a8db, Team Fortress 2 - tf2, Dota 2 - 9a92, Rust - rust.'
      operationId: GetUserInventoryV2
      x-badges:
      - name: NEW
        color: '#04BA39'
      parameters:
      - name: gameId
        in: query
        description: 'Game identifier. One of: a8db (CS2), 9a92 (Dota 2), tf2, rust.'
        required: true
        schema:
          type: string
          enum:
          - a8db
          - 9a92
          - tf2
          - rust
      - name: title
        in: query
        description: Filter assets by title prefix (case-insensitive).
        required: false
        schema:
          type: string
      - name: treeFilters
        in: query
        description: 'Attribute filters in comma-separated key=value format. Values must match how the attribute is stored (typically the lowercase Steam string; see allowed values below).


          Supported common keys: `tradable`, `inMarket`, `categoryPath`, `type`. Filter by game and title via the top-level `gameId` and `title` query parameters.


          CS2 keys: `exterior`, `paintSeed`, `floatPart`, `phase`, `category`, `collection`, `charmName`, `charmExists`, `isProskin`, `fadePercentFrom`, `fadePercentTo`.


          TF2 keys: `exterior`, `collection`, `isCraftable`. Dota 2 keys: `hero`.


          Allowed CS2 values:

          - `exterior`: `factory new`, `minimal wear`, `field-tested`, `well-worn`, `battle-scarred`, `not painted`

          - `phase`: `phase-1`, `phase-2`, `phase-3`, `phase-4`, `ruby`, `sapphire`, `emerald`, `black-pearl`

          - `floatPart`: `FN-0`..`FN-6`, `MW-0`..`MW-4`, `FT-0`..`FT-4`, `WW-0`..`WW-4`, `BS-0`..`BS-4` (bucketed float ranges per exterior)

          - `category`: `stattrak_tm` (`_tm` is translated to the ™ symbol server-side), `souvenir`, `normal`, `★` (knives)


          Allowed TF2 exterior values: `factory new`, `minimal wear`, `field-tested`, `well-worn`, `battle-scarred`, `battle scarred`.


          Multi-value: suffix key with `[]`, e.g. `exterior[]=factory new,exterior[]=minimal wear` (URL-encode the space as `%20`).


          Negation: prefix key with `not_`, e.g. `not_exterior=factory new`.


          Ranges: `fadePercentFrom=10,fadePercentTo=90`.


          Existence check: `charmExists=true` / `charmExists=false`.


          Example: `categoryPath=rifle,exterior[]=factory new,exterior[]=minimal wear`.'
        required: false
        schema:
          type: string
      - name: orderBy
        in: query
        description: 'Sort field. Supported values: `price`, `title`, `float`, `createdAt`, `updatedAt`.'
        required: false
        schema:
          type: string
          enum:
          - price
          - title
          - float
          - createdAt
          - updatedAt
      - name: orderDir
        in: query
        description: Sort direction. Defaults to `asc` when `orderBy` is set.
        required: false
        schema:
          type: string
          enum:
          - asc
          - desc
      - name: limit
        in: query
        description: Number of items to return per page. Range 1..100.
        required: true
        schema:
          type: integer
          format: int32
          minimum: 1
          maximum: 100
      - name: cursor
        in: query
        description: Pagination cursor returned from a previous response.
        required: false
        schema:
          type: string
          maxLength: 500
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/marketplacev2GetUserInventoryResponse'
        default:
          description: An unexpected error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/runtimeError'
      x-codeSamples:
      - lang: Shell
        label: cURL
        source: "# Sign the request and set the three auth headers — reference clients: https://github.com/dmarket/dm-trading-tools\ncurl -G 'https://api.dmarket.com/marketplace-api/v2/user/inventory' \\\n  --data-urlencode 'gameId=a8db' \\\n  --data-urlencode 'title=AK-47' \\\n  --data-urlencode 'treeFilters=categoryPath=rifle,exterior[]=factory new' \\\n  --data-urlencode 'orderBy=price' \\\n  --data-urlencode 'orderDir=asc' \\\n  --data-urlencode 'limit=10' \\\n  -H \"X-Api-Key: $DMARKET_PUBLIC_KEY\" \\\n  -H \"X-Sign-Date: $TIMESTAMP\" \\\n  -H \"X-Request-Sign: dmar ed25519 $SIGNATURE\""
      - lang: Python
        label: Python (dm-trading-tools)
        source: "# Full signing client: https://github.com/dmarket/dm-trading-tools\nfrom dmarket_client import DMarketClient\n\nclient = DMarketClient(public_key=\"<public hex>\", secret_key=\"<secret hex>\")\npayload = {\n    \"gameId\": \"a8db\",\n    \"title\": \"AK-47\",\n    \"treeFilters\": \"categoryPath=rifle,exterior[]=factory new\",\n    \"orderBy\": \"price\",\n    \"orderDir\": \"asc\",\n    \"limit\": 10\n}\nresult, err = client.call(\"GET\", \"/marketplace-api/v2/user/inventory\", payload=payload)\nprint(result)"
  /marketplace-api/v1/user-inventory/sync:
    post:
      tags:
      - Inventory Items
      summary: Sync inventory with Steam
      description: Updating DMarket inventory details to sync them with data from Steam.
      operationId: UserInventorySync
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/marketplaceUserInventorySyncRequest'
            example:
              Type: Inventory
              GameID: CSGO
        required: true
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/marketplaceUserInventorySyncResponse'
        default:
          description: An unexpected error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/runtimeError'
      x-codeSamples:
      - lang: Shell
        label: cURL
        source: "# Sign the request and set the three auth headers — reference clients: https://github.com/dmarket/dm-trading-tools\ncurl -X POST 'https://api.dmarket.com/marketplace-api/v1/user-inventory/sync' \\\n  -H 'Content-Type: application/json' \\\n  -H \"X-Api-Key: $DMARKET_PUBLIC_KEY\" \\\n  -H \"X-Sign-Date: $TIMESTAMP\" \\\n  -H \"X-Request-Sign: dmar ed25519 $SIGNATURE\" \\\n  -d '{\n  \"Type\": \"Inventory\",\n  \"GameID\": \"CSGO\"\n}'"
      - lang: Python
        label: Python (dm-trading-tools)
        source: "# Full signing client: https://github.com/dmarket/dm-trading-tools\nfrom dmarket_client import DMarketClient\n\nclient = DMarketClient(public_key=\"<public hex>\", secret_key=\"<secret hex>\")\npayload = {\n    \"Type\": \"Inventory\",\n    \"GameID\": \"CSGO\"\n}\nresult, err = client.call(\"POST\", \"/marketplace-api/v1/user-inventory/sync\", payload=payload)\nprint(result)"
  /exchange/v1/withdraw-assets:
    post:
      tags:
      - Inventory Items
      summary: Withdraw assets
      description: 'Withdraw assets. ''gameId'' param values are: CS2 - a8db, Team Fortress 2 - tf2, Dota 2 - 9a92, Rust - rust'
      operationId: withdrawAssetsHandler
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/entity.WithdrawAssetsRequest'
            example:
              assets:
              - id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                gameId: a8db
                classId: c7e8f9a0-1234-5678-9abc-def012345678
              requestId: withdraw-001
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/entity.WithdrawResponse'
        '400':
          description: Bad body request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rest.ErrorRepresentation'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rest.ErrorRepresentation'
        default:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/entity.WithdrawResponse'
      x-codeSamples:
      - lang: Shell
        label: cURL
        source: "# Sign the request and set the three auth headers — reference clients: https://github.com/dmarket/dm-trading-tools\ncurl -X POST 'https://api.dmarket.com/exchange/v1/withdraw-assets' \\\n  -H 'Content-Type: application/json' \\\n  -H \"X-Api-Key: $DMARKET_PUBLIC_KEY\" \\\n  -H \"X-Sign-Date: $TIMESTAMP\" \\\n  -H \"X-Request-Sign: dmar ed25519 $SIGNATURE\" \\\n  -d '{\n  \"assets\": [\n    {\n      \"id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n      \"gameId\": \"a8db\",\n      \"classId\": \"c7e8f9a0-1234-5678-9abc-def012345678\"\n    }\n  ],\n  \"requestId\": \"withdraw-001\"\n}'"
      - lang: Python
        label: Python (dm-trading-tools)
        source: "# Full signing client: https://github.com/dmarket/dm-trading-tools\nfrom dmarket_client import DMarketClient\n\nclient = DMarketClient(public_key=\"<public hex>\", secret_key=\"<secret hex>\")\npayload = {\n    \"assets\": [\n        {\n            \"id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n            \"gameId\": \"a8db\",\n            \"classId\": \"c7e8f9a0-1234-5678-9abc-def012345678\"\n        }\n    ],\n    \"requestId\": \"withdraw-001\"\n}\nresult, err = client.call(\"POST\", \"/exchange/v1/withdraw-assets\", payload=payload)\nprint(result)"
  /exchange/v1/customized-fees:
    get:
      tags:
      - Inventory Items
      summary: List low-fee items
      description: 'Get the list of items with lower fees. The new list of items every day. ''gameId'' param values are: CS2 - a8db, Team Fortress 2 - tf2, Dota 2 - 9a92, Rust - rust. ''offerType'' param values are: ''dmarket'', ''p2p''.'
      operationId: getCustomizedItems
      parameters:
      - name: gameId
        in: query
        description: 'enums: CS2 - a8db, Team Fortress 2 - tf2, Dota 2 - 9a92, Rust - rust'
        required: true
        style: form
        explode: true
        schema:
          type: string
      - name: offerType
        in: query
        description: 'enums: "dmarket", "p2p"'
        required: false
        style: form
        explode: true
        schema:
          type: string
          default: dmarket
      - name: limit
        in: query
        description: limit
        required: false
        style: form
        explode: true
        schema:
          type: integer
          default: 10
      - name: offset
        in: query
        description: offset
        required: false
        style: form
        explode: true
        schema:
          type: integer
          default: 0
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/entity.ListFeeResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rest.ErrorRepresentation'
        default:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/entity.ListFeeResponse'
      x-codeSamples:
      - lang: Shell
        label: cURL
        source: "# Sign the request and set the three auth headers — reference clients: https://github.com/dmarket/dm-trading-tools\ncurl -G 'https://api.dmarket.com/exchange/v1/customized-fees' \\\n  --data-urlencode 'gameId=a8db' \\\n  --data-urlencode 'offerType=dmarket' \\\n  --data-urlencode 'limit=20' \\\n  --data-urlencode 'offset=0' \\\n  -H \"X-Api-Key: $DMARKET_PUBLIC_KEY\" \\\n  -H \"X-Sign-Date: $TIMESTAMP\" \\\n  -H \"X-Request-Sign: dmar ed25519 $SIGNATURE\""
      - lang: Python
        label: Python (dm-trading-tools)
        source: "# Full signing client: https://github.com/dmarket/dm-trading-tools\nfrom dmarket_client import DMarketClient\n\nclient = DMarketClient(public_key=\"<public hex>\", secret_key=\"<secret hex>\")\npayload = {\n    \"gameId\": \"a8db\",\n    \"offerType\": \"dmarket\",\n    \"limit\": 20,\n    \"offset\": 0\n}\nresult, err = client.call(\"GET\", \"/exchange/v1/customized-fees\", payload=payload)\nprint(result)"
components:
  schemas:
    entity.ListDefaultFee:
      required:
      - minAmount
      - fraction
      properties:
        fraction:
          type: string
        minAmount:
          type: integer
          format: int64
    marketplaceInventorySyncType:
      type: string
      default: UnknownSyncType
      enum:
      - UnknownSyncType
      - Inventory
    marketplaceUserInventorySyncResponse:
      type: object
    marketplaceUserInventorySyncRequest:
      type: object
      properties:
        Type:
          $ref: '#/components/schemas/marketplaceInventorySyncType'
        GameID:
          $ref: '#/components/schemas/marketplaceGames'
    entity.Asset:
      required:
      - classId
      - gameId
      - id
      properties:
        classId:
          type: string
        gameId:
          type: string
        id:
          type: string
    entity.WithdrawResponse:
      required:
      - transferId
      properties:
        transferId:
          type: string
    rest.ErrorRepresentation:
      required:
      - code
      - message
      properties:
        code:
          type: string
        message:
          type: string
    entity.WithdrawAssetsRequest:
      required:
      - assets
      - requestId
      properties:
        assets:
          type: array
          items:
            $ref: '#/components/schemas/entity.Asset'
        requestId:
          type: string
    marketplacev2GetUserInventoryResponse:
      type: object
      properties:
        items:
          type: array
          description: User inventory assets.
          items:
            $ref: '#/components/schemas/marketplacev2Asset'
        total:
          type: integer
          format: int64
          description: Total number of items matching the filter criteria across all pages, independent of limit/cursor.
        cursor:
          type: string
          description: Cursor for the next page. Empty when there are no more pages.
    entity.ListPersonalFee:
      required:
      - title
      - fraction
      - minPrice
      - maxPrice
      - expiresAt
      properties:
        expiresAt:
          type: integer
          format: int64
        fraction:
          type: string
        maxPrice:
          type: integer
          format: int64
        minPrice:
          type: integer
          format: int64
        title:
          type: string
    marketplacev2Asset:
      type: object
      description: User inventory asset with typed attributes.
      properties:
        attributes:
          description: Game-specific asset attributes. See `asset.Attributes` in the marketplace-api proto schema for the full oneof definition.
          type: object
          additionalProperties: true
        suggestedPrice:
          $ref: '#/components/schemas/typeCommonMoney'
        offerRecommendedPrice:
          $ref: '#/components/schemas/typeCommonMoney'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        inMarket:
          type: boolean
          description: True if the asset is held on DMarket; false if still in the user's Steam inventory.
    typeCommonMoney:
      type: object
      description: Monetary amount. `amount` is a decimal string (e.g. `"1.50"`).
      properties:
        currency:
          type: string
          description: ISO 4217 currency code (e.g. `USD`).
        amount:
          type: string
          description: Decimal amount as a string.
    entity.ListFeeResponse:
      required:
      - defaultFee
      - reducedFees
      properties:
        defaultFee:
          $ref: '#/components/schemas/entity.ListDefaultFee'
        reducedFees:
          type: array
          items:
            $ref: '#/components/schemas/entity.ListPersonalFee'
    marketplaceGames:
      type: string
      default: UnknownGame
      enum:
      - UnknownGame
      - CSGO
      - Dota2
      - TF2
      - LifeBeyond
      - Rust
    runtimeError:
      type: object
      properties:
        error:
          type: string
        code:
          type: integer
          format: int32
        message:
          type: string
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: X-Api-Key
      description: Public API key (lowercase hex). Generate it in your DMarket account settings. See https://dmarket.com/faq#tradingAPI.
    SignDate:
      type: apiKey
      in: header
      name: X-Sign-Date
      description: Unix timestamp in seconds at signing time (e.g. 1605619994). Must be within 2 minutes of server time.
    RequestSign:
      type: apiKey
      in: header
      name: X-Request-Sign
      description: 'Ed25519 request signature prefixed with `dmar ed25519 `. Sign the concatenation of HTTP method + path (including query string) + body + X-Sign-Date with your secret key, then hex-encode the 64-byte Ed25519 signature. Reference clients (Go, Python, JS, PHP): https://github.com/dmarket/dm-trading-tools.'
x-tagGroups:
- name: Account
  tags:
  - Account
- name: Trading
  tags:
  - Buy items
  - Sell Items
  - Sold user items
- name: Inventory
  tags:
  - Inventory/items
- name: Market data
  tags:
  - Aggregator