Jump to content


Photo
Question

How to minimize Trade Confirmation Duration

node.js node-steam-tradeoffer-manager

  • Please log in to reply
4 replies to this topic

#1 Kokoman111

Kokoman111

    Newbie

  • Member
  • Pip
  • 9 posts

Posted 01 May 2019 - 05:56 AM

Hey,

 

so I have 2 bots trading items back to back

 

Bot #1 takes 30 seconds to confirm a trade while Bot #2 takes 5 seconds

 

What I want to happen is to minimize the time it takes to accept trades on Bot #1

 

Here's my constructor

let client = new SteamUser(),
    manager = new TradeOfferManager({
		"language": 'en',
        "steam": client,
        "pollInterval": "5000",
        "cancelTime": "1800000" 
    }),
    community = new SteamCommunity();

	// Bot #2
	
let client2 = new SteamUser(),
    manager2 = new TradeOfferManager({
		"language": 'en',
        "steam": client2,
        "pollInterval": "5000",
        "cancelTime": "1800000" 
    }),
    community2 = new SteamCommunity();

Any Ideas why the difference is so high between these 2 bots?

They're pretty much using the same code across the script

 

Also pollInterval is 5s in both..

 

Also for question #2: Is it okay to use this event for confirmations?

community.on("newConfirmation", (CONF) => {
    community.acceptConfirmationForObject(CONFIG.Bot1.IDENTITYSECRET, CONF.id, (ERR) => {
        if (ERR) {
            console.log("## An error occurred while accepting confirmation: " + ERR);
        } 
    });
});

Edited by Kokoman111, 01 May 2019 - 06:39 AM.


#2 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 2,140 posts

Posted 01 May 2019 - 01:38 PM

Confirmation polling (and therefore the newConfirmation event) is deprecated and won't be supported. But also no, you shouldn't use acceptConfirmationForObject with a confirmation ID. That won't work. You're supposed to use the offer ID.

 

What I suspect is happening is that you're trading a bunch of items between bots. When you accept a confirmation for an outgoing offer in which both parties are losing items, it will be pretty quick. When you accept the confirmation for an incoming offer, the confirmation response won't come until all items have been moved. If you're moving a lot of items, this will take a while. There is no way to avoid this.



#3 Kokoman111

Kokoman111

    Newbie

  • Member
  • Pip
  • 9 posts

Posted 01 May 2019 - 01:55 PM

Confirmation polling (and therefore the newConfirmation event) is deprecated and won't be supported. But also no, you shouldn't use acceptConfirmationForObject with a confirmation ID. That won't work. You're supposed to use the offer ID.

 

What I suspect is happening is that you're trading a bunch of items between bots. When you accept a confirmation for an outgoing offer in which both parties are losing items, it will be pretty quick. When you accept the confirmation for an incoming offer, the confirmation response won't come until all items have been moved. If you're moving a lot of items, this will take a while. There is no way to avoid this.

What would you recommend using in place of newConfirmation?



#4 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 2,140 posts

Posted 01 May 2019 - 02:08 PM

Call acceptConfirmationForObject whenever you send a trade offer that needs confirmation.


  • Kokoman111 likes this

#5 Kokoman111

Kokoman111

    Newbie

  • Member
  • Pip
  • 9 posts

Posted 01 May 2019 - 02:53 PM

Call acceptConfirmationForObject whenever you send a trade offer that needs confirmation.

This somehow flipped the entire situation around -> Now Bot #1 takes ~10s to confirm while Bot #2 takes much longer

 

https://gyazo.com/61...d2898897657731a

 

This is super weird, but I guess there's something I'm still missing

 

I did however made sure that Both Bots confirm outgoing offers







Also tagged with one or more of these keywords: Question, node.js, node-steam-tradeoffer-manager

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users