Orca

/getprice

Returns the swap quotation for the given token pair.

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

Query Parameters

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 whose price is to be fetched.

amountIn*

String

Token amount for which the swap quotation is to be fetched.

https://api.expand.network/dex/getprice?path=So11111111111111111111111111111111111111112,EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&amountIn=100000&dexId=2500

/getuserliquidity

Returns the balance of a particular token pair of an account.

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

Query Parameters

Name
Type
Description

rpc

String

Remote procedural call URL.

dexId*

String

Refer to DEX ID page for details.

positionNFT*

String

LP token that represents a position in a pool.

https://api.expand.network/dex/getuserliquidity?dexId=2500&positionNFT=45z3G8PxyTuFa9tbr9QMmscGVHvZir4vQK1U5LRKeSQd

/getpoolliquidity

Returns the total liquidity for a specified pool.

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

Query Parameters

Name
Type
Description

rpc

String

Remote procedural call URL.

poolAddress*

String

Pool address whose liquidity is to be fetched.

dexId*

String

Refer to DEX ID page for details.

/gettokenliquidity

Returns the individual token liquidity within the specified liquidity pool.

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

Query Parameters

Name
Type
Description

rpc

String

Remote procedural call URL.

dexId*

String

Refer to DEX ID page for details.

poolAddress*

String

Pool address whose token 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*

Array

Comma-separated values of token addresses, inside an array, which needs to be swap.

amountIn*

String

Amount of token to be swapped.

from*

String

Address of the sender of the token.

slippage

String

Percentage of total swap value. By default, 1.

0 <= slippage value <= 100

closeWSolAccount

Boolean

By default, false. If true, will convert the entire WSOL token to SOL token.

With Slippage:

/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*

Array

Comma-separated values of token addresses, inside an array, which needs to be added to the pool.

amountIn*

Array

Comma-separated values of tokens amount, inside an array, which needs to be added to the pool.

from*

String

Address of the sender of the token.

slippage

String

Percentage of total swap value. By default, 1.

0 <= slippage value <= 100

With Slippage:

/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

dexId*

String

Refer to the DEX ID page for details.

path*

Array

Comma-separated values of token addresses, inside an array, which needs to be added to the pool.

from*

String

Address of the sender of the token.

liquidity*

String

Total amount of liquidity to be removed from the given pool.

positionNFT*

String

LP token that represents a position in a pool.

Slippage

String

Percentage of total value. By default, 1. 0 <= slippage value <= 10

With Slippage:

Last updated