> ## Documentation Index
> Fetch the complete documentation index at: https://docs.molpha.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Template API document

> An OpenAPI 3.1 document with one operation per template this gateway serves: `GET /v1/data/<id with dots as slashes>` for the signed value, and its `/source` and `/dry-run` routes. Each operation's query parameters are the template's own (types, enums, defaults, an example). Generated from the catalog and the gateway's enabled chains, so it lists exactly what this gateway serves.



## OpenAPI

````yaml data-openapi.json GET /v1/data/openapi.json
openapi: 3.1.0
info:
  description: >-
    Every Molpha Data template has its own routes on the gateway. `GET
    /v1/data/<template>` (the template ID with each dot a slash, e.g.
    `token.supply` is `/v1/data/token/supply`) returns the threshold-signed
    value: the template's parameters are query parameters, the gateway derives
    the source and runs a round on it. Pay with a sign-in session
    (`Authorization: Bearer`, one unit of your plan's quota) or with x402:
    without a session the first answer is `402` with the quote in
    `PAYMENT-REQUIRED`; send the same request again with `PAYMENT-SIGNATURE`.
    The value's answer is the execute routes' own (`AttestationResponse`, errors
    as `{status, error}`); failures before the round (a wrong parameter, an
    unknown chain) use the data error body. `/source` and `/dry-run` under each
    template are free and rate-limited per address. To sign with RequestAuth
    instead of a session, take the source from `/source` and post it to `POST
    /v1/round/execute`.
  title: Molpha Data
  version: '1'
servers:
  - url: https://gateway.molpha.io
    description: Molpha gateway (Solana devnet release)
security: []
tags:
  - name: Catalog and sources
  - name: Wallet
  - name: Chain
  - name: DEX
  - name: Derived
  - name: Reference data
  - name: Yield
  - name: Raw state
  - name: Lending
  - name: Oracle
  - name: Perps
  - name: Position
  - name: Token
paths:
  /v1/data/openapi.json:
    get:
      tags:
        - Catalog and sources
      summary: Molpha Data template API
      description: >-
        An OpenAPI 3.1 document with one operation per template this gateway
        serves: `GET /v1/data/<id with dots as slashes>` for the signed value,
        and its `/source` and `/dry-run` routes. Each operation's query
        parameters are the template's own (types, enums, defaults, an example).
        Generated from the catalog and the gateway's enabled chains, so it lists
        exactly what this gateway serves.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
      security: []

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.