# Narodowy Bank Polski (Poland) FX & Gold API
> Live official Polish foreign-exchange and gold data, served straight from the National Bank of Poland's open API — no key, nothing cached. The rates endpoint returns the NBP daily fixing: the official mid rate of every world currency against the zloty (PLN), table A for the common currencies and table B for the exotic ones, with the bulletin number and date. The currency endpoint returns one currency's mid rate, its bid and ask from the trading table, and its recent history — the US dollar fixed at about 3.69 zloty in mid-2026. The bidask endpoint returns the full trading table (table C): every currency with its buy and sell rate and the spread between them. The gold endpoint returns the NBP accounting price of gold — one gram of pure gold in zloty — with recent history, around 509 zloty a gram. The convert endpoint turns an amount from any currency into any other, crossed through the zloty at the official fixing, so you can convert USD to EUR or JPY to PLN in one call. Everything is the central bank's own published data, live, nothing stored. This is the Polish zloty FX-and-gold layer for any forex, payments, e-commerce or treasury app operating in Poland and Central Europe. Distinct from the ECB, Fed, Bank of Canada, Norges Bank, Bank of England and Brazil central-bank APIs — this is the zloty, its bid/ask trading table and the NBP gold price. 6 endpoints, no key on our side.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/nbp-api/..."
```

## Pricing
- **Free** (Free) — 1,500 calls/Mo, 2 req/s
- **Starter** ($10/Mo) — 25,000 calls/Mo, 6 req/s
- **Pro** ($26/Mo) — 150,000 calls/Mo, 15 req/s
- **Mega** ($62/Mo) — 850,000 calls/Mo, 40 req/s

## Endpoints

### NBP

#### `GET /v1/bidask` — Full trading table C (bid/ask/spread)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/nbp-api/v1/bidask"
```

**Response:**
```json
{
    "data": {
        "base": "PLN",
        "note": "bid/ask = PLN per 1 unit of the listed currency",
        "count": 13,
        "rates": [
            {
                "ask": 3.7138,
                "bid": 3.6402,
                "code": "USD",
                "spread": 0.0736,
                "currency": "dolar amerykański"
            },
            {
                "ask": 2.621,
                "bid": 2.569,
                "code": "AUD",
                "spread": 0.052,
                "currency": "dolar australijski"
            },
            {
                "ask": 2.6642,
                "bid": 2.6114,
                "code": "CAD",
                "spread": 0.0528,
                "currency": "dolar kanadyjski"
            },
            {
                "ask": 4.2862,
                "bid": 4.2014,
                "code": "EUR",
                "spread": 0.0848,
                "currency": "euro"
            },
            {
                "ask": 0.012046,
                "bid": 0.011808,
                "code": "HUF",
                "spread": 0.0002,
                "currency": "forint (Węgry)"
            },
            {
                "ask": 4.6633,
                "bid": 4.5709,
                "code": "CHF",
                "spread": 0.0924,
                "currency": "frank szwajcarski"
            },
            {
                "ask": 4.9583,
                "bid": 4.8601,
                "code": "GBP",
                "spread": 0.0982,
  
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/convert` — Convert between currencies via PLN

**Parameters:**
- `from` (query, required, string) — Source currency Example: `USD`
- `to` (query, required, string) — Target currency Example: `EUR`
- `amount` (query, optional, string) — Amount (default 1) Example: `100`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/nbp-api/v1/convert?from=USD&to=EUR&amount=100"
```

**Response:**
```json
{
    "data": {
        "to": "EUR",
        "via": "PLN",
        "from": "USD",
        "note": "crossed through PLN at the NBP table-A mid fixing",
        "rate": 0.865719,
        "amount": 100,
        "result": 86.571921,
        "source": "Narodowy Bank Polski",
        "to_pln": 4.2359,
        "from_pln": 3.6671
    },
    "meta": {
        "timestamp": "2026-06-09T11:38:24.332Z",
        "request_id": "cd6cb0f0-2aa6-42e7-9468-d3b656d7f06a"
    },
    "status": "ok",
    "message": "Conversion retrieved successfully",
    "success": true
}
```

#### `GET /v1/currency` — One currency mid + bid/ask + history

**Parameters:**
- `code` (query, required, string) — Currency code Example: `USD`
- `history` (query, optional, string) — Number of past fixings (default 10) Example: `5`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/nbp-api/v1/currency?code=USD&history=5"
```

**Response:**
```json
{
    "data": {
        "ask": 3.7138,
        "bid": 3.6402,
        "mid": 3.6671,
        "base": "PLN",
        "code": "USD",
        "note": "mid/bid/ask = PLN per 1 USD",
        "source": "Narodowy Bank Polski",
        "spread": 0.0736,
        "history": [
            {
                "mid": 3.6358,
                "date": "2026-06-02"
            },
            {
                "mid": 3.6553,
                "date": "2026-06-03"
            },
            {
                "mid": 3.6392,
                "date": "2026-06-05"
            },
            {
                "mid": 3.6898,
                "date": "2026-06-08"
            },
            {
                "mid": 3.6671,
                "date": "2026-06-09"
            }
        ],
        "currency": "dolar amerykański",
        "bulletin_no": "109/A/NBP/2026",
        "effective_date": "2026-06-09"
    },
    "meta": {
        "timestamp": "2026-06-09T11:38:24.529Z",
        "request_id": "1adf6512-cbd7-4b23-a39f-1a86a42dea4a"
    },
    "status": "ok",
    "message": "Currency retrieved successfully",
    "success": true
}
```

#### `GET /v1/gold` — NBP gold price (PLN per gram)

**Parameters:**
- `history` (query, optional, string) — Number of past days (default 30) Example: `7`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/nbp-api/v1/gold?history=7"
```

**Response:**
```json
{
    "data": {
        "date": "2026-06-09",
        "unit": "1 gram of pure gold (1000 millesimal fineness)",
        "asset": "Gold",
        "price": 508.68,
        "source": "Narodowy Bank Polski",
        "history": [
            {
                "date": "2026-05-29",
                "price": 514.16
            },
            {
                "date": "2026-06-01",
                "price": 528.2
            },
            {
                "date": "2026-06-02",
                "price": 525.1
            },
            {
                "date": "2026-06-03",
                "price": 529.05
            },
            {
                "date": "2026-06-05",
                "price": 522.16
            },
            {
                "date": "2026-06-08",
                "price": 522.08
            },
            {
                "date": "2026-06-09",
                "price": 508.68
            }
        ],
        "currency": "PLN"
    },
    "meta": {
        "timestamp": "2026-06-09T11:38:24.649Z",
        "request_id": "35cb623c-14bd-4fc9-a0c0-c5f68b611a28"
    },
    "status": "ok",
    "message": "Gold price retrieved successfully",
    "success": true
}
```

#### `GET /v1/rates` — NBP daily fixing (all currencies vs PLN)

**Parameters:**
- `table` (query, optional, string) — A (common, default) or B (exotic) Example: `A`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/nbp-api/v1/rates?table=A"
```

**Response:**
```json
{
    "data": {
        "base": "PLN",
        "note": "mid = units of PLN per 1 unit of the listed currency",
        "count": 32,
        "rates": [
            {
                "mid": 0.1116,
                "code": "THB",
                "currency": "bat (Tajlandia)"
            },
            {
                "mid": 3.6671,
                "code": "USD",
                "currency": "dolar amerykański"
            },
            {
                "mid": 2.5863,
                "code": "AUD",
                "currency": "dolar australijski"
            },
            {
                "mid": 0.468,
                "code": "HKD",
                "currency": "dolar Hongkongu"
            },
            {
                "mid": 2.6312,
                "code": "CAD",
                "currency": "dolar kanadyjski"
            },
            {
                "mid": 2.1384,
                "code": "NZD",
                "currency": "dolar nowozelandzki"
            },
            {
                "mid": 2.8519,
                "code": "SGD",
                "currency": "dolar singapurski"
            },
            {
                "mid": 4.2359,
                "code": "EUR",
                "currency": "euro"
            },
            {
                "mid": 0.011928,
                "code": "HUF",
                "currency": "forint (Węgry)"
            },
            {
                "mid": 4.6042,
                "code": "CHF",
                "currency": "frank sz
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Spec

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/nbp-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "source": "Narodowy Bank Polski Web API (live)",
        "service": "nbp-api",
        "endpoints": {
            "GET /v1/gold": "NBP gold price (PLN per gram) + history (history=N).",
            "GET /v1/meta": "This document.",
            "GET /v1/rates": "NBP daily fixing — every currency's mid vs PLN (table=A default, or B for exotics).",
            "GET /v1/bidask": "Full trading table C — every currency's bid, ask and spread.",
            "GET /v1/convert": "Convert between any two currencies via PLN (from=USD&to=EUR&amount=100).",
            "GET /v1/currency": "One currency's mid + bid/ask + history (code=USD)."
        },
        "description": "Live official Polish FX and gold data from the National Bank of Poland: the daily fixing (mid rate of every world currency vs the zloty, tables A and B); one currency's mid, bid and ask with recent history; the full trading table (table C) with bid, ask and spread; the NBP gold price (one gram of pure gold in zloty) with history; and currency conversion between any two currencies crossed through the zloty. Live, no key, nothing stored. Distinct from the ECB, Fed, Bank of Canada, Norges Bank, Bank of England and Brazil central-bank APIs — this is the zloty, its bid/ask table and the NBP gold price.",
        "upstream_status": "ok"
    },
    "meta": {
        "timestamp": "2026-06-09T11:38:24.940Z",
        "request_id": "5f29e829-e971-41ce-8f0b-eaa2200dcf2a"
    },
    "status": "ok",
    
…(truncated, see openapi.json for full schema)
```


---
Marketplace page: https://www.oanor.com/api/nbp-api
OpenAPI spec: https://www.oanor.com/api/nbp-api/openapi.json
