opskins-express-trade

    1.0.0 • Public • Published

    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.

    Install

    npm i opskins-express-trade

    DownloadsWeekly Downloads

    3

    Version

    1.0.0

    License

    ISC

    Unpacked Size

    7.46 kB

    Total Files

    7

    Last publish

    Collaborators

    • ekifox