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

# Candles

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

OHLCV candlestick stream. Subscribe `id` is `"MARKET/TIMEFRAME"`, e.g. `"BTC-USD/1m"`.

On subscribe: snapshot of the most recent candles (up to 200). Then: real-time updates as each bar changes. Open-candle updates are coalesced and sent at most about every 250 ms per market/timeframe. `isFinal: true` updates are sent immediately when the interval closes and the bar will not be updated again.

Available timeframes: `1m`, `3m`, `5m`, `15m`, `30m`, `1h`, `2h`, `4h`, `8h`, `12h`, `1d`, `3d`, `1w`.




## AsyncAPI

````yaml api-reference/asyncapi.yaml candles
id: candles
title: Candles
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.


  OHLCV candlestick stream. Subscribe `id` is `"MARKET/TIMEFRAME"`, e.g.
  `"BTC-USD/1m"`.


  On subscribe: snapshot of the most recent candles (up to 200). Then: real-time
  updates as each bar changes. Open-candle updates are coalesced and sent at
  most about every 250 ms per market/timeframe. `isFinal: true` updates are sent
  immediately when the interval closes and the bar will not be updated again.


  Available timeframes: `1m`, `3m`, `5m`, `15m`, `30m`, `1h`, `2h`, `4h`, `8h`,
  `12h`, `1d`, `3d`, `1w`.
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=candles
parameters: []
bindings: []
operations:
  - &ref_3
    id: subscribeCandles
    title: Subscribe candles
    type: receive
    messages:
      - &ref_5
        id: subscribe
        contentType: application/json
        payload:
          - name: Subscribe to candles
            type: object
            properties:
              - name: type
                type: string
                description: subscribe
                required: true
              - name: channel
                type: string
                enumValues:
                  - candles
                required: true
              - name: id
                type: string
                description: >
                  Market and timeframe joined with "/". Available timeframes:
                  `1m`, `3m`, `5m`, `15m`, `30m`, `1h`, `2h`, `4h`, `8h`, `12h`,
                  `1d`, `3d`, `1w`.
                required: true
              - name: snapshot
                type: boolean
                description: >-
                  When false, suppress the initial candles snapshot on subscribe
                  and stream only live updates. Defaults to true.
                required: false
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - type
            - channel
            - id
          properties:
            type:
              type: string
              const: subscribe
              x-parser-schema-id: <anonymous-schema-174>
            channel:
              type: string
              enum:
                - candles
              x-parser-schema-id: <anonymous-schema-175>
            id:
              type: string
              description: >
                Market and timeframe joined with "/". Available timeframes:
                `1m`, `3m`, `5m`, `15m`, `30m`, `1h`, `2h`, `4h`, `8h`, `12h`,
                `1d`, `3d`, `1w`.
              example: BTC-USD/1m
              pattern: ^[A-Z]+-[A-Z]+\/(1m|3m|5m|15m|30m|1h|2h|4h|8h|12h|1d|3d|1w)$
              x-parser-schema-id: <anonymous-schema-176>
            snapshot:
              type: boolean
              description: >-
                When false, suppress the initial candles snapshot on subscribe
                and stream only live updates. Defaults to true.
              default: true
              x-parser-schema-id: <anonymous-schema-177>
          x-parser-schema-id: SubscribeCandlesPayload
        title: Subscribe to candles
        example: |-
          {
            "type": "subscribe",
            "channel": "candles",
            "id": "BTC-USD/1m"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: subscribe
    bindings: []
    extensions: &ref_2
      - id: x-parser-unique-object-id
        value: candles
  - &ref_4
    id: receiveCandles
    title: Receive candles
    type: send
    messages:
      - &ref_6
        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-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:
                  type:
                    const: subscribed
                    x-parser-schema-id: <anonymous-schema-179>
                  contents:
                    type: object
                    properties:
                      isSnapshot:
                        type: boolean
                        example: true
                        x-parser-schema-id: <anonymous-schema-181>
                      candles:
                        type: array
                        description: >-
                          Oldest first. Last entry is the open (in-progress)
                          bar.
                        items:
                          type: object
                          properties:
                            open:
                              type: string
                              example: '94000.00'
                              x-parser-schema-id: <anonymous-schema-183>
                            high:
                              type: string
                              example: '94800.00'
                              x-parser-schema-id: <anonymous-schema-184>
                            low:
                              type: string
                              example: '93500.00'
                              x-parser-schema-id: <anonymous-schema-185>
                            close:
                              type: string
                              example: '94500.00'
                              x-parser-schema-id: <anonymous-schema-186>
                            volume:
                              type: string
                              example: '123.45'
                              x-parser-schema-id: <anonymous-schema-187>
                            openTime:
                              type: integer
                              format: int64
                              description: >-
                                Unix timestamp (microseconds) of the bar open
                                (candle bucket start).
                              example: 1712345640000000
                              x-parser-schema-id: <anonymous-schema-188>
                            isFinal:
                              type: boolean
                              description: >-
                                True when the bar is closed and will not be
                                updated again.
                              example: false
                              x-parser-schema-id: <anonymous-schema-189>
                          x-parser-schema-id: Candle
                        x-parser-schema-id: <anonymous-schema-182>
                    x-parser-schema-id: <anonymous-schema-180>
                x-parser-schema-id: <anonymous-schema-178>
            x-parser-schema-id: CandlesSnapshotPayload
            name: Candles Snapshot
        headers: []
        jsonPayloadSchema:
          allOf: *ref_0
          x-parser-schema-id: CandlesSnapshotPayload
        title: Candles Snapshot
        example: |-
          {
            "type": "subscribed",
            "channel": "candles",
            "id": "BTC-USD/1m",
            "contents": {
              "isSnapshot": true,
              "candles": [
                {
                  "open": "94000.00",
                  "high": "94800.00",
                  "low": "93500.00",
                  "close": "94500.00",
                  "volume": "123.45",
                  "openTime": 1712345580000000,
                  "isFinal": true
                },
                {
                  "open": "94500.00",
                  "high": "94600.00",
                  "low": "94400.00",
                  "close": "94550.00",
                  "volume": "45.2",
                  "openTime": 1712345640000000,
                  "isFinal": false
                }
              ]
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: snapshot
      - &ref_7
        id: update
        contentType: application/json
        payload:
          - name: Candle Update
            description: >
              A single candle bar update. Same shape as `Candle` in
              `openapi.yaml`. Open-candle updates are coalesced to at most about
              every 250 ms per market/timeframe. `isFinal: true` when the bar
              interval has closed; final updates are sent immediately.
            type: object
            properties:
              - name: type
                type: string
                description: >-
                  `subscribed` for the initial snapshot; `channel_data` for
                  updates.
                enumValues:
                  - subscribed
                  - channel_data
                required: true
              - name: channel
                type: string
                description: Channel name.
                required: true
              - name: id
                type: string
                description: Channel id (market or address). Absent for global channels.
                required: false
              - name: contents
                type: object
                description: Channel-specific payload. Schema varies by channel.
                required: false
                properties: []
        headers: []
        jsonPayloadSchema: *ref_1
        title: Candle Update
        description: >
          A single candle bar update. Same shape as `Candle` in `openapi.yaml`.
          Open-candle updates are coalesced to at most about every 250 ms per
          market/timeframe. `isFinal: true` when the bar interval has closed;
          final updates are sent immediately.
        example: |-
          {
            "type": "<string>",
            "channel": "<string>",
            "id": "<string>",
            "contents": {}
          }
        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: candles
securitySchemes: []

````