# 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)
]
```

{% 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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://faq.finerymarkets.com/api-reference/websocket-api/feed-o-orders.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
