文档中心 > API类目 > 欢行开发平台API

alibaba.tae.common.exchange.rate.query (汇率查询)

汇率查询

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
exchange_rate_open_request_dto ExchangeRateOpenRequestDTO 必须 请求实体
  • └ target_currency
  • String
  • 可选
  • USD
  • 目标币种,使用三位大写币种编码,例如CNY
  • └ tenant_key
  • String
  • 可选
  • ant
  • 租户身份标识;开放API调用必填,Agent调用由上下文识别
  • └ source_currency
  • String
  • 可选
  • CNY
  • 来源币种,使用三位大写币种编码,例如USD
  • └ rate_date
  • Date
  • 可选
  • 2026-08-18 00:00:00
  • 汇率日期,格式为yyyy-MM-dd
  • └ app_key
  • String
  • 可选
  • 123
  • 调用方应用身份;开放API调用必填,Agent调用由上下文识别
  • └ employee_no
  • String
  • 可选
  • 091103
  • 企业员工工号;开放API调用必填,Agent调用由登录态注入

响应参数

名称 类型 示例值 描述
result_code String A0001 错误代码
result_message String 系统错误 错误信息
content ExchangeRateOpenDTO 结果实体
  • └ source_currency
  • String
  • USD
  • 来源币种,使用三位大写币种编码,例如USD
  • └ target_currency
  • String
  • CNY
  • 目标币种,使用三位大写币种编码,例如CNY
  • └ rate_date
  • Date
  • 2026-08-18 00:00:00
  • 汇率日期,格式为yyyy-MM-dd
  • └ rate
  • String
  • 0.6722
  • 汇率
is_success Boolean success 是否成功状态

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaTaeCommonExchangeRateQueryRequest req = new AlibabaTaeCommonExchangeRateQueryRequest();
AlibabaTaeCommonExchangeRateQueryRequest.ExchangeRateOpenRequestDTO obj1 = new AlibabaTaeCommonExchangeRateQueryRequest.ExchangeRateOpenRequestDTO();
obj1.setTargetCurrency("USD");
obj1.setTenantKey("ant");
obj1.setSourceCurrency("CNY");
obj1.setRateDate(StringUtils.parseDateTime("2026-08-18 00:00:00"));
obj1.setAppKey("123");
obj1.setEmployeeNo("091103");
req.setExchangeRateOpenRequestDto(obj1);
AlibabaTaeCommonExchangeRateQueryResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_tae_common_exchange_rate_query_response>
    <result_code>A0001</result_code>
    <result_message>系统错误</result_message>
    <content>
        <source_currency>USD</source_currency>
        <target_currency>CNY</target_currency>
        <rate_date>2026-08-18 00:00:00</rate_date>
        <rate>0.6722</rate>
    </content>
    <is_success>success</is_success>
</alibaba_tae_common_exchange_rate_query_response>

异常示例

  • XML示例
  • JSON示例
<error_response>
    <code>50</code>
    <msg>Remote service error</msg>
    <sub_code>isv.invalid-parameter</sub_code>
    <sub_msg>非法参数</sub_msg>
</error_response>

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部