π Retrieve Trade History
Baseurl: https://www.steamwebapi.com/steam/api/trade/history?key=YOUR_API_KEY
π¬ **Retrieve the trade history of a user.**
- This endpoint uses the official Steam Web API (IEconService/GetTradeHistory) for accurate and reliable trade data.
- Perfect for verifying trade success and tracking the user's trade activity.
- **Rate Limiting:** You may experience delays if too many requests are made in a short period, as each `steamloginsecure` token is rate-limited.
- **Real-time Data:** The `steamloginsecure` token ensures real-time data retrieval from Steam. You can use the Extension for automatic token retrieval.
- **Trade Protection System:** With Steam's Trade Protection System, trades can be reversed within 7 days. The `tradeprotected` and `tradeprotecteduntil` fields indicate if a trade is still in the protection period. The exact settlement date comes directly from Steam.
- **New Fields:** Each trade now includes a `tradeid` field and `tradeprotecteduntiltimestamp`. Received items include `originalassetid` and `newassetid`. Sent items include `newassetid`. Items may include `ownerdescriptions` when available from Steam.
π οΈ **Important Parameters:**
- **steamloginsecure**: Required. The raw steamLoginSecure token from the `steamcommunity.com` cookie for authentication.
- **after_time**: Optional. Pagination cursor β pass the value from `nexthistoryaftertimestamp` of the previous response.
- **after_trade**: Optional. Pagination cursor β pass the value from `nexthistoryaftertrade` together with `after_time`.
- **assetid**: Optional. Filter trades by a specific asset ID to track a particular item.
π **How to Use:**
- Send the `steamloginsecure` cookie value (or use our Extension for automatic retrieval) to fetch trade history data for the user.
- Use the `after_time` and `after_trade` parameters together for precise pagination (both values come from `nexthistoryaftertimestamp` and `nexthistoryaftertrade` of the previous response).
- Use the `assetid` parameter to track specific items and check if they were involved in reversed trades. Searches across `assetid`, `originalassetid`, and `newassetid`.
- Check the `status` field in the response to determine if a trade is "traded" or "reversed".
- The `tradereturned` property provides details about reversed trades, allowing services to unfreeze funds after the 7-day trade hold period.
- **Note:** `participantusername` contains the trade partner's SteamID64 (username is not available from the Steam API). Use `participantsteamid` for the same value.
Request
- Base URL: https://www.steamwebapi.com
- URL: https://www.steamwebapi.com/steam/api/trade/history
- Auth: API key in query parameter key
Query parameters
Your API key for authentication. Retrieve it from your Dashboard (top-right corner).
If you run in production, please set this to 1. Default is 0. This is in future required, and if not set, you will get a warning.
Filter trades that occurred after the specified Unix timestamp. Used for pagination β pass the value from nexthistoryaftertimestamp of the previous response.
Filter trades after the specified trade ID. Used together with after_time for precise pagination β pass the value from nexthistoryaftertrade of the previous response.
Filter trades by a specific asset ID to track a particular item.
Request body
Example request
{
"steamloginsecure": "76561198271552942||eyAidHlwIjogIkpXVCIsICJhbGciOiAiRWREU0EiIH0.eyAiaXNzIjogInI6MUI0RV8yNDQxRjRFNF9BQTUyQSIsICJzdWIiOiAiNzY1NjExOTgwNzE1NTU5NDIiLCAiYXVkIjogWyAid2ViOmNvbW11bml0eSIgXSwgImV4cCI6IDE3MTMxMDIzNTQsICJuYmYiOiAxNzA0Mzc0OTUxLCAiaWF0IjogMTcxMzAxNDk1MSwgImp0aSI6ICIxN0Y2XzI0NDFFRDZDX0RFNDZCIiwgIm9hdCI6IDE3MTMwMTQ5NTAsICJydF9leHAiOiAxNzMxMjQ3MTQyLCAicGVyIjogMCwgImlwX3N1YmplY3QiOiAiNDYuMTQyLjcyLjkxIidsadsalciI6ICI0Ni4xNDIuNzIuOTEiIH0.XxB_aqqd3IAjXfpABVIOvDyP6Nw_p7Czk3T3FsbnSaM9-Jr1ZNdsfscdN0OtW81kOjbZvuHNe1nCn1qXxgwwHAw"
}Response
Success - Trade history successfully retrieved.
Example response
{
"type": "tradehistory",
"data": [
{
"tradeid": "815844385241622220",
"date": "2025-12-16T05:09:40+00:00",
"timestamp": 1765550580,
"participantusername": "76561198769457065",
"participanturl": "https://steamcommunity.com/profiles/76561198769457065",
"participantsteamid": "76561198769457065",
"status": "traded",
"tradeprotected": true,
"tradeprotecteduntil": "2025-12-23",
"tradeprotecteduntiltimestamp": 1735000000,
"tradeinfo": "You traded with \"76561198769457065\".",
"tradereturned": {
"status": "reversed"
}
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.