# TC Rate Market Indices

## Calculation overview

When making changes to a TC Rate Market Index - by adding or editing a MarketIndexValue - the following related objects will be recalculated:

* [MarketIndexValue](https://dataloy-systems.stoplight.io/docs/dataloyModel/model/schemas/market-index-value) (validation only)
* [MarketIndex](https://dataloy-systems.stoplight.io/docs/dataloyModel/model/schemas/market-index) (validation only)
* [TcRate](https://dataloy-systems.stoplight.io/docs/dataloyModel/model/schemas/tc-rate)
* [TcDuration](https://dataloy-systems.stoplight.io/docs/dataloyModel/model/schemas/tc-duration)
* [Tc](https://dataloy-systems.stoplight.io/docs/dataloyModel/model/schemas/tc)
* [Offhire](https://dataloy-systems.stoplight.io/docs/dataloyModel/model/schemas/offhire)
* [Voyage](https://dataloy-systems.stoplight.io/docs/dataloyModel/model/schemas/voyage)

Recalculation is triggered by a **POST** or **PUT** request on the **MarketIndexValue** endpoint. The scope of objects being recalculated is limited by the **validFrom** date on the **MarketIndexValue**; such that, for instance, a voyage that ends before the **validFrom** date is not recalculated.

**DELETE** requests do not trigger a recalculation at this time.

## Workflow

### **Step 1: Bulk Updating Forward Estimates/Rates**

In order to update multiple index values at once, it is recommended to use the [BulkUpdateIncrement](https://api.dataloy.com/api-release-8.14/user-guides/enterprise-functionality/bulk-update-increment) feature.&#x20;

{% hint style="warning" %}
While it is possible to trigger all recalculations at once, it is **highly** recommended to add the header *disablebl* with value set to *true* when using the BulkUpdateIncrement feature on MarketIndexValues. This is in order to mitigate calculation costs, and concurrency problems for objects with overlapping.
{% endhint %}

Example:

```
https://{host}/ws/rest/MarketIndexValue/bulkUpdateIncrement
```

```json
[
    {
        "key": 5367743677,
        "marketIndexValue": 10500,
        "validFromDate": "2025-07-10T00:00:00"
    },
    {
        "key": 5367743678,
        "marketIndexValue": 10750,
        "validFromDate": "2025-07-17T00:00:00"
    },
    {
        "key": 5367743732,
        "marketIndexValue": 10600,
        "validFromDate": "2025-08-01T00:00:00"
    }
]
```

### **Step 2: Updating todays MarketIndexValue**

We can now update todays MarketIndexValue, and trigger a recalculation of all related objects.&#x20;

#### **Option A: PUT on existing MarketIndexValue**

```
https://{host}/ws/rest/MarketIndexValue/{key}
```

```json
{
    "marketIndexValue": 10250
}
```

#### **Option B: POST a new MarketIndexValue**

```
https://{host}/ws/rest/MarketIndexValue
```

```json
{
    "marketIndex": {marketIndexCode},
    "marketIndexValue": 10400,
    "validFromDate": "2025-07-08T00:00:00"
}
```
