跳到主要内容

Cardano

Cardano reads for wallets and apps, served on Blockfrost-compatible paths, so a client written for Blockfrost only changes its base URL. Every answer is agreed by three independent operators (Koios, Blockfrost, Demeter), and UTxOs and transactions are answered only once they are at least 30 blocks deep.

Endpoint​

https://mainnet.subfrost.io/v4/YOUR_API_KEY/cardano

The API key is a path segment, or an X-Subfrost-Api-Key header, which takes precedence (see Authentication). No Blockfrost project_id is needed.

Paths​

method and pathanswer
GET /blocks/latestthe tip block (height, hash, slot, epoch, epoch_slot, time)
GET /addresses/{address}/utxosthe address's UTxOs that are ≥ 30 blocks deep, as Blockfrost items, plus slot
GET /txs/{hash}a deep transaction: block, block_height, slot, block_time, fees, output_count
GET /txs/{hash}/utxosits outputs (address, amount, output_index, data_hash, inline_datum, reference_script_hash, consumed)
GET /epochs/latest/parametersprotocol parameters (Blockfrost field names), plus price_mem_ratio / price_step_ratio as exact fractions, deposits, cost models V1–V3
POST /tx/submityour signed transaction as CBOR (Content-Type: application/cbor) or hex; answers the transaction id

The address UTxO list is complete on page=1; later pages are empty.

curl https://mainnet.subfrost.io/v4/YOUR_API_KEY/cardano/addresses/addr1…/utxos

How an answer is agreed​

  • Every operator must answer, identically. Answers are compared on content: outputs, lovelace, assets, datum (hash or inline CBOR), reference script, creation slot and block. Inline datums are checked against their hash. One missing answer or one difference is an error, never a vote.
  • 30 blocks deep. "Deep" means created at or before the oldest tip any operator reports, minus 30 blocks (600 slots). Newer UTxOs are left out of address answers (X-Subfrost-Shallow-Utxos says how many), and a newer transaction answers quorumPending with its current depth.
  • Spent outputs. Demeter keeps only unspent outputs. A transaction whose outputs are already spent is confirmed by Koios and Blockfrost, and its answer says X-Subfrost-Quorum: 2/3.

Headers on every agreed answer:

headervalue
X-Subfrost-Quorum3/3 (or 2/3, above)
X-Subfrost-Quorum-Providerskoios,blockfrost,demeter
X-Subfrost-Depth-Blocks30
X-Subfrost-Tip-Slotthe oldest tip any operator reports
X-Subfrost-Deep-Slotthe depth cut (tip − 600 slots)

Errors​

Blockfrost-shaped: {"status_code": 503, "error": "quorumMissing", "message": "…"}.

errorHTTPwhat to do
quorumMissing, quorumRateLimited503retry (Retry-After)
quorumPending503not deep enough yet, or operators a block apart; retry
quorumDisagree500operators disagree; nothing is returned
Not Found404unknown to every operator
Bad Request400an address must be a mainnet addr1… with a valid checksum; a hash must be 64 lowercase hex characters