Skip to main content

Get active trades

GET /trades/active
Permission: Connected + API Returns all active (pending) trade offers for the authenticated user.

Response

Returns an array of trades with status = 0 (pending).
{
  "err": false,
  "success": true,
  "content": {
    "trades": [
      {
        "id": 123456,
        "items_received": "123456789,987654321",
        "status": 0,
        "items_send": "",
        "user": "76561198000000000",
        "bot": "76561198111111111",
        "code": "ABCDEFGH",
        "lasterror": "",
        "offerid": "5678901234",
        "timestamp": "1706745600000"
      }
    ]
  }
}

Trade Fields

FieldTypeDescription
idintegerInternal trade ID
userstringUser’s Steam ID
items_receivedstringComma-separated assetIds being received
items_sendstringComma-separated assetIds being sent
statusintegerTrade status (0 = pending, 3 = completed, -1 = failed, etc.)
botstringBot Steam ID
offeridstringSteam trade offer ID
timestampstringUnix timestamp in milliseconds
codestringTrade verification code
lasterrorstringLast error message if failed

Get all trades

GET /trades/all
Permission: Connected + API Returns all trades for the authenticated user (or the given user if admin), including completed and failed. Hidden trades (status -11) are excluded. Results are ordered by timestamp descending and limited to the last 500 trades. No query parameters are supported.

Response

Returns array of all trades (up to 500).
{
  "err": false,
  "success": true,
  "content": {
    "trades": [
      {
        "id": 123456,
        "items_received": "123456789",
        "status": 3,
        "items_send": "",
        "user": "76561198000000000",
        "bot": "76561198111111111",
        "code": "COMPLETED",
        "game": 440,
        "lasterror": "",
        "offerid": "5678901234",
        "timestamp": "1706745600000"
      }
    ]
  }
}

Resend trade offer

GET /trade/resend?resend={tradeId}
Permission: Connected + API Marks a failed or cancelled trade for resend by setting its status and generating a new code. The trade must be one of: status -1, 4, 5, 6, 7, or 10, with non-empty items_send (withdrawal).

Query Parameters

resend
integer
required
Internal trade ID to resend

Response

Success
{
  "err": false,
  "success": true,
  "content": {
    "message": "Trade resent successfully",
    "trade_id": 123456,
    "code": "ABCDEFGH"
  }
}

Error Responses

StatusMessageDescription
errorMissing resend parameterQuery parameter resend not provided
errorFailed to resend trade. Trade not found or conditions not met.Trade doesn’t exist, isn’t owned by user, or isn’t in a resendable state
Use the trade id from GET /trades/active or GET /trades/all. After a successful resend, a new offer is created with the same items and the new code.