Skip to main content

Firebase Configuration

FIFA Bot uses Firebase for remote control and real-time communication.
1

Create Firebase Project

  1. Go to Firebase Console
  2. Create a new project or select an existing one
  3. Navigate to Project Settings → General
2

Get Configuration Credentials

Copy your Firebase configuration values:
apiKey
string
required
Your Firebase API key
authDomain
string
required
Your Firebase authentication domain
databaseURL
string
required
Your Firebase Realtime Database URL
storageBucket
string
required
Your Firebase storage bucket
3

Configure in Bot

Update the configuration in bot-desktop.py:
config = {
  "apiKey": "YOUR_API_KEY",
  "authDomain": "your-project.firebaseapp.com",
  "databaseURL": "https://your-project.firebaseio.com",
  "storageBucket": "your-project.appspot.com"
}
firebase = pyrebase.initialize_app(config)
db = firebase.database()
Never share your Firebase credentials publicly. Keep them secure and use environment variables in production.
4

Initialize Database

The bot automatically initializes the database with a command listener:
db.update({"comando":"OK"})
This creates a comando field for remote control commands.

Chrome Debug Port Configuration

The bot connects to Chrome instances running in debug mode.
# Configure FIFA Web App connection (Port 9250)
opts = Options()
opts.add_experimental_option('debuggerAddress', 'localhost:9250')
driver = webdriver.Chrome(options=opts)
9250
port
FIFA Web App - Main bot connection for market automation
9222
port
WhatsApp Web - Notification system for purchase alerts
You can change these ports if needed, but ensure they match both the Chrome launch command and bot configuration.
To use different ports:
  1. Launch Chrome with custom port:
chrome.exe --remote-debugging-port=9999 --user-data-dir="C:/custom-profile"
  1. Update bot configuration:
opts.add_experimental_option('debuggerAddress', 'localhost:9999')

WhatsApp Integration

Configure WhatsApp notifications for purchase alerts and bot status updates.
1

Launch WhatsApp Web

  1. Start Chrome in debug mode on port 9222
  2. Navigate to WhatsApp Web
  3. Scan the QR code with your phone
2

Select Notification Contact

Open the chat where you want to receive notifications. The bot will send messages to the first contact in the chat list.
The bot uses this XPath to find the contact:
'//*[@id="pane-side"]/div[1]/div/div/div/div/div/div[2]/div[2]/div[1]/span/span'
3

Enable Notifications in GUI

In the bot GUI, enable WhatsApp features:
eW
checkbox
default:0
Send WhatsApp Messages - Enable text notifications (eW=1)
eSS
checkbox
default:0
Send Screenshots - Enable screenshot notifications (eSS=1)

WhatsApp Notification Types

The bot sends various notifications:
# Successful purchase
"SE COMPRO 1,500 Iteracion: 45"

# Failed purchase
"NO SE COMPRO 1,500 Iteracion: 45"

# False alarm (item no longer available)
"FALSA ALARMA"
# New price range calculated
"Nuevo Rango Compra: 1200 Venta: 1500"

# Search progress
"Van 150"

# Calculating new range
"Calculando Rango"
# Current balance
"125.450"

# Process stopped
"PROCESO DETENIDO"

# Cleaning sold items
"Limpiando vendidos"

# Wait period
"ESPERANDO 45 SEGUNDOS"
The bot sends screenshots for:
  • Sold items confirmation
  • Error situations
  • Remote control requests

GUI Configuration

The bot provides a Tkinter GUI for configuration and control.

Control Settings

Speed Mode
radio
default:"NORMAL"
NORMAL - Full delays for safety (rapido=1)RAPIDO - Reduced delays for faster operation (rapido=2)
RAPIDO mode may trigger anti-bot detection. Use with caution.

Search Interval Settings

N (itera)
number
default:10
Number of searches before performing an action (cleaning sold items or waiting)
Action Type
radio
default:1
Option 1 (r=1) - Clean sold items after N searchesOption 2 (r=2) - Wait S seconds after N searches
S (segundos)
number
default:45
Seconds to wait when using Option 2

Price Settings

# Maximum price to buy (after EA tax calculation)
maximo = 1200  # Will buy items at this price or below

Dynamic Range Settings

eR
checkbox
default:0
Enable Dynamic Range - Automatically adjust price ranges based on market (eR=1)
numeroRango
number
default:31
Recalculate price range every X searches when dynamic range is enabled
numeroDetener
number
default:1000
Stop searching when sale price drops below this value

Remote Control Configuration

Control the bot remotely through Firebase commands.

Supported Commands

# Send command through Firebase
db.update({"comando": "INICIAR"})

# Bot will:
# 1. Start automated searching
# 2. Send confirmation via WhatsApp
# 3. Reset command to "OK"

Command Listener Implementation

def stream_handler(message):
    print(message['data'])
    
    if message['data'] == "DETENER":
        db.update({"comando": "OK"})
        switchoff()
        
    if message['data'] == "INICIAR":
        db.update({"comando": "OK"})
        iniciar()
        
    if message['data'] == "SCREENSHOT":
        db.update({"comando": "OK"})
        enviarSSControlRemoto()
        
    if message['data'] == "RELOGIN":
        db.update({"comando": "OK"})
        reLogin()

# Start listening for commands
my_stream = db.child("comando").stream(stream_handler)
The bot automatically resets commands to “OK” after execution to prevent duplicate processing.

Session Management

The bot includes automatic session recovery.
1

Detect Session Loss

The bot monitors for session timeout or login prompts.
2

Automatic Relogin

def reLogin():
    # Click through login flow
    # Re-enter password (hardcoded in example)
    # Navigate back to transfer market
    # Reapply search filters
    # Resume operations
The example code contains a hardcoded password. In production, use secure credential storage.
3

Resume Operations

After relogin, the bot:
  1. Navigates to transfer market
  2. Reapplies search filters via selecciones()
  3. Recalculates price range via revisarPrecio()
  4. Sends screenshot confirmation

Next Steps

Search Filters

Configure player search criteria

Pricing Strategies

Optimize profit margins and pricing

Build docs developers (and LLMs) love