Explorer API v2
Minter Explorer Rust API v2 reference: response wrapper, strict query validation (405, 400 invalid_query, 409 ambiguous_hash), cursor pagination, and SHA-256 PNG assets.
Minter Explorer Rust API v2 (/api/v2/..., specification /openapi/minter-explorer-v2.yaml) serves full genesis history from PostgreSQL 18 and daily reward and trading aggregates from ClickHouse. Every JSON endpoint returns the response wrapper { chain_id, base_coin_symbol, source_context, coverage, data }.
Strict query validation and error codes
explorer-dev-api validates the HTTP method and every query parameter before querying storage:
| HTTP status | Error code | Condition |
|---|---|---|
405 Method Not Allowed | method_not_allowed | Any HTTP verb other than GET |
400 Bad Request | invalid_query | Unknown query key for the target route (such as cursor or limit on /addresses/{address}/rewards/chart, all on /coins/cross-chain, or period on /home-statistics) |
400 Bad Request | duplicate_query | Repeated query key (?limit=10&limit=20) |
400 Bad Request | invalid_hash | GET /api/v2/blocks/{height}/validators called without a non-empty block hash |
400 Bad Request | invalid_tab | GET /api/v2/validators/{public_key}/activity called without required tab (transactions | stakes | penalties) |
409 Conflict | ambiguous_hash | GET /api/v2/transactions/{hash} matches multiple records across source namespaces or invalid_transactions without disambiguating parameters |
Route-specific rules:
- Wallet limit orders use singular
GET /api/v2/address/{address}/orders, whereas wallet profile endpoints use plural/api/v2/addresses/{address}. - The
allparameter exists solely onGET /api/v2/coinsandGET /api/v2/pools(do not passallto/api/v2/coins/cross-chainor/api/v2/coins/{id}). GET /api/v2/validatorsenforceslimit <= 50.- Optional
standandsourceparameters select a specific stand or archive namespace (such as?source=legacy-business-full-20261031).
Resolving 409 ambiguous_hash and cursor pagination
When GET /api/v2/transactions/{hash} returns 409 ambiguous_hash, the body includes choices[] and an optional choices_cursor. Re-request the desired record by passing its namespace, relation (transactions or invalid_transactions), and id to GET /api/v2/transactions/{hash}?namespace=...&relation=...&id=....
Global feeds (/api/v2/blocks, /api/v2/transactions) paginate via page and limit (1..100), whereas deep feeds on /api/v2/addresses/{address}, /api/v2/pools/{id}/trades, and /api/v2/addresses/{address}/rewards/history paginate via opaque cursor tokens (/api/v2/addresses/{address} also exposes section cursors failed_cursor, frozen_cursor, balance_cursor, positions_cursor, unbond_cursor, move_cursor, legacy_move_cursor, waitlist_cursor).
Verified PNG assets (/api/v2/assets/{digest}.png)
Explorer clears raw external icon URLs (icon_url: null) in JSON responses. Verified PNG icons (<= 1 MiB, \x89PNG\r\n\x1a\n + IHDR headers) are content-addressed by lowercase 64-hex SHA-256 digest (^[0-9a-f]{64}$):
- Rust backend route:
GET /api/v2/assets/{digest}.png; - Next.js SSR proxy route referenced by
icon.src:GET /api/assets/{digest}(servesimage/pngwithCache-Control: public, max-age=31536000, immutableandX-Content-Type-Options: nosniff).
Explorer API v2 playground
Cached (2.5s TTL) network dashboard metrics including latest height, total transactions, BIP market/pool price with ±5% depeg guard, TPS, emission, and daily successful transaction counts.
curl -sS "https://api-v2.minter.network/api/v2/home-statistics" \
-H "Accept: application/json"{
"type": "object",
"required": [
"data"
],
"properties": {
"chain_id": {
"type": [
"string",
"null"
]
},
"base_coin_symbol": {
"type": [
"string",
"null"
]
},
"source_context": {
"type": "object",
"properties": {
"stand_id": {
"type": "string"
},
"profile_digest": {
"type": "string"
},
"origin_kind": {
"type": "string",
"enum": [
"native",
"legacy"
]
},
"source_namespace": {
"type": "string"
},
"chain_id": {
"type": [
"string",
"null"
]
},
"source_ref": {
"type": [
"string",
"null"
]
}
}
},
"coverage": {
"type": "object"
},
"data": {
"type": "object"
}
}
}Request examples
const EXPLORER_API =
process.env.MINTER_EXPLORER_API_URL ?? "https://api-v2.minter.network/api/v2";
// 1. Fetch an address profile page using cursor pagination
export async function fetchAddressPage(address: string, cursor?: string) {
const params = new URLSearchParams({ limit: "25" });
if (cursor) params.set("cursor", cursor);
const res = await fetch(
`${EXPLORER_API}/addresses/${encodeURIComponent(address)}?${params}`,
);
if (!res.ok) {
throw new Error(`Explorer HTTP ${res.status}`);
}
return (await res.json()) as {
chain_id: string;
base_coin_symbol: string | null;
source_context: Record<string, unknown>;
coverage: Record<string, unknown>;
data: Record<string, unknown>;
};
}
// 2. Fetch a transaction by Mt... hash and resolve 409 ambiguous_hash
export async function fetchTransactionByHash(hash: string) {
const res = await fetch(`${EXPLORER_API}/transactions/${encodeURIComponent(hash)}`);
if (res.status === 409) {
const conflict = (await res.json()) as {
choices: Array<{ source: { namespace: string; relation: string; id: string } }>;
};
const primary = conflict.choices[0]?.source;
if (!primary) throw new Error("Empty choices in 409 ambiguous_hash");
const qs = new URLSearchParams({
namespace: primary.namespace,
relation: primary.relation,
id: primary.id,
});
const resolved = await fetch(
`${EXPLORER_API}/transactions/${encodeURIComponent(hash)}?${qs}`,
);
return resolved.json();
}
if (!res.ok) throw new Error(`Explorer HTTP ${res.status}`);
return res.json();
}