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
| Param | Type | Description |
|---|---|---|
| token | string | An asset slug or asset index (GET /api/v1/updown/assets). Default: every listed asset. |
| tf | string | Timeframe: numeric (0..4) or slug (5m, 15m, 1h, 4h, 24h). Default: every timeframe. Anything else: 400 bad_param with `allowed`. |
| Field | Type | Description |
|---|---|---|
| contract | string | |
| asOf | integer | Unix seconds: when the figures were computed (cached 60 s). |
| data | object[] | |
| data[].token | string | The asset slug. |
| data[].asset | integer | The asset index. |
| data[].tf | integer | 0..4 |
| data[].timeframe | string (5m | 15m | 1h | 4h | 24h) | |
| data[].main | string | |
| data[].settle | string | The settle asset (the unit of paidOut). |
| data[].pairDecimals | integer | |
| data[].pairSymbol | string | |
| data[].volumeUsdE18 | UsdE18 | null | USD x 1e18 of every bet placed, at bet time; null unless every bet is priced. |
| data[].usdSource | UsdSource | null | Where a USD value came from; null when the value is null. Details per pair asset in GET /api/v1/prices. |
| data[].usdCovered | integer | Bets with a USD value. |
| data[].bets | integer | Bets placed. |
| data[].volume24hUsdE18 | UsdE18 | null | The same over the last 24 hours. |
| data[].volume24hUsdSource | UsdSource | null | Where a USD value came from; null when the value is null. Details per pair asset in GET /api/v1/prices. |
| data[].usdCovered24h | integer | |
| data[].bets24h | integer | |
| data[].bettors | integer | Distinct wallets that bet (all time). |
| data[].rounds | integer | Indexed rounds, any outcome. |
| data[].roundsPlayed | integer | Rounds with at least one bet. |
| data[].bullWins | integer | Settled rounds Up won, with a winner. |
| data[].bearWins | integer | Settled rounds Down won, with a winner. |
| data[].noWinner | integer | Settled rounds nobody won (every bet refunded; the outcome stays bull or bear). |
| data[].canceled | integer | |
| data[].pending | integer | Rounds not settled in the index. |
| data[].paidOut | RawAmount | Every claim (wins and refunds), raw settle-asset units (pairDecimals). |
| data[].paidOutUsdE18 | UsdE18 | null | USD x 1e18 of the claims at claim time; null unless every claim is priced. |
| data[].paidOutUsdSource | UsdSource | null | Where a USD value came from; null when the value is null. Details per pair asset in GET /api/v1/prices. |
| data[].paidOutUsdCovered | integer | |
| data[].claims | integer | Claim 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