Skip to content

Whether a card can be listed now

GET
/api/marketplace/can-list
curl --request GET \
--url 'https://foxleague.ai/api/marketplace/can-list?nonce=1' \
--header 'Authorization: Bearer <token>'

Whether a card of your wallet can be listed on the marketplace now, at a fixed price or at auction. Two checks:

  • its competitive matches: as for fusion, the card needs the match gate of its rarity (rarity_match_gate in /api/config): min_matches_required competitive matches (waived ones count), of which match_floor_required really played. A failed check answers can_list: false with reason and the counts.
  • the relist cooldown after the card’s last purchase, read from the chain. This answer is kept for 30 seconds per card. When the chain cannot be read the answer allows the listing with advisory: "cooldown_unknown"; the contract checks again when you list.

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

Refusals:

  • Not your player: FoxLeague’s records do not have this card in your wallet. Nothing is read from the chain.

If the card cannot be read on our side, the answer is a refusal with a generic message.

nonce
required
integer format: int64

The card’s NFT nonce.

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
advisory

cooldown_unknown when the chain could not be read and the listing is allowed anyway; absent otherwise.

string
can_list
required

true when the card can be listed now.

boolean
can_relist_at

Unix seconds when the relist cooldown ends; null when the card was never bought. Absent with reason or advisory.

integer | null format: int64
competitive_matches

Competitive matches the card has played. Only with reason.

integer format: int32
cooldown_remaining_seconds

Seconds left in the relist cooldown; null when the card can be listed. Absent with reason or advisory.

integer | null format: int64
fusion_match_credit

Matches waived for the card. Only with reason.

integer format: int32
match_floor_required

Of those, matches the card must have really played: the floor of its rarity. Only with reason.

integer format: int64
min_matches_required

Competitive matches the card needs, waived ones included: the gate of its rarity. Only with reason.

integer format: int64
reason

below_match_floor or needs_competitive_matches when the match check refuses; absent otherwise.

string
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": {
"can_list": false,
"can_relist_at": 1759420800,
"cooldown_remaining_seconds": 5400
},
"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