Sushiswap
/getprice
Returns the swap quotation for the given token pairs.
GET https://api.expand.network/dex/getprice
Query Parameters
rpc
String
Remote procedural call URL.
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.
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.
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.
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.
https://api.expand.network/dex/getliquidityholders?dexId=1100&poolAddress=0x6B3595068778DD592e39A122f4f5a5cF09C90fE2{
"status": 200,
"msg": "success",
"data": {
"totalTokenHolders": "117670"
}
}/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.
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.
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
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
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"
}
}
]
}
}/getpoolchartdata
Get the data for the pool and obtain the OHCL (Open, High, Close, Low) prices within the specified time interval.
GET https://historicaltrade.api.expand.network/dex/getpoolchartdata
Query Parameters
interval
String
15 mins(by default), 30 mins, 60 mins, and 90 mins.
poolAddress*
String
Pool address whose transactions is to be fetched.
https://historicaltrade.api.expand.network/dex/getpoolchartdata?dexId=1100&poolAddress=0x6a091a3406e0073c3cd6340122143009adac0eda{
"status": 200,
"msg": "success",
"data": {
"pair": "ILV/WETH",
"chartData": {
"18883403 to 18883472": [
{
"open_price": "43436771175047461",
"close_price": "43408677779839064",
"low_price": "43407786195488460",
"high_price": "43670000086527410",
"transactions": [
{
"blockNumber": "18883463",
"price": "43422439903841912",
"amount": {
"token0": "102000572637767189782",
"token1": "4429113735520907436"
}
},
{
"blockNumber": "18883472",
"price": "43670000086527408",
"amount": {
"token0": "3129667269957695196",
"token1": "136672569949854550"
}
}
]
}
],
"18883334 to 18883403": [
{
"open_price": "43547186276952559",
"close_price": "43436771175047461",
"low_price": "43422439903841910",
"high_price": "43670000086527410",
"transactions": [
{
"blockNumber": "18883381",
"price": "43547084885097912",
"amount": {
"token0": "1711615197390561629",
"token1": "74535852291390407"
}
},
{
"blockNumber": "18883390",
"price": "43519364670601592",
"amount": {
"token0": "192959879922945017658",
"token1": "8397491381162139455"
}
},
{
"blockNumber": "18883395",
"price": "43464401031951824",
"amount": {
"token0": "192954632333095821169",
"token1": "8386657520698494096"
}
}
]
}
],
"18883264 to 18883334": [
{
"open_price": "43580742889438194",
"close_price": "43547186276952559",
"low_price": "43422439903841910",
"high_price": "43670000086527410",
"transactions": [
{
"blockNumber": "18883325",
"price": "43564129117199832",
"amount": {
"token0": "117512611061174833005",
"token1": "5119334561168304832"
}
}
]
}
],
"18883195 to 18883264": [
{
"open_price": "43580742889438194",
"close_price": "43580742889438194",
"low_price": "43422439903841910",
"high_price": "43670000086527410",
"transactions": []
}
],
"18883126 to 18883195": [
{
"open_price": "43630018046276656",
"close_price": "43580742889438194",
"low_price": "43422439903841910",
"high_price": "43670000086527410",
"transactions": [
{
"blockNumber": "18883128",
"price": "43605553277127072",
"amount": {
"token0": "172311804647620320745",
"token1": "7513751577839719495"
}
}
]
}
],
"18883057 to 18883126": [
{
"open_price": "43669679018510388",
"close_price": "43630018046276656",
"low_price": "43422439903841910",
"high_price": "43670000086527410",
"transactions": [
{
"blockNumber": "18883072",
"price": "43650016798096248",
"amount": {
"token0": "138479680688282977116",
"token1": "6044640388238556419"
}
}
]
}
],
"18882987 to 18883057": [
{
"open_price": "43802659723312058",
"close_price": "43669679018510388",
"low_price": "43422439903841910",
"high_price": "43802659723312056",
"transactions": [
{
"blockNumber": "18883022",
"price": "43775253844787920",
"amount": {
"token0": "191784985491326827151",
"token1": "8395436423501800791"
}
},
{
"blockNumber": "18883032",
"price": "43727764263704368",
"amount": {
"token0": "138592800106721373351",
"token1": "6060353291713413323"
}
},
{
"blockNumber": "18883038",
"price": "43688854988366640",
"amount": {
"token0": "132561706284571400000",
"token1": "5791469162877089355"
}
}
]
}
]
}
}
}/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
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
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 <= 10
{
"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"
}
}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": "189000",
"data": "0x38ed173900000000000000000000000000000000000000000000000000000002540be400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000356db816602c85e2075774bb77d13995c8bab023000000000000000000000000000000000000000000000000000000006942e1ee00000000000000000000000000000000000000000000000000000000000000020000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
}
}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": "0x38ed173900000000000000000000000000000000000000000000000000000000000186a000000000000000000000000000000000000000000000000001555bb954bc93e000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000022cf65ae3fa16d6379e72f4b4c2401c1b7c6973100000000000000000000000000000000000000000000000000000000660a017b0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000006b175474e89094c44da98b954eedeac495271d0f"
}
}/addliquidity
Add liquidity to a specified pool in a specified DEX.
POST https://api.expand.network/dex/addliquidity
Request Body
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 <= 10
{
"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"
}
}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": "193747",
"data": "0xe8e33700000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000006b175474e89094c44da98b954eedeac495271d0f00000000000000000000000000000000000000000000000000000000000003e800000000000000000000000000000000000000000000000000038b6d3ad182a500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000356db816602c85e2075774bb77d13995c8bab0230000000000000000000000000000000000000000000000000000018bcdd882d8"
}
}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"
}
}/removeliquidity
Remove liquidity from a specified pool for a specified DEX.
POST https://api.expand.network/dex/removeliquidity
Request Body
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": "0xbaa2abde000000000000000000000000b4fbf271143f4fbf7b91a5ded31805e42b2208d600000000000000000000000011fe4b6ae13d2a6055c8d9cf65c55bac32b5d84400000000000000000000000000000000000000000000000000566f4b5624f4230000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000063056e00436da25bcf48a40dfbbdcc708935100600000000000000000000000000000000000000000000000000000000634e5192"
}
}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": "296799",
"data": "0xbaa2abde0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000000000000002328000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006fb447ae94f5180254d436a693907a1f576969000000000000000000000000000000000000000000000000000000018bd1f245ef"
}
}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"
}
}Last updated

