# Vietnam Exchange Rates API
> Live Vietnamese đồng (VND) bank counter exchange rates from Vietcombank, Vietnam's largest commercial bank. Unlike a central-bank reference or a parallel-market rate, these are the rates a customer actually transacts at, quoted in three forms: the cash rate (buying banknotes), the transfer rate (buying via wire) and the sell rate (the bank selling foreign currency). The rates endpoint returns every quoted currency against the đồng with all three rates and the buy/sell spread; the rate endpoint returns one currency; the convert endpoint converts any amount between a currency and the đồng at the chosen rate. Read live, nothing stored. This is Vietnam's own commercial-bank counter-rate layer — distinct from central-bank reference feeds and from parallel-market APIs.

## 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/vietnam-api/..."
```

## Pricing
- **Free** (Free) — 2,800 calls/Mo, 2 req/s
- **Starter** ($6/Mo) — 65,000 calls/Mo, 10 req/s
- **Pro** ($18/Mo) — 330,000 calls/Mo, 30 req/s
- **Scale** ($44/Mo) — 2,100,000 calls/Mo, 100 req/s

## Endpoints

### Rates

#### `GET /v1/rate` — One currency by code

**Parameters:**
- `currency` (query, required, string) — Currency code Example: `USD`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/vietnam-api/v1/rate?currency=USD"
```

**Response:**
```json
{
    "data": {
        "name": "Us Dollar",
        "sell": 26410,
        "quote": "VND",
        "source": "Vietcombank",
        "updated": "2026-06-10T23:00:00+07:00",
        "cash_buy": 26100,
        "currency": "USD",
        "spread_pct": 1.0716,
        "transfer_buy": 26130
    },
    "meta": {
        "timestamp": "2026-06-10T22:57:08.001Z",
        "request_id": "b1f6bb91-0218-43eb-838e-0f6cde93f906"
    },
    "status": "ok",
    "message": "Rate retrieved successfully",
    "success": true
}
```

#### `GET /v1/rates` — Every quoted currency vs the dong

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

**Response:**
```json
{
    "data": {
        "count": 20,
        "quote": "VND",
        "rates": [
            {
                "name": "Us Dollar",
                "sell": 26410,
                "quote": "VND",
                "cash_buy": 26100,
                "currency": "USD",
                "spread_pct": 1.0716,
                "transfer_buy": 26130
            },
            {
                "name": "Euro",
                "sell": 31151.89,
                "quote": "VND",
                "cash_buy": 29591.86,
                "currency": "EUR",
                "spread_pct": 4.2191,
                "transfer_buy": 29890.76
            },
            {
                "name": "Uk Pound Sterling",
                "sell": 35753.05,
                "quote": "VND",
                "cash_buy": 34297.2,
                "currency": "GBP",
                "spread_pct": 3.2023,
                "transfer_buy": 34643.64
            },
            {
                "name": "Japanese Yen",
                "sell": 168.51,
                "quote": "VND",
                "cash_buy": 158.45,
                "currency": "JPY",
                "spread_pct": 5.2858,
                "transfer_buy": 160.05
            },
            {
                "name": "Australian Dollar",
                "sell": 18769.82,
                "quote": "VND",
                "cash_buy": 18005.52,
                "currency": "AUD",
                "spread_pct": 3.2024,
                "transfer_buy": 18187.39
            },
  
…(truncated, see openapi.json for full schema)
```

### Convert

#### `GET /v1/convert` — Convert between a currency and the dong

**Parameters:**
- `amount` (query, required, string) — Amount to convert Example: `100`
- `from` (query, optional, string) — From currency code Example: `USD`
- `to` (query, optional, string) — To currency code Example: `VND`
- `rate` (query, optional, string) — cash, transfer or sell Example: `sell`

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

**Response:**
```json
{
    "data": {
        "to": "VND",
        "from": "USD",
        "amount": 100,
        "result": 2641000,
        "source": "Vietcombank",
        "updated": "2026-06-10T23:00:00+07:00",
        "rate_type": "sell",
        "vnd_per_to": 1,
        "vnd_per_from": 26410
    },
    "meta": {
        "timestamp": "2026-06-10T22:57:08.889Z",
        "request_id": "542b98d3-e12e-486d-ac3d-bab22f2bf31d"
    },
    "status": "ok",
    "message": "Conversion completed",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Service metadata

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

**Response:**
```json
{
    "data": {
        "note": "Rates are VND per 1 unit of foreign currency. cash = buy banknotes, transfer = buy by wire, sell = bank sells FX.",
        "source": "Vietcombank (www.vietcombank.com.vn, live)",
        "service": "vietnam-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/rate": "One currency by code (currency=USD).",
            "GET /v1/rates": "Every quoted currency vs the đồng with cash/transfer/sell and spread.",
            "GET /v1/convert": "Convert between a currency and the đồng (amount=100, from=USD, to=VND, rate=sell)."
        },
        "currencies": 20,
        "description": "Live Vietnamese đồng (VND) bank counter exchange rates from Vietcombank, Vietnam's largest commercial bank. Unlike a central-bank reference or a parallel-market rate, these are the rates a customer actually transacts at, quoted in three forms: the cash rate (buying banknotes), the transfer rate (buying via wire) and the sell rate (the bank selling foreign currency). The rates endpoint returns every quoted currency against the đồng with all three rates and the spread; the rate endpoint returns one currency; the convert endpoint converts any amount between a currency and the đồng at the chosen rate. Live, no key, nothing stored. Distinct from central-bank reference feeds and from parallel-market APIs — this is Vietnam's own commercial-bank counter-rate layer.",
        "usd_sell_vnd": 26410,
        "upstream_s
…(truncated, see openapi.json for full schema)
```


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