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

# Overnight reference rate

> An official overnight rate for one business day, from its administrator: SOFR, EFFR, OBFR, TGCR, BGCR and the SOFR Averages and Index (New York Fed), €STR (ECB), CORRA (Bank of Canada).

**Returns:** the rate in percent per annum, 5 decimals (int256); sofrIndex is the index level, 8 decimals

- A date the administrator published no rate for (a weekend, a holiday, a day not yet published) fails the read.

- latest signs the value without its date: it changes when the administrator publishes, and a round across that moment fails because nodes disagree. Use a date to sign one day's rate.

- Administrators may revise a published rate the same day (the New York Fed's revisionIndicator); a read signs the rate published at the round's time.

**Notices** (carry them when you show or pass the value on):

- Reference rate data (SOFR, BGCR, TGCR, EFFR, OBFR and the SOFR Averages and Index) is subject to the Terms of Use posted at newyorkfed.org. The New York Fed is not responsible for publication of the data by Molpha, does not sanction or endorse any particular republication, and has no liability for your use.

- Source: European Central Bank (ECB Data Portal). Euro foreign exchange reference rates are published for information purposes only.

- Source: Bank of Canada (Valet API), values as published. Bank of Canada exchange rates are indicative and not intended as the benchmark rate for executing foreign exchange trades.

A signed round on the derived source: see the document's description for paying with a session or x402.

Template `rates.reference@1` · Reference data · overnight interest rates · reads Web API

| Route | Answer | Cost |
| - | - | - |
| `GET /v1/data/rates/reference` | The threshold-signed value ([Signed reads](https://docs.molpha.io/data/signed-reads.md)) | One round: x402 or one unit of your plan |
| `GET /v1/data/rates/reference/source` | The source and its `sourceId` | Free |
| `GET /v1/data/rates/reference/dry-run` | A status-only run on one node, no value | Free |

```bash theme={null}
# The source these parameters build, and its sourceId (free)
curl "https://gateway.molpha.io/v1/data/rates/reference/source?date=2026-11-10&rate=sofr"

# The signed value with a sign-in session (without one, the answer is the x402 quote)
curl -H "Authorization: Bearer $MOLPHA_SESSION" "https://gateway.molpha.io/v1/data/rates/reference?date=2026-11-10&rate=sofr"
```

> [!NOTE]
>
> Carry these notices when you show or pass the value on:
>
> * Reference rate data (SOFR, BGCR, TGCR, EFFR, OBFR and the SOFR Averages and Index) is subject to the Terms of Use posted at newyorkfed.org. The New York Fed is not responsible for publication of the data by Molpha, does not sanction or endorse any particular republication, and has no liability for your use.
> * Source: European Central Bank (ECB Data Portal). Euro foreign exchange reference rates are published for information purposes only.
> * Source: Bank of Canada (Valet API), values as published. Bank of Canada exchange rates are indicative and not intended as the benchmark rate for executing foreign exchange trades.


## OpenAPI

````yaml data-openapi.json GET /v1/data/rates/reference
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/rates/reference:
    get:
      tags:
        - Reference data
      summary: Overnight reference rate
      description: >-
        An official overnight rate for one business day, from its administrator:
        SOFR, EFFR, OBFR, TGCR, BGCR and the SOFR Averages and Index (New York
        Fed), €STR (ECB), CORRA (Bank of Canada).


        **Returns:** the rate in percent per annum, 5 decimals (int256);
        sofrIndex is the index level, 8 decimals


        - A date the administrator published no rate for (a weekend, a holiday,
        a day not yet published) fails the read.


        - latest signs the value without its date: it changes when the
        administrator publishes, and a round across that moment fails because
        nodes disagree. Use a date to sign one day's rate.


        - Administrators may revise a published rate the same day (the New York
        Fed's revisionIndicator); a read signs the rate published at the round's
        time.


        **Notices** (carry them when you show or pass the value on):


        - Reference rate data (SOFR, BGCR, TGCR, EFFR, OBFR and the SOFR
        Averages and Index) is subject to the Terms of Use posted at
        newyorkfed.org. The New York Fed is not responsible for publication of
        the data by Molpha, does not sanction or endorse any particular
        republication, and has no liability for your use.


        - Source: European Central Bank (ECB Data Portal). Euro foreign exchange
        reference rates are published for information purposes only.


        - Source: Bank of Canada (Valet API), values as published. Bank of
        Canada exchange rates are indicative and not intended as the benchmark
        rate for executing foreign exchange trades.


        A signed round on the derived source: see the document's description for
        paying with a session or x402.
      operationId: rates.reference
      parameters:
        - description: >-
            sofr, effr, obfr, tgcr, bgcr; sofr30, sofr90, sofr180 (SOFR
            Averages); sofrIndex; estr; corra
          example: sofr
          in: query
          name: rate
          required: true
          schema:
            enum:
              - sofr
              - effr
              - obfr
              - tgcr
              - bgcr
              - sofr30
              - sofr90
              - sofr180
              - sofrIndex
              - estr
              - corra
            type: string
          x-molpha-type: enum
        - description: >-
            the business day the rate is for (YYYY-MM-DD), or latest for the
            newest published rate
          example: '2026-11-10'
          in: query
          name: date
          required: false
          schema:
            default: latest
            pattern: ^([0-9]{4}-[0-9]{2}-[0-9]{2}|latest)$
            type: string
          x-molpha-type: date
        - description: >-
            Signatures the round needs (default 3). Tolerance-mode sources need
            at least 3; the gateway bounds it by the protocol minimum, your plan
            and the live nodes.
          in: query
          name: signaturesRequired
          required: false
          schema:
            default: 3
            maximum: 255
            minimum: 1
            type: integer
      responses:
        '200':
          $ref: '#/components/responses/ValueOK'
        '400':
          $ref: '#/components/responses/Value400'
        '401':
          $ref: '#/components/responses/Value401'
        '402':
          $ref: '#/components/responses/Value402'
        '403':
          $ref: '#/components/responses/Value403'
        '409':
          $ref: '#/components/responses/Value409'
        '422':
          $ref: '#/components/responses/Value422'
        '429':
          $ref: '#/components/responses/Value429'
        '503':
          $ref: '#/components/responses/Value503'
        default:
          $ref: '#/components/responses/ValueDefault'
      security:
        - BearerAuth: []
        - X402Payment: []
components:
  responses:
    ValueOK:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AttestationResponse'
      description: >-
        The threshold-signed value (`data.attestation`) and its rendering
        (`data.value`); `Molpha-Source-Id` names the derived source.
    Value400:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
      description: >-
        The round request was refused (for example `signaturesRequired` below
        the protocol minimum); a malformed query is the data error body
    Value401:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
      description: The session token is unknown, expired or revoked
    Value402:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/payment.Required'
      description: >-
        No session and no payment: the x402 quote. Pay it and send the same
        request with `PAYMENT-SIGNATURE`
      headers:
        PAYMENT-REQUIRED:
          description: Base64 x402 v2 payment requirements
          schema:
            type: string
    Value403:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
      description: >-
        The subscription is inactive, the delegate is not authorized, or the
        term's quota is spent
    Value409:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
      description: >-
        You already have a round for this source and quorum in this 100 ms tick;
        retry one tick later
    Value422:
      description: A parameter is wrong, or the chain shows it names something else
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DataErrorResponse'
    Value429:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DataErrorResponse'
      description: >-
        Too many new derivations from this address, or too many rounds for this
        consumer; retry after Retry-After
    Value503:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
      description: >-
        No quorum could form now, the gateway is at capacity, or a fact could
        not be read; retry after Retry-After
    ValueDefault:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DataErrorResponse'
      description: Data error body
  schemas:
    AttestationResponse:
      properties:
        data:
          $ref: '#/components/schemas/AttestationData'
        status:
          example: completed
          type: string
      type: object
    ErrorResponse:
      properties:
        error:
          example: validation failed
          type: string
      type: object
    payment.Required:
      properties:
        accepts:
          items:
            $ref: '#/components/schemas/payment.Requirements'
          type: array
        error:
          type: string
        extensions:
          allOf:
            - $ref: '#/components/schemas/payment.Extensions'
          description: |-
            Extensions carries non-Molpha payment terms, currently the relayed
            upstream-source quote. It never affects the accepted-requirements
            byte comparison performed by Decode.
        resource:
          $ref: '#/components/schemas/payment.Resource'
        x402Version:
          type: integer
      type: object
    DataErrorResponse:
      properties:
        error:
          properties:
            code:
              example: PARAM_INVALID
              type: string
            input:
              type: string
            message:
              type: string
            stage:
              type: string
          type: object
      type: object
    AttestationData:
      properties:
        attestation:
          $ref: '#/components/schemas/Attestation'
        fresh:
          example: true
          type: boolean
        outcome:
          description: >-
            Outcome is present for a source with a policy (node-client
            docs/policy.md): conclusive, the

            value is the source's result; or fallback, the policy concluded
            INCONCLUSIVE (reason) and the

            value is its declared fallback. Both are signed under the source's
            ID. The label is the nodes'

            word: what a consumer can rely on is the signed value compared with
            the declared fallback.
          example: fallback
          type: string
        reason:
          example: '0x01'
          type: string
        roundId:
          description: >-
            RoundID is the round's ID: requests for one feed in one 100 ms tick
            share it. The read service

            serves the round's archive record, and for a source with a policy
            each node's receipt, under it

            (GET /v1/rounds/{roundId}).
          example: 5f1c...
          type: string
        value:
          description: >-
            Value is the decimal rendering of payload.value (trailing zeros
            trimmed), not signed.
          example: '42150125000000'
          type: string
        valuePreimage:
          description: >-
            ValuePreimage is the 0x-prefixed hex of the bytes the source's
            keccak256 output hashed to

            payload.value. It is present only for such a source, and the
            response is its only copy: the

            signed value is the hash. Hash it to check, and pass it as the raw
            value when submitting the

            attestation to Solana.
          example: '0x68656c6c6f'
          type: string
      type: object
    payment.Requirements:
      properties:
        amount:
          type: string
        asset:
          type: string
        extra:
          additionalProperties:
            type: string
          type: object
        maxTimeoutSeconds:
          type: integer
        network:
          type: string
        payTo:
          type: string
        scheme:
          type: string
      type: object
    payment.Extensions:
      properties:
        upstream:
          $ref: '#/components/schemas/payment.UpstreamQuote'
      type: object
    payment.Resource:
      properties:
        description:
          type: string
        mimeType:
          type: string
        url:
          type: string
      type: object
    Attestation:
      properties:
        payload:
          $ref: '#/components/schemas/AttestationPayload'
        signature:
          $ref: '#/components/schemas/SchnorrSignature'
      type: object
    payment.UpstreamQuote:
      properties:
        eligibleSetSize:
          type: integer
        error:
          type: string
        nodeCount:
          type: integer
        provider:
          description: >-
            Provider names the integrated provider whose paid host this is, when
            it is one.
          type: string
        redundancyBuffer:
          type: integer
        resource:
          type: string
        signaturesRequired:
          type: integer
        supportedX402Versions:
          items:
            type: integer
          type: array
      type: object
    AttestationPayload:
      properties:
        registryVersion:
          example: 42
          type: integer
        signaturesRequired:
          example: 18
          type: integer
        sourceId:
          example: 0xabc123...
          type: string
        timestamp:
          description: >-
            Gateway-assigned round time in unix milliseconds: the start of the
            round's 100 ms tick.
          example: 1700100000000
          type: integer
        value:
          description: >-
            Value is the fixed 32-byte packed attestation value (exact uint256
            or tolerance int256).
          example: 42150125000000...
          type: string
      type: object
    SchnorrSignature:
      properties:
        commitment:
          example: 02...
          type: string
        signature:
          example: 01...
          type: string
        signersBitmap:
          type: string
      type: object
  securitySchemes:
    BearerAuth:
      description: >-
        Session token from `POST /v1/session` (sign in with the subscription
        owner's or a delegate's wallet). Each value uses one round of the plan's
        quota.
      scheme: bearer
      type: http
    X402Payment:
      description: >-
        Base64 x402 v2 payment payload for the quote a request without it
        receives (`402`, `PAYMENT-REQUIRED`).
      in: header
      name: PAYMENT-SIGNATURE
      type: apiKey

````

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