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
custom_idsstringNoComma-separated list of custom IDs
trade_idsstringNoComma-separated list of trade 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": "uuid-trade-id",
        "status": "completed",
        "custom_id": "order-001",
        "trade_url": "https://steamcommunity.com/tradeoffer/new/?partner=XXXXX&token=YYYYY",
        "amount": 1245,
        "error": null,
        "created_at": "2024-01-15T10:00:00.000Z",
        "updated_at": "2024-01-15T10:05:00.000Z",
        "items": [
          {
            "asset_id": "30000000001",
            "game_id": 730,
            "market_hash_name": "AK-47 | Redline (Field-Tested)",
            "price": 1245
          }
        ]
      }
    ],
    "total": 42,
    "has_more": true
  }
}

Filtering Examples

By Date Range

bash
GET /api/trades?start_date=2024-01-01T00:00:00Z&end_date=2024-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=uuid-1,uuid-2

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

FieldTypeDescription
trade_idstringUnique trade identifier (UUID)
statusstringCurrent trade status
custom_idstring | nullYour custom reference ID
trade_urlstring | nullSteam trade offer URL used
amountnumberTotal trade amount (1$ = 1000)
errorstring | nullError description if status is error
created_atstringISO timestamp of trade creation
updated_atstringISO timestamp of last update
itemsarrayArray of items in this trade

Trade Item Schema

FieldTypeDescription
asset_idstringSteam asset ID
game_idnumberGame ID (730, 570, 252490, 440)
market_hash_namestringItem market hash name
pricenumberPrice (1$ = 1000)

Trade Statuses

StatusDescription
createdTrade has been created
waiting_sellerWaiting for seller to send trade
waiting_seller_sdaWaiting for seller mobile confirmation
waiting_buyerTrade sent, waiting for buyer to accept
completedTrade completed successfully
accepted_buyer_and_waiting_verificationBuyer accepted, verifying
checking_who_did_rollbackInvestigating trade rollback
errorTrade failed

Error Types

Error TypeDescription
trade_declined_in_steamTrade was declined by one party
item_not_foundItem no longer exists
invalid_trade_urlTrade URL is invalid or expired
confirmation_problem_in_mobileSeller mobile confirmation failed
steam_error_timeoutSteam API timed out
steam_error_unavailableSteam API unavailable
insufficient_balanceNot enough balance
account_bannedBot account was banned
item_already_soldItem was sold to another buyer
price_changedItem price changed since request
bot_offlineSelling bot is offline
trade_holdTrade hold applies
unknown_errorUnclassified error

Need help? Contact our support team