| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
action |
string | 选填 | rate |
查询动作:rate(实时银行牌价,默认)/ history(历史每日牌价)/ currencies(支持的币种列表) |
currency |
string | 选填 | - | 货币 ISO 4217 代码,如 USD / EUR / JPY / GBP / HKD,本站自动转大写;action=rate 选填(不传返回全部支持币种牌价),action=history 必填。上游为人民币基准牌价,不提供币种成对交叉查询 |
amount |
float | 选填 | - | 换算金额(外币数量),传入时按单位换算价(折算价/100)返回换算结果 converted_amount(人民币),仅 action=rate 生效 |
date |
string | 选填 | - | 历史单日,YYYY-MM-DD,仅 action=history 生效;与 month、start_date+end_date 三者互斥 |
month |
string | 选填 | - | 历史月份,YYYYMM 如 202610,仅 action=history 生效;与其余时间范围互斥 |
start_date |
string | 选填 | - | 历史区间起始,YYYY-MM-DD,须与 end_date 成对,仅 action=history 生效;与 date、month 互斥 |
end_date |
string | 选填 | - | 历史区间结束,YYYY-MM-DD;区间跨度上限 90 天(上游硬限,本站前置拦截) |
| 字段名 | 类型 | 说明 |
|---|---|---|
code | int | 状态码,0=成功 |
desc | string | 状态描述 |
data− |
object | 业务数据(成功时返回) |
action |
string | 回显查询动作:rate / history / currencies |
base_currency |
string | 牌价基准币种,固定 CNY(上游为人民币基准银行牌价) |
quote_currency |
string | 查询币种(仅 action=history) |
range |
string | 回显历史时间范围(仅 action=history),object:date 或 month 或 start_date/end_date/days |
amount |
float | 回显换算金额(仅 action=rate 且传入 amount 时) |
list− |
array | 牌价列表 |
currency |
string | 货币代码 |
name |
string | 货币名称(action=rate / currencies) |
rate |
float | 单位换算价:1 外币 = rate 元人民币(rate=折算价/100;history 档按当日折算价计算) |
price_per_100 |
string | 100 外币基准六档牌价(仅 action=rate),object:middle 折算价 / spot_buying 现汇买入 / spot_selling 现汇卖出 / cash_buying 现钞买入 / cash_selling 现钞卖出 |
converted_amount |
float | 换算结果(人民币,= amount × rate;仅 action=rate 且传入 amount 时) |
date |
string | 牌价日期(rate=牌价当日;history=发布日期 publish_time) |
time |
string | 牌价时间 HH:MM:SS(仅 action=rate) |
middle_rate |
float | 折算价(100 外币基准,仅 action=history) |
buying_rate |
float | 现汇买入价(仅 action=history) |
selling_rate |
float | 现汇卖出价(仅 action=history) |
cash_buying_rate |
float | 现钞买入价(仅 action=history) |
cash_selling_rate |
float | 现钞卖出价(仅 action=history) |
total |
int | 列表条数 |
disclaimer |
string | 免责声明:参考银行牌价,非交易价,实际兑换以银行或持牌机构报价为准,不构成交易建议 |
request_id | string | 请求追踪ID |
{
"code": 0,
"desc": "success",
"data": { ... },
"request_id": "abc123..."
}
{
"code": 999,
"desc": "错误描述",
"request_id": "abc123..."
}
© 网程科技(林州网程科技有限公司) | 豫ICP备2025120409号-2 | 豫B2-20230220 | 豫公网安备 41058102000262号