Supported Chains
Available on Aptos Mainnet
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 Liquidswap.
/gettokenliquidity GET
- Returns the individual token liquidity within the specified liquidity pool.
/swap POST
- Initiate a swap transaction on a specified DEX.
/addliquidity POST
- Add liquidity to a specified pool in a specified DEX.
/removeliquidityPOST
- Remove liquidity from a specified pool for 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 Liquidswap. For a complete list and more information, please see the DEX ID page.
Endpoint Details
/getprice
Returns the swap quotation for a given token pair.
GET
https://api.expand.network/dex/getprice
Query Parameter
Remote procedural call URL.
Refer to the DEX ID page for details.
Comma separated values of token addresses whose price is to be fetched.
https://api.expand.network/dex/getprice?dexId=3200&path=0x1::aptos_coin::AptosCoin,0xf22bede237a07e121b56d91a491eb7bcdfd1f5907926a9e58338f964a01b17fa::asset::USDC&amountIn=10000000
{
"status": 200,
"msg": "success",
"data": {
"amountIn": "10000000",
"path": [
"0x1::aptos_coin::AptosCoin",
"0xf22bede237a07e121b56d91a491eb7bcdfd1f5907926a9e58338f964a01b17fa::asset::USDC"
],
"amountsOut": [
"10000000",
"864252"
]
}
}
/getuserliquidity
Returns the balance of a particular token pair of an account.
GET
https://api.expand.network/dex/getuserliquidity
Query Parameter
Remote procedural call URL.
Refer to the DEX ID page for details.
Public address of liquidity provider.
Pool address whose liquidity is to be fetched.
https://api.expand.network/dex/getuserliquidity?dexId=3200&poolAddress=0x61d2c22a6cb7831bee0f48363b0eec92369357aece0d1142062f7d5d85c7bef8::lp_coin::LP<0x1::aptos_coin::AptosCoin, 0x111ae3e5bc816a5e63c2da97d0aa3886519e0cd5e4b046659fa35796bd11542a::stapt_token::StakedApt, 0x163df34fccbf003ce219d3f1d9e70d140b60622cb9dd47599c25fb2f797ba6e::curves::Uncorrelated>&address=0x485300d3fc4fb6b0bcf4431556b13a2e55eec71cbbb33a770aad8958d63c13fd
{
"status": 200,
"msg": "success",
"data": {
"pairAddress": "0x61d2c22a6cb7831bee0f48363b0eec92369357aece0d1142062f7d5d85c7bef8::lp_coin::LP<0x1::aptos_coin::AptosCoin, 0x111ae3e5bc816a5e63c2da97d0aa3886519e0cd5e4b046659fa35796bd11542a::stapt_token::StakedApt, 0x163df34fccbf003ce219d3f1d9e70d140b60622cb9dd47599c25fb2f797ba6e::curves::Uncorrelated>",
"liquidity": "25368400",
"tokenA": "29931130",
"tokenB": "27129313"
}
}
/getpoolliquidity
Returns the total liquidity for a specified pool.
GET
https://api.expand.network/dex/getpoolliquidity
Query Parameter
Remote procedural call URL.
Refer to the DEX ID page for details.
Pool address whose liquidity is to be fetched.
https://api.expand.network/dex/getpoolliquidity?dexId=3200&poolAddress=0x61d2c22a6cb7831bee0f48363b0eec92369357aece0d1142062f7d5d85c7bef8::lp_coin::LP<0xf22bede237a07e121b56d91a491eb7bcdfd1f5907926a9e58338f964a01b17fa::asset::USDT,0x9770fa9c725cbd97eb50b2be5f7416efdfd1f1554beb0750d4dae4c64e860da3::fa_to_coin_wrapper::WrappedUSDT,0x163df34fccbf003ce219d3f1d9e70d140b60622cb9dd47599c25fb2f797ba6e::curves::Stable>
{
"status": 200,
"msg": "success",
"data": {
"totalLiquidity": "586808351357"
}
}
/gettokenliquidity
Returns the individual token liquidity within the specified liquidity pool.
GET
https://api.expand.network/dex/gettokenliquidity
Query Parameter
Remote procedural call URL.
Refer to the DEX ID page for details.
Pool address whose liquidity is to be fetched.
https://api.expand.network/dex/gettokenliquidity?dexId=3200&poolAddress=0x61d2c22a6cb7831bee0f48363b0eec92369357aece0d1142062f7d5d85c7bef8::lp_coin::LP<0x1::aptos_coin::AptosCoin, 0xf8fa55ff4265fa9586f74d00da4858b8a0d2320bbe94cb0e91bf3a40773eb60::GREATDANE::GREATDANE, 0x163df34fccbf003ce219d3f1d9e70d140b60622cb9dd47599c25fb2f797ba6e::curves::Uncorrelated>
{
"status": 200,
"msg": "success",
"data": {
"APT": "6649459",
"GREATDANE": "60847704895806"
}
}
/swap
Initiate a swap transaction on a specified DEX.
POST https://api.expand.network/dex/swap
Request Body
Remote procedural call URL.
Refer to the DEX ID page for details.
Comma separated values of token addresses.
Amount of token to be swapped.
Maximum gas limit provided by the sender, for the transaction.
Address of the sender of the token.
Percentage of total swap value. By default, 1.
0 <= slippage value <= 10
{
"amountIn": "100000",
"from": "0xa182b65f4bf10be7ef870496893c170af3079a2540c63b470445417fcfb21c5b",
"path": [
"0x1::aptos_coin::AptosCoin",
"0xf22bede237a07e121b56d91a491eb7bcdfd1f5907926a9e58338f964a01b17fa::asset::USDC"
],
"slippage": "99",
"dexId": "3200",
"gas": "10000"
}
{
"status": 200,
"msg": "success",
"data": {
"chainId": "1400",
"from": "0xa182b65f4bf10be7ef870496893c170af3079a2540c63b470445417fcfb21c5b",
"to": "0x61d2c22a6cb7831bee0f48363b0eec92369357aece0d1142062f7d5d85c7bef8",
"data": "oYK2X0vxC+fvhwSWiTwXCvMHmiVAxjtHBEVBf8+yHFsOAAAAAAAAAAIBY980/MvwA84hnT8dnnDRQLYGIsud1HWZwl+y95e6bgdzY3JpcHRzBHN3YXADBwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABCmFwdG9zX2NvaW4JQXB0b3NDb2luAAfyK+3iN6B+EhtW2RpJHre839H1kHkmqeWDOPlkoBsX+gVhc3NldARVU0RDAAcBY980/MvwA84hnT8dnnDRQLYGIsud1HWZwl+y95e6bgZjdXJ2ZXMMVW5jb3JyZWxhdGVkAAIIoIYBAAAAAAAIXAAAAAAAAAAQJwAAAAAAAGQAAAAAAAAAqWRpZwAAAAAB",
"referenceId": "c20cdb1e18534d62bc8188b3381b0354"
}
}
/addliquidity
Add liquidity to a specified pool in a specified DEX.
POST https://api.expand.network/dex/addliquidity
Request Body
Remote procedural call URL.
Refer to the DEX ID page for details.
Comma separated values of token addresses.
Amount of token0 and token1 to be added.
Percentage of total swap value. By default, 1.
0 <= slippage value <= 10
Address of the sender of the token.
Maximum gas limit provided by the sender, for the transaction.
Type of curve for pool pair.
stable
/uncorrelated
.
By Default, stable
{
"amountIn": ["733700","529428"],
"from": "0xa182b65f4bf10be7ef870496893c170af3079a2540c63b470445417fcfb21c5b",
"path": [
"0x1::aptos_coin::AptosCoin",
"0x53a30a6e5936c0a4c5140daed34de39d17ca7fcae08f947c02e979cef98a3719::coin::LSD"
],
"slippage": "50",
"dexId": "3200",
"gas":"10000"
}
{
"status": 200,
"msg": "success",
"data": {
"chainId": "1400",
"from": "0xa182b65f4bf10be7ef870496893c170af3079a2540c63b470445417fcfb21c5b",
"to": "0x61d2c22a6cb7831bee0f48363b0eec92369357aece0d1142062f7d5d85c7bef8",
"data": "oYK2X0vxC+fvhwSWiTwXCvMHmiVAxjtHBEVBf8+yHFsOAAAAAAAAAAIBY980/MvwA84hnT8dnnDRQLYGIsud1HWZwl+y95e6bgdzY3JpcHRzDWFkZF9saXF1aWRpdHkDB1OjCm5ZNsCkxRQNrtNN450Xyn/K4I+UfALpec75ijcZBGNvaW4DTFNEAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQphcHRvc19jb2luCUFwdG9zQ29pbgAHAWPfNPzL8APOIZ0/HZ5w0UC2BiLLndR1mcJfsveXum4GY3VydmVzBlN0YWJsZQAECBQUCAAAAAAACAoKBAAAAAAACAQyCwAAAAAACAKZBQAAAAAAECcAAAAAAABkAAAAAAAAAMlkaWcAAAAAAQ==",
"referenceId": "4125a4481a984782b9077efd85275e83"
}
}
/removeliquidity
Remove liquidity from a specified pool for a specified DEX.
POST https://api.expand.network/dex/removeliquidity
Request Body
Remote procedural call URL.
Refer to the DEX ID page for details.
Comma separated values of token addresses.
Percentage of total swap value. By default, 1.
0 <= slippage value <= 10
Address of the sender of the token.
The liquidity to be removed.
Maximum gas limit provided by the sender, for the transaction.
Type of curve for pool pair.
stable
/uncorrelated
.
By Default, stable
{
"liquidity": "10000",
"from": "0xa182b65f4bf10be7ef870496893c170af3079a2540c63b470445417fcfb21c5b",
"path": [
"0x1::aptos_coin::AptosCoin",
"0x53a30a6e5936c0a4c5140daed34de39d17ca7fcae08f947c02e979cef98a3719::coin::LSD"
],
"slippage": "50",
"dexId": "3200",
"curveType": "uncorrelated",
"gas":"10000"
}
{
"status": 200,
"msg": "success",
"data": {
"chainId": "1400",
"from": "0xa182b65f4bf10be7ef870496893c170af3079a2540c63b470445417fcfb21c5b",
"to": "0x61d2c22a6cb7831bee0f48363b0eec92369357aece0d1142062f7d5d85c7bef8",
"data": "oYK2X0vxC+fvhwSWiTwXCvMHmiVAxjtHBEVBf8+yHFsOAAAAAAAAAAIBY980/MvwA84hnT8dnnDRQLYGIsud1HWZwl+y95e6bgdzY3JpcHRzEHJlbW92ZV9saXF1aWRpdHkDB1OjCm5ZNsCkxRQNrtNN450Xyn/K4I+UfALpec75ijcZBGNvaW4DTFNEAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQphcHRvc19jb2luCUFwdG9zQ29pbgAHAWPfNPzL8APOIZ0/HZ5w0UC2BiLLndR1mcJfsveXum4GY3VydmVzDFVuY29ycmVsYXRlZAADCBAnAAAAAAAACJZBAAAAAAAACDAJAAAAAAAAECcAAAAAAABkAAAAAAAAAA5laWcAAAAAAQ==",
"referenceId": "4f3ac95b6cb54eeea6fb74573def0a57"
}
}