SDEX

/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

Refer to the DEX ID page for details.

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=2400&amountIn=100000000000000000&path=yUSDC%3AGDGTVWSM4MGS4T7Z6W4RPWOCHE2I6RDFCIFZGS3DOA63LWQTRNZNTTFF%2CXLM

/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

Refer to the DEX ID page for details.

address*

String

Public address of liquidity provider.

path*

String

Comma separated values of token addresses whose price is to be fetched. Note: 1) Assets should be in lexicographic order. 2) For assets other than XLM (Native token), the token issuer is required.

/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

Refer to the DEX ID page for details.

poolAddress*

String

Pool address whose liquidity is to be fetched.

/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

Refer to the DEX ID page for details.

poolAddress*

String

Pool address whose liquidity is to be fetched.

/getliquidityholders

Returns the total number of liquidity holders in the specified pool.

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

Query Parameter

Name
Type
Description

rpc

String

Remote procedural call URL.

dexId*

String

Refer to the DEX ID page for details.

poolAddress*

String

Pool address whose liquidity is to be fetched.

/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

Refer to the DEX ID page for details.

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.

amountOutMin

String

Minimum amount accepted as the result of swap.

from*

String

Address of the sender of the token.

slippage

String

Percentage of total swap value. By default, 1.

0 <= slippage value <= 10

/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

Refer to the DEX ID page for details.

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.

slippage

String

Percentage of total swap value. By default, 1.

0 <= slippage value <= 10

from*

String

Address of the sender of the token.

/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

Refer to the DEX ID page for details.

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.

amountOutMin*

String

Minimum amount to be received.

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.

Last updated