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/latestGet latest exchange rates for all currencies.
Request
curl https://currency.owo.nz/api/latestResponse (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/:currencyGet 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/USDResponse (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/:currencyGet 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/currenciesGet list of all supported currencies with Chinese names.
Request
curl https://currency.owo.nz/api/currenciesResponse (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 codemessage (string) - Response message ("success" on success)data (object) - Response payloadExchange Rate Object
currency_name (string) - Currency codeforeign_exchange_buying_rate (string) - Bank buying rate for foreign exchangecash_buying_rate (string) - Bank buying rate for cashforeign_exchange_selling_rate (string) - Bank selling rate for foreign exchangecash_selling_rate (string) - Bank selling rate for cashboc_conversion_rate (string) - Bank of China conversion raterelease_time (string, ISO 8601) - Rate release timestamp in UTC+8 timezoneSupported Currencies
27 major currencies are supported:
AEDAUDBRLCADCHFDKKEURGBPHKDIDRINRJPYKRWMOPMYRNOKNZDPHPRUBSARSEKSGDTHBTRYTWDUSDZARUsage 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
}