Criando uma chave de API

!IMPORTANTE! Se você enviar mais de 5 solicitações por segundo ao nosso servidor, sua chave será excluída. A lista de solicitações de API dos últimos 20 minutos podem ser visualizados aquí.
Aqui você pode criar/recriar uma chave privada para negociação automática, que será vinculada à sua conta. Se você não entender por que a chave é necessária, por favor, para sua própria segurança, não diga a ela qualquer um. Ao usar a API, você concorda com os termos do contract.
Criando uma chave de API

Lembre-se da sua chave

Sua chave [your_secret_key]:
Regras importantes:
  • Será impossível restaurar a chave, só será possível criar uma nova.
  • Não conte sua chave para ninguém, você corre o risco de perder dinheiro e coisas.

Price list (all offers)

prices

Price list in json format. Only Dota2 and CS2.

Sample answer:
{
  "success": true,
  "time": 1724318846,
  "currency": "USD",
  "format": [
    "price",
    "id",
    "market_hash_name",
    "classid",
    "instanceid",
    "real_instance",
    "asset",
    "old_price",
    "stamp",
    "base_id",
    "float",
    "phase",
    "paintseed",
    "paintindex",
    "stickers",
    "type",
    "chance_to_transfer"
  ],
  "items": [
    "17243188645717.json",
    "17243188646993.json",
    "17243188648538.json",
    "17243188649954.json",
    "17243188651414.json",
    "17243188653044.json",
    "17243188654487.json",
    "17243188655857.json",
    "17243188657132.json"
  ]
}
            
Sample answer:

The values are located in the same order as in the list of fields format of the previous file

[
  [
    623,
    5649300794,
    "Negev | Dazzle (Minimal Wear)",
    5075999874,
    188530139,
    188530139,
    38691476335,
    5700,
    "2024-08-22 12:25:02",
    2023,
    "0.14540666341782",
    "",
    "391",
    "610",
    "11289205989|11289205989|11289205989|11289205989",
    "Machinegun",
    80
  ],
  [
    7609,
    5649300802,
    "Glock-18 | Neo-Noir (Well-Worn)",
    4141779994,
    188530139,
    188530139,
    38426905739,
    69900,
    "2024-08-22 12:25:02",
    82040,
    "0.40996930003166",
    "",
    "332",
    "988",
    null,
    "Pistol",
    85
  ]
]
            

Class/instance price list with buy orders

prices/class_instance

The price list is in json format, where buy_order is the maximum buy order for this item.

Sample answer:
{
    "success": true,
    "time": 1565103435,
    "currency": "USD",
    "items": [
        "1434515088_0": {
            "price": "0.50",
            "buy_order": "0.10",
            "avg_price": "0.74",
            "popularity_7d": "47",
            "market_hash_name": "Arcane Defiance Loading Screen",
            "ru_name": "Загрузочный экран «Arcane Defiance»",
            "ru_rarity": "Common",
            "ru_quality": "Standard",
            "text_color": "D2D2D2",
            "bg_color": "",
        },
        "1479313949_0": {
            "price": "0.60",
            "buy_order": "0.10",
            "avg_price": "0.94",
            "popularity_7d": "13",
            "market_hash_name": "Armor of Utter Eradication",
            "ru_name": "Armor of Utter Eradication",
            "ru_rarity": "Uncommon",
            "ru_quality": "Standard",
            "text_color": "D2D2D2",
            "bg_color": "",
        }
    }
}
            

Item sales history

full-history/all.json

Getting a list of all items with sales history

Static JSON files with sales history. Updated about once per hour.

Sample answer:
{
    "history": {
        "Sticker | Vitality | 2020 RMR": 406245,
        "Clutch Case": 406261,
        "Sticker | stavn | Antwerp 2022": 406277,
        "Sealed Graffiti | NaCl (Shark White)": 406388,
        "SG 553 | Ol' Rusty (Factory New)": 406740
    }
}
Details of the answer:
  • history — Object with pairs "item_name": item_id
full-history/[item_id].json

Getting detailed sales history of a specific item

Contains up to 2000 recent item sales with detailed statistics.

Request parameters:
  • [item_id] - Item ID from file full-history/all.json
Sample answer:
{
    "time": 1751980096,
    "data": {
        "id": 406245,
        "max": {"RUB": 1, "USD": 0.849, "EUR": 0.952},
        "min": {"RUB": 1, "USD": 0.849, "EUR": 0.952},
        "average": {"RUB": 1, "USD": 0.85, "EUR": 0.95},
        "average7d": {"RUB": 0, "USD": 0, "EUR": 0},
        "average30d": {"RUB": 0, "USD": 0, "EUR": 0},
        "sales7d": {"RUB": 0, "USD": 0, "EUR": 0},
        "sales30d": {"RUB": 0, "USD": 0, "EUR": 0},
        "history": [[1715859461, 1, 0.849, 0.952]]
    }
}
Details of the answer:
  • time — Last update time (Unix timestamp)
  • data — Item data
  • id — Item ID used in full-history
  • max, min, average — Maximum, minimum and average price in different currencies
  • average7d, average30d — Average price for 7 and 30 days by currencies
  • sales7d, sales30d — Number of sales for 7 and 30 days by currencies
  • history — Sales history array: [timestamp, price_rub, price_usd, price_eur]

Web sockets

On our site there is an opportunity to receive information about new items.

get-ws-token
Request example:

https://market.csgo.com/api/v2/get-ws-token?key=[your_secret_key]

Using this request, you can obtain the token required to connect to the server.

Connection steps:
  1. We use Centrifugo as a server. You can find all the necessary SDK and instructions on how to work with it on the official Centrifugo website.
  2. You need to request a ws token via the API method described above.
  3. Establish a connection to the server and domain specified on the site.
  4. Subscribe to the desired channel.
! IMPORTANT! The key is valid for a limited time and after 10 minutes is no longer accepted by the server.
Available channels:
  • public:items:730:rub - information about changes in price or items for sale for the game with id 730 in currency RUB. (Be careful, the channel generates a lot of traffic!)
  • public:items:730:usd - information about changes in price or items for sale for the game with id 730 in currency USD. (Be careful, the channel generates a lot of traffic!)
  • public:items:730:eur - information about changes in price or items for sale for the game with id 730 in currency EUR. (Be careful, the channel generates a lot of traffic!)
What is "name_id"?:

To save traffic, we do not pass the hash name of the item, but instead give the name_id.

You can compare name_id and hash name from the file, which can be found at:

https://market.csgo.com/api/v2/dictionary/names.json