๐ Trade history of a Steam account โ who it traded with, which items, in which direction
Baseurl: https://www.steamwebapi.com/steam/api/profile/trades?steam_id=76561198042843401&key=YOUR_API_KEY
๐ฌ **What this endpoint does:**
- Returns the observed trade history of a Steam account: every item handover we have seen, in both directions, with the account on the other side.
- Reconstructed from inventory sightings of physical CS2 items, so it covers trades between players as well as items that travelled through a marketplace.
๐ ๏ธ **What you get:**
- `data` โ one row per handover, newest first. Per row: `direction` (`in` = the account received the item, `out` = it gave the item away), `partner` (SteamID64 of the other side), `seenat` and `senderlastseenat` (the handover window, see below), `gapdays`, `direct`, `market`, `inferred`, `roundtrip`, `assetid` and an `item` block (`markethashname`, `wear`, `float`, `defindex`, `paintseed`, `paintindex`).
- `direct: true` means the item went straight from one inventory to the other. When it was listed on a marketplace in between, `direct` is `false` and `market` names the leg it travelled through: `name`, `price`, `seenat` and `link` as the marketplace feed supplies it (a deep link on some markets, a listing id on others).
- `roundtrip: true` marks a handover that is part of an item leaving the account and coming back. That pattern does not occur in ordinary trading.
- `inferred: true` marks a handover reconstructed from a legacy previous-owner field rather than from two independent sightings.
- `partners` โ the same history rolled up per counterpart, strongest first, with who that account is: `steamid`, `trades`, `received`, `sent`, `direct`, `viamarket`, `roundtrips`, `firsttrade`, `lasttrade` and a `profile` block (`personaname`, `avatar`, `avatarfull`, `timecreated`, `timecreatedat`, `loccountrycode`, `vac`, `tradeban`, `inventoryworthpricesteam`; null when the account is unknown to us). Always the FULL history regardless of the filters below, which apply to `data` only. Capped at the strongest 100 counterparts, with `partnerstotal` giving the real number.
- `coverage` โ `itemstracked` (items of this account we track), `itemswithtrades` (how many of them ever changed hands) and `truncated` (true when the account has more history than one response covers; page through what you get and treat it as a recent window, not the complete record).
๐ **How to use:**
- Pass `steam_id` (SteamID64). Everything else is optional.
- Page with `limit` (default 50, max 200) and `offset`; `total` is the number of rows matching your filters. Narrow with `direction`, `partner`, `from` and `to`, and flip the order with `sort`.
- Results are cached per account for several hours, so paging through a history and polling the same account are both cheap.
- Credits: 1 per started block of 50 returned rows โ a default page costs 1, a full 200-row page costs 4, an empty page costs 1. They count against the same Profile allowance as the other Profile endpoints.
โ ๏ธ **How to read the dates:**
- These are inventory sightings, not Steam trade logs. A handover happened somewhere between `senderlastseenat` (last time we saw the item with the giver) and `seenat` (first time we saw it with the receiver) โ `gapdays` is the width of that window, not the age of the trade.
- An item nobody ever scanned is absent entirely. An empty response means we have seen no handover, not that none happened.
Request
- Base URL: https://www.steamwebapi.com
- URL: https://www.steamwebapi.com/steam/api/profile/trades
- Auth: API key in query parameter key
Query parameters
Your API key for authentication. Retrieve it from your Dashboard (top-right corner).
Required. SteamID64 of the account whose trade history you want, for example 76561198042843401. Also accepted as id.
Optional. in for items the account received, out for items it gave away, all (default) for both.
Optional. Restrict to handovers with this counterpart (SteamID64).
Optional. Only handovers first seen on or after this date (YYYY-MM-DD).
Optional. Only handovers first seen on or before this date, inclusive (YYYY-MM-DD).
Optional. newest (default) or oldest.
Optional. Rows per page, 1-200. Default 50.
Optional. Rows to skip. Default 0.
Response
Request was successful.
Changes
No recorded changes to this operation across all 1 revision of this API.