# Message Structure

This section documents the complete structure of all message types delivered through the TRADE RabbitMQ feed.

## Overview

TRADE sends data in structured messages, each with a specific type identifier. Messages are delivered in either JSON or XML format based on your package configuration.

## Message Categories

### Standard Messages

| Message Type                                                       | Type ID | Description                   |
| ------------------------------------------------------------------ | ------- | ----------------------------- |
| [Fixture](/u/trade/integration/message-structure/fixture.md)       | 1       | Fixture metadata updates      |
| [Livescore](/u/trade/integration/message-structure/livescore.md)   | 2       | Live score and period updates |
| [Market](/u/trade/integration/message-structure/market.md)         | 3       | Odds and market updates       |
| [Settlement](/u/trade/integration/message-structure/settlement.md) | 35      | Bet settlement information    |
| [Heartbeat](/u/trade/integration/message-structure/heartbeat.md)   | 32      | Connection health indicator   |
| [Keep Alive](/u/trade/integration/message-structure/keep-alive.md) | 31      | Active fixtures list          |

### Outright Messages

| Message Type                                                                         | Type ID | Description             |
| ------------------------------------------------------------------------------------ | ------- | ----------------------- |
| [Outright Fixture](/u/trade/integration/message-structure/outright-fixture.md)       | 37      | Outright event metadata |
| [Outright Livescore](/u/trade/integration/message-structure/outright-livescore.md)   | 39      | Outright live updates   |
| [Outright Market](/u/trade/integration/message-structure/outright-market.md)         | 41      | Outright odds updates   |
| [Outright Settlement](/u/trade/integration/message-structure/outright-settlement.md) | 42      | Outright settlements    |

### Outright League Messages

| Message Type                                                                                       | Type ID | Description                 |
| -------------------------------------------------------------------------------------------------- | ------- | --------------------------- |
| [Outright League Fixture](/u/trade/integration/message-structure/outright-league-fixture.md)       | 38      | League outright metadata    |
| [Outright League Market](/u/trade/integration/message-structure/outright-league-market.md)         | 40      | League outright odds        |
| [Outright League Settlement](/u/trade/integration/message-structure/outright-league-settlement.md) | 43      | League outright settlements |

## Message Headers

All messages contain headers with routing and metadata information:

* [RabbitMQ Header](/u/trade/integration/message-structure/rabbitmq-header.md) - Transport-level headers
* [TRADE Message Header](/u/trade/integration/message-structure/trade-message-header.md) - Application-level headers

{% hint style="info" %}
**New:** RabbitMQ headers now include `SportId`, allowing you to route or filter messages by sport without deserializing the message body. Available on all message types except Keep Alive and Heartbeat.
{% endhint %}

## Message Format

Messages follow a consistent structure:

```json
{
  "Header": {
    "Type": 3,
    "MsgSeq": 12345,
    "MsgGuid": "uuid-here",
    "ServerTimestamp": 1234567890
  },
  "Body": {
    // Message-specific content
  }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.lsports.eu/u/trade/integration/message-structure.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
