Pool depth and slippage for a token
agentsvc.io/api/v1/proxy/token-liquidity
Pool depth and slippage for a token: per pool (Uniswap, Aerodrome, PancakeSwap, Sushi and more) the liquidity in USD, estimated price impact for each size in sizes_usd and the largest trade at 1% and 5% impact. Use to size a trade or check if an exit is possible. Estimate based on constant product; conservative for concentrated liquidity pools. Errors with Not charged if no pool exists.
POST
https://agentsvc.io/api/v1/proxy/token-liquidityUptime100% of 1 check in 30 days
30 days agoToday
Try it
Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.
The response shows up here.
Call it from an agent
import { createPayer } from "fourohtwo";
// One agent key pays USDC on Base or USDG on Robinhood Chain,
// inside the spending rules you set on Fourohtwo.
const pay = createPayer({ privateKey: process.env.AGENT_KEY });
const res = await pay("https://agentsvc.io/api/v1/proxy/token-liquidity", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"chain":"base","sizes_usd":[100,1000,10000],"token":"0x532f27101965dd16442E59d40670FaF5eBB142E4"}),
});
console.log(await res.json());Example input
{
"chain": "base",
"sizes_usd": [
100,
1000,
10000
],
"token": "0x532f27101965dd16442E59d40670FaF5eBB142E4"
}