The item object used in the marketplace.
Steam App ID (e.g., 730 for CS2, 252490 for Rust).
Name of the gun/weapon (can be null for some categories).
Item wear condition (optional).
Full URL to the item icon.
Item price in sweepstake balance (includes seller rate adjustment).
Seller's price adjustment percentage (-25 to 25).
marketplace | pending | success | failed | timeout.
Steam ID of the buyer (present if status is not marketplace).
The structure returned by trade-related events.
interface TradeRecord {
seller: string;
buyer:
| {
avatar: string;
username: string;
steamid: string;
}
| string
| null;
item: Item;
status: string;
deadline?: number; // Timestamp when the trade expires
tradeLink?: string; // Buyer's trade URL (for seller)
confirmations: {
buyer: boolean;
seller: boolean;
};
}
Client -> Server Events
Request the current pool of items available for withdrawal.
Payload: { appid: number }
Response: Emits marketplace event.
List items on the marketplace.
Payload: Array<{ id: string, rate: number }>
Response: Emits deposit-item event.
Remove a listed item from the marketplace.
Response: Emits cancel-deposit event.
Initiate a purchase/withdrawal of items.
Payload: Array<{ id: string }>
Response: Emits withdraw-item event.
Sync the current state of active trades (both as buyer and seller).
Response: Emits buyer-response and/or seller-response.
Example Response (buyer-response):
Request the buyer's trade URL to initiate the Steam trade.
Response: Emits create-trade event.
Confirm that the trade has been completed on Steam.
Payload: { id: string, position: "seller" | "buyer" }
Response: Emits confirm-trade event.
not-received-trade
Report a trade failure where the seller confirmed but the buyer did not receive the item.
Response: Emits failed-trade event to both parties.
Server -> Client Events
Broadcasted marketplace pool updates.
Data: { marketplace: Item[] }
Active trades where the user is the buyer.
seller-response
Active trades/listings where the user is the seller.
confirm-trade-response
Triggered when a trade confirmation is processed. Use this to refresh the UI.
response-reload
Signal to reload trade data.
Signal that a trade has failed.
Integration Example