0x (Aggregator)
Last updated
Last updated
GET
https://api.expand.network/dex/getprice
Name | Type | Description |
---|---|---|
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"
}
}
GET
https://api.expand.network/dex/getliquiditysources
Name | Type | Description |
---|---|---|
https://api.expand.network/dex/getliquiditysources?dexId=1602
{
"status": 200,
"msg": "success",
"data": [
"0x",
"Aave_V2",
"Aave_V3",
"ApeSwap",
"Balancer_V2",
"Curve",
"Curve_V2",
"Dfyn",
"DODO",
"DODO_V2",
"FirebirdOneSwap",
"IronSwap",
"KyberDMM",
"KyberElastic",
"MeshSwap",
"MultiHop",
"QuickSwap",
"QuickSwap_V3",
"SushiSwap",
"Synapse",
"Uniswap_V3",
"WaultSwap",
"WOOFi"
]
}
POST
https://api.expand.network/dex/swap
{
"dexId": "1600",
"amountIn": "1000000000000000000",
"path": [
"0x6B175474E89094C44Da98b954EedeAC495271d0F",
"0xdAC17F958D2ee523a2206206994597C13D831ec7"
],
"to": "0x6AFb0df2F5ab5012568991549544dbC44Dfb6483",
"from": "0x6AFb0df2F5ab5012568991549544dbC44Dfb6483",
"gas": "990089"
}
{
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0x6AFb0df2F5ab5012568991549544dbC44Dfb6483",
"to": "0xdef1c0ded9bec7f1a1670819833240f027b25eff",
"value": "0",
"gas": "990089",
"data": "0x415565b00000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec70000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000f171600000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000002100000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000340000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000002c00000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000002556e69737761705632000000000000000000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000f1ce3000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000f164fc0ec4e93095b804a4795bbe1e041497b92a000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000020000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000000005cd000000000000000000000000ad01c20d5886137e056775af56915de824c8fce5000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000020000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee0000000000000000000000000000000000000000000000000000000000000000869584cd0000000000000000000000001000000000000000000000000000000000000011000000000000000000000000000000000000000033103f6c3cdd8f7caebb2f23",
"referenceId": "cb4fea43c7774467a83a94f5ef1e772f"
}
}
With gasPriority:
{
"dexId": "1600",
"amountIn": "1000000000000000000",
"path": [
"0x6B175474E89094C44Da98b954EedeAC495271d0F",
"0xdAC17F958D2ee523a2206206994597C13D831ec7"
],
"to": "0x6AFb0df2F5ab5012568991549544dbC44Dfb6483",
"from": "0x6AFb0df2F5ab5012568991549544dbC44Dfb6483",
"gas": "990089",
"gasPriority": "low"
}
With gasPriority:
{
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0x6AFb0df2F5ab5012568991549544dbC44Dfb6483",
"to": "0xdef1c0ded9bec7f1a1670819833240f027b25eff",
"value": "0",
"gas": "990089",
"data": "0x415565b00000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec70000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000f171600000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000002100000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000340000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000002c00000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000002556e69737761705632000000000000000000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000f1ce3000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000f164fc0ec4e93095b804a4795bbe1e041497b92a000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000020000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000000005cd000000000000000000000000ad01c20d5886137e056775af56915de824c8fce5000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000020000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee0000000000000000000000000000000000000000000000000000000000000000869584cd000000000000000000000000100000000000000000000000000000000000001100000000000000000000000000000000000000001ac5af67e5dc53a1119b8100",
"gasPrice": "2875301646",
"referenceId": "4188c6d859134df28b2b929e2afcd8c2"
}
}
With Slippage:
{
"dexId": "1600",
"amountIn": "1000000000000000",
"path": [
"0x6B175474E89094C44Da98b954EedeAC495271d0F",
"0xdAC17F958D2ee523a2206206994597C13D831ec7"
],
"to": "0x22cf65Ae3fa16d6379E72F4B4c2401c1B7C69731",
"from": "0x22cf65Ae3fa16d6379E72F4B4c2401c1B7C69731",
"amountOutMin": "10000000",
"gas": "990089",
"gasPriority": "medium",
"slippage": "8"
}
With Slippage:
{
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0x22cf65Ae3fa16d6379E72F4B4c2401c1B7C69731",
"to": "0xdef1c0ded9bec7f1a1670819833240f027b25eff",
"value": "0",
"gas": "990089",
"data": "0x415565b00000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000038d7ea4c68000000000000000000000000000000000000000000000000000000000000000039700000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000002100000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000340000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000002c000000000000000000000000000000000000000000000000000038d7ea4c68000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000002556e697377617056320000000000000000000000000000000000000000000000000000000000000000038d7ea4c680000000000000000000000000000000000000000000000000000000000000000398000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000f164fc0ec4e93095b804a4795bbe1e041497b92a000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000020000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec70000000000000000000000000000000000000000000000000000000000000001000000000000000000000000ad01c20d5886137e056775af56915de824c8fce5000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000020000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee0000000000000000000000000000000000000000000000000000000000000000869584cd00000000000000000000000010000000000000000000000000000000000000110000000000000000000000000000000000000000691b7a13bd4d68fdc10eeaaa",
"gasPrice": "3450361975",
"referenceId": "9d7e5250337b45fca3774bf6be7f83bd"
}
}
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/token symbol whose price is to be fetched.
amountIn*
String
Amount of token.
rpc
String
Remote procedural call URL.
dexId*
String
Refer to the DEX ID page for details.
dexId*
String
Refer to the DEX ID page for details.
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 <= 100
gasPriority
String
low, medium, or high.