# Uniswap V2

### /getprice

Returns the swap quotation for the given token pair.

<mark style="color:blue;">`GET`</mark> `https://api.expand.network/dex/getprice`

#### Query Parameters

| Name                                       | Type   | Description                                                                      |
| ------------------------------------------ | ------ | -------------------------------------------------------------------------------- |
| rpc                                        | String | Remote procedural call URL.                                                      |
| dexId                                      | String | Refer to the [DEX ID](https://docs.expand.network/ids/dex-ids) page for details. |
| path<mark style="color:red;">\*</mark>     | String | Comma separated values of token addresses whose price is to be fetched.          |
| amountIn<mark style="color:red;">\*</mark> | String | Amount of token.                                                                 |

{% tabs %}
{% tab title="Sample Request" %}

```url
https://api.expand.network/dex/getprice?dexId=1000&path=0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0xdac17f958d2ee523a2206206994597c13d831ec7&amountIn=10000000000000000000
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "amountIn": "10000000000000000000",
        "path": [
            "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
            "0xdac17f958d2ee523a2206206994597c13d831ec7"
        ],
        "amountsOut": [
            "10000000000000000000",
            "15682130807"
        ]
    }
}
```

{% endtab %}
{% endtabs %}

### /getuserliquidity

Returns the balance of a particular token pair of an account.

<mark style="color:blue;">`GET`</mark> `https://api.expand.network/dex/getuserliquidity`

#### Query Parameters

| Name                                      | Type   | Description                                                                  |
| ----------------------------------------- | ------ | ---------------------------------------------------------------------------- |
| rpc                                       | String | Remote procedural call URL.                                                  |
| tokenA<mark style="color:red;">\*</mark>  | String | Address of token.                                                            |
| address<mark style="color:red;">\*</mark> | String | Public address of liquidity provider.                                        |
| dexId                                     | String | Refer to [DEX ID](https://docs.expand.network/ids/dex-ids) page for details. |
| tokenB<mark style="color:red;">\*</mark>  | String | Address of token.                                                            |

{% tabs %}
{% tab title="Sample Request" %}

```url
https://api.expand.network/dex/getuserliquidity?tokenA=0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2&tokenB=0x6b175474e89094c44da98b954eedeac495271d0f&address=0x6fb447ae94f5180254d436a693907a1f57696900&dexId=1000
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "pairAddress": "0xA478c2975Ab1Ea89e8196811F51A7B7Ade33eB11",
        "liquidity": "2087379027763486",
        "tokenA": "91297717639957",
        "tokenB": "153006474077467970"
    }
}
```

{% endtab %}
{% endtabs %}

### /getpoolliquidity

Returns the total liquidity for a specified pool.

<mark style="color:blue;">`GET`</mark> `https://api.expand.network/dex/getpoolliquidity`

#### Query Parameters

| Name                                          | Type   | Description                                                                  |
| --------------------------------------------- | ------ | ---------------------------------------------------------------------------- |
| rpc                                           | String | Remote procedural call URL.                                                  |
| poolAddress<mark style="color:red;">\*</mark> | String | Pool address whose liquidity is to be fetched.                               |
| dexId                                         | String | Refer to [DEX ID](https://docs.expand.network/ids/dex-ids) page for details. |

{% tabs %}
{% tab title="Sample Request" %}

```url
https://api.expand.network/dex/getpoolliquidity?poolAddress=0x0d4a11d5eeaac28ec3f61d100daf4d40471f1852&dexId=1000
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "totalLiquidity": "312219425553389289"
    }
}
```

{% endtab %}
{% endtabs %}

### /gettokenliquidity

Returns the individual token liquidity within the specified liquidity pool.

<mark style="color:blue;">`GET`</mark> `https://api.expand.network/dex/gettokenliquidity`

#### Query Parameters

| Name                                          | Type   | Description                                                                  |
| --------------------------------------------- | ------ | ---------------------------------------------------------------------------- |
| rpc                                           | String | Remote procedural call URL.                                                  |
| poolAddress<mark style="color:red;">\*</mark> | String | The pool address.                                                            |
| dexId                                         | String | Refer to [DEX ID](https://docs.expand.network/ids/dex-ids) page for details. |

{% tabs %}
{% tab title="Sample Request" %}

```
https://api.expand.network/dex/gettokenliquidity?poolAddress=0x0d4a11d5eeaac28ec3f61d100daf4d40471f1852&dexId=1000
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "WETH": "16984981267096993883931",
        "USDT": "31586831096555"
    }
}
```

{% endtab %}
{% endtabs %}

### /getindividualposition

Returns the liquidity position for a specified user address across all the pools for the DEX.&#x20;

<mark style="color:blue;">`GET`</mark> `https://api.expand.network/dex/getindividualposition`

#### Query Parameters

| Name                                      | Type   | Description                                                                                                                          |
| ----------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------ |
| rpc                                       | String | Remote procedural call URL.                                                                                                          |
| address<mark style="color:red;">\*</mark> | String | The public address of the liquidity holder.                                                                                          |
| dexId                                     | String | Refer to [DEX ID](https://docs.expand.network/ids/dex-ids) page for details.                                                         |
| poolAddresses                             | String | The pool Addresses whose liquidity is to be fetched. *(Comma-separated vaules)*                                                      |
| poolSize                                  | String | <p>The number of pools for which the user intends to fetch the individual position. <br><em>By default: 50, Maximum: 9,950</em> </p> |

{% tabs %}
{% tab title="Sample Request" %}

```url
https://api.expand.network/dex/getindividualposition?dexId=1000&address=0x6Fb447Ae94F5180254D436A693907a1f57696900
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "aggregatedLiquidity": "2370404879481514",
        "poolAddresses": {
            "DAIWETH": {
                "0xA478c2975Ab1Ea89e8196811F51A7B7Ade33eB11": "2370404879481514"
            }
        }
    }
}
```

{% endtab %}
{% endtabs %}

### /getpoolindividualliquidity

Returns all user addresses, block numbers, and token position details for a specified pool address.

<mark style="color:blue;">`GET`</mark> `https://historicallp.api.expand.network/dex/getpoolindividualliquidity`

#### Query Parameters

| Name                                          | Type   | Description                                                                  |
| --------------------------------------------- | ------ | ---------------------------------------------------------------------------- |
| rpc                                           | String | Remote procedural call URL.                                                  |
| poolAddress<mark style="color:red;">\*</mark> | String | The pool address.                                                            |
| dexId                                         | String | Refer to [DEX ID](https://docs.expand.network/ids/dex-ids) page for details. |
| endBlock                                      | String | Last block of the range.                                                     |
| startBlock                                    | String | Starting block of the range.                                                 |

{% tabs %}
{% tab title="Sample Request" %}

```url
https://historicallp.api.expand.network/dex/getpoolindividualliquidity?poolAddress=0xa43fe16908251ee70ef74718545e4fe6c5ccec9f&dexId=1000&startBlock=21358069&endBlock=21359069
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": [
        {
            "userAddress": "0x93a01d90016335f33735c02c5fa91c7a17f72569",
            "liquidityData": [
                {
                    "blockNumber": "21359069",
                    "transactionHash": "0xd69c1ff2bc34c148db6b2b7007c3d5d7313fb106fcf0418e8e9148b45d5ab528",
                    "assets": {
                        "PEPE": "35060749841636831432190339",
                        "WETH": "234823806408693706"
                    }
                }
            ]
        }
    ]
}
```

{% endtab %}
{% endtabs %}

### /getpool

&#x20;Returns poolAddress, tickSpacing, poolFees, tokensLiquidity and liquidity data based on tokenA and tokenB

<mark style="color:blue;">`GET`</mark> `https://api.expand.network/dex/getpool`

#### Query Parameters

{% tabs %}
{% tab title="Sample Request" %}

```url
https://api.expand.network/dex/getpool?dexId=1000&tokenA=0xE0f63A424a4439cBE457D80E4f4b51aD25b2c56C&tokenB=0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": [
        {
            "poolAddress": "0x52c77b0CB827aFbAD022E6d6CAF2C44452eDbc39",
            "tickSpacing": "NA",
            "poolFees": "NA",
            "tokensLiquidity": {
                "WETH": "2910405301067921285758",
                "SPX": "908036884543124"
            },
            "liquidity": "275719418962876831"
        }
    ]
}
```

{% endtab %}
{% endtabs %}

### /gethistoricaltimeseries

Get the historical time series transactions for a specific pool address.

<mark style="color:blue;">`GET`</mark> `https://historicaltrade.api.expand.network/dex/gethistoricaltimeseries`

#### Query Parameters

| Name                                          | Type   | Description                                                                  |
| --------------------------------------------- | ------ | ---------------------------------------------------------------------------- |
| dexId<mark style="color:red;">\*</mark>       | String | Refer to [DEX ID](https://docs.expand.network/ids/dex-ids) page for details. |
| endBlock                                      | String | Last block of the range.                                                     |
| startBlock                                    | String | Starting block of the range.                                                 |
| poolAddress<mark style="color:red;">\*</mark> | String | Pool address whose time series is to be fetched.                             |

{% tabs %}
{% tab title="Sample Request" %}

```url
https://historicaltrade.api.expand.network/dex/gethistoricaltimeseries?poolAddress=0x517f9dd285e75b599234f7221227339478d0fcc8&dexId=1000
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "pair": "DAI/MKR",
        "priceData": [
            {
                "hash": "0x0700027e70d6d216810815c38a0959fe0635867ea2480ab1f6e20d3c98731ff0",
                "timestamp": 1703748059,
                "price": "0.0006244081987727642"
            },
            {
                "hash": "0x1c3b182bb64097b756b03aaa3717663af8064ecf3e05f02f7b6e339785558f1f",
                "timestamp": 1703747891,
                "price": "0.0006261003865058129"
            },
            {
                "hash": "0xec8964514a2cb94d565c84794cf7125333f2a18e376764fc24c5fd32df09a93e",
                "timestamp": 1703747855,
                "price": "0.0006274642197158615"
            },
            {
                "hash": "0x4ece3e41b95e78c882ce79ec2fa80bd7eef0503a6d7b759bc3336cc9fc40867b",
                "timestamp": 1703747843,
                "price": "0.00062797052848499"
            },
            {
                "hash": "0xf4e8eb0cc1661d952dc0e2d5d5ee2b16dd66b5f8a275fd3d148dd9ce53ed7964",
                "timestamp": 1703746955,
                "price": "0.0006318073557952554"
            },
            {
                "hash": "0xcae75ad1f4b23672972cc793b8dfa97e5c257f368ed3b6d72afb1bcb92444ea5",
                "timestamp": 1703746403,
                "price": "0.0006311921656383271"
            },
            {
                "hash": "0xbf1eef520c783cd699c1b040b8c1274c90ff4cc76b24994fb95123e3a9b360d5",
                "timestamp": 1703746355,
                "price": "0.0006303980131723315"
            },
            {
                "hash": "0xddf411be6d49bcddcc306cae01f4a3d7bbee240a295ba18e1a762e3a3290f302",
                "timestamp": 1703746319,
                "price": "0.000629607991380723"
            },
            {
                "hash": "0x31e8736e4e7eb1f862bfc4a66414859bb49102390bb97736facf4613035a81e5",
                "timestamp": 1703745695,
                "price": "0.0006261412353574351"
            },
            {
                "hash": "0x6dea226fba19c1da6e96feb49511e1fef3a27cbded505e3d597bb9e5f5121e9e",
                "timestamp": 1703745083,
                "price": "0.0006301614630221084"
            },
            {
                "hash": "0xc1ae0d5cb6774c9b76c3f005eb136b9fb5951c0d32f1027806d755ff45760b0d",
                "timestamp": 1703744891,
                "price": "0.000629113433416803"
            },
            {
                "hash": "0x20937932802b6eb955192a589c7e0143127554fa60f05a429dc25f5cc6342f5e",
                "timestamp": 1703743655,
                "price": "0.0006273380063042033"
            },
            {
                "hash": "0xaf2d9bfae18358fb785d4a7ae8b35099c63777c557e92db96c98bc0b41531071",
                "timestamp": 1703743631,
                "price": "0.0006255421068541817"
            },
            {
                "hash": "0x161d09fdd5e30165040ebd65832b35337fd608d47e119a139f608b2045410409",
                "timestamp": 1703742575,
                "price": "0.0006215430273569083"
            },
            {
                "hash": "0xc264388fba6edb499d5846a456217a4ddf0668d156356c8695ab34c6be55ce23",
                "timestamp": 1703742515,
                "price": "0.0006222533452384632"
            }
        ]
    }
}
```

{% endtab %}
{% endtabs %}

### /gethistoricaltransactions

Get the historical transactions focusing on swaps associated with a specific pool address.

<mark style="color:blue;">`GET`</mark> `https://historicaltrade.api.expand.network/dex/gethistoricaltransactions`

#### Query Parameters

| Name                                          | Type   | Description                                                                  |
| --------------------------------------------- | ------ | ---------------------------------------------------------------------------- |
| dexId<mark style="color:red;">\*</mark>       | String | Refer to [DEX ID](https://docs.expand.network/ids/dex-ids) page for details. |
| endBlock                                      | String | Last block of the range.                                                     |
| startBlock                                    | String | Starting block of the range.                                                 |
| poolAddress<mark style="color:red;">\*</mark> | String | Pool address whose transactions is to be fetched.                            |

{% tabs %}
{% tab title="Sample Request" %}

```url
https://historicaltrade.api.expand.network/dex/gethistoricaltransactions?poolAddress=0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc&dexId=1000
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "pair": "USDC/WETH",
        "transactions": [
            {
                "transactionHash": "0xe02a5ced07a09949bb143486c5d57947d0b904d7ffa620637e2b11a4810ff645",
                "transactionDetails": {
                    "blockHash": "0xa870d68aa85ea355176dd1f49912cb0df145a967a8a6789a2e9a9ca659aabfc5",
                    "blockNumber": "18879055",
                    "from": "0xcc4ea98876f3ee733712ac64137c34e637fc2dae",
                    "gas": "203074",
                    "gasPrice": "30150130093",
                    "maxFeePerGas": "41820000000",
                    "maxPriorityFeePerGas": "110000000",
                    "hash": "0xe02a5ced07a09949bb143486c5d57947d0b904d7ffa620637e2b11a4810ff645",
                    "input": "0xf305d719000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000000000000000000000000000000000e210966f48000000000000000000000000000000000000000000000000000000e0ef3985c30000000000000000000000000000000000000000000000164f0244c4ce3dffe6000000000000000000000000cc4ea98876f3ee733712ac64137c34e637fc2dae00000000000000000000000000000000000000000000000000000000658c7c4b",
                    "nonce": "212",
                    "to": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
                    "transactionIndex": "88",
                    "value": "413589505640828440000",
                    "type": "2",
                    "accessList": [],
                    "chainId": "1",
                    "v": "0x0",
                    "r": "0xc01569d522e3ed0c193fbc1e6cf689d61ab1affdcdba0eab79fa09afe441415f",
                    "s": "0x4fe253f33af8c7efa878194c1d074b4b4ff662016eb47a7dd0d1948f30b45e73",
                    "yParity": "0x0"
                }
            }
        ]
    }
}
```

{% endtab %}
{% endtabs %}

### /gethistoricalpoolchartdata

Get the data the OHCLV (Open, High, Close, Low, and Volume) within the specified time interval for pool on Uniswap V2.

<mark style="color:blue;">`GET`</mark> `https://api.expand.network/dex/gethistoricalpoolchartdata`

#### Query Parameter

| Name                                          | Type   | Description                                                                                                                |
| --------------------------------------------- | ------ | -------------------------------------------------------------------------------------------------------------------------- |
| dexId<mark style="color:red;">\*</mark>       | String | Refer to [DEX ID](https://docs.expand.network/ids/dex-ids) page for details.                                               |
| interval                                      | String | <p>A number values representing the number of unix epoch seconds or in format of . For example 1m,1h<br>By default 15m</p> |
| limit                                         | String | <p>No of iteration.<br>Start limit is 100 and maximum limit is 500.<br>By default 100</p>                                  |
| poolAddress<mark style="color:red;">\*</mark> | String | Pool address whose transactions is to be fetched.                                                                          |
| rpc                                           | String | Remote procedural call URL.                                                                                                |

{% tabs %}
{% tab title="Sample Request" %}

```url
https://api.expand.network/dex/gethistoricalpoolchartdata?limit=100&interval=15m&dexId=1000&poolAddress=0x517F9dD285e75b599234F7221227339478d0FcC8
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "pair": "DAI/MKR",
        "chartData": [
            {
                "1717125831-1717131231": {
                    "open": "0.000362632162257",
                    "high": "0.000362632162257",
                    "low": "0.000361794833636",
                    "close": "0.000361794833636",
                    "volume": "116481.29177121137"
                }
            },
            {
                "1717131231-1717136631": {
                    "open": "0.000361794833636",
                    "high": "0.000365928955432",
                    "low": "0.000361794833636",
                    "close": "0.000365928955432",
                    "volume": "235921.476776501"
                }
            },
            {
                "1717136631-1717142031": {
                    "open": "0.000365928955432",
                    "high": "0.000365928955432",
                    "low": "0.000362839374156",
                    "close": "0.000364908316209",
                    "volume": "134774.33877705893"
                }
            },
            {
                "1717142031-1717147431": {
                    "open": "0.000364908316209",
                    "high": "0.000364994397092",
                    "low": "0.00036205860551",
                    "close": "0.000362058605510",
                    "volume": "107370.6898340171"
                }
            },
            {
                "1717147431-1717152831": {
                    "open": "0.000362058605510",
                    "high": "0.00036205860551",
                    "low": "0.000359033408766",
                    "close": "0.000359033408766",
                    "volume": "336427.99136697256"
                }
            },
            {
                "1717152831-1717158231": {
                    "open": "0.000359033408766",
                    "high": "0.000359033408766",
                    "low": "0.000356260063139",
                    "close": "0.000356260063139",
                    "volume": "298827.4098542738"
                }
            },
            {
                "1717158231-1717163631": {
                    "open": "0.000356260063139",
                    "high": "0.000361164606828",
                    "low": "0.000355876159312",
                    "close": "0.000361164606828",
                    "volume": "411818.4971458898"
                }
            },
            {
                "1717163631-1717169031": {
                    "open": "0.000361164606828",
                    "high": "0.000363586360976",
                    "low": "0.000361164606828",
                    "close": "0.000363586360976",
                    "volume": "261654.1491814648"
                }
            },
            {
                "1717169031-1717174431": {
                    "open": "0.000363586360976",
                    "high": "0.000367226232551",
                    "low": "0.000363586360976",
                    "close": "0.000365009517321",
                    "volume": "439832.30726375314"
                }
            },
            {
                "1717174431-1717179831": {
                    "open": "0.000365009517321",
                    "high": "0.000365009517321",
                    "low": "0.000363441412141",
                    "close": "0.000363441412141",
                    "volume": "149974.2380735921"
                }
            },
            {
                "1717179831-1717185231": {
                    "open": "0.000363441412141",
                    "high": "0.000363441412141",
                    "low": "0.00036319351977",
                    "close": "0.000363193519770",
                    "volume": "34293.96745051358"
                }
            },
            {
                "1717185231-1717190631": {
                    "open": "0.000363193519770",
                    "high": "0.00036319351977",
                    "low": "0.000362332243839",
                    "close": "0.000362332243839",
                    "volume": "92751.61460970972"
                }
            },
            {
                "1717190631-1717196031": {
                    "open": "0.000362332243839",
                    "high": "0.000365110121117",
                    "low": "0.000362332243839",
                    "close": "0.000365110121117",
                    "volume": "84731.33451069353"
                }
            },
            {
                "1717196031-1717201431": {
                    "open": "0.000365110121117",
                    "high": "0.000370459107108",
                    "low": "0.000365110121117",
                    "close": "0.000370459107108",
                    "volume": "562503.5842784377"
                }
            },
            {
                "1717201431-1717206831": {
                    "open": "0.000370459107108",
                    "high": "0.000370787680558",
                    "low": "0.000370459107108",
                    "close": "0.000370787680558",
                    "volume": "40674.1448916809"
                }
            },
            {
                "1717206831-1717212231": {
                    "open": "0.000370787680558",
                    "high": "0.000370787680558",
                    "close": "0.000370787680558",
                    "low": "0.000370787680558",
                    "volume": "0"
                }
            },
            {
                "1717212231-1717217631": {
                    "open": "0.000370787680558",
                    "high": "0.000370787680558",
                    "low": "0.000367479192595",
                    "close": "0.000367479192595",
                    "volume": "141155.25179660812"
                }
            },
            {
                "1717217631-1717223031": {
                    "open": "0.000367479192595",
                    "high": "0.000367479192595",
                    "low": "0.000367318759906",
                    "close": "0.000367318759906",
                    "volume": "6405.706904196158"
                }
            },
            {
                "1717223031-1717228431": {
                    "open": "0.000367318759906",
                    "high": "0.000367318759906",
                    "close": "0.000367318759906",
                    "low": "0.000367318759906",
                    "volume": "0"
                }
            },
            {
                "1717228431-1717233831": {
                    "open": "0.000367318759906",
                    "high": "0.000367318759906",
                    "low": "0.000367258190562",
                    "close": "0.000367258190562",
                    "volume": "6561.94365795704"
                }
            },
            {
                "1717233831-1717239231": {
                    "open": "0.000367258190562",
                    "high": "0.000370245962397",
                    "low": "0.000367258190562",
                    "close": "0.000370245962397",
                    "volume": "91673.4718149821"
                }
            },
            {
                "1717239231-1717244631": {
                    "open": "0.000370245962397",
                    "high": "0.000372848707784",
                    "low": "0.000370245962397",
                    "close": "0.000372848707784",
                    "volume": "302051.36778228875"
                }
            },
            {
                "1717244631-1717250031": {
                    "open": "0.000372848707784",
                    "high": "0.000373255574321",
                    "low": "0.000372848707784",
                    "close": "0.000373255574321",
                    "volume": "15550.594379299635"
                }
            },
            {
                "1717250031-1717255431": {
                    "open": "0.000373255574321",
                    "high": "0.000373527782488",
                    "low": "0.000371102274044",
                    "close": "0.000371102274044",
                    "volume": "61022.01807920491"
                }
            },
            {
                "1717255431-1717260831": {
                    "open": "0.000371102274044",
                    "high": "0.000373300780092",
                    "low": "0.000371102274044",
                    "close": "0.000373300780092",
                    "volume": "32143.056071166695"
                }
            },
            {
                "1717260831-1717266231": {
                    "open": "0.000373300780092",
                    "high": "0.000373593989008",
                    "low": "0.000373300780092",
                    "close": "0.000373593989008",
                    "volume": "29080.840115908824"
                }
            },
            {
                "1717266231-1717271631": {
                    "open": "0.000373593989008",
                    "high": "0.000374035210903",
                    "low": "0.000373593989008",
                    "close": "0.000374035210903",
                    "volume": "52720.216943570405"
                }
            },
            {
                "1717271631-1717277031": {
                    "open": "0.000374035210903",
                    "high": "0.000374274458383",
                    "low": "0.000374035210903",
                    "close": "0.000374274458383",
                    "volume": "6877.1558868414995"
                }
            },
            {
                "1717277031-1717282431": {
                    "open": "0.000374274458383",
                    "high": "0.000374274458383",
                    "low": "0.000371999332044",
                    "close": "0.000371999332044",
                    "volume": "13045.768939033636"
                }
            },
            {
                "1717282431-1717287831": {
                    "open": "0.000371999332044",
                    "high": "0.000371999332044",
                    "low": "0.000371909662179",
                    "close": "0.000371909662179",
                    "volume": "5780.75988915263"
                }
            },
            {
                "1717287831-1717293231": {
                    "open": "0.000371909662179",
                    "high": "0.000371909662179",
                    "low": "0.000370992647421",
                    "close": "0.000370992647421",
                    "volume": "97770.29458585857"
                }
            },
            {
                "1717293231-1717298631": {
                    "open": "0.000370992647421",
                    "high": "0.000373227199414",
                    "low": "0.000370992647421",
                    "close": "0.000373227199414",
                    "volume": "7193.474706512013"
                }
            },
            {
                "1717298631-1717304031": {
                    "open": "0.000373227199414",
                    "high": "0.000373797899718",
                    "low": "0.000373227199414",
                    "close": "0.000373797899718",
                    "volume": "59414.48037483847"
                }
            },
            {
                "1717304031-1717309431": {
                    "open": "0.000373797899718",
                    "high": "0.000374304087103",
                    "low": "0.000373797899718",
                    "close": "0.000374304087103",
                    "volume": "54211.467425947136"
                }
            },
            {
                "1717309431-1717314831": {
                    "open": "0.000374304087103",
                    "high": "0.00037558397742",
                    "low": "0.000374304087103",
                    "close": "0.000375583977420",
                    "volume": "129562.12395260207"
                }
            },
            {
                "1717368831-1717374231": {
                    "open": "0.000378870323560",
                    "high": "0.00037887032356",
                    "low": "0.000378289301449",
                    "close": "0.000378289301449",
                    "volume": "57860.0799234203"
                }
            },
        ]
    }
}
```

{% endtab %}
{% endtabs %}

### /getpoolchartdata

Get the data for the pool and obtain the OHCL (Open, High, Close, Low) prices within the specified time interval.

<mark style="color:blue;">`GET`</mark> `https://historicaltrade.api.expand.network/dex/getpoolchartdata`

#### Query Parameters

| Name                                          | Type   | Description                                                                  |
| --------------------------------------------- | ------ | ---------------------------------------------------------------------------- |
| dexId<mark style="color:red;">\*</mark>       | String | Refer to [DEX ID](https://docs.expand.network/ids/dex-ids) page for details. |
| interval                                      | String | 15 mins(by default), 30 mins, 60 mins, and 90 mins.                          |
| poolAddress<mark style="color:red;">\*</mark> | String | Pool address whose transactions is to be fetched.                            |

{% tabs %}
{% tab title="Sample Request" %}

```url
https://historicaltrade.api.expand.network/dex/getpoolchartdata?dexId=1000&poolAddress=0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc&interval=60
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "pair": "USDC/WETH",
        "chartData": {
            "18882523 to 18882800": [
                {
                    "open_price": "419005433942909",
                    "close_price": "419447697581705",
                    "low_price": "418943818861548",
                    "high_price": "422263827518504",
                    "transactions": [
                        {
                            "blockNumber": "18882529",
                            "price": "418986597113367",
                            "amount": {
                                "token0": "2400000000",
                                "token1": "1005567833072081114"
                            }
                        },
                        {
                            "blockNumber": "18882531",
                            "price": "421498241454276",
                            "amount": {
                                "token0": "679221347",
                                "token1": "286290603318704585"
                            }
                        },
                        {
                            "blockNumber": "18882538",
                            "price": "418975454284176",
                            "amount": {
                                "token0": "376508407",
                                "token1": "157747780864636534"
                            }
                        },
                        {
                            "blockNumber": "18882543",
                            "price": "418968454985399",
                            "amount": {
                                "token0": "513835000",
                                "token1": "215280656067422305"
                            }
                        },
                        {
                            "blockNumber": "18882543",
                            "price": "418963677671102",
                            "amount": {
                                "token0": "93100000",
                                "token1": "39005518391179607"
                            }
                        },
                        {
                            "blockNumber": "18882548",
                            "price": "418960589212921",
                            "amount": {
                                "token0": "300000000",
                                "token1": "125688176763876449"
                            }
                        },
                        {
                            "blockNumber": "18882560",
                            "price": "418954948262823",
                            "amount": {
                                "token0": "417601922",
                                "token1": "174956391625965577"
                            }
                        },
                        {
                            "blockNumber": "18882561",
                            "price": "418947749154645",
                            "amount": {
                                "token0": "498134300",
                                "token1": "208692243761724622"
                            }
                        },
                        {
                            "blockNumber": "18882565",
                            "price": "421805099375960",
                            "amount": {
                                "token0": "42147657986",
                                "token1": "17778097065248708608"
                            }
                        }
                    ]
                }
            ]
        }
    }
}
```

{% endtab %}
{% endtabs %}

### /getpooltradedata

Get the trade data from the pool within a specified block range, for the specified event type

<mark style="color:blue;">`GET`</mark> `https://historicaltrade.api.expand.network/dex/getpooltradedata`

#### Query Parameters

| Name                                          | Type   | Description                                                                  |
| --------------------------------------------- | ------ | ---------------------------------------------------------------------------- |
| dexId<mark style="color:red;">\*</mark>       | String | Refer to [DEX ID](https://docs.expand.network/ids/dex-ids) page for details. |
| endBlock                                      | String | Last block of the range.                                                     |
| startBlock                                    | String | Starting block of the range.                                                 |
| poolAddress<mark style="color:red;">\*</mark> | String | Pool address whose data is to be fetched.                                    |
| eventType                                     | String | Transfer, Swap, Burn or Mint(by default).                                    |

{% tabs %}
{% tab title="Sample Request" %}

```url
https://historicaltrade.api.expand.network/dex/getpooltradedata?poolAddress=0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc&dexId=1000&eventType=Burn
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "pair": "USDC/WETH",
        "transactions": [
            {
                "blockNumber": "18880403",
                "transactionHash": "0x47d3993957a8497a7549276c96b3c18987586075f5882124cfd477fd989cd3fd",
                "values": {
                    "0": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
                    "1": "1596637993",
                    "2": "671389840781055738",
                    "3": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
                    "sender": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
                    "amount0": "1596637993",
                    "amount1": "671389840781055738",
                    "to": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D"
                },
                "eventType": "Burn",
                "data": {
                    "data": "0x000000000000000000000000000000000000000000000000000000005f2ac32900000000000000000000000000000000000000000000000009514180c58f96fa",
                    "topics": [
                        "0xdccd412f0b1252819cb1fd330b93224ca42612892bb3f4f789976e6d81936496",
                        "0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d",
                        "0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d"
                    ]
                }
            },
            {
                "blockNumber": "18879029",
                "transactionHash": "0x22c9fcffc57264eb4270f2ecf0d4f23b39a3871adcee89414285f3a1e1f152e2",
                "values": {
                    "0": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
                    "1": "970041191908",
                    "2": "413293955455183879313",
                    "3": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
                    "sender": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
                    "amount0": "970041191908",
                    "amount1": "413293955455183879313",
                    "to": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D"
                },
                "eventType": "Burn",
                "data": {
                    "data": "0x000000000000000000000000000000000000000000000000000000e1daf5ede4000000000000000000000000000000000000000000000016679b16c2e259fc91",
                    "topics": [
                        "0xdccd412f0b1252819cb1fd330b93224ca42612892bb3f4f789976e6d81936496",
                        "0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d",
                        "0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d"
                    ]
                }
            }
        ]
    }
}
```

{% endtab %}
{% endtabs %}

### /swap

Initiate a swap transaction on a specified DEX.

<mark style="color:green;">`POST`</mark> `https://api.expand.network/dex/swap`

#### Request Body

| Name                                           | Type   | Description                                                                                 |
| ---------------------------------------------- | ------ | ------------------------------------------------------------------------------------------- |
| dexId                                          | String | Refer to the [DEX ID](https://docs.expand.network/ids/dex-ids) page for details.            |
| path<mark style="color:red;">\*</mark>         | Array  | Comma-separated values of token addresses, inside an array, to swap.                        |
| amountIn<mark style="color:red;">\*</mark>     | String | Amount of token to be swapped.                                                              |
| amountOutmin<mark style="color:red;">\*</mark> | String | Minimum amount accepted as the result of swap.                                              |
| to<mark style="color:red;">\*</mark>           | String | Address of the recipient of the token.                                                      |
| deadline<mark style="color:red;">\*</mark>     | String | Deadline for the transaction to be executed (UNIX Timestamp).                               |
| from<mark style="color:red;">\*</mark>         | String | Address of the sender of the token.                                                         |
| gas                                            | String | Maximum gas limit provided by the sender, for the transaction.                              |
| rpc                                            | String | Remote procedural call URL.                                                                 |
| gasPriority                                    | String | low, medium, or high.                                                                       |
| slippage                                       | String | <p>Percentage of total swap value. <br>By default, 1.</p><p>0 <= slippage  value <= 100</p> |

{% tabs %}
{% tab title="Sample Request" %}

```json
{
    "dexId":"1000",
    "amountIn": "1000000000000000",
    "amountOutMin": "0",
    "path": ["0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2","0x6B175474E89094C44Da98b954EedeAC495271d0F"],
    "to": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "deadline": "1665990894",
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "gas": "173376"
}
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
        "to": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
        "value": "0",
        "gas": "173376",
        "data": "0x38ed173900000000000000000000000000000000000000000000000000038d7ea4c68000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000063056e00436da25bcf48a40dfbbdcc708935100600000000000000000000000000000000000000000000000000000000634d00ee0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f",
        "estimationCheck": true,
        "referenceId": "f6e53dc2b6404645bf503e547811a0d4"
    }
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Sample Request" %}
**With gasPriority:**

<pre class="language-json"><code class="lang-json">{
    "dexId": "1000",
    "amountIn": "10000000000",
    "amountOutMin": "0",
    "path": [
        "0x6B175474E89094C44Da98b954EedeAC495271d0F",
        "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
    ],
    "to": "0x356dB816602c85e2075774bB77D13995c8Bab023",
    "deadline": "1765990894",
    "from": "0x356dB816602c85e2075774bB77D13995c8Bab023",
    "gas": "273376",
    "gasPriority": "high"
<strong>}
</strong></code></pre>

{% endtab %}

{% tab title="Sample Response" %}
**With gasPriority:**

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0x356dB816602c85e2075774bB77D13995c8Bab023",
        "to": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
        "value": "0",
        "gas": "273376",
        "data": "0x38ed173900000000000000000000000000000000000000000000000000000002540be400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000356db816602c85e2075774bb77d13995c8bab023000000000000000000000000000000000000000000000000000000006942e1ee00000000000000000000000000000000000000000000000000000000000000020000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
        "gasPrice": "35333757810",
        "estimationCheck": true,
        "referenceId": "c65d3c66ac72477786f5aa4a3b7dd192"
    }
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Sample Request" %}
**With Slippage:**

```json
{
    "dexId": "1000",
    "amountIn": "10000000000000",
    "amountOutMin": "0",
    "path": [
        "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
        "0x6B175474E89094C44Da98b954EedeAC495271d0F"
    ],
    "to": "0x22cf65ae3fa16d6379e72f4b4c2401c1b7c69731",
    "deadline": "1701931771",
    "from": "0x22cf65ae3fa16d6379e72f4b4c2401c1b7c69731",
    "gas": "173376",
    "slippage": "10"
}
```

{% endtab %}

{% tab title="Sample Response" %}
**With Slippage:**

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0x22cf65ae3fa16d6379e72f4b4c2401c1b7c69731",
        "to": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
        "value": "0",
        "gas": "173376",
        "data": "0x38ed1739000000000000000000000000000000000000000000000000000009184e72a000000000000000000000000000000000000000000000000000004f2c564cb7cb0000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000022cf65ae3fa16d6379e72f4b4c2401c1b7c697310000000000000000000000000000000000000000000000000000000065716afb0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f",
        "estimationCheck": true,
        "referenceId": "431c127d298b4a8484ced40bc34a55ab"
    }
}
```

{% endtab %}
{% endtabs %}

### /addliquidity

Add liquidity to a specified pool in a specified DEX.

<mark style="color:green;">`POST`</mark> `https://api.expand.network/dex/addliquidity`

#### Request Body

| Name                                             | Type   | Description                                                                            |
| ------------------------------------------------ | ------ | -------------------------------------------------------------------------------------- |
| dexId                                            | String | Refer to the [DEX ID](https://docs.expand.network/ids/dex-ids) page for details.       |
| tokenA<mark style="color:red;">\*</mark>         | String | Address of the first token being added.                                                |
| tokenB<mark style="color:red;">\*</mark>         | String | Address of the second token being added.                                               |
| amountADesired<mark style="color:red;">\*</mark> | String | Desired amount of token A.                                                             |
| amountBDesired<mark style="color:red;">\*</mark> | String | Desired amount of token B.                                                             |
| amountAMin<mark style="color:red;">\*</mark>     | String | Minimum amount of token A.                                                             |
| amountBMin<mark style="color:red;">\*</mark>     | String | Minimum amount of token B.                                                             |
| deadline<mark style="color:red;">\*</mark>       | String | Deadline for the transaction to be executed (UNIX Timestamp).                          |
| to<mark style="color:red;">\*</mark>             | String | Address of the recipient of the token.                                                 |
| from<mark style="color:red;">\*</mark>           | String | Address of the sender of the token.                                                    |
| gas                                              | String | Maximum gas limit provided by the sender, for the transaction.                         |
| rpc                                              | String | Remote procedural call URL.                                                            |
| gasPriority                                      | String | low, medium, or high.                                                                  |
| slippage                                         | String | <p>Percentage of total value. <br>By default, 1.</p><p>0 <= slippage  value <= 100</p> |

{% tabs %}
{% tab title="Sample Request" %}

```json
{
    "dexId": "1000",
    "tokenA": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", 
    "tokenB": "0x6B175474E89094C44Da98b954EedeAC495271d0F", 
    "amountADesired": "1000000000000000",
    "amountBDesired": "1332066335118442626",
    "amountAMin": "0",
    "amountBMin": "0",
    "to": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",  
    "deadline": "166978170",
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",  
    "gas": "230000"
}
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
        "to": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
        "value": "0",
        "gas": "230000",
        "data": "0xe8e33700000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f00000000000000000000000000000000000000000000000000038d7ea4c68000000000000000000000000000000000000000000000000000127c734631fdc0820000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000063056e00436da25bcf48a40dfbbdcc70893510060000000000000000000000000000000000000000000000000000000009f3e27a",
        "estimationCheck": true,
        "referenceId": "a7fa313845d84addb36a61ae0cfed8fe"
    }
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Sample Request" %}
**With gasPriority:**

```json
{
    "dexId": "1000",
    "tokenA": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", 
    "tokenB": "0x6B175474E89094C44Da98b954EedeAC495271d0F", 
    "amountADesired": "1000",
    "amountBDesired": "997726184637093",
    "amountAMin": "0",
    "amountBMin": "0",
    "poolFees":"3000",
    "from": "0x356dB816602c85e2075774bB77D13995c8Bab023",
    "to":"0x356dB816602c85e2075774bB77D13995c8Bab023",
    "deadline":"1699965863785",
    "gas": "0",
    "gasPriority":"medium"
}
```

{% endtab %}

{% tab title="Sample Response" %}
**With gasPriority:**

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0x356dB816602c85e2075774bB77D13995c8Bab023",
        "to": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
        "value": "0",
        "gas": "0",
        "data": "0xe8e33700000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000006b175474e89094c44da98b954eedeac495271d0f00000000000000000000000000000000000000000000000000000000000003e800000000000000000000000000000000000000000000000000038b6d3ad182a500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000356db816602c85e2075774bb77d13995c8bab0230000000000000000000000000000000000000000000000000000018bcddc8769",
        "gasPrice": "28418670209",
        "estimationCheck": true,
        "referenceId": "9aad6d0b4428499ca9247ea8ee76e63b"
    }
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Sample Request" %}
**With Slippage:**

```json
{
    "dexId": "1000",
    "tokenA": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
    "tokenB": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
    "amountADesired": "1000000",
    "amountBDesired": "640706397834636",
    "amountAMin": "100",
    "amountBMin": "100",
    "to": "0x22cf65Ae3fa16d6379E72F4B4c2401c1B7C69731",
    "deadline": "1712015780705",
    "from": "0x22cf65Ae3fa16d6379E72F4B4c2401c1B7C69731",
    "gas": "230000",
    "slippage": "5.00001"
}
```

{% endtab %}

{% tab title="Sample Response" %}
**With Slippage:**

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0x22cf65Ae3fa16d6379E72F4B4c2401c1B7C69731",
        "to": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
        "value": "0",
        "gas": "230000",
        "data": "0xe8e33700000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000f4240000000000000000000000000000000000000000000000000000246b8153f8d8c000000000000000000000000000000000000000000000000000000000000005f000000000000000000000000000000000000000000000000000000000000005f00000000000000000000000022cf65ae3fa16d6379e72f4b4c2401c1b7c697310000000000000000000000000000000000000000000000000000018e9c17ab61",
        "estimationCheck": true,
        "referenceId": "a451275a6d5f4f789ac6c09c2bfe55cb"
    }
}
```

{% endtab %}
{% endtabs %}

### /removeliquidity

Remove liquidity from a specified pool for a specified DEX.

<mark style="color:green;">`POST`</mark> `https://api.expand.network/dex/removeliquidity`

#### Request Body

| Name                                         | Type   | Description                                                                         |
| -------------------------------------------- | ------ | ----------------------------------------------------------------------------------- |
| dexId                                        | String | Refer to the [DEX ID](https://docs.expand.network/ids/dex-ids) page for details.    |
| tokenA<mark style="color:red;">\*</mark>     | String | Address of the first token being removed.                                           |
| tokenB<mark style="color:red;">\*</mark>     | String | Address of the second token being removed.                                          |
| liquidity<mark style="color:red;">\*</mark>  | String | Total amount of liquidity to be removed from the given pool.                        |
| amountAMin<mark style="color:red;">\*</mark> | String | Minimum amount of Token A.                                                          |
| amountBMin<mark style="color:red;">\*</mark> | String | Minimum amount of Token B.                                                          |
| deadline<mark style="color:red;">\*</mark>   | String | Deadline for the transaction to be executed (UNIX Timestamp).                       |
| to<mark style="color:red;">\*</mark>         | String | Address of the recipient of the token.                                              |
| from<mark style="color:red;">\*</mark>       | String | Address of the sender of the token.                                                 |
| gas                                          | String | Maximum gas limit provided by the sender, for the transaction.                      |
| rpc                                          | String | Remote procedural call URL.                                                         |
| gasPriority                                  | String | low, medium, or high.                                                               |
| slippage                                     | String | <p>Percentage of total value. <br>By default, 1. <br>0 <= slippage value <= 100</p> |

{% tabs %}
{% tab title="Sample Request" %}

```json
{
    "dexId": "1000",
    "tokenA": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
    "tokenB": "0x6B175474E89094C44Da98b954EedeAC495271d0F",
    "liquidity": "20759430672661383",
    "amountAMin": "0",
    "amountBMin": "0",
    "to": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "deadline": "1669720626",
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "gas": "420000"
}
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
        "to": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
        "value": "0",
        "gas": "420000",
        "data": "0xbaa2abde000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f0000000000000000000000000000000000000000000000000049c0979afbbb870000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000063056e00436da25bcf48a40dfbbdcc7089351006000000000000000000000000000000000000000000000000000000006385ea32",
        "estimationCheck": true,
        "referenceId": "6d8ff104b4e84b79a3d7a750e103be44"
    }
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Sample Request" %}
**With gasPriority:**

```json
{
    "dexId": "1000",
    "tokenA": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
    "tokenB": "0x6B175474E89094C44Da98b954EedeAC495271d0F",
    "liquidity": "20759430672661383",
    "amountAMin": "0",
    "amountBMin": "0",
    "to": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "deadline": "1669720626",
    "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "gas": "420000",
    "gasPriority": "high"
}
```

{% endtab %}

{% tab title="Sample Response" %}
**With gasPriority:**

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
        "to": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
        "value": "0",
        "gas": "420000",
        "data": "0xbaa2abde000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f0000000000000000000000000000000000000000000000000049c0979afbbb870000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000063056e00436da25bcf48a40dfbbdcc7089351006000000000000000000000000000000000000000000000000000000006385ea32",
        "gasPrice": "35169117159",
        "estimationCheck": true,
        "referenceId": "d92319bdba68444b8f52f01735ec6550"
    }
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Sample Request" %}
**With slippage:**

```json
{
    "dexId": "1000",
    "tokenA": "0x6B175474E89094C44Da98b954EedeAC495271d0F",
    "tokenB": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
    "liquidity": "3834508059710445",
    "amountAMin": "100",
    "amountBMin": "100",
    "to": "0x4970798F8E5a77598CA4Da778eb6D12303AEefc9",
    "deadline": "1669720626",
    "from": "0x4970798F8E5a77598CA4Da778eb6D12303AEefc9",
    "gas": "420000",
    "slippage": "5.01"
}
```

{% endtab %}

{% tab title="Sample Response" %}
**With slippage:**

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "1",
        "from": "0x4970798F8E5a77598CA4Da778eb6D12303AEefc9",
        "to": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
        "value": "0",
        "gas": "420000",
        "data": "0xbaa2abde0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000000000000000000000000000000d9f76fac993ed000000000000000000000000000000000000000000000000000000000000005f000000000000000000000000000000000000000000000000000000000000005f0000000000000000000000004970798f8e5a77598ca4da778eb6d12303aeefc9000000000000000000000000000000000000000000000000000000006385ea32",
        "estimationCheck": true,
        "referenceId": "4e1324d014cf4d8daab6a023fe3322cc"
    }
}
```

{% endtab %}
{% endtabs %}
