Get exact fixed-window mining statistics

GET/v1/stats/mining

TSCScan API v1.0.0 · Statistics · also at /api/v1/mainnet/stats/mining

Chain-dependent response; compact chain headers identify the serving snapshot.

Example

curl 'https://api.tensorcash.org/v1/stats/mining'

Parameters

NameInTypeRequiredDescription
min_heightqueryinteger—Optional minimum serving indexed height. Returns DATA_NOT_READY if no eligible source has reached it.

Responses

StatusDescriptionBody
200Successful read from one Indexer snapshot
400Invalid argument or page conditions
401Authentication required
403Permission denied
404Absent in a ready indexed range
409Verified chain continuity invalidation
422Bounded response would exceed byte budget
429Quota exceeded; Retry-After supplied
503Data or eligible source not ready
504Bounded upstream query timed out

Schemas

MiningStatisticsResponse

FieldTypeRequiredDescription
dataMiningStatisticsYesThe requested resource or collection; its schema is specific to this endpoint.

MiningStatistics

Fixed current and prior 50-block and recent 24-hour work-rate windows for existing Home metrics. No arbitrary interval or chart series.

FieldTypeRequiredDescription
current_50MiningWindow50YesExact current 50-block work-rate window, shortened only near genesis.
previous_50MiningWindow50 | nullYes50-block comparison window ending near the prior 24-hour boundary; null without a usable boundary.
recent_24hMiningWindowYesExact work and block totals over the recent 86400-second window.
tip_effective_workstring | nullYesExact effective work of the watermark block, or null when unavailable.
average_interval_seconds_50string | nullYesMean observed block interval in seconds for the recent 50-block window; null means unavailable. The current_50.blocks field gives the interval sample count. Finite ratios are exact; only repeating decimals are rounded half away from zero to 12 places.

MiningWindow50

At most 50 measured block intervals ending at the selected fixed-window tip.

FieldTypeRequiredDescription
blocksintegerYesNumber of blocks, or block-module availability/coverage, as specified by the enclosing schema.
observed_secondsintegerYesObserved timestamp span used as the work-rate denominator; zero cannot produce a valid rate.
work_completebooleanYesWhether every block needed for this work calculation has exact indexed work.
rateMiningRate | nullYesEffective work per observed second as a decimal string; null means incomplete work or zero elapsed seconds. Finite ratios are exact; only repeating decimals are rounded half away from zero to 12 places.

MiningRate

Readable decimal string. Finite ratios retain all digits; only repeating decimals are rounded half away from zero to 12 places. Trailing zeroes are omitted. No floating-point intermediate is used.

Type: string

MiningWindow

Null rate means work is incomplete or the observed span is zero.

FieldTypeRequiredDescription
blocksintegerYesNumber of blocks, or block-module availability/coverage, as specified by the enclosing schema.
observed_secondsintegerYesObserved timestamp span used as the work-rate denominator; zero cannot produce a valid rate.
work_completebooleanYesWhether every block needed for this work calculation has exact indexed work.
rateMiningRate | nullYesEffective work per observed second as a decimal string; null means incomplete work or zero elapsed seconds. Finite ratios are exact; only repeating decimals are rounded half away from zero to 12 places.

Problem

FieldTypeRequiredDescription
typestringYesProblem type URI; about:blank is used for the current error family.
titlestringYesShort human-readable problem title, normally the stable error code.
statusintegerYesHTTP status code for this problem response.
code"INVALID_ARGUMENT" | "UNAUTHORIZED" | "FORBIDDEN" | "RESOURCE_NOT_FOUND" | "CHAIN_ANCHOR_INVALIDATED" | "RATE_LIMITED" | "DATA_NOT_READY" | "SERVICE_UNAVAILABLE" | "UPSTREAM_TIMEOUT" | "RESPONSE_TOO_LARGE" | "CORE_UNAVAILABLE" | "CORE_METHOD_UNAVAILABLE" | "CORE_DATA_NOT_READY" | "CORE_CAPACITY" | "TRANSACTION_CAPACITY" | "TRANSACTION_STATE_CHANGED" | "TRANSACTION_REJECTED" | "BROADCAST_OUTCOME_UNKNOWN" | "UNSUPPORTED_ASSET_POLICY"YesStable machine-readable error code; use this instead of matching message text.
request_idstringYesIdentifier also supplied in X-Request-ID; include it when reporting an error.
detailstring—Human-readable explanation of the error.
retry_after_secondsinteger—Suggested wait in seconds before retrying; where present, agrees with Retry-After.
Source
TSCScan public API v1.0.0 (12f98c5) · rHuhu · MIT