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.

  • /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 Cetus. For a complete list and more information, please see the DEX ID page.

DEX Name
Chain
DEX ID

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

Name
Type
Description

rpc

String

Remote procedural call URL.

dexId*

String

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

Name
Type
Description

rpc

String

Remote procedural call URL.

dexId*

String

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=0x98b3b0043354769adaa122c893e912e476ceb636a1ce04064aaa9a3d0591467c&poolAddress=0x0fea99ed9c65068638963a81587c3b8cafb71dc38c545319f008f7e9feb2b5f8

/getpoolliquidity

Returns the total liquidity for a specified pool.

GET https://api.expand.network/dex/getpoolliquidity

Query Parameter

Name
Type
Description

rpc

String

Remote procedural call URL.

dexId*

String

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

Name
Type
Description

rpc

String

Remote procedural call URL.

dexId*

String

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

Name
Type
Description

rpc

String

Remote procedural call URL.

dexId*

String

path*

String

Comma-separated values of token addresses, inside an array, to swap. Note: For assets other than XLM (Native token), the token issuer is required.

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

Name
Type
Description

rpc

String

Remote procedural call URL.

dexId*

String

path*

String

Comma-separated values of token addresses, inside an array, to swap. Note: For assets other than XLM (Native token), the token issuer is required.

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

Name
Type
Description

rpc

String

Remote procedural call URL.

dexId*

String

path*

String

Comma-separated values of token addresses, inside an array, to swap. Note: For assets other than XLM (Native token), the token issuer is required.

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