/v1/data. A template turns a few parameters
(a chain, a token, a pool, a wallet, a date) into a complete Molpha source, so a common value
needs no hand-written source. Each template has its own route. A GET on it runs a round on the template’s source
and returns the threshold-signed value, paid with x402 or with your subscription.
This release runs on Solana devnet. The nodes that sign Molpha Data values read the chains listed by
GET /v1/data/chains, mainnets included (Ethereum, Base, Arbitrum, Solana, Starknet and others). A value read from a
mainnet is signed by the devnet node set: say so wherever you show it.How a template becomes a signed value
- Template and parameters. For example
token.supplywithchain=ethereumandtoken=0xa0b8…eb48(USDC). - Source. The gateway expands them into a source document. Facts the template needs from chain, such as a token’s decimals or a pool’s tokens, are read once by two nodes that must agree, and written into the source as constants. The gateway itself reads no chain and fetches no URL.
- Source ID.
sourceIdis the keccak256 of the source’s canonical bytes, as for any source. The same template, version and parameters give the same source, so the same feed, as long as the facts on chain do not change. - Round. The source goes to the gateway’s execute route,
POST /v1/x402/executeorPOST /v1/round/execute, exactly as if you had posted it yourself. The answer is the execute route’s own: a signed attestation you verify like any other.
token.supply@1, dex.pool.price@2), so the
sources of a version stay the same.
Routes
Base URL:https://gateway.molpha.io. GET /v1/info reports data: true when a gateway serves Molpha Data.
A template’s parameters are query parameters of the same names. The value route also takes
signaturesRequired
(default 3). The API reference has every route with its parameters.
Try it
The /source answer
/source and POST /v1/data/derive return:
Re-hash
canonical (or parse source with the SDK’s parseSource and compare idHex) before you trust
sourceId. <template>/dry-run adds dryRun: status (ok or failed), and per input whether it was read, the
block it was pinned to, the upstream’s HTTP status on a refusal, the decoded fields’ names and types, and on a
failure the stage and input it stopped at.
Chains and finality
Every chain template takeschain (an alias such as ethereum, or a CAIP-2 ID such as eip155:1) and
finality: final (the default), fast, or a raw mode (finalized, safe and confirmations:<n> on EVM and
Starknet, confirmed on Solana). Finality is part of the source, so final and fast reads of the same value are
two feeds. On this gateway the profiles resolve to:
GET /v1/data/chains is the authority: it lists the chains this gateway serves and the exact lag of each profile.
Templates over a web API (reference rates, Hyperliquid) take no chain or finality.
Limits
/source,/dry-run,POST /v1/data/deriveandPOST /v1/data/dry-runare limited per client address (429withRetry-After) and in total (503withRetry-After). A derived source is kept for 10 minutes per template and parameters, so repeating a request in that window does not read the facts again and, on the value route, does not count against the per-address limit.- The value route is a round: the gateway’s own admission and per-consumer limits apply (
429,503), and one consumer gets one round per feed per 100 ms tick (409). See Signed reads. - Discovery routes (
chains,catalog,openapi.json) are cacheable for 60 seconds.
Errors
Failures before a round use the Molpha Data error body:stage and input are added when a fact read or a dry-run stopped at a known point.
Once the round starts, errors are the execute routes’ own
{status, error} body.
Agents
For AI agents, the MCP server’s data tools are described in MCP tools.Not offered
- No unsigned value: a dry-run reports whether a source runs and what it read, never the value. A value comes from a signed round.
- No USD conversion: a DEX price names its quote token.
- Each template lists what it cannot do in its
caveats, and the terms of its publisher innotices. Carry the notices when you show or pass a value on.