> 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/odds88-client-api/odds88-feeds/settlement-feed.md).

# Settlement Feed

```
/feed/settlement/v4?revision=<revision>
```

`revision` - Unix time stamp seconds of the moment, from which you want to get recovery. Can be `0` for initial connection. Max value - 3 days from current time.

If you are using Odds88 risk management endpoint for bet placement, you can connect to our settlement feed to receive the outcome of each bet, once it becomes available.

{% hint style="warning" %}
The stream connection is rate-limited and there can be only 1 active connection at a time.
{% endhint %}

Rate limit configuration is the following:

* Connection attempt without revision - 5 connections per 30 minutes
* Connection attempt with too small revision - 5 connections per 30 minutes
* Connection attempt with proper revision - 5 connections per 5 minutes

**Two additional** rate limits apply to all feeds that use a timestamp as the `revision` parameter. These limits apply specifically to **recovery requests made on reconnection**.

#### 1. Large recoveries (timestamp older than 1 hour)

If a client reconnects and requests recovery from a timestamp more than **1 hour** in the past, the request is subject to a hard limit:

> **Limit:** 5 requests per 30 minutes

#### 2. Small recoveries (timestamp within the last 1 hour)

If a client reconnects and requests recovery from a timestamp within the last hour, the length of the requested recovery period is added to a **leaking bucket**:

| Parameter       | Value                                       |
| --------------- | ------------------------------------------- |
| Bucket capacity | 1 hour (3,600 seconds)                      |
| Leak rate       | 4 seconds drained per 1 second of real time |

Once the bucket is full, further recovery requests are blocked until enough has drained.

#### Practical examples

**✅ Within limits** A client that drops and reconnects every **5 minutes** requesting a **10-minute** recovery will operate well under the limit and notice no impact.

**❌ Will be blocked** A client that reconnects every **5 minutes** requesting a **30-minute** recovery will fill the bucket faster than it can drain, and will eventually be blocked.

#### Summary

Frequent reconnects are fine — as long as the requested recovery window stays **proportionate to the reconnect interval**.

## Message Format

## The Marlin.SportsbetApi.Models.Settlement.SettlementFeedMessageDto object

```json
{"openapi":"3.0.4","info":{"title":"[T728-STAGE] Odds88 API","version":"v1"},"components":{"schemas":{"Marlin.SportsbetApi.Models.Settlement.SettlementFeedMessageDto":{"type":"object","properties":{"pingId":{"type":"string","description":"Message ping id, if the message is a ping","nullable":true},"data":{"allOf":[{"$ref":"#/components/schemas/Marlin.SportsbetApi.Models.Settlement.SettledBetViewModelV3"}],"description":"Message data","nullable":true}},"additionalProperties":false,"description":"Ping message wrapper for Marlin.SportsbetApi.Models.Settlement.SettledBetViewModelV3"},"Marlin.SportsbetApi.Models.Settlement.SettledBetViewModelV3":{"type":"object","properties":{"betId":{"type":"string","description":"Original bet id.","nullable":true},"betSettlement":{"allOf":[{"$ref":"#/components/schemas/Marlin.SportsbetApi.Models.Settlement.SettlementResult"}],"description":"Settlement of the bet.\n\n* `0` - None\n* `1` - Win\n* `2` - Lose\n* `3` - Refund\n* `4` - HalfWin\n* `5` - HalfLose\n* `6` - CashOut\n* `7` - PlaceWin"},"payoutMultiplier":{"type":"number","description":"Multiplier which was applied to the payout.","format":"double"},"isCancelled":{"type":"boolean","description":"Gets whether bet was cancelled or not."},"selections":{"type":"array","items":{"$ref":"#/components/schemas/Marlin.SportsbetApi.Models.Settlement.SettledBetItemViewModel"},"description":"List of bet items for which the bet was places.","nullable":true},"isRejected":{"type":"boolean","description":"Bet rejected flag."},"settlementTime":{"type":"string","description":"Bet settlement timestamp","format":"date-time"},"payout":{"type":"number","description":"Payout calculated from initial amount and settlement.","format":"double"},"partialRefund":{"type":"number","description":"Amount partially refunded (specific to exotic bets).","format":"double"},"settlementVersion":{"type":"integer","description":"Bet-level settlement version, incremented each time the bet is (re)settled.","format":"int32"},"amount":{"allOf":[{"$ref":"#/components/schemas/Marlin.SportsbetApi.Models.Settlement.BetAmountViewModel"}],"description":"Initial amount of the bet.","nullable":true}},"additionalProperties":false,"description":"Represents message about bet settlement."},"Marlin.SportsbetApi.Models.Settlement.SettlementResult":{"enum":[0,1,2,3,4,5,6,7],"type":"integer","description":"Settlement result of the bet.\n\n* `0` - None\n* `1` - Win\n* `2` - Lose\n* `3` - Refund\n* `4` - HalfWin\n* `5` - HalfLose\n* `6` - CashOut\n* `7` - PlaceWin","format":"int32"},"Marlin.SportsbetApi.Models.Settlement.SettledBetItemViewModel":{"type":"object","properties":{"event":{"allOf":[{"$ref":"#/components/schemas/Marlin.SportsbetApi.Models.Settlement.EventInfoViewModel"}],"description":"Event associated with the bet item.","nullable":true},"market":{"allOf":[{"$ref":"#/components/schemas/Marlin.SportsbetApi.Models.Settlement.MarketViewModel"}],"description":"Market associated with the bet item.","nullable":true},"selectionId":{"type":"integer","description":"Id of the selection to which the bet item was placed.","format":"int64"},"competitionId":{"type":"integer","description":"Id of the competition of the associated event.","format":"int64"},"countryId":{"type":"integer","description":"Id of the country of the associated event.","format":"int64"},"sportId":{"type":"integer","description":"Id of the sport of the associated event.","format":"int64"},"settlement":{"allOf":[{"$ref":"#/components/schemas/Marlin.SportsbetApi.Models.Settlement.SettlementInfoViewModel"}],"description":"Bet item settlement details.","nullable":true},"price":{"type":"number","description":"Original price for which the bet was placed.","format":"double","nullable":true},"eachWayPrice":{"allOf":[{"$ref":"#/components/schemas/Marlin.SportsbetApi.Models.Settlement.EachWayPriceModel"}],"description":"Each-Way price details for the bet item.\nWill be null if bet was not placed as Each-Way.","nullable":true},"limitsRatingId":{"type":"integer","description":"Limit id for which the bet was placed.","format":"int64","nullable":true},"limitsFactor":{"type":"number","description":"Factor of the corresponding limit id.","format":"double"},"hasLineDeviation":{"type":"boolean","description":"Gets whether bet has live deviation."},"isOutright":{"type":"boolean","description":"Gets whether bet was placed on outright event."},"version":{"type":"integer","description":"Gets version of the bet item.","format":"int32"},"deadHeatFactor":{"type":"number","description":"Gets dead heat factor of the bet item.","format":"double","nullable":true},"placeDeadHeatFactor":{"type":"number","description":"Gets dead heat factor for place market of the bet item.\nValid for each-way bets.","format":"double","nullable":true},"parameters":{"type":"object","additionalProperties":{"type":"string"},"description":"Gets parameters of the bet item selection.","nullable":true},"manualPrice":{"type":"number","description":"Manual price of the bet.","format":"double","nullable":true},"alternativePrice":{"type":"number","description":"Alternative price of the bet.","format":"double","nullable":true},"type":{"allOf":[{"$ref":"#/components/schemas/Marlin.SportsbetApi.Models.Settlement.BetItemType"}],"description":"Bet item type.\n\n* `1` - Standard\n* `2` - StartingPrice\n* `3` - ToteExotics\n* `4` - FixedExotics\n* `5` - BetBuilder\n* `6` - Pickem\n* `7` - EachWay\n* `8` - ToteSingleRunner"},"betBuilderItems":{"type":"array","items":{"$ref":"#/components/schemas/Marlin.SportsbetApi.Models.Settlement.SettledBetBuilderItemViewModel"},"description":"List of BetBuilder items.","nullable":true}},"additionalProperties":false,"description":"Represents a single bet item."},"Marlin.SportsbetApi.Models.Settlement.EventInfoViewModel":{"type":"object","properties":{"id":{"type":"integer","description":"Id of the event.","format":"int64"},"name":{"type":"string","description":"Name of the event.","nullable":true},"isLive":{"type":"boolean","description":"Whether event is live or prematch."},"startTime":{"type":"string","description":"Event start time (if available).","format":"date-time","nullable":true}},"additionalProperties":false,"description":"Represents event information for bet item."},"Marlin.SportsbetApi.Models.Settlement.MarketViewModel":{"type":"object","properties":{"id":{"type":"integer","description":"Id of the market for the associated bet item.","format":"int64"},"type":{"type":"integer","description":"Type id of the market for the associated bet item.","format":"int64"},"name":{"type":"string","description":"Name of the market for the associated bet item.","nullable":true},"properties":{"type":"object","additionalProperties":{"type":"string"},"description":"Extra properties of the market for the associated bet item.","nullable":true}},"additionalProperties":false,"description":"Represents market information for bet item."},"Marlin.SportsbetApi.Models.Settlement.SettlementInfoViewModel":{"type":"object","properties":{"settlementResult":{"allOf":[{"$ref":"#/components/schemas/Marlin.SportsbetApi.Models.Settlement.SettlementResult"}],"description":"Settlement result of the bet item.\n\n* `0` - None\n* `1` - Win\n* `2` - Lose\n* `3` - Refund\n* `4` - HalfWin\n* `5` - HalfLose\n* `6` - CashOut\n* `7` - PlaceWin"},"settlementTime":{"type":"string","description":"At what time did settlement happen.","format":"date-time","nullable":true},"settlementVersion":{"type":"integer","description":"Version of the settlement in case if bet was resettled.","format":"int32"},"isManualSettlement":{"type":"boolean","description":"Indicates if the settlement was done manually."}},"additionalProperties":false,"description":"Contains information about bet item settlement."},"Marlin.SportsbetApi.Models.Settlement.EachWayPriceModel":{"type":"object","properties":{"win":{"type":"number","description":"Price value for the win market","format":"double","nullable":true},"place":{"type":"number","description":"Price value for the place market","format":"double","nullable":true}},"additionalProperties":false,"description":"Contains information about each-way price of the bet item."},"Marlin.SportsbetApi.Models.Settlement.BetItemType":{"enum":[1,2,3,4,5,6,7,8],"type":"integer","description":"Type of the bet item.\n\n* `1` - Standard\n* `2` - StartingPrice\n* `3` - ToteExotics\n* `4` - FixedExotics\n* `5` - BetBuilder\n* `6` - Pickem\n* `7` - EachWay\n* `8` - ToteSingleRunner","format":"int32"},"Marlin.SportsbetApi.Models.Settlement.SettledBetBuilderItemViewModel":{"type":"object","properties":{"market":{"allOf":[{"$ref":"#/components/schemas/Marlin.SportsbetApi.Models.Settlement.MarketViewModel"}],"description":"Market associated with the BetBuilder item.","nullable":true},"selectionId":{"type":"integer","description":"Id of the selection to which the BetBuilder item was placed.","format":"int64"},"settlement":{"allOf":[{"$ref":"#/components/schemas/Marlin.SportsbetApi.Models.Settlement.SettlementInfoViewModel"}],"description":"Settlement details of the BetBuilder item.","nullable":true}},"additionalProperties":false,"description":"Represents a BetBuilder item."},"Marlin.SportsbetApi.Models.Settlement.BetAmountViewModel":{"type":"object","properties":{"currency":{"type":"string","description":"Currency ticker symbol","nullable":true},"value":{"type":"integer","description":"Amount in local currency","format":"int64"},"precision":{"type":"integer","description":"Precision value for the provided currency","format":"int32"},"placementExchangeRate":{"type":"number","description":"Exchange rate value when the bet is placed","format":"double"},"settlementExchangeRate":{"type":"number","description":"Exchange rate value when the bet is settled","format":"double","nullable":true}},"additionalProperties":false,"description":"Bet amount view model"}}}}
```
