Show interest in another team's player
const url = 'https://foxleague.ai/api/players/nonce/1/interest';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"offer_foxsy":1,"share_telegram":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://foxleague.ai/api/players/nonce/1/interest \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "offer_foxsy": 1, "share_telegram": true }'Tells the owner of another team’s card that you are interested in it. You can name an offer in whole FOXSY (offer_foxsy): it binds nobody, no FOXSY moves and nothing is reserved. With share_telegram the owner also sees your Telegram username; it needs a Telegram account linked to your team in Settings, with a username. There is no message field: a body with any other field is refused. The owner sees your team name and coach name, the offer, the time and the username only when you share it.
The owner gets one notification per card and UTC day: the first interest of the day creates it with a push, every later one rewrites it (how many managers, the best offer) without a second push. When the owner lists the card, every manager interested in it during the last 7 days is told. The listing is public: anyone can buy it first.
Who: a signed-in player with a team, about a card of another team that is not on the market.
Limits: player_interest.per_day interests a UTC day (5) and one per card and owner every player_interest.repeat_days days (7), both in GET /api/config. After the card changes hands you can tell its new owner at once.
Refusals:
Showing interest in a player is not available right now.: the feature is switched off.Player not found.: no card has this nonce.This is your own player.: the card is in your squad.This player is already on the market: you can buy it there.: the card is listed.This player is not in a team's squad right now.: the card is in a wallet without a team.Connect Telegram with a username in Settings first. You can also send without sharing it.:share_telegramwithout a linked username.- An offer that is not a whole number of FOXSY from 1 to 1000000000.
- The daily limit and the limit of one interest per card and owner in the repeat window, each with the number in its words.
A body that is not this JSON (a field of the wrong type, an unknown field such as a message) is answered HTTP 422 with a plain text body.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The NFT nonce of the card.
Request Body required
Section titled “Request Body required ”Your interest in a card: an optional offer and the Telegram opt-in. Nothing else is taken.
object
Your offer in whole FOXSY, from 1 to 1000000000. Leave it out for no offer. It binds nobody and moves no FOXSY.
true shows your Telegram username to this card’s owner. Needs a Telegram account with a username linked in Settings. Default false.
Example generated
{ "offer_foxsy": 1, "share_telegram": true}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
How many you can send in a UTC day.
Interests you sent today (UTC), this one included.
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": { "per_day": 5, "sent_today": 1 }, "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 invalid