# Generated by ShowAPI OpenAPI generator
# source: market/1683
# generated-at: 2026-06-26T05:59:52.750Z
openapi: 3.0.3
info:
  title: 外汇数据查询
  description: 提供更新国际外汇市场热门货币汇率的历史数据，适用于金融分析、投资决策、旅行规划、国际商务等场景，帮助您及时了解市场动态和兑换比率。免责声明：本接口数据为延迟数据，仅供用于学习分析，不得用于对外展示！
  termsOfService: https://www.showapi.com/helpcenter/view#/4019/2
  version: 1.0.0
servers:
  - url: https://route.showapi.com
paths:
  /1683-6:
    x-pointCode: 6
    x-mode: mapping
    x-read-timeout: 15
    x-connect-timeout: 15
    post:
      summary: 汇率转换
      description: 全球主流货币汇率转换，时间延迟在5分钟以上。本接口数据仅用于学习分析，不得用于对外展示！
      responses:
        "200":
          description: 成功响应
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/ShowapiResEnvelope"
                  - type: object
                    properties:
                      showapi_res_body:
                        type: object
                        properties:
                          ret_code:
                            type: number
                            description: 调用标识 0成功 -1失败
                          time:
                            type: string
                            description: 参考时间
                          rate:
                            type: string
                            description: 参考汇率
                          remark:
                            type: string
                            description: 调用描述
                        description: 业务返回体
      operationId: 1683_6_POST
      parameters: []
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                from_code:
                  type: string
                  description: 源货币编码
                to_code:
                  type: string
                  description: 目标货币编码
              required:
                - from_code
                - to_code
  /1683-3:
    x-pointCode: 3
    x-mode: mapping
    x-read-timeout: 15
    x-connect-timeout: 15
    post:
      summary: 历史分钟K线查询
      description: 可获取每分钟K线数据，时间延迟在5分钟以上。本接口数据仅用于学习分析，不得用于对外展示！
      responses:
        "200":
          description: 成功响应
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/ShowapiResEnvelope"
                  - type: object
                    properties:
                      showapi_res_body:
                        type: object
                        properties:
                          ret_code:
                            type: string
                            description: 成功为0，其他失败
                          size:
                            type: string
                            description: 数据列表的长度。
                          list:
                            type: array
                            items:
                              type: object
                              properties:
                                datetime:
                                  type: string
                                  description: 时间点
                                open:
                                  type: string
                                  description: 开盘价
                                code:
                                  type: string
                                  description: 编码
                                low:
                                  type: string
                                  description: 最低价
                                close:
                                  type: string
                                  description: 收盘价
                                forexName:
                                  type: string
                                  description: 编码名称
                                high:
                                  type: string
                                  description: 最高价
                                time:
                                  type: string
                                  description: 时间戳
                            description: 返回数据的列表。
                        description: 业务返回体
      operationId: 1683_3_POST
      parameters: []
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                code:
                  type: string
                  description: 支持【热门外汇列表】接入点中查询到的编码
                hour:
                  type: string
                  description: 小时，格式为yyyyMMddHH
                limit:
                  type: string
                  description: 返回多少条记录，最大值为60.  默认值为10.
              required:
                - code
                - hour
  /1683-2:
    x-pointCode: 2
    x-mode: mapping
    x-read-timeout: 15
    x-connect-timeout: 15
    post:
      summary: 日线历史查询
      description: 日线历史查询接接入点提供外汇的日线历史数据查询服务，适用于金融分析师、投资者、交易员等参考，本接口数据仅用于学习分析，不得用于对外展示！
      responses:
        "200":
          description: 成功响应
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/ShowapiResEnvelope"
                  - type: object
                    properties:
                      showapi_res_body:
                        type: object
                        properties:
                          ret_code:
                            type: string
                            description: 0为成功，其他失败
                          size:
                            type: string
                            description: 数据的长度
                          list:
                            type: array
                            items:
                              type: object
                              properties:
                                date:
                                  type: string
                                  description: 时间点
                                open:
                                  type: string
                                  description: 开盘
                                code:
                                  type: string
                                  description: 编码
                                low:
                                  type: string
                                  description: 最低价
                                close:
                                  type: string
                                  description: 收盘价
                                forexName:
                                  type: string
                                  description: 编码名称
                                high:
                                  type: string
                                  description: 最高价
                                time:
                                  type: string
                                  description: 时间戳
                            description: 列表数据
                        description: 业务返回体
      operationId: 1683_2_POST
      parameters: []
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                code:
                  type: string
                  description: 支持【热门外汇列表】接入点中查询到的编码
                begin:
                  type: string
                  description: 开始日期，格式yyyyMMdd
                end:
                  type: string
                  description: 结束日期，格式yyyyMMdd，时间范围不超过30天。
              required:
                - code
                - begin
                - end
  /1683-1:
    x-pointCode: 1
    x-mode: mapping
    x-read-timeout: 15
    x-connect-timeout: 15
    post:
      summary: 热门外汇列表
      description: 热门外汇列表查询接口提供当前热门的外汇兑换列表信息，适用于金融分析、投资决策、旅行规划、国际商务等场景，帮助用户及时了解市场动态和兑换比率。
      responses:
        "200":
          description: 成功响应
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/ShowapiResEnvelope"
                  - type: object
                    properties:
                      showapi_res_body:
                        type: object
                        properties:
                          ret_code:
                            type: string
                            description: 数据查询是否成功,成功为0,其他值查询失败
                          forexList:
                            type: array
                            items:
                              type: object
                              properties:
                                code:
                                  type: string
                                  description: 汇率兑换的编码
                                forexName:
                                  type: string
                                  description: 汇率中文兑换名
                        description: 业务返回体
      operationId: 1683_1_POST
      parameters: []
components:
  securitySchemes:
    AppKeyAuth:
      type: apiKey
      in: query
      name: appKey
      description: 从 ShowAPI 控制台获取的 appKey，管理地址：https://www.showapi.com/console#/myApp
  schemas:
    ShowapiResEnvelope:
      type: object
      description: ShowAPI 统一返回包裹（业务数据位于 showapi_res_body）
      properties:
        showapi_res_code:
          type: integer
          description: API 返回的状态码
        showapi_res_error:
          type: string
          description: API 返回的错误信息
        showapi_res_id:
          type: string
          description: API 请求的唯一标识
        showapi_fee_num:
          type: integer
          description: API 调用计费次数
security:
  - AppKeyAuth: []
externalDocs:
  url: https://www.showapi.com/apiGateway/view/1683?tab=book
x-apiCode: "1683"
x-is-own: false
x-is-op: true
