Skip to content

Price to shorten a card's transfer lock

GET
/api/shop/waive-cooldown/quote
curl --request GET \
--url 'https://foxleague.ai/api/shop/waive-cooldown/quote?player_nonce=1' \
--header 'Authorization: Bearer <token>'

The FOXSY price to cut a card’s transfer lock down to the part that cannot be waived (floor_hours): price_per_day for every started day above it. With days it prices only that many of those days, at the same price per day.

Who: a signed-in player, for a card in their wallet.

Refusals:

  • That player is not in your wallet.: the card is not in your wallet.
  • This player has no active transfer cooldown.: the card has no transfer lock.
  • This player is already within the un-waivable <h>h floor.: what is left of the lock is at most the floor (or the lock has ended).
  • This player moved to your wallet before reaching its match gate. Its lock gets shorter with each match waiver bought for it; Reduce Cooldown does not apply.: the card was sent before it reached its rarity’s match gate; buy matches for it instead (GET /api/players/nonce/{nonce}/match-waiver-quote).
  • 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 card whose lock to cut.

days
integer format: int64

Optional: price only this many days, from 1 up to max_days, at the same price per day. Without it the quote is for every started day above the floor.

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 started day above the floor.

integer format: int64
floor_hours
required

Hours of the lock that stay after a waiver.

integer format: int32
max_days
required

Every started day above the floor that a waiver could buy for this card now.

integer format: int64
player_nonce
required

The card’s NFT nonce.

integer format: int64
price_per_day
required

The daily rate for this card, whole FOXSY.

integer format: int64
remaining_seconds
required

Seconds left in the card’s transfer lock.

integer format: int64
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": 900,
"days_paid": 9,
"floor_hours": 72,
"max_days": 9,
"player_nonce": 3990,
"price_per_day": 100,
"remaining_seconds": 1036800
},
"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