> For the complete documentation index, see [llms.txt](https://emotiv.gitbook.io/cortex-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://emotiv.gitbook.io/cortex-api/data-subscription.md).

# Data Subscription

After you opened a [session](/cortex-api/session.md) with a headset, you can [subscribe](/cortex-api/data-subscription/subscribe.md) to one or more data streams.

Each data stream gives you **real time** access to data from the headset (EEG, motion...) or data calculated by Cortex (band powers, mental command...)

After you successfully subscribe to a data stream, Cortex will keep sending you [data sample objects](/cortex-api/data-subscription/data-sample-object.md).

A subscription is linked to a [session](/cortex-api/session.md). All the subscriptions of a session are automatically cancelled when the session is closed. You can call [unsubscribe](/cortex-api/data-subscription/unsubscribe.md) to cancel a subscription.

The available data streams depend on the [license](/cortex-api/authentication/getlicenseinfo.md) of the user, and the model and [settings](/cortex-api/headset/updateheadset.md) of the headset. For an EPOC Flex, it also depends on the EEG sensor mapping.

## Data streams

Each data stream is identified by its name: "eeg", "mot", "dev", "eq", "pow", "met", "com",  "fac", "sys".

| Stream | Description                                                                                                                                                                                                                                                                                          |
| ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| eeg    | The raw EEG data from the headset.                                                                                                                                                                                                                                                                   |
| mot    | The motion data from the headset.                                                                                                                                                                                                                                                                    |
| dev    | The device data from the headset. It includes the battery level, the wireless signal strength, and the contact quality of each EEG sensor.                                                                                                                                                           |
| eq     | <p>The EEG quality of each EEG sensor.</p><p>Please read this <a href="https://emotiv.gitbook.io/cortex-manual/setting_up_your_eeg_device/view_contact_quality_map/contact-quality-cq-vs.-eeg-quality-eq">page</a> to understand the difference between the contact quality and the EEG quality.</p> |
| pow    | The band power of each EEG sensor. It includes the alpha, low beta, high beta, gamma, and theta bands.                                                                                                                                                                                               |
| met    | The results of the performance metrics detection.                                                                                                                                                                                                                                                    |
| com    | The results of the mental commands detection. You must [load a profile](/cortex-api/bci/setupprofile.md) to get meaningful results.                                                                                                                                                                  |
| fac    | The results of the facial expressions detection.                                                                                                                                                                                                                                                     |
| sys    | The system events. These events are related to the training of the mental commands and facial expressions. See [BCI](/cortex-api/bci.md) for details.                                                                                                                                                |

## Data streams availability

Depending on the license and the model of the headset, some streams may be available or not, and may send [data samples objects](/cortex-api/data-subscription/data-sample-object.md) at a different rate.

| Stream | Supported headsets                                                                                                                                 | Sample rate in hertz                                                                                                                                                                                                                                                                                                                                              |
| ------ | -------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| eeg    | All, but requires a license                                                                                                                        | <p>128 or 256, depends on the headset and its settings.</p><p>The <a href="/pages/-LfwiAQ4jWhiiImtCDps">license</a> must contain the scope "eeg".<br>You must activate the <a href="/pages/-Lft-X0O-z3lAu1VkNsw">session</a> before you subscribe.</p><p>Please check the <a href="https://emotiv.gitbook.io/emotiv-home/">documentation</a> of your headset.</p> |
| mot    | All                                                                                                                                                | <p>Disabled, 32, 64, 128, depends on the headset and its settings.</p><p>6.4 hertz for MN8.</p><p>Please check the <a href="https://emotiv.gitbook.io/emotiv-home/">documentation</a> of your headset.</p>                                                                                                                                                        |
| dev    | All                                                                                                                                                | 2                                                                                                                                                                                                                                                                                                                                                                 |
| eq     | All                                                                                                                                                | 2                                                                                                                                                                                                                                                                                                                                                                 |
| pow    | All                                                                                                                                                | 8                                                                                                                                                                                                                                                                                                                                                                 |
| met    | All (EPOC Flex requires a [special EEG sensor mapping](/cortex-api/headset/controldevice.md#special-eeg-sensor-mapping-for-epoc-flex)).            | <p>2 if the license contains the scope "pm" and you activate the <a href="/pages/-Lft-X0O-z3lAu1VkNsw">session</a> before you subscribe.<br>0.1 otherwise (1 sample every 10 seconds)</p>                                                                                                                                                                         |
| com    | All (EPOC Flex requires a [special EEG sensor mapping](/cortex-api/headset/controldevice.md#special-eeg-sensor-mapping-for-epoc-flex)).            | 8                                                                                                                                                                                                                                                                                                                                                                 |
| fac    | All (EPOC Flex requires a [special EEG sensor mapping](/cortex-api/headset/controldevice.md#special-eeg-sensor-mapping-for-epoc-flex)) except MN8. | 32                                                                                                                                                                                                                                                                                                                                                                |
| sys    | All                                                                                                                                                | No fixed rate, see [BCI](/cortex-api/bci.md) for details.                                                                                                                                                                                                                                                                                                         |
