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

# Ticker

> Subscribe to ticker information on currency pairs

<div className="api-banner">
  <span className="api-protocol ws">WSS</span>
  <span className="api-detail">ws.kraken.com</span>
  <span className="api-tag">ticker</span>
</div>

Ticker information on currency pair. On subscription, a snapshot of the current ticker data is sent, followed by updates on every trade event.

## Subscribe

<Tabs>
  <Tab title="Request">
    <ResponseField name="event" type="string" required>
      Value: `subscribe`
    </ResponseField>

    <ResponseField name="pair" type="string[]" required>
      <span className="field-attr">Example:</span> `["BTC/USD", "MATIC/GBP"]`

      The currency pairs for this request.
    </ResponseField>

    <ResponseField name="subscription" type="object">
      <Expandable title="properties" defaultOpen>
        <ResponseField name="name" type="string" required>
          Value: `ticker`
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="reqid" type="string">
      Optional client originated request identifier sent as acknowledgment in the response.
    </ResponseField>
  </Tab>

  <Tab title="Response">
    The subscription status is returned via the [subscriptionStatus](/exchange/api-reference/spot-websocket-v1/subscriptionstatus) message.
  </Tab>
</Tabs>

## Snapshot / Update

<ResponseField name="" type="array">
  <Expandable title="elements" defaultOpen>
    <ResponseField name="[0] channel_id" type="integer" deprecated>
      <span className="field-attr">Deprecated:</span> use `channelName` and `pair`

      Channel identifier.
    </ResponseField>

    <ResponseField name="[1] ticker" type="object">
      <Expandable title="properties">
        <ResponseField name="a" type="array">
          Best Ask

          <Expandable title="elements">
            <ResponseField name="[0] price" type="string">Best ask price.</ResponseField>
            <ResponseField name="[1] whole_lot_volume" type="integer">Whole lot volume.</ResponseField>
            <ResponseField name="[2] decimal" type="string">Lot volume.</ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="b" type="array">
          Best Bid

          <Expandable title="elements">
            <ResponseField name="[0] price" type="string">Best bid price.</ResponseField>
            <ResponseField name="[1] whole_lot_volume" type="integer">Whole lot volume.</ResponseField>
            <ResponseField name="[2] decimal" type="string">Lot volume.</ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="c" type="array">
          Close

          <Expandable title="elements">
            <ResponseField name="[0] price" type="string">Price.</ResponseField>
            <ResponseField name="[1] lot_volume" type="string">Lot volume.</ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="v" type="array">
          Volume

          <Expandable title="elements">
            <ResponseField name="[0] today" type="string">Value today.</ResponseField>
            <ResponseField name="[1] last_24h" type="string">Value over last 24 hours.</ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="p" type="array">
          Volume Weighted Average Price

          <Expandable title="elements">
            <ResponseField name="[0] today" type="string">Value today.</ResponseField>
            <ResponseField name="[1] last_24h" type="string">Value over last 24 hours.</ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="t" type="array">
          Number of trades

          <Expandable title="elements">
            <ResponseField name="[0] today" type="integer">Value today.</ResponseField>
            <ResponseField name="[1] last_24h" type="integer">Value over last 24 hours.</ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="l" type="array">
          Low price

          <Expandable title="elements">
            <ResponseField name="[0] today" type="string">Value today.</ResponseField>
            <ResponseField name="[1] last_24h" type="string">Value over last 24 hours.</ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="h" type="array">
          High price

          <Expandable title="elements">
            <ResponseField name="[0] today" type="string">Value today.</ResponseField>
            <ResponseField name="[1] last_24h" type="string">Value over last 24 hours.</ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="o" type="array">
          Open Price

          <Expandable title="elements">
            <ResponseField name="[0] today" type="string">Value today.</ResponseField>
            <ResponseField name="[1] last_24h" type="string">Value over last 24 hours.</ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="[2] pair" type="string">
      <span className="field-attr">Example:</span> `"BTC/USD"`

      The symbol of the currency pair.
    </ResponseField>

    <ResponseField name="[3] channel_name" type="string">
      Value: `ticker`
    </ResponseField>
  </Expandable>
</ResponseField>

## Unsubscribe

<Tabs>
  <Tab title="Request">
    <ResponseField name="event" type="string" required>
      Value: `unsubscribe`
    </ResponseField>

    <ResponseField name="pair" type="string[]">
      <span className="field-attr">Example:</span> `["BTC/USD", "MATIC/GBP"]`<br />
      <span className="field-attr">Condition:</span> All channels which support pair subscriptions

      The currency pairs to unsubscribe.
    </ResponseField>

    <ResponseField name="reqid" type="string">
      Optional client originated request identifier sent as acknowledgment in the response.
    </ResponseField>

    <ResponseField name="subscription" type="object">
      <Expandable title="properties" defaultOpen>
        <ResponseField name="name" type="string" required>
          Value: `ticker`
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Tab>

  <Tab title="Response">
    The unsubscription status is returned via the [subscriptionStatus](/exchange/api-reference/spot-websocket-v1/subscriptionstatus) message.
  </Tab>
</Tabs>

<Panel>
  <CodeGroup>
    ```json Subscribe theme={null}
    {
      "event": "subscribe",
      "pair": [
        "XBT/EUR"
      ],
      "subscription": {
        "name": "ticker"
      }
    }
    ```
  </CodeGroup>

  <CodeGroup>
    ```json Snapshot / Update theme={null}
    [
      0,
      {
        "a": [
          "5525.40000",
          1,
          "1.000"
        ],
        "b": [
          "5525.10000",
          1,
          "1.000"
        ],
        "c": [
          "5525.10000",
          "0.00398963"
        ],
        "h": [
          "5783.00000",
          "5783.00000"
        ],
        "l": [
          "5505.00000",
          "5505.00000"
        ],
        "o": [
          "5760.70000",
          "5763.40000"
        ],
        "p": [
          "5631.44067",
          "5653.78939"
        ],
        "t": [
          11493,
          16267
        ],
        "v": [
          "2634.11501494",
          "3591.17907851"
        ]
      },
      "ticker",
      "XBT/USD"
    ]
    ```
  </CodeGroup>

  <CodeGroup>
    ```json Unsubscribe theme={null}
    {
      "event": "unsubscribe",
      "pair": [
        "XBT/EUR",
        "XBT/USD"
      ],
      "subscription": {
        "name": "ticker"
      }
    }
    ```
  </CodeGroup>
</Panel>
