项目中使用到汇率,需要能有一个接口进行查询,而查询汇率最权威的应该就是中国外汇交易中心
官网地址:
https://www.chinamoney.com.cn/chinese/index.html
通过F12就可以查看网站的汇率接口;
查询出来的结果:
{
"head": {
"version": "2.0",
"provider": "CWAP",
"req_code": "",
"rep_code": "200",
"rep_message": "",
"ts": 1656598274022,
"producer": "",
"tstext": "2022-06-30 22:11:14"
},
"data": {
"total": 22,
"startDate": "2022-05-30",
"pageTotal": 3,
"searchlist": ["USD/CNY"],
"pageSize": 10,
"endDate": "2022-06-29",
"flagMessage": "",
"head": ["USD/CNY", "EUR/CNY", "100JPY/CNY", "HKD/CNY", "GBP/CNY", "AUD/CNY", "NZD/CNY", "SGD/CNY", "CHF/CNY", "CAD/CNY", "CNY/MYR", "CNY/RUB", "CNY/ZAR", "CNY/KRW", "CNY/AED", "CNY/SAR", "CNY/HUF", "CNY/PLN", "CNY/DKK", "CNY/SEK", "CNY/NOK", "CNY/TRY", "CNY/MXN", "CNY/THB"],
"currency": "USD/CNY",
"pageNum": 1
},
"records": [{
"date": "2022-06-29",
"values": ["6.7035"]
}, {
"date": "2022-06-28",
"values": ["6.6930"]
}, {
"date": "2022-06-27",
"values": ["6.6850"]
}, {
"date": "2022-06-24",
"values": ["6.7000"]
}, {
"date": "2022-06-23",
"values": ["6.7079"]
}, {
"date": "2022-06-22",
"values": ["6.7109"]
}, {
"date": "2022-06-21",
"values": ["6.6851"]
}, {
"date": "2022-06-20",
"values": ["6.7120"]
}, {
"date": "2022-06-17",
"values": ["6.6923"]
}, {
"date": "2022-06-16",
"values": ["6.7099"]
}]
}
版权说明 : 本文为转载文章, 版权归原作者所有 版权申明
原文链接 : https://blog.csdn.net/sunyuhua_keyboard/article/details/125549191
内容来源于网络,如有侵权,请联系作者删除!