Appearance
Trades API (Deprecated API Backward Compatibility)
Drop-in replacement for the deprecated Trades API.
Base path: /api/Trades
INFO
This is the compatibility layer. If you're building a new integration, consider using the native Trades API instead.
Get History by Filters
POST /api/Trades/GetHistoryByFilters
Returns trade history with filtering in deprecated API format.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
start | string | No | ISO date string for range start |
end | string | No | ISO date string for range end |
skip | number | No | Number of records to skip. Default: 0 |
user_comments | string[] | No | Filter by comment values |
trade_ids | string[] | No | Filter by trade IDs |
bash
curl -X POST "https://market.vpsbot.io/api/Trades/GetHistoryByFilters" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"start": "2024-01-01T00:00:00Z",
"end": "2024-01-31T23:59:59Z",
"skip": 0
}'js
const { data } = await client.post(
'/api/Trades/GetHistoryByFilters',
{
start: '2024-01-01T00:00:00Z',
end: '2024-01-31T23:59:59Z',
skip: 0
}
);Example Response
json
{
"trades": [
{
"trade_id": "uuid-trade-id",
"status": "completed",
"comment": "order-001",
"trade_url": "https://steamcommunity.com/tradeoffer/new/?partner=XXXXX&token=YYYYY",
"items": [
{
"assetid": "30000000001",
"appid": 730,
"market_hash_name": "AK-47 | Redline (Field-Tested)",
"price": 1245,
"float_value": 0.2531,
"stickers": []
}
],
"created_at": "2024-01-15T10:00:00.000Z",
"updated_at": "2024-01-15T10:05:00.000Z",
"completed_at": "2024-01-15T10:05:00.000Z",
"error_type": null,
"error_message": null
}
],
"total": 42,
"has_more": true
}Filtering Examples
By Date Range
js
await client.post('/api/Trades/GetHistoryByFilters', {
start: '2024-01-01T00:00:00Z',
end: '2024-01-31T23:59:59Z'
});By Comments
js
await client.post('/api/Trades/GetHistoryByFilters', {
user_comments: ['order-001', 'order-002']
});By Trade IDs
js
await client.post('/api/Trades/GetHistoryByFilters', {
trade_ids: ['uuid-1', 'uuid-2']
});With Pagination
js
// Skip first 50 results
await client.post('/api/Trades/GetHistoryByFilters', {
skip: 50
});Deprecated API Trade Object Schema
| Field | Type | Description |
|---|---|---|
trade_id | string | Unique trade identifier |
status | string | Trade status |
comment | string | null | User comment (equivalent to custom_id) |
trade_url | string | Steam trade offer URL |
items | array | Array of traded items |
items[].assetid | string | Steam asset ID |
items[].appid | number | Game ID |
items[].market_hash_name | string | Item market hash name |
items[].price | number | Price (1$ = 1000) |
items[].float_value | number | null | Item float value |
items[].stickers | array | Sticker data |
created_at | string | ISO timestamp of creation |
updated_at | string | ISO timestamp of last update |
completed_at | string | null | ISO timestamp of completion |
error_type | string | null | Error type if failed |
error_message | string | null | Error description |