API reference

API reference · Public

The sealed days, newest first

GET/api/receipts/commitmentsNo key

Each sealed UTC day's root, the header it is the hash of, the margin its totals imply and where it was published. Read from the commitments only. `committing` says whether this deployment is sealing days now. Public, 60 requests a minute per address.

Parameters

Path and query parameters
FieldTypeWhat it is
limit (query)integerHow many days. Default 30. From 1 to 366.

Answer 200

The sealed days.

Fields of the 200 answer
FieldTypeWhat it is
objectstringOne of "list".
committingboolean
dataarray of object
data[].objectstringOne of "receipt_commitment".
data[].versioninteger
data[].daystring
data[].rootstring
data[].headerobjectThe day header. The day's root is SHA-256 of the byte 0x02 followed by the UTF-8 of the JSON array ["am-day-v1", day, usage_root, usage_count, ledger_root, ledger_count, billed_micros, upstream_micros, unmeasured_count].
data[].header.daystringThe UTC day.
data[].header.usage_rootstring
data[].header.usage_countinteger
data[].header.ledger_rootstring
data[].header.ledger_countinteger
data[].header.billed_microsintegerWhat the meter billed that day, micro USD.
data[].header.upstream_microsintegerWhat the upstreams charged, micro USD; a usage row nobody measured counts at its billed figure.
data[].header.unmeasured_countintegerUsage rows with no measured upstream cost.
data[].margin_microsintegerBilled minus upstream.
data[].implied_markup_bpsinteger or nullThe margin over the upstream cost, basis points; null when nothing was measured.
data[].committed_atinteger
data[].publicationobject or nullWhere the root was published: a transaction from the operator's signer to itself whose calldata is the UTF-8 text `antimatter receipts v1 <day> <root>`. Null while it is not on chain, which is always the case where the operator has not switched publishing on.

Errors

  • 429OpenAI shaped error.

Every error answers in one shape, with its type, code and the field it names. The whole list is in the docs' Errors section.

Antimatter