Skip to content

Your daily casual and ranked match count

GET
/api/matches/daily-allowance
curl --request GET \
--url 'https://foxleague.ai/api/matches/daily-allowance?wallet_address=example' \
--header 'Authorization: Bearer <token>'

How many casual and ranked matches you started since the last daily reset, the daily cap and the UTC hour when the count resets. Only matches you start count: being drawn as the away side of someone else’s ranked match does not count, nor do tournament matches.

Who: a signed-in player, for their own wallet. A wallet without an account reads a count of 0.

Refusals:

  • Wallet mismatch: sign with the correct wallet: wallet_address is not the session wallet.
wallet_address
required
string

Your wallet; it must be the session wallet.

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
daily_limit
required

Casual and ranked matches you may start per day.

integer format: int64
reset_hour_utc
required

The UTC hour (0 to 23) when the count resets.

integer format: int64
today_count
required

Casual and ranked matches you started since the last reset.

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": {
"daily_limit": 5,
"reset_hour_utc": 14,
"today_count": 2
},
"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

A server read failed. The body is empty.