Skip to main content

AgentCurrencyRatesConfig

Live exchange rates supplied to the agent so it can quote prices in the client's currency instead of inventing a rate. Rates are fetched from the selected source on a schedule and are shared platform-wide; this config only selects which pairs this agent quotes and how it should talk about them. A pair with no fetched rate available is silently omitted from the agent's context rather than guessed.

enabledEnabled

Whether the agent receives exchange rates at all. Requires at least one enabled pair.

Default value: false
sourceCurrencyRateSource

Where the rates are fetched from.

Possible values: [cbr, open_er_api]

Default value: cbr
promptPrompt

Free-text instruction shown to the agent above the rate list, applying to every pair (for example "the price list is in USD, always also state the price in rubles").

Default value:
max_staleness_minutes object

Maximum age of a fetched rate, in minutes. A rate fetched longer ago than this is dropped instead of quoted. Null means any stored rate may be used.

anyOf
integer

Possible values: >= 1

pairs object[]

The exchange rates this agent may quote.

  • Array [
  • baseCurrencyCoderequired

    Currency being converted from. The rate is expressed as "1 base = N quote".

    Possible values: [usd, eur, rub]

    quoteCurrencyCoderequired

    Currency being converted to. Must differ from base.

    Possible values: [usd, eur, rub]

    enabledEnabled

    Whether this pair is quoted. Disabled pairs are kept but never supplied to the agent.

    Default value: true
    precisionPrecision

    Number of decimal places the quoted rate is rounded to.

    Possible values: >= 0 and <= 6

    Default value: 2
    markup_percent object

    Percentage added to the market rate before it reaches the agent, for quoting above (or, when negative, below) the source rate. 0 quotes the source rate as published.

    anyOf
    number

    Possible values: >= -100 and <= 100

  • ]
  • AgentCurrencyRatesConfig
    {
    "enabled": false,
    "source": "cbr",
    "prompt": "",
    "max_staleness_minutes": 0,
    "pairs": [
    {
    "base": "usd",
    "quote": "usd",
    "enabled": true,
    "precision": 2,
    "markup_percent": 0
    }
    ]
    }