AkShare 货币数据

货币报价最新数据

接口: currency_latest

目标地址: https://currencyscoop.com/

描述: 获取货币报价最新数据

限量: 单次返回指定货币的最新报价数据-免费账号每月限量访问 5000 次

输入参数

名称类型必选描述
basestrYbase=”USD”
api_keystrYapi_key=”Please put your api key here”; you can register currencyscoop, Gmail well be better

输出参数

名称类型默认显示描述
datestrY日期时间-注意时区
basefloatY货币
ratesstrY比率

接口示例

  1. import akshare as ak
  2. currency_latest_df = ak.currency_latest(base="USD", api_key="Please put your api key here")
  3. print(currency_latest_df)

数据示例

  1. date base rates
  2. AED 2020-03-07 13:45:25+00:00 USD 3.672500
  3. AFN 2020-03-07 13:45:25+00:00 USD 76.099722
  4. ALL 2020-03-07 13:45:25+00:00 USD 108.450334
  5. AMD 2020-03-07 13:45:25+00:00 USD 479.819972
  6. ANG 2020-03-07 13:45:25+00:00 USD 1.786501
  7. .. ... ... ...
  8. XPT 2020-03-07 13:45:25+00:00 USD 0.001113
  9. YER 2020-03-07 13:45:25+00:00 USD 250.279406
  10. ZAR 2020-03-07 13:45:25+00:00 USD 15.667657
  11. ZMW 2020-03-07 13:45:25+00:00 USD 15.245795
  12. ZWD 2020-03-07 13:45:25+00:00 USD 361.899994

货币报价历史数据

接口: currency_history

目标地址: https://currencyscoop.com/

描述: 获取货币报价历史数据

限量: 单次返回指定货币在指定交易日的报价历史数据-免费账号每月限量访问 5000 次

输入参数

名称类型必选描述
basestrYbase=”USD”
datestrYdate=”2020-02-03”
api_keystrYapi_key=”Please put your api key here”; you can register currencyscoop, Gmail well be better

输出参数

名称类型默认显示描述
datestrY日期时间-注意时区
basefloatY货币
ratesstrY比率

接口示例

  1. import akshare as ak
  2. currency_history_df = ak.currency_history(base="USD", date="2020-02-03", api_key="Please put your api key here")
  3. print(currency_history_df)

数据示例

  1. date base rates
  2. AED 2020-02-03 USD 3.672500
  3. AFN 2020-02-03 USD 76.350078
  4. ALL 2020-02-03 USD 110.256982
  5. AMD 2020-02-03 USD 478.447633
  6. ANG 2020-02-03 USD 1.790009
  7. .. ... ... ...
  8. XPT 2020-02-03 USD 0.001032
  9. YER 2020-02-03 USD 250.312033
  10. ZAR 2020-02-03 USD 14.826424
  11. ZMW 2020-02-03 USD 14.627862
  12. ZWD 2020-02-03 USD 361.899994

货币报价时间序列数据

接口: currency_time_series

目标地址: https://currencyscoop.com/

描述: 获取货币报价时间序列数据

限量: 单次返回指定货币在指定交易日到另一指定交易日的报价数据-免费账号每月限量访问 5000 次

输入参数

名称类型必选描述
basestrYbase=”USD”
start_datestrYstart_date=”2020-02-03”
end_datestrYend_date=”2020-03-04”
api_keystrYapi_key=”Please put your api key here”; you can register currencyscoop, Gmail well be better

输出参数

名称类型默认显示描述
datestrY日期时间-注意时区
basefloatY货币
ratesstrY比率

接口示例

  1. import akshare as ak
  2. currency_time_series_df = ak.currency_time_series(base="USD", start_date="2020-02-03", end_date="2020-03-04", api_key="Please put your api key here")
  3. print(currency_time_series_df)

数据示例(由于没有权限,此示例仅作占位)

  1. date base rates
  2. AED 2020-02-03 USD 3.672500
  3. AFN 2020-02-03 USD 76.350078
  4. ALL 2020-02-03 USD 110.256982
  5. AMD 2020-02-03 USD 478.447633
  6. ANG 2020-02-03 USD 1.790009
  7. .. ... ... ...
  8. XPT 2020-02-03 USD 0.001032
  9. YER 2020-02-03 USD 250.312033
  10. ZAR 2020-02-03 USD 14.826424
  11. ZMW 2020-02-03 USD 14.627862
  12. ZWD 2020-02-03 USD 361.899994

货币基础信息查询

接口: currency_currencies

目标地址: https://currencyscoop.com/

描述: 获取所有货币的基础信息

限量: 单次返回指定所有货币基础信息-免费账号每月限量访问 5000 次

输入参数

名称类型必选描述
c_typestrYc_type=”fiat”
api_keystrYapi_key=”Please put your api key here”; you can register currencyscoop, Gmail well be better

输出参数

名称类型默认显示描述
currency_namestrY货币名称
currency_codestrY货币代码
decimal_unitsintY小数点位
countriesstrY使用此货币的国家

接口示例

  1. import akshare as ak
  2. currency_currencies_df = ak.currency_currencies(c_type="fiat", api_key="Please put your api key here")
  3. print(currency_currencies_df)

数据示例

  1. currency_name ... countries
  2. AED United Arab Emirates dirham ... [United Arab Emirates]
  3. AFN Afghan afghani ... [Afghanistan]
  4. ALL Albanian lek ... [Albania]
  5. AMD Armenian dram ... [Armenia]
  6. ANG Netherlands Antillean guilder ... [Curaçao (CW), Sint Maarten (SX)]
  7. .. ... ... ...
  8. XXX No currency ... []
  9. YER Yemeni rial ... [Yemen]
  10. ZAR South African rand ... [Lesotho, Namibia, South Africa]
  11. ZMW Zambian kwacha ... [Zambia]
  12. ZWL Zimbabwean dollar ... [Zimbabwe]

货币对价格转换

接口: currency_convert

目标地址: https://currencyscoop.com/

描述: 获取指定货币对指定货币数量的转换后价格

限量: 单次返回指定货币对的转换后价格-免费账号每月限量访问 5000 次

输入参数

名称类型必选描述
basestrYbase=”USD”
tostrYto=”CNY”
amountstrYamount=”10000”
api_keystrYapi_key=”Please put your api key here”; you can register currencyscoop, Gmail well be better

输出参数

名称类型默认显示描述
currency_namestrY货币名称
currency_codestrY货币代码
decimal_unitsintY小数点位
countriesstrY使用此货币的国家

接口示例

  1. import akshare as ak
  2. currency_convert_se = ak.currency_convert(base="USD", to="CNY", amount="10000", api_key="Please put your api key here")
  3. print(currency_convert_se)

数据示例

  1. timestamp 2020-03-07 13:45:31
  2. date 2020-03-07
  3. from USD
  4. to CNY
  5. amount 10000
  6. value 69320