# Prices

## Stream Price bars in an OHLCV chart for pairs or assets in Standard spot exchange

### ✅ Request

{% tabs %}
{% tab title="Subscription" %}
{% code title="Subscription" %}

```json
{
  "id": 1,
  "method": "spot.bars.subscribe",
  "params": {
    "ids": ["ETH/USDC-PairMin", "ETH-TokenMin"]
  }
}
```

{% endcode %}
{% endtab %}

{% tab title="Unsubscription" %}
{% code title="Unsubscription" %}

```json
{
  "id": 1,
  "method": "spot.bars.unsubscribe",
  "params": {
    "ids": ["ETH/USDC-PairMin", "ETH-TokenMin"]
  }
}
```

{% endcode %}
{% endtab %}
{% endtabs %}

### 📤 Response

{% tabs %}
{% tab title="Success" %}
{% code title="Success" %}

```json
{
  "result": null,
  "id": 1
}
```

{% endcode %}
{% endtab %}

{% tab title="Error" %}
{% code title="Error" %}

```json
{
  "code": 1,
  "msg": "Internal Error: {error}"
}
```

{% endcode %}
{% endtab %}
{% endtabs %}

### 📡 Streamed Data Format

{% code title="Bar Stream" %}

```json
[
    "spotBar",
    "ETH/USDC-PairMin",
    "1600.18",
    1713659300,
    1200.12
]
```

{% endcode %}

### 📄 Field Descriptions

| Index | Field       | Type      | Description                                  |
| ----- | ----------- | --------- | -------------------------------------------- |
| 0     | `eventId`   | `string`  | Unique event identifier                      |
| 1     | `id`        | `string`  | Unique identifier (e.g. `ETH/USDC-PairMin`)  |
| 2     | `price`     | `float`   | Price                                        |
| 3     | `timestamp` | `integer` | UNIX timestamp of the event                  |
| 4     | `volume`    | `float`   | Volume (default or placeholder value is `0`) |
