GET /v1/data/<template>?<params> is a round. The gateway derives the template’s source (or reuses one it derived
in the last 10 minutes for the same parameters), then hands the request to its execute route exactly as if you had
posted that source yourself:
The execute route’s answer is passed on unchanged, with one added header,
Molpha-Source-Id, naming the derived
source. The gateway uses its current registry version.
Choose the quorum
signaturesRequired is the one query parameter that is not a template parameter. It defaults to 3.
- It must be a whole number from 1 to 255 (
400 PARAM_INVALIDotherwise). The round is then refused with400for a quorum below the protocol minimum of 3 or above the registry’s node count, and on a subscription with403above your plan’s maximum. - A tolerance-mode source needs at least 3.
- It is not part of the
sourceId, but it is part of the round, the x402 price and the signed message. On Solana a feed account is keyed bysourceId,signaturesRequiredand the submitter, so pick one quorum per feed.
Pay with x402
Without a session the first answer is the x402 quote:- The
402carries the x402 v2 requirements in thePAYMENT-REQUIREDheader (base64) and in the body: Solana devnet USDC, the amount,payTo(the protocol treasury),extra.feePayerandextra.memo. The memo commits to the source, the quorum and the registry version. - Sign a payment that matches the quote exactly, as x402 pay-per-request describes.
- Send the same
GETagain withPAYMENT-SIGNATURE: <base64 payment payload>. The gateway verifies the payment before it dispatches the round, and answers200with the attestation and aPAYMENT-RESPONSEsettlement receipt.
0.05 + 0.01 × (signaturesRequired + redundancy buffer) USDC on this deployment: 0.10 USDC at the
default quorum of 3. Always pay what the 402 quotes.
Pay with a subscription session
Sign in once with the wallet of the subscription owner or of one of its delegates (POST /v1/session/challenge, then POST /v1/session),
and send the token as a bearer token:
401 at no cost. See
Subscriptions.
Sign with RequestAuth
Template routes do not take RequestAuth, because a RequestAuth signature covers thesourceId, which you only learn
from /source. Take the source from /source and request the round like any other source. With the SDK:
authSig, authTimestamp, consumerAuthority,
subscriptionOwner, signaturesRequired, registryVersion) to POST /v1/round/execute.
The response
A200 is the execute routes’ AttestationResponse:
For a snapshot, check
keccak256(valuePreimage) == payload.value, then decode the preimage with the layout from
/source.
Verify it
A template’s attestation is an ordinary Molpha attestation: verify it on Solana, an EVM chain or Starknet as Verify and publish describes. The SDK’s verifier helpers take itsAttestation type, whose
signature fields are named differently from the wire. Map them like this:
payload.sourceId is the source you derived and
re-hashed, that signaturesRequired is the quorum you require, and that timestamp / 1000 is fresh enough for
you. A gateway response proves neither settlement nor on-chain verification.
Errors
The value route answers with the execute routes’{status, error} body once the round starts, and with the
Molpha Data error body for a failure before it.
There is no idempotency key: every retry that reaches the nodes is a new round that spends another quota unit or
needs another payment.