> For the complete documentation index, see [llms.txt](https://docs.ave.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ave.ai/reference/api-reference/v1.md).

# v1

## Querying A Token

## Query the information of a token by token and chain

<mark style="color:blue;">`GET`</mark> `https://openapi.avedata.org/api/v1/tokens/{token}-{chain}`

#### Path Parameters

| Name                                    | Type   | Description                    |
| --------------------------------------- | ------ | ------------------------------ |
| token<mark style="color:red;">\*</mark> | String | The token you want to query    |
| chain<mark style="color:red;">\*</mark> | String | The chain the token belongs to |

#### Headers

| Name                                       | Type   | Description                           |
| ------------------------------------------ | ------ | ------------------------------------- |
| Ave-Auth<mark style="color:red;">\*</mark> | String | Your API key needed to access the url |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
{
  "code": 0, 
  "msg": "success", 
  "data": {
    "circulating_supply": "4955628.4467802495", 
    "market_cap": "1962256580.003493771825708883", 
    "high_24h": "402.70076072930874", 
    "low_24h": "377.9810366034385", 
    "volume_24h": "82679812.507945315148", 
    "tx_count_24h": "110522", 
    "amount_24h": "211743.924285855192726511", 
    "turnover_24h": "83843232.63291363742234131909", 
    "total_supply": "4955628.4467802495", 
    "price": "395.9652344958192", 
    "token": "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c", 
    "chain": "bsc", 
    "symbol": "WBNB", 
    "decimal": 18, 
    "name": "Wrapped BNB", 
    "holders": 1331634, 
    "intro_cn": "", 
    "intro_en": "", 
    "price_change": "3.97", 
    "logo_url": "https://s2.coinmarketcap.com/static/img/coins/64x64/7192.png", 
    "risk_level": 1, 
    "risk_info": null, 
    "appendix": "{\"contractAddress\": \"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c\", \"tokenName\": \"Wrapped BNB\", \"symbol\": \"WBNB\", \"divisor\": \"18\", \"tokenType\": \"ERC20\", \"totalSupply\": \"7133547.389744000000000000\", \"blueCheckmark\": \"true\", \"description\": \"As the native coin of Binance Chain, BNB has multiple use cases: fueling transactions on the Chain, paying for transaction fees on Binance Exchange, making in-store payments, and many more.\", \"website\": \"https://www.binance.org/\", \"email\": \"product@binance.com\", \"blog\": \"https://www.binance.org/en/blog/\", \"reddit\": \"https://www.reddit.com/r/binanceexchange\", \"slack\": \"\", \"facebook\": \"\", \"twitter\": \"https://twitter.com/binance_dex\", \"bitcointalk\": \"\", \"github\": \"https://github.com/binance-chain/\", \"telegram\": \"https://t.me/BinanceDEXchange\", \"wechat\": \"\", \"linkedin\": \"\", \"discord\": \"\", \"whitepaper\": \"\", \"tokenPriceUSD\": \"314.5930168927\"}"
  }
}
```

{% endtab %}

{% tab title="400: Bad Request The parameters may be invalid" %}

```javascript
{
  "code": 1, 
  "msg": "<class 'openapi.error.BadRequestError'> : Wrong token_id format, it should be {token}-{chain}", 
  "data": {}
}
```

{% endtab %}

{% tab title="401: Unauthorized Ave-auth does not exist or is not correct" %}

```javascript
{
  "code": 1, 
  "msg": "<class 'openapi.error.UnauthorizedError'> : Permission denied", 
  "data": {}
}
```

{% endtab %}

{% tab title="404: Not Found Such token is not found" %}

```javascript
{
  "code": 1, 
  "msg": "<class 'openapi.error.NotFoundError'> : Such token does not exist", 
  "data": {}
}
```

{% endtab %}

{% tab title="500: Internal Server Error Some unknown error occurred" %}

```javascript
{
  "code": 2, 
  "msg": "<class 'decimal.InvalidOperation'> : Unknown error, check logs for more information", 
  "data": {}
}
```

{% endtab %}

{% tab title="403: Forbidden The limit of this API has been reached" %}

```javascript
{
  "code": 1, 
  "msg": "<class 'openapi.error.ForbiddenError'> : The limit of this API has been reached today", 
  "data": {}
}
```

{% endtab %}
{% endtabs %}

## Searching Tokens

## Search for the tokens associated with given keyword

<mark style="color:blue;">`GET`</mark> `https://openapi.avedata.org/api/v1/tokens`

The keyword must not be null or empty

#### Query Parameters

| Name                                      | Type   | Description                 |
| ----------------------------------------- | ------ | --------------------------- |
| keyword<mark style="color:red;">\*</mark> | String | The keyword needed to query |

#### Headers

| Name                                       | Type   | Description                           |
| ------------------------------------------ | ------ | ------------------------------------- |
| Ave-Auth<mark style="color:red;">\*</mark> | String | Your API key needed to access the url |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
{
  "code": 0, 
  "msg": "success", 
  "data": [
    {
      "token": "0xc33fc11b55465045b3f1684bde4c0aa5c5f40124", 
      "chain": "bsc", 
      "name": "", 
      "symbol": "BNBw", 
      "logo_url": null, 
      "price": "0", 
      "price_change": "0", 
      "risk_level": -1, 
      "risk_info": null
    }, 
    {
      "token": "0xe9e7cea3dedca5984780bafc599bd69add087d56", 
      "chain": "bsc", 
      "name": "Binance-Peg BUSD Token", 
      "symbol": "BUSD", 
      "logo_url": "https://assets.coingecko.com/coins/images/9576/small/BUSD.png?1568947766", 
      "price": "0.999179612926973", 
      "price_change": "-0.25", 
      "risk_level": 0, 
      "risk_info": null
    }
  ]
}
```

{% endtab %}

{% tab title="400: Bad Request The parameters may be invalid" %}

```javascript
{
  "code": 1, 
  "msg": "<class 'openapi.error.BadRequestError'> : \"keyword\" parameter must not be empty", 
  "data": {}
}
```

{% endtab %}

{% tab title="401: Unauthorized Ave-auth does not exist or is not correct" %}

```javascript
{
  "code": 1, 
  "msg": "<class 'openapi.error.UnauthorizedError'> : Permission denied", 
  "data": {}
}
```

{% endtab %}

{% tab title="404: Not Found Not found any matched results" %}

```javascript
{
  "code": 1, 
  "msg": "<class 'openapi.error.NotFoundError'> : Not found any matched results", 
  "data": {}
}
```

{% endtab %}

{% tab title="500: Internal Server Error Some unknown error occurred" %}

```javascript
{
  "code": 2, 
  "msg": "<class 'decimal.InvalidOperation'> : Unknown error, check logs for more information", 
  "data": {}
}
```

{% endtab %}

{% tab title="403: Forbidden The limit of this API has been reached" %}

```javascript
{
  "code": 1, 
  "msg": "<class 'openapi.error.ForbiddenError'> : The limit of this API has been reached today", 
  "data": {}
}
```

{% endtab %}
{% endtabs %}

## Querying Pairs

## Query the information of pairs associated with a token

<mark style="color:blue;">`GET`</mark> `https://openapi.avedata.org/api/v1/tokens/{token}/pairs`

at most 10 pairs&#x20;

#### Path Parameters

| Name                                    | Type   | Description                 |
| --------------------------------------- | ------ | --------------------------- |
| token<mark style="color:red;">\*</mark> | String | The token you want to query |

#### Headers

| Name                                       | Type   | Description                           |
| ------------------------------------------ | ------ | ------------------------------------- |
| Ave-Auth<mark style="color:red;">\*</mark> | String | Your API key needed to access the url |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
{
  "code": 0, 
  "msg": "success", 
  "data": [
    {
      "pair": "0x58f876857a02d6762e0101bb5c46a8c1ed44dc16", 
      "chain": "bsc", 
      "amm": "cake", 
      "token0_address": "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c", 
      "token0_symbol": "WBNB", 
      "token0_decimal": 18, 
      "token1_address": "0xe9e7cea3dedca5984780bafc599bd69add087d56", 
      "token1_symbol": "BUSD", 
      "token1_decimal": 18, 
      "target_token": "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c", 
      "reserve0": "410424.268671638812210603", 
      "reserve1": "156698541.308944389086091456", 
      "token0_price_usd": "380.842003959459760000000000000000000000", 
      "token1_price_usd": "1.000000000000000000000000000000000000", 
      "price_change": "-0.25", 
      "reserve_change": "-0.65"
    }, 
    {
      "pair": "0x16b9a82891338f9ba80e2d6970fdda79d1eb0dae", 
      "chain": "bsc", 
      "amm": "cake", 
      "token0_address": "0x55d398326f99059ff775485246999027b3197955", 
      "token0_symbol": "USDT", 
      "token0_decimal": 18, 
      "token1_address": "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c", 
      "token1_symbol": "WBNB", 
      "token1_decimal": 18, 
      "target_token": "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c", 
      "reserve0": "98104691.490648366571375449", 
      "reserve1": "257006.754767014925512112", 
      "token0_price_usd": "1.000000000000000000000000000000000000", 
      "token1_price_usd": "382.676949413405850000000000000000000000", 
      "price_change": "0.32", 
      "reserve_change": "-0.26"
    }
  ]
}
```

{% endtab %}

{% tab title="400: Bad Request The parameters may be invalid" %}

```javascript
{
  "code": 1, 
  "msg": "<class 'openapi.error.BadRequestError'> : Wrong token_id format, it should be {token}-{chain}", 
  "data": {}
}
```

{% endtab %}

{% tab title="401: Unauthorized Ave-auth does not exist or is not correct" %}

```javascript
{
  "code": 1, 
  "msg": "<class 'openapi.error.UnauthorizedError'> : Permission denied", 
  "data": {}
}
```

{% endtab %}

{% tab title="404: Not Found Such token is not found" %}

```javascript
{
  "code": 1, 
  "msg": "<class 'openapi.error.NotFoundError'> : Such token does not exist", 
  "data": {}
}
```

{% endtab %}

{% tab title="500: Internal Server Error Some unknown error occurred" %}

```javascript
{
  "code": 2, 
  "msg": "<class 'decimal.InvalidOperation'> : Unknown error, check logs for more information", 
  "data": {}
}
```

{% endtab %}

{% tab title="403: Forbidden The limit of this API has been reached" %}

```javascript
{
  "code": 1, 
  "msg": "<class 'openapi.error.ForbiddenError'> : The limit of this API has been reached today", 
  "data": {}
}
```

{% endtab %}
{% endtabs %}

## Querying K-Line

## Query the data of K-Line of a pair with a specific time interval

<mark style="color:blue;">`GET`</mark> `https://openapi.avedata.org/api/v1/pairs/{pair}/kline`

The interval is 1 minute by default. All valid values are 1,5,15,60,240,1440,10080

The size of returned set is 600 by default, and is not above 1000

#### Path Parameters

| Name                                   | Type   | Description            |
| -------------------------------------- | ------ | ---------------------- |
| pair<mark style="color:red;">\*</mark> | String | The pair to be queried |

#### Query Parameters

| Name     | Type | Description                          |
| -------- | ---- | ------------------------------------ |
| interval | Int  | The time interval of K-Line          |
| size     | Int  | The number of records need to return |

#### Headers

| Name                                       | Type   | Description                           |
| ------------------------------------------ | ------ | ------------------------------------- |
| Ave-Auth<mark style="color:red;">\*</mark> | String | Your API key needed to access the url |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
{
  "code": 0, 
  "msg": "success", 
  "data": [
    {
      "time": 1646645940, 
      "open": "0.00002273257609122223", 
      "high": "0.00002273257609122223", 
      "low": "0.000022336019667455135", 
      "close": "0.000022336019667455135", 
      "volume": "77.88791620752937"
    }, 
    {
      "time": 1646664720, 
      "open": "0.000022336019667455135", 
      "high": "0.000022698552571008256", 
      "low": "0.000022336019667455135", 
      "close": "0.000022698552571008256", 
      "volume": "29.828257600959898"
    }
  ]
}
```

{% endtab %}

{% tab title="400: Bad Request The parameters may be invalid" %}

```javascript
{
  "code": 1, 
  "msg": "<class 'openapi.error.BadRequestError'> : Such interval does not exist", 
  "data": {}
}
```

{% endtab %}

{% tab title="401: Unauthorized Ave-auth does not exist or is not correct" %}

```javascript
{
  "code": 1, 
  "msg": "<class 'openapi.error.UnauthorizedError'> : Permission denied", 
  "data": {}
}
```

{% endtab %}

{% tab title="404: Not Found Such K-Line does not exist" %}

```javascript
{
  "code": 1, 
  "msg": "<class 'openapi.error.NotFoundError'> : Such K-Line does not exist", 
  "data": {}
}
```

{% endtab %}

{% tab title="500: Internal Server Error Some unknown error occurred" %}

```javascript
{
  "code": 2, 
  "msg": "<class 'decimal.InvalidOperation'> : Unknown error, check logs for more information", 
  "data": {}
}
```

{% endtab %}

{% tab title="403: Forbidden The limit of this API has been reached" %}

```javascript
{
  "code": 1, 
  "msg": "<class 'openapi.error.ForbiddenError'> : The limit of this API has been reached today", 
  "data": {}
}
```

{% endtab %}
{% endtabs %}

## Querying Transactions

## Query transactions of a specific pair

<mark style="color:blue;">`GET`</mark> `https://openapi.avedata.org/api/v1/pairs/{pair}/tx`

The size of returned set is 200 by default, and is not above 500

#### Path Parameters

| Name                                   | Type   | Description            |
| -------------------------------------- | ------ | ---------------------- |
| pair<mark style="color:red;">\*</mark> | String | The pair to be queried |

#### Query Parameters

| Name | Type | Description                          |
| ---- | ---- | ------------------------------------ |
| size | Int  | The number of records need to return |

#### Headers

| Name                                       | Type   | Description                           |
| ------------------------------------------ | ------ | ------------------------------------- |
| Ave-Auth<mark style="color:red;">\*</mark> | String | Your API key needed to access the url |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
{
  "code": 0, 
  "msg": "success", 
  "data": [
    {
      "time": 1646828499, 
      "chain": "bsc", 
      "amm": "cakev2", 
      "transaction": "0xcc729c0c5f87a508eeada88b2131bcae8ebaa97e98c0b705815a270cd23c5bc5", 
      "sender": "0x10ed43c718714eb63d5aa57b78b54704e256024e", 
      "amount_eth": "0.005385365576667877015384611110515720", 
      "amount_usd": "2.135673144951755123076921381944390453", 
      "from_address": "0x707ee3dd4ef8bf70dad49ce4128de4a0603b2e77", 
      "from_symbol": "BOC", 
      "from_price_eth": "0.000000055563295632287620000000000000", 
      "from_price_usd": "0.000022034722924105410000000000000000", 
      "from_amount": "96923.076923076923076923", 
      "to_address": "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c", 
      "to_symbol": "WBNB", 
      "to_price_eth": "1.000000000000000000000000000000000000", 
      "to_price_usd": "396.569761986924264108548384802494526618", 
      "to_amount": "0.005385365576667877", 
      "wallet_address": "0xae672eff07fe0145c8a4d727bb492dfc94b0d03b"
    }, 
    {
      "time": 1646828499, 
      "chain": "bsc", 
      "amm": "cakev2", 
      "transaction": "0xcc729c0c5f87a508eeada88b2131bcae8ebaa97e98c0b705815a270cd23c5bc5", 
      "sender": "0x10ed43c718714eb63d5aa57b78b54704e256024e", 
      "amount_eth": "0.000269207907568506996923068376794143", 
      "amount_usd": "0.106759715829440726769227380033441312", 
      "from_address": "0x707ee3dd4ef8bf70dad49ce4128de4a0603b2e77", 
      "from_symbol": "BOC", 
      "from_price_eth": "0.000000055550838069691920000000000000", 
      "from_price_usd": "0.000022029782631471896000000000000000", 
      "from_amount": "4846.153846153846153846", 
      "to_address": "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c", 
      "to_symbol": "WBNB", 
      "to_price_eth": "1.000000000000000000000000000000000000", 
      "to_price_usd": "396.569761986924263378137215330431764866", 
      "to_amount": "0.000269207907568507", 
      "wallet_address": "0xae672eff07fe0145c8a4d727bb492dfc94b0d03b"
    }
  ]
}
```

{% endtab %}

{% tab title="400: Bad Request The parameters may be invalid" %}

```javascript
{
  "code": 1, 
  "msg": "<class 'openapi.error.BadRequestError'> : Size must not be negative", 
  "data": {}
}
```

{% endtab %}

{% tab title="401: Unauthorized Ave-auth does not exist or is not correct" %}

```javascript
{
  "code": 1, 
  "msg": "<class 'openapi.error.UnauthorizedError'> : Permission denied", 
  "data": {}
}
```

{% endtab %}

{% tab title="404: Not Found Such pair does not exist" %}

```javascript
{
  "code": 1, 
  "msg": "<class 'openapi.error.NotFoundError'> : Such pair does not exist", 
  "data": {}
}
```

{% endtab %}

{% tab title="500: Internal Server Error Some unknown error occurred" %}

```javascript
{
  "code": 2, 
  "msg": "<class 'decimal.InvalidOperation'> : Unknown error, check logs for more information", 
  "data": {}
}
```

{% endtab %}

{% tab title="403: Forbidden The limit of this API has been reached" %}

```javascript
{
  "code": 1, 
  "msg": "<class 'openapi.error.ForbiddenError'> : The limit of this API has been reached today", 
  "data": {}
}
```

{% endtab %}
{% endtabs %}

## Querying Liquidities

## Query liquidities of a specific pair

<mark style="color:blue;">`GET`</mark> `https://openapi.avedata.org/api/v1/pairs/{pair}/liq`

The size of returned set is 200 by default, and is not above 500

#### Path Parameters

| Name                                   | Type   | Description            |
| -------------------------------------- | ------ | ---------------------- |
| pair<mark style="color:red;">\*</mark> | String | The pair to be queried |

#### Query Parameters

| Name | Type | Description                          |
| ---- | ---- | ------------------------------------ |
| size | Int  | The number of records need to return |

#### Headers

| Name                                       | Type   | Description                           |
| ------------------------------------------ | ------ | ------------------------------------- |
| Ave-Auth<mark style="color:red;">\*</mark> | String | Your API key needed to access the url |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
{
  "code": 0, 
  "msg": "success", 
  "data": [
    {
      "time": 1646828499, 
      "chain": "bsc", 
      "amm": "cakev2", 
      "transaction": "0xcc729c0c5f87a508eeada88b2131bcae8ebaa97e98c0b705815a270cd23c5bc5", 
      "sender": "0x10ed43c718714eb63d5aa57b78b54704e256024e", 
      "type": "addLiquidity", 
      "amount_eth": "0.000268537755163619428974958324831191", 
      "amount_usd": "0.106493953649739499047629366165513858", 
      "pair_liquidity_eth": "25.212444709937106926337849092388539565", 
      "pair_liquidity_usd": "9998.493197728246242125937083738860099664", 
      "token0_address": "0x707ee3dd4ef8bf70dad49ce4128de4a0603b2e77", 
      "token0_symbol": "BOC", 
      "token0_price_eth": "0.000000055550838069691920000000000000", 
      "token0_price_usd": "0.000022029782631471896000000000000000", 
      "amount0": "4834.090078474107086434", 
      "token1_address": "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c", 
      "token1_symbol": "WBNB", 
      "token1_price_eth": "1.000000000000000000000000000000000000", 
      "token1_price_usd": "396.569761986924263378137215330431764866", 
      "amount1": "0.000269207907568507", 
      "wallet_address": "0xae672eff07fe0145c8a4d727bb492dfc94b0d03b"
    }, 
    {
      "time": 1646824798, 
      "chain": "bsc", 
      "amm": "cakev2", 
      "transaction": "0xbf84dbe91b7fd721bf453e7169ecb3ec05aa2810f8b43a672fb131f258f24f7b", 
      "sender": "0x10ed43c718714eb63d5aa57b78b54704e256024e", 
      "type": "addLiquidity", 
      "amount_eth": "0.000277023344191042864000188338154252", 
      "amount_usd": "0.109623285488895963949587176049537791", 
      "pair_liquidity_eth": "25.261914760210241911343020904469783600", 
      "pair_liquidity_usd": "9996.609137188457796583585698527613668209", 
      "token0_address": "0x707ee3dd4ef8bf70dad49ce4128de4a0603b2e77", 
      "token0_symbol": "BOC", 
      "token0_price_eth": "0.000000055770493299429334000000000000", 
      "token0_price_usd": "0.000022069420635553717000000000000000", 
      "amount0": "4967.202687337131330143", 
      "token1_address": "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c", 
      "token1_symbol": "WBNB", 
      "token1_price_eth": "1.000000000000000000000000000000000000", 
      "token1_price_usd": "395.718583966327228836574197818172292393", 
      "amount1": "0.000277714585189431", 
      "wallet_address": "0x24188f894c097385eb518ac901126dce657433ed"
    }
  ]
}
```

{% endtab %}

{% tab title="400: Bad Request The parameters may be invalid" %}

```javascript
{
  "code": 1, 
  "msg": "<class 'openapi.error.BadRequestError'> : Size must not be negative", 
  "data": {}
}
```

{% endtab %}

{% tab title="401: Unauthorized Ave-auth does not exist or is not correct" %}

```javascript
{
  "code": 1, 
  "msg": "<class 'openapi.error.UnauthorizedError'> : Permission denied", 
  "data": {}
}
```

{% endtab %}

{% tab title="404: Not Found Such pair does not exist" %}

```javascript
{
  "code": 1, 
  "msg": "<class 'openapi.error.NotFoundError'> : Such pair does not exist", 
  "data": {}
}
```

{% endtab %}

{% tab title="500: Internal Server Error Some unknown error occurred" %}

```javascript
{
  "code": 2, 
  "msg": "<class 'decimal.InvalidOperation'> : Unknown error, check logs for more information", 
  "data": {}
}
```

{% endtab %}

{% tab title="403: Forbidden The limit of this API has been reached" %}

```javascript
{
  "code": 1, 
  "msg": "<class 'openapi.error.ForbiddenError'> : The limit of this API has been reached today", 
  "data": {}
}
```

{% endtab %}
{% endtabs %}

## Querying Pair List of An AMM

## Query the pair list of a specific amm

<mark style="color:blue;">`GET`</mark> `https://openapi.avedata.org/api/v1/amm/{amm}-{chain}`

The limit is 200 by default, and is not allowed to be above 500

#### Path Parameters

| Name                                    | Type   | Description                              |
| --------------------------------------- | ------ | ---------------------------------------- |
| amm<mark style="color:red;">\*</mark>   | String | The name of swap you want to query       |
| chain<mark style="color:red;">\*</mark> | String | Which chain of the amm you want to query |

#### Query Parameters

| Name      | Type   | Description                                                                 |
| --------- | ------ | --------------------------------------------------------------------------- |
| offset    | Int    | The offset of the returning set                                             |
| limit     | Int    | The max size of the returning set                                           |
| sort      | String | must be equal to one of the values below: pool\_size, time, txcount, volume |
| direction | String | must be equal to one of the values below: asc, desc                         |

#### Headers

| Name                                       | Type   | Description                             |
| ------------------------------------------ | ------ | --------------------------------------- |
| Ave-Auth<mark style="color:red;">\*</mark> | String | The api key you need to access this url |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
{
  "code": 0, 
  "msg": "success", 
  "data": {
    "total": 251, 
    "list": [
      {
        "created_at": 1640052666, 
        "volume": "0", 
        "pair": "0x418fb1b47727b8fec0baa663ae79d756868b3f85", 
        "chain": "heco", 
        "amm": "butterswap", 
        "token0_address": "0xdd552e703d00e4add1d851987920b738386142e0", 
        "token0_symbol": "Butter-LP", 
        "token0_decimal": 18, 
        "token1_address": "0xff96dccf2763d512b6038dc60b7e96d1a9142507", 
        "token1_symbol": "BOO", 
        "token1_decimal": 18, 
        "target_token": "0xdd552e703d00e4add1d851987920b738386142e0", 
        "reserve0": "51518.91101418668", 
        "reserve1": "387.403229861048", 
        "token0_price_usd": "18940716.073764715000000000000000000000000000", 
        "token1_price_usd": "3820419924.436435751309730672798531008085238418", 
        "price_change": "217.53", 
        "reserve_change": "-86.1", 
        "tx_count": 0
      }, 
      {
        "created_at": 1638027531, 
        "volume": "0", 
        "pair": "0x0a003eb708de8c13a2c25859ce0ef1cd3c5b2439", 
        "chain": "heco", 
        "amm": "butterswap", 
        "token0_address": "0x1cf996196eede86ff3d3655f29aa14ec6d157249", 
        "token0_symbol": "BTCK", 
        "token0_decimal": 6, 
        "token1_address": "0xff96dccf2763d512b6038dc60b7e96d1a9142507", 
        "token1_symbol": "BOO", 
        "token1_decimal": 18, 
        "target_token": "0xff96dccf2763d512b6038dc60b7e96d1a9142507", 
        "reserve0": "1147328718832.901552", 
        "reserve1": "16.703422679138849231", 
        "token0_price_usd": "0.022001640533509804432722496521169119", 
        "token1_price_usd": "3726298012.642993500000000000000000000000000000", 
        "price_change": "0", 
        "reserve_change": "-99.84", 
        "tx_count": 0
      }
    ]
  }
}
```

{% endtab %}

{% tab title="400: Bad Request The parameters may be invalid" %}

```javascript
{
  "code": 1, 
  "msg": "<class 'openapi.error.BadRequestError'> : Offset must not be negative", 
  "data": {}
}
```

{% endtab %}

{% tab title="401: Unauthorized Ave-auth does not exist or is not correct" %}

```javascript
{
  "code": 1, 
  "msg": "<class 'openapi.error.UnauthorizedError'> : Permission denied", 
  "data": {}
}
```

{% endtab %}

{% tab title="403: Forbidden The limit of this API has been reached" %}

```javascript
{
  "code": 1, 
  "msg": "<class 'openapi.error.ForbiddenError'> : The limit of this API has been reached today", 
  "data": {}
}
```

{% endtab %}

{% tab title="404: Not Found Such amm does not exist" %}

```javascript
{
  "code": 1, 
  "msg": "<class 'openapi.error.NotFoundError'> : Such amm does not exist", 
  "data": {}
}
```

{% endtab %}

{% tab title="500: Internal Server Error Some unknown error occurred" %}

```javascript
{
  "code": 2, 
  "msg": "<class 'decimal.InvalidOperation'> : Unknown error, check logs for more information", 
  "data": {}
}
```

{% endtab %}
{% endtabs %}

## Querying Contract Check

## Query the check result of a specific contract

<mark style="color:blue;">`GET`</mark> `https://openapi.avedata.org/api/v1/contract_check/{chain}/{contract}`

Supporting bsc, eth, arbitrum, and core

#### Path Parameters

| Name                                       | Type   | Description                                   |
| ------------------------------------------ | ------ | --------------------------------------------- |
| contract<mark style="color:red;">\*</mark> | String | The address of contract you want to query     |
| chain<mark style="color:red;">\*</mark>    | String | Which chain of the contract you want to query |

#### Headers

| Name                                       | Type   | Description                             |
| ------------------------------------------ | ------ | --------------------------------------- |
| Ave-Auth<mark style="color:red;">\*</mark> | String | The api key you need to access this url |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
{
  "code": 0, 
  "msg": "success", 
  "data": {
    "chain": "bsc", 
    "token": "0x9bb9dd20927355ac963c2eda25b6ab404a29245a", 
    "anti_whale_modifiable": "0", 
    "approve_gas": "0.01776447247539604275675", 
    "burn_amount": 16191.707957953806, 
    "buy_gas": "0.18795357359188319154024", 
    "buy_tax": 3.5, 
    "can_take_back_ownership": "0", 
    "creator_address": "0xfE0a5A58F7003Fa45A0F5Ca02454d208ACa07fE7", 
    "creator_balance": "0", 
    "creator_percent": "0.000000", 
    "decimal": 18, 
    "dex": [
      {
        "name": "Cakev2: GD/USDT", 
        "liquidity": "30839.08215933647472498285414229571584", 
        "pair": "0x227dc01fbb5bdcad2fd66c44113525c301aa8377", 
        "amm": "cakev2"
      }
    ], 
    "err_code": "0", 
    "err_msg": "", 
    "has_black_method": 1, 
    "has_code": 1, 
    "hidden_owner": "0", 
    "holders": 20742, 
    "honeypot_with_same_creator": "0", 
    "is_honeypot": -1, 
    "is_open_source": "1", 
    "lock_amount": 0, 
    "owner": "0x0000000000000000000000000000000000000000", 
    "pair_holders": 58, 
    "pair_holders_rank": [
      {
        "mark": "Pinksale: PinkLock V2", 
        "quantity": "2236.06797749979", 
        "percent": "0.579607422666724", 
        "address": "0x407993575c91ce7643a4d4ccacc9a98c36ee1bbe", 
        "is_contract": 1, 
        "lock": [
          {
            "amount": 2236.06797749979, 
            "lockDate": 1688646498, 
            "unlockDate": 1704544080
          }
        ]
      }, 
      {
        "mark": null, 
        "quantity": "96.57616778455656", 
        "percent": "0.0250333461522152", 
        "address": "0xd89d8f02f14cca513991908577dd4dc50b7dcde7"
      }, 
      {
        "mark": null, 
        "quantity": "84.973695073724", 
        "percent": "0.0220258886991524", 
        "address": "0x8cd481fdf634857b4b6b2b6e157b98fe9f31c7c9"
      }, 
      {
        "mark": null, 
        "quantity": "77.2417720092942", 
        "percent": "0.0200217099153561", 
        "address": "0xbb307249899ceb40a074793e96c6b0709aa14ea1"
      }, 
      {
        "mark": null, 
        "quantity": "69.75370254283989", 
        "percent": "0.0180807400128874", 
        "address": "0x2b78c664a3aab1ce37856af953fe0554549e3bd4"
      }, 
      {
        "mark": null, 
        "quantity": "58.932605224652725", 
        "percent": "0.0152758215622269", 
        "address": "0xa00d48bc5b96706e6790387f25cbd4d98828583c"
      }, 
      {
        "mark": null, 
        "quantity": "56.38979001885497", 
        "percent": "0.0146167027060113", 
        "address": "0x63ac3fe723e646f1fe2dcc2e719f3a112ab76b58"
      }, 
      {
        "mark": null, 
        "quantity": "54.749190124853065", 
        "percent": "0.0141914455645656", 
        "address": "0x1f21ac33b594b5a10d2ce145a082aeed8afe1391"
      }, 
      {
        "mark": null, 
        "quantity": "47.04130293179824", 
        "percent": "0.0121934970785953", 
        "address": "0xb3ff44914c09ff28329a36799dcb61343e7bc423"
      }, 
      {
        "mark": null, 
        "quantity": "46.92061020789595", 
        "percent": "0.0121622125204604", 
        "address": "0x973474188d07523a2ba6d8f62c77f3af137b85a8"
      }
    ], 
    "pair_lock_percent": 0.579607422666724, 
    "pair_total": "3857.900865402712110979", 
    "query_count": 1890, 
    "risk_score": 20.0, 
    "sell_gas": "0.4679929358861141319246", 
    "sell_tax": 3.5, 
    "slippage_modifiable": 1, 
    "token_holders_rank": [
      {
        "mark": "Null Address", 
        "quantity": "16191.707957953806", 
        "percent": "0.8572484094638821", 
        "address": "0x000000000000000000000000000000000000dead", 
        "lock": []
      }, 
      {
        "mark": "Cakev2: GD/USDT", 
        "quantity": "1042.4842346245946", 
        "percent": "0.0551929391478502", 
        "address": "0x227dc01fbb5bdcad2fd66c44113525c301aa8377", 
        "is_contract": 1, 
        "is_lp": 1
      }, 
      {
        "mark": null, 
        "quantity": "47.64361385413121", 
        "percent": "0.0025224276712268", 
        "address": "0x59d3f788a0a925b0a4cd67ea25dffa941fc64a5c"
      }, 
      {
        "mark": null, 
        "quantity": "41.37544805677368", 
        "percent": "0.0021905679826754", 
        "address": "0xba999509779a902f40aeb528f403b719f46a8a8b"
      }, 
      {
        "mark": null, 
        "quantity": "40.628464137797984", 
        "percent": "0.0021510199141147", 
        "address": "0x63ac3fe723e646f1fe2dcc2e719f3a112ab76b58"
      }, 
      {
        "mark": null, 
        "quantity": "39.9270806626444", 
        "percent": "0.0021138861003094", 
        "address": "0x0bfe014f3abab0cab8c9a7180a3c32c5efe41453"
      }, 
      {
        "mark": null, 
        "quantity": "37.94324718604222", 
        "percent": "0.0020088546794813", 
        "address": "0x5a4f773a500d2eb6e341848fc9c02f131f94371d"
      }, 
      {
        "mark": null, 
        "quantity": "36.597767547976964", 
        "percent": "0.0019376200523071", 
        "address": "0xecfb7cacb05251be2af95ff9fd6b6df3108409a8"
      }, 
      {
        "mark": null, 
        "quantity": "32.616901443402064", 
        "percent": "0.0017268583991636", 
        "address": "0x498626355d92ccb66a3353b826d88df4a515a8ec"
      }, 
      {
        "mark": null, 
        "quantity": "31.56291408731931", 
        "percent": "0.001671056442573", 
        "address": "0x2a8a40c1eb437b90b36ad566b8187b3fe6a0b3fc"
      }
    ], 
    "token_lock_percent": 0.8572484094638821, 
    "token_name": "gold", 
    "token_symbol": "GD", 
    "total": 18888, 
    "vol_24h_top10": 146.99602212, 
    "vol_24h_top100": 18257.69247436, 
    "vol_24h_total": 6743.72206688, 
    "analysis_big_wallet": "0", 
    "analysis_creator_gt_5percent": 0.0, 
    "analysis_lp_creator_gt_5percent": 0.0, 
    "analysis_lp_current_adequate": "1", 
    "analysis_lp_current_volume": 15436.0, 
    "analysis_scam_wallet": "0", 
    "mechanism_intro": "加池分红", 
    "vote_support": "41", 
    "amount_24h_buy": 321.9254516, 
    "amount_24h_sell": 209.60409822, 
    "count_24h_buy": 48, 
    "count_24h_sell": 93, 
    "vol_24h_buy": 4129.34926361, 
    "vol_24h_sell": 2614.37280327, 
    "wallet_count_24h_buy": 37, 
    "wallet_count_24h_sell": 26, 
    "holder_analysis": {
      "simulate_holders": 294, 
      "sell_successful": 290, 
      "sell_failure": 4, 
      "balance_disappeared": 0, 
      "tax_distribution": [
        {
          "tax": 3, 
          "count": 285
        }, 
        {
          "tax": 4, 
          "count": 1
        }, 
        {
          "tax": 0, 
          "count": 6
        }, 
        {
          "tax": 2, 
          "count": 2
        }
      ], 
      "average_tax": 3.5426206896551657
    }, 
    "has_owner_removed_risk": 1.0, 
    "analysis_risk_score": 55, 
    "hp_score": 80, 
    "some_users_are_blocked": 0.0, 
    "fs_score": 20, 
    "issue_platform": "fatsale", 
    "market_wallet": "0x8A500311Ea53BA6709f4FC9FBb2bA37Bb4D2025d", 
    "min_hold_for_token_reward": 0, 
    "reward_wallet": "0x013Ef3b0a06C5B96B7910Cd6d9f579a6875E6111", 
    "tm_bonus_token_for_lp_holders": "0x55d398326f99059fF775485246999027B3197955", 
    "tm_bonus_token_name_for_lp": "USDT", 
    "tm_buy_max_amount_per_tx": "10", 
    "tm_buy_tax_for_burn": "0", 
    "tm_buy_tax_for_fund": "1.5", 
    "tm_buy_tax_for_holders": "1.5", 
    "tm_buy_tax_for_lp": "0.5", 
    "tm_max_hold_amount_per_wallet": "20", 
    "tm_sell_max_amount_per_tx": "20", 
    "tm_sell_tax_for_burn": 0, 
    "tm_sell_tax_for_fund": "1.5", 
    "tm_sell_tax_for_holders": "1.5", 
    "tm_sell_tax_for_lp": "0.5", 
    "some_users_balance_are_tampered": 1, 
    "vote_against": "4", 
    "cannot_buy": "0", 
    "cannot_sell_all": "0", 
    "external_call": "0", 
    "has_mint_method": 0, 
    "has_white_method": 1, 
    "is_anti_whale": "0", 
    "is_in_dex": "1", 
    "is_proxy": "0", 
    "owner_balance": "0", 
    "owner_change_balance": "0", 
    "owner_percent": "0.000000", 
    "personal_slippage_modifiable": "0", 
    "selfdestruct": "0", 
    "trading_cooldown": "0", 
    "transfer_pausable": "1", 
    "audit_pass_by": "Ave.ai", 
    "audited_by_ave": 1
  }
}
```

{% endtab %}

{% tab title="400: Bad Request The parameters may be invalid" %}

```javascript
{
  "code": 1, 
  "msg": "<class 'openapi.error.BadRequestError'> : chain must not be empty", 
  "data": {}
}
```

{% endtab %}

{% tab title="401: Unauthorized Ave-auth does not exist or is not correct" %}

```javascript
{
  "code": 1, 
  "msg": "<class 'openapi.error.UnauthorizedError'> : Permission denied", 
  "data": {}
}
```

{% endtab %}

{% tab title="403: Forbidden The limit of this API has been reached" %}

```javascript
{
  "code": 1, 
  "msg": "<class 'openapi.error.ForbiddenError'> : The limit of this API has been reached today", 
  "data": {}
}
```

{% endtab %}

{% tab title="404: Not Found The contract check does not exist" %}

```javascript
{
  "code": 1, 
  "msg": "<class 'openapi.error.NotFoundError'> : The contract check of 'xxx' on 'bsc' chain does not exist.", 
  "data": {}
}
```

{% endtab %}

{% tab title="500: Internal Server Error Some unknown error occurred" %}

```javascript
{
  "code": 2, 
  "msg": "<class 'decimal.InvalidOperation'> : Unknown error, check logs for more information", 
  "data": {}
}
```

{% endtab %}
{% endtabs %}
