# Overview

{% hint style="info" %}
The Terra Streaming API enables real-time data streaming to metrics such as

* Steps
* Heart Rate
* Distance covered
* etc...

on a \~per second basis.&#x20;

For longer span data, such as **workouts, sleep, daily totals & more**, please refer to the [Wearable API](https://docs.tryterra.co/health-and-fitness-api)
{% endhint %}

The **Streaming API** gives access to all wearables that broadcast data through BLE, ANT+, or certain custom bluetooth protocols as well as phone sensors

* Heart rate straps (Polar H10, Garmin HRM Pro, Wahoo TICKR FIT...)
* Certain smartwatches (Apple Watch, [Garmin Fenix 6 & up](https://support.garmin.com/en-US/?faq=Zj1947s6pqAHzBCAhLhrC9), Xiaomi Mi Band 5 & 6...)
* etc..

<div data-full-width="true"><figure><img src="https://files.readme.io/51e8eaf-image.png" alt="" width="563"><figcaption><p>Data flow diagram for data streaming</p></figcaption></figure></div>

***

## How It Works

4 components need to all be working together for the streaming API to deliver data to you

1. **Wearable Device**
2. **Producer (your mobile app, running the Terra RT SDK)**
3. **Terra WebSocket Broker (Terra's server)**
4. **Consumer (your server backend)**

Here's a simplified overview of the process:

1. **Device Connection**: The user connects their wearable device to your mobile app via Bluetooth Low Energy or ANT+, using one of Terra's real-time streaming SDKs.
2. **Producer Setup**: Your mobile app establishes a Terra Streaming Producer connection with the Terra WebSocket Service, utilizing the real-time streaming SDK.
3. **Consumer Setup**: To access the data stream on your server backend, you create a Terra Streaming Consumer connection with the Terra WebSocket Service. Once connected, the wearable data will begin streaming to your server in real time.

***

## Next steps
