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

# Execute a subscription round

> Subscription-backed signing round for feed owners and delegates.



## OpenAPI

````yaml gateway-openapi.yaml POST /v1/round/execute
openapi: 3.1.0
info:
  contact: {}
  description: HTTP entry point to the Molpha oracle protocol.
  title: Molpha Gateway API
  version: '1.0'
  x-mint:
    metadata:
      description: >-
        Dispatch oracle rounds, collect threshold signatures, and return
        payloads for Solana, EVM, and Starknet verification.
servers:
  - url: https://dev-gateway.molpha.io
    description: Devnet (SDK default)
security: []
tags:
  - name: health
    x-group: Health
    description: Liveness probes
  - name: nodes
    x-group: Nodes
    description: Oracle node discovery
  - name: round
    x-group: Subscription rounds
    description: Subscription and delegate execute path
  - name: agent
    x-group: Agent (x402)
    description: Pay-per-request agent path (requires `agent.enabled`)
paths:
  /v1/round/execute:
    post:
      tags:
        - round
      summary: Execute a subscription round
      description: Subscription-backed signing round for feed owners and delegates.
      requestBody:
        required: true
        description: Round execution request
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExecuteRequest'
            example:
              subscriptionOwner: 7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU
              consumerAuthority: 7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU
              signaturesRequired: 3
              timestamp: 1700100000
              registryVersion: 42
              authSig: >-
                5VERv8NMvzbJMEkV8xnrLkEaWRtSz9ibyvq8CJ7qJqJqJqJqJqJqJqJqJqJqJqJqJqJqJqJqJqJqJqJqJq
              apiConfig:
                url: https://api.example.com/v1/price
                method: GET
                headers: {}
                responseParser: $.data.price
                valueTransform: multiply:1e6
      responses:
        '200':
          description: Signed payload ready for submission or verification
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataUpdateResponse'
        '400':
          description: Validation failure or stale `registryVersion`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid `authSig`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Subscription inactive, exhausted, or delegate not authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Duplicate round identity (`feed_id` + `timestamp` replay)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: Node round timeout or upstream failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ExecuteRequest:
      type: object
      description: Request body for `POST /v1/round/execute`.
      required:
        - subscriptionOwner
        - consumerAuthority
        - signaturesRequired
        - timestamp
        - registryVersion
        - authSig
        - apiConfig
      properties:
        subscriptionOwner:
          type: string
          description: >-
            Subscription owner pubkey (base58). Equal to `consumerAuthority` for
            owner-direct requests.
          example: 7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU
        consumerAuthority:
          type: string
          description: >-
            Identity that signs `RequestAuth` and is used to derive `feed_id`
            (base58).
          example: 7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU
        signaturesRequired:
          type: integer
          description: >-
            Requested quorum, bounded by the subscription or delegate and
            current node count.
          example: 3
        timestamp:
          type: integer
          description: >-
            Unix timestamp (seconds) used as the on-chain replay key and in
            `RequestAuth`. Must be within the gateway clock skew window (default
            300s).
          example: 1700100000
        registryVersion:
          type: integer
          description: Active on-chain registry version. Must match the current version.
          example: 42
        authSig:
          type: string
          description: |-
            Ed25519 signature (64 bytes, base58 or `0x` hex) over:
            `sha256("MOLPHA_REQAUTH_V1" || feed_id || uint64_le(timestamp))`.
            Single-use per timestamp — recompute on every retry.
        apiConfig:
          $ref: '#/components/schemas/ApiConfigRequest'
        encKeyBundle:
          allOf:
            - $ref: '#/components/schemas/EncKeyBundleRequest'
          description: >-
            Optional encryption envelope. Send `null` or omit for plaintext
            configs.
    DataUpdateResponse:
      type: object
      description: >-
        Successful round response envelope shared by subscription and agent
        execute paths.
      properties:
        status:
          type: string
          description: Round completion status.
          example: completed
        data:
          $ref: '#/components/schemas/DataUpdate'
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Human-readable error message.
          example: validation failed
    ApiConfigRequest:
      type: object
      description: Off-chain HTTP API configuration hashed into the feed identity.
      required:
        - url
        - responseParser
      properties:
        url:
          type: string
          description: Target API URL. Must use `http` or `https`.
          example: https://api.example.com/v1/price
        method:
          type: string
          description: HTTP method.
          default: GET
          example: GET
        headers:
          type: object
          description: >-
            Request headers. Use `{{secret.name}}` placeholders with
            `encKeyBundle` for private APIs.
          additionalProperties:
            type: string
          example: {}
        responseParser:
          type: string
          description: JSONPath expression to extract the value from the API response.
          example: $.data.price
        valueTransform:
          type: string
          description: Optional post-parse transform (e.g. `multiply:1e6`).
          example: multiply:1e6
    EncKeyBundleRequest:
      type: object
      description: >-
        End-to-end encryption envelope for private API configs. Omit for
        plaintext configs.
      properties:
        ephemeralPub:
          type: string
          description: Ephemeral X25519 public key used to encrypt the config.
        nonceSym:
          type: string
          description: Symmetric encryption nonce.
        ciphertext:
          type: string
          description: Encrypted API configuration payload.
        envelopes:
          type: object
          description: Per-node encrypted key envelopes, keyed by node index.
          additionalProperties:
            type: string
    DataUpdate:
      type: object
      description: Threshold-signed oracle result included in successful round responses.
      properties:
        feedId:
          type: string
          description: Derived feed identity (hex).
          example: 0xabc123...
        value:
          type: string
          description: Human-readable decoded value.
          example: '42150125000000'
        valuePacked:
          type: string
          description: 32-byte packed value (hex).
        timestamp:
          type: integer
          description: Canonical round timestamp (seconds).
          example: 1700100000
        registryVersion:
          type: integer
          description: Registry version active when the round was signed.
          example: 42
        signaturesRequired:
          type: integer
          description: Quorum required for this feed.
          example: 3
        configHash:
          type: string
          description: Hash of the committed API configuration.
        signersBitmap:
          type: string
          description: 32-byte big-endian bitmap of participating signers (hex).
        s:
          type: string
          description: 32-byte Schnorr scalar `s` (hex).
        rx:
          type: string
          description: Schnorr commitment x-coordinate (hex).
        ryParity:
          type: integer
          description: Schnorr commitment y parity (`0` or `1`).
        commitmentAddr:
          type: string
          description: 20-byte commitment address (hex).
        fresh:
          type: boolean
          description: Always `true` for live gateway rounds.
          example: true

````