About multiple outbound offers, I will cap it at one live offer per bot at a time:
1) bot sends trade offer
2) bot listens to sentOfferChanged event
3a) if user accepts: save data, mark bot as free, move to next offer in queue
3b) if user doesn`t respond within 5 min: bot cancels the offer, marks itself free, moves on
(p.s. offers are queued via BullMQ, with concurrency capped at 1 per bot)
About replacing asset_id by hash.
Good point. I just realised that we can do such operation:
The hash is: pattern_id + float + class_id.
Where class_id is the unique category of item, so
we don`t confuse two different items that have the same
float+pattern_id (a very small chance but whatever).
And that kind of functionality doesn`t require comparison before and after every trade which won`t get us ratelimited.
But here is one little problem:
In Counter Strike, there are items that don`t have pattern_id and float values... and i`m talking about vanilla-knifes.
So, for normal items the logic above is great fast and reliable, and for vanilla items i don`t know another better solution than compairing inventories before and after trade.
Correct me if I`m wrong and thank you for answering.