¥

BOC Exchange Rates

Bank of China

API Documentation

Access real-time Bank of China exchange rates programmatically with our REST API.

Base URL

https://currency.owo.nz/api

Authentication

No authentication required. All endpoints are publicly accessible.

Endpoints

GET/api/latest

Get latest exchange rates for all currencies.

Request
curl https://currency.owo.nz/api/latest
Response (200 OK)
{
  "code": 200,
  "message": "success",
  "data": {
    "currencies": {
      "USD": {
        "currency_name": "USD",
        "foreign_exchange_buying_rate": "706.28",
        "cash_buying_rate": "706.28",
        "foreign_exchange_selling_rate": "709.25",
        "cash_selling_rate": "709.25",
        "boc_conversion_rate": "707.49",
        "release_time": "2025-12-06T10:30:00Z"
      },
      "EUR": { ... },
      ...
    }
  }
}
GET/api/latest/:currency

Get latest exchange rate for a specific currency.

Path Parameters
currency (string, required) - Currency code (e.g., USD, EUR, GBP)
Request
curl https://currency.owo.nz/api/latest/USD
Response (200 OK)
{
  "code": 200,
  "message": "success",
  "data": {
    "currency_name": "USD",
    "foreign_exchange_buying_rate": "706.28",
    "cash_buying_rate": "706.28",
    "foreign_exchange_selling_rate": "709.25",
    "cash_selling_rate": "709.25",
    "boc_conversion_rate": "707.49",
    "release_time": "2025-12-06T10:30:00Z"
  }
}
GET/api/rates/:currency

Get daily historical rates for a currency.

Path Parameters
currency (string, required) - Currency code (e.g., USD, EUR, GBP)
Query Parameters
days (integer, optional) - Number of days (default: 30, max: 365)
Request
curl "https://currency.owo.nz/api/rates/USD?days=7"
Response (200 OK)
{
  "code": 200,
  "message": "success",
  "data": {
    "currency": "USD",
    "rates": [
      {
        "currency_name": "USD",
        "foreign_exchange_buying_rate": "706.28",
        "cash_buying_rate": "706.28",
        "foreign_exchange_selling_rate": "709.25",
        "cash_selling_rate": "709.25",
        "boc_conversion_rate": "707.49",
        "release_time": "2025-12-06T10:30:00Z"
      },
      {
        "currency_name": "USD",
        "foreign_exchange_buying_rate": "705.84",
        "cash_buying_rate": "705.84",
        "foreign_exchange_selling_rate": "708.81",
        "cash_selling_rate": "708.81",
        "boc_conversion_rate": "707.49",
        "release_time": "2025-12-05T23:53:52Z"
      }
    ],
    "count": 2
  }
}
GET/api/currencies

Get list of all supported currencies with Chinese names.

Request
curl https://currency.owo.nz/api/currencies
Response (200 OK)
{
  "code": 200,
  "message": "success",
  "data": {
    "currencies": {
      "AED": "阿联酋迪拉姆",
      "AUD": "澳大利亚元",
      "BRL": "巴西里亚尔",
      "CAD": "加拿大元",
      ...
      "USD": "美元",
      "ZAR": "南非兰特"
    },
    "count": 26
  }
}

Response Schema

Standard Response Wrapper

code (integer) - HTTP status code
message (string) - Response message ("success" on success)
data (object) - Response payload

Exchange Rate Object

currency_name (string) - Currency code
foreign_exchange_buying_rate (string) - Bank buying rate for foreign exchange
cash_buying_rate (string) - Bank buying rate for cash
foreign_exchange_selling_rate (string) - Bank selling rate for foreign exchange
cash_selling_rate (string) - Bank selling rate for cash
boc_conversion_rate (string) - Bank of China conversion rate
release_time (string, ISO 8601) - Rate release timestamp in UTC+8 timezone

Supported Currencies

27 major currencies are supported:

AEDAUDBRLCADCHFDKKEURGBPHKDIDRINRJPYKRWMOPMYRNOKNZDPHPRUBSARSEKSGDTHBTRYTWDUSDZAR

Usage Notes

  • Data updates hourly from Bank of China
  • All timestamps are in UTC+8 / Asia/Hong_Kong timezone (ISO 8601 format)
  • Rates are returned as strings to preserve precision
  • Empty string ("") indicates rate not available for that type
  • No rate limits currently enforced - please use responsibly

Error Responses

When an error occurs, the API returns an appropriate HTTP status code with error details:

404 Not Found
{
  "code": 404,
  "message": "Currency not found",
  "data": null
}
500 Internal Server Error
{
  "code": 500,
  "message": "Internal server error",
  "data": null
}