Skip to content

Controller

Authentication

INFO

For authentication, you need provide apikey of your project in headers example:

js
axios.get(
    'https://controller.sih.market/online/count',
    {
        headers: {
            ['X-Api-Key']: YOUR_API_KEY
        }
    }
)

Trade

Permissions!

Trade send

http
POST https://controller.sih.market/trade/send

INFO

Body:

ts
{
  customId?: string
  tradeMessage?: string
  sender: {
    steamId: string
    items?: Array<{
      appId: number
      itemId: number
      contextId: number
      amount?: number
    }>
  }
  recipient: {
    steamId: string
    tradeToken: string
    items?: Array<{
      appId: number
      itemId: number
      contextId: number
      amount?: number
    }>
  }
}

Trade accept

http
POST https://controller.sih.market/trade/accept

INFO

Body:

ts
{
  steamId: string
  tradeId: string
  senderSteamId?: string
}

Trade decline

http
POST https://controller.sih.market/trade/decline

INFO

Body:

ts
{
  steamId: string
  tradeId: string
}

Trade cancel

http
POST https://controller.sih.market/trade/cancel

INFO

Body:

ts
{
  steamId: string
  tradeId: string
}

User Permissions

Request Permission

http
POST https://controller.sih.market/user/{steamId}/permissions

Body:

ts
{
  permission: 'trade'
}

Default Response:

ts
{
  success: true
}

Bad Response:

ts
{
  success: true,
  error: 'user offline'
}

:::

Get List Permissions

http
GET https://controller.sih.market/user/{steamId}/permissions

Default Response:

ts
{
  success: true,
    data: {
    trading: {
      isBanned: false,
      isAccepted: true
    }
  }
}

Bad Response:

ts
{
  success: true,
  error: 'user offline'
}

User

Get CS2 Inventory

http
GET https://controller.sih.market/user/{steamId}/inventory

INFO

Response:

json
{
  "success": true,
    "data": [
    {
      "appid": 730,
      "contextid": "2",
      "assetid": "38906340786",
      "classid": "6073508912",
      "instanceid": "188530170",
      "amount": 1,
      "pos": 1,
      "id": "38906340786",
      "currency": 0,
      "background_color": "",
      "icon_url": "-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgpou7umeldf1OD3fDxBvYyJkomYn8j2MrLFqWdY781lxL2UrdSl3gPj8hI-a271cY6WdQE9ZwmDqAO2kLrq18W0vpqcwHplvHQ8pSGKvpkuhiw",
      "descriptions": [
        {
          "type": "html",
          "value": "Exterior: Factory New"
        },
        {
          "type": "html",
          "value": " "
        },
        {
          "type": "html",
          "value": "This item features StatTrak™ technology, which tracks certain statistics when equipped by its owner.",
          "color": "99ccff"
        },
        {
          "type": "html",
          "value": " "
        },
        {
          "type": "html",
          "value": "This item tracks Confirmed Kills.",
          "color": "CF6A32"
        },
        {
          "type": "html",
          "value": " "
        },
        {
          "type": "html",
          "value": "Essentially a box that bullets come out of, the MAC-10 SMG boasts a high rate of fire, with poor spread accuracy and high recoil as trade-offs. Fish scales, bones, and hooks have been hand painted in white over a black base.\n\n<i>Catch and decease</i>"
        },
        {
          "type": "html",
          "value": " "
        },
        {
          "type": "html",
          "value": "The Prisma Collection",
          "color": "9da1a9"
        },
        {
          "type": "html",
          "value": " "
        },
        {
          "type": "html",
          "value": "<br><div id=\"sticker_info\" name=\"sticker_info\" title=\"Sticker\" style=\"border: 2px solid rgb(102, 102, 102); border-radius: 6px; width=100; margin:4px; padding:8px;\"><center><img width=64 height=48 src=\"https://steamcdn-a.akamaihd.net/apps/730/icons/econ/stickers/broken_fang/stalking_prey.6863ac90f42b4ace87776a947bbe0dafa080e649.png\"><img width=64 height=48 src=\"https://steamcdn-a.akamaihd.net/apps/730/icons/econ/stickers/broken_fang/stalking_prey.6863ac90f42b4ace87776a947bbe0dafa080e649.png\"><br>Sticker: Stalking Prey, Stalking Prey</center></div>"
        }
      ],
      "tradable": false,
      "actions": [
        {
          "link": "steam://rungame/730/76561202255233023/+csgo_econ_action_preview%20S%owner_steamid%A%assetid%D14330503381291739883",
          "name": "Inspect in Game..."
        }
      ],
      "owner_descriptions": [
        {
          "type": "html",
          "value": " "
        },
        {
          "type": "html",
          "value": "Tradable After Aug 05, 2024 (7:00:00) GMT",
          "color": "ff4040"
        }
      ],
      "name": "StatTrak™ MAC-10 | Whitefish",
      "name_color": "CF6A32",
      "type": "StatTrak™ Mil-Spec Grade SMG",
      "market_name": "StatTrak™ MAC-10 | Whitefish (Factory New)",
      "market_hash_name": "StatTrak™ MAC-10 | Whitefish (Factory New)",
      "market_actions": [
        {
          "link": "steam://rungame/730/76561202255233023/+csgo_econ_action_preview%20M%listingid%A%assetid%D14330503381291739883",
          "name": "Inspect in Game..."
        }
      ],
      "commodity": false,
      "market_tradable_restriction": 7,
      "marketable": true,
      "tags": [
        {
          "internal_name": "CSGO_Type_SMG",
          "name": "SMG",
          "category": "Type",
          "color": "",
          "category_name": "Type"
        },
        {
          "internal_name": "weapon_mac10",
          "name": "MAC-10",
          "category": "Weapon",
          "color": "",
          "category_name": "Weapon"
        },
        {
          "internal_name": "set_community_22",
          "name": "The Prisma Collection",
          "category": "ItemSet",
          "color": "",
          "category_name": "Collection"
        },
        {
          "internal_name": "strange",
          "name": "StatTrak™",
          "category": "Quality",
          "color": "CF6A32",
          "category_name": "Category"
        },
        {
          "internal_name": "Rarity_Rare_Weapon",
          "name": "Mil-Spec Grade",
          "category": "Rarity",
          "color": "4b69ff",
          "category_name": "Quality"
        },
        {
          "internal_name": "WearCategory0",
          "name": "Factory New",
          "category": "Exterior",
          "color": "",
          "category_name": "Exterior"
        }
      ],
      "is_currency": false,
      "market_marketable_restriction": 0,
      "fraudwarnings": [],
      "cache_expiration": "2024-08-05T07:00:00.000Z"
    },
    {
      "appid": 730,
      "contextid": "2",
      "assetid": "38877162635",
      "classid": "6068791451",
      "instanceid": "302028390",
      "amount": 1,
      "pos": 2,
      "id": "38877162635",
      "currency": 0,
      "background_color": "",
      "icon_url": "-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgpot6-iFBRv7OPFcgJP6di_gY3FzqagMenQwDwJ7Z1y3LyY893wjALtrUdtYWH3d9XDdlI4N1HS-AC2kPCv28EJ7v_62A",
      "descriptions": [
        {
          "type": "html",
          "value": "Exterior: Field-Tested"
        },
        {
          "type": "html",
          "value": " "
        },
        {
          "type": "html",
          "value": "Powerful and accurate, the AUG scoped assault rifle compensates for its long reload times with low spread and a high rate of fire. It has individual parts spray-painted tan, navy and dark green.\n\n<i>Rona Sabri still hasn't forgiven Sebastien for not selecting her to go after Turner</i>"
        },
        {
          "type": "html",
          "value": " "
        },
        {
          "type": "html",
          "value": "The Italy Collection",
          "color": "9da1a9"
        },
        {
          "type": "html",
          "value": " "
        }
      ],
      "tradable": false,
      "actions": [
        {
          "link": "steam://rungame/730/76561202255233023/+csgo_econ_action_preview%20S%owner_steamid%A%assetid%D17032687347414228034",
          "name": "Inspect in Game..."
        }
      ],
      "owner_descriptions": [
        {
          "type": "html",
          "value": " "
        },
        {
          "type": "html",
          "value": "Tradable After Aug 03, 2024 (7:00:00) GMT",
          "color": "ff4040"
        }
      ],
      "name": "AUG | Contractor",
      "name_color": "D2D2D2",
      "type": "Consumer Grade Rifle",
      "market_name": "AUG | Contractor (Field-Tested)",
      "market_hash_name": "AUG | Contractor (Field-Tested)",
      "market_actions": [
        {
          "link": "steam://rungame/730/76561202255233023/+csgo_econ_action_preview%20M%listingid%A%assetid%D17032687347414228034",
          "name": "Inspect in Game..."
        }
      ],
      "commodity": false,
      "market_tradable_restriction": 7,
      "marketable": true,
      "tags": [
        {
          "internal_name": "CSGO_Type_Rifle",
          "name": "Rifle",
          "category": "Type",
          "color": "",
          "category_name": "Type"
        },
        {
          "internal_name": "weapon_aug",
          "name": "AUG",
          "category": "Weapon",
          "color": "",
          "category_name": "Weapon"
        },
        {
          "internal_name": "set_italy",
          "name": "The Italy Collection",
          "category": "ItemSet",
          "color": "",
          "category_name": "Collection"
        },
        {
          "internal_name": "normal",
          "name": "Normal",
          "category": "Quality",
          "color": "",
          "category_name": "Category"
        },
        {
          "internal_name": "Rarity_Common_Weapon",
          "name": "Consumer Grade",
          "category": "Rarity",
          "color": "b0c3d9",
          "category_name": "Quality"
        },
        {
          "internal_name": "WearCategory2",
          "name": "Field-Tested",
          "category": "Exterior",
          "color": "",
          "category_name": "Exterior"
        }
      ],
      "is_currency": false,
      "market_marketable_restriction": 0,
      "fraudwarnings": [],
      "cache_expiration": "2024-08-03T07:00:00.000Z"
    }
  ]
}

Get trades

http
GET https://controller.sih.market/user/{steamId}/trades

INFO

search params:
get_received_offers=1
get_sent_offers=0

INFO

ETradeOfferState (property trade_offer_state):

ValueDescription
1Invalid
2This trade offer has been sent, neither party has acted on it yet.
3The trade offer was accepted by the recipient and items were exchanged.
4The recipient made a counter offer
5The trade offer was not accepted before the expiration date
6The sender cancelled the offer
7The recipient declined the offer
8Some of the items in the offer are no longer available (indicated by the missing flag in the output)
9The offer hasn't been sent yet and is awaiting email/mobile confirmation. The offer is only visible to the sender.
10Either party canceled the offer via email/mobile. The offer is visible to both parties, even if the sender canceled it before it was sent.
11The trade has been placed on hold. The items involved in the trade have all been removed from both parties' inventories and will be automatically delivered in the future.
12The sender made a offer refund

INFO

Example Response:

json
{
  "response": {
    "trade_offers_sent": [
      {
        "eresult": 1,
        "message": "",
        "tradeid": "814705163806722378",
        "is_our_offer": true,
        "time_created": 1752652578,
        "time_updated": 1752653583,
        "tradeofferid": "8280989817",
        "items_to_give": [
          {
            "appid": 730,
            "amount": "1",
            "assetid": "43438837985",
            "classid": "5721076182",
            "est_usd": "230",
            "missing": true,
            "contextid": "2",
            "instanceid": "188530170",
            "new_assetid": "45180404051",
            "new_contextid": "16"
          },
          {
            "appid": 730,
            "amount": "1",
            "assetid": "44971104676",
            "classid": "310776590",
            "est_usd": "3",
            "missing": true,
            "contextid": "2",
            "instanceid": "7244859826",
            "new_assetid": "45180404085",
            "new_contextid": "16"
          }
        ],
        "accountid_other": 81470413,
        "escrow_end_date": 0,
        "expiration_time": 1753862178,
        "delay_settlement": true,
        "items_to_receive": [
          {
            "appid": 730,
            "amount": "1",
            "assetid": "44887092605",
            "classid": "3035568051",
            "est_usd": "3",
            "missing": true,
            "contextid": "2",
            "instanceid": "302028390",
            "new_assetid": "45180404072",
            "new_contextid": "16"
          }
        ],
        "trade_offer_state": 3,
        "confirmation_method": 2,
        "from_real_time_trade": false,
        "time_settlement": 1753340400
      }
    ],
    "trade_offers_received": [],
    "next_cursor": 0
  }
}