# 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](/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":{marketIndexValueKey1},
    "validFromDate": "2026-03-01T00:00:00",
    "validToDate": "2026-03-31T00:00:00",
    "marketIndexValue": 5300
  },
  {
    "key":{marketIndexValueKey2},
    "validFromDate": "2026-04-01T00:00:00",
    "validToDate": "2026-04-30T00:00:00",
    "marketIndexValue": 6400
  },
  {
    "key":{marketIndexValueKey3},
    "validFromDate": "2026-01-01T00:00:00",
    "validToDate": "2026-04-30T00:00:00",
    "marketIndexValue": 7000
  },
  {
    "key":{marketIndexValueKey4},
    "validFromDate": "2026-05-1T00:00:00",
    "validToDate": "2026-05-31T00:00:00",
    "marketIndexValue": 7100
  }
]
```

### **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",
    "publishedDate": "2025-07-08T00:00:00"
}
```

Posting a market index value without:

* marketIndexValueType :
  * Will default to SPOT if either&#x20;
    * ValidFromDate is null
    * validToDate is null
    * ValidFromDate == ValidToDate
  * Else it will get FORWARD
* ValidFromDate
  * If market index value is SPOT
    * Will use ValidToDate
  * Else will fail at validation since valid from date is required
* ValidToDate
  * If market index value is SPOT
    * Will use ValidFromDate
  * Else will fail at validation since validToDate is required
* PublishedDate
  * If market index value is SPOT
    * Sets PublishedDate = ValidFromDate
  * Else
    * Todays date at 00:00 UTC+0


---

# 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/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.
