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

# Predicted funding

> > **Endpoint:** `wss://api.arcus.xyz/v1/ws` — one socket multiplexes every channel and RPC request. Click **Connect**, then send the example subscribe message below to start receiving data.

Predicted next-hour funding rate for a single market. Subscribe `id` is the market display name (e.g. `BTC-USD`).

On subscribe the initial response carries the latest cached prediction for the market; `contents` is empty when no prediction has been published yet. Streaming updates deliver a new `{market, rate1h}` payload each time the funder recomputes the prediction. Unlike most channels, payloads are not wrapped in an `isSnapshot` envelope.




## AsyncAPI

````yaml api-reference/asyncapi.yaml predictedFunding
id: predictedFunding
title: Predicted funding
description: >
  > **Endpoint:** `wss://api.arcus.xyz/v1/ws` — one socket multiplexes every
  channel and RPC request. Click **Connect**, then send the example subscribe
  message below to start receiving data.


  Predicted next-hour funding rate for a single market. Subscribe `id` is the
  market display name (e.g. `BTC-USD`).


  On subscribe the initial response carries the latest cached prediction for the
  market; `contents` is empty when no prediction has been published yet.
  Streaming updates deliver a new `{market, rate1h}` payload each time the
  funder recomputes the prediction. Unlike most channels, payloads are not
  wrapped in an `isSnapshot` envelope.
servers:
  - id: mainnet
    protocol: wss
    host: api.arcus.xyz
    bindings: []
    variables: []
  - id: testnet
    protocol: wss
    host: api.testnet.arcus.xyz
    bindings: []
    variables: []
address: /v1/ws?channel=predictedFunding
parameters: []
bindings: []
operations:
  - &ref_5
    id: subscribePredictedFunding
    title: Subscribe predicted funding
    type: receive
    messages:
      - &ref_7
        id: subscribe
        contentType: application/json
        payload:
          - name: Subscribe to a market channel
            type: object
            properties:
              - name: type
                type: string
                description: subscribe
                required: true
              - name: channel
                type: string
                enumValues:
                  - trades
                  - oraclePrices
                  - bbo
                required: true
              - name: id
                type: string
                description: Market display name (e.g. "BTC-USD").
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - type
            - channel
            - id
          properties:
            type:
              type: string
              const: subscribe
              x-parser-schema-id: <anonymous-schema-39>
            channel:
              type: string
              enum:
                - trades
                - oraclePrices
                - bbo
              x-parser-schema-id: <anonymous-schema-40>
            id:
              type: string
              description: Market display name (e.g. "BTC-USD").
              example: BTC-USD
              x-parser-schema-id: <anonymous-schema-41>
          x-parser-schema-id: SubscribeByMarketPayload
        title: Subscribe to a market channel
        example: |-
          {
            "type": "subscribe",
            "channel": "trades",
            "id": "BTC-USD"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: subscribe
    bindings: []
    extensions: &ref_4
      - id: x-parser-unique-object-id
        value: predictedFunding
  - &ref_6
    id: receivePredictedFunding
    title: Receive predicted funding
    type: send
    messages:
      - &ref_8
        id: snapshot
        contentType: application/json
        payload:
          - allOf: &ref_0
              - &ref_1
                type: object
                description: Common envelope for all server-pushed channel messages.
                required:
                  - type
                  - channel
                properties:
                  type:
                    type: string
                    enum:
                      - subscribed
                      - channel_data
                    description: >-
                      `subscribed` for the initial snapshot; `channel_data` for
                      updates.
                    x-parser-schema-id: <anonymous-schema-7>
                  channel:
                    type: string
                    description: Channel name.
                    x-parser-schema-id: <anonymous-schema-8>
                  id:
                    type: string
                    description: >-
                      Channel id (market or address). Absent for global
                      channels.
                    x-parser-schema-id: <anonymous-schema-9>
                  contents:
                    type: object
                    additionalProperties: true
                    description: Channel-specific payload. Schema varies by channel.
                    properties: {}
                    x-parser-schema-id: <anonymous-schema-10>
                x-parser-schema-id: ChannelDataEnvelope
              - type: object
                properties:
                  type:
                    const: subscribed
                    x-parser-schema-id: <anonymous-schema-167>
                  contents: &ref_2
                    type: object
                    description: >
                      Predicted next-hour funding rate as published by the
                      funder. Not wrapped in an isSnapshot envelope. May be
                      empty in the subscribe-time snapshot when no prediction is
                      cached for the market yet.
                    properties:
                      market:
                        type: string
                        description: Market display name.
                        example: BTC-USD
                        x-parser-schema-id: <anonymous-schema-168>
                      rate1h:
                        type: string
                        description: Predicted 1-hour funding rate as a decimal string.
                        example: '0.0000125'
                        x-parser-schema-id: <anonymous-schema-169>
                    x-parser-schema-id: PredictedFundingRate
                x-parser-schema-id: <anonymous-schema-166>
            x-parser-schema-id: PredictedFundingSnapshotPayload
            name: Predicted Funding Snapshot
            description: >
              Latest cached predicted rate for the market, sent once on
              subscribe. `contents` is empty when no prediction has been
              published yet.
        headers: []
        jsonPayloadSchema:
          allOf: *ref_0
          x-parser-schema-id: PredictedFundingSnapshotPayload
        title: Predicted Funding Snapshot
        description: >
          Latest cached predicted rate for the market, sent once on subscribe.
          `contents` is empty when no prediction has been published yet.
        example: |-
          {
            "type": "subscribed",
            "channel": "predictedFunding",
            "id": "BTC-USD",
            "contents": {
              "market": "BTC-USD",
              "rate1h": "0.0000125"
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: snapshot
      - &ref_9
        id: update
        contentType: application/json
        payload:
          - allOf: &ref_3
              - *ref_1
              - type: object
                properties:
                  type:
                    const: channel_data
                    x-parser-schema-id: <anonymous-schema-171>
                  contents: *ref_2
                x-parser-schema-id: <anonymous-schema-170>
            x-parser-schema-id: PredictedFundingUpdatePayload
            name: Predicted Funding Update
            description: >
              New predicted next-hour funding rate, pushed each time the funder
              recomputes the prediction for the market.
        headers: []
        jsonPayloadSchema:
          allOf: *ref_3
          x-parser-schema-id: PredictedFundingUpdatePayload
        title: Predicted Funding Update
        description: >
          New predicted next-hour funding rate, pushed each time the funder
          recomputes the prediction for the market.
        example: |-
          {
            "type": "channel_data",
            "channel": "predictedFunding",
            "id": "BTC-USD",
            "contents": {
              "market": "BTC-USD",
              "rate1h": "0.0000131"
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: update
    bindings: []
    extensions: *ref_4
sendOperations:
  - *ref_5
receiveOperations:
  - *ref_6
sendMessages:
  - *ref_7
receiveMessages:
  - *ref_8
  - *ref_9
extensions:
  - id: x-parser-unique-object-id
    value: predictedFunding
securitySchemes: []

````