Price to shorten a card's transfer lock
const url = 'https://foxleague.ai/api/shop/waive-cooldown/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/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.:daysis outside 1 tomax_days.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ”The NFT nonce of the card whose lock to cut.
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.
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 started day above the floor.
Hours of the lock that stay after a waiver.
Every started day above the floor that a waiver could buy for this card now.
The card’s NFT nonce.
The daily rate for this card, whole FOXSY.
Seconds left in the card’s transfer lock.
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": 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.
Example
Session expired or invalid