π Aggregator API
Last updated
{
"num": "string",
"universalRoutes": [
{
"route": [
{
"routerAddress": "string",
"poolType": 0,
"tokenIn": "string",
"tokenOut": "string",
"fee": 0,
"weight": 0
}
],
"percent": 0,
"amountIn": "string",
"amountOut": "string"
}
]
}curl 'https://piperxdb.piperxprotocol.workers.dev/api/swap/swapExactToken?'\
'tokenIn=0xF1815bd50389c46847f0Bda824eC8da914045D14&'\
'tokenOut=0x02353a3BD5c9668159cF9Fd54AC61b03212FCf41&'\
'amount=1000000&type=exactInput&isAggregator=true'{
"num": "457977361510434403631",
"universalRoutes": [
{
"route": [
{
"routerAddress": "0x8295c195CEe31404ea082d253a140310b9a0A37e",
"poolType": 1,
"tokenIn": "0xF1815bd50389c46847f0Bda824eC8da914045D14",
"tokenOut": "0xbab93b7ad7fe8692a878b95a8e689423437cc500",
"fee": 3000,
"weight": 0.010360735915986746
},
{
"routerAddress": "0x8295c195CEe31404ea082d253a140310b9a0A37e",
"poolType": 1,
"tokenIn": "0xbab93b7ad7fe8692a878b95a8e689423437cc500",
"tokenOut": "0x1514000000000000000000000000000000000000",
"fee": 3000,
"weight": 0.004157898814527259
},
{
"routerAddress": "0x1062916B1Be3c034C1dC6C26f682Daf1861A3909",
"poolType": 1,
"tokenIn": "0x1514000000000000000000000000000000000000",
"tokenOut": "0x02353a3BD5c9668159cF9Fd54AC61b03212FCf41",
"fee": 3000,
"weight": 0.18184197356998186
}
],
"percent": 100,
"amountIn": "1000000",
"amountOut": "457977361510434403631"
}
]
}