1.0.0 • Published 7 years ago
opskins-express-trade v1.0.0
Trade offer management library for Trade.OPSkins.com
Usage
const OPSkinsTrade = require('opskins-express-trade');
const tradeBot = new OPSkinsTrade('your-api-key', 'your-2fa-secret');
tradeBot.pollTrades();
tradeBot.on('newOffer', (offer) => {
console.log(offer);
});
tradeBot.on('sentOffer', (offer) => {
console.log(offer);
});
tradeBot.on('offerUpdated', (offer) => {
console.log(offer);
});
Offer States
- STATE_ACTIVE = 2; /* The offer is active and the recipient can accept it to exchange the items /
- STATE_ACCEPTED = 3; /* The recipient accepted the offer and items were exchanged /
- STATE_EXPIRED = 5; /* The offer expired from inactivity /
- STATE_CANCELED = 6; /* The sender canceled the offer /
- STATE_DECLINED = 7; /* The recipient declined the offer /
- STATE_INVALID_ITEMS = 8; /* One of the items in the offer is no longer available/eligible so the offer was canceled automatically /
For further documentation please click here.
1.0.0
7 years ago