Appearance
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
| Parameter | Type | Required | Description |
|---|---|---|---|
start_date | string | No | ISO date string for start of range |
end_date | string | No | ISO date string for end of range |
custom_ids | string | No | Comma-separated list of custom IDs |
trade_ids | string | No | Comma-separated list of trade IDs |
limit | number | No | Results per page. Default: 50, max: 2000 |
offset | number | No | Number 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:59ZBy Custom IDs
bash
GET /api/trades?custom_ids=order-001,order-002,order-003By Trade IDs
bash
GET /api/trades?trade_ids=uuid-1,uuid-2Pagination
bash
# Page 1 (first 50 results)
GET /api/trades?limit=50&offset=0
# Page 2 (next 50 results)
GET /api/trades?limit=50&offset=50Trade Object Schema
| Field | Type | Description |
|---|---|---|
trade_id | string | Unique trade identifier (UUID) |
status | string | Current trade status |
custom_id | string | null | Your custom reference ID |
trade_url | string | null | Steam trade offer URL used |
amount | number | Total trade amount (1$ = 1000) |
error | string | null | Error description if status is error |
created_at | string | ISO timestamp of trade creation |
updated_at | string | ISO timestamp of last update |
items | array | Array of items in this trade |
Trade Item Schema
| Field | Type | Description |
|---|---|---|
asset_id | string | Steam asset ID |
game_id | number | Game ID (730, 570, 252490, 440) |
market_hash_name | string | Item market hash name |
price | number | Price (1$ = 1000) |
Trade Statuses
| Status | Description |
|---|---|
created | Trade has been created |
waiting_seller | Waiting for seller to send trade |
waiting_seller_sda | Waiting for seller mobile confirmation |
waiting_buyer | Trade sent, waiting for buyer to accept |
completed | Trade completed successfully |
accepted_buyer_and_waiting_verification | Buyer accepted, verifying |
checking_who_did_rollback | Investigating trade rollback |
error | Trade failed |
Error Types
| Error Type | Description |
|---|---|
trade_declined_in_steam | Trade was declined by one party |
item_not_found | Item no longer exists |
invalid_trade_url | Trade URL is invalid or expired |
confirmation_problem_in_mobile | Seller mobile confirmation failed |
steam_error_timeout | Steam API timed out |
steam_error_unavailable | Steam API unavailable |
insufficient_balance | Not enough balance |
account_banned | Bot account was banned |
item_already_sold | Item was sold to another buyer |
price_changed | Item price changed since request |
bot_offline | Selling bot is offline |
trade_hold | Trade hold applies |
unknown_error | Unclassified error |