# Feed 'S' - Settlement orders

**Requests**

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

```json
{"event": "bind", "feed": "S", "feedId": "EUR"}
```

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

{% tab title="Unsubscribe" %}

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

{% endtab %}
{% endtabs %}

**Feed handling**

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

```json
settlementOrder = {
  "settlementOrderId": Efx::OrderId,
  "clientId": Efx::ClientId,
  "counterpartyId": Efx::ClientId,
  "createdAt": Efx::Timestamp,
  "comment": string,
  "flags": uint,
  "currency1": string,
  "size1": Efx::Size,
  "network1": string,  // optional
  "currency2": string, // optional
  "size2": Efx::Size,  // optional
  "network2": string   // optional
}

settlementDeal = {
  "settlementOrderId": Efx::OrderId,
  "clientId": Efx::ClientId,
  "counterpartyId": Efx::ClientId,
  "createdAt": Efx::Timestamp,
  "comment": string,
  "flags": uint,
  "currency1": string,
  "size1": Efx::Size,
  "network1": string,  // optional
  "currency2": string, // optional
  "size2": Efx::Size,  // optional
  "network2": string,  // optional
  "settlementId": Efx::DealId,
  "commitedAt": Efx::Timestamp
}
```

{% endtab %}

{% tab title="Possible Updates" %}

```
// snapshot
['S', feed_id, 'S', [array of settlementOrder]]

// settlement order added
['S', feed_id, '+', [array ofsettlementOrder]]

// settlement order modified
['S', feed_id, 'M', [array of settlementOrder]]

// settlement order executed
['S', feed_id, 'D', [array of settlementDeal]]

// settlement order removed
['S', feed_id, '-', [array of settlementOrder]]

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

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

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