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

# Markets

> > **Endpoint:** `wss://api.testnet.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.

Global channel — no `id` required. Streams full per-market metadata for all listed markets.

Snapshot-only channel: every message is a full map of all markets keyed by `marketId` (same shape on subscribe and on every periodic re-emission, no partial diffs). Clients replace their entire markets view on each message.

**Cadence:** ~5s periodic snapshot, plus an immediate snapshot when a new funding rate is applied (~hourly) so the just-applied `fundingRate` propagates without waiting for the next periodic snapshot.

**Field coverage today:** `marketDisplayName`, `marketId`, `baseAsset`, `quoteAsset`, `status` (always `ONLINE` today — dynamic state changes not yet plumbed), static config (tick/step/min/max sizes, margin fractions, fees), `oraclePrice`, `fundingRate`, `nextFundingRate`, and `nextFundingAt` are populated. `priceChange24h`, `volume24h`, and `trades24h` are populated by the rolling-24h aggregator (in-memory ring of the last 1440 closed 1m candles per market, plus the in-progress 1m candle from Redis) and refresh every ~10s. `openInterest` is the total size of all open long positions per market (equals total short), in base asset units, refreshed from a periodic snapshot (default ~60s) so it may lag real time.




## AsyncAPI

````yaml api-reference/asyncapi.yaml markets
id: markets
title: Markets
description: >
  > **Endpoint:** `wss://api.testnet.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.


  Global channel — no `id` required. Streams full per-market metadata for all
  listed markets.


  Snapshot-only channel: every message is a full map of all markets keyed by
  `marketId` (same shape on subscribe and on every periodic re-emission, no
  partial diffs). Clients replace their entire markets view on each message.


  **Cadence:** ~5s periodic snapshot, plus an immediate snapshot when a new
  funding rate is applied (~hourly) so the just-applied `fundingRate` propagates
  without waiting for the next periodic snapshot.


  **Field coverage today:** `marketDisplayName`, `marketId`, `baseAsset`,
  `quoteAsset`, `status` (always `ONLINE` today — dynamic state changes not yet
  plumbed), static config (tick/step/min/max sizes, margin fractions, fees),
  `oraclePrice`, `fundingRate`, `nextFundingRate`, and `nextFundingAt` are
  populated. `priceChange24h`, `volume24h`, and `trades24h` are populated by the
  rolling-24h aggregator (in-memory ring of the last 1440 closed 1m candles per
  market, plus the in-progress 1m candle from Redis) and refresh every ~10s.
  `openInterest` is the total size of all open long positions per market (equals
  total short), in base asset units, refreshed from a periodic snapshot (default
  ~60s) so it may lag real time.
servers:
  - id: testnet
    protocol: wss
    host: api.testnet.arcus.xyz
    bindings: []
    variables: []
  - id: mainnet
    protocol: wss
    host: api.arcus.xyz
    bindings: []
    variables: []
address: /v1/ws?channel=markets
parameters: []
bindings: []
operations:
  - &ref_3
    id: subscribeMarkets
    title: Subscribe markets
    type: receive
    messages:
      - &ref_5
        id: subscribe
        contentType: application/json
        payload:
          - name: Subscribe to the markets channel
            type: object
            properties:
              - name: type
                type: string
                description: subscribe
                required: true
              - name: channel
                type: string
                enumValues:
                  - markets
                  - exchangeAttributeUpdates
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - type
            - channel
          properties:
            type:
              type: string
              const: subscribe
              x-parser-schema-id: <anonymous-schema-53>
            channel:
              type: string
              enum:
                - markets
                - exchangeAttributeUpdates
              x-parser-schema-id: <anonymous-schema-54>
          x-parser-schema-id: SubscribeGlobalPayload
        title: Subscribe to the markets channel
        example: |-
          {
            "type": "subscribe",
            "channel": "markets"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: subscribe
    bindings: []
    extensions: &ref_2
      - id: x-parser-unique-object-id
        value: markets
  - &ref_4
    id: receiveMarkets
    title: Receive markets
    type: send
    messages:
      - &ref_6
        id: snapshot
        contentType: application/json
        payload:
          - allOf: &ref_0
              - 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-5>
                  channel:
                    type: string
                    description: Channel name.
                    x-parser-schema-id: <anonymous-schema-6>
                  id:
                    type: string
                    description: >-
                      Channel id (market or address). Absent for global
                      channels.
                    x-parser-schema-id: <anonymous-schema-7>
                  contents:
                    type: object
                    additionalProperties: true
                    description: Channel-specific payload. Schema varies by channel.
                    properties: {}
                    x-parser-schema-id: <anonymous-schema-8>
                x-parser-schema-id: ChannelDataEnvelope
              - type: object
                properties:
                  contents:
                    type: object
                    required:
                      - isSnapshot
                      - markets
                    properties:
                      isSnapshot:
                        type: boolean
                        description: >
                          Always `true` on this channel — every emission is a
                          full snapshot, not a partial diff.
                        example: true
                        x-parser-schema-id: <anonymous-schema-57>
                      markets:
                        type: object
                        description: >
                          All markets keyed by `marketId` as a string. Same
                          per-market shape as REST `GET /v1/markets`
                          (`MarketInfo`).
                        additionalProperties:
                          type: object
                          description: One market entry. Matches REST `MarketInfo`.
                          properties:
                            marketDisplayName:
                              type: string
                              example: BTC-USD
                              x-parser-schema-id: <anonymous-schema-60>
                            marketId:
                              type: integer
                              example: 0
                              x-parser-schema-id: <anonymous-schema-61>
                            status:
                              type: string
                              example: ONLINE
                              x-parser-schema-id: <anonymous-schema-62>
                            baseAsset:
                              type: string
                              example: BTC
                              x-parser-schema-id: <anonymous-schema-63>
                            quoteAsset:
                              type: string
                              example: USD
                              x-parser-schema-id: <anonymous-schema-64>
                            tickSize:
                              type: string
                              x-parser-schema-id: <anonymous-schema-65>
                            stepSize:
                              type: string
                              x-parser-schema-id: <anonymous-schema-66>
                            oraclePrice:
                              type: string
                              example: '94500.00'
                              x-parser-schema-id: <anonymous-schema-67>
                            fundingRate:
                              type: string
                              description: Most recently applied funding rate.
                              example: '0.0001'
                              x-parser-schema-id: <anonymous-schema-68>
                            nextFundingRate:
                              type: string
                              description: >-
                                In-progress forecast for the next funding
                                payment.
                              example: '0.00012'
                              x-parser-schema-id: <anonymous-schema-69>
                            nextFundingAt:
                              type: integer
                              format: int64
                              description: Unix seconds for the next funding payment time.
                              x-parser-schema-id: <anonymous-schema-70>
                            priceChange24h:
                              type: string
                              description: >-
                                Reserved — returns "0" until 24h aggregator is
                                wired.
                              x-parser-schema-id: <anonymous-schema-71>
                            volume24h:
                              type: string
                              description: >-
                                Reserved — returns "0" until 24h aggregator is
                                wired.
                              x-parser-schema-id: <anonymous-schema-72>
                            trades24h:
                              type: integer
                              format: int64
                              description: >-
                                Reserved — returns 0 until 24h aggregator is
                                wired.
                              x-parser-schema-id: <anonymous-schema-73>
                            openInterest:
                              type: string
                              description: >-
                                Total size of all open long positions in the
                                market (equals total short), in base asset
                                units. Refreshed from a periodic snapshot, so it
                                may lag real time.
                              x-parser-schema-id: <anonymous-schema-74>
                            initialMarginFraction:
                              type: string
                              x-parser-schema-id: <anonymous-schema-75>
                            maintenanceMarginFraction:
                              type: string
                              x-parser-schema-id: <anonymous-schema-76>
                            offHoursInitialMarginFraction:
                              type: string
                              description: >-
                                Initial margin fraction the engine enforces
                                outside `regularTradingHours`
                                (overnight/weekends for equity-class markets);
                                equals `initialMarginFraction` for 24/7 markets.
                                Maintenance margin is not uplifted off-hours.
                              x-parser-schema-id: <anonymous-schema-77>
                            currentSettlementPrice:
                              type: string
                              description: >-
                                Sealed VWAP settlement price (decimal USD)
                                anchoring the off-hours trading band. Present
                                only while outside RTH with a sealed anchor;
                                omitted in-RTH and for 24/7 markets.
                              x-parser-schema-id: <anonymous-schema-78>
                            currentTradingBound:
                              type: string
                              description: >-
                                Off-hours trading-band multiplier in force as a
                                decimal string ("0.5"/"1"/"2"/"4"). Present only
                                while outside RTH with a sealed anchor; omitted
                                in-RTH and for 24/7 markets.
                              x-parser-schema-id: <anonymous-schema-79>
                            nextTradingBound:
                              type: string
                              description: >-
                                The next wider off-hours trading-band multiplier
                                the market can expand to, one level above
                                currentTradingBound on the fixed
                                "0.5"→"1"→"2"→"4" ladder. Always differs from
                                currentTradingBound except at the "4" maximum
                                (no wider band). Present only while outside RTH
                                with a sealed anchor.
                              x-parser-schema-id: <anonymous-schema-80>
                            regularTradingHours:
                              type: object
                              description: >-
                                Session window during which the base margin
                                fractions apply; outside it the off-hours
                                fractions apply. Omitted for 24/7 markets
                                (crypto).
                              properties:
                                startSecondsOfDay:
                                  type: integer
                                  format: int32
                                  x-parser-schema-id: <anonymous-schema-82>
                                endSecondsOfDay:
                                  type: integer
                                  format: int32
                                  x-parser-schema-id: <anonymous-schema-83>
                                timezone:
                                  type: string
                                  example: America/New_York
                                  x-parser-schema-id: <anonymous-schema-84>
                                isOvernight:
                                  type: boolean
                                  x-parser-schema-id: <anonymous-schema-85>
                              x-parser-schema-id: <anonymous-schema-81>
                            type:
                              type: string
                              example: PERPETUAL
                              x-parser-schema-id: <anonymous-schema-86>
                            assetResolution:
                              type: string
                              x-parser-schema-id: <anonymous-schema-87>
                            pythId:
                              type: string
                              x-parser-schema-id: <anonymous-schema-88>
                          x-parser-schema-id: <anonymous-schema-59>
                        properties: {}
                        x-parser-schema-id: <anonymous-schema-58>
                    x-parser-schema-id: <anonymous-schema-56>
                x-parser-schema-id: <anonymous-schema-55>
            x-parser-schema-id: MarketsUpdatePayload
            name: Markets Snapshot
            description: >
              Full markets state delivered as the subscribe response. Same shape
              as the periodic `MarketsUpdate` — the markets channel is
              snapshot-only.
        headers: []
        jsonPayloadSchema: &ref_1
          allOf: *ref_0
          x-parser-schema-id: MarketsUpdatePayload
        title: Markets Snapshot
        description: >
          Full markets state delivered as the subscribe response. Same shape as
          the periodic `MarketsUpdate` — the markets channel is snapshot-only.
        example: '{}'
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: snapshot
      - &ref_7
        id: update
        contentType: application/json
        payload:
          - allOf: *ref_0
            x-parser-schema-id: MarketsUpdatePayload
            name: Markets Update
            description: >
              Periodic re-snapshot of all markets. Replaces the client's full
              markets view; there are no partial diffs on this channel.
        headers: []
        jsonPayloadSchema: *ref_1
        title: Markets Update
        description: >
          Periodic re-snapshot of all markets. Replaces the client's full
          markets view; there are no partial diffs on this channel.
        example: |-
          {
            "type": "channel_data",
            "channel": "markets",
            "contents": {
              "isSnapshot": true,
              "markets": {
                "0": {
                  "marketDisplayName": "BTC-USD",
                  "marketId": 1,
                  "status": "ONLINE",
                  "baseAsset": "BTC",
                  "quoteAsset": "USD",
                  "tickSize": "0.01",
                  "stepSize": "0.0001",
                  "minOrderSize": "0.0001",
                  "oraclePrice": "94500.00",
                  "fundingRate": "0.0001",
                  "nextFundingRate": "0.00012",
                  "nextFundingAt": 1712349600,
                  "priceChange24h": "0.025",
                  "volume24h": "1234.5678",
                  "trades24h": 4242,
                  "openInterest": "312.4567",
                  "initialMarginFraction": "0.05",
                  "maintenanceMarginFraction": "0.03",
                  "type": "PERPETUAL"
                },
                "1": {
                  "marketDisplayName": "ETH-USD",
                  "marketId": 1,
                  "status": "ONLINE",
                  "baseAsset": "ETH",
                  "quoteAsset": "USD",
                  "oraclePrice": "3050.00",
                  "fundingRate": "0.00005",
                  "nextFundingRate": "0.00007",
                  "nextFundingAt": 1712349600,
                  "type": "PERPETUAL"
                }
              }
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: update
    bindings: []
    extensions: *ref_2
sendOperations:
  - *ref_3
receiveOperations:
  - *ref_4
sendMessages:
  - *ref_5
receiveMessages:
  - *ref_6
  - *ref_7
extensions:
  - id: x-parser-unique-object-id
    value: markets
securitySchemes: []

````