GnistAI GnistAI
Log in

Getting Started with ECB & Norges Bank

Comprehensive central bank data — official ECB and Norges Bank exchange rates, policy rates, and historical series.

All Tutorials   |   Overview   |   Playground   |   MCP   |   REST API   |   Home
Finance

Data source: ECB, Norges Bank

Overview

ECB & Norges Bank wraps ECB, Norges Bank, handling authentication, pagination, and rate limits for you. This tutorial covers all 7 tools with working code examples you can copy and run.

Prerequisites

  1. Sign up at https://context.gnist.ai/signup for a free API key (100 calls/day).
  2. Choose your integration method: MCP protocol or REST API.

Connect via MCP

Add to your MCP client config (Claude Desktop, Cursor, etc.):

MCP Config
{
  "mcpServers": {
    "gnist-ecb-norgesbank": {
      "url": "https://context.gnist.ai/mcp/ecb-norgesbank/",
      "headers": {
        "Gnist-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Tools (7)

get_ecb_exchange_rate

Get the ECB official reference rate for a currency vs EUR. The ECB publishes reference rates at ~16:00 CET each business day for ~30 currencies. The rate is expressed as units of EUR per 1 unit of the foreign currency (e.g. EUR/USD = 1.08 means 1 EUR buys 1.08 USD). Args: currency: ISO 4217 currency code (e.g. "USD", "GBP", "JPY", "NOK"). date: Optional date in ISO 8601 format (YYYY-MM-DD). If omitted, returns the most recent available rate. Returns: currency, base_currency ("EUR"), rate, date, source.

ParameterTypeRequiredDescription
currencystringrequiredISO 4217 currency code (e.g. "USD", "GBP", "JPY", "NOK").
dateanyoptionalOptional date in ISO 8601 format (YYYY-MM-DD). If omitted, returns the most recent available rate.
curl -X POST "https://context.gnist.ai/mcp/ecb-norgesbank/" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_ecb_exchange_rate", "arguments": {"currency": "USD"}}}'
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/ecb-norgesbank/",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    json={'id': 1,
 'jsonrpc': '2.0',
 'method': 'tools/call',
 'params': {'arguments': {'currency': 'USD'}, 'name': 'get_ecb_exchange_rate'}},
)
print(resp.json())

list_ecb_exchange_rates

List all ECB official reference exchange rates for a given date. The ECB publishes ~30 currency pairs vs EUR each business day. Useful when you need a full forex snapshot to price international transactions or convert between multiple currencies via EUR. Args: date: Optional date in ISO 8601 format (YYYY-MM-DD). If omitted, returns the most recent available rates. Returns: List of exchange rates with currency, rate, and date.

ParameterTypeRequiredDescription
dateanyoptionalOptional date in ISO 8601 format (YYYY-MM-DD). If omitted, returns the most recent available rates.
curl -X POST "https://context.gnist.ai/mcp/ecb-norgesbank/" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "list_ecb_exchange_rates", "arguments": {"date": "2025-01-15"}}}'
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/ecb-norgesbank/",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    json={'id': 1,
 'jsonrpc': '2.0',
 'method': 'tools/call',
 'params': {'arguments': {'date': '2025-01-15'},
            'name': 'list_ecb_exchange_rates'}},
)
print(resp.json())

get_ecb_policy_rate

Get ECB key interest rate history. The ECB sets three key interest rates at Governing Council meetings (held every 6–8 weeks). The deposit facility rate is the primary policy instrument since the 2022 hiking cycle. Args: rate_type: Which ECB rate to fetch: - "deposit_facility" (default) — rate on bank deposits at ECB overnight - "main_refinancing" — rate on main refinancing operations (MRO) - "marginal_lending" — rate on overnight marginal lending facility date_from: Optional start date (YYYY-MM-DD). Defaults to last 10 changes. date_to: Optional end date (YYYY-MM-DD). Returns: List of rate changes with date and rate_pct, most recent last.

ParameterTypeRequiredDescription
rate_typestringoptionalWhich ECB rate to fetch: - "deposit_facility" (default) — rate on bank deposits at ECB overnight - "main_refinancing" — rate on main refinancing operations (MRO) - "marginal_lending" — rate o... (default: deposit_facility)
date_fromanyoptionalOptional start date (YYYY-MM-DD). Defaults to last 10 changes.
date_toanyoptionalOptional end date (YYYY-MM-DD).
curl -X POST "https://context.gnist.ai/mcp/ecb-norgesbank/" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_ecb_policy_rate", "arguments": {"rate_type": "deposit_facility"}}}'
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/ecb-norgesbank/",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    json={'id': 1,
 'jsonrpc': '2.0',
 'method': 'tools/call',
 'params': {'arguments': {'rate_type': 'deposit_facility'},
            'name': 'get_ecb_policy_rate'}},
)
print(resp.json())

get_norges_bank_exchange_rate

Get Norges Bank official exchange rate for a currency vs NOK. Norges Bank publishes exchange rates each business day for ~40 currencies. Rates are expressed as NOK per 1 unit of foreign currency (e.g. EUR/NOK = 11.8 means 1 EUR = 11.8 NOK). Args: currency: ISO 4217 currency code (e.g. "EUR", "USD", "GBP", "SEK"). date_from: Optional start date (YYYY-MM-DD). If neither date is given, returns the most recent available rate. date_to: Optional end date (YYYY-MM-DD). Returns: List of (date, rate) pairs, oldest first.

ParameterTypeRequiredDescription
currencystringrequiredISO 4217 currency code (e.g. "EUR", "USD", "GBP", "SEK").
date_fromanyoptionalOptional start date (YYYY-MM-DD). If neither date is given, returns the most recent available rate.
date_toanyoptionalOptional end date (YYYY-MM-DD).
curl -X POST "https://context.gnist.ai/mcp/ecb-norgesbank/" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_norges_bank_exchange_rate", "arguments": {"currency": "EUR"}}}'
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/ecb-norgesbank/",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    json={'id': 1,
 'jsonrpc': '2.0',
 'method': 'tools/call',
 'params': {'arguments': {'currency': 'EUR'},
            'name': 'get_norges_bank_exchange_rate'}},
)
print(resp.json())

list_norges_bank_exchange_rates

List all Norges Bank exchange rates for a given date (or latest). Norges Bank publishes ~40 NOK cross rates each business day. Args: date: Optional date (YYYY-MM-DD). If omitted, returns the latest available. Returns: List of currencies and their NOK rates.

ParameterTypeRequiredDescription
dateanyoptionalOptional date (YYYY-MM-DD). If omitted, returns the latest available.
curl -X POST "https://context.gnist.ai/mcp/ecb-norgesbank/" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "list_norges_bank_exchange_rates", "arguments": {"date": "2025-01-15"}}}'
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/ecb-norgesbank/",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    json={'id': 1,
 'jsonrpc': '2.0',
 'method': 'tools/call',
 'params': {'arguments': {'date': '2025-01-15'},
            'name': 'list_norges_bank_exchange_rates'}},
)
print(resp.json())

get_norges_bank_policy_rate

Get Norges Bank key policy rate (styringsrente) history. Norges Bank sets the key policy rate at scheduled meetings (~8 per year). The rate directly influences mortgage rates and the Norwegian economy. Args: date_from: Optional start date (YYYY-MM-DD). Defaults to last 10 decisions. date_to: Optional end date (YYYY-MM-DD). Returns: List of rate decisions with date and rate_pct, most recent last.

ParameterTypeRequiredDescription
date_fromanyoptionalOptional start date (YYYY-MM-DD). Defaults to last 10 decisions.
date_toanyoptionalOptional end date (YYYY-MM-DD).
curl -X POST "https://context.gnist.ai/mcp/ecb-norgesbank/" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_norges_bank_policy_rate", "arguments": {"date_from": "2025-01-15"}}}'
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/ecb-norgesbank/",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    json={'id': 1,
 'jsonrpc': '2.0',
 'method': 'tools/call',
 'params': {'arguments': {'date_from': '2025-01-15'},
            'name': 'get_norges_bank_policy_rate'}},
)
print(resp.json())

report_feedback

Report a bug, feature request, or general feedback for this data source. Use this when something doesn't work as expected, when you'd like a new feature, or when you have suggestions for improvement. Args: feedback: Describe the issue or suggestion. feedback_type: One of 'bug', 'feature_request', or 'general'.

ParameterTypeRequiredDescription
feedbackstringrequired
feedback_typestringoptional (default: general)
curl -X POST "https://context.gnist.ai/mcp/ecb-norgesbank/" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "report_feedback", "arguments": {"feedback": "example"}}}'
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/ecb-norgesbank/",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    json={'id': 1,
 'jsonrpc': '2.0',
 'method': 'tools/call',
 'params': {'arguments': {'feedback': 'example'}, 'name': 'report_feedback'}},
)
print(resp.json())

Common Patterns

Search then retrieve
Use list_ecb_exchange_rates to find items, then get_ecb_exchange_rate to get full details. This two-step pattern is common for exploring data before drilling down.
Date range filtering
Use date range parameters to narrow results to a specific time window. Dates are typically in YYYY-MM-DD format.

FAQ

What data does ECB & Norges Bank provide?

Comprehensive central bank data — official ECB and Norges Bank exchange rates, policy rates, and historical series. It exposes 7 tools: get_ecb_exchange_rate, list_ecb_exchange_rates, get_ecb_policy_rate, get_norges_bank_exchange_rate, list_norges_bank_exchange_rates, get_norges_bank_policy_rate, report_feedback.

What do I need to get started?

A Gnist API key (free tier: 100 calls/day). Sign up at https://context.gnist.ai/signup.

What format does the ECB & Norges Bank API return?

JSON, via either MCP protocol (JSON-RPC 2.0) or REST API.

Next Steps

Related Tutorials