gateway
gateway copied to clipboard
`/amm/price` returns prices for non-existent pools on Sushiswap Goerli
Describe the bug
- Call
/amm/pricefor WETH-DAI on Sushiswap Goerli:
{
"network": "goerli",
"timestamp": 1678831599966,
"latency": 0.482,
"base": "0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6",
"quote": "0xdc31Ee1784292379Fbb2964b3B9C4124D8F89C60",
"amount": "0.010000000000000000",
"rawAmount": "10000000000000000",
"expectedAmount": "1196132100000",
"price": "117267850000000",
"gasPrice": 33,
"gasPriceToken": "ETH",
"gasLimit": 3000000,
"gasCost": "0.004972704000000000"
}
It returns a result, but a call to /amm/trade fails:
https://goerli.etherscan.io/tx/0x077d5c96cbf1b1c9b8a8d96e89ec7bd85baeb19a983ed29ae5f7190e09fd3995
There doesn't appear to be a pool for this pair:

Expected result
- Calling
/amm/priceshould result in an error with "No trade found" message - Hummingbot client's
amm-arbstrategy should be able to handle this type of error