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

# Currency Conversion

> Public channel for streaming real-time currency conversion rates.

<Note>Public channel. Connect to: `wss://wss.prime.kraken.com/ws/v1`</Note>

Request for stream of currency conversion rates.

## Subscribe Request

<Tabs>
  <Tab title="Subscribe Schema">
    <ParamField path="reqid" type="number" required>
      Request ID - will be echoed back in the response structure.
    </ParamField>

    <ParamField path="type" type="string" required>
      Request type. Value: `subscribe`
    </ParamField>

    <ParamField path="streams" type="array" required>
      Array containing the Currency Conversion stream configuration.

      <Expandable title="properties">
        <ParamField path="name" type="string" required>
          Subscription name. Value: `CurrencyConversion`
        </ParamField>

        <ParamField path="EquivalentCurrency" type="string" required>
          Quote currency to base the conversion rates on.
        </ParamField>

        <ParamField path="Currencies" type="array">
          List of currencies and securities to generate conversion rates for; defaults to all available currencies.
        </ParamField>

        <ParamField path="Throttle" type="string">
          Optional throttle interval for conversion rate updates. Minimal/default value: 10s.
        </ParamField>

        <ParamField path="Tolerance" type="string">
          Optional param to indicate what conversion rate percent change should trigger sending out an update. Minimal/default value: 0.0001 which means 1 bps.
        </ParamField>
      </Expandable>
    </ParamField>
  </Tab>

  <Tab title="Example">
    ```json theme={null}
    {
      "reqid": 4,
      "type": "subscribe",
      "streams": [
        {
          "name": "CurrencyConversion",
          "EquivalentCurrency": "USD",
          "Currencies": ["BTC", "ETH", "BCH-USD"],
          "Throttle": "15s",
          "Tolerance": "0.0002"
        }
      ]
    }
    ```
  </Tab>
</Tabs>

## Response

<Tabs>
  <Tab title="Response Schema">
    <ParamField path="reqid" type="number" required>
      A number that relates this response to a request.
    </ParamField>

    <ParamField path="type" type="string" required>
      The type of message sent.
    </ParamField>

    <ParamField path="ts" type="string" required>
      An ISO-8601 UTC string of the form `2019-02-13T05:17:32.000000Z`.
    </ParamField>

    <ParamField path="initial" type="boolean">
      If this is initial data for a request, the initial flag will be set.
    </ParamField>

    <ParamField path="seqNum" type="number" required>
      The sequence number for this response per request.
    </ParamField>

    <ParamField path="action" type="string">
      "Update" or "Remove" - tells the client if the given entity should be removed or added/updated.
    </ParamField>

    <ParamField path="data" type="array" required>
      Array of CurrencyConversion data.

      <Expandable title="properties">
        <ParamField path="Timestamp" type="string" required>
          Timestamp of message publication.
        </ParamField>

        <ParamField path="EquivalentCurrency" type="string" required>
          Currency symbol for equivalent currency.
        </ParamField>

        <ParamField path="Currency" type="string" required>
          Currency symbol for base currency on conversion.
        </ParamField>

        <ParamField path="Rate" type="string" required>
          Currency conversion rate.
        </ParamField>

        <ParamField path="Status" type="string" required>
          Status of the conversion rate.
        </ParamField>

        <ParamField path="ConversionPath" type="string" required>
          Path used for the conversion.
        </ParamField>
      </Expandable>
    </ParamField>
  </Tab>

  <Tab title="Example">
    ```json theme={null}
    {
      "reqid": 4,
      "type": "CurrencyConversion",
      "ts": "2021-09-14T22:16:18.604996Z",
      "initial": true,
      "seqNum": 1,
      "data": [
        {
          "Timestamp": "2021-09-14T22:16:18.604674Z",
          "EquivalentCurrency": "USD",
          "Currency": "ETH",
          "Rate": "3368.16",
          "Status": "Online",
          "ConversionPath": "(ETH-USD)"
        },
        {
          "Timestamp": "2021-09-14T22:16:18.604674Z",
          "EquivalentCurrency": "USD",
          "Currency": "BTC",
          "Rate": "46841.35",
          "Status": "Online",
          "ConversionPath": "(BTC-USD)"
        }
      ]
    }
    ```
  </Tab>
</Tabs>
