Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quick buy at max price not working #451

Open
RoelvanDooren opened this issue Jan 16, 2019 · 2 comments
Open

Quick buy at max price not working #451

RoelvanDooren opened this issue Jan 16, 2019 · 2 comments

Comments

@RoelvanDooren
Copy link

I was wondering whether the bid() function is still fully functional when trying to bid the buy now price.

To illustrate:
items = session.search(ctype = 'training', category = 'position', defId = resourceId, max_buy = 2000, page_size = 50, fast = True)
len(items) # Returns 50

Let's extract the last item from the list, just to decrease the odds that it has already been bought
session.bid(trade_id=items[-1]['id'], bid=2000, fast = True)

The session.bid() call returns False. It's highly unlikely that the item has already been bought, as the current minimum buy now price that items are listed for even falls below 1800 coins.
(len(session.search(ctype = 'training', category = 'position', defId = resourceId, max_buy = 1800, page_size = 50, fast = True)) # Returns 50)

Am I overlooking something? Thanks for thinking along :)

@SilverCorvin
Copy link

@RoelvanDooren I think the problem is that you are trying to buy a player by his id attribute instead of tradeId.
So, you should try to change this call:
session.bid(trade_id=items[-1]['id'], bid=2000, fast = True)
to this one:
session.bid(trade_id=items[-1]['tradeId'], bid=2000, fast = True)

@RoelvanDooren
Copy link
Author

@SilverCorvin Oh my, how on earth could I not have noticed this.. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants