Skip to content

Purchases

Create Order

Authentication Required

http
POST https://api.sih.market/api/v1/create-order

TIP

The test field in the body simulates a purchase — funds will not be debited from your balance.

json
{
  "steamId": "76561198000000000",
  "token": "SSH18JS",
  "amount": 1.01,
  "item": "AK-47 | Case Hardened (Field-Tested)",
  "customId": "123",
  "test": false,
  "appId": 730
}

Response 200

json
{
  "success": true,
  "id": 1,
  "balance": 1.01
}

Response 400

json
{
  "success": false,
  "error": "invalid tradelink | private inventory | steam guard is not enabled | steam trade ban | steam guard is in hold | unknown error"
}

Response 409 — custom id already exists

json
{
  "success": false,
  "error": "custom id already exists",
  "order": {
    "id": 1,
    "customId": "customId",
    "steamId": "76561198000000000",
    "item": "AK-47 | Case Hardened (Field-Tested)",
    "amount": 1,
    "status": "created | processing | sent | finished | failed | penalized",
    "error": "string",
    "sender": {
      "offerId": 1,
      "timeout": 1566796475,
      "nickname": "name",
      "avatar": "https://avatars.akamai.steamstatic.com/975652750497a790ab91b828c1749943b6f6fc8e_medium.jpg"
    },
    "created": 1610000000,
    "updated": 1610000000
  }
}

Get Order Information

Authentication Required

http
GET https://api.sih.market/api/v1/get-order
ParameterTypeDescription
idnumberOrder id
customIdstringYour custom order id

Response 200

json
{
  "success": true,
  "order": {
    "id": 1,
    "customId": "customId",
    "steamId": "76561198000000000",
    "item": "AK-47 | Case Hardened (Field-Tested)",
    "amount": 1,
    "expectedAmount": 0.99,
    "status": "created | processing | sent | finished | failed | penalized",
    "error": "string",
    "sender": {
      "offerId": 1,
      "timeout": 1566796475,
      "nickname": "name",
      "avatar": "https://avatars.akamai.steamstatic.com/975652750497a790ab91b828c1749943b6f6fc8e_medium.jpg"
    },
    "protection": {
      "status": "failed",
      "error": "rollback user",
      "rollbackAt": 1753700247,
      "rollbackAmount": 0.99
    },
    "created": 1610000000,
    "updated": 1610000000
  }
}

Response 400

json
{
  "success": false,
  "error": "string"
}

Get Orders History

Authentication Required

http
GET https://api.sih.market/api/v1/get-order-history
ParameterTypeDefaultDescription
limitnumber100Page size
offsetnumber0Pagination offset

Response 200

json
{
  "success": true,
  "orders": [
    {
      "id": 1,
      "customId": "customId",
      "steamId": "76561198000000000",
      "item": "AK-47 | Case Hardened (Field-Tested)",
      "amount": 1,
      "expectedAmount": 0.99,
      "status": "created | processing | sent | finished | failed | penalized",
      "error": "string",
      "sender": {
        "offerId": 1,
        "timeout": 1566796475,
        "nickname": "name",
        "avatar": "https://avatars.akamai.steamstatic.com/975652750497a790ab91b828c1749943b6f6fc8e_medium.jpg"
      },
      "protection": {
        "status": "failed",
        "error": "rollback user",
        "rollbackAt": 1753700247,
        "rollbackAmount": 0.99
      },
      "created": 1610000000,
      "updated": 1610000000
    }
  ],
  "pagination": {
    "limit": 100,
    "offset": 0,
    "count": 1000
  }
}

Response 400

json
{
  "success": false,
  "error": "string"
}

Get Orders Information (Batch)

Authentication Required

http
POST https://api.sih.market/api/v1/get-orders
json
{
  "ids": [0],
  "customIds": ["string"]
}

Response 200

json
{
  "success": true,
  "orders": [
    {
      "id": 1,
      "customId": "customId",
      "steamId": "76561198000000000",
      "item": "AK-47 | Case Hardened (Field-Tested)",
      "amount": 1,
      "expectedAmount": 0.99,
      "status": "created | processing | sent | finished | failed | penalized",
      "error": "string",
      "sender": {
        "offerId": 1,
        "timeout": 1566796475,
        "nickname": "name",
        "avatar": "https://avatars.akamai.steamstatic.com/975652750497a790ab91b828c1749943b6f6fc8e_medium.jpg"
      },
      "protection": {
        "status": "failed",
        "error": "rollback user",
        "rollbackAt": 1753700247,
        "rollbackAmount": 0.99
      },
      "created": 1610000000,
      "updated": 1610000000
    }
  ]
}

Response 400

json
{
  "success": false,
  "error": "string"
}

Reference

Order Statuses

ValueDescription
createdPurchase created and awaits item search
processingItem was found, waiting for seller to send trade offer
sentItem was sent by seller
finishedBuyer has accepted this offer
failedPurchase failed, check the error message in the order's details
penalizedPurchase failed with penalty, check the error message in the order's details

Protection Statuses

ValueDescription
processingWaiting for the trade protection window to expire
finishedTrade protection completed successfully
failedThe buyer or seller activated trade protection

Protection Errors

ValueDescription
rollback userThe buyer activated trade protection
rollback supplierThe seller activated trade protection

Note

The system can move an order's status from sent back to processing — this allows automatically re-buying an item if the trade wasn't successful because of a sender-side failure.