Orca
/getprice
Returns the swap quotation for the given token pair.
GET https://api.expand.network/dex/getprice
Query Parameters
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{
"status": 200,
"msg": "success",
"data": {
"amountIn": "100000",
"path": [
"So11111111111111111111111111111111111111112",
"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
],
"amountsOut": [
"100000",
"16887"
]
}
}/getuserliquidity
Returns the balance of a particular token pair of an account.
GET https://api.expand.network/dex/getuserliquidity
Query Parameters
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{
"status": 200,
"msg": "success",
"data": {
"positionNFT": "45z3G8PxyTuFa9tbr9QMmscGVHvZir4vQK1U5LRKeSQd",
"liquidity": "479818718",
"tokenA": "37396067",
"tokenB": "60553520"
}
}/getpoolliquidity
Returns the total liquidity for a specified pool.
GET https://api.expand.network/dex/getpoolliquidity
Query Parameters
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
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
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:
With Slippage:
/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.
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:
With Slippage:
/removeliquidity
Remove liquidity from a specified pool for a specified DEX.
POST https://api.expand.network/dex/removeliquidity
Request Body
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:
With Slippage:
Last updated

