openapi: 3.0.4
info:
title: DMarket trading API
description: 'Welcome to the DMarket Trading API section. Our JSON-based API enables you to manage your
DMarket inventory through the methods featured below. In order to use the API, please generate your
personal API keys in the account settings.
Request signature instructions
A valid HTTP request to the trading API must include 3 request headers:
1) X-Api-Key: public key (must be a hex string in lowercase)
To get you your own public key, use <https://dmarket.com/> (details : <https://dmarket.com/faq#tradingAPI>)
2) X-Sign-Date: timestamp or current time
Example: 1605619994. Must not be older than 2 minutes from the request time.
3) X-Request-Sign: signature
The Ed25519 signature scheme is used for signing requests and proving items’ origin and ownership
through public-private key pairs. Private and public keys diversification is aimed to provide secure
back-to-back communication and the ability to rotate keys in case of security breaches on any side
of the integration.
To make a signature, take the following steps:
1) Build non-signed string formula (HTTP Method) + (Route path + HTTP query params) + (body string)
+ (timestamp) ). Example: POST/get-item?Amount=%220.25%22&Limit=%22100%22&Offset=%22150%22&Order=%22desc%22&1605619994)
2) After you’ve created a non-signed string with a default concatenation method, sign it with Ed25519
(NaCl <https://en.wikipedia.org/wiki/NaCl_(software)> "sign" is Ed25519) using your secret key.
3) Hex-encode the 64-byte Ed25519 signature
4) Add your signature string to HTTP request headers X-Request-Sign (dmar ed25519 signature)
You can check out examples on <https://github.com/dmarket/dm-trading-tools>.
DMarket uses rate limiting to control the rate of API requests. Please read FAQ for details <https://dmarket.com/faq#startUsingTradingAPI>.'
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: Account
description: User profile and balance.
- name: Buy items
description: Browse marketplace offers and buy orders (targets), and purchase items.
- name: Sell Items
description: Create, edit, delete and list your sell offers.
- name: Sold user items
description: History of your completed sales.
- name: Inventory/items
description: User inventory, deposits and withdrawals.
- name: Aggregator
description: Aggregated market price data.
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
paths:
/account/v1/user:
get:
tags:
- Account
summary: Get user profile
description: Getting general user profile information.
operationId: getUserByTokenHandler
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/representation.UserAccountResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/representation.UserAccountResponse'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/api.ErrorRepresentation'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/api.ErrorRepresentation'
default:
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/representation.UserAccountResponse'
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\n\
curl 'https://api.dmarket.com/account/v1/user' \\\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
from dmarket_client import DMarketClient
client = DMarketClient(public_key="<public hex>", secret_key="<secret hex>")
result, err = client.call("GET", "/account/v1/user")
print(result)'
/account/v1/balance:
get:
tags:
- Account
summary: Get account balance
description: Getting the current USD & DMC balance that is available for trading items / buying
subscriptions. The response format is in coins (cents for USD, dimoshi for DMC).
operationId: getUserBalance
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/representation.UserBalance'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/api.ErrorRepresentation'
'409':
description: Conflict
content:
application/json:
schema:
$ref: '#/components/schemas/api.ErrorRepresentation'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/api.ErrorRepresentation'
default:
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/representation.UserBalance'
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\n\
curl 'https://api.dmarket.com/account/v1/balance' \\\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
from dmarket_client import DMarketClient
client = DMarketClient(public_key="<public hex>", secret_key="<secret hex>")
result, err = client.call("GET", "/account/v1/balance")
print(result)'
/marketplace-api/v1/deposit-assets:
post:
tags:
- Sell Items
summary: Deposit assets
description: Transferring items from a 3rd party inventory (e.g. a Steam game) to a Dmarket inventory.
operationId: DepositAssets
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/marketplaceDepositAssetsRequest'
example:
AssetID:
- a1b2c3d4-e5f6-7890-abcd-ef1234567890
- b2c3d4e5-f6a7-8901-bcde-f23456789012
required: true
responses:
'200':
description: A successful response.
content:
application/json:
schema:
$ref: '#/components/schemas/marketplaceDepositAssetsResponse'
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\n\
curl -X POST 'https://api.dmarket.com/marketplace-api/v1/deposit-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 \"AssetID\": [\n \"\
a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"b2c3d4e5-f6a7-8901-bcde-f23456789012\"\n ]\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 \"AssetID\": [\n \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\"\
,\n \"b2c3d4e5-f6a7-8901-bcde-f23456789012\"\n ]\n}\nresult, err = client.call(\"\
POST\", \"/marketplace-api/v1/deposit-assets\", payload=payload)\nprint(result)"
/marketplace-api/v1/deposit-status/{DepositID}:
get:
tags:
- Sell Items
summary: Get deposit status
description: Get information about current deposit transfers.
operationId: GetDepositStatus
parameters:
- name: DepositID
in: path
description: Deposit operation unique identifier.
required: true
style: simple
explode: false
schema:
type: string
responses:
'200':
description: A successful response.
content:
application/json:
schema:
$ref: '#/components/schemas/marketplaceGetDepositStatusResponse'
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\n\
curl 'https://api.dmarket.com/marketplace-api/v1/deposit-status/e5f6a7b8-c9d0-1234-ef01-567890123456'\
\ \\\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
from dmarket_client import DMarketClient
client = DMarketClient(public_key="<public hex>", secret_key="<secret hex>")
result, err = client.call("GET", "/marketplace-api/v1/deposit-status/e5f6a7b8-c9d0-1234-ef01-567890123456")
print(result)'
/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\n\
curl -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\n\
curl -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)\n\
print(result)"
/marketplace-api/v2/user/offers:
get:
tags:
- Sell Items
summary: List user offers
description: 'Get the list of the current user''s active sell offers for further management (edit
price, remove from sale). Prices are returned as integer cents. ''gameId'' param values are: CS2
- a8db, Team Fortress 2 - tf2, Dota 2 - 9a92, Rust - rust.'
operationId: GetUserOffersV2
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
example: a8db
- name: title
in: query
description: Filter offers 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: `categoryPath`, `type`, `priceCents`, `tradeLockFrom`, `tradeLockTo`.
Filter by game and title via the top-level `gameId` and `title` query parameters.
CS2 keys: `exterior`, `paintSeed`, `floatPart`, `phase`, `category`, `collection`, `charmName`,
`charmExists`, `sticker`, `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`. Negation is not supported
for `charmName`/`sticker`.
Ranges: `fadePercentFrom=10,fadePercentTo=90`. Steam trade-lock filtering uses `tradeLockFrom`/`tradeLockTo`
(remaining lock in days; `tradeLockFrom` is inclusive, `tradeLockTo` is exclusive).
Existence check: `charmExists=true` / `charmExists=false`.
Charm and sticker filters (`charmName`, `sticker[]`, `charmExists`) apply to CS2 offers only.
Example: `categoryPath=rifle,exterior[]=factory new,exterior[]=minimal wear`.'
required: false
schema:
type: string
example: categoryPath=rifle,exterior[]=factory new
- name: orderBy
in: query
description: 'Sort field. Supported values: `price`, `title`, `float`, `createdAt`.'
required: false
schema:
type: string
enum:
- price
- title
- float
- createdAt
- 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/marketplacev2GetUserOffersResponse'
example:
items:
- offerId: c3d4e5f6-1234-4abc-9def-7890abcdef12
priceCents: 1599
createdAt: '2026-06-17T10:30:00Z'
locked: false
attributes:
title: AK-47 | Redline (Field-Tested)
gameId: a8db
categoryPath: rifle/ak-47
tradable: true
cs2Attributes:
exterior: field-tested
floatValue: 0.2356
paintSeed: 412
total: 7
cursor: ''
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\n\
curl -G 'https://api.dmarket.com/marketplace-api/v2/user/offers' \\\n --data-urlencode 'gameId=a8db'\
\ \\\n --data-urlencode 'title=AK-47' \\\n --data-urlencode 'treeFilters=categoryPath=rifle,exterior[]=factory\
\ new' \\\n --data-urlencode 'orderBy=createdAt' \\\n --data-urlencode 'orderDir=desc' \\\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\": \"createdAt\",\n \"orderDir\"\
: \"desc\",\n \"limit\": 10\n}\nresult, err = client.call(\"GET\", \"/marketplace-api/v2/user/offers\"\
, payload=payload)\nprint(result)"
/marketplace-api/v1/user-offers/closed:
get:
tags:
- Sold user items
summary: List user closed offers
description: Get the list of the user’s closed sell offers. The price amount format is in USD, i.e.
0.5 is 50 cents.
operationId: GetUserClosedOffers
parameters:
- name: Limit
description: Limits number of returned closed offers in response.
in: query
required: false
schema:
type: string
format: uint64
- name: OrderDir
in: query
required: false
schema:
type: string
enum:
- desc
- asc
default: desc
- name: OfferCreated.From
in: query
required: false
schema:
type: string
format: int64
example: '1730419200'
- name: OfferCreated.To
in: query
required: false
schema:
type: string
format: int64
example: '1730419200'
- name: OfferClosed.From
in: query
required: false
schema:
type: string
format: int64
example: '1730419200'
- name: OfferClosed.To
in: query
required: false
schema:
type: string
format: int64
example: '1730419200'
- name: Cursor
description: Cursor is next page identifier.
in: query
required: false
schema:
type: string
- name: Finalization.From
in: query
required: false
schema:
type: string
format: int64
example: '1730419200'
- name: Finalization.To
in: query
required: false
schema:
type: string
format: int64
example: '1730419200'
- name: Status
in: query
required: false
schema:
type: array
items:
type: string
enum:
- successful
- reverted
- trade_protected
responses:
'200':
description: A successful response.
content:
application/json:
schema:
$ref: '#/components/schemas/marketplaceGetUserClosedOffersResponse'
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\n\
curl -G 'https://api.dmarket.com/marketplace-api/v1/user-offers/closed' \\\n --data-urlencode\
\ 'Limit=10' \\\n --data-urlencode 'OrderDir=desc' \\\n --data-urlencode 'Status=successful'\
\ \\\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 \"Limit\": 10,\n \"OrderDir\": \"desc\",\n \"Status\"\
: \"successful\"\n}\nresult, err = client.call(\"GET\", \"/marketplace-api/v1/user-offers/closed\"\
, payload=payload)\nprint(result)"
/marketplace-api/v1/targets-by-title/{game_id}/{title}:
get:
tags:
- Buy items
summary: Find buy orders (targets) by item title
description: 'Returns aggregated buy orders (targets) for a specific game and item title. Use this
endpoint to see current demand: how many buy orders exist and at what prices.
Path parameters:
- game_id: Game identifier (e.g., csgo, dota2, rust).
- title: Exact in-game item title.
Response contains a list of orders with fields: amount (number of items requested), price (best
price for that title and attributes), title, and attributes (quality/rarity/skin parameters, depending
on the game).'
operationId: MarketAPI_GetTargetsByTitle
responses:
'200':
description: A successful response.
content:
application/json:
schema:
$ref: '#/components/schemas/marketplaceGetTargetsByTitleResponse'
default:
description: An unexpected error response
content:
application/json:
schema:
$ref: '#/components/schemas/runtimeError'
parameters:
- name: game_id
in: path
required: true
schema:
type: string
- name: title
in: path
required: true
schema:
type: string
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\n\
curl 'https://api.dmarket.com/marketplace-api/v1/targets-by-title/a8db/AK-47%20%7C%20Redline%20%28Field-Tested%29'\
\ \\\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
from dmarket_client import DMarketClient
client = DMarketClient(public_key="<public hex>", secret_key="<secret hex>")
result, err = client.call("GET", "/marketplace-api/v1/targets-by-title/a8db/AK-47%20%7C%20Redline%20%28Field-Tested%29")
print(result)'
/marketplace-api/v1/aggregated-prices:
post:
summary: Get aggregated market prices for item titles
description: 'Returns aggregated pricing for specified item titles, including best buy (order) and
best sell (offer) prices and the total number of orders/offers per title. Use this to quickly
assess market depth and price levels.
Request body:
- filter.game: Game identifier.
- filter.titles[]: List of exact item titles to aggregate.
- limit, cursor: Pagination controls.
Response:
- aggregatedPrices[]: For each title: orderBestPrice, orderCount, offerBestPrice, offerCount.
- nextCursor: Use to fetch the next page.'
operationId: MarketAPI_ListAggregatedPrices
responses:
'200':
description: A successful response.
content:
application/json:
schema:
$ref: '#/components/schemas/marketplaceListAggregatedPricesResponse'
default:
description: An unexpected error response.
content:
application/json:
schema:
$ref: '#/components/schemas/runtimeError'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/marketplaceListAggregatedPricesRequest'
example:
filter:
game: a8db
titles:
- AK-47 | Redline (Field-Tested)
limit:
# --- truncated at 32 KB (105 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/dmarket/refs/heads/main/openapi/dmarket-trading-openapi.yml