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

# Oracle

> Receive-only. Every frame carries an RFC 3339 `timestamp` (the
envelope serialization time) and a `type` tag, with the payload
fields flattened into the same object. Spot frames also carry Pyth's
own `publish_time` so a consumer can measure freshness independently
of transport latency.




## AsyncAPI

````yaml _generated/asyncapi.yaml oracle
id: oracle
title: Oracle
description: |
  Receive-only. Every frame carries an RFC 3339 `timestamp` (the
  envelope serialization time) and a `type` tag, with the payload
  fields flattened into the same object. Spot frames also carry Pyth's
  own `publish_time` so a consumer can measure freshness independently
  of transport latency.
servers:
  - id: oracle
    protocol: wss
    host: joyride.exchange
    bindings: []
    variables: []
address: /
parameters: []
bindings: []
operations:
  - &ref_2
    id: oracleReceive
    title: Oracle receive
    description: Receive oracle broadcast frames
    type: receive
    messages:
      - &ref_3
        id: price
        contentType: application/json
        payload:
          - name: Spot price
            description: A Pyth spot price for one asset
            type: object
            properties:
              - name: type
                type: string
                description: price
                required: true
              - name: timestamp
                type: string
                description: Envelope serialization time (RFC 3339).
                required: true
              - name: symbol
                type: string
                description: Bare asset ticker.
                enumValues:
                  - BTC
                  - ETH
                  - SOL
                required: true
              - name: price
                type: number
                description: Spot price in USD.
                required: true
              - name: confidence
                type: number
                description: Pyth confidence interval, plus or minus this amount in USD.
                required: true
              - name: publish_time
                type: integer
                description: >-
                  Pyth publish time, Unix seconds. Compare with `timestamp` to
                  measure feed freshness.
                required: true
              - name: feed_id
                type: string
                description: Pyth price-feed id, hex.
                required: false
        headers: []
        jsonPayloadSchema:
          type: object
          properties:
            type:
              type: string
              const: price
              x-parser-schema-id: <anonymous-schema-151>
            timestamp:
              type: string
              format: date-time
              description: Envelope serialization time (RFC 3339).
              x-parser-schema-id: <anonymous-schema-152>
            symbol: &ref_0
              type: string
              description: Bare asset ticker.
              enum:
                - BTC
                - ETH
                - SOL
              x-parser-schema-id: PlatformAssetSymbol
            price:
              type: number
              description: Spot price in USD.
              x-parser-schema-id: <anonymous-schema-153>
            confidence:
              type: number
              description: Pyth confidence interval, plus or minus this amount in USD.
              x-parser-schema-id: <anonymous-schema-154>
            publish_time:
              type: integer
              description: >-
                Pyth publish time, Unix seconds. Compare with `timestamp` to
                measure feed freshness.
              x-parser-schema-id: <anonymous-schema-155>
            feed_id:
              type: string
              description: Pyth price-feed id, hex.
              x-parser-schema-id: <anonymous-schema-156>
          required:
            - type
            - timestamp
            - symbol
            - price
            - confidence
            - publish_time
          x-parser-schema-id: PlatformOraclePriceFrame
        title: Spot price
        description: A Pyth spot price for one asset
        example: |-
          {
            "type": "price",
            "timestamp": "2026-09-09T14:03:12.417Z",
            "symbol": "BTC",
            "price": 113842.31,
            "confidence": 41.27,
            "publish_time": 1788012192,
            "feed_id": "e62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: price
      - &ref_4
        id: twap_preview
        contentType: application/json
        payload:
          - name: TWAP preview
            description: >-
              The running time-weighted average for the current settlement
              window
            type: object
            properties:
              - name: type
                type: string
                description: twap_preview
                required: true
              - name: timestamp
                type: string
                description: Envelope serialization time (RFC 3339).
                required: true
              - name: symbol
                type: string
                description: Bare asset ticker.
                enumValues:
                  - BTC
                  - ETH
                  - SOL
                required: true
              - name: twap
                type: number
                description: >-
                  Time-weighted average price over the samples collected so far
                  in the current settlement window, USD.
                required: true
              - name: sample_count
                type: integer
                description: Samples collected so far in the window.
                required: true
              - name: coverage
                type: number
                description: Fraction of the settlement window covered by samples so far.
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          properties:
            type:
              type: string
              const: twap_preview
              x-parser-schema-id: <anonymous-schema-157>
            timestamp:
              type: string
              format: date-time
              description: Envelope serialization time (RFC 3339).
              x-parser-schema-id: <anonymous-schema-158>
            symbol: *ref_0
            twap:
              type: number
              description: >-
                Time-weighted average price over the samples collected so far in
                the current settlement window, USD.
              x-parser-schema-id: <anonymous-schema-159>
            sample_count:
              type: integer
              minimum: 0
              description: Samples collected so far in the window.
              x-parser-schema-id: <anonymous-schema-160>
            coverage:
              type: number
              minimum: 0
              maximum: 1
              description: Fraction of the settlement window covered by samples so far.
              x-parser-schema-id: <anonymous-schema-161>
          required:
            - type
            - timestamp
            - symbol
            - twap
            - sample_count
            - coverage
          x-parser-schema-id: PlatformOracleTwapPreviewFrame
        title: TWAP preview
        description: The running time-weighted average for the current settlement window
        example: |-
          {
            "type": "twap_preview",
            "timestamp": "2026-09-09T14:03:12.902Z",
            "symbol": "BTC",
            "twap": 113795.6642,
            "sample_count": 188,
            "coverage": 0.5222
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: twap_preview
      - &ref_5
        id: connected
        contentType: application/json
        payload:
          - name: Upstream connected
            description: The oracle's own Pyth connection is up
            type: object
            properties:
              - name: type
                type: string
                enumValues:
                  - connected
                  - disconnected
                required: true
              - name: timestamp
                type: string
                required: true
        headers: []
        jsonPayloadSchema: &ref_1
          type: object
          properties:
            type:
              type: string
              enum:
                - connected
                - disconnected
              x-parser-schema-id: <anonymous-schema-162>
            timestamp:
              type: string
              format: date-time
              x-parser-schema-id: <anonymous-schema-163>
          required:
            - type
            - timestamp
          x-parser-schema-id: PlatformOracleStatusFrame
        title: Upstream connected
        description: The oracle's own Pyth connection is up
        example: |-
          {
            "type": "<string>",
            "timestamp": "<string>"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: connected
      - &ref_6
        id: disconnected
        contentType: application/json
        payload:
          - name: Upstream disconnected
            description: >-
              The oracle lost its Pyth connection; prices pause until
              `connected` returns
            type: object
            properties:
              - name: type
                type: string
                enumValues:
                  - connected
                  - disconnected
                required: true
              - name: timestamp
                type: string
                required: true
        headers: []
        jsonPayloadSchema: *ref_1
        title: Upstream disconnected
        description: >-
          The oracle lost its Pyth connection; prices pause until `connected`
          returns
        example: |-
          {
            "type": "<string>",
            "timestamp": "<string>"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: disconnected
      - &ref_7
        id: error
        contentType: application/json
        payload:
          - name: Upstream error
            description: A non-fatal error on the oracle's upstream feed
            type: object
            properties:
              - name: type
                type: string
                description: error
                required: true
              - name: timestamp
                type: string
                required: true
              - name: message
                type: string
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          properties:
            type:
              type: string
              const: error
              x-parser-schema-id: <anonymous-schema-164>
            timestamp:
              type: string
              format: date-time
              x-parser-schema-id: <anonymous-schema-165>
            message:
              type: string
              x-parser-schema-id: <anonymous-schema-166>
          required:
            - type
            - timestamp
            - message
          x-parser-schema-id: PlatformOracleErrorFrame
        title: Upstream error
        description: A non-fatal error on the oracle's upstream feed
        example: |-
          {
            "type": "<string>",
            "timestamp": "<string>",
            "message": "<string>"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: error
      - &ref_8
        id: heartbeat
        contentType: application/json
        payload:
          - name: Heartbeat
            description: Keepalive on a fixed interval; carries no data and needs no reply
            type: object
            properties:
              - name: type
                type: string
                description: heartbeat
                required: true
              - name: timestamp
                type: string
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          properties:
            type:
              type: string
              const: heartbeat
              x-parser-schema-id: <anonymous-schema-167>
            timestamp:
              type: string
              format: date-time
              x-parser-schema-id: <anonymous-schema-168>
          required:
            - type
            - timestamp
          x-parser-schema-id: PlatformOracleHeartbeatFrame
        title: Heartbeat
        description: Keepalive on a fixed interval; carries no data and needs no reply
        example: |-
          {
            "type": "<string>",
            "timestamp": "<string>"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: heartbeat
    bindings: []
    extensions:
      - id: x-parser-unique-object-id
        value: oracle
sendOperations:
  - *ref_2
receiveOperations: []
sendMessages:
  - *ref_3
  - *ref_4
  - *ref_5
  - *ref_6
  - *ref_7
  - *ref_8
receiveMessages: []
extensions:
  - id: x-parser-unique-object-id
    value: oracle
securitySchemes: []

````