DMarket trading API (v2.0.0)

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)

Path parameters must appear DECODED in the non-signed string (the literal value, e.g. AK-47 | Redline (Field-Tested)), while query string parameters must appear exactly as they are transmitted, i.e. percent-encoded. The URL you actually send is percent-encoded in both cases. This applies to any method that takes a free-text value in the route path.

  1. 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.
  2. Hex-encode the 64-byte Ed25519 signature
  3. 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.

Servers
https://api.dmarket.com