Skip to content

Trades API

Query your trade history with flexible filtering and pagination.

Base path: /api/trades

Get Trade History

GET /api/trades

Returns your trade history with optional filtering by date range, custom IDs, or trade IDs. Supports pagination.

Query Parameters

ParameterTypeRequiredDescription
start_datestringNoISO date string for start of range
end_datestringNoISO date string for end of range
trade_idsstringNoComma-separated list of trade IDs (UUIDs)
steam_trade_idsstringNoComma-separated list of Steam full trade IDs
steam_trade_offer_idsstringNoComma-separated list of Steam tradeoffer IDs
custom_idsstringNoComma-separated list of custom IDs
limitnumberNoResults per page. Default: 50, max: 2000
offsetnumberNoNumber of results to skip. Default: 0
bash
curl -X GET "https://market.vpsbot.io/api/trades?limit=10&offset=0&start_date=2024-01-01T00:00:00Z" \
  -H "x-api-key: YOUR_API_KEY"
js
const { data } = await client.get('/trades', {
  params: {
    limit: 10,
    offset: 0,
    start_date: '2024-01-01T00:00:00Z'
  }
});

Example Response

json
{
  "success": true,
  "data": {
    "trades": [
      {
        "trade_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
        "custom_id": "order-001",
        "summary": "Accepted",
        "processed_trade": {
          "market": "market-vpsbot",
          "trade_id": "4012345678_76561198012345678",
          "tradeoffer_id": "5234567890",
          "request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
          "partner_id": "https://steamcommunity.com/tradeoffer/new/?partner=XXXXX&token=YYYYY",
          "items_to_give": [],
          "items_to_receive": [
            {
              "appid": 730,
              "contextid": "2",
              "assetid": "30000000001",
              "market_hash_name": "AK-47 | Redline (Field-Tested)",
              "amount": "1"
            }
          ],
          "status": 3,
          "game_id": 730,
          "settlement": "2026-01-22T10:05:00Z"
        },
        "selected_bot": {
          "steamid64": "76561198000000001",
          "avatar": "https://avatars.steamstatic.com/...",
          "profile_name": "VPSBot #5"
        },
        "status": "accepted",
        "created_at": "2026-01-15T10:00:00Z",
        "updated_at": "2026-01-15T10:05:00Z",
        "error": null
      }
    ],
    "total": 42,
    "limit": 50,
    "offset": 0
  }
}

Filtering Examples

By Date Range

bash
GET /api/trades?start_date=2026-01-01T00:00:00Z&end_date=2026-01-31T23:59:59Z

By Custom IDs

bash
GET /api/trades?custom_ids=order-001,order-002,order-003

By Trade IDs

bash
GET /api/trades?trade_ids=a1b2c3d4-e5f6-7890-abcd-ef1234567890,b2c3d4e5-f6a7-8901-bcde-f12345678901

By Steam Tradeoffer IDs

bash
GET /api/trades?steam_trade_offer_ids=5234567890,5234567891

By Steam Full Trade IDs

bash
GET /api/trades?steam_trade_ids=4012345678_76561198012345678

Pagination

bash
# Page 1 (first 50 results)
GET /api/trades?limit=50&offset=0

# Page 2 (next 50 results)
GET /api/trades?limit=50&offset=50

Trade Object Schema (TradeData)

FieldTypeDescription
trade_idstringInternal trade identifier (UUID)
custom_idstring | nullYour custom reference ID
summarystringBusiness-level status (see Trade Summary)
statusstringIMT status (see Trade Statuses)
created_atstring | nullISO timestamp of trade creation
updated_atstring | nullISO timestamp of last update
errorstring | nullError description if trade failed
processed_tradeobjectProcessed trade details (see below)
selected_botobjectBot that handled the trade
selected_bot.steamid64stringBot's Steam ID
selected_bot.avatarstringBot's avatar URL
selected_bot.profile_namestringBot's display name

ProcessedTrade Object

FieldTypeDescription
marketstringAlways "market-vpsbot"
trade_idstringSteam full trade ID
tradeoffer_idstringSteam trade offer ID
request_idstringMarket trade UUID (same as top-level trade_id)
partner_idstringSteam trade offer URL
items_to_givearrayItems given (always empty for sell trades)
items_to_receivearrayItems received in the trade
statusnumberNumeric Steam trade status
game_idnumberGame ID (730, 570, 252490, 440)
settlementstring | nullISO timestamp of when Steam settles the trade (CS2 only)

Trade Item Schema (items_to_receive)

FieldTypeDescription
appidnumberGame ID
contextidstringSteam context ID (always "2")
assetidstringSteam asset ID
market_hash_namestringItem market hash name
amountstringAlways "1"

Trade Statuses

StatusDescription
processingTrade is being processed (initial status)
acceptedTrade accepted, funds frozen pending settlement (CS2 only)
completedTrade completed successfully
declinedTrade declined (buyer-side failure)
cancelledTrade cancelled (seller-side failure)
rolled_back_by_userTrade rolled back by the user
rolled_back_by_botTrade rolled back by the bot

Game-Specific Flow

The trade flow depends on the game's balance strategy:

GameStrategyFlow
CS2 (730)FREEZE_BALANCEprocessingacceptedcompleted (funds held in frozen balance until settlement)
Dota 2 (570)BALANCEprocessingcompleted (funds credited directly)
TF2 (440)BALANCEprocessingcompleted (funds credited directly)
Rust (252490)BALANCEprocessingcompleted (funds credited directly)

For BALANCE games (Dota 2, TF2, Rust), items are irreversible once accepted — the trade skips accepted and goes directly to completed with funds credited to the seller's main balance.

Trade Summary

The summary field is a business-level status derived from the Steam trade status and rollback side.

SummaryDescription
InProgressTrade is active, awaiting confirmation, or in escrow
AcceptedTrade was accepted successfully
CanceledByBuyerTrade was canceled by the buyer
DeclinedBySellerTrade was declined by the seller
RolledBackByBuyerTrade was rolled back by the buyer
RolledBackBySellerTrade was rolled back by the seller
FailedTrade failed (invalid, expired, missing items, etc.)

Error Field

When the trade status is declined or cancelled, the error field contains a free-form string describing the failure reason.

Need help? Contact our support team