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

Example Response:

json
{
  "response": {
    "trade_offers_sent": [
      {
        "eresult": 1,
        "message": "",
        "is_our_offer": true,
        "time_created": 1722039177,
        "time_updated": 1722039259,
        "tradeofferid": "7263335954",
        "items_to_give": [
          {
            "appid": 730,
            "amount": "1",
            "assetid": "36839677923",
            "classid": "3186045689",
            "est_usd": "65",
            "missing": false,
            "contextid": "2",
            "instanceid": "188530139"
          }
        ],
        "accountid_other": 201008440,
        "escrow_end_date": 0,
        "expiration_time": 1723248777,
        "trade_offer_state": 7,
        "confirmation_method": 2,
        "from_real_time_trade": false
      }
    ],
    "trade_offers_received": [
      {
        "eresult": 1,
        "message": "",
        "tradeid": "5577229426304392726",
        "is_our_offer": false,
        "time_created": 1722011157,
        "time_updated": 1722011205,
        "tradeofferid": "7262856921",
        "accountid_other": 1555905551,
        "escrow_end_date": 0,
        "expiration_time": 1723220757,
        "items_to_receive": [
          {
            "appid": 730,
            "amount": "1",
            "assetid": "38734429859",
            "classid": "310776590",
            "est_usd": "1",
            "missing": true,
            "contextid": "2",
            "instanceid": "302028390"
          }
        ],
        "trade_offer_state": 3,
        "confirmation_method": 0,
        "from_real_time_trade": false
      }
    ],
    "next_cursor": 0
  }
}