Skip to content

Price to shorten a card's injury

GET
/api/shop/medicine/quote
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.: days is outside 1 to max_days.
player_nonce
required
integer format: int64

The NFT nonce of the injured card.

days
integer format: int64

Optional: price only this many days, from 1 up to max_days. Without it the quote is for every day medicine can buy now.

Success or a refusal: read success (the refusals are in the description).

Media type application/json
object
code

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.

string | null
data

The answer. Present when success is true.

object
cost_foxsy
required

The price, whole FOXSY: days_paid times price_per_day.

integer format: int64
days_paid
required

The days this quote prices: days when you asked for them, else every one.

integer format: int64
injured_until
required

The end of the injury this quote priced (RFC 3339, UTC).

string format: date-time
max_days
required

Every whole day medicine can buy for this card now.

integer format: int64
player_nonce
required

The card’s NFT nonce.

integer format: int64
price_per_day
required

The card’s rarity rate, whole FOXSY per day saved.

integer format: int64
served_until
required

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.

string format: date-time
error

Why the request was refused, in plain words. Present when success is false.

string | null
success
required

true when the request did what it asked. false is a refusal: read error.

boolean
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.

Media type text/plain
string
Example
Session expired or invalid