> For the complete documentation index, see [llms.txt](https://faq.finerymarkets.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://faq.finerymarkets.com/api-reference/websocket-api/feed-o-orders.md).

# Feed 'O' - Orders

**Requests**

{% tabs %}
{% tab title="Subscribe" %}

```json
{"event": "bind", "feed": "O", "feedId": "BTC-EUR"}
```

{% hint style="info" %}
Use `instrument name` or `instrument id` as `feedId` value to subscribe to updates for particular instrument. If `feedId` field is absent, no filter is applied.
{% endhint %}
{% endtab %}

{% tab title="Unsubscribe" %}

```json
{"event": "unbind", "feed": "O"}
```

{% endtab %}
{% endtabs %}

**Feed handling**

{% tabs %}
{% tab title="Definitions" %}

```json
order = [
  0: instrumentName (string)
  1: orderType (unsigned int16)
  2: orderSide (Efx::Side)
  3: orderCancelReason (Efx::CancelReason)
  4: orderId (Efx::OrderId)
  5: clientOrderId (Efx::ClientOrderId)
  6: orderPrice (Efx::Price)
  7: initialSize (Efx::Size)
  8: sizeLeft (Efx::Size)
  9: createdAt (Efx::Timestamp)
  10: bySizeOrByVolume (unsigned int16)
]

deal = [
  0: instrumentName (string)
  1: orderType (unsigned int16)
  2: orderSide (Efx::Side)
  3: orderCancelReason (Efx::CancelReason)
  4: orderId (Efx::OrderId)
  5: clientOrderId (Efx::ClientOrderId)
  6: orderPrice (Efx::Price)
  7: initialSize (Efx::Size)
  8: sizeOrVolumeLeft (Efx::Size)
  9: createdAt (Efx::Timestamp)
  10: dealMoment (Efx::Timestamp)
  11: dealId (Efx::DealId)
  12: dealAggressorSide (Efx::Side)
  13: dealPrice (Efx::Price)
  14: dealSize (Efx::Size)
  15: dealVolume (Efx::Size)
  16: dealDelta (Efx::Size)
  17: counterpartyId (Efx::ClientId)
  18: isOrderByVolume (unsigned int16)
  19: takerOrderOwnerId (Efx::ClientId)
  20: linkedTo (Efx::DealId)
  21: dealType (DealType)
  22: makerOrderOwnerId (Efx::ClientId)
  23: liquiditySource (Efx::LiquiditySource)
  24: balanceCurrencyUSDPrice (Efx::Price)
]
```

{% endtab %}

{% tab title="Possible Updates" %}

```
// snapshot
['O', feed_id, 'S', [array of order]]

// new order
['O', feed_id, '+', order]

// del order
['O', feed_id, '-', order]

// new deal
['O', feed_id, 'D', deal]

// failed to subscribe
['O', feed_id, 'Z', 2]

// unsubscribed
['O', feed_id, 'U', 0]
```

{% hint style="info" %}
`feed_id` is copied from subscription request and 0 if not provided
{% endhint %}
{% endtab %}
{% endtabs %}
