Source: https://databento.com/docs/datasets/ocea-memoir


# Blue Ocean ATS MEMOIR Depth

**Dataset ID**: [OCEA.MEMOIR]($PLATFORM_HOSTNAME/catalog/us-equities#OCEA.MEMOIR)

Blue Ocean ATS disseminates full depth-of-book data for its venue through its Blue Ocean ATS MEMOIR Depth feed, which Databento receives over UDP multicast in our NY4 data center.

This dataset captures Blue Ocean ATS trading activity in US equities during the Blue Ocean Session, which runs from 8:00 PM to 4:00 AM ET, Sunday through Thursday.

### Symbol convention

Raw symbols in this dataset use the **CMS** convention (e.g. `BRK B`, `AAC WS`); the source feed splits root and suffix across the `Symbol` and `SymbolSfx` fields, which Databento joins with a space (see [Definition normalization](https://databento.com/docs/datasets/ocea-memoir.md#definition-normalization)).
See [CMS vs. Nasdaq symbology](https://databento.com/docs/conventions/symbology.md#raw-symbol) for the per-dataset convention map.

### Timestamps

Blue Ocean messages received by Databento include one exchange timestamp with nanosecond precision.
As with all of our datasets, we also collect a `ts_recv` timestamp when the packet was received by our capture server.
Blue Ocean does not include an exchange send timestamp, so `ts_in_delta` is set to `0` for normalized MBO and trades records.

| Databento Field | MEMOIR Field | Description |
| `ts_recv` | N/A | The capture-server-received timestamp. |
| `ts_event` | Timestamp | The matching-engine-received timestamp. |
| `ts_in_delta` | N/A | Set to `0` because Blue Ocean does not include an exchange send timestamp. |

More details about our timestamps are available in our [timestamping guide](https://databento.com/docs/architecture/timestamping-guide.md).

### MBO normalization

There are six MEMOIR message types that directly affect displayed book state or trade prints.
Databento normalizes these messages to MBO records as follows:

| Databento Message(s) | MEMOIR Message | Description |
| **A**dd | *Order Added* | Adds a new displayed order with `order_id`, `side`, `price`, and `size`. |
| **C**ancel | *Order Deleted* | Removes a displayed order. `size` is the displayed quantity removed from the book. |
| **C**ancel | *Order Reduced* | Reduces a displayed order without changing time priority. `size` is the quantity removed from the order. |
| **T**rade, **F**ill, **C**ancel | *Order Executed* | Executes a displayed order and updates displayed quantity by the executed amount. |
| **T**rade | *Trade* | Non-displayed execution. Does not modify displayed book state. |
| Clea**R** | *Clear Book* | Clears all displayed orders for the specified instrument. |

For *Order Executed* messages, the aggressing order is not included in MEMOIR, so normalized **T**rade records have `order_id` set to `0`.
Normalized records from a single native message share the same `sequence`.
For *Order Executed* and *Trade*, Databento also publishes records in the [trades schema](https://databento.com/docs/schemas/trades.md).

### Trade side normalization

For trade-derived records across the MBO, MBP-1, MBP-10, and trades schemas, the `side` field indicates the side that initiates the event.

For `Order Executed`, Databento sets `side` to the aggressive order side, which is the opposite of the resting order side in the book.

For `Trade`, the feed does not provide enough information to infer the aggressor, so the `side` is **N**one.

### Messages currently not normalized

Databento does not emit MBO, trades, status, or definition output from these native message types:

- *Broken Trade*
- *Corrected Trade*

### Status normalization

Status records are normalized from three MEMOIR messages:

- *Security Trading Status*
- *Trading Session Status*
- *Reg SHO Restriction*

**Security Trading Status**

| Databento Action | Is trading | Is quoting | MEMOIR SecurityTradingStatus |
| `8` (Halt) | No | No | `H` (Halted) |
| `9` (Pause) | No | No | `P` (Paused) |
| `3` (Quoting) | No | Yes | `Q` (Quoting) |
| `7` (Trading) | Yes | Yes | `T` (Trading) |

MEMOIR `SecurityTradingStatusReason` is normalized to status `reason`:

| Databento Reason | MEMOIR SecurityTradingStatusReason |
| None | `X` (None) |
| Regulatory | `R` (Regulatory) |
| Administrative | `A` (Administrative) |

**Trading Session Status**

| Databento Action | Is trading | Is quoting | MEMOIR TradingSession |
| `1` (Pre-open) | No | Yes | `1` (Opening) |
| `7` (Trading) | Yes | Yes | `2` (Trading) |
| `13` (Post-close) | Yes | Yes | `3` (PostTrading) |
| `12` (Close) | No | No | `4` (Closed) |

**Reg SHO Restriction**

`RegSHORestriction` is normalized to a status record for a short sell restriction change and updates `is_short_sell_restricted` from the source `ShortSaleRestriction` flag.

Status publication is gated until both system-level state (`Trading Session Status`) and per-instrument state (`Security Trading Status`) are known.

### Definition normalization

Definition records are sourced from *Instrument Directory* messages.

| Databento Field | MEMOIR Field | Description |
| `raw_instrument_id` | `SecurityID` | Native session-scoped identifier. |
| `raw_symbol` | `Symbol` + `SymbolSfx` | CMS root and suffix combined with a space into Databento raw symbol. |
| `min_lot_size_round_lot` | `RoundLot` | Round lot size. |
| `min_price_increment_amount` | `MPV` | Minimum price variation converted to Databento's 1e-9 price units. |

If a security is updated intraday, the corresponding definition is republished with updated values.
Databento also sets `exchange` to `OCEA` and `match_algorithm` to `F` (FIFO).

### Flags normalization

The `F_PUBLISHER_SPECIFIC` flag provides no additional meaning in this dataset and can be safely ignored.
