SDEX
/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?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
rpc
String
Remote procedural call URL.
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.
https://api.expand.network/dex/getuserliquidity?address=GDZUSPMPAWY3JF6J4BEC7RVVVOUKCQZJRVA4NAA6HCS2GRG57DIMGCW3&dexId=2400&path=XBTC%3AGA7JNTXAHMMDUTLX72UM5PWHOAMJEDUQ6GREQZBLMAPVF5WM2JH4XBTC%2CyXLM%3AGARDNV3Q7YGT4AKSDF25LT32YSCCW4EV22Y2TV3I2PU2MMXJTEDL5T55
/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?poolAddress=ffff7fe3743b3c63b12e80f22aed5e8799aa986e25fe155a19277b660d547e71&dexId=2400
/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?poolAddress=843659d3962c3193a16388d60702e725940d36ec534727dc2308e8e7e427dbdd&dexId=2400
/getliquidityholders
Returns the total number of liquidity holders in the specified pool.
GET
https://api.expand.network/dex/getliquidityholders
Query Parameter
rpc
String
Remote procedural call URL.
poolAddress*
String
Pool address whose liquidity is to be fetched.
https://api.expand.network/dex/getliquidityholders?poolAddress=66b2286fa2cabdf1914abea058e3a18b1267643d818ae76dc1a5994fb22b9886&dexId=2400
/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, 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
{
"amountIn": "150000000",
"amountOutMin": "12",
"from": "GARNHXH36IUZE4F5MON5XBQX37OGVFGCOPOPN7CPQL3TP7VX2XI35QUJ",
"slippage": "10",
"dexId": "2400",
"path": [
"XLM",
"apUSDC:GALLBRBQHAPW5FOVXXHYWR6J4ZDAQ35BMSNADYGBW25VOUHUYRZM4XIL"
]
}
/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, 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.
{
"dexId": "2400",
"amountIn": [
"1000000",
"1000000"
],
"from": "GARNHXH36IUZE4F5MON5XBQX37OGVFGCOPOPN7CPQL3TP7VX2XI35QUJ",
"path": [
"XBTC:GA7JNTXAHMMDUTLX72UM5PWHOAMJEDUQ6GREQZBLMAPVF5WM2JH4XBTC",
"yXLM:GARDNV3Q7YGT4AKSDF25LT32YSCCW4EV22Y2TV3I2PU2MMXJTEDL5T55"
],
"slippage": "10"
}
/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, 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.
{
"dexId": "2400",
"from": "GARNHXH36IUZE4F5MON5XBQX37OGVFGCOPOPN7CPQL3TP7VX2XI35QUJ",
"path": [
"XBTC:GA7JNTXAHMMDUTLX72UM5PWHOAMJEDUQ6GREQZBLMAPVF5WM2JH4XBTC",
"yXLM:GARDNV3Q7YGT4AKSDF25LT32YSCCW4EV22Y2TV3I2PU2MMXJTEDL5T55"
],
"liquidity": "100000",
"amountOutMin": [
"32",
"32"
],
"slippage": "10"
}
Last updated