汇率查询接口支持实时货币汇率查询换算
接口名称:汇率查询接口
接口平台:web api
接口地址:http://op.juhe.cn/onebox/exchange/currency
支持格式:json
请求方式:http get
请求示例:http://op.juhe.cn/onebox/exchange/currency?key=您申请的APPKEY&from=JPY&to=BHD
请求参数说明:
名称 |
类型 |
必填 |
说明 |
from |
string |
是 |
转换汇率前的货币代码 |
to |
string |
是 |
转换汇率成的货币代码 |
key |
string |
是 |
应用APPKEY(应用详细页查询) |
返回参数说明:
名称 |
类型 |
说明 |
error_code |
int |
返回码 |
reason |
string |
返回说明 |
result |
string |
返回结果集 |
汇率查询接口调用代码JSON返回示例:
{
"reason": "查询成功",
"result": [
{
"currencyF": "JPY",
"currencyF_Name": "日元",
"currencyT": "BHD",
"currencyT_Name": "巴林第纳尔",
"currencyFD": 1,
"exchange": "0.0032685972",
"result": "0.0032",
"updateTime": "2014-11-07 13:58:02"
},
{
"currencyF": "BHD",
"currencyF_Name": "巴林第纳尔",
"currencyT": "JPY",
"currencyT_Name": "日元",
"currencyFD": 1,
"exchange": "305.9416445623",
"result": 305.9416,
"updateTime": "2014-11-07 13:58:01"
}
],
"error_code": 0
}