Your best XI OVR
const url = 'https://foxleague.ai/api/teams/best-xi-ovr';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://foxleague.ai/api/teams/best-xi-ovr \ --header 'Authorization: Bearer <token>'Answers your team’s best XI OVR: the average OVR of the strongest XI you can field from the cards you own right now, whatever your saved lineup. In each formation a team can pick, the XI takes the best card of each position for its slots (a card plays only in its own position, as in the lineup editor; three strong goalkeepers count once). The highest of these is kept, with the formation it came from; a tie keeps the formation listed first in Tactics. Cards listed for sale count. When your cards fill no formation completely, complete is false and the OVR is the average of the cards in the formation they fill most. A tournament or 1v1 challenge with an OVR range (ovr_min, ovr_max) checks this number once, when a team joins.
Who: a signed-in player.
Without a session the answer is HTTP 401. If your cards cannot be read on our side, the answer is HTTP 500 with an empty body.
Authorizations
Section titled “Authorizations ”Responses
Section titled “ Responses ”Success or a refusal: read success (the refusals are in the description).
object
A machine-readable reason next to error, set only where the caller must act differently. tx_pending: the payment was not refused but could not be verified yet; keep the transaction hash and confirm again with the same hash, never pay twice.
The answer. Present when success is true.
object
The best XI of every formation you can pick, best first (equal ones in the order of the formation list): its first entry is best_xi_ovr in formation. Empty when none of your cards fits a lineup slot.
The best XI of one formation.
object
false when the cards cannot fill that formation: the OVR is then the average of the cards it holds.
A formation a team can pick in Tactics, as a Team.formation id such as 4-3-3.
The best XI OVR in that formation, one decimal.
The average OVR of the strongest XI you can field from the cards you own right now, to one decimal, whatever your saved lineup. Cards listed for sale count. null when none of your cards fits a lineup slot.
How many cards you own.
false when your cards fill no formation completely: the OVR is then the average of the cards in the formation they fill most.
The formation that XI was built in, as a Team.formation id such as 4-3-3. null with best_xi_ovr.
Why the request was refused, in plain words. Present when success is false.
true when the request did what it asked. false is a refusal: read error.
Example
{ "data": { "best_xi_by_formation": [ { "complete": true, "formation": "4-3-3", "ovr": 34.5 }, { "complete": true, "formation": "4-3-3w", "ovr": 34.5 }, { "complete": true, "formation": "4-3-3b", "ovr": 34.5 }, { "complete": true, "formation": "4-4-2", "ovr": 34.1 }, { "complete": true, "formation": "4-4-2o", "ovr": 34.1 }, { "complete": true, "formation": "5-2-3", "ovr": 33.8 }, { "complete": true, "formation": "5-3-2", "ovr": 33.6 }, { "complete": true, "formation": "4-2-3-1", "ovr": 33.2 } ], "best_xi_ovr": 34.5, "cards": 18, "complete": true, "formation": "4-3-3" }, "success": true}No valid session. The body is plain text: Missing Authorization header, Invalid Authorization format, Invalid session token or Session expired or invalid. Sign in again.
Example
Session expired or invalidYour cards could not be read on our side. The body is empty.