Price to shorten a card's injury
const url = 'https://foxleague.ai/api/shop/medicine/quote?player_nonce=1';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/shop/medicine/quote?player_nonce=1' \ --header 'Authorization: Bearer <token>'The FOXSY price of medicine for an injured card of yours: price_per_day (by the card’s rarity) for each whole day saved. A third of every injury is always served (served_until, rounded up to whole days from the moment of the injury), so max_days counts the whole days between the end of the injury and the later of that third and now. With days it prices only that many days.
Who: a signed-in player, for a card in their wallet. Sold from the moment the injuries start (rules.card_bans_live_from).
Refusals:
Medicine cannot be checked right now. Please retry in a moment.: a read failed.Medicine is not on sale right now.: the injuries have not started (or their switch is off).That player is not in your wallet.: the card is not in your wallet.This player is not injured.: the card has no injury running.A third of every injury is always served: this player's injury cannot be shortened further.: less than a whole day is left above the served third.Medicine has no price for this player's rarity.: the card’s rarity is none of the five.Choose from 1 to <n> days for this player.:daysis outside 1 tomax_days.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ”The NFT nonce of the injured card.
Optional: price only this many days, from 1 up to max_days. Without it the quote is for every day medicine can buy now.
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 price, whole FOXSY: days_paid times price_per_day.
The days this quote prices: days when you asked for them, else every one.
The end of the injury this quote priced (RFC 3339, UTC).
Every whole day medicine can buy for this card now.
The card’s NFT nonce.
The card’s rarity rate, whole FOXSY per day saved.
The earliest end medicine can reach: a third of every injury, rounded up to whole days, is always served; with several injuries, the latest of their thirds.
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": { "cost_foxsy": 2500, "days_paid": 5, "injured_until": "2026-12-10T14:00:00Z", "max_days": 18, "player_nonce": 3990, "price_per_day": 500, "served_until": "2026-11-22T14:00:00Z" }, "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