Your MetaStaking discount in the Shop
const url = 'https://foxleague.ai/api/shop/discount';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/discount \ --header 'Authorization: Bearer <token>'Your wallet’s MetaStaking discount in the Shop: whether it applies yet (live, from live_from), the basis points off every Shop price for your wallet now (discount_bp, 100 = 1%) and how long a price at that rate stays accepted (quote_valid_seconds). The rate is 10 bp (0.1%) for every full 10,000 FOXSY of your 30-day MetaStaking average (the number of GET /api/teams/metastaking), at most 1,000 (10%, from 1,000,000 FOXSY); 150,000 FOXSY gives 150 (1.5%). It is 0 before live_from and for a wallet without snapshots.
The price you pay for a full price p at discount_bp: p - floor(p x discount_bp / 10000), in whole FOXSY. The discount is rounded down and taken once per payment, on the payment’s total (5 training slots: the price of 5, then the discount). Send exactly that amount with shopPay; the server computes the same price for your wallet when you confirm and accepts no other amount. A request never carries a rate.
When your rate changes: it can move once a day, when the daily snapshot is taken. Every answer that tells you your rate (this route, GET /api/shop/status and the quotes of the transfer lock waiver, medicine and the ranked ticket) is a quote: a payment at it is accepted for quote_valid_seconds after the answer, counted to the payment’s own chain time. Read your rate again right before you pay.
Discounted: Common packs, condition recovery, XP boosters, training slots, the transfer lock waiver, medicine and ranked tickets. Not discounted: fusion, the fusion cooldown waiver and the fusion match waiver (the game contract takes their full price), tournament entries, organizer payments and deposits, the marketplace, badge regenerations and the registration.
Who: a signed-in player. You only ever read your own wallet.
Refusals: none. Without a session the answer is HTTP 401.
Authorizations
Section titled “Authorizations ”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 basis points (100 = 1%) off every discounted Shop price for your wallet now: 10 for every full 10,000 FOXSY of your 30-day MetaStaking average, at most 1,000 (10%). 150 is 1.5%. 0 while live is false.
Whether the discount applies now: live_from has passed.
When the discount starts (RFC 3339, UTC); null while the switch is off.
How long a price at this rate stays accepted after this answer, in seconds, when your rate changes meanwhile.
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": { "discount_bp": 150, "live": true, "live_from": "2026-12-01T14:00:00Z", "quote_valid_seconds": 900 }, "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