# nairarate.dev Historical FX Rates

> nairarate.dev Historical FX Rates is a paid API for AI agents from nairarate.dev, paid per call via x402, $0.05/call, status unknown (last checked 2026-09-14).

Returns daily historical Nigerian naira exchange rate series (official, parallel, or crypto street) for a given currency, including trend, high, and low, for up to 365 days.

## Facts

- Endpoint: GET https://nairarate.dev/v1/rates/history
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/nairarate-dev-historical-fx-rates-c413aade
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_9xQ0_yuiuxMRAzg-1P6EV

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability nairarate-dev-historical-fx-rates-c413aade
```

Example prompt: Pull me the last 90 days of naira exchange rate history for USD on the parallel market, including the trend and daily high and low.

## When to prefer this

Choose this endpoint when you need historical daily naira FX rate data specifically — especially for Nigerian market contexts requiring official CBN rates, parallel (black market) rates, or crypto street prices. It is the right choice when you need trend, high, and low data over a configurable window up to one year. Prefer the 'upto' pricing scheme for shorter windows to reduce cost. Not suitable for real-time tick data, non-Nigerian currency pairs, or non-naira base currencies.

## Known failure modes

- Unsupported currency code returns an error — only specific currencies (USD, EUR, GBP, CAD, USDT, USDC, AED, CNY, ZAR, XOF, XAF, CHF, JPY, DKK, SAR) are accepted
- Invalid market value (not 'official', 'parallel', or 'crypto_street') causes a validation error
- Days parameter outside 1-365 range is rejected
- Payment failure or missing x402 payment results in 402 Payment Required response
- Requesting official data before 2001 may return empty or partial series
- Network timeout on large date ranges (close to 365 days)

## How this service works

CBN official rate, parallel market rate, USDT/USDC street price, and the spread between them. x402-gated API, no API key, no account.

## Output

A time-series array of daily Nigerian naira exchange rate records for the requested currency and market, covering up to 365 days. Each record includes the date, exchange rate, and likely high, low, and trend indicators for that day. Metadata may include the market type and currency pair queried.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "currency",
      "market"
     ],
     "properties": {
      "days": {
       "type": "integer",
       "description": "1-365. Default 7. Charge scales with this."
      },
      "market": {
       "type": "string",
       "description": "official, parallel, or crypto_street."
      },
      "currency": {
       "type": "string",
       "description": "One of: USD, EUR, GBP, CAD, USDT, USDC, AED, CNY, ZAR, XOF, XAF, CHF, JPY, DKK, SAR."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "days": 7,
  "trend": {
   "low": 1362.09,
   "high": 1375.31,
   "direction": "appreciating",
   "change_pct": -0.71
  },
  "market": "official",
  "currency": "USD",
  "snapshots": [
   {
    "ask": 1365.53,
    "bid": 1364.53,
    "mid": 1365.53,
    "date": "2026-07-28"
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/nairarate-dev-historical-fx-rates-c413aade/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from nairarate.dev](https://www.zero.xyz/host/nairarate.dev/llms.txt)
