接口地址
https://www.laolibab.cn/public/api/forex.php
接口状态
正常 (HTTP 200) 上次检测:2026-06-27 22:23:03
📝 接口描述
使用示例:\
\
获取所有汇率: forex.php\
\
获取美元兑人民币:forex.php?from=USD&to=CNY\
\
获取欧元兑人民币: forex.php?from=EUR&to=CNY
📋 请求示例
【基础请求】
GET https://www.laolibab.cn/public/api/forex.php
【请求头】
Content-Type: application/json
Accept: application/json
【参数说明】
GET请求参数通过URL传递:
https://www.laolibab.cn/public/api/forex.php?参数名1=参数值1&参数名2=参数值2
【调用示例】
# cURL
curl -X GET 'https://www.laolibab.cn/public/api/forex.php' \
-H 'Content-Type: application/json'
# JavaScript (Fetch)
fetch('https://www.laolibab.cn/public/api/forex.php', {
method: 'GET',
headers: { 'Content-Type': 'application/json' }
})
.then(res => res.json())
.then(data => console.log(data));
# PHP (cURL)
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://www.laolibab.cn/public/api/forex.php');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
# Python (requests)
import requests
url = 'https://www.laolibab.cn/public/api/forex.php'
response = requests.get(url)
print(response.json())
📤 真实返回示例
{
"success": true,
"code": 200,
"base": "CNY",
"base_name": "人民币",
"updated_at": "2026-06-27 08:00:02",
"source": "exchangerate-api.com",
"count": 34,
"data": [
{
"code": "CNYAED",
"from_code": "CNY",
"from_name": "人民币",
"to_code": "AED",
"to_name": "阿联酋迪拉姆",
"rate": 0.539,
"change": null,
"change_rate": null,
"status": "normal"
},
{
"code": "CNYAUD",
"from_code": "CNY",
"from_name": "人民币",
"to_code": "AUD",
"to_name": "澳大利亚元",
"rate": 0.213,
"change": null,
"change_rate": null,
"status": "normal"
},
{
"code": "CNYBRL",
"from_code": "CNY",
"from_name": "人民币",
"to_code": "BRL",
"to_name": "巴西雷亚尔",
"rate": 0.762,
"change": null,
"change_rate": null,
"status": "normal"
},
{
"code": "CNYCAD",
"from_code": "CNY",
"from_name": "人民币",
"to_code": "CAD",
"to_name": "加拿大元",
"rate": 0.208,
"change": null,
"change_rate": null,
"status": "normal"
},
{
"code": "CNYCHF",
"from_code": "CNY",
"from_name": "人民币",
"to_code": "CHF",
"to_name": "瑞士法郎",
"rate": 0.119,
"change": null,
"change_rate": null,
"status": "normal"
},
{
"code": "CNYCLP",
"from_code": "CNY",
"from_name": "人民币",
"to_code": "CLP",
"to_name": "智利比索",
"rate": 135.26,
"change": null,
"change_rate": null,
"status": "normal"
},
{
"code": "CNYCNY",
"from_code": "CNY",
"from_name": "人民币",
"to_code": "CNY",
"to_name": "人民币",
"rate": 1,
"change": null,
"change_rate": null,
"status": "normal"
},
{
"code": "CNYCZK",
"from_code": "CNY",
"from_name": "人民币",
"to_code": "CZK",
"to_name": "捷克克朗",
"rate": 3.14,
"change": null,
"change_rate": null,
"status": "normal"
},
{
"code": "CNYDKK",
"from_code": "CNY",
"from_name": "人民币",
"to_code": "DKK",
"to_name": "丹麦克朗",
"rate": 0.962,
"change": null,
"change_rate": null,
"status": "normal"
},
{
"code": "CNYEUR",
"from_code": "CNY",
"from_name": "人民币",
"to_code": "EUR",
"to_name": "欧元",
"rate": 0.129,
"change": null,
"change_rate": null,
"status": "normal"
},
{
"code": "CNYGBP",
"from_code": "CNY",
"from_name": "人民币",
"to_code": "GBP",
"to_name": "英镑",
"rate": 0.111,
"change": null,
"change_rate": null,
"status": "normal"
},
{
"code": "CNYHKD",
"from_code": "CNY",
"from_name": "人民币",
"to_code": "HKD",
"to_name": "港币",
"rate": 1.15,
"change": null,
"change_rate": null,
"status": "normal"
},
{
"code": "CNYHUF",
"from_code": "CNY",
"from_name": "人民币",
"to_code": "HUF",
"to_name": "匈牙利福林",
"rate": 45.74,
"change": null,
"change_rate": null,
"status": "normal"
},
{
"code": "CNYIDR",
"from_code": "CNY",
"from_name": "人民币",
"to_code": "IDR",
"to_name": "印度尼西亚卢比",
"rate": 2638.52,
"change": null,
"change_rate": null,
"status": "normal"
},
{
"code": "CNYILS",
"from_code": "CNY",
"from_name": "人民币",
"to_code": "ILS",
"to_name": "以色列新谢克尔",
"rate": 0.44,
"change": null,
"change_rate": null,
"status": "normal"
},
{
"code": "CNYINR",
"from_code": "CNY",
"from_name": "人民币",
"to_code": "INR",
"to_name": "印度卢比",
"rate": 13.88,
"change": null,
"change_rate": null,
"status": "normal"
},
{
"code": "CNYJPY",
"from_code": "CNY",
"from_name": "人民币",
"to_code": "JPY",
"to_name": "日元",
"rate": 23.76,
"change": null,
"change_rate": null,
"status": "normal"
},
{
"code": "CNYKRW",
"from_code": "CNY",
"from_name": "人民币",
"to_code": "KRW",
"to_name": "韩元",
"rate": 227.07,
"change": null,
"change_rate": null,
"status": "normal"
},
{
"code": "CNYMXN",
"from_code": "CNY",
"from_name": "人民币",
"to_code": "MXN",
"to_name": "墨西哥比索",
"rate": 2.57,
"change": null,
"change_rate": null,
"status": "normal"
},
{
"code": "CNYMYR",
"from_code": "CNY",
"from_name": "人民币",
"to_code": "MYR",
"to_name": "马来西亚林吉特",
"rate": 0.604,
"change": null,
"change_rate": null,
"status": "normal"
},
{
"code": "CNYNOK",
"from_code": "CNY",
"from_name": "人民币",
"to_code": "NOK",
"to_name": "挪威克朗",
"rate": 1.45,
"change": null,
"change_rate": null,
"status": "normal"
},
{
"code": "CNYNZD",
"from_code": "CNY",
"from_name": "人民币",
"to_code": "NZD",
"to_name": "新西兰元",
"rate": 0.261,
"change": null,
"change_rate": null,
"status": "normal"
},
{
"code": "CNYPHP",
"from_code": "CNY",
"from_name": "人民币",
"to_code": "PHP",
"to_name": "菲律宾比索",
"rate": 9.02,
"change": null,
"change_rate": null,
"status": "normal"
},
{
"code": "CNYPLN",
"from_code": "CNY",
"from_name": "人民币",
"to_code": "PLN",
"to_name": "波兰兹罗提",
"rate": 0.552,
"change": null,
"change_rate": null,
"status": "normal"
},
{
"code": "CNYRUB",
"from_code": "CNY",
"from_name": "人民币",
"to_code": "RUB",
"to_name": "俄罗斯卢布",
"rate": 11.1,
"change": null,
"change_rate": null,
"status": "normal"
},
{
"code": "CNYSAR",
"from_code": "CNY",
"from_name": "人民币",
"to_code": "SAR",
"to_name": "沙特里亚尔",
"rate": 0.551,
"change": null,
"change_rate": null,
"status": "normal"
},
{
"code": "CNYSEK",
"from_code": "CNY",
"from_name": "人民币",
"to_code": "SEK",
"to_name": "瑞典克朗",
"rate": 1.43,
"change": null,
"change_rate": null,
"status": "normal"
},
{
"code": "CNYSGD",
"from_code": "CNY",
"from_name": "人民币",
"to_code": "SGD",
"to_name": "新加坡元",
"rate": 0.19,
"change": null,
"change_rate": null,
"status": "normal"
},
{
"code": "CNYTHB",
"from_code": "CNY",
"from_name": "人民币",
"to_code": "THB",
"to_name": "泰国铢",
"rate": 4.9,
"change": null,
"change_rate": null,
"status": "normal"
},
{
"code": "CNYTRY",
"from_code": "CNY",
"from_name": "人民币",
"to_code": "TRY",
"to_name": "土耳其里拉",
"rate": 6.84,
"change": null,
"change_rate": null,
"status": "normal"
},
{
"code": "CNYTWD",
"from_code": "CNY",
"from_name": "人民币",
"to_code": "TWD",
"to_name": "新台币",
"rate": 4.69,
"change": null,
"change_rate": null,
"status": "normal"
},
{
"code": "CNYUSD",
"from_code": "CNY",
"from_name": "人民币",
"to_code": "USD",
"to_name": "美元",
"rate": 0.147,
"change": null,
"change_rate": null,
"status": "normal"
},
{
"code": "CNYVND",
"from_code": "CNY",
"from_name": "人民币",
"to_code": "VND",
"to_name": "越南盾",
"rate": 3875.97,
"change": null,
"change_rate": null,
"status": "normal"
},
{
"code": "CNYZAR",
"from_code": "CNY",
"from_name": "人民币",
"to_code": "ZAR",
"to_name": "南非兰特",
"rate": 2.41,
"change": null,
"change_rate": null,
"status": "normal"
}
]
}