全球
各国币种
代码API接口
# Restful API
https://tsanghi.com/api/fin/currency?token={token}
接口说明:获取全球各国币种代码。
请求方式:GET。
# 测试:返回不超过10条数
https://tsanghi.com/api/fin/currency?token=demo
Request请求参数
参数名称 | 参数类型 | 参数选项 | 参数说明 |
token | 字符串 | 必选 | API Token。登录后获取。 |
currency_code | 字符串 | 可选 | 币种代码。 例如:CNY(人民币)、USD(美元)。 |
fmt | 字符串 | 可选 | 输出格式。支持json和csv两种标准输出格式,默认:json。 |
columns | 字符串 | 可选 | 输出字段。支持自定义输出,多个字段以半角逗号分隔,默认:所有字段。 |
Response响应参数
参数名称 | 参数类型 | 参数说明 |
currency_code | 字符串 | 币种代码 |
currency_name | 字符串 | 币种名称 |
Python示例
import requests
url = f"https://tsanghi.com/api/fin/currency?token=demo"
data = requests.get(url).json()
print(data)
Response示例
# 更多详情
https://tsanghi.com