跳转到主要内容
GET
Get live exchange rates

快速开始

基础 URL

验证端点

未指定目标货币时,端点返回所有可用货币的汇率。在此处浏览完整支持货币列表。
此成功请求返回相对于基础货币的所有可用货币汇率:

请求参数

String
必填
您的唯一 API 密钥。请注意,每个用户为每个 Cleariflow API 拥有 独立的 API 密钥,因此您的汇率 API 密钥无法用于 IP 地理定位 API,例如。
String
必填
用于获取最新汇率的基础货币。使用 ISO 4217 货币标准(例如 USD 表示美元),与本 API 中所有货币参数相同。
String
相对于基础货币要获取汇率的目标货币。与 base 参数一样,此处传递的任何货币均遵循 ISO 4217 标准。若在 target 中传递多个货币,应用逗号分隔(例如 &target=EUR,CAD,AUD)。

响应参数

API 响应以通用、轻量的 JSON 格式 返回。
String
用于获取汇率的基础货币。
Integer
返回数据最后更新的 Unix 时间戳。
Object
JSON 对象,以每个目标货币为键,以相对于基础货币的汇率为该键的值。

查询参数

api_key
string
必填

Your unique API key for authentication

base
string
默认值:EUR

The base currency used to get the latest exchange rate(s) for. Uses the ISO 4217 currency standard

target
string

The target currency or currencies to get the exchange rate of versus the base currency. Multiple currencies should be separated by commas. If not specified, all available currencies will be returned.

响应

Successful response

base
string
必填

The base currency used to get the exchange rates

示例:

"EUR"

last_updated
integer
必填

The Unix timestamp of when the returned data was last updated

示例:

1704067200

exchange_rates
object
必填

A JSON Object containing each of the target currency as the key and its exchange rate versus the base currency as that key's value

示例: