# 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)
* [MarketIndex](https://dataloy-systems.stoplight.io/docs/dataloyModel/model/schemas/market-index) (validation only)
* [MarketIndex](https://dataloy-systems.stoplight.io/docs/dataloyModel/model/schemas/market-index)&#x20;
  * Any custom market index that have the market index you are editing of adding a market index value to will be recalculated if all other market indices in the custom market index has been updated today
* [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. Validation will still run when deleting, and deleting a market index value for a market index that is part of a custom market index is not allowed.

## Workflow

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

In order to update multiple index values at once, it is recommended to use the [BulkUpdateIncrement](/api-release-8.24/user-guides/enterprise-functionality/bulk-update-increment.md) 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"
}
```


---

# 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://api.dataloy.com/api-release-8.24/user-guides/market-index-integration-api/tc-rate-market-indices.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.
