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

# Instruments

> Subscribe to reference data for all active assets and tradeable pairs

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

The `instrument` channel provides a stream of reference data of all active assets and tradeable pairs.

It provides the symbol identifiers, precisions, trading parameters and rules.

## Subscribe

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

    <ResponseField name="params" type="object" required>
      <Expandable title="properties" defaultOpen>
        <ResponseField name="channel" type="string" required>
          Value: `instrument`
        </ResponseField>

        <ResponseField name="execution_venue" type="string">
          <span className="field-attr">One of:</span> `international`, `bitnomial-exchange`<br />
          <span className="field-attr">Default:</span> `international`

          The execution venue for the instrument channel. If not included, defaults to `international`.
        </ResponseField>

        <ResponseField name="include_tokenized_assets" type="boolean">
          <span className="field-attr">One of:</span> `false`, `true`<br />
          <span className="field-attr">Default:</span> `false`

          If `true`, include xStocks in the response, otherwise include crypto spot pairs only.
        </ResponseField>

        <ResponseField name="snapshot" type="boolean">
          <span className="field-attr">One of:</span> `true`, `false`<br />
          <span className="field-attr">Default:</span> `true`

          Request a snapshot after subscribing.
        </ResponseField>
      </Expandable>
    </ResponseField>

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

  <Tab title="Response">
    <ResponseField name="method" type="string" required>
      Value: `subscribe`
    </ResponseField>

    <ResponseField name="result" type="object">
      <Expandable title="properties" defaultOpen>
        <ResponseField name="channel" type="string" required>
          Value: `instrument`
        </ResponseField>

        <ResponseField name="snapshot" type="boolean">
          Indicates if a snapshot is requested.
        </ResponseField>

        <ResponseField name="warnings" type="string[]">
          An advisory message, highlighting deprecated fields or upcoming changes to the channel.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="success" type="boolean">
      Indicates if the request was successfully processed by the engine. One of: `true`, `false`
    </ResponseField>

    <ResponseField name="error" type="string">
      Error message. Condition: if `success` is `false`.
    </ResponseField>

    <ResponseField name="time_in" type="string">
      The timestamp when the subscription was received on the wire, just prior to parsing data. Format: RFC3339. Example: `2022-12-25T09:30:59.123456Z`
    </ResponseField>

    <ResponseField name="time_out" type="string">
      The timestamp when the acknowledgement was sent on the wire, just prior to transmitting data. Format: RFC3339. Example: `2022-12-25T09:30:59.123456Z`
    </ResponseField>

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

## Snapshot / Update

The snapshot and update responses share the same schema.

<ResponseField name="channel" type="string">
  Value: `instrument`
</ResponseField>

<ResponseField name="type" type="string">
  <span className="field-attr">One of:</span> `snapshot`, `update`
</ResponseField>

<ResponseField name="data" type="object">
  <Expandable title="properties" defaultOpen>
    <ResponseField name="assets" type="object[]">
      A list of assets.

      <Expandable title="properties" defaultOpen>
        <ResponseField name="borrowable" type="boolean">
          <span className="field-attr">One of:</span> `true`, `false`

          Flag if asset is borrowable.
        </ResponseField>

        <ResponseField name="collateral_value" type="float">Valuation as margin collateral (if applicable).</ResponseField>
        <ResponseField name="id" type="string">Asset identifier.</ResponseField>
        <ResponseField name="margin_rate" type="float">Interest rate to borrow the asset.</ResponseField>
        <ResponseField name="precision" type="integer">Maximum precision for asset ledger, balances.</ResponseField>
        <ResponseField name="precision_display" type="integer">Recommended display precision.</ResponseField>
        <ResponseField name="multiplier" type="float">Multiplier of the tokenised asset. Fixed conversion rate of the token.</ResponseField>
        <ResponseField name="class" type="string">Asset class (e.g. `currency`).</ResponseField>

        <ResponseField name="status" type="string">
          <span className="field-attr">One of:</span> `depositonly`, `disabled`, `enabled`, `fundingtemporarilydisabled`, `withdrawalonly`, `workinprogress`

          Status of asset.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="pairs" type="object[]">
      A list of pairs.

      <Expandable title="properties" defaultOpen>
        <ResponseField name="base" type="string">Asset identifier of the base currency.</ResponseField>
        <ResponseField name="quote" type="string">Asset identifier of the quote currency.</ResponseField>
        <ResponseField name="cost_min" type="float">Minimum cost (price \* qty) for new orders.</ResponseField>
        <ResponseField name="cost_precision" type="integer">Maximum precision used for cost prices.</ResponseField>
        <ResponseField name="has_index" type="boolean">Whether the pair has an index available for example stop-loss triggers.</ResponseField>

        <ResponseField name="margin_initial" type="float">
          <span className="field-attr">Condition:</span> On marginable pairs only

          Initial margin requirement (in percent).
        </ResponseField>

        <ResponseField name="marginable" type="boolean">
          <span className="field-attr">One of:</span> `true`, `false`

          Whether the pair can be traded on margin.
        </ResponseField>

        <ResponseField name="position_limit_long" type="integer">
          <span className="field-attr">Condition:</span> On marginable pairs only

          Limit for long positions.
        </ResponseField>

        <ResponseField name="position_limit_short" type="integer">
          <span className="field-attr">Condition:</span> On marginable pairs only

          Limit for short positions.
        </ResponseField>

        <ResponseField name="price_increment" type="float">Minimum price increment for new orders.</ResponseField>
        <ResponseField name="price_precision" type="integer">Maximum precision used for order prices.</ResponseField>
        <ResponseField name="qty_increment" type="float">Minimum quantity increment for new orders.</ResponseField>
        <ResponseField name="qty_min" type="float">Minimum quantity (in base currency) for new orders.</ResponseField>
        <ResponseField name="qty_precision" type="integer">Maximum precision used for order quantities.</ResponseField>
        <ResponseField name="ws_display_price_precision" type="integer">Recommended display precision for prices in WebSocket feeds.</ResponseField>

        <ResponseField name="status" type="string">
          <span className="field-attr">One of:</span> `cancel_only`, `delisted`, `limit_only`, `maintenance`, `online`, `post_only`, `reduce_only`, `work_in_progress`

          Status of pair.
        </ResponseField>

        <ResponseField name="symbol" type="string">
          <span className="field-attr">Example:</span> `"BTC/USD"`

          The symbol of the currency pair.
        </ResponseField>

        <ResponseField name="tick_size" type="float" deprecated>
          <span className="field-attr">Deprecated:</span> Use `price_increment`

          Minimum price increment for new orders.
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

## Unsubscribe

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

    <ResponseField name="params" type="object" required>
      <Expandable title="properties" defaultOpen>
        <ResponseField name="channel" type="string" required>
          Value: `instrument`
        </ResponseField>
      </Expandable>
    </ResponseField>

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

  <Tab title="Response">
    <ResponseField name="method" type="string" required>
      Value: `unsubscribe`
    </ResponseField>

    <ResponseField name="result" type="object">
      <Expandable title="properties" defaultOpen>
        <ResponseField name="channel" type="string" required>
          Value: `instrument`
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="success" type="boolean">
      Indicates if the request was successfully processed by the engine. One of: `true`, `false`
    </ResponseField>

    <ResponseField name="error" type="string">
      Error message. Condition: if `success` is `false`.
    </ResponseField>

    <ResponseField name="time_in" type="string">
      The timestamp when the subscription was received on the wire, just prior to parsing data. Format: RFC3339. Example: `2022-12-25T09:30:59.123456Z`
    </ResponseField>

    <ResponseField name="time_out" type="string">
      The timestamp when the acknowledgement was sent on the wire, just prior to transmitting data. Format: RFC3339. Example: `2022-12-25T09:30:59.123456Z`
    </ResponseField>

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

<Panel>
  <CodeGroup>
    ```json Subscribe Request theme={null}
    {
        "method": "subscribe",
        "params": {
            "channel": "instrument"
        },
        "req_id": 79
    }
    ```

    ```json Subscribe Response theme={null}
    {
        "method": "subscribe",
        "req_id": 79,
        "result": {
            "channel": "instrument",
            "snapshot": true,
            "warnings": [
                "tick_size is deprecated, use price_increment"
            ]
        },
        "success": true,
        "time_in": "2023-09-26T16:49:20.962586Z",
        "time_out": "2023-09-26T16:49:20.962630Z"
    }
    ```
  </CodeGroup>

  <CodeGroup>
    ```json Snapshot theme={null}
    {
        "channel": "instrument",
        "type": "snapshot",
        "data": {
            "assets": [
                {
                    "id": "USD",
                    "status": "enabled",
                    "precision": 4,
                    "precision_display": 2,
                    "borrowable": true,
                    "collateral_value": 1.0,
                    "margin_rate": 0.015
                },
                {
                    "id": "BTC",
                    "status": "enabled",
                    "precision": 10,
                    "precision_display": 5,
                    "borrowable": true,
                    "collateral_value": 1.0,
                    "margin_rate": 0.01
                },
                {
                    "id": "XRP",
                    "status": "enabled",
                    "precision": 8,
                    "precision_display": 5,
                    "borrowable": true,
                    "collateral_value": 0.0,
                    "margin_rate": 0.02
                }
            ],
            "pairs": [
                {
                    "symbol": "BTC/USD",
                    "base": "BTC",
                    "quote": "USD",
                    "status": "online",
                    "qty_precision": 8,
                    "qty_increment": 1e-08,
                    "price_precision": 1,
                    "cost_precision": 5,
                    "marginable": true,
                    "has_index": true,
                    "cost_min": 0.5,
                    "margin_initial": 0.2,
                    "position_limit_long": 250,
                    "position_limit_short": 200,
                    "tick_size": 0.1,
                    "price_increment": 0.1,
                    "qty_min": 0.0001
                },
                {
                    "symbol": "MATIC/GBP",
                    "base": "MATIC",
                    "quote": "GBP",
                    "status": "online",
                    "qty_precision": 8,
                    "qty_increment": 1e-08,
                    "price_precision": 4,
                    "cost_precision": 6,
                    "marginable": false,
                    "has_index": true,
                    "cost_min": 0.43,
                    "tick_size": 0.0001,
                    "price_increment": 0.0001,
                    "qty_min": 4.0
                }
            ]
        }
    }
    ```

    ```json Update theme={null}
    {
        "channel": "instrument",
        "type": "update",
        "data": {
           "assets": [
              {
                 "id": "BTC",
                 "status": "enabled",
                 "precision": 10,
                 "precision_display": 5,
                 "borrowable": true,
                 "collateral_value": 1.0,
                 "margin_rate": 0.01
              }
           ],
           "pairs": []
        }
    }
    ```
  </CodeGroup>

  <CodeGroup>
    ```json Unsubscribe Request theme={null}
    {
        "method": "unsubscribe",
        "params": {
            "channel": "instrument"
        },
        "req_id": 79
    }
    ```

    ```json Unsubscribe Response theme={null}
    {
        "method": "unsubscribe",
        "req_id": 79,
        "result": {
            "channel": "instrument"
        },
        "success": true,
        "time_in": "2023-09-26T16:49:20.962586Z",
        "time_out": "2023-09-26T16:49:20.962630Z"
    }
    ```
  </CodeGroup>
</Panel>
