← Finanzas y divisas

Media móvil (SMA)

GET /sma

Calculate the Simple Moving Average (SMA) for any par de divisas over a configurable number of days (default 30). The SMA smooths out daily rate fluctuations to reveal the underlying trend. Widely used in technical analysis for forex trading signals - when the current rate crosses above or below the SMA, it can indicate trend reversals. También útil para setting fair tasas de cambio in business contracts.

Parametros

base requerido

Base currency

target requerido

Target currency

period opcional predeterminado: 30

Number of days

Ejemplos de solicitudes

Uso basico
curl "https://nordapi.ee/api/v1/sma?base=EUR&target=USD&period=14"
14-day SMA for EUR/USD
curl "https://nordapi.ee/api/v1/sma?base=EUR&target=USD&period=14"
30-day SMA for USD/NOK (default period)
curl "https://nordapi.ee/api/v1/sma?base=USD&target=NOK"
7-day SMA for GBP/SEK
curl "https://nordapi.ee/api/v1/sma?base=GBP&target=SEK&period=7"

Respuesta en vivo

{
  "base": "EUR",
  "period": 14,
  "rates": [
    {
      "date": "2026-04-05",
      "rate": 1.1525
    },
    {
      "date": "2026-04-04",
      "rate": 1.1525
    },
    {
      "date": "2026-04-03",
      "rate": 1.1525
    },
    {
      "date": "2026-04-02",
      "rate": 1.1525
    },
    {
      "date": "2026-04-01",
      "rate": 1.1605
    },
    {
      "date": "2026-03-31",
      "rate": 1.1498
    },
    {
      "date": "2026-03-30",
      "rate": 1.1484
    },
    {
      "date": "2026-03-29",
      "rate": 1.1517
    },
    {
      "date": "2026-03-28",
      "rate": 1.1517
    },
    {
      "date": "2026-03-27",
      "rate": 1.1539
    },
    {
      "date": "2026-03-26",
      "rate": 1.1592
    },
    {
      "date": "2026-03-25",
      "rate": 1.1572
    },
    {
      "date": "2026-03-24",
      "rate": 1.1596
    },
    {
      "date": "2026-03-23",
      "rate": 1.1555
    }
  ],
  "sma": 1.1541071428571428,
  "success": true,
  "target": "USD"
}

Ejemplo de respuesta

{"success":true,"sma":1.1522,"period":14}