> ## 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.

# Build a provider source for a symbol

> The source the provider's own template gives one operation for one symbol, with its
sourceId: what a caller sends to request that symbol. Feeds are built the same way, so
a feed's symbol asked for by name gets the feed's sourceId. Only operations with a
template answer; the others are 404. Static: no chain, node or provider calls.

Returns the source that the provider's own template gives one operation for one symbol, with its `sourceId`: what you send to an execute route to request that symbol. The provider's feeds are built by the same template, so asking for a feed's symbol by name gives the feed's `sourceId`.

Only operations with a template answer; others are `404`, and a symbol the template does not accept is `400`. It is static: no chain, node or provider call.


## OpenAPI

````yaml gateway-openapi.yaml GET /v1/providers/{providerId}/source
openapi: 3.1.0
info:
  contact: {}
  description: >-
    HTTP entry point to the Molpha oracle protocol. The gateway dispatches
    oracle rounds to nodes over libp2p, waits for threshold Schnorr signatures
    delivered directly by the nodes, and returns signed payloads. The x402
    endpoints (`/v1/x402/*`) are always served and require a configured trusted
    facilitator.
  title: Molpha Gateway API
  version: '1.0'
  x-mint:
    metadata:
      description: >-
        Run oracle rounds, sign in, preview sources and read the node set of a
        Molpha gateway.
servers:
  - url: https://gateway.molpha.io
    description: Devnet
security: []
tags:
  - name: health
    description: Liveness
  - name: gateway
    description: Gateway identity, program and authentication settings
  - name: nodes
    description: The on-chain node set
  - name: providers
    description: Integrated data providers
  - name: round
    description: Subscription and delegate rounds
  - name: session
    description: Sign-in sessions (served when `GET /v1/info` reports `sessionAuth` true)
  - name: source
    description: Unsigned source preview and simulation
  - name: x402
    description: x402 pay-per-request rounds
paths:
  /v1/providers/{providerId}/source:
    get:
      tags:
        - providers
      summary: Build a provider source for a symbol
      description: >-
        The source the provider's own template gives one operation for one
        symbol, with its

        sourceId: what a caller sends to request that symbol. Feeds are built
        the same way, so

        a feed's symbol asked for by name gets the feed's sourceId. Only
        operations with a

        template answer; the others are 404. Static: no chain, node or provider
        calls.
      parameters:
        - description: Provider ID
          example: tickerlayer
          in: path
          name: providerId
          required: true
          schema:
            type: string
        - description: Operation ID
          example: crypto.trade_last
          in: query
          name: operation
          required: true
          schema:
            type: string
        - description: Symbol
          example: BTCUSD
          in: query
          name: symbol
          required: true
          schema:
            type: string
        - description: Flow kind; the first served flow when empty
          in: query
          name: flow
          schema:
            enum:
              - api_key
              - x402
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProviderSourceResponse'
        '400':
          description: >-
            Missing operation or symbol, or a symbol the template does not
            accept
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: >-
            Unknown provider or operation, no template for it, or no served flow
            of that kind
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ProviderSourceResponse:
      properties:
        data:
          $ref: '#/components/schemas/ProviderSource'
        status:
          example: ok
          type: string
      type: object
    ErrorResponse:
      properties:
        error:
          example: validation failed
          type: string
      type: object
    ProviderSource:
      properties:
        flow:
          enum:
            - api_key
            - x402
          example: api_key
          type: string
        operation:
          example: crypto.trade_last
          type: string
        provider:
          example: tickerlayer
          type: string
        source:
          description: 'Source is the source document, in canonical form: send it as given.'
          type: object
        sourceId:
          description: >-
            SourceID is the keccak256 of the canonical source, hex without 0x,
            as feeds report it.
          type: string
        symbol:
          example: BTCUSD
          type: string
      type: object

````

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