# EA Sports FC Ultimate Team (FUT) Source Data Pipeline & Reverse Engineering Report

## 1. Executive Summary & Architecture Topology

This document provides a deep technical analysis and reverse-engineering specification of the **EA Sports FC Ultimate Team (UT)** backend services, detailing how ecosystem leaders (**FUTBin**, **FUT.GG**, and **FUTWIZ**) collect real-time data, and how to build a native, direct-to-source ingestion engine without relying on third-party scrapers.

```mermaid
flowchart TD
    subgraph EA Infrastructure
        AUTH["EA Identity Gateway (accounts.ea.com)"]
        GATEWAY["EA Proxy Gateway (gateway.ea.com)"]
        UTAS["UTAS Shard Cluster (utas.mob.v2.prd.futc-ext.gcp.ea.com)"]
        CDN["EA Online Asset CDN (fifa21.content.easports.com / ea.com)"]
        PIN["PIN Telemetry Service (pin-river.data.ea.com)"]
    end

    subgraph Data Sources & Collection Modes
        EXT["Crowdsourced Browser Extensions (FUTBin Import, Paletools)"]
        BOTS["Headless Worker Cluster (Stealth WebApp / Companion Puppeteer)"]
        OFFICIAL["EA FC Community API (OAuth 2.0 Partner Program - July 2026)"]
        CDN_POLL["Automated CDN Poller (Static JSON, ETag, Promos at 18:00 UTC)"]
    end

    subgraph BXC FUT Native Engine
        BXC_AUTH["Session Manager (PLAY_SESSION + X-UT-SID)"]
        BXC_MARKET["Transfer Market Ingest (Binary Search BIN)"]
        BXC_METADATA["Player & Pack DB Builder"]
        BXC_STORE["SQLite / JSON Local Store"]
    end

    AUTH -->|OAuth / AuthCode| UTAS
    GATEWAY -->|Nucleus Persona| UTAS
    EXT -->|Live Market JSONs| BOTS
    UTAS -->|Raw Auction Stream| EXT
    UTAS -->|Search API Queries| BOTS
    CDN -->|players.json, teams.json| CDN_POLL
    OFFICIAL -->|Club & Squad Inventory| FUT_SITES["FUTBin / FUT.GG Platforms"]

    BXC_AUTH --> UTAS
    BXC_MARKET --> UTAS
    BXC_METADATA --> CDN
    BXC_MARKET --> BXC_STORE
    BXC_METADATA --> BXC_STORE
```

---

## 2. EA Ecosystem Endpoints & Network Topology

The EA Sports FC Web & Companion infrastructure is distributed across three distinct layers: **Identity/Auth (EASW/EASF)**, **Gameplay/Market Services (UTAS on GCP)**, and **Static Asset Distribution (Akamai / Cloudflare CDN)**.

### 2.1 Host Registry

| Service Role | Production Hostname | Description |
| :--- | :--- | :--- |
| **Authentication Service** | `accounts.ea.com` | OAuth 2.0 Identity provider, login flows, two-factor auth. |
| **API Gateway / Nucleus** | `gateway.ea.com` | Persona discovery, player ID (`pid`), account entitlements. |
| **UTAS (Web/Mobile Cluster)** | `utas.mob.v2.prd.futc-ext.gcp.ea.com` | Core Ultimate Team gameplay, transfer market, club items, packs. |
| **Alternative UTAS Shards** | `utas.fut.ea.com` / `utas.s2.fut.ea.com` | Regional/legacy shard endpoints routed dynamically at login. |
| **Telemetry & Anti-Cheat** | `pin-river.data.ea.com` | PIN telemetry event engine tracking human behavior and UI clicks. |
| **Web App Static Content** | `www.ea.com/ea-sports-fc/ultimate-team/web-app/` | Single Page Application (Angular/TypeScript bundle) and configs. |
| **CDN Asset Server** | `fifa21.content.easports.com/fifa/fltOnlineAssets/` | Player portraits, card shells, TOTW frames, club badges. |
| **Official Ratings API** | `ratings-api.ea.com/v2/entities/fut-fc-25` | Publicly exposed player ratings, stats, playstyles and leagues. |

---

## 3. Authentication & Session Establishment (EASW / EASF / UTAS)

Accessing EA UT APIs directly requires crossing a 4-tier handshake:

```
[Browser / Cookie Jar]
        │
        ▼ 1. OAuth Initiate
GET https://accounts.ea.com/connect/auth?client_id=FUTWEB_BK_CHROME&...
        │
        ▼ 2. Session Cookies Set (PLAY_SESSION, ea_auth_sid, osc)
        │
        ▼ 3. Exchange Auth Code for Nucleus Token
POST https://accounts.ea.com/connect/token
        │
        ▼ 4. Resolve Persona & Shard Route
GET https://gateway.ea.com/proxy/identity/pids/me
GET https://utas.mob.v2.prd.futc-ext.gcp.ea.com/ut/game/fc25/user/accountinfo
        │
        ▼ 5. Ultimate Team Authentication Handshake
POST https://utas.mob.v2.prd.futc-ext.gcp.ea.com/ut/auth
        │
        ▼ Receive Session Tokens
Header: X-UT-SID: <sid>
Header: X-UT-PHISHING-TOKEN: <phishingToken>
```

### 3.1 Cookie Anatomy (Analysis of `packages/fut/src/cookies/ea.json`)

The stored `ea.json` demonstrates the exact session configuration required by EA Edge servers:

1. **`PLAY_SESSION`** (Domain: `www.ea.com`, HttpOnly):
   - Format: HS256 JWT containing `ea_auth_sid`:
     ```json
     {
       "alg": "HS256"
     }.{
       "data": {
         "ea_auth_sid": "4c228be2-d38d-471f-92d9-7d2210e2410c"
       },
       "nbf": 1789566171,
       "iat": 1789566171
     }
     ```
   - This cookie links the HTTP session directly to the EA login session ID (`ea_auth_sid`).
2. **`osc`** (Domain: `.ea.com`, Secure, HttpOnly):
   - Origin Session Cookie (`U1kzV0tQamtWQ1...`) verifying Origin/Cross-Site request authenticity against CSRF defenses.
3. **`ak_bmsc`, `bm_sv`, `bm_mi`** (Domain: `.ea.com`, Akamai Edge Tokens):
   - Akamai Bot Manager Premier telemetry validation cookies.
   - `ak_bmsc`: Sensor verification payload generated during client-side execution.
   - `bm_sv`: Session validity window token (~2 hour expiration) ensuring seamless pass-through at the CDN edge without presenting Akamai 403 or challenge interstitials.
4. **`PIM-SESSION-ID`**:
   - Platform Identity Manager tracking state across regional gateways.

### 3.2 Automated Headless 2FA Resolution with Backup Codes

To operate completely autonomously without requiring an interactive browser window, the authentication pipeline implements an automated 2FA challenge solver using stored single-use emergency backup codes (or TOTP secrets):

```mermaid
sequenceDiagram
    participant Bot as BXC Native Client
    participant EA_ID as EA Identity (accounts.ea.com)
    participant SEC as Secure Keyring (~/.bxc/cookies/private/)
    participant UTAS as UTAS Cluster (GCP)

    Bot->>EA_ID: POST /connect/auth (email + password)
    EA_ID-->>Bot: 302 Redirect to /connect/auth?execution=... (2FA Challenge Form)
    Note over Bot: Detect 2FA form ("twoFactorCode" input detected)
    Bot->>SEC: Read available backup code (e.g. from ea_backup_codes.json)
    SEC-->>Bot: Return code: 42068831 (mark used)
    Bot->>EA_ID: POST /connect/auth (twoFactorCode=42068831, _eventId=submit)
    EA_ID-->>Bot: 302 Redirect to redirect_uri with authCode
    Note over Bot: Extract "code" query param
    Bot->>EA_ID: POST /connect/token (exchange authCode)
    EA_ID-->>Bot: access_token + nucleus_id
    Bot->>UTAS: POST /ut/auth (authCode)
    UTAS-->>Bot: X-UT-SID + X-UT-PHISHING-TOKEN
```

#### Step-by-Step 2FA Resolution Payload

1. **Submit Primary Credentials**:
   ```http
   POST /connect/auth HTTP/1.1
   Host: accounts.ea.com
   Content-Type: application/x-www-form-urlencoded
   Referer: https://accounts.ea.com/connect/auth?client_id=FUTWEB_BK_CHROME&response_type=code&display=web2/login&scope=basic.identity+offline+signin

   email=user%40example.com&password=UserPassword123&_eventId=submit&cid=...&rememberMe=on
   ```

2. **Handle 2FA Challenge & Submit Backup Code**:
   When EA Identity responds with the two-factor authentication challenge page, BXC selects an unused backup code from `/home/ubuntu/.bxc/cookies/private/ea_backup_codes.json`:
   ```http
   POST /connect/auth HTTP/1.1
   Host: accounts.ea.com
   Content-Type: application/x-www-form-urlencoded
   Referer: https://accounts.ea.com/connect/auth?execution=e1s2

   twoFactorCode=42068831&_eventId=submit&_trustThisDevice=on&trustThisDevice=on
   ```

3. **Session Persistence**:
   Upon validation, EA sets the persistent `PLAY_SESSION` JWT and redirects to the OAuth callback with the authorization code (`code=...`). The client consumes this code directly in the `/ut/auth` handshake without ever rendering a browser UI.


### 3.3 UT Authentication Payload (`/ut/auth`)

Once the Nucleus auth code is acquired:
- **Endpoint**: `POST https://utas.mob.v2.prd.futc-ext.gcp.ea.com/ut/auth`
- **Headers**:
  ```http
  Content-Type: application/json
  User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36
  Origin: https://www.ea.com
  Referer: https://www.ea.com/ea-sports-fc/ultimate-team/web-app/
  ```
- **Request Body**:
  ```json
  {
    "clientVersion": 1,
    "gameSku": "FFA25PCC",
    "identification": {
      "authCode": "a3f1246c-e58d-44a6-98bf-4c7b89d41234",
      "redirectUrl": "nucleus:rest"
    },
    "isReadOnly": false,
    "locale": "en-US",
    "method": "authcode",
    "priorityLevel": 4
  }
  ```
- **Response**:
  ```json
  {
    "protocol": "https",
    "ipPort": "utas.mob.v2.prd.futc-ext.gcp.ea.com",
    "serverTime": "1726509823",
    "sid": "98e4d3a2-11bc-4952-b1e0-67c2935401af",
    "phishingToken": "d41d8cd98f00b204e9800998ecf8427e"
  }
  ```
- The `sid` returned here is the value injected into the **`X-UT-SID`** HTTP header for all subsequent market and user requests.

---

## 4. How FUTBin and FUT.GG Operate in Reality

Neither FUTBin nor FUT.GG rely on a single magic endpoint. They deploy a hybrid **4-Pillar Pipeline**:

### Pillar 1: Crowdsourced Telemetry via Extensions & Injected Scripts
* **Mechanism**: Users install the official **FUTBin Chrome Extension** ("FUTBin Import"), **FUT.GG Sync**, or community tools (e.g., **Paletools**, **Shortfuts**).
* **Execution**: When a user browses the transfer market on the official Web App, the browser extension hooks `XMLHttpRequest.prototype.open` and `window.fetch`. Every time EA's server returns an `auctionInfo` array from `/ut/game/fc25/transfermarket`, the extension sends a copy of the JSON payload to FUTBin’s ingestion server (`https://import.futbin.com/api/v1/updatePrices`).
* **Scale**: With hundreds of thousands of active players searching the market, millions of live price updates are collected per hour with **zero bot risk** to FUTBin's own infrastructure.

### Pillar 2: Headless Scraping Clusters (Bot Farms)
* **Mechanism**: Automated headless browser pools (Puppeteer/Lightpanda with stealth profiles) run thousands of EA accounts over residential proxy networks.
* **Targeting**: Focused on high-volume, volatile, or under-searched cards (new TOTW, Promo cards, extinct silver/gold SBC fodder).
* **BIN Bisection Search**:
  To locate the lowest Buy It Now (BIN) price for a player without wasting search limits:
  1. The bot executes `GET /transfermarket?defId=20801&maxb=50000&num=21`.
  2. If 21 results appear, the price is lower -> step down `maxb`.
  3. If 0 results appear, the price is higher -> step up `maxb`.
  4. Once results between 1 and 10 items appear with expiry timers > 59 minutes, the current lowest BIN is identified and logged with a timestamp.

### Pillar 3: The Official EA FC Community API (Introduced July 2026)
* **Mechanism**: EA SPORTS launched the official **FC Community API** program, granting approved third-party platforms (**FUTBIN**, **FUT.GG**, and **FUTWIZ**) direct OAuth 2.0 read permissions.
* **Scope**: Enables authenticated players to link their EA account to view:
  - Club players, untradeable cards, club value.
  - Active squads and Evolutions progress.
  - SBC eligibility calculation.
* **Limitation**: EA strictly excludes live transfer market scraping from this API; live market pricing remains serviced by Pillars 1 & 2.

### Pillar 4: Static Asset & Database Ingestion (ETag & Content Dumps)
* **Mechanism**: EA publishes static catalogs for players, clubs, leagues, and nations on public CDNs whenever a patch or weekly content drop (Wednesdays & Fridays at 18:00 UTC) occurs.
* **Endpoints Polled**:
  - `https://www.ea.com/ea-sports-fc/ultimate-team/web-app/content/.../fut/items/web/players.json`
  - `https://ratings-api.ea.com/v2/entities/fut-fc-25`
* **Latency**: Within 60 seconds of a promo release, automated diff scripts detect new `defId`s, new `cardsubtypeid` values, updated PlayStyles+, and download corresponding card graphics.

---

## 5. Direct EA UT API Reference (Native Ingestion Specification)

All UT game endpoints are hosted under:
`https://utas.mob.v2.prd.futc-ext.gcp.ea.com/ut/game/fc27/` (active season title, or `fc26` / `fc25` legacy shards).

### 5.0 Persona Discovery & Account Verification (`services/persona`)

Before querying UTAS gameplay routes, the client resolves persona entitlements:
- **Persona Endpoint**: `GET https://gateway.ea.com/proxy/identity/pids/me` or `GET https://gateway.ea.com/proxy/identity/personas`
- **Account Verification**: `GET https://utas.mob.v2.prd.futc-ext.gcp.ea.com/ut/game/fc27/user/account/info` (or `/user/accountinfo`)
- **Active Persona Context**: Verifies persona binding (e.g. `yoyo_cruyf` tied to `yohanpierre@live.fr`), confirming club active status and SKU entitlement (`FFA27PCC`).


### 5.1 Mandatory Headers

Every request MUST include the following headers or EA Edge will respond with `401 Unauthorized` or `403 Forbidden`:

```http
X-UT-SID: <sid_from_ut_auth>
X-UT-PHISHING-TOKEN: <phishing_token>
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36
Origin: https://www.ea.com
Referer: https://www.ea.com/ea-sports-fc/ultimate-team/web-app/
Accept: application/json
Accept-Language: en-US,en;q=0.9
```

---

### 5.2 Transfer Market Search (`GET /transfermarket`)

Queries active auction listings.

- **Path**: `GET /ut/game/fc25/transfermarket`
- **Query Parameters**:
  | Parameter | Type | Description |
  | :--- | :--- | :--- |
  | `type` | string | `player`, `training`, `clubInfo`, `development` |
  | `defId` | integer | Base definition ID of the player (e.g. `20801` for Ronaldo) |
  | `maskedDefId` | integer | Special version asset ID |
  | `lev` | string | `gold`, `silver`, `bronze`, `special` |
  | `pos` | string | `ST`, `CAM`, `CM`, `CB`, `GK`, etc. |
  | `nat` | integer | Nation identifier (e.g., `38` for France, `14` for England) |
  | `leag` | integer | League identifier (e.g., `13` for Premier League, `53` for La Liga) |
  | `team` | integer | Club identifier (e.g., `11` for Man Utd, `73` for PSG) |
  | `micr` | integer | Minimum Current Bid price |
  | `macr` | integer | Maximum Current Bid price |
  | `minb` | integer | Minimum Buy It Now (BIN) price |
  | `maxb` | integer | Maximum Buy It Now (BIN) price |
  | `num` | integer | Results per page (typically `16` or `21`) |
  | `start` | integer | Pagination offset (multiples of `num`) |

- **Sample Response**:
  ```json
  {
    "auctionInfo": [
      {
        "tradeId": 401829471924,
        "itemData": {
          "id": 1829471829,
          "timestamp": 1726510100,
          "itemType": "player",
          "rating": 86,
          "assetId": 20801,
          "resourceId": 20801,
          "itemState": "free",
          "rareflag": 1,
          "formation": "f442",
          "leagueId": 350,
          "teamid": 112134,
          "nation": 38,
          "preferredPosition": "ST",
          "playStyle": 2,
          "discardValue": 650,
          "cardsubtypeid": 0,
          "untradeable": false,
          "owners": 1,
          "marketDataMinPrice": 1000,
          "marketDataMaxPrice": 150000
        },
        "tradeState": "active",
        "bidState": "highest",
        "startingBid": 1000,
        "currentBid": 13500,
        "buyNowPrice": 14500,
        "offers": 5,
        "expires": 3120,
        "confidenceValue": 100
      }
    ]
  }
  ```

---

### 5.3 Place Bid or Buy Now (`PUT /trade/{tradeId}/bid`)

- **Path**: `PUT /ut/game/fc25/trade/{tradeId}/bid`
- **Request Body**:
  ```json
  {
    "bid": 14500
  }
  ```
  *(Note: To execute a Buy It Now / BIN, set `"bid"` to the exact `buyNowPrice` value of the auction).*
- **Response (Success)**:
  ```json
  {
    "auctionInfo": [
      {
        "tradeId": 401829471924,
        "tradeState": "closed",
        "bidState": "buyNow",
        "currentBid": 14500
      }
    ],
    "currencies": [
      { "name": "COINS", "funds": 235500 }
    ]
  }
  ```

---

### 5.4 Club Inventory & Trade Piles

* **Fetch Club Players**:
  - `GET /ut/game/fc27/club?count=50&offset=0&type=player`
* **Fetch Transfer List (Trade Pile)**:
  - `GET /ut/game/fc27/tradepile`
* **Fetch Watch List**:
  - `GET /ut/game/fc27/watchlist`
* **Fetch User Balance / Coins**:
  - `GET /ut/game/fc27/user/credits`
  - Returns: `{"credits": 250000}`

---

### 5.5 Store & Pack Endpoints

* **Available Packs**:
  - `GET /ut/game/fc27/store/purchase`
* **Open Unassigned User Packs**:
  - `POST /ut/game/fc27/store/purchase/{packId}`
* **Retrieve Unassigned Pile**:
  - `GET /ut/game/fc27/purchased/items`


---

### 5.6 Static Reference Dumps (Publicly Accessible without Auth)

EA maintains static JSON dictionaries on its CDN for localization, item definitions, and card art:

1. **Player Database Dump**:
   - `https://www.ea.com/ea-sports-fc/ultimate-team/web-app/content/{buildGuid}/2025/fut/items/web/players.json`
2. **Teams & Clubs**:
   - `.../items/web/teams.json`
3. **Nations**:
   - `.../items/web/nations.json`
4. **Leagues**:
   - `.../items/web/leagues.json`
5. **Player Face Render**:
   - `https://fifa21.content.easports.com/fifa/fltOnlineAssets/{buildGuid}/2025/fut/items/images/mobile/portraits/{assetId}.png`
6. **Card Background Plate**:
   - `https://fifa21.content.easports.com/fifa/fltOnlineAssets/{buildGuid}/2025/fut/items/images/cards/player/{cardsubtypeid}.png`

---

## 6. Anti-Bot Defense Mechanisms & Evasion Strategy

Directly querying UTAS requires complying with EA’s three-stage bot detection engine:

### 6.1 PIN River Telemetry (`pin-river.data.ea.com`)
The Web App periodically posts behavioral events to the PIN river service:
- Events include: `page_view`, `mouse_move`, `time_spent_on_screen`, `search_button_clicked`.
- **Detection**: Sending 50 `/transfermarket` requests with 0 corresponding PIN telemetry calls will trigger an instant market softban.
- **Countermeasure**: Replay authentic PIN event payloads with realistic timing jitter (800ms - 2500ms delay between actions).

### 6.2 Arkose Labs (FunCaptcha)
- When search velocity exceeds thresholds or request IP reputation is low, UTAS returns HTTP `458` or `512` with a `captcha_url`.
- The Web App displays an Arkose Labs visual puzzle.
- **Handling**: Third-party solver APIs (AntiCaptcha, 2Captcha, CapSolver) or headless stealth session completion.

### 6.3 Softbans & Status Codes
- **`429 Too Many Requests`**: Temporary rate limit (cooldown: 5–15 minutes).
- **`458 / 512 Verification Required`**: Arkose FunCaptcha challenge triggered.
- **`521 Market Locked`**: Account does not meet gameplay criteria (requires matches played on physical console/PC).

---

## 7. BXC Native Ingestion Implementation Blueprint

To ingest market data without scraping third-party HTML pages (bypassing FUTBin/FUT.GG entirely), BXC can implement the native client module in `packages/fut`:

```typescript
/**
 * Native EA FC Ultimate Team API Client (Bun Zero-Spawn)
 */
export interface UtasConfig {
  sid: string;
  phishingToken: string;
  sku?: string;
}

export class EaUtasClient {
  private baseUrl = "https://utas.mob.v2.prd.futc-ext.gcp.ea.com/ut/game/fc25";

  constructor(private config: UtasConfig) {}

  private get headers(): HeadersInit {
    return {
      "X-UT-SID": this.config.sid,
      "X-UT-PHISHING-TOKEN": this.config.phishingToken,
      "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36",
      "Origin": "https://www.ea.com",
      "Referer": "https://www.ea.com/ea-sports-fc/ultimate-team/web-app/",
      "Accept": "application/json"
    };
  }

  async searchMarket(params: {
    defId?: number;
    maxb?: number;
    minb?: number;
    num?: number;
    start?: number;
  }) {
    const url = new URL(`${this.baseUrl}/transfermarket`);
    if (params.defId) url.searchParams.set("defId", params.defId.toString());
    if (params.maxb) url.searchParams.set("maxb", params.maxb.toString());
    if (params.minb) url.searchParams.set("minb", params.minb.toString());
    url.searchParams.set("num", (params.num || 21).toString());
    url.searchParams.set("start", (params.start || 0).toString());

    const res = await fetch(url.toString(), {
      method: "GET",
      headers: this.headers,
    });

    if (!res.ok) {
      throw new Error(`UTAS Search Failed: HTTP ${res.status} ${res.statusText}`);
    }

    return await res.json();
  }

  async getLowestBin(defId: number, estimatedPrice: number): Promise<number> {
    // Binary search implementation to locate lowest BIN price
    let low = Math.floor(estimatedPrice * 0.5);
    let high = Math.floor(estimatedPrice * 1.5);
    let bestBin = high;

    while (low <= high) {
      const mid = Math.round((low + high) / 2 / 100) * 100;
      const data = await this.searchMarket({ defId, maxb: mid, num: 21 });
      const count = data.auctionInfo?.length || 0;

      if (count > 0) {
        bestBin = Math.min(...data.auctionInfo.map((a: any) => a.buyNowPrice));
        high = bestBin - 100;
      } else {
        low = mid + 100;
      }
      await Bun.sleep(1200 + Math.random() * 800); // Respect rate limit
    }

    return bestBin;
  }
}
```

---

## 8. Summary of Findings

1. **How FUTBin / FUT.GG Keep Prices Live**:
   - Primary: **Crowdsourcing via Chrome Extensions** (millions of users browsing the market stream live `auctionInfo` responses back to their servers).
   - Secondary: **Headless bot clusters** executing binary search on Buy It Now (`maxb`) queries.
   - Database/Cards: **Direct CDN dumps** (`players.json`, `teams.json`) polled automatically upon TOTW and promo releases.
   - Club Sync: **Official EA FC Community API** (partner program with OAuth login, active since July 2026).
2. **Native Direct Ingestion**:
   - Achieved by authenticating via `PLAY_SESSION` / OAuth to retrieve `sid`, then querying `GET /ut/game/fc25/transfermarket` directly with `X-UT-SID` and `X-UT-PHISHING-TOKEN` headers.
   - Completely eliminates third-party scraping overhead and Cloudflare Turnstile blocks from FUTBin.
