fn sync_game()
Fetch bootstrap-static and the fixture list: gameweeks, teams, all
fn login_start(open: boolean)
Begin an interactive login. Opens your browser at the sign-in page;
| Argument | Type | Required | Description |
|---|
| open | boolean | yes | |
fn login_finish(code: string)
Complete an interactive login by exchanging the authorization code
| Argument | Type | Required | Description |
|---|
| code | string | yes | |
fn refresh_auth()
Exchange the stored refresh token for a fresh access token and cache
fn whoami()
Resolve your entry ID and team name from the authenticated session
fn sync_squad(gameweek?: number, publicOnly: boolean)
Fetch your 15-player squad — the live pre-deadline team when a
| Argument | Type | Required | Description |
|---|
| gameweek? | number | no | |
| publicOnly | boolean | yes | |
fn fixture_outlook(fromEvent?: number, horizon?: number)
Rank every club by fixture difficulty over the next N gameweeks,
| Argument | Type | Required | Description |
|---|
| fromEvent? | number | no | |
| horizon? | number | no | |
fn advise()
Recommend a captain, vice-captain and transfers by combining player
fn build_squad(budget: number, passes: number, excludeTeams?: array)
Build a legal 15-player squad from scratch within budget, maximising
| Argument | Type | Required | Description |
|---|
| budget | number | yes | |
| passes | number | yes | |
| excludeTeams? | array | no | |
fn apply_transfers(transfers: array, fromAdvice: boolean, limit: number, chip?: string, dryRun: boolean, allowUnavailable: boolean)
Write transfers back to FPL. Validates positions, budget and the
| Argument | Type | Required | Description |
|---|
| transfers | array | yes | |
| fromAdvice | boolean | yes | |
| limit | number | yes | |
| chip? | string | no | |
| dryRun | boolean | yes | |
| allowUnavailable | boolean | yes | |
fn set_lineup(starters: array, captain?: number, viceCaptain?: number, benchOrder: array, fromAdvice: boolean, chip?: string, cancelChip: boolean, dryRun: boolean)
Write a starting eleven, bench order and armband back to FPL.
| Argument | Type | Required | Description |
|---|
| starters | array | yes | |
| captain? | number | no | |
| viceCaptain? | number | no | |
| benchOrder | array | yes | |
| fromAdvice | boolean | yes | |
| chip? | string | no | |
| cancelChip | boolean | yes | |
| dryRun | boolean | yes | |
fn sync_leagues(leagueIds?: array, limit: number)
Fetch standings for every configured classic mini-league in one
| Argument | Type | Required | Description |
|---|
| leagueIds? | array | no | |
| limit | number | yes | |
fn price_watch()
Compare the two most recent player syncs and report every price
Resources
game(infinite)— Gameweek calendar, teams and game settings
players(infinite)— All FPL players with prices, form and underlying stats
fixtures(infinite)— Season fixture list with difficulty ratings
pendingLogin(1h)— PKCE state for an in-progress interactive login
session(infinite)— Cached OAuth session — access and refresh tokens
identity(infinite)— Authenticated manager identity and entry ID
squad(infinite)— Your current 15-player squad
draft(infinite)— A squad built from scratch within budget
applied(infinite)— Record of transfers and lineups written back to FPL
outlook(infinite)— Per-team fixture difficulty over the coming gameweeks
advice(infinite)— Captain pick, transfer suggestions and injury flags
league(infinite)— Classic mini-league standings
priceMoves(infinite)— Price rises and falls since the previous player sync