Uniswap V3
Supported Chains
Available on Ethereum Mainnet and Testnet, Arbitrum, Avalanche, Base, Binance Smart Chain, and Polygon.
Available Endpoints:
Click on the endpoint to jump to the section with full details
/getprice
GET
- Returns the swap quotation for a given token pair on Uniswap V3./getuserliquidity
GET
- Returns the balance of a particular token pair of accounts./getpoolliquidity
GET
- Returns the total liquidity for a specified pool./gettokenliquidity
GET
- Returns the individual token liquidity within the specified liquidity pool./getliquidityholders
GET
- Returns the total number of liquidity holders in a specified pool./getindividualposition
GET
- Returns the liquidity position for a specified user address across all the pools for a given DEX./getpoolindividualliquidity
GET
- Returns all user addresses, block numbers, and token position details for a specified pool address./gethistoricaltimeseries
GET
- Returns historical time series transactions for a specific pool address. Available on Ethereum only./gethistoricaltransactions
GET
- Returns historical transactions focusing on swaps associated with a specific pool address. Available on Ethereum only./gethistoricalpoolchartdata
GET
- Returns OHCLV (Open, High, Close, Low, and Volume) data for a specified time interval. Available on Ethereum only./getpooltradedata
GET
- Returns trade data for a specified pool, block range, and event type. Available on Ethereum only./swap
POST
- Initiate a swap transaction on a specified DEX./addliquidity
POST
- Add liquidity to a specified pool in a specified DEX./removeliquidity
POST
- Remove liquidity from a specified pool in a specified DEX.
DEX IDs
Many endpoints have a parameter where you can provide a DEX ID.
Below is a list of DEX IDs related to Uniswap V3. Please see the DEX ID page for a complete DEX ID list and more information.
DEX Name | Chain | DEX ID |
---|---|---|
Uniswap V3 | Ethereum | 1300 |
Uniswap V3 Testnet | Ethereum Testnet | 1302 |
Uniswap V3 | Avalanche | 1305 |
Uniswap V3 | Binance Smart Chain | 1306 |
Uniswap V3 | Polygon | 1307 |
Uniswap V3 | Arbitrum | 1308 |
Uniswap V3 | Base | 1309 |
Endpoint Details
/getprice
Returns the swap quotation for a given token pair on Uniswap V3
GET
https://api.expand.network/dex/getprice
Query Parameters
Name | Type | Description |
---|---|---|
rpc | String | Remote procedural call URL. |
dexId* | String | See the DEX ID page for a list of all DEX IDs. The DEX ID for Uniswap V3 on Ethereum is 1300. |
path* | String | Comma separated values of token addresses whose price is to be fetched. |
amountIn* | String | Amount of token. |
poolFees | String | Different pool based on the fees. By default, it is selected as 3000. |
https://api.expand.network/dex/getprice?dexId=1300&path=0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0xdac17f958d2ee523a2206206994597c13d831ec7&amountIn=10000000000000000000
{
"status": 200,
"msg": "success",
"data": {
"amountIn": "10000000000000000000",
"path": [
"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"0xdac17f958d2ee523a2206206994597c13d831ec7"
],
"amountsOut": [
"10000000000000000000",
"15671654661"
]
}
}
/getuserliquidity
Returns the balance of a particular token pair of an account.
GET
https://api.expand.network/dex/getuserliquidity
Query Parameters
Name | Type | Description |
---|---|---|
rpc | String | Remote procedural call URL. |
tokenId* | String | The token ID for uniswap V3 liquidity position. |
dexId* | String | Refer to DexId page for details. |
https://api.expand.network/dex/getuserliquidity?dexId=1300&tokenId=3238
{
"status": 200,
"msg": "success",
"data": {
"liquidity": "0",
"tokenV3": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
}
}
/getpoolliquidity
Returns the total liquidity for a specified pool.
GET
https://api.expand.network/dex/getpoolliquidity
Query Parameters
Name | Type | Description |
---|---|---|
rpc | String | Remote procedural call URL. |
poolAddress* | String | Pool address whose liquidity is to be fetched. |
dexId* | String | Refer to DEX ID page for details. |
https://api.expand.network/dex/getpoolliquidity?dexId=1300&poolAddress=0xC12aF0C4AA39D3061c56cD3CB19f5e62dEeaeBdE
{
"status": 200,
"msg": "success",
"data": {
"totalLiquidity": "3560688052732075"
}
}
/gettokenliquidity
Returns the individual token liquidity within the specified liquidity pool.
GET
https://api.expand.network/dex/gettokenliquidity
Query Parameters
Name | Type | Description |
---|---|---|
rpc | String | Remote procedural call URL. |
poolAddress* | String | The pool address. |
dexId* | String | Refer to DEX ID page for details. |
https://api.expand.network/dex/gettokenliquidity?dexId=1300&poolAddress=0xC12aF0C4AA39D3061c56cD3CB19f5e62dEeaeBdE
{
"status": 200,
"msg": "success",
"data": {
"wstETH": "1464524814018114",
"WETH": "586998274859845123"
}
}
/getliquidityholders
Returns the total number of liquidity holders in a specified pool.
GET
https://api.expand.network/dex/getliquidityholders
Query Parameters
Name | Type | Description |
---|---|---|
rpc | String | Remote procedural call URL. |
poolAddress* | String | The pool address. |
dexId* | String | Refer to DEX ID page for details. |
https://api.expand.network/dex/getliquidityholders?dexId=1300&poolAddress=0xC2e9F25Be6257c210d7Adf0D4Cd6E3E881ba25f8
{
"status": 200,
"msg": "success",
"data": {
"totalTokenHolders": "9032"
}
}
/getindividualposition
Returns the liquidity position for a specified user address across all the pools for a given DEX.
GET
https://api.expand.network/dex/getindividualposition
Query Parameters
Name | Type | Description |
---|---|---|
rpc | String | Remote procedural call URL. |
address* | String | The public address of the liquidity holder. |
dexId* | String | Refer to DEX ID page for details. |
poolAddresses | String | The pool Addresses whose liquidity is to be fetched. (Comma-separated vaules) |
https://api.expand.network/dex/getindividualposition?address=0xc36442b4a4522e871399cd717abdd847ab11fe88&poolAddresses=0x971194A53Dddc8Ccfa96d5DD1E42Cd9d15746827&dexId=1300
{
"status": 200,
"msg": "success",
"data": {
"aggregatedLiquidity": "21292566467643316140077",
"poolAddresses": {
"JBUCKETSWETH": {
"0x971194A53Dddc8Ccfa96d5DD1E42Cd9d15746827": "21292566467643316140077"
}
}
}
}
/getpoolindividualliquidity
Returns all user addresses, block numbers, and token position details for a specified pool address.
GET
https://historicallp.api.expand.network/dex/getpoolindividualliquidity
Query Parameters
Name | Type | Description |
---|---|---|
rpc | String | Remote procedural call URL. |
poolAddress* | String | The pool address. |
dexId* | String | Refer to DEX ID page for details. |
endPage | String | Index of the last page that user wants to query. By default: startPage+9 |
startPage | String | Index of the start page that user wants to query. By default: endPage-9 |
https://historicallp.api.expand.network/dex/getpoolindividualliquidity?startPage=9&endPage=10&poolAddress=0xc63b0708e2f7e69cb8a1df0e1389a98c35a76d52&dexId=1300
{
"status": 200,
"msg": "success",
"data": {
"totalPages": "15",
"currentPages": "9-10",
"users": [
{
"userAddress": "0x2437db820de92d8dd64b524954fa0d160767c471",
"liquidityData": [
{
"blockNumber": "13277434",
"assets": {
"FRAX": "2001379910594238071141",
"USDC": "1810794482"
}
}
]
},
{
"userAddress": "0x2bf3473ff8a245f92137806fa69699d42ce35326",
"liquidityData": [
{
"blockNumber": "13275903",
"assets": {
"FRAX": "864998815672459340215598",
"USDC": "771907589299"
}
}
]
},
{
"userAddress": "0xb1baf9eb336f6795f3373be04b0a90215e08346d",
"liquidityData": [
{
"blockNumber": "13275699",
"assets": {
"FRAX": "261480042733082670908162",
"USDC": "246752791138"
}
}
]
},
{
"userAddress": "0x96adc904b512c6fe6e9ea64f4e0327c7920af981",
"liquidityData": [
{
"blockNumber": "13269412",
"assets": {
"FRAX": "50199999999122147415327",
"USDC": "45516565571"
}
}
]
},
{
"userAddress": "0xb1baf9eb336f6795f3373be04b0a90215e08346d",
"liquidityData": [
{
"blockNumber": "13268382",
"assets": {
"FRAX": "204831907264879767932778",
"USDC": "184322143085"
}
}
]
}
]
}
}
/gethistoricaltimeseries
Get historical time series transactions for a specific pool address. Available on Ethereum only.
GET
https://historicaltrade.api.expand.network/dex/gethistoricaltimeseries
Query Parameters
Name | Type | Description |
---|---|---|
dexId* | String | Refer to DEX ID page for details. |
endBlock | String | Last block of the range. |
startBlock | String | Starting block of the range. |
poolAddress* | String | Pool address whose time series is to be fetched. |
https://historicaltrade.api.expand.network/dex/gethistoricaltimeseries?dexId=1300&poolAddress=0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640
{
"status": 200,
"msg": "success",
"data": {
"pair": "USDC/WETH",
"priceData": [
{
"hash": "0x38987fde3da3213ed19d4ba5f35ad19427a7bb948a29d9d53ef314e8290303c4",
"timestamp": 1703751443,
"price": 0.00041976984339351357
},
{
"hash": "0xb761d35868ea8c5b9e3971dd7aa5fd21d3aebe2ecc438107ea887ed626e9e1f0",
"timestamp": 1703751443,
"price": 0.000419760992238418
},
{
"hash": "0x39aad80e4e83ae62204cb25d7c97961c4ec4ddaa89f73e9c34ac3769602a24bf",
"timestamp": 1703751431,
"price": 0.0004197578615022704
},
{
"hash": "0x5b4ab81a8addb871f537e9c2b778dd34864de232f3e56d33ba7fd835cbac1903",
"timestamp": 1703751407,
"price": 0.0004197562885194616
},
{
"hash": "0x331285df3da92120335b89c8afc41b66ef813a22754a2ad2929e9dc4739cc4ac",
"timestamp": 1703751383,
"price": 0.00041974726650371503
},
{
"hash": "0xc99d3ece4711f4e355eb538ce36650c0cee4ae6bddf965dfdfed4836a76e5d7b",
"timestamp": 1703751347,
"price": 0.00041973876117544354
},
{
"hash": "0x710533e3977ea754f485b3bd70583e8e9efce49c6474d4d2b6c9a84d3ea43c4c",
"timestamp": 1703751299,
"price": 0.00041932018198753956
},
{
"hash": "0x6b4c65707ced66be9bdfdc476e262f09f2faf288ff87701327734c6a4ea3cd54",
"timestamp": 1703751287,
"price": 0.00041973930702795154
},
{
"hash": "0x269db22d154768f562e0a9064f8ed1bb2f6d157b6b46124b3c021ab1553bce8f",
"timestamp": 1703751263,
"price": 0.0004194194863550368
},
{
"hash": "0x1e484c122e784479e3aa6b5c706100d2320945b0518b80125fec937a23e03f94",
"timestamp": 1703751203,
"price": 0.000419632602069267
},
{
"hash": "0x94928f3b93dccd23a966a09a6164c43fca9396865ae5537cb169064442fb6038",
"timestamp": 1703751155,
"price": 0.0004197467760294749
},
{
"hash": "0x945dba738ad85406361b2295bd7dc4df5d755d8d59c9ae1ec262a93dc26f2b27",
"timestamp": 1703751155,
"price": 0.0004197513702011714
},
{
"hash": "0xb998b508ca1d6965190e7a5dc93621cd88a5a8958cfccfbab747764028de8377",
"timestamp": 1703751155,
"price": 0.0004201607446060059
},
{
"hash": "0x6ca4feeb1c7cc7a5cbcd1dd67ec77d3c31fccbca490bb2e16e3773cb46f8f3a4",
"timestamp": 1703751143,
"price": 0.0004199672013049922
},
{
"hash": "0x95d7526c279240fe98ec4a710b4b3c510d527ccf8caacdab3ee8aaffc3c874c8",
"timestamp": 1703751095,
"price": 0.00042029036707271275
},
{
"hash": "0x6f9b15d401da224600f65d14c29a49598967ec211e3847f4e8541364291a52d2",
"timestamp": 1703751083,
"price": 0.0004204936256776377
}
]
}
}
/gethistoricaltransactions
Get the historical transactions focusing on swaps associated with a specific pool address. Available on Ethereum only.
GET
https://historicaltrade.api.expand.network/dex/gethistoricaltransactions
Query Parameters
Name | Type | Description |
---|---|---|
dexId* | String | Refer to DEX ID page for details. |
endBlock | String | Last block of the range. |
startBlock | String | Starting block of the range. |
poolAddress* | String | Pool address whose transactions is to be fetched. |
https://historicaltrade.api.expand.network/dex/gethistoricaltransactions?poolAddress=0x8ad599c3a0ff1de082011efddc58f1908eb6e6d8&dexId=1300&startBlock=18709774&endBlock=18711525
{
"status": 200,
"msg": "success",
"data": {
"pair": "USDC/WETH",
"transactions": [
{
"transactionHash": "0xd8c46225c354721655d84389d0017bb92bca0d49219c63b1c0e6b0cfe07442c7",
"transactionDetails": {
"blockHash": "0x99073be585a7b262b39280b278ba3757f9d2d357f6eb0a3a32bd38fdeb51d38e",
"blockNumber": "18711525",
"from": "0x8d5acf995dae10bdbbada2044c7217ac99edf5bf",
"gas": "456262",
"gasPrice": "44449889625",
"maxFeePerGas": "58008491929",
"maxPriorityFeePerGas": "100000000",
"hash": "0xd8c46225c354721655d84389d0017bb92bca0d49219c63b1c0e6b0cfe07442c7",
"input": "0xac9650d800000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000016488316456000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000000000000000bb8000000000000000000000000000000000000000000000000000000000003096c00000000000000000000000000000000000000000000000000000000000309a800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000043a77aabd0077ffc700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000043a77aabd0077ffc70000000000000000000000008d5acf995dae10bdbbada2044c7217ac99edf5bf00000000000000000000000000000000000000000000000000000000656d825b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000412210e8a00000000000000000000000000000000000000000000000000000000",
"nonce": "531",
"to": "0xc36442b4a4522e871399cd717abdd847ab11fe88",
"transactionIndex": "126",
"value": "78000000000000000000",
"type": "2",
"accessList": [],
"chainId": "1",
"v": "0x1",
"r": "0x1ac7d0ed1e2047f0535c7d1762c0ef862fc5f247285de80ad3667500261710c0",
"s": "0x3b29d6d0489d3a3352aafd9638f3003b0d2ecd48986506b110a0c266e5269adc",
"yParity": "0x1"
}
},
{
"transactionHash": "0xc8280fdcf97f561ccae5bc4a571ffbbf187a1c7d4dc44062e3055647c47edfea",
"transactionDetails": {
"blockHash": "0x3429b4e7bc88936e97ed52e261ef012f4b87ab44e941a61c62dfc0be8c15756d",
"blockNumber": "18709774",
"from": "0x9c5c934672d289ffa05252841078bae754dc7eb1",
"gas": "444856",
"gasPrice": "36458104843",
"maxFeePerGas": "54302243486",
"maxPriorityFeePerGas": "616099394",
"hash": "0xc8280fdcf97f561ccae5bc4a571ffbbf187a1c7d4dc44062e3055647c47edfea",
"input": "0x88316456000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000000000000000bb80000000000000000000000000000000000000000000000000000000000030a980000000000000000000000000000000000000000000000000000000000030bc40000000000000000000000000000000000000000000000000000002e90edd00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002e90edd00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009c5c934672d289ffa05252841078bae754dc7eb100000000000000000000000000000000000000000000000000000000656d2fb7",
"nonce": "87",
"to": "0xc36442b4a4522e871399cd717abdd847ab11fe88",
"transactionIndex": "73",
"value": "0",
"type": "2",
"accessList": [],
"chainId": "1",
"v": "0x1",
"r": "0x222ac5e262c781fc92abac25683602ed20be24d2c08853d5bd85ddab50283363",
"s": "0x7e43e2b4c406ffc3d0e9e956d87d97b37858e4176cc7501fee28ff7d7fe1976c",
"yParity": "0x1"
}
},
{
"transactionHash": "0x5eddbfc2dadaa56c29cb20ac863e3381875702000231c725450414f0b841dff8",
"transactionDetails": {
"blockHash": "0x6cae8b44cc42e7754f51494b0e01c2db1a21f4874484557d31d515fc6e2928ca",
"blockNumber": "18710651",
"from": "0xe63ef6b5cbaad5be3d6b984ebe8627b275ba2011",
"gas": "484500",
"gasPrice": "36104085907",
"maxFeePerGas": "42198419459",
"maxPriorityFeePerGas": "2480176656",
"hash": "0x5eddbfc2dadaa56c29cb20ac863e3381875702000231c725450414f0b841dff8",
"input": "0x88316456000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000000000000000bb800000000000000000000000000000000000000000000000000000000000308f40000000000000000000000000000000000000000000000000000000000030b4c00000000000000000000000000000000000000000000000000000000029f6300000000000000000000000000000000000000000000000000007d43134c4d848600000000000000000000000000000000000000000000000000000000020364b4000000000000000000000000000000000000000000000000006ccabcaeb83d2d000000000000000000000000e63ef6b5cbaad5be3d6b984ebe8627b275ba201100000000000000000000000000000000000000000000000000000000656d5933",
"nonce": "16",
"to": "0xc36442b4a4522e871399cd717abdd847ab11fe88",
"transactionIndex": "52",
"value": "0",
"type": "2",
"accessList": [],
"chainId": "1",
"v": "0x0",
"r": "0xe9d43c3d98a9ab874af15be82bf0564be4bb12c32d25ab2c2d855614dc9dee21",
"s": "0x66f23ef791845f58be1f34c92c77f265b69ff37eed121ae15368574af7a9226b",
"yParity": "0x0"
}
},
{
"transactionHash": "0x3d6193001b90ba7cbbeafd0fdee714d5b53bcfd115c660cbcce6e1205b7ad75d",
"transactionDetails": {
"blockHash": "0xb0d4a62d43dda996d815806a53e905b21897b73a9152f0d41ec70e985b263b84",
"blockNumber": "18709824",
"from": "0x24affae9c683b7615d4130300288e348e4b5d091",
"gas": "634666",
"gasPrice": "41077993391",
"maxFeePerGas": "61616990086",
"maxPriorityFeePerGas": "0",
"hash": "0x3d6193001b90ba7cbbeafd0fdee714d5b53bcfd115c660cbcce6e1205b7ad75d",
"input": "0x1cff79cd000000000000000000000000ebc926a16ad7837e9a26c2eb22557ebbe2e6bbd5000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000e43123dd7600000000000000000000000000000000000000000000000000000000656d2ff30000000000000000000000008ad599c3a0ff1de082011efddc58f1908eb6e6d8000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000000000000000000000000000001edc280dae4314000000000000000000000000000000000000000000000000001edc280dae431400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"nonce": "77830",
"to": "0x5050e08626c499411b5d0e0b5af0e83d3fd82edf",
"transactionIndex": "0",
"value": "9201664",
"type": "2",
"accessList": [
{
"address": "0x8ad599c3a0ff1de082011efddc58f1908eb6e6d8",
"storageKeys": [
"0x4599bbaa72a0f54af58cb2739cf429f4c2b98d872f82d2ddc59ada0987fe7786",
"0x0d77e2d712980b9f161379006fa1cd3d3620dc913971aa0df321a1d9aed458d8",
"0xc4e36790523d49948822155ef94f257b8a953b27f5171ffa2bd285edc0b036a4",
"0x0000000000000000000000000000000000000000000000000000000000000002",
"0x0000000000000000000000000000000000000000000000000000000000000004",
"0x00000000000000000000000000000000000000000000000000000000000002c7",
"0x4599bbaa72a0f54af58cb2739cf429f4c2b98d872f82d2ddc59ada0987fe7788",
"0x0d77e2d712980b9f161379006fa1cd3d3620dc913971aa0df321a1d9aed458d9",
"0xc4e36790523d49948822155ef94f257b8a953b27f5171ffa2bd285edc0b036a3",
"0x0000000000000000000000000000000000000000000000000000000000000001",
"0x4599bbaa72a0f54af58cb2739cf429f4c2b98d872f82d2ddc59ada0987fe7787",
"0x0d77e2d712980b9f161379006fa1cd3d3620dc913971aa0df321a1d9aed458da",
"0xc4e36790523d49948822155ef94f257b8a953b27f5171ffa2bd285edc0b036a1",
"0xc4e36790523d49948822155ef94f257b8a953b27f5171ffa2bd285edc0b036a2",
"0x00000000000000000000000000000000000000000000000000000000000002c8",
"0x0000000000000000000000000000000000000000000000000000000000000000"
]
},
{
"address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"storageKeys": [
"0x10d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b",
"0x037115957c78e37f987a242ae6019b6d91ee5fe4035e6bd8dbead7487b2a0cdd",
"0xc58bfc1a94e2de102d0112db2443321126998201ea69c15631ad885e318d85cd",
"0xfc581e2e1d759407b26acc35e3d0231aeae791f35404c37eeed17c8cdf81bcfd",
"0x7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c3",
"0x861bc8718284ac24ff11398a41cd3dcfa30f40a29e63274364e80d202c20402c",
"0xb95dd07fa1ed783744109930e951789ad0898d42d588ae87377539fa5fd5e26c",
"0x0000000000000000000000000000000000000000000000000000000000000001",
"0x14f06863b217bb724f48eeeae7a44747755f25ffffde525fba804b12abcd115f"
]
},
{
"address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"storageKeys": [
"0x46907554d4b34c274883fc6378e0b8984501b080086b3ca0038d889b8150bd13",
"0x037115957c78e37f987a242ae6019b6d91ee5fe4035e6bd8dbead7487b2a0cdd",
"0xfc581e2e1d759407b26acc35e3d0231aeae791f35404c37eeed17c8cdf81bcfd"
]
},
{
"address": "0x9a5f2e0db22ff289d0cc40ef654a19a5b012d8aa",
"storageKeys": []
},
{
"address": "0xebc926a16ad7837e9a26c2eb22557ebbe2e6bbd5",
"storageKeys": []
},
{
"address": "0xa2327a938febf5fec13bacfb16ae10ecbc4cbdcf",
"storageKeys": []
}
],
"chainId": "1",
"v": "0x0",
"r": "0x2157a9e7e20319376325fb86f904a8811c7707295e39254dc526f965557329c1",
"s": "0x3e7d0676a70b97527bd6dab06745e6f2bd39181e7b1fa3b05ebd64a2c7264537",
"yParity": "0x0"
}
}
]
}
}
/gethistoricalpoolchartdata
Returns OHCLV (Open, High, Close, Low, and Volume) data for a specified time interval. Available on Ethereum only.
GET
https://api.expand.network/dex/gethistoricalpoolchartdata
Query Parameters
Name | Type | Description |
---|---|---|
dexId* | String | Refer to DEX ID page for details. |
interval | String | 15 mins(by default), 30 mins, 60 mins, and 90 mins. |
limit | String | No of iteration. Start limit is 100 and maximum limit is 500. |
poolAddress* | String | Pool address whose transactions is to be fetched. |
rpc | String | Remote procedural call URL. |
https://api.expand.network/dex/gethistoricalpoolchartdata?dexId=1300&poolAddress=0xCBCdF9626bC03E24f779434178A73a0B4bad62eD&interval=15m&limit=100
{
"status": 200,
"msg": "success",
"data": {
"pair": "WBTC/WETH",
"chartData": [
{
"1719838149-1719839049": {
"open": "18.163221842751827",
"high": "18.163221842751827",
"close": "18.163221842751827",
"low": "18.163221842751827",
"volume": "0"
}
},
{
"1719843549-1719844449": {
"open": "18.152023639366099",
"high": "18.156148725301474",
"low": "18.1520236393661",
"close": "18.156148725301474",
"volume": "201601.9224350474"
}
},
{
"1719844449-1719845349": {
"open": "18.156148725301474",
"high": "18.16017042666642",
"low": "18.156148725301474",
"close": "18.160170426666419",
"volume": "129231.68773261308"
}
},
{
"1719845349-1719846249": {
"open": "18.160170426666419",
"high": "18.16017042666642",
"low": "18.050222752064755",
"close": "18.050222752064755",
"volume": "94235.4810194197"
}
},
{
"1719848049-1719848949": {
"open": "18.050222752064755",
"high": "18.050222752064755",
"close": "18.050222752064755",
"low": "18.050222752064755",
"volume": "0"
}
},
{
"1719848949-1719849849": {
"open": "18.050222752064755",
"high": "18.173391151776787",
"low": "18.050222752064755",
"close": "18.173391151776787",
"volume": "639066.9529722976"
}
},
{
"1719849849-1719850749": {
"open": "18.173391151776787",
"high": "18.217273210574778",
"low": "18.173391151776787",
"close": "18.217273210574778",
"volume": "1876403.8841387564"
}
},
{
"1719850749-1719851649": {
"open": "18.217273210574778",
"high": "18.219566652896766",
"low": "18.217273210574778",
"close": "18.219566652896766",
"volume": "153407.83996704724"
}
},
{
"1719851649-1719852549": {
"open": "18.219566652896766",
"high": "18.224300456903297",
"low": "18.219566652896766",
"close": "18.224300456903297",
"volume": "241583.0271503234"
}
},
{
"1719852549-1719853449": {
"open": "18.224300456903297",
"high": "18.227219275978346",
"low": "18.224300456903297",
"close": "18.227219275978346",
"volume": "1153.246906113717"
}
},
{
"1719853449-1719854349": {
"open": "18.227219275978346",
"high": "18.227219275978346",
"close": "18.227219275978346",
"low": "18.227219275978346",
"volume": "0"
}
},
{
"1719854349-1719855249": {
"open": "18.227219275978346",
"high": "18.228972258667778",
"low": "18.227219275978346",
"close": "18.228972258667778",
"volume": "145781.1514006681"
}
},
{
"1719855249-1719856149": {
"open": "18.228972258667778",
"high": "18.236323534365766",
"low": "18.228972258667778",
"close": "18.236323534365766",
"volume": "364975.32283550635"
}
},
{
"1719856149-1719857049": {
"open": "18.236323534365766",
"high": "18.243247391452595",
"low": "18.236323534365766",
"close": "18.243247391452595",
"volume": "313983.57175287284"
}
},
{
"1719857049-1719857949": {
"open": "18.243247391452595",
"high": "18.243247391452595",
"close": "18.243247391452595",
"low": "18.243247391452595",
"volume": "0"
}
},
{
"1719857949-1719858849": {
"open": "18.243247391452595",
"high": "18.2750111708498",
"low": "18.243247391452595",
"close": "18.275011170849801",
"volume": "1229027.6233920907"
}
},
{
"1719858849-1719859749": {
"open": "18.275011170849801",
"high": "18.278777750420854",
"low": "18.2750111708498",
"close": "18.278777750420854",
"volume": "168149.5774921048"
}
},
{
"1719859749-1719860649": {
"open": "18.278777750420854",
"high": "18.30066739721457",
"low": "18.278777750420854",
"close": "18.300667397214571",
"volume": "989199.0190272806"
}
},
{
"1719860649-1719861549": {
"open": "18.300667397214571",
"high": "18.300667397214571",
"close": "18.300667397214571",
"low": "18.300667397214571",
"volume": "0"
}
},
{
"1719861549-1719862449": {
"open": "18.300667397214571",
"high": "18.300667397214571",
"close": "18.300667397214571",
"low": "18.300667397214571",
"volume": "0"
}
},
{
"1719862449-1719863349": {
"open": "18.300667397214571",
"high": "18.30066739721457",
"low": "18.18889036012872",
"close": "18.188890360128720",
"volume": "307947.5661696072"
}
},
{
"1719863349-1719864249": {
"open": "18.188890360128720",
"high": "18.18889036012872",
"low": "18.181132527860964",
"close": "18.181132527860964",
"volume": "339841.65016079927"
}
},
{
"1719864249-1719865149": {
"open": "18.181132527860964",
"high": "18.181132527860964",
"close": "18.181132527860964",
"low": "18.181132527860964",
"volume": "0"
}
},
{
"1719866949-1719867849": {
"open": "18.181132527860964",
"high": "18.181132527860964",
"close": "18.181132527860964",
"low": "18.181132527860964",
"volume": "0"
}
},
{
"1719867849-1719868749": {
"open": "18.181132527860964",
"high": "18.181132527860964",
"close": "18.181132527860964",
"low": "18.181132527860964",
"volume": "0"
}
},
{
"1719868749-1719869649": {
"open": "18.181132527860964",
"high": "18.181132527860964",
"close": "18.181132527860964",
"low": "18.181132527860964",
"volume": "0"
}
},
{
"1719869649-1719870549": {
"open": "18.181132527860964",
"high": "18.181132527860964",
"close": "18.181132527860964",
"low": "18.181132527860964",
"volume": "0"
}
},
{
"1719870549-1719871449": {
"open": "18.181132527860964",
"high": "18.181132527860964",
"close": "18.181132527860964",
"low": "18.181132527860964",
"volume": "0"
}
},
{
"1719871449-1719872349": {
"open": "18.181132527860964",
"high": "18.181132527860964",
"close": "18.181132527860964",
"low": "18.181132527860964",
"volume": "0"
}
},
{
"1719872349-1719873249": {
"open": "18.181132527860964",
"high": "18.32482665886121",
"low": "18.181132527860964",
"close": "18.324826658861209",
"volume": "1576669.406919741"
}
},
{
"1719873249-1719874149": {
"open": "18.324826658861209",
"high": "18.324826658861209",
"close": "18.324826658861209",
"low": "18.324826658861209",
"volume": "0"
}
},
{
"1719874149-1719875049": {
"open": "18.324826658861209",
"high": "18.324826658861209",
"close": "18.324826658861209",
"low": "18.324826658861209",
"volume": "0"
}
},
{
"1719883149-1719884049": {
"open": "18.324826658861209",
"high": "18.324826658861209",
"close": "18.324826658861209",
"low": "18.324826658861209",
"volume": "0"
}
},
{
"1719884049-1719884949": {
"open": "18.324826658861209",
"high": "18.32482665886121",
"low": "18.20688113164695",
"close": "18.206881131646949",
"volume": "848119.3291747774"
}
},
{
"1719884949-1719885849": {
"open": "18.206881131646949",
"high": "18.206881131646949",
"close": "18.206881131646949",
"low": "18.206881131646949",
"volume": "0"
}
},
{
"1719885849-1719886749": {
"open": "18.206881131646949",
"high": "18.206881131646949",
"close": "18.206881131646949",
"low": "18.206881131646949",
"volume": "0"
}
},
{
"1719886749-1719887649": {
"open": "18.206881131646949",
"high": "18.206881131646949",
"close": "18.206881131646949",
"low": "18.206881131646949",
"volume": "0"
}
},
{
"1719887649-1719888549": {
"open": "18.206881131646949",
"high": "18.206881131646949",
"close": "18.206881131646949",
"low": "18.206881131646949",
"volume": "0"
}
},
{
"1719888549-1719889449": {
"open": "18.206881131646949",
"high": "18.206881131646949",
"close": "18.206881131646949",
"low": "18.206881131646949",
"volume": "0"
}
},
{
"1719905649-1719906549": {
"open": "18.306582167780366",
"high": "18.306582167780366",
"close": "18.306582167780366",
"low": "18.306582167780366",
"volume": "0"
}
},
{
"1719906549-1719907449": {
"open": "18.306582167780366",
"high": "18.306582167780366",
"low": "18.196897586629063",
"close": "18.196897586629063",
"volume": "520.7672563922177"
}
},
{
"1719907449-1719908349": {
"open": "18.196897586629063",
"high": "18.196897586629063",
"low": "18.19509765552369",
"close": "18.195097655523689",
"volume": "100517.84642071436"
}
},
{
"1719908349-1719909249": {
"open": "18.195097655523689",
"high": "18.195097655523689",
"close": "18.195097655523689",
"low": "18.195097655523689",
"volume": "0"
}
},
{
"1719909249-1719910149": {
"open": "18.195097655523689",
"high": "18.195097655523689",
"close": "18.195097655523689",
"low": "18.195097655523689",
"volume": "0"
}
},
{
"1719910149-1719911049": {
"open": "18.195097655523689",
"high": "18.195097655523689",
"close": "18.195097655523689",
"low": "18.195097655523689",
"volume": "0"
}
},
{
"1719911049-1719911949": {
"open": "18.195097655523689",
"high": "18.195097655523689",
"close": "18.195097655523689",
"low": "18.195097655523689",
"volume": "0"
}
},
{
"1719911949-1719912849": {
"open": "18.195097655523689",
"high": "18.19509765552369",
"low": "18.190453464735036",
"close": "18.193747691058498",
"volume": "201225.37315880728"
}
},
{
"1719912849-1719913749": {
"open": "18.193747691058498",
"high": "18.193747691058498",
"low": "18.176071689228696",
"close": "18.176071689228696",
"volume": "701585.1156593484"
}
},
{
"1719913749-1719914649": {
"open": "18.176071689228696",
"high": "18.176071689228696",
"close": "18.176071689228696",
"low": "18.176071689228696",
"volume": "0"
}
},
{
"1719914649-1719915549": {
"open": "18.176071689228696",
"high": "18.176071689228696",
"low": "18.16718239025562",
"close": "18.168675247623948",
"volume": "288159.10085866053"
}
},
{
"1719915549-1719916449": {
"open": "18.168675247623948",
"high": "18.168675247623948",
"close": "18.168675247623948",
"low": "18.168675247623948",
"volume": "0"
}
},
{
"1719916449-1719917349": {
"open": "18.168675247623948",
"high": "18.168675247623948",
"close": "18.168675247623948",
"low": "18.168675247623948",
"volume": "0"
}
},
{
"1719917349-1719918249": {
"open": "18.168675247623948",
"high": "18.168675247623948",
"close": "18.168675247623948",
"low": "18.168675247623948",
"volume": "0"
}
},
{
"1719918249-1719919149": {
"open": "18.168675247623948",
"high": "18.16867524762395",
"low": "18.163221842751827",
"close": "18.165239313218017",
"volume": "169623.86583495548"
}
},
{
"1719919149-1719920049": {
"open": "18.165239313218017",
"high": "18.165239313218017",
"close": "18.165239313218017",
"low": "18.165239313218017",
"volume": "0"
}
},
{
"1719927249-1719928149": {
"open": "18.165239313218017",
"high": "18.165239313218017",
"close": "18.165239313218017",
"low": "18.165239313218017",
"volume": "0"
}
}
]
}
}
/getpooltradedata
Returns trade data for a specified pool, block range, and event type. Available on Ethereum only.
GET
https://historicaltrade.api.expand.network/dex/getpooltradedata
Query Parameters
Name | Type | Description |
---|---|---|
dexId* | String | Refer to DEX ID page for details. |
endBlock | String | Last block of the range. |
startBlock | String | Starting block of the range. |
poolAddress* | String | Pool address whose data is to be fetched. |
eventType | String | Swap, Burn or Mint(by default). |
https://historicaltrade.api.expand.network/dex/getpooltradedata?poolAddress=0x5777d92f208679db4b9778590fa3cab3ac9e2168&dexId=1300&eventType=Swap
{
"status": 200,
"msg": "success",
"data": {
"pair": "DAI/USDC",
"transactions": [
{
"blockNumber": "18883082",
"transactionHash": "0x7bb91700afc23ed9579e3e75870a6d822d5c9e9106a0afb4f894a48e1d3b1836",
"values": {
"0": "0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD",
"1": "0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD",
"2": "-773851782813653396142645",
"3": "773994216704",
"4": "79231558998781270027361",
"5": "454941727155991731855001",
"6": "-276324",
"sender": "0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD",
"recipient": "0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD",
"amount0": "-773851782813653396142645",
"amount1": "773994216704",
"sqrtPriceX96": "79231558998781270027361",
"liquidity": "454941727155991731855001",
"tick": "-276324"
},
"eventType": "Swap",
"data": {
"data": "0xffffffffffffffffffffffffffffffffffffffffffff5c216929d5728d7345cb000000000000000000000000000000000000000000000000000000b435a67d000000000000000000000000000000000000000000000010c726c37299ca15ec6100000000000000000000000000000000000000000000605670c11fccb1cd5e99fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbc89c",
"topics": [
"0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67",
"0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",
"0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad"
]
}
},
{
"blockNumber": "18883077",
"transactionHash": "0xea5e9ba9947be9a0eb100f168f0f094e408ac52b162ce822b0c9635e15293a4e",
"values": {
"0": "0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD",
"1": "0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD",
"2": "-6664975302918764090197",
"3": "6666190611",
"4": "79231424221064230419989",
"5": "454941727155991731855001",
"6": "-276324",
"sender": "0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD",
"recipient": "0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD",
"amount0": "-6664975302918764090197",
"amount1": "6666190611",
"sqrtPriceX96": "79231424221064230419989",
"liquidity": "454941727155991731855001",
"tick": "-276324"
},
"eventType": "Swap",
"data": {
"data": "0xfffffffffffffffffffffffffffffffffffffffffffffe96b0e3128c478a2cab000000000000000000000000000000000000000000000000000000018d55ff130000000000000000000000000000000000000000000010c724e49efb2e4d3e1500000000000000000000000000000000000000000000605670c11fccb1cd5e99fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbc89c",
"topics": [
"0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67",
"0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",
"0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad"
]
}
},
{
"blockNumber": "18883066",
"transactionHash": "0x106dcf2be3ad40c5f27bd818c8ae75d10271af6e61e45c8b38d82447d13eb38c",
"values": {
"0": "0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD",
"1": "0x163C5e051049e92915017Fe7BB9b8ce6182bcBb1",
"2": "7110951881905262918177",
"3": "-7110826137",
"4": "79231423060262337608341",
"5": "454941727155991731855001",
"6": "-276324",
"sender": "0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD",
"recipient": "0x163C5e051049e92915017Fe7BB9b8ce6182bcBb1",
"amount0": "7110951881905262918177",
"amount1": "-7110826137",
"sqrtPriceX96": "79231423060262337608341",
"liquidity": "454941727155991731855001",
"tick": "-276324"
},
"eventType": "Swap",
"data": {
"data": "0x0000000000000000000000000000000000000000000001817c480527b2a97a21fffffffffffffffffffffffffffffffffffffffffffffffffffffffe582967670000000000000000000000000000000000000000000010c724e07f3cedd37a9500000000000000000000000000000000000000000000605670c11fccb1cd5e99fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbc89c",
"topics": [
"0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67",
"0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",
"0x000000000000000000000000163c5e051049e92915017fe7bb9b8ce6182bcbb1"
]
}
},
{
"blockNumber": "18883050",
"transactionHash": "0x1e133891d6d5a109575ee9778ca99340b93b1a83c061cef8ce9c9f7280510a9d",
"values": {
"0": "0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD",
"1": "0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD",
"2": "-948340157679668203715232",
"3": "948511118707",
"4": "79231424298613658735017",
"5": "454941727155991731855001",
"6": "-276324",
"sender": "0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD",
"recipient": "0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD",
"amount0": "-948340157679668203715232",
"amount1": "948511118707",
"sqrtPriceX96": "79231424298613658735017",
"liquidity": "454941727155991731855001",
"tick": "-276324"
},
"eventType": "Swap",
"data": {
"data": "0xffffffffffffffffffffffffffffffffffffffffffff372e6085a7d6a31a8560000000000000000000000000000000000000000000000000000000dcd7ab15730000000000000000000000000000000000000000000010c724e4e583106dd1a900000000000000000000000000000000000000000000605670c11fccb1cd5e99fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbc89c",
"topics": [
"0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67",
"0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",
"0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad"
]
}
}
]
}
}
/swap
Initiate a swap transaction on a specified DEX.
POST
https://api.expand.network/dex/swap
Request Body
Name | Type | Description |
---|---|---|
rpc | String | Remote procedural call URL. |
dexId* | String | Refer to the DEX ID page for details. |
path* | Array | Comma-separated values of token addresses, inside an array, to swap. |
amountIn* | String | Amount of token to be swapped. |
amountOutMin* | String | Minimum amount accepted as a result of swap. |
to* | String | Address of the recipient of the token. |
from* | String | Address of the sender of the token. |
gas* | String | Maximum gas limit provided by the sender, for the transaction. |
involveBaseToken | String | If a base token is involved in the swap;
|
poolFees | String | Different pool based on the fees. By default, it is selected as 3000. |
gasPriority | String | low, medium, or high. |
slippage | String | Percentage of total swap value. By default, 1. 0 <= slippage value <= 10 |
{
"dexId": "1300",
"amountIn": "1000000000000000",
"amountOutMin": "0",
"path": ["0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2","0x6B175474E89094C44Da98b954EedeAC495271d0F"],
"to": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"poolFees": "2975",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"gas": "173376"
}
{
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"to": "0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45",
"value": "0",
"gas": "173376",
"data": "0xac9650d800000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000e4472b43f300000000000000000000000000000000000000000000000000038d7ea4c680000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000063056e00436da25bcf48a40dfbbdcc70893510060000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f00000000000000000000000000000000000000000000000000000000",
"referenceId": "df98e4620b85492db64bb837b868ffd5"
}
}
With gasPriority (medium):
{
"dexId": "1300",
"amountIn": "1000000000",
"amountOutMin": "0",
"path": [
"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"0x6B175474E89094C44Da98b954EedeAC495271d0F"
],
"to": "0x6Fb447Ae94F5180254D436A693907a1f57696900",
"from": "0x6Fb447Ae94F5180254D436A693907a1f57696900",
"gas": "173376",
"gasPriority": "medium"
}
With gasPriority:
{
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0x6Fb447Ae94F5180254D436A693907a1f57696900",
"to": "0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45",
"value": "0",
"gas": "173376",
"data": "0xac9650d800000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000e4472b43f3000000000000000000000000000000000000000000000000000000003b9aca00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000006fb447ae94f5180254d436a693907a1f576969000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f00000000000000000000000000000000000000000000000000000000",
"gasPrice": "3138987601",
"referenceId": "24fcc233afc941859be790417ec652bf"
}
}
With Slippage:
{
"dexId": "1300",
"amountIn": "1000000",
"amountOutMin": "999831028599930500",
"path": [
"0xdAC17F958D2ee523a2206206994597C13D831ec7",
"0x6B175474E89094C44Da98b954EedeAC495271d0F"
],
"to": "0x22cf65ae3fa16d6379e72f4b4c2401c1b7c69731",
"deadline": "1711931771",
"from": "0x22cf65ae3fa16d6379e72f4b4c2401c1b7c69731",
"gas": "933376",
"gasPriority": "high",
"slippage": "1"
}
With Slippage:
{
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0x22cf65ae3fa16d6379e72f4b4c2401c1b7c69731",
"to": "0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45",
"value": "0",
"gas": "933376",
"data": "0xac9650d800000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000e4472b43f300000000000000000000000000000000000000000000000000000000000f42400000000000000000000000000000000000000000000000000db688f222baac80000000000000000000000000000000000000000000000000000000000000008000000000000000000000000022cf65ae3fa16d6379e72f4b4c2401c1b7c697310000000000000000000000000000000000000000000000000000000000000002000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec70000000000000000000000006b175474e89094c44da98b954eedeac495271d0f00000000000000000000000000000000000000000000000000000000",
"gasPrice": "3935430311",
"referenceId": "fbac36df401a4a9db3bd92c747e01400"
}
}
/addliquidity
Add liquidity to a specified pool in a specified DEX.
POST
https://api.expand.network/dex/addliquidity
Request Body
Name | Type | Description |
---|---|---|
dexId* | String | Refer to the DEX ID page for details. |
tokenA* | String | Address of the first token being added. |
tokenB* | String | Address of the second token being added. |
poolFees* | String | Different pool based on the fees. |
amountADesired* | String | Desired amount of token A. |
amountBDesired* | String | Desired amount of token B. |
amountAMin* | String | Minimum amount of token A. |
amountBMin* | String | Minimum amount of token B. |
deadline* | String | Deadline for the transaction to be executed (UNIX Timestamp). |
to* | String | Address of the recipient of the token. |
from* | 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. |
tokenId | String | The token ID for uniswap V3 liquidity position. |
gasPriority | String | low, medium, or high. |
slippage | String | Percentage of total value. By default, 1. 0 <= slippage value <= 10 |
{
"dexId": "1300",
"tokenA": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"tokenB": "0x6B175474E89094C44Da98b954EedeAC495271d0F",
"poolFees": "3000",
"amountADesired": "1000000000000000",
"amountBDesired": "1294471768449933344",
"amountAMin": "0",
"amountBMin": "0",
"deadline": "1666193668",
"to": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"gas": "5446762"
}
{
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"to": "0xc36442b4a4522e871399cd717abdd847ab11fe88",
"value": "0",
"gas": "5446762",
"data": "0xac9650d800000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000016488316456000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f0000000000000000000000000000000000000000000000000000000000000bb8fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffecc44fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffecd3400000000000000000000000000000000000000000000000000038d7ea4c6800000000000000000000000000000000000000000000000000011f6e3370a3ae0200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000063056e00436da25bcf48a40dfbbdcc7089351006000000000000000000000000000000000000000000000000000000006350190400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000412210e8a00000000000000000000000000000000000000000000000000000000",
"referenceId": "b1bbc5284c1c4f548c5b17e0de1a7c6c"
}
}
With gasPriority (medium):
{
"dexId": "1300",
"tokenA": "0x6B175474E89094C44Da98b954EedeAC495271d0F",
"tokenB": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"amountADesired": "1000000000000000",
"amountBDesired": "999",
"amountAMin": "0",
"amountBMin": "0",
"poolFees":"3000",
"from": "0x356dB816602c85e2075774bB77D13995c8Bab023",
"to":"0x356dB816602c85e2075774bB77D13995c8Bab023",
"deadline":"1699966737054",
"gas": "123444",
"gasPriority":"medium"
}
With gasPriority:
{
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0x356dB816602c85e2075774bB77D13995c8Bab023",
"to": "0xc36442b4a4522e871399cd717abdd847ab11fe88",
"value": "0",
"gas": "123444",
"data": "0xac9650d800000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001e00000000000000000000000000000000000000000000000000000000000000164883164560000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000000000000000000000000000000000000000000bb8fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbc83cfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbc92c00000000000000000000000000000000000000000000000000038d7ea4c6800000000000000000000000000000000000000000000000000000000000000003e700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000356db816602c85e2075774bb77d13995c8bab0230000000000000000000000000000000000000000000000000000018bcde9da9e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000412210e8a00000000000000000000000000000000000000000000000000000000",
"gasPrice": "2956685858",
"referenceId": "db26f47f7488430d850560002fa5d7e3"
}
}
With Slippage:
{
"dexId": "1300",
"tokenA": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"tokenB": "0x6B175474E89094C44Da98b954EedeAC495271d0F",
"poolFees": "3000",
"amountADesired": "1000000000000000",
"amountBDesired": "1294471768449933344",
"amountAMin": "0",
"amountBMin": "0",
"deadline": "1666193668",
"to": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"gas": "5446762",
"slippage": "5"
}
With Slippage:
{
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"to": "0xc36442b4a4522e871399cd717abdd847ab11fe88",
"value": "0",
"gas": "5446762",
"data": "0xac9650d800000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000016488316456000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f0000000000000000000000000000000000000000000000000000000000000bb8fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffecc44fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffecd3400000000000000000000000000000000000000000000000000038d7ea4c6800000000000000000000000000000000000000000000000000011f6e3370a3ae0200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000063056e00436da25bcf48a40dfbbdcc7089351006000000000000000000000000000000000000000000000000000000006350190400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000412210e8a00000000000000000000000000000000000000000000000000000000",
"referenceId": "36fbc47ce5bb490c8f088a51469670b7"
}
}
/removeliquidity
Remove liquidity from a specified pool for a specified DEX.
POST
https://api.expand.network/dex/removeliquidity
Request Body
Name | Type | Description |
---|---|---|
dexId* | String | Refer to the DEX ID page for details. |
tokenId* | String | The token ID for uniswap V3 liquidity position. |
amountAMin | String | Minimum amount of Token A. |
amountAMax | String | Maximum amount of Token A. |
amountBMax | String | Maximum amount of Token B. |
recipient | String | Recipient for sweep tokens. |
deadline* | String | Deadline for the transaction to be executed (UNIX Timestamp). |
from* | 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. |
tokenA* | String | Address of the first token being removed. |
tokenB | String | Address of the second token being removed. |
liquidity* | string | The liquidity to be removed. |
amountBMin | String | Minimum amount of Token B. |
gasPriority | String | low, medium, or high. |
slippage | String | Percentage of total value. By default, 1. 0 <= slippage value <= 10 |
{
"dexId": "1300",
"tokenId": "38177",
"tokenA":"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"liquidity": "499737032187727318211",
"amountAMin": "0",
"amountBMin": "0",
"deadline": "1763180052",
"recipient": "0x0000000000000000000000000000000000000000",
"amountAMax": "340282366920938463463374607431768211455",
"amountBMax": "340282366920938463463374607431768211455",
"tokenB": "0x6B175474E89094C44Da98b954EedeAC495271d0F",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"gas": "2421200"
}
{
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"to": "0xc36442b4a4522e871399cd717abdd847ab11fe88",
"value": "0",
"gas": "2421200",
"data": "0xac9650d80000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000002a000000000000000000000000000000000000000000000000000000000000000a40c49ccbe000000000000000000000000000000000000000000000000000000000000952100000000000000000000000000000000000000000000001b173e970df1700cc300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006917fe14000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000084fc6f78650000000000000000000000000000000000000000000000000000000000009521000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffff00000000000000000000000000000000ffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004449404b7c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000063056e00436da25bcf48a40dfbbdcc7089351006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064df2ab5bb000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000063056e00436da25bcf48a40dfbbdcc708935100600000000000000000000000000000000000000000000000000000000",
"referenceId": "2cd38bc22e64422eb930953f848b130f"
}
}
With gasPriority:
{
"dexId": "1300",
"tokenId": "609214",
"tokenA": "0x9813037ee2218799597d83D4a5B6F3b6778218d9",
"liquidity": "202694601337334530",
"chainId": "1",
"amountAMin": "0",
"amountBMin": "0",
"recipientA": "0x0000000000000000000000000000000000000000",
"amountAMax": "340282366920938463463374607431768211455",
"amountBMax": "340282366920938463463374607431768211455",
"amountMinimumA": "0",
"recipientB": "0x4C99D660A51D41bE5D47D66a3d89d5B83D92f27E",
"to": "0x4C99D660A51D41bE5D47D66a3d89d5B83D92f27E",
"deadline": "1700642704004",
"from": "0x4C99D660A51D41bE5D47D66a3d89d5B83D92f27E",
"gas": "80000",
"gasPriority":"medium"
}
With gasPriority:
{
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0x4C99D660A51D41bE5D47D66a3d89d5B83D92f27E",
"to": "0xc36442b4a4522e871399cd717abdd847ab11fe88",
"value": "0",
"gas": "80000",
"data": "0xac9650d80000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000002a000000000000000000000000000000000000000000000000000000000000000a40c49ccbe0000000000000000000000000000000000000000000000000000000000094bbe00000000000000000000000000000000000000000000000002d01daa7e99eb02000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018bf6344a84000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000084fc6f78650000000000000000000000000000000000000000000000000000000000094bbe000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffff00000000000000000000000000000000ffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004449404b7c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000004c99d660a51d41be5d47d66a3d89d5b83d92f27e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064df2ab5bb0000000000000000000000009813037ee2218799597d83d4a5b6f3b6778218d900000000000000000000000000000000000000000000000000000000000000000000000000000000000000004c99d660a51d41be5d47d66a3d89d5b83d92f27e00000000000000000000000000000000000000000000000000000000",
"gasPrice": "2933439794",
"referenceId": "fd5e656707bc4417a26e5fe154f40b92"
}
}
With slippage:
{
"dexId": "1300",
"tokenId": "38177",
"tokenA": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"liquidity": "499737032187727318211",
"amountAMin": "10000000",
"amountBMin": "10000000",
"deadline": "1763180052",
"recipient": "0x0000000000000000000000000000000000000000",
"amountAMax": "340282366920938463463374607431768211455",
"amountBMax": "340282366920938463463374607431768211455",
"tokenB": "0x6B175474E89094C44Da98b954EedeAC495271d0F",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"gas": "2421200",
"slippage": "9.50"
}
With slippage:
{
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"to": "0xc36442b4a4522e871399cd717abdd847ab11fe88",
"value": "0",
"gas": "2421200",
"data": "0xac9650d80000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000002a000000000000000000000000000000000000000000000000000000000000000a40c49ccbe000000000000000000000000000000000000000000000000000000000000952100000000000000000000000000000000000000000000001b173e970df1700cc300000000000000000000000000000000000000000000000000000000008a179000000000000000000000000000000000000000000000000000000000008a1790000000000000000000000000000000000000000000000000000000006917fe14000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000084fc6f78650000000000000000000000000000000000000000000000000000000000009521000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffff00000000000000000000000000000000ffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004449404b7c00000000000000000000000000000000000000000000000000000000008a179000000000000000000000000063056e00436da25bcf48a40dfbbdcc7089351006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064df2ab5bb000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000008a179000000000000000000000000063056e00436da25bcf48a40dfbbdcc708935100600000000000000000000000000000000000000000000000000000000",
"referenceId": "ce34c9f2388049c6b2038baf56b88c38"
}
}
Last updated