Up/Down

Stats per Asset & Timeframe

Up/Down activity per asset and timeframe from the stored rounds, bets and claims: volume (all time and 24 h, USD at bet time), bettors, rounds played and how they ended, and what was paid out. Cached 60 seconds.

Rendered from /openapi.json. Amounts are raw decimal strings in the units of the asset named beside them; USD values are USD × 1e18, null when unknown, with a usdSource. Quotes are hints: the contract is the final check.

GET
/api/v1/updown/stats
Up/Down stats. Activity per asset x timeframe from the stored rows (UpDownBet, UpDownRound, UpDownClaim), cached 60 s. One row per pair asked, zeros when nothing was bet. Volumes are the USD of the bets at bet time (the gross input, fee included), null unless every bet is priced; a source is named only when all priced bets share one. bullWins / bearWins count settled rounds with a winner on that side; noWinner counts settled rounds nobody won (every bet refunded); paidOut sums every claim (wins and refunds). A round closed on chain but not synced yet counts as pending.
Auth: API Key
ParamTypeDescription
tokenstringAn asset slug or asset index (GET /api/v1/updown/assets). Default: every listed asset.
tfstringTimeframe: numeric (0..4) or slug (5m, 15m, 1h, 4h, 24h). Default: every timeframe. Anything else: 400 bad_param with `allowed`.
FieldTypeDescription
contractstring
asOfintegerUnix seconds: when the figures were computed (cached 60 s).
dataobject[]
data[].tokenstringThe asset slug.
data[].assetintegerThe asset index.
data[].tfinteger0..4
data[].timeframestring (5m | 15m | 1h | 4h | 24h)
data[].mainstring
data[].settlestringThe settle asset (the unit of paidOut).
data[].pairDecimalsinteger
data[].pairSymbolstring
data[].volumeUsdE18UsdE18 | nullUSD x 1e18 of every bet placed, at bet time; null unless every bet is priced.
data[].usdSourceUsdSource | nullWhere a USD value came from; null when the value is null. Details per pair asset in GET /api/v1/prices.
data[].usdCoveredintegerBets with a USD value.
data[].betsintegerBets placed.
data[].volume24hUsdE18UsdE18 | nullThe same over the last 24 hours.
data[].volume24hUsdSourceUsdSource | nullWhere a USD value came from; null when the value is null. Details per pair asset in GET /api/v1/prices.
data[].usdCovered24hinteger
data[].bets24hinteger
data[].bettorsintegerDistinct wallets that bet (all time).
data[].roundsintegerIndexed rounds, any outcome.
data[].roundsPlayedintegerRounds with at least one bet.
data[].bullWinsintegerSettled rounds Up won, with a winner.
data[].bearWinsintegerSettled rounds Down won, with a winner.
data[].noWinnerintegerSettled rounds nobody won (every bet refunded; the outcome stays bull or bear).
data[].canceledinteger
data[].pendingintegerRounds not settled in the index.
data[].paidOutRawAmountEvery claim (wins and refunds), raw settle-asset units (pairDecimals).
data[].paidOutUsdE18UsdE18 | nullUSD x 1e18 of the claims at claim time; null unless every claim is priced.
data[].paidOutUsdSourceUsdSource | nullWhere a USD value came from; null when the value is null. Details per pair asset in GET /api/v1/prices.
data[].paidOutUsdCoveredinteger
data[].claimsintegerClaim events (a claim can be partial).
200 Stats400 Invalid token or tf (bad_param)401 Missing or invalid API key404 not_found: asset not listed on chain yet, or asset index not configured.409 asset_mismatch: the configured asset index does not match the chain.429 Rate limit exceeded502 A database or chain read failed (code db_failed or rpc_failed)503 Not deployed on this network