Cetus
Supported Chains
Available on Sui Mainnet and Testnet
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 Cetus./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 Cetus. For a complete list and more information, please see the DEX ID page.
Cetus
Sui Mainnet
3300
Cetus
Sui Testnet
3301
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?path=0xaf3aae4940a248739ce4964857381fc3f3149a6d05375bfbb2118592907e3bbb::dam::DAM,0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI&amountIn=100000000&dexId=3300
/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=3300&address=0xc226836119da363dd93c5c211c495eff6955eb65e68a6cf7b45ded3e82416c92&poolAddress=0xb8d7d9e66a60c239e7a60110efcf8de6c705580ed924d0dde141f4a0e2c90105
/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=3300&poolAddress=0x0fea99ed9c65068638963a81587c3b8cafb71dc38c545319f008f7e9feb2b5f8
/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=3300&poolAddress=0x0fea99ed9c65068638963a81587c3b8cafb71dc38c545319f008f7e9feb2b5f8
/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.
poolFees
String
Different pool based on the fees. By default, it is selected as 2500.
from*
String
Address of the sender of the token.
slippage
String
Percentage of total swap value. By default, 1.
0 <= slippage value <= 10
{
"path": [
"0x06864a6f921804860930db6ddbe2e16acdf8504495ea7481637a1c8b9a8fe54b::cetus::CETUS",
"0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI"
],
"poolFees": "2500",
"amountIn": "1000000",
"from": "0xda79a82f67c908b1ed3095887673454226b5da77822898405dc376a1b86bf0f3",
"slippage": "100",
"gas": "1000000",
"dexId": "3300"
}
/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.
amountA*
String
Amount of token0.
amountB*
String
Amount of token1
slippage
String
Percentage of total swap value. By default, 1.
0 <= slippage value <= 10
poolFees
String
Different pool based on the fees. By default, it is selected as 2500.
from*
String
Address of the sender of the token.
gas
String
Maximum gas limit provided by the sender, for the transaction.
{
"path": [
"0x06864a6f921804860930db6ddbe2e16acdf8504495ea7481637a1c8b9a8fe54b::cetus::CETUS",
"0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI"
],
"poolFees": "2500",
"amountA": "1000000",
"amountB": "1000000",
"from": "0xda79a82f67c908b1ed3095887673454226b5da77822898405dc376a1b86bf0f3",
"slippage": "100",
"gas": "1000000",
"dexId": "3300"
}
/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.
poolFees
String
Different pool based on the fees. By default, it is selected as 2500.
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.
{
"path": [
"0x06864a6f921804860930db6ddbe2e16acdf8504495ea7481637a1c8b9a8fe54b::cetus::CETUS",
"0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI"
],
"poolFees": "2500",
"liquidity": "1000000",
"from": "0x3345e6cb604d02ae98056d1a73c7b79a792f64eb0b58b1f040794adea6b2d956",
"gas": "1000000",
"dexId": "3300"
}
Last updated