> For the complete documentation index, see [llms.txt](https://docs.cn.omnibridge.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cn.omnibridge.pro/integration/get-base-info.md).

# 查询兑换汇率

### 接口汇率更新频率

> 提供两个币种之间兑换的汇率，汇率更新频率为：4\~6s     &#x20;

**1. 接口调用：**

```
https://{host}/api/v1/getBaseInfo
```

**2. 请求参数示例**

| 参数              | 是否必须 | 说明            |
| --------------- | ---- | ------------- |
| depositCoinCode | 是    | BTC           |
| receiveCoinCode | 是    | ETH           |
| depositCoinAmt  | 是    | 原币数量          |
| sourceFlag      | 是    | 渠道名称          |
| fixedRate       | 否    | 是否使用固定汇率(Y/N) |

**3.请求参数示例**

```ada
{
    "depositCoinCode":"ETH",
    "receiveCoinCode":"BNB(BSC)",
    "depositCoinAmt":"1.5",
    "sourceFlag": "xxx",
    "fixedRate": "N"
}
```

**4.返回结果示例**

```
{
    "data": {
        "chainFee": "0.001",//兑换完成后发币网络手续费
        "depositCoinFeeRate": "0.002",//兑换手续费率，兑换手续费 = 存币数量 * depositCoinFeeRate
        "depositMax": "14",//最大存币范围
        "depositMin": "0.038603",//最小存币范围
        "instantRate": "6.875775974236",//当前汇率
        "burnRate": "0"//燃烧率
        "isSupportNoGas": true //是否支持免 gas 兑换,
        "isSupport": true //该币对是否支持兑换
        "difference": "0.1" //回兑差值
    },
    "resCode": "800",
    "resMsg": "成功",
    "resMsgEn": ""
}
```

**5.返回参数说明**

<table><thead><tr><th width="131">字段名称</th><th width="122">字段</th><th width="135">数据类型</th><th>备注</th></tr></thead><tbody><tr><td>即时汇率</td><td>instantRate</td><td>String</td><td>"精确到小数点后十位 接收货币/存入货币的汇率"</td></tr><tr><td>最低存储额</td><td>depositMin</td><td>String</td><td>精确到小数点后六位</td></tr><tr><td>最高存储额</td><td>depositMax   </td><td>String</td><td>精确到小数点后六位</td></tr><tr><td>兑换手续费     </td><td>depositCoinFeeRate</td><td>String</td><td>精确到小数点后六位</td></tr><tr><td>发币手续费 </td><td>chainFee </td><td>String </td><td>精确到小数点后六位</td></tr><tr><td>燃烧率</td><td>burnRate</td><td>String</td><td>燃烧率 默认为0</td></tr><tr><td>是否支持免 gas 兑换</td><td>isSupportNoGas</td><td>Boolean</td><td>true/false</td></tr><tr><td>是否支持兑换</td><td>isSupport</td><td>Boolean</td><td>true/false</td></tr><tr><td>回兑差值</td><td>difference</td><td>String</td><td>回兑差值(以小数返回)</td></tr></tbody></table>

**6.Postman示例**

![](/files/Se6gwU8bMYbumcYipx13)

**7.特殊字段说明**

|         字段         | 说明                                                                                                        |
| :----------------: | --------------------------------------------------------------------------------------------------------- |
|      minerFee      | 该值用于**中心化兑换**                                                                                             |
| depositCoinFeeRate | 该值为兑换手续费率，兑换手续费 = 存币数量 \* depositCoinFeeRate                                                              |
|      chainFee      | 该值用于**去中心化兑换，**&#x540C;receiveCoinFee，兑换成功后发币时扣取的网络手续费，单位为接收币币种，可用于提前计算用户大致接收到的币的数量，或用于显示用户即将扣除发币网络手续费的数量 |

**8.注意事项**

> **对于去中心化兑换**，用户的手续费方式为原币，因此可以忽略minerFee字段，手续费固定收取存入原币的千分之三（即：存入0.1btc，实际会扣取0.0003btc作为兑换的手续费，实际兑换时，只拿0.0997btc去做兑换）

**9.计算用户兑换实际到账数量**

实际到账数量 = （用户存币数量 - 兑换手续费数量）\* 汇率 -  链上发币网络手续费

\= （depositCoinAmt - depositCoinAmt \* depositCoinFeeRate） *\** instantRate - chainFee


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.cn.omnibridge.pro/integration/get-base-info.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
