futapi / fut

fut is a simple library for managing Fifa 19 Ultimate Team.
GNU General Public License v3.0
317 stars 138 forks source link

I succeeded in login but..(beginner) #343

Open midas123 opened 6 years ago

midas123 commented 6 years ago

hello, I am learning the basics of the Python these days, and I am trying to create a program at the same time.

I want to do it myself, but I am drfting around without clue . if you don't mind teach me a code for bidding it will be a great help to me.

if I want to buynow Martial under 40000 coin by searching auction frequently how to do it?

mothinx commented 6 years ago
  1. First, you have to connect on the market by using the library fut and the function Core(). Replace username, password, secret_answer by string or define them before calling the function.

    bot = fut.Core(email=username, passwd=password,
                   secret_answer=secret_answer, platform='pc')
  2. Find the assetId of your player. You can find it by using the offline database on the API or you can just go to the online easport database . For martial the assetID is 211300 (https://www.easports.com/uk/fifa/ultimate-team/fut/database/player/211300/Martial#211300)

  3. Search for the last 50 Martial cards in the auction. It will return you a list of cards

    martial_cards = bot.searchAuctions(
        ctype="player", assetId=211300, page_size=50)
  4. Find the cheapest by searching the card with the min buyNowPrice . for example here the 'buyNowPrice' of the first martial_card martial_cards[0]['buyNowPrice']

  5. Bid for the card you want to buy by giving the 'tradeId'. Replace 40000 by the buyNowPrice of the card. bot.bid(card["tradeId"], 40000, fast=True)

midas123 commented 6 years ago

It's more than I expected. Thank you very much for your detailed reply :)