Polyrankdocs
Meta

Feature flags

One public call — GET /v1/meta/flags — returns the on/off state of the load-bearing server flags, so you never have to probe-and-degrade.

Some Polyrank surfaces are gated behind server-side feature flags. Rather than probing each gated endpoint at startup and guessing whether a 404/503 means "disabled" or "outage", call one endpoint and read the booleans directly.

GET /v1/meta/flags

Unauthenticated, no API key required, cached 60s (Cache-Control: public, max-age=60), rate-limited to 60 requests/min. Returns only booleans — never a secret or a value beyond on/off.

curl -s https://api.polyrank.app/v1/meta/flags
{
  "flags": {
    "PUBLIC_API_ENABLED": true,
    "MARKET_BOOK_DEPTH_ENABLED": true,
    "MARKET_SKILL_FLOW_ENABLED": true,
    "UMA_DISPUTE_RISK_ENABLED": true,
    "USER_RANKING_ENABLED": true,
    "POSITION_ROLLUP_ENABLED": true,
    "AGENT_WEBHOOKS_ENABLED": true,
    "AGENT_CREDITS_ENABLED": true
  },
  "as_of": "2026-07-15T19:29:38.759Z"
}

What each flag gates

FlagWhen true
PUBLIC_API_ENABLEDThe anonymous /v1/public/* teaser namespace (masked leaderboard, trader/market teasers, search, recently-active) is served.
MARKET_BOOK_DEPTH_ENABLEDLive CLOB book-depth is captured and surfaced on market responses.
MARKET_SKILL_FLOW_ENABLEDSkill-weighted flow is computed on market pages.
UMA_DISPUTE_RISK_ENABLEDUMA settlement/dispute-risk state is polled and surfaced.
USER_RANKING_ENABLEDRankings are served at the user grain (a user's wallets are combined) rather than per-wallet. Observable from a response: user-grain rows carry wallets[].
POSITION_ROLLUP_ENABLEDCalibration metrics are position-weighted (rolled up) rather than fill-weighted.
AGENT_WEBHOOKS_ENABLEDThe x402 agent webhook rail accepts registrations (else 503).
AGENT_CREDITS_ENABLEDPrepaid agent credits are accepted (else 503).

Two truthy conventions

Six flags (PUBLIC_API_ENABLED, MARKET_BOOK_DEPTH_ENABLED, MARKET_SKILL_FLOW_ENABLED, UMA_DISPUTE_RISK_ENABLED, USER_RANKING_ENABLED, POSITION_ROLLUP_ENABLED) are enabled by the string "1" in the environment; the two agent flags (AGENT_WEBHOOKS_ENABLED, AGENT_CREDITS_ENABLED) by "true". This endpoint normalizes both to JSON booleans, so you never see the raw environment form — just true/false.

Fetch this once at startup and cache it. Treat a false flag as "this surface is intentionally off", not as a transient error — the two are indistinguishable from a bare 404/503 on the gated endpoint itself, which is exactly the ambiguity this endpoint removes.

On this page