Read important blockchain data from the explorer.
The Quantum Mainnet explorer provides a public, Blockscout-compatible REST API. Use it to search indexed blocks, transactions, addresses, tokens, contracts, transfers, and logs without operating an indexer.
Use REST v2 on Quantum Mainnet.
https://qntmscan.iohttps://qntmscan.io/api/v2https://qntmscan.io/api-docsPublic read requests use HTTP GET and return JSON. The basic endpoints do not require an API key. Set a deadline, require a successful HTTP status, and parse the body as untrusted input.
20803. The lightweight Sandbox explorer at explorer.sandbox.qustody.io does not currently expose Blockscout REST v2. Use the JSON-RPC reference for programmatic Sandbox data.Get network, block, transaction, and address data.
These examples require curl and jq. They select current objects, so they remain copyable as the chain advances.
Network statistics
EXPLORER_API="https://qntmscan.io/api/v2"
curl --fail-with-body --max-time 20 "$EXPLORER_API/stats" | jq '{
total_blocks,
total_transactions,
total_addresses,
average_block_time,
network_utilization_percentage,
gas_prices
}'Latest indexed block
EXPLORER_API="https://qntmscan.io/api/v2"
LATEST_BLOCK="$(curl --fail-with-body --max-time 20 "$EXPLORER_API/blocks" |
jq -r '.items[0].height')"
curl --fail-with-body --max-time 20 \
"$EXPLORER_API/blocks/$LATEST_BLOCK" | jq '{
height, hash, timestamp, transactions_count,
gas_used, gas_limit, miner: .miner.hash
}'Latest indexed transaction
EXPLORER_API="https://qntmscan.io/api/v2"
TX_HASH="$(curl --fail-with-body --max-time 20 "$EXPLORER_API/transactions" |
jq -r '.items[0].hash')"
curl --fail-with-body --max-time 20 \
"$EXPLORER_API/transactions/$TX_HASH" | jq '{
hash,
status,
result,
block_number,
timestamp,
from: .from.hash,
to: (.to.hash // null),
value,
fee: .fee.value,
gas_used,
nonce,
raw_input
}'status is normally ok or error for an indexed transaction. A null to can mean contract creation. Keep value, fees, gas values, and other large quantities as strings until converting them with an arbitrary-precision integer or decimal type.
Address balance and activity
EXPLORER_API="https://qntmscan.io/api/v2"
ADDRESS="$(curl --fail-with-body --max-time 20 "$EXPLORER_API/transactions" |
jq -r '.items[0].from.hash')"
curl --fail-with-body --max-time 20 \
"$EXPLORER_API/addresses/$ADDRESS" | jq '{
hash,
coin_balance,
is_contract,
is_verified,
has_tokens,
has_token_transfers
}'
curl --fail-with-body --max-time 20 \
"$EXPLORER_API/addresses/$ADDRESS/transactions" |
jq '.items[] | {hash, status, block_number, timestamp, value}'Choose the resource you need.
| Request | Use it for |
|---|---|
GET /stats | Network totals, block time, utilization, and gas-price estimates |
GET /blocks | Paginated recent blocks |
GET /blocks/{height_or_hash} | One block and its gas, miner, fee, size, and timestamp fields |
GET /blocks/{height_or_hash}/transactions | Transactions included in one block |
GET /transactions | Paginated recent transactions |
GET /transactions/{hash} | Status, block, participants, value, fees, gas, calldata, and decoded input |
GET /transactions/{hash}/logs | Event logs emitted by one transaction |
GET /transactions/{hash}/token-transfers | Token movements produced by one transaction |
GET /transactions/{hash}/internal-transactions | Indexed internal execution calls |
GET /addresses/{address} | Native balance and account or contract metadata |
GET /addresses/{address}/transactions | Transactions involving one address |
GET /addresses/{address}/token-transfers | Token-transfer history for one address |
GET /addresses/{address}/tokens | Indexed token holdings for one address |
GET /tokens | Paginated token catalog |
GET /tokens/{token_address} | Token metadata, decimals, supply, and holder count |
GET /tokens/{token_address}/holders | Paginated token holders |
GET /tokens/{token_address}/transfers | Paginated transfers for a token contract |
GET /smart-contracts/{address} | Contract bytecode and available verification metadata |
GET /search?q={query} | Search for an address, transaction, block, or token |
Use the explorer's interactive API reference for optional filters and the complete live schema. The interface follows Blockscout REST API conventions, with Quantum-specific deployment behavior controlled by Quantum Chain.
Read the fields without losing precision.
| Field | Meaning | Handling rule |
|---|---|---|
timestamp | UTC time in ISO 8601 format | Parse as timezone-aware UTC, not local time |
value, coin_balance | Native value in the smallest 18-decimal unit | Keep as a string or arbitrary-precision integer |
fee.value | Actual or maximum transaction fee in the smallest unit | Inspect fee.type before interpreting it |
status, result | Indexed transaction execution outcome | Require success for completed application operations |
block_number, confirmations | Inclusion height and current indexed depth | Do not treat an explorer count as immutable finality |
from.hash, to.hash | Sender and recipient addresses | to may be null for contract creation |
raw_input | Transaction calldata | Keep as hexadecimal bytes; do not assume UTF-8 text |
decoded_input | Best-effort ABI decoding | May be null when contract metadata is unavailable |
items | One page of list results | Never assume the first page is the complete history |
next_page_params | Opaque cursor fields for the next page | Forward every returned field unchanged |
Convert amounts and timestamps in Python
from datetime import datetime
from decimal import Decimal
def atomic_to_quantum(value: str) -> Decimal:
return Decimal(value) / Decimal(10**18)
def parse_explorer_time(value: str) -> datetime:
return datetime.fromisoformat(value.replace("Z", "+00:00"))A token can use a different decimal count. Read decimals from GET /tokens/{token_address} before formatting a token balance.
Forward the cursor returned by the API.
List responses contain items and either an object or null in next_page_params. Cursor fields vary by endpoint. Do not invent page numbers and do not keep only one cursor field.
EXPLORER_API="https://qntmscan.io/api/v2"
FIRST_PAGE="$(curl --fail-with-body --max-time 20 "$EXPLORER_API/blocks")"
echo "$FIRST_PAGE" | jq '.items[] | {height, hash, timestamp}'
NEXT_QUERY="$(echo "$FIRST_PAGE" | jq -r '
.next_page_params
| to_entries
| map("\(.key)=\(.value | tostring | @uri)")
| join("&")
')"
if [ -n "$NEXT_QUERY" ]; then
curl --fail-with-body --max-time 20 \
"$EXPLORER_API/blocks?$NEXT_QUERY" |
jq '.items[] | {height, hash, timestamp}'
fiStop when next_page_params is null. Bound the number of pages and records for interactive requests and background jobs.
Read and paginate with the Python standard library.
import json
from urllib.parse import urlencode
from urllib.request import Request, urlopen
BASE_URL = "https://qntmscan.io/api/v2"
def get_json(path, params=None):
query = urlencode(params or {})
url = f"{BASE_URL}{path}" + (f"?{query}" if query else "")
request = Request(url, headers={"accept": "application/json"})
with urlopen(request, timeout=20) as response:
if response.status != 200:
raise RuntimeError(f"explorer returned HTTP {response.status}")
return json.loads(response.read())
def iter_items(path, max_pages=10):
cursor = None
for _ in range(max_pages):
page = get_json(path, cursor)
yield from page["items"]
cursor = page.get("next_page_params")
if not cursor:
return
stats = get_json("/stats")
print("indexed blocks", stats["total_blocks"])
print("indexed transactions", stats["total_transactions"])
for block in iter_items("/blocks", max_pages=2):
print(block["height"], block["hash"], block["timestamp"])For production, add bounded retries for safe GET requests, backoff with jitter, response-size limits, metrics, and schema validation. Never retry indefinitely.
Explorer data is indexed and eventually consistent.
- A newly mined transaction can appear in JSON-RPC before it appears in explorer search results.
- Use JSON-RPC for nonce selection, gas estimation, transaction submission, receipt polling, and execution-critical state.
- Use the explorer API for search, reporting, history, token discovery, contract metadata, and user-facing activity lists.
- Handle
404as not found,422as invalid input,429as rate limited, and5xxas a temporary server failure. - Honor
Retry-Afterand rate-limit headers when present. Limits can change without an SDK release. - URL-encode search text and cursor values. Validate returned hashes and addresses before using them elsewhere.
- Cache immutable block and confirmed transaction details, but keep confirmation counts and current balances fresh.