> For the complete documentation index, see [llms.txt](https://docs.odds88.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.odds88.io/integration-process/recommended-integration-flow/metadata-feed.md).

# Metadata Feed

{% content-ref url="/pages/HjCugoE6BZ6tHCAEI1Sg" %}
[Metadata Feed](/odds88-client-api/odds88-feeds/metadata-feed.md)
{% endcontent-ref %}

* Establish connection to metadata feed.
* Metadata has one type of message, which contains metadata for an event. Depending on the type of sport it can have different types of metadata.
* Store received data in database or cache.
* It is highly recommended to display metadata for Thoroughbreds, Greyhounds and Harness. For these sports metadata is displayed in cards for competitors. It is your decision, what metadata and how to show.
* Reconnection should be automatically handled by integration. Automatic Reconnection should happen with `revision` **= UNIX timestamp seconds of last received message - 60 seconds**
* If a sport has metadata type listed, it **doesn’t guarantee** this type is available for all events in this sport.
* What metadata types are sent for sports can be checked in the Metadata API section.

{% content-ref url="/pages/pwg5sZEvLfdflkvSxByU" %}
[Metadata API](/odds88-client-api/odds88-api-endpoints/metadata-api.md)
{% endcontent-ref %}

### **Heartbeat Support** <a href="#id-5.-heartbeat-support" id="id-5.-heartbeat-support"></a>

The new endpoint supports heartbeat messages so it's possible to differentiate idle periods from technical issues.

**Heartbeat Timing**

* Heartbeat every **10 seconds**
* Expected flow: Delta **or** Heartbeat message

**Connection Timeout Rules**\
If there is no delta **or** heartbeat messages received for 30 seconds then it's required to close current connection and reconnect using **LastUpdatedTime** from last processed message.\
Our system closes stale connections automatically.

### **Message Wrapper Structure** <a href="#id-6.-message-wrapper-structure" id="id-6.-message-wrapper-structure"></a>

All messages (deltas or heartbeats) are wrapped in the following structure:

```json
{
  "Payload": "Nullable<DeltaDto>",      /// Message payload. Null for ping messages.
  "PingId": "Nullable<string>",         /// Non-null only for ping messages.
  "TimestampUtc": "DateTime",           /// UTC timestamp when the message was generated by the Odds88 engine.
  "PublishTimestampUtc": "DateTime"     /// UTC timestamp when the message was published to the client.
}
```
