> ## Documentation Index
> Fetch the complete documentation index at: https://docs.omneo.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Daily market rates

> How the Currencies extension records the latest market rate on each of your currency pairs once a day, and how use_market_rate decides whether a pair converts at it.

The daily market rate keeps each currency pair's `market_rate` current without anyone entering rates by hand. It is off by default. You switch it on with the `update_market_rate` setting, and Omneo schedules the daily update for your tenant.

## What runs each day

Once a day, at the time Omneo schedules for your tenant, and only while both `enabled` and `update_market_rate` are `true`, the extension:

1. Lists the currency pairs your tenant holds, narrowed by `market_rate_currencies` if you set it. A pair from a currency to itself is skipped.
2. Looks up the latest published market rate for each pair.
3. Records it on the pair as `market_rate`, rounded to six decimal places, with `market_rate_date` set to the day the published rate belongs to.

`market_rate_date` can be earlier than today when the rate service has not yet published rates for today.

## Choosing the currencies

By default every pair your tenant holds is updated. If your tenant holds pairs for currencies you do not trade in, set `market_rate_currencies` to the currencies you use, for example `AUD,GBP`. A pair is updated only when **both** of its currencies are in the list, so `AUD,GBP` updates AUD to GBP and GBP to AUD and nothing else.

| `market_rate_currencies` | What is updated |
| - | - |
| Empty | Every pair your tenant holds |
| A list of currency codes, such as `AUD,GBP` | Only pairs with both currencies in the list |
| Anything that is not a list of 3-letter codes, such as `AUD,GB` | Nothing. The day's update fails rather than falling back to every pair. |
| Codes your tenant holds no pair between | Nothing. The day's update fails. |

Pairs outside the list keep their last `market_rate`. If one of them has `use_market_rate` set to `true`, it is no longer kept current, so add its currencies to the list or switch it back to a manual rate. Set `market_rate_currencies` before you switch on `update_market_rate`, so the first update does not cover every pair.

## Which pairs are updated

| Pair | Result |
| - | - |
| A pair your tenant holds and the rate service prices | `market_rate` and `market_rate_date` are updated. |
| A pair the rate service does not price | Left unchanged. |
| A pair your tenant does not hold | Never created. Add the pair first with the [Currency API](/api-reference/currency/add-currency). |

The run only ever writes `market_rate` and `market_rate_date`. It never changes `manual_rate` or `use_market_rate`.

## How it affects conversions

Each pair converts at a single `rate`. The pair's `use_market_rate` flag decides where that rate comes from:

| `use_market_rate` | Effect of a new market rate |
| - | - |
| `true` | The pair's `rate` becomes the new `market_rate` immediately, and every later conversion uses it. |
| `false` | The pair's `rate` stays at its `manual_rate`, or at its existing rate when no manual rate is set. The market rate is stored beside it for reference. |

This lets you watch the market rate for a pair before you switch it over. A pair switched to `use_market_rate` before its first market rate arrives keeps converting at its existing rate until one is recorded. See [Localisation](/concepts/profiles/localisation#currencies) for how pairs and their reverse directions resolve.

## Loading market rates yourself

The extension writes through the [Add market rates](/api-reference/currency/add-market-rates) endpoint. You can call the same endpoint to load rates from your own source instead. Leave `update_market_rate` off so the two sources do not overwrite each other.

## Related

* [Currencies overview](/extensions/currencies/overview)
* [Setting up the Currencies extension](/extensions/currencies/setup)
* [Localisation](/concepts/profiles/localisation)
* [Currency API](/api-reference/currency/browse-currencies)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.