Liquidswap
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./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./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 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.
Liquidswap
Aptos Mainnet
3200
Endpoint Details
/getprice
Returns the swap quotation for a given token pair.
GET
https://api.expand.network/dex/getprice
Query Parameter
rpc
String
Remote procedural call URL.
amountIn*
String
Amount of token.
path*
String
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
/getuserliquidity
Returns the balance of a particular token pair of an account.
GET
https://api.expand.network/dex/getuserliquidity
Query Parameter
rpc
String
Remote procedural call URL.
address*
String
Public address of liquidity provider.
poolAddress*
String
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
/getpoolliquidity
Returns the total liquidity for a specified pool.
GET
https://api.expand.network/dex/getpoolliquidity
Query Parameter
rpc
String
Remote procedural call URL.
poolAddress*
String
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>
/gettokenliquidity
Returns the individual token liquidity within the specified liquidity pool.
GET
https://api.expand.network/dex/gettokenliquidity
Query Parameter
rpc
String
Remote procedural call URL.
poolAddress*
String
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>
/swap
Initiate a swap transaction on a specified DEX.
POST https://api.expand.network/dex/swap
Request Body
rpc
String
Remote procedural call URL.
path*
String
Comma separated values of token addresses.
amountIn*
String
Amount of token to be swapped.
gas
String
Maximum gas limit provided by the sender, for the transaction.
from*
String
Address of the sender of the token.
slippage
String
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"
}
/addliquidity
Add liquidity to a specified pool in a specified DEX.
POST https://api.expand.network/dex/addliquidity
Request Body
rpc
String
Remote procedural call URL.
path*
String
Comma separated values of token addresses.
amountIn*
String
Amount of token0 and token1 to be added.
slippage
String
Percentage of total swap value. By default, 1.
0 <= slippage value <= 10
from*
String
Address of the sender of the token.
gas
String
Maximum gas limit provided by the sender, for the transaction.
curveType
String
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"
}
/removeliquidity
Remove liquidity from a specified pool for a specified DEX.
POST https://api.expand.network/dex/removeliquidity
Request Body
rpc
String
Remote procedural call URL.
path*
String
Comma separated values of token addresses.
slippage
String
Percentage of total swap value. By default, 1.
0 <= slippage value <= 10
from*
String
Address of the sender of the token.
liquidity*
String
The liquidity to be removed.
gas
String
Maximum gas limit provided by the sender, for the transaction.
curveType
String
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"
}
Last updated