Get block

GET/v1/blocks/{hash}

TSCScan API v1.0.0 · Blocks · also at /api/v1/mainnet/blocks/{hash}

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

Example

curl 'https://api.tensorcash.org/v1/blocks/7dca3de9bf809694e1d53a17e2cb09ab547a272b29d14bf6927d7ef161789eab'

Parameters

NameInTypeRequiredDescription
hashpathstringYesExact 64-character hexadecimal canonical block hash.
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

BlockDetailResponse

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

BlockDetail

Weight is included only when an exact value has been indexed; it is never estimated from size.

FieldTypeRequiredDescription
heightintegerYesZero-based canonical block height.
hashstringYes64-character hexadecimal block hash.
timeintegerYesUnix timestamp in seconds; mempool items use Core arrival time and confirmed items use block time.
tx_countintegerYesNumber 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.
previous_hashstring | nullYesPrevious canonical block hash, or null for genesis.
size_bytesintegerYesSerialized block or transaction size in bytes.
weightinteger | null—Core block/transaction weight; null or omitted where the exact value is unavailable.
merkle_rootstring | null—64-character hexadecimal transaction Merkle root.
targetstring | null—Exact base target decoded from Core's compact bits.
adjusted_targetstring | null—Exact integer target decoded from the adjusted compact bits.
effective_targetstring | null—Exact priced target used for effective-difficulty calculation.
chainworkstring | null—Core's exact cumulative chain-work value as a hexadecimal string.
bitsstring | null—Core's base compact target bits as an exact hexadecimal string.
adjusted_bitsstring | null—Core model-adjusted compact difficulty bits, as an exact hexadecimal string.
base_difficultystring | null—Exact target-derived base difficulty before model adjustment and Proof pricing.
model_adjusted_difficultystring | null—Exact target-derived difficulty after model adjustment and before Proof pricing.
effective_difficultystring | null—Exact difficulty after model adjustment and Proof pricing.
nonceinteger | null—Core's exact block-header nonce representation.
versioninteger | null—Exact Core header/transaction version or indexed Proof version, according to the enclosing resource.
median_timeinteger | null—Core's median block time in Unix seconds.

KnownAmount

FieldTypeRequiredDescription
unitsstringYesExact decimal string in smallest units; signed where the schema permits. Divide by 10^precision only for display.
precisionintegerYesDecimal places for the smallest-unit amount. TSC uses 8; assets use their indexed precision.

UnknownAmount

FieldTypeRequiredDescription
state"unknown"YesAvailability or confirmation state. Use the declared enum/constant; unknown or unavailable never means numeric zero.
unitsnullYesExact decimal string in smallest units; signed where the schema permits. Divide by 10^precision only for display.
precisioninteger | nullYesDecimal places for the smallest-unit amount. TSC uses 8; assets use their indexed precision.

UnavailableAmount

FieldTypeRequiredDescription
state"unavailable"YesAvailability or confirmation state. Use the declared enum/constant; unknown or unavailable never means numeric zero.
unitsnullYesExact decimal string in smallest units; signed where the schema permits. Divide by 10^precision only for display.
precisioninteger | nullYesDecimal places for the smallest-unit amount. TSC uses 8; assets use their indexed precision.

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