Sushiswap V2
/getprice
Returns the swap quotation for the given token pair.
GET
https://api.expand.network/dex/getprice
Query Parameters
rpc
String
Remote procedural call URL.
dexId*
String
path*
String
Comma separated values of token addresses whose price is to be fetched.
amountIn*
String
Amount of token.
https://api.expand.network/dex/getprice?dexId=1100&path=0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,0xdac17f958d2ee523a2206206994597c13d831ec7&amountIn=10000000000000000000
{
"status": 200,
"msg": "success",
"data": {
"amountIn": "10000000000000000000",
"path": [
"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"0xdac17f958d2ee523a2206206994597c13d831ec7"
],
"amountsOut": [
"10000000000000000000",
"15636200031"
]
}
}
/getuserliquidity
Returns the balance of a particular token pair of an account.
GET
https://api.expand.network/dex/getuserliquidity
Query Parameters
rpc
String
Remote procedural call URL.
tokenA*
String
Address of token.
address*
String
Public address of liquidity provider.
dexId*
String
tokenB*
String
Address of token
https://api.expand.network/dex/getuserliquidity?tokenA=0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2&tokenB=0x6b175474e89094c44da98b954eedeac495271d0f&address=0x6fb447ae94f5180254d436a693907a1f57696900&dexId=1100
{
"status": 200,
"msg": "success",
"data": {
"pairAddress": "0xC3D03e4F041Fd4cD388c549Ee2A29a9E5075882f",
"liquidity": "300000",
"tokenA": "11174.919080331369",
"tokenB": "18717989.629328925"
}
}
/getpoolliquidity
Returns the total liquidity for a specified pool.
GET
https://api.expand.network/dex/getpoolliquidity
Query Parameters
rpc
String
Remote procedural call URL.
poolAddress*
String
Pool address whose liquidity is to be fetched.
dexId*
String
https://api.expand.network/dex/getpoolliquidity?dexId=1100&poolAddress=0x6D37Eb2364f8BB28002BD404cF301fA8106DCb14
{
"status": 200,
"msg": "success",
"data": {
"totalLiquidity": "5564898"
}
}
/gettokenliquidity
Returns the individual token liquidity within the specified liquidity pool.
GET
https://api.expand.network/dex/gettokenliquidity
Query Parameters
rpc
String
Remote procedural call URL.
poolAddress*
String
The pool address.
dexId*
String
https://api.expand.network/dex/gettokenliquidity?dexId=1100&poolAddress=0xF1F85b2C54a2bD284B1cf4141D64fD171Bd85539
{
"status": 200,
"msg": "success",
"data": {
"sUSD": "139894774899120916276977",
"WETH": "75232870761760613666"
}
}
/getliquidityholders
Returns the total number of liquidity holders in the specified pool.
GET
https://api.expand.network/dex/getliquidityholders
Query Parameters
rpc
String
Remote procedural call URL.
poolAddress*
String
The pool address.
dexId*
String
https://api.expand.network/dex/getliquidityholders?dexId=1100&poolAddress=0xc40d16476380e4037e6b1a2594caf6a6cc8da967
{
"status": 200,
"msg": "success",
"data": {
"totalTokenHolders": "265"
}
}
/getindividualposition
Returns the liquidity position for a specified user address across all the pools for the DEX.
GET
https://api.expand.network/dex/getindividualposition
Query Parameters
rpc
String
Remote procedural call URL.
address*
String
The public address of the liquidity holder.
dexId*
String
poolSize
String
The number of pools for which the user intends to fetch the individual position. By default: 50, Maximum: 9,950
poolAddresses
String
The pool Addresses whose liquidity is to be fetched. (Comma-separated vaules)
https://api.expand.network/dex/getindividualposition?poolAddresses=0x6D37Eb2364f8BB28002BD404cF301fA8106DCb14,0x055CEDfe14BCE33F985C41d9A1934B7654611AAC&address=0x11f4941c1E66d4a8B6DdbF5DCb1C356672B23779&dexId=1100
{
"status": 200,
"msg": "success",
"data": {
"aggregatedLiquidity": "2000200",
"poolAddresses": {
"NYANUSDT": {
"0x6D37Eb2364f8BB28002BD404cF301fA8106DCb14": "1000100"
},
"DAIUSDT": {
"0x055CEDfe14BCE33F985C41d9A1934B7654611AAC": "1000100"
}
}
}
}
/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
rpc
String
Remote procedural call URL.
poolAddress*
String
The pool address.
dexId*
String
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=92&endPage=93&dexId=1100&poolAddress=0xceff51756c56ceffca006cd410b03ffc46dd3a58
{
"status": 200,
"msg": "success",
"data": {
"totalPages": "93",
"currentPages": "92-93",
"users": [
{
"userAddress": "0xae92670605420bab25c4eebde7d1b6b9ad073eb1",
"liquidityData": [
{
"blockNumber": "11272393",
"assets": {
"WBTC": "339000000",
"WETH": "121741426192567844945"
}
}
]
},
{
"userAddress": "0x13d90032427d7db319713a07a801c083f6df6b28",
"liquidityData": [
{
"blockNumber": "11272379",
"assets": {
"WBTC": "1361262029",
"WETH": "488855400685099260561"
}
}
]
},
{
"userAddress": "0xc37e20177f8649e498dd67ccab3069da11a4b381",
"liquidityData": [
{
"blockNumber": "11272373",
"assets": {
"WBTC": "3222002344",
"WETH": "1157083069481877851896"
}
}
]
},
{
"userAddress": "0x8d97ab42cdc04b0a8f0c08dd6baeaf93ad2ade9e",
"liquidityData": [
{
"blockNumber": "11272367",
"assets": {
"WBTC": "7184517",
"WETH": "2580098366031707833"
}
}
]
},
{
"userAddress": "0x6883a2367ab4102252fadc40ade1fdcd0f40417a",
"liquidityData": [
{
"blockNumber": "11272363",
"assets": {
"WBTC": "243735317",
"WETH": "87530044557751111303"
}
}
]
},
{
"userAddress": "0xb7a7e0baa978c8ba5cac0150e4cc4a86e4299136",
"liquidityData": [
{
"blockNumber": "11272354",
"assets": {
"WBTC": "3001637850",
"WETH": "1077945937382280330621"
}
}
]
}
]
}
}
/gethistoricaltimeseries
Get the historical time series transactions for a specific pool address.
GET
https://historicaltrade.api.expand.network/dex/gethistoricaltimeseries
Query Parameters
dexId*
String
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=1100&poolAddress=0xceff51756c56ceffca006cd410b03ffc46dd3a58
{
"status": 200,
"msg": "success",
"data": {
"pair": "WBTC/WETH",
"priceData": [
{
"hash": "0xab976730855f2319b3713478799f7aad6027419eba6f3788256b354ed0432381",
"timestamp": 1703757971,
"price": "17.99472597437422"
},
{
"hash": "0x37d7a68ba4e4c9cd2e254108f40a7823e8eb9821ff5d6d3745801c6513732b78",
"timestamp": 1703755007,
"price": "18.010292734804654"
},
{
"hash": "0xb5fcf54cba69bff0185ceda061d7308d56ec471a4113f4f4e1f2ee04e28523e1",
"timestamp": 1703753111,
"price": "18.025965450635685"
},
{
"hash": "0x06b4e398e852f6cbd4e08450703f757d75c0d685d1038380c79cd04fe27bb836",
"timestamp": 1703752775,
"price": "18.02635771905701"
},
{
"hash": "0x5421f0b31d5e7538307b2971eeb98df755ced06d650174050d8fd29429a9eb80",
"timestamp": 1703747675,
"price": "18.132953404785805"
},
{
"hash": "0xf05259997b701905248694f0d4cc3e45194819e7bc9bb16d706e25618dfcea90",
"timestamp": 1703747579,
"price": "18.128817077523507"
},
{
"hash": "0xc067a858610595cf81a8c076f98931e998c324c1be6cc1c4df43691d93e067e5",
"timestamp": 1703741147,
"price": "18.11268829405827"
},
{
"hash": "0xee1a68eef523811d1e865b2dfed610666c45982a6b0c30231488f41b033353b2",
"timestamp": 1703740199,
"price": "18.076013983785323"
}
]
}
}
/gethistoricaltransactions
Get the historical transactions focusing on swaps associated with a specific pool address.
GET
https://historicaltrade.api.expand.network/dex/gethistoricaltransactions
Query Parameters
dexId*
String
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=0xceff51756c56ceffca006cd410b03ffc46dd3a58&dexId=1100&startBlock=18362942&endBlock=18410586
{
"status": 200,
"msg": "success",
"data": {
"pair": "WBTC/WETH",
"transactions": [
{
"transactionHash": "0xf342f2a9172d0ff6cb2780e6bec703c695f80af9c83896ab4d3fa8f3c6b24846",
"transactionDetails": {
"blockHash": "0x439cac3b235fb723f9b19bf8677797d7d7730c17bdad154c5522bece9228b9d6",
"blockNumber": "18367972",
"from": "0x4afa1538c508eab5f8d1938d7e801d670c7a7426",
"gas": "237646",
"gasPrice": "5402052229",
"maxFeePerGas": "6986758062",
"maxPriorityFeePerGas": "100000000",
"hash": "0xf342f2a9172d0ff6cb2780e6bec703c695f80af9c83896ab4d3fa8f3c6b24846",
"input": "0xf305d7190000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c599000000000000000000000000000000000000000000000000000000000000af0c000000000000000000000000000000000000000000000000000000000000ae2b000000000000000000000000000000000000000000000000001c31dc6fed3f820000000000000000000000004afa1538c508eab5f8d1938d7e801d670c7a742600000000000000000000000000000000000000000000000000000000652e209f",
"nonce": "30",
"to": "0xd9e1ce17f2641f24ae83637ab66a2cca9c378b9f",
"transactionIndex": "24",
"value": "7976002199280179",
"type": "2",
"accessList": [],
"chainId": "1",
"v": "0x1",
"r": "0x62ffb17102444747e17a643b2095ac2ed6a54d4e143f864ef913113dff9182d4",
"s": "0x437b394117a9bd7785207c4ee919b7c12b7835a6ed2360e59c32910b845541f0",
"yParity": "0x1"
}
},
{
"transactionHash": "0xc16778ad434c386310484b7b22fa173a550ff1c775016a0844d77fede3c55568",
"transactionDetails": {
"blockHash": "0x126cb4d2807e3c6eec7c7a46ea034398310a86579082cbac3a81dd507fc4202f",
"blockNumber": "18367796",
"from": "0xb740b2f676f627d4077e9782cdb8dc30dbba6bd3",
"gas": "244750",
"gasPrice": "5649439124",
"maxFeePerGas": "6933668525",
"maxPriorityFeePerGas": "100000000",
"hash": "0xc16778ad434c386310484b7b22fa173a550ff1c775016a0844d77fede3c55568",
"input": "0xf305d7190000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c599000000000000000000000000000000000000000000000000000000000000999f00000000000000000000000000000000000000000000000000000000000098da0000000000000000000000000000000000000000000000000018bea16edc5000000000000000000000000000b740b2f676f627d4077e9782cdb8dc30dbba6bd300000000000000000000000000000000000000000000000000000000652e1853",
"nonce": "98",
"to": "0xd9e1ce17f2641f24ae83637ab66a2cca9c378b9f",
"transactionIndex": "63",
"value": "7000000000000000",
"type": "2",
"accessList": [],
"chainId": "1",
"v": "0x0",
"r": "0x17ce9fb061e9742d64a9a92c8ec079cceda278e604d31ed6ff93aba7b6c5b5de",
"s": "0x1b917196a5ccf3adf330449ff7b13b0a2012c930d8bc235cf4b3f6f8317fabd3",
"yParity": "0x0"
}
},
{
"transactionHash": "0xce505972535cc4f0515bda119b6ab6046bd379adf91244ab9e3a59e7a93dcf79",
"transactionDetails": {
"blockHash": "0x07bd0530ec08967108dcb66f90e9d04664ce2c5dced79bc25cf4aa8592c3533f",
"blockNumber": "18410586",
"from": "0x77fbb383f424f98e744cde82a3b41f23dc1fd82e",
"gas": "244736",
"gasPrice": "9730712401",
"maxFeePerGas": "13360787154",
"maxPriorityFeePerGas": "100000000",
"hash": "0xce505972535cc4f0515bda119b6ab6046bd379adf91244ab9e3a59e7a93dcf79",
"input": "0xf305d7190000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c5990000000000000000000000000000000000000000000000000000000000000227000000000000000000000000000000000000000000000000000000000000022400000000000000000000000000000000000000000000000000005a7ea627b80000000000000000000000000077fbb383f424f98e744cde82a3b41f23dc1fd82e000000000000000000000000000000000000000000000000000000006535fca3",
"nonce": "255",
"to": "0xd9e1ce17f2641f24ae83637ab66a2cca9c378b9f",
"transactionIndex": "60",
"value": "100000000000000",
"type": "2",
"accessList": [],
"chainId": "1",
"v": "0x0",
"r": "0xf9433f60fd0fbb68b860b4ae0c284a01c93e4ccbba1630fb21b8c5d8d14cf5",
"s": "0x5affb309911b6b233464dcda5df91d32362df4683be260feca213ac2cebe028e",
"yParity": "0x0"
}
},
{
"transactionHash": "0x07019df8bb77252185c4da28f0617e80e199dfb73f398636428bf1f46214b584",
"transactionDetails": {
"blockHash": "0x671426264e8f183794328b9ceafc22ae779e5935afc0c4e7d15833112874650f",
"blockNumber": "18389121",
"from": "0x0f8af7f0c71fab3d66a31243baed580cee6c0e0a",
"gas": "237646",
"gasPrice": "7083602166",
"maxFeePerGas": "9248000000",
"maxPriorityFeePerGas": "500000000",
"hash": "0x07019df8bb77252185c4da28f0617e80e199dfb73f398636428bf1f46214b584",
"input": "0xf305d7190000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c599000000000000000000000000000000000000000000000000000000000000d385000000000000000000000000000000000000000000000000000000000000d27600000000000000000000000000000000000000000000000000233e39715c3f920000000000000000000000000f8af7f0c71fab3d66a31243baed580cee6c0e0a0000000000000000000000000000000000000000000000000000000065320757",
"nonce": "2",
"to": "0xd9e1ce17f2641f24ae83637ab66a2cca9c378b9f",
"transactionIndex": "33",
"value": "9969890071157728",
"type": "2",
"accessList": [],
"chainId": "1",
"v": "0x0",
"r": "0x431d67d2054ad4d1d00fb7788243b3f4ef0a351ee1e85124fddc5281314460c8",
"s": "0x67621f85bfb728c192be3510624b90edb43a08e7f72033f4bf2a900ab81cb266",
"yParity": "0x0"
}
},
{
"transactionHash": "0xd869e9fa6ebea0d1173f97e0080552fe436a8fd02b28e3c55c6b543a1345f23c",
"transactionDetails": {
"blockHash": "0x39966efee2e0877488907cea7b1856ad895ccba5427b65e081f1032bb5fe6ed0",
"blockNumber": "18362942",
"from": "0x8ef2c6f23477e31e983102310d9913c2dc69bbfe",
"gas": "237632",
"gasPrice": "8819484734",
"maxFeePerGas": "12054334407",
"maxPriorityFeePerGas": "100000000",
"hash": "0xd869e9fa6ebea0d1173f97e0080552fe436a8fd02b28e3c55c6b543a1345f23c",
"input": "0xf305d7190000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c5990000000000000000000000000000000000000000000000000000000000000190000000000000000000000000000000000000000000000000000000000000018e00000000000000000000000000000000000000000000000000003f774d48506b0000000000000000000000008ef2c6f23477e31e983102310d9913c2dc69bbfe00000000000000000000000000000000000000000000000000000000652d3387",
"nonce": "3",
"to": "0xd9e1ce17f2641f24ae83637ab66a2cca9c378b9f",
"transactionIndex": "135",
"value": "70132291701431",
"type": "2",
"accessList": [],
"chainId": "1",
"v": "0x1",
"r": "0x21d92d1da0f6178b459ca4078e30dc307295cb70f33a4bad126a4dfbf42ccf30",
"s": "0x6e33388b5e67f35e1d2a5bfd8a09dfa107b52a95a167deca80af1e191366f70f",
"yParity": "0x1"
}
}
]
}
}
/gethistoricalpoolchartdata
Get the data for the OHCLV (Open, High, Close, Low, and Volume) prices within the specified time interval.Available on Ethereum only.
GET
https://api.expand.network/dex/gethistoricalpoolchartdata
Query Parameters
dexId*
String
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.
ttps://api.expand.network/dex/gethistoricalpoolchartdata?dexId=1100&poolAddress=0x397ff1542f962076d0bfe58ea045ffa2d347aca0&interval=15m&limit=100
{
"status": 200,
"msg": "success",
"data": {
"pair": "USDC/WETH",
"chartData": [
{
"1719839525-1719840425": {
"open": "0.000287598880247",
"high": "0.000289309123422",
"low": "0.000287557877406",
"close": "0.000287557877406",
"volume": "1027.1819361597381"
}
},
{
"1719840425-1719841325": {
"open": "0.000287557877406",
"high": "0.000289324624582",
"low": "0.000287557877406",
"close": "0.000287585983414",
"volume": "1001.9939752719862"
}
},
{
"1719841325-1719842225": {
"open": "0.000287585983414",
"high": "0.000289805920275",
"low": "0.000287546358296",
"close": "0.000289805920275",
"volume": "6960.289191899625"
}
},
{
"1719842225-1719843125": {
"open": "0.000289805920275",
"high": "0.00028989162172",
"low": "0.00028811240044",
"close": "0.000288154146398",
"volume": "519.6836693731427"
}
},
{
"1719843125-1719844025": {
"open": "0.000288154146398",
"high": "0.000289968242419",
"low": "0.000288154146398",
"close": "0.000289968242419",
"volume": "1113.7817151803324"
}
},
{
"1719844025-1719844925": {
"open": "0.000289968242419",
"high": "0.000290076313289",
"low": "0.000288368677537",
"close": "0.000288368677537",
"volume": "1403.5120462360546"
}
},
{
"1719844925-1719845825": {
"open": "0.000288368677537",
"high": "0.000291331966243",
"low": "0.000288360816751",
"close": "0.000288789380365",
"volume": "47760.5994932878"
}
},
{
"1719845825-1719846725": {
"open": "0.000288789380365",
"high": "0.00028975653286",
"low": "0.000288050874163",
"close": "0.000289756532860",
"volume": "8279.300068131965"
}
},
{
"1719846725-1719847625": {
"open": "0.000289756532860",
"high": "0.00028975653286",
"low": "0.000287954958445",
"close": "0.000287954958445",
"volume": "948.6194163717478"
}
},
{
"1719847625-1719848525": {
"open": "0.000287954958445",
"high": "0.000290232560854",
"low": "0.000287954958445",
"close": "0.000288222910533",
"volume": "21176.670400915005"
}
},
{
"1719848525-1719849425": {
"open": "0.000288222910533",
"high": "0.00029012825849",
"low": "0.000287974254908",
"close": "0.000287974254908",
"volume": "8527.666757678933"
}
},
{
"1719849425-1719850325": {
"open": "0.000287974254908",
"high": "0.000287974254908",
"low": "0.000287679388086",
"close": "0.000287679388086",
"volume": "3259.031288552816"
}
},
{
"1719850325-1719851225": {
"open": "0.000287679388086",
"high": "0.000289284148356",
"low": "0.000287542290989",
"close": "0.000287561761147",
"volume": "1759.2689722080934"
}
},
{
"1719851225-1719852125": {
"open": "0.000287561761147",
"high": "0.000289308277967",
"low": "0.000287561761147",
"close": "0.000289301900287",
"volume": "610.1357467633167"
}
},
{
"1719852125-1719853025": {
"open": "0.000289301900287",
"high": "0.00028930578609",
"low": "0.000287510087393",
"close": "0.000289305786090",
"volume": "2385.3888815497207"
}
},
{
"1719853025-1719853925": {
"open": "0.000289305786090",
"high": "0.000289391196778",
"low": "0.000287572141335",
"close": "0.000289363001108",
"volume": "2981.0885259994343"
}
},
{
"1719853925-1719854825": {
"open": "0.000289363001108",
"high": "0.00028943423385",
"low": "0.000286674517332",
"close": "0.000287257850184",
"volume": "52653.19345281209"
}
},
{
"1719854825-1719855725": {
"open": "0.000287257850184",
"high": "0.000289025694384",
"low": "0.000287248680546",
"close": "0.000289012873956",
"volume": "2506.8882774079816"
}
},
{
"1719855725-1719856625": {
"open": "0.000289012873956",
"high": "0.000289012873956",
"low": "0.000287035050152",
"close": "0.000287035050152",
"volume": "2821.397659016621"
}
},
{
"1719856625-1719857525": {
"open": "0.000287035050152",
"high": "0.00028865850345",
"low": "0.000286314048913",
"close": "0.000287966580865",
"volume": "9343.851934998249"
}
},
{
"1719857525-1719858425": {
"open": "0.000287966580865",
"high": "0.000287966580865",
"low": "0.000286124525006",
"close": "0.000287804072197",
"volume": "1873.912812884589"
}
},
{
"1719858425-1719859325": {
"open": "0.000287804072197",
"high": "0.000288401572502",
"low": "0.000286194431736",
"close": "0.000288401572502",
"volume": "6979.135194857767"
}
},
{
"1719859325-1719860225": {
"open": "0.000288401572502",
"high": "0.000289202100206",
"low": "0.000286747344182",
"close": "0.000287521206801",
"volume": "22793.86777609406"
}
},
{
"1719860225-1719861125": {
"open": "0.000287521206801",
"high": "0.000287521206801",
"low": "0.000287151913443",
"close": "0.000287151913443",
"volume": "4024.4149558901463"
}
},
{
"1719861125-1719862025": {
"open": "0.000287151913443",
"high": "0.000287151913443",
"low": "0.000286988694487",
"close": "0.000286988694487",
"volume": "1885.0398560753133"
}
},
{
"1719862025-1719862925": {
"open": "0.000286988694487",
"high": "0.000288357659496",
"low": "0.000286676385957",
"close": "0.000288357659496",
"volume": "3758.3820505655603"
}
},
{
"1719862925-1719863825": {
"open": "0.000288357659496",
"high": "0.000288558981512",
"low": "0.000285995381629",
"close": "0.000288558981512",
"volume": "34498.87129343647"
}
},
{
"1719863825-1719864725": {
"open": "0.000288558981512",
"high": "0.000288828205237",
"low": "0.000288558981512",
"close": "0.000288828205237",
"volume": "4360.648802712191"
}
},
{
"1719864725-1719865625": {
"open": "0.000288828205237",
"high": "0.000288828205237",
"low": "0.000287147405991",
"close": "0.000287147405991",
"volume": "1043.6508049448505"
}
},
{
"1719865625-1719866525": {
"open": "0.000287147405991",
"high": "0.000288868777479",
"low": "0.000286997013587",
"close": "0.000288868777479",
"volume": "5348.6521375324855"
}
},
{
"1719866525-1719867425": {
"open": "0.000288868777479",
"high": "0.000289026446602",
"low": "0.000287218408634",
"close": "0.000289026446602",
"volume": "2311.403568087065"
}
},
{
"1719867425-1719868325": {
"open": "0.000289026446602",
"high": "0.000289169101766",
"low": "0.000287380909857",
"close": "0.000289169101766",
"volume": "844.703062918265"
}
},
{
"1719868325-1719869225": {
"open": "0.000289169101766",
"high": "0.000289223632237",
"low": "0.000289169101766",
"close": "0.000289209604345",
"volume": "482.94896668972126"
}
},
{
"1719869225-1719870125": {
"open": "0.000289209604345",
"high": "0.000289609243967",
"low": "0.000289209604345",
"close": "0.000289609243967",
"volume": "4236.808226248433"
}
},
{
"1719870125-1719871025": {
"open": "0.000289609243967",
"high": "0.000289791355127",
"low": "0.000289609243967",
"close": "0.000289791355127",
"volume": "2525.9751100725907"
}
},
{
"1719871025-1719871925": {
"open": "0.000289791355127",
"high": "0.000289872245971",
"low": "0.000289791355127",
"close": "0.000289872245971",
"volume": "320.97828394972163"
}
},
{
"1719871925-1719872825": {
"open": "0.000289872245971",
"high": "0.000291315116452",
"low": "0.000288154030375",
"close": "0.000291315116452",
"volume": "23174.84266492404"
}
},
{
"1719872825-1719873725": {
"open": "0.000291315116452",
"high": "0.000292170168522",
"low": "0.000290384953778",
"close": "0.000292170168522",
"volume": "1945.2617257151019"
}
},
{
"1719873725-1719874625": {
"open": "0.000292170168522",
"high": "0.000292275592652",
"low": "0.00029044712837",
"close": "0.000290574083943",
"volume": "2228.5083774294926"
}
},
{
"1719874625-1719875525": {
"open": "0.000290574083943",
"high": "0.000291779193284",
"low": "0.000290126811405",
"close": "0.000291779193284",
"volume": "5890.6434956605635"
}
},
{
"1719875525-1719876425": {
"open": "0.000291779193284",
"high": "0.000291981823687",
"low": "0.000290217041121",
"close": "0.000290217041121",
"volume": "2283.8560818349456"
}
},
{
"1719876425-1719877325": {
"open": "0.000290217041121",
"high": "0.000290217041121",
"low": "0.000290204440955",
"close": "0.000290204440955",
"volume": "152.0740053078659"
}
},
{
"1719877325-1719878225": {
"open": "0.000290204440955",
"high": "0.000291959345742",
"low": "0.00029015645604",
"close": "0.000291907503784",
"volume": "877.3322083665441"
}
},
{
"1719878225-1719879125": {
"open": "0.000291907503784",
"high": "0.000291915478661",
"low": "0.000290132709286",
"close": "0.000291895134846",
"volume": "720.3307724280576"
}
},
{
"1719879125-1719880025": {
"open": "0.000291895134846",
"high": "0.000291905796085",
"low": "0.000290146511783",
"close": "0.000291905796085",
"volume": "182.14599376270846"
}
},
{
"1719880025-1719880925": {
"open": "0.000291905796085",
"high": "0.000292043410106",
"low": "0.000290271577485",
"close": "0.000290271577485",
"volume": "1851.6009464122997"
}
},
{
"1719880925-1719881825": {
"open": "0.000290271577485",
"high": "0.000292224290512",
"low": "0.000290269647936",
"close": "0.000290472096619",
"volume": "6379.436328978674"
}
},
{
"1719881825-1719882725": {
"open": "0.000290472096619",
"high": "0.000292225847606",
"low": "0.000290362980245",
"close": "0.000290362980245",
"volume": "1816.9198467906708"
}
},
{
"1719882725-1719883625": {
"open": "0.000290362980245",
"high": "0.000291947372746",
"low": "0.000290194716125",
"close": "0.000291947372746",
"volume": "1917.160759909098"
}
},
{
"1719883625-1719884525": {
"open": "0.000291947372746",
"high": "0.000291947372746",
"low": "0.000290181399646",
"close": "0.000290181399646",
"volume": "167.58762872089105"
}
},
{
"1719884525-1719885425": {
"open": "0.000290181399646",
"high": "0.000291927264653",
"low": "0.000290115285408",
"close": "0.000290115285408",
"volume": "851.5825514807977"
}
},
{
"1719885425-1719886325": {
"open": "0.000290115285408",
"high": "0.00029186392344",
"low": "0.000289995372138",
"close": "0.000289995372138",
"volume": "1608.9022713911354"
}
},
{
"1719886325-1719887225": {
"open": "0.000289995372138",
"high": "0.000289995372138",
"low": "0.000289620793086",
"close": "0.000289620793086",
"volume": "3877.0254246503273"
}
},
{
"1719887225-1719888125": {
"open": "0.000289620793086",
"high": "0.000291253799886",
"low": "0.000289542776226",
"close": "0.000291253799886",
"volume": "1217.71178770564"
}
},
{
"1719888125-1719889025": {
"open": "0.000291253799886",
"high": "0.000291253799886",
"low": "0.000289381182869",
"close": "0.000289381182869",
"volume": "1373.104344494171"
}
},
{
"1719889025-1719889925": {
"open": "0.000289381182869",
"high": "0.000291125264651",
"low": "0.000289370463642",
"close": "0.000291104450587",
"volume": "239.34395498751215"
}
},
{
"1719889925-1719890825": {
"open": "0.000291104450587",
"high": "0.000291104450587",
"low": "0.000289337245422",
"close": "0.000289337245422",
"volume": "498.1656741908371"
}
},
{
"1719890825-1719891725": {
"open": "0.000289337245422",
"high": "0.000289337245422",
"low": "0.000289263654983",
"close": "0.000289263654983",
"volume": "1002.6548365608711"
}
},
{
"1719891725-1719892625": {
"open": "0.000289263654983",
"high": "0.000289263654983",
"low": "0.000288985639204",
"close": "0.000288985639204",
"volume": "2916.175806722943"
}
},
{
"1719892625-1719893525": {
"open": "0.000288985639204",
"high": "0.000290714221466",
"low": "0.000288971080795",
"close": "0.000288971080795",
"volume": "134.8419481568912"
}
},
{
"1719893525-1719894425": {
"open": "0.000288971080795",
"high": "0.000290707012536",
"low": "0.000288566992789",
"close": "0.000290295547957",
"volume": "4487.036199868698"
}
},
{
"1719894425-1719895325": {
"open": "0.000290295547957",
"high": "0.000290310038008",
"low": "0.000288545235559",
"close": "0.000290279631296",
"volume": "1088.974890506496"
}
},
{
"1719895325-1719896225": {
"open": "0.000290279631296",
"high": "0.000290314783964",
"low": "0.000290279631296",
"close": "0.000290314783964",
"volume": "282.54991485269693"
}
},
{
"1719896225-1719897125": {
"open": "0.000290314783964",
"high": "0.000290316899539",
"low": "0.000288551684018",
"close": "0.000290316899539",
"volume": "1193.7943568591313"
}
},
{
"1719897125-1719898025": {
"open": "0.000290316899539",
"high": "0.000290316899539",
"low": "0.000288605900599",
"close": "0.000288605900599",
"volume": "199.98646975060538"
}
},
{
"1719898025-1719898925": {
"open": "0.000288605900599",
"high": "0.000288605900599",
"low": "0.000288527134548",
"close": "0.000288527134548",
"volume": "849.2266498712623"
}
},
{
"1719898925-1719899825": {
"open": "0.000288527134548",
"high": "0.000290338288572",
"low": "0.000288522000675",
"close": "0.000288672084866",
"volume": "1968.6997179984214"
}
},
{
"1719899825-1719900725": {
"open": "0.000288672084866",
"high": "0.000288672084866",
"low": "0.00028861940132",
"close": "0.000288619401320",
"volume": "552.2167173229773"
}
},
{
"1719900725-1719901625": {
"open": "0.000288619401320",
"high": "0.00028861940132",
"low": "0.000288600881562",
"close": "0.000288600881562",
"volume": "161.28909185359262"
}
},
{
"1719901625-1719902525": {
"open": "0.000288600881562",
"high": "0.00029054423902",
"low": "0.000288582018988",
"close": "0.000289042892691",
"volume": "5592.36795573799"
}
},
{
"1719902525-1719903425": {
"open": "0.000289042892691",
"high": "0.000289042892691",
"low": "0.000289040431335",
"close": "0.000289040986582",
"volume": "11.940580150211211"
}
},
{
"1719903425-1719904325": {
"open": "0.000289040986582",
"high": "0.000290930821084",
"low": "0.000289039522584",
"close": "0.000290930821084",
"volume": "3175.5893378867427"
}
},
{
"1719904325-1719905225": {
"open": "0.000290930821084",
"high": "0.000291168519785",
"low": "0.000289328388588",
"close": "0.000289410596509",
"volume": "1511.265118113191"
}
},
{
"1719905225-1719906125": {
"open": "0.000289410596509",
"high": "0.000291356402792",
"low": "0.000289410596509",
"close": "0.000289751532746",
"volume": "4215.174059925783"
}
},
{
"1719906125-1719907025": {
"open": "0.000289751532746",
"high": "0.00029159152128",
"low": "0.000289751532746",
"close": "0.000289831374769",
"volume": "1326.4138403786988"
}
},
{
"1719907025-1719907925": {
"open": "0.000289831374769",
"high": "0.000291586433825",
"low": "0.000289827821888",
"close": "0.000291576127108",
"volume": "334.9587180919302"
}
},
{
"1719907925-1719908825": {
"open": "0.000291576127108",
"high": "0.000292064859992",
"low": "0.000289846815175",
"close": "0.000292064859992",
"volume": "9303.777730251591"
}
},
{
"1719908825-1719909725": {
"open": "0.000292064859992",
"high": "0.00029234704332",
"low": "0.000290536286061",
"close": "0.000290536286061",
"volume": "1792.7813129030706"
}
},
{
"1719909725-1719910625": {
"open": "0.000290536286061",
"high": "0.000290536286061",
"low": "0.000290330597376",
"close": "0.000290330597376",
"volume": "2323.3367937348507"
}
},
{
"1719910625-1719911525": {
"open": "0.000290330597376",
"high": "0.000292319754309",
"low": "0.00029022045856",
"close": "0.000290242937727",
"volume": "16849.641352630624"
}
},
{
"1719911525-1719912425": {
"open": "0.000290242937727",
"high": "0.000291662154859",
"low": "0.000290002797452",
"close": "0.000291662154859",
"volume": "3383.4513928081437"
}
},
{
"1719912425-1719913325": {
"open": "0.000291662154859",
"high": "0.000291696131615",
"low": "0.000289951374976",
"close": "0.000291692455994",
"volume": "749.2821836964731"
}
},
{
"1719913325-1719914225": {
"open": "0.000291692455994",
"high": "0.000291705365879",
"low": "0.000291692455994",
"close": "0.000291705365879",
"volume": "109.49786083200205"
}
},
{
"1719914225-1719915125": {
"open": "0.000291705365879",
"high": "0.000291729504931",
"low": "0.00028997937622",
"close": "0.000291729504931",
"volume": "349.75646193837736"
}
},
{
"1719915125-1719916025": {
"open": "0.000291729504931",
"high": "0.000291752638554",
"low": "0.000291729504931",
"close": "0.000291752638554",
"volume": "249.6692444215477"
}
},
{
"1719916025-1719916925": {
"open": "0.000291752638554",
"high": "0.000291758717758",
"low": "0.000289975773859",
"close": "0.000289975773859",
"volume": "572.3345892317767"
}
},
{
"1719916925-1719917825": {
"open": "0.000289975773859",
"high": "0.000289975773859",
"low": "0.000289937765506",
"close": "0.000289937765506",
"volume": "494.1086296735268"
}
},
{
"1719917825-1719918725": {
"open": "0.000289937765506",
"high": "0.000289937765506",
"low": "0.000289824884848",
"close": "0.000289824884848",
"volume": "1072.1311860811975"
}
},
{
"1719918725-1719919625": {
"open": "0.000289824884848",
"high": "0.000291565930638",
"low": "0.000289818990731",
"close": "0.000289818990731",
"volume": "9.315606744949854"
}
},
{
"1719919625-1719920525": {
"open": "0.000289818990731",
"high": "0.000291931424612",
"low": "0.000289737730691",
"close": "0.000289956189748",
"volume": "17560.999591102853"
}
},
{
"1719920525-1719921425": {
"open": "0.000289956189748",
"high": "0.00029141283902",
"low": "0.000289712717562",
"close": "0.000291412839020",
"volume": "6140.69316634406"
}
},
{
"1719921425-1719922325": {
"open": "0.000291412839020",
"high": "0.000291439199535",
"low": "0.00029141283902",
"close": "0.000291439199535",
"volume": "581.8165287233476"
}
},
{
"1719922325-1719923225": {
"open": "0.000291439199535",
"high": "0.000291439199535",
"low": "0.000289503202191",
"close": "0.000291114696221",
"volume": "8346.122060235028"
}
},
{
"1719923225-1719924125": {
"open": "0.000291114696221",
"high": "0.000291166216787",
"low": "0.000291114696221",
"close": "0.000291166216787",
"volume": "1590.8560113257302"
}
},
{
"1719924125-1719925025": {
"open": "0.000291166216787",
"high": "0.000291222833555",
"low": "0.000289448500469",
"close": "0.000291222833555",
"volume": "751.944652564948"
}
},
{
"1719925025-1719925925": {
"open": "0.000291222833555",
"high": "0.000291222833555",
"low": "0.000289334701672",
"close": "0.000289334701672",
"volume": "3350.9988574111662"
}
},
{
"1719925925-1719926825": {
"open": "0.000289334701672",
"high": "0.000290918116523",
"low": "0.000289126496852",
"close": "0.000289126496852",
"volume": "4403.116875499735"
}
},
{
"1719926825-1719927725": {
"open": "0.000289126496852",
"high": "0.000290874978948",
"low": "0.000288740369187",
"close": "0.000288740369187",
"volume": "10912.449031269218"
}
},
{
"1719927725-1719928625": {
"open": "0.000288740369187",
"high": "0.00029184335228",
"low": "0.000288740369187",
"close": "0.000291843352280",
"volume": "31952.603082310354"
}
},
{
"1719928625-1719929525": {
"open": "0.000291843352280",
"high": "0.000292137853292",
"low": "0.0002900144809",
"close": "0.000292137853292",
"volume": "10789.357635119048"
}
}
]
}
}
/getpooltradedata
Get the trade data from the pool within a specified block range, for the specified event type
GET
https://historicaltrade.api.expand.network/dex/getpooltradedata
Query Parameters
dexId*
String
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
Transfer, Swap, Burn or Mint(by default).
https://historicaltrade.api.expand.network/dex/getpooltradedata?poolAddress=0x397ff1542f962076d0bfe58ea045ffa2d347aca0&dexId=1100&startBlock=18795938&endBlock=18802579
{
"status": 200,
"msg": "success",
"data": {
"pair": "USDC/WETH",
"transactions": [
{
"blockNumber": "18802579",
"transactionHash": "0x244973c75c485606de7da7a1b6979ad60a85acc0eface61346363c838f0b1246",
"values": {
"0": "0xd9e1cE17f2641f24aE83637ab66a2cca9C378B9F",
"1": "6000000",
"2": "2695481331319850",
"sender": "0xd9e1cE17f2641f24aE83637ab66a2cca9C378B9F",
"amount0": "6000000",
"amount1": "2695481331319850"
},
"eventType": "Mint",
"data": {
"data": "0x00000000000000000000000000000000000000000000000000000000005b8d8000000000000000000000000000000000000000000000000000099386a740842a",
"topics": [
"0x4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f",
"0x000000000000000000000000d9e1ce17f2641f24ae83637ab66a2cca9c378b9f"
]
}
},
{
"blockNumber": "18795938",
"transactionHash": "0x015caf944af53d7e4812b5483d49564e6ab6124c9209e3e163449cfef0ccc9b4",
"values": {
"0": "0xd9e1cE17f2641f24aE83637ab66a2cca9C378B9F",
"1": "3592426738",
"2": "1598745565343756835",
"sender": "0xd9e1cE17f2641f24aE83637ab66a2cca9C378B9F",
"amount0": "3592426738",
"amount1": "1598745565343756835"
},
"eventType": "Mint",
"data": {
"data": "0x00000000000000000000000000000000000000000000000000000000d62014f2000000000000000000000000000000000000000000000000162fe29f048bb223",
"topics": [
"0x4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f",
"0x000000000000000000000000d9e1ce17f2641f24ae83637ab66a2cca9c378b9f"
]
}
}
]
}
}
/swap
Initiate a swap transaction on a specified DEX.
POST
https://api.expand.network/dex/swap
Request Body
dexId*
String
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.
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.
involveBaseToken
String
If a base token is involved in the swap;
0
for erc20 -> erc20,
1
for base -> erc20 ("from" address should be of equivalent wrapped token),
2
for erc20 -> base ("to" address should be of equivalent wrapped token).
By default, 0
.
gasPriority
String
low, medium, or high.
slippage
String
Percentage of total swap value. By default, 1.
0 <= slippage value <= 100
{
"dexId": "1100",
"amountIn": "1000000000000000",
"amountOutMin": "0",
"path": ["0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2","0x6B175474E89094C44Da98b954EedeAC495271d0F"],
"to": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"deadline": "1665991665",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"gas": "173376"
}
{
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"to": "0xd9e1cE17f2641f24aE83637ab66a2cca9C378B9F",
"value": "0",
"gas": "173376",
"data": "0x38ed173900000000000000000000000000000000000000000000000000038d7ea4c68000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000063056e00436da25bcf48a40dfbbdcc708935100600000000000000000000000000000000000000000000000000000000634d03f10000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f",
"estimationCheck": true,
"referenceId": "c6c9368e65c64c7eab8c72d0ffec4d5b"
}
}
With gasPriority (high):
{
"dexId":"1100",
"amountIn": "10000000000",
"amountOutMin": "0",
"path": ["0x6B175474E89094C44Da98b954EedeAC495271d0F","0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"],
"to": "0x356dB816602c85e2075774bB77D13995c8Bab023",
"deadline": "1765990894",
"from": "0x356dB816602c85e2075774bB77D13995c8Bab023",
"gas": "273376",
"gasPriority":"high"
}
With gasPriority:
{
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0x356dB816602c85e2075774bB77D13995c8Bab023",
"to": "0xd9e1cE17f2641f24aE83637ab66a2cca9C378B9F",
"value": "0",
"gas": "273376",
"data": "0x38ed173900000000000000000000000000000000000000000000000000000002540be400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000356db816602c85e2075774bb77d13995c8bab023000000000000000000000000000000000000000000000000000000006942e1ee00000000000000000000000000000000000000000000000000000000000000020000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"gasPrice": "41404698348",
"estimationCheck": true,
"referenceId": "1b07000a841f41ed9125e2b5d36a5ee2"
}
}
With Slippage:
{
"dexId": "1100",
"amountIn": "100000",
"amountOutMin": "98830762578185630",
"path": [
"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"0x6B175474E89094C44Da98b954EedeAC495271d0F"
],
"to": "0x22cf65ae3fa16d6379e72f4b4c2401c1b7c69731",
"deadline": "1711931771",
"from": "0x22cf65ae3fa16d6379e72f4b4c2401c1b7c69731",
"gas": "933376",
"slippage": "3.4"
}
With Slippage:
{
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0x22cf65ae3fa16d6379e72f4b4c2401c1b7c69731",
"to": "0xd9e1cE17f2641f24aE83637ab66a2cca9C378B9F",
"value": "0",
"gas": "933376",
"data": "0x38ed173900000000000000000000000000000000000000000000000000000000000186a000000000000000000000000000000000000000000000000001567568b369fc1000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000022cf65ae3fa16d6379e72f4b4c2401c1b7c6973100000000000000000000000000000000000000000000000000000000660a017b0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000006b175474e89094c44da98b954eedeac495271d0f",
"estimationCheck": true,
"referenceId": "0f304e90b4364ed5bbb5687d80b519e1"
}
}
/addliquidity
Add liquidity to a specified pool in a specified DEX.
POST
https://api.expand.network/dex/addliquidity
Request Body
dexId*
String
tokenA*
String
Address of the first token being added.
tokenB*
String
Address of the second token being added.
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.
gasPriority
String
low, medium, or high.
slippage
String
Percentage of total value. By default, 1.
0 <= slippage value <= 100
{
"dexId": "1100",
"tokenA": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"tokenB": "0x6B175474E89094C44Da98b954EedeAC495271d0F",
"amountADesired": "50000000000000000",
"amountBDesired": "1914090565548627",
"amountAMin": "0",
"amountBMin": "0",
"to": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"deadline": "1669709170",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"gas": "2307200"
}
{
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"to": "0xd9e1cE17f2641f24aE83637ab66a2cca9C378B9F",
"value": "0",
"gas": "2307200",
"data": "0xe8e33700000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f00000000000000000000000000000000000000000000000000b1a2bc2ec500000000000000000000000000000000000000000000000000000006ccdaf03a3a530000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000063056e00436da25bcf48a40dfbbdcc7089351006000000000000000000000000000000000000000000000000000000006385bd72",
"estimationCheck": true,
"referenceId": "7ed581d1f8f5443ea15b983ec3ef18a6"
}
}
With gasPriority (low):
{
"dexId": "1100",
"tokenA": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"tokenB": "0x6B175474E89094C44Da98b954EedeAC495271d0F",
"amountADesired": "1000",
"amountBDesired": "997726184637093",
"amountAMin": "0",
"amountBMin": "0",
"poolFees":"3000",
"from": "0x356dB816602c85e2075774bB77D13995c8Bab023",
"to":"0x356dB816602c85e2075774bB77D13995c8Bab023",
"deadline":"1699965600472",
"gas": "773376",
"gasPriority":"low"
}
With gasPriority:
{
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0x356dB816602c85e2075774bB77D13995c8Bab023",
"to": "0xd9e1cE17f2641f24aE83637ab66a2cca9C378B9F",
"value": "0",
"gas": "773376",
"data": "0xe8e33700000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000006b175474e89094c44da98b954eedeac495271d0f00000000000000000000000000000000000000000000000000000000000003e800000000000000000000000000000000000000000000000000038b6d3ad182a500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000356db816602c85e2075774bb77d13995c8bab0230000000000000000000000000000000000000000000000000000018bcdd882d8",
"gasPrice": "28203706430",
"estimationCheck": true,
"referenceId": "5f261f51e6a04444a867305fc8bce0d6"
}
}
With Slippage:
{
"dexId": "1100",
"tokenA": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"tokenB": "0x6B175474E89094C44Da98b954EedeAC495271d0F",
"amountADesired": "50000000000000000",
"amountBDesired": "1914090565548627",
"amountAMin": "0",
"amountBMin": "0",
"to": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"deadline": "1669709170",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"gas": "2307200",
"slippage": "5"
}
With Slippage:
{
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"to": "0xd9e1cE17f2641f24aE83637ab66a2cca9C378B9F",
"value": "0",
"gas": "2307200",
"data": "0xe8e33700000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f00000000000000000000000000000000000000000000000000b1a2bc2ec500000000000000000000000000000000000000000000000000000006ccdaf03a3a530000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000063056e00436da25bcf48a40dfbbdcc7089351006000000000000000000000000000000000000000000000000000000006385bd72",
"estimationCheck": true,
"referenceId": "82a7c7e1f9664956a0eb03b8b4eba7ef"
}
}
/removeliquidity
Remove liquidity from a specified pool for a specified DEX.
POST
https://api.expand.network/dex/removeliquidity
Request Body
dexId*
String
tokenA*
String
Address of the first token being removed.
tokenB*
String
Address of the second token being removed.
liquidity*
String
Total amount of liquidity to be removed from the given pool.
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.
gasPriority
String
low, medium, or high.
slippage
String
Percentage of total value. By default, 1. 0 <= slippage value <= 10
{
"dexId": "1100",
"tokenA": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"tokenB": "0x6B175474E89094C44Da98b954EedeAC495271d0F",
"liquidity": "24329217355609123",
"amountAMin": "0",
"amountBMin": "0",
"to": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"deadline": "1666077074",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"gas": "400000"
}
{
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"to": "0xd9e1cE17f2641f24aE83637ab66a2cca9C378B9F",
"value": "0",
"gas": "400000",
"data": "0xbaa2abde000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f00000000000000000000000000000000000000000000000000566f4b5624f4230000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000063056e00436da25bcf48a40dfbbdcc708935100600000000000000000000000000000000000000000000000000000000634e5192",
"estimationCheck": true,
"referenceId": "838c56cd8ee9402b96cc1e9939fa1e75"
}
}
With gasPriority (high):
{
"dexId": "1100",
"tokenA": "0x6B175474E89094C44Da98b954EedeAC495271d0F",
"tokenB": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"amountAMin": "0",
"amountBMin": "0",
"from": "0x6fb447ae94f5180254d436a693907a1f57696900",
"to":"0x6fb447ae94f5180254d436a693907a1f57696900",
"deadline":"1700034397679",
"liquidity":"9000",
"gas": "123444",
"gasPriority":"high"
}
With gasPriority:
{
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0x6fb447ae94f5180254d436a693907a1f57696900",
"to": "0xd9e1cE17f2641f24aE83637ab66a2cca9C378B9F",
"value": "0",
"gas": "123444",
"data": "0xbaa2abde0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000000000000002328000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006fb447ae94f5180254d436a693907a1f576969000000000000000000000000000000000000000000000000000000018bd1f245ef",
"gasPrice": "42201880389",
"estimationCheck": true,
"referenceId": "e2da1cb79e5143f7ba8e4531e888ff9b"
}
}
With slippage:
{
"dexId": "1100",
"tokenA": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"tokenB": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"liquidity": "2961185246",
"amountAMin": "100000",
"amountBMin": "100000",
"to": "0x4970798F8E5a77598CA4Da778eb6D12303AEefc9",
"deadline": "1669720626",
"from": "0x4970798F8E5a77598CA4Da778eb6D12303AEefc9",
"gas": "420000",
"slippage": "3.234551"
}
With slippage:
{
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0x4970798F8E5a77598CA4Da778eb6D12303AEefc9",
"to": "0xd9e1cE17f2641f24aE83637ab66a2cca9C378B9F",
"value": "0",
"gas": "420000",
"data": "0xbaa2abde000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000b08019de00000000000000000000000000000000000000000000000000000000000179fd00000000000000000000000000000000000000000000000000000000000179fd0000000000000000000000004970798f8e5a77598ca4da778eb6d12303aeefc9000000000000000000000000000000000000000000000000000000006385ea32",
"estimationCheck": true,
"referenceId": "4e459282550541e1be8446739a5f5225"
}
}
Last updated