fut
fut copied to clipboard
How to keep updated bids
Hi all,
Sorry for all the questions recently,
Currently I am bidding while in the bid and have found a player that fits the search I:
print ("%s Found Player: %s current bid is: %s Time Left: %s" % (time.strftime('%Y-%m- %d%H:%M:%S'),displayName, item['currentBid'], item['expires']))
The problem I am having is when Item is found but then found again while searching the currentbid and what I have bid dos not update I think its cached but the thing that dos go down is the time expired so why would this value change and not the other. Is there a way to clear this so I can get a get a up to date real time result of a current bid on a player I have found.
Or is the problem with items = fut.searchAuctions('player',level="gold",max_price=SMaxBuyNow, start=page, min_price=700) caching each page (I am only checking the first 4 pages constantly)
I have tried deleting the variables and setting them to none but noting works. I am new to python so I may be missing a reload or clear function but I have been at this all day and cant find the result
Any help would be much appreciated
Try using fut.tradeStatus(item['tradeId'])
, which will give you the latest status. The data returned includes information such as currentBid
, bidState
(e.g. highest
or outbid
), and tradeState
(e.g. expired
or active
or closed
).
A suggested workflow is something like this:
- search for items
- bid on those you are interested in. Doing so puts them into the watchlist.
- call tradeStatus on items in your watchlist (
fut.watchlist
) to check the status. - for items that you won, send to club (
fut.sendToClub
) or send to tradepile (fut.sendToTradepile
) and list them for sale (fut.sell
). - for items you lost, delete them (
fut.watchlistDelete
)
Note that the GUI is open source as well, so you can take a look at its code as a reference on which functions in the API it is calling. E.g this file in particular has code that uses the above mentioned functions: https://github.com/hunterjm/futgui/blob/master/core/bid.py