Docs Chain API TSCScan API Get chain statistics Get chain statistics GET /v1/stats/chain
TSCScan API v1.0.0 · Statistics · also at /api/v1/mainnet/stats/chain
Chain-dependent response; compact chain headers identify the serving snapshot.
Example curl 'https://api.tensorcash.org/v1/stats/chain'Parameters Name In Type Required Description min_heightquery integer— Optional minimum serving indexed height. Returns DATA_NOT_READY if no eligible source has reached it.
Responses Status Description Body 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 ChainStatisticsResponseField Type Required Description dataChainStatistics Yes The requested resource or collection; its schema is specific to this endpoint.
ChainStatisticsSnapshot counters maintained during canonical block commits and reversals. Indexed supply is the sum of indexed address balances in 8-decimal base units.
Field Type Required Description block_countintegerYes Number of blocks represented by this resource or group. transaction_countintegerYes Exact number of confirmed transactions/activities represented by this resource; pending activity is excluded unless explicitly stated. funded_addressesintegerYes Exact number of indexed addresses with a positive confirmed balance. indexed_supplyIndexedSupply Yes Exact sum of indexed address balances in TSC smallest units; not a fiat value or an estimate of unassigned outputs. latest_blockBlockSummary Yes Compact facts about the canonical block at this snapshot's watermark.
IndexedSupplyExact sum of indexed address balances in TSC base units; not an estimate of unassigned outputs.
Field Type Required Description unitsstringYes Exact decimal string in smallest units; signed where the schema permits. Divide by 10^precision only for display. precision8Yes Decimal places for the smallest-unit amount. TSC uses 8; assets use their indexed precision.
BlockSummaryMiner fields are present when supported by the Indexer; unknown means no addressed coinbase payout.
Field Type Required Description heightintegerYes Zero-based canonical block height. hashstringYes 64-character hexadecimal block hash. timeintegerYes Unix timestamp in seconds; mempool items use Core arrival time and confirmed items use block time. tx_countintegerYes Number of transactions in this canonical block, including coinbase. miner_addressstring | null— Address of the attributed coinbase payout, or null when unattributed. miner_rewardAmount — Exact attributed coinbase payout in TSC smallest units.
AmountExact smallest-unit decimal. Known zero is units '0'.
Type: KnownAmount | UnknownAmount | UnavailableAmount
KnownAmountField Type Required Description unitsstringYes Exact decimal string in smallest units; signed where the schema permits. Divide by 10^precision only for display. precisionintegerYes Decimal places for the smallest-unit amount. TSC uses 8; assets use their indexed precision.
UnknownAmountField Type Required Description state"unknown"Yes Availability or confirmation state. Use the declared enum/constant; unknown or unavailable never means numeric zero. unitsnullYes Exact decimal string in smallest units; signed where the schema permits. Divide by 10^precision only for display. precisioninteger | nullYes Decimal places for the smallest-unit amount. TSC uses 8; assets use their indexed precision.
UnavailableAmountField Type Required Description state"unavailable"Yes Availability or confirmation state. Use the declared enum/constant; unknown or unavailable never means numeric zero. unitsnullYes Exact decimal string in smallest units; signed where the schema permits. Divide by 10^precision only for display. precisioninteger | nullYes Decimal places for the smallest-unit amount. TSC uses 8; assets use their indexed precision.
ProblemField Type Required Description typestringYes Problem type URI; about:blank is used for the current error family. titlestringYes Short human-readable problem title, normally the stable error code. statusintegerYes HTTP 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"Yes Stable machine-readable error code; use this instead of matching message text. request_idstringYes Identifier 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