0x (Aggregator)
/getprice
Returns the best swap quotation for the given token pairs.
GET https://api.expand.network/dex/getprice
Query Parameters
rpc
String
Remote procedural call URL.
path*
String
Comma separated values of token addresses/token symbol whose price is to be fetched.
amountIn*
String
Amount of token.
https://api.expand.network/dex/getprice?dexId=1600&path=Weth,sushi&amountIn=1000000000000000000{
"status": 200,
"msg": "success",
"data": {
"amountIn": "1000000000000000000",
"path": [
"Weth",
"sushi"
],
"amountsOut": "2909311628175970000000"
}
}/getliquiditysources
Get the liquidity sources for the specified dex aggregator(on the basis of chain), supported by expand.network.
GET https://api.expand.network/dex/getliquiditysources
Query Parameters
rpc
String
Remote procedural call URL.
/swap
Initiate a swap transaction on the DEX providing best swap quote.
POST https://api.expand.network/dex/swap
Request Body
path*
Array
Comma-separated values of token addresses/token symbol, inside an array, to swap.
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.
gas*
String
Maximum gas limit provided by the sender, for the transaction.
rpc
String
Remote procedural call URL.
slippage
String
Percentage of total swap value. By default, 1.
0 <= slippage value <= 10
gasPriority
String
low, medium, or high.
With gasPriority:
With gasPriority:
With Slippage:
With Slippage:
Last updated

