1.0.7 • Published 4 years ago
steam-p2p v1.0.7
Steam P2P trade wrapper
BETA - there may be bugs
This is a quick example of a p2p system, i will continue to improve it overtime with better error handling
Installation
Install it from npm:
npm install steam-p2p
Constructor(options)
options
An object containing any or all of the following options -Optional
options.poll
Polling rate in milliseconds - Minimum10000
- Default20000
-Optional
options.proxies
Array of proxies - Default[]
-Optional
Methods
watchTrade(payload)
payload
A single object or array containing trade details -Required
payload.id
An id to assign to the trade -Required
payload.sender
The senders steam64ID -Required
payload.senderApiKey
The senders steam API Key -Required
payload.items
An array of assetids -Required
payload.expire
Unix timestamp when offer will expire - - Default10 minutes
-Optional
cancelTrade(tradeID)
tradeID
The tradeID that was assign -Required
Events
accepted
tradeID
ID of the trade
removed
tradeID
ID of the trade