Get indicators
get_indicatorsCalculates indicators for a currency pair. Use it when the user names a currency pair and wants indicators, such as "RSI and MACD for EUR/USD" or "50-day SMA for USD/JPY on the weekly chart". Pass symbol as two ISO currency codes (for example EUR/USD), interval 1d (default) or 1w, and indicators from sma, ema, rsi, macd and bollinger; optionally periods and series_length. Reads the European Central Bank's daily euro reference rates, so it covers its 30 currencies and only close-based indicators; stocks, crypto, atr, stochastic and vwap need compute_indicators with the user's own candles. Returns the latest value and a short series for each indicator, with the source and the date of the last rate. Informational only, not financial advice; gives no signals.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | Currency pair of two ISO codes, such as "EUR/USD" or "USDJPY" | |
| periods | No | Lookback length per indicator, in candles; any left out use the default shown | |
| interval | No | 1d (one value per ECB fixing, the default) or 1w (the last fixing of each week) | |
| indicators | Yes | Indicators to calculate: sma, ema, rsi, macd (12, 26, 9), bollinger (2 standard deviations), atr, stochastic (%K and %D) and vwap (cumulative over the given candles) | |
| series_length | No | How many of the most recent values to return for each indicator, 5 by default |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| asOf | Yes | Date or time of the last price used | |
| error | No | Present when status is not ok: a stable code, what went wrong and what to do next. | |
| notice | Yes | ||
| source | Yes | Where the prices came from | |
| status | Yes | ||
| symbol | No | The pair as BASE/QUOTE; the price is how many QUOTE one BASE costs | |
| candles | Yes | Number of candles the indicators were calculated over | |
| library | Yes | The library that did the calculation | |
| skipped | Yes | Requested indicators that could not be calculated, with the reason | |
| interval | No | ||
| indicators | Yes | ||
| latestClose | Yes |