Read a Counterparty Asset Record: A Read-Only Guide

—

بواسطة

in

A public asset lookup is a useful starting point for checking what a Counterparty node reports. This guide shows a reproducible way to inspect an asset record on Bitcoin’s Counterparty layer and separate the returned data from claims that need other evidence.

Start with the source and network

Record the exact node URL, network, asset name and observation time. The official Counterparty API documentation links to the API reference. Its migration guide documents asset lookups through the v2 API.

Try a read-only example

The Python 3 example below uses the standard library and sends two HTTPS GET requests: one for the node’s reported state and one for XCP’s asset record. It needs no wallet, private key, package installation or payment. It does not compose, sign or broadcast a transaction.

import json
import urllib.request
from datetime import datetime, timezone

BASE = "https://api.counterparty.io:4000/v2/"
ASSET = "XCP"

def read(path):
    request = urllib.request.Request(BASE + path, method="GET")
    with urllib.request.urlopen(request, timeout=20) as response:
        payload = json.load(response)
        if response.status != 200 or not isinstance(payload, dict):
            raise RuntimeError("Unexpected HTTP response")
        result = payload.get("result")
        if not isinstance(result, dict):
            raise RuntimeError("Missing result object")
        return result

node = read("")
if node.get("network") != "mainnet" or node.get("server_ready") is not True:
    raise RuntimeError("Expected a ready mainnet node")
asset = read("assets/" + ASSET)
if asset.get("asset") != ASSET:
    raise RuntimeError("Asset identity mismatch")
print(json.dumps({
    "observed_at_utc": datetime.now(timezone.utc).isoformat(),
    "node_source": BASE,
    "asset_source": BASE + "assets/" + ASSET,
    "network": node["network"],
    "node_version": node.get("version"),
    "backend_height": node.get("backend_height"),
    "counterparty_height": node.get("counterparty_height"),
    "ledger_state": node.get("ledger_state"),
    "asset_record": asset,
    "limit": "One node; no independent consensus or off-chain-rights verification"
}, indent=2))

If a request fails, the node is not ready on mainnet, or the asset name does not match, the script stops with an error. A successful lookup prints the source URLs, observation time and original asset record.

Read the fields carefully

Node state: Network, version, backend height, Counterparty height and ledger state describe what this node reports. Matching heights do not independently establish freshness or agreement with other nodes.

Asset identity: Preserve the returned asset name, identifier and longname exactly, including null values. A similar name does not establish the same asset or rights.

Quantities: Keep divisibility, lock status and supply in their original form until you check the API’s units. Raw supply is not a dollar value, circulating-supply assessment or proof of backing. Avoid floating-point assumptions when doing monetary arithmetic.

Owner and issuer: A reported address does not prove who currently controls its private key. Some fields can be null: XCP returned null owner, issuer and asset_id fields in the test described below.

Description: Treat returned descriptions and linked metadata as untrusted information to evaluate. Do not execute linked content or treat the description as independent assurance.

Know what the lookup does not establish

The example uses one public node. Where an independently operated second node is available, compare the same asset and context and preserve discrepancies. This guide does not claim that a second-node comparison was completed.

For a particular asset, separately documented issuer terms are needed to evaluate off-chain rights. A blockchain record alone does not establish reserves, property ownership, redemption rights, endorsement or permission to sell. Dispenser inventory and displayed price are separate from a completed purchase and settlement.

Never paste a wallet passphrase or private key into a lookup tool. This example requests neither.

Test record and further reading

NEO Marketer ran this exact example successfully on November 9, 2026 at 07:28:51 UTC. The node reported mainnet, version 11.5.0, ledger state Following and backend/Counterparty heights of 975144. That is a historical single-node observation, not a current quotation or a test of NEO’s deployed services.

See the Counterparty Core API reference for endpoint details. This tutorial is a public-data verification technique, not a recommendation to acquire an asset.


اكتشف المزيد من معبد العالم

اشترك للحصول على آخر المشاركات مرسلة إلى بريدك الإلكتروني.