# Get Fee Rates

### Call frequency limit <a href="#id-1-call-frequency-limit" id="id-1-call-frequency-limit"></a>

> &#x20;Provide the trade rate between two tokens, the trade rate update rate is 5-10s​

1. Url:

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

2\. Request parameter instance

| parameter       | whether | explain                                    |
| --------------- | ------- | ------------------------------------------ |
| depositCoinCode | Yes     | BTC                                        |
| receiveCoinCode | Yes     | ETH                                        |
| depositCoinAmt  | Yes     | depositCoinAmt                             |
| sourceFlag      | Yes     | sourceFlag                                 |
| fixedRate       | No      | Whether to use a fixed exchange rate (Y/N) |

3\. Example of request parameters

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

4.Example of returned results

```
{
    "data": {
        "chainFee": "0.001",
        "depositCoinFeeRate": "0.002",
        "depositMax": "14",
        "depositMin": "0.038603",
        "instantRate": "6.875775974236",
        "burnRate": "0",
        "isSupportNoGas": true //Does it support gas free redemption
        "isSupport": true //Whether or not to support exchange
    },
    "resCode": "800",
    "resMsg": "success",
    "resMsgEn": ""
}
```

5.Return Parameter Description

| Field Name                          | field              | data type | remarks                                                                                |
| ----------------------------------- | ------------------ | --------- | -------------------------------------------------------------------------------------- |
| instantRate                         | instantRate        | String    | "Exchange rate of received currency/deposited currency accurate to ten decimal places" |
| depositMin                          | cdepositMin        | String    | Accurate to six decimal places                                                         |
| depositMax                          | depositMax         | String    | BitcoiAccurate to six decimal places                                                   |
| depositCoinFeeRate                  | depositCoinFeeRate | String    | Accurate to six decimal places                                                         |
| chainFee                            | chainFee           | String    | Accurate to six decimal places                                                         |
| burnRate                            | burnRate           | String    | Default 0                                                                              |
| Does it support gas free redemption | isSupportNoGas     | Boolean   | true/false                                                                             |
| Whether or not to support exchange  | isSupport          | Boolean   | true/false                                                                             |

### Code Example <a href="#id-3-code-example" id="id-3-code-example"></a>

#### java code example <a href="#java-code-example" id="java-code-example"></a>

```java
OkHttpClient client = new OkHttpClient();
  ​
  MediaType mediaType = MediaType.parse("application/json");
  RequestBody body = RequestBody.create(mediaType, "{\"depositCoinCode\":\"BTC\",\"receiveCoinCode\":\"ETH\"}");
  Request request = new Request.Builder()
    .url("https://{host}/api/v1/getBaseInfo")
    .post(body)
    .addHeader("Content-Type", "application/json")
    .addHeader("cache-control", "no-cache")
    .build();
  ​
  Response response = client.newCall(request).execute();
```

#### C# code example <a href="#c-code-example" id="c-code-example"></a>

```csharp
var client = new RestClient("https://{host}/api/v1/getBaseInfo");
  var request = new RestRequest(Method.POST);
  request.AddHeader("cache-control", "no-cache");
  request.AddHeader("Content-Type", "application/json");
  request.AddParameter("undefined", "{\"depositCoinCode\":\"BTC\",\"receiveCoinCode\":\"ETH\"}", ParameterType.RequestBody);
  IRestResponse response = client.Execute(request);
```

#### &#x20;**Objective-C** code example <a href="#objective-c-code-example" id="objective-c-code-example"></a>

```objectivec
#import <Foundation/Foundation.h>
  ​
  NSDictionary *headers = @{ @"Content-Type": @"application/json",
                             @"cache-control": @"no-cache" };
  NSDictionary *parameters = @{ @"depositCoinCode": @"BTC",
                                @"receiveCoinCode": @"ETH" };
  ​
  NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
  ​
  NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://{host}/api/v1/getBaseInfo"]
                                                         cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                     timeoutInterval:10.0];
  [request setHTTPMethod:@"POST"];
  [request setAllHTTPHeaderFields:headers];
  [request setHTTPBody:postData];
  ​
  NSURLSession *session = [NSURLSession sharedSession];
  NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                              completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                  if (error) {
                                                      NSLog(@"%@", error);
                                                  } else {
                                                      NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                      NSLog(@"%@", httpResponse);
                                                  }
                                              }];
  [dataTask resume];
  ​
```

​

#### &#x20;**Nodejs** code example <a href="#nodejs-code-example" id="nodejs-code-example"></a>

<pre class="language-javascript"><code class="lang-javascript">  //getToken example 
<strong>  import axios from 'axios'
</strong>  const params = {
     depositCoinCode: 'ETH', 
     receiveCoinCode: 'BNB(BSC)', 
  }
<strong>  const res = await axios.post('https://{host}/api/v1/getBaseInfo', params )
</strong>  console.log(res)
</code></pre>

#### ​Postman example

![](/files/Wx4mq55QqMhbdMoEBwhu)

### **Response result example** <a href="#id-4-response-result-example" id="id-4-response-result-example"></a>

```yaml
  {
    "data": {
        "depositMax": "1692690",
        "depositMin": "169269",
        "instantRate": "0.000000538438",
        "minerFee": "0.00004368",
        "receiveCoinFee": "0.009328",
        "burnRate": "0",
        "isSupportNoGas": true //Does it support gas free redemption

    },
    "resCode": "800",
    "resMsg": "成功"
}
```

​

| Parameter      | Explanation                                                                                                                                                                                                                                                                                                                                |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| minerFee       | This value is for deposited tokens that utilize SWFTC for the exchange fee, SWFTC `exchange fee = deposited amount * minerFee`                                                                                                                                                                                                             |
| receiveCoinFee | This value is the amount of network fee deducted after successful transfer, the units are displayed in the token type the user is receiving/buying, this can be used to calculate the approximate amount of tokens that the user will receive, or it will be used to display the amount of network fees deducted to complete the transfer. |

**Important Items：**

> &#x20;For advanced trading, user's fee method is the deposited tokens, not SWFTC, therefore parameter "minerFee" can be ignored, the transaction fee is fixed at 0.3% (ex.: if depositing 0.1 BTC, the actual amount deducted is 0.0003btc as the transfer's transaction fee, when actually exchange, only 0.0997btc will be transferred)


---

# Agent Instructions: 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:

```
GET https://docs.en.omnibridge.pro/cross-chain-swap-api/obtain-exchange-rate-basic-information-port.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
