82trust / 100
Quote
by api.getplexa.com in Onchain & crypto
x402 APIPassing, checked 4 h ago
Plexa /v1/quote — executable swap quote: the realizable fill price at your trade size, not a mid/spot price feed. Returns price impact (bps), worst-case slippage, depth and the per-leg route across Base/Polygon/Arbitrum liquidity, from canonical on-chain quoters. Call it before a swap to see what the fill actually costs. Informational data, not financial advice.
POST https://api.getplexa.com/v1/quote
Last 30 days
All checks passedSome failedAll failedNot checked
- Uptime
- 100%
- Response time
- 296 ms typical, 296 ms slowest 5%
- Last check
- 4 h ago
- Next check
- any minute now
How to call it
# See the payment challenge (nothing is charged)
curl -i -X POST "https://api.getplexa.com/v1/quote" \
-H "content-type: application/json" \
-d '{"chain":"base","sizeUSD":"5000","tokenIn":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","tokenOut":"0xE014d2A4da6E450f21b5050120D291e63c8940FD"}'import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client().register(
"eip155:8453",
new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);
// Not sure it's safe to pay? Preflight it first for $0.03:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fapi.getplexa.com%2Fv1%2Fquote
const res = await pay("https://api.getplexa.com/v1/quote", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"chain":"base","sizeUSD":"5000","tokenIn":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","tokenOut":"0xE014d2A4da6E450f21b5050120D291e63c8940FD"}),
});
console.log(await res.json());Example input
{
"chain": "base",
"sizeUSD": "5000",
"tokenIn": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"tokenOut": "0xE014d2A4da6E450f21b5050120D291e63c8940FD"
}Example output
{
"confidence": "low",
"depthAtSize": 8527353.400367068,
"executablePrice": 1705.4706800734136,
"priceImpactBps": 441.2840739321799,
"route": {
"dex": "split",
"legs": [
{
"dex": "slipstream",
"feePips": 1,
"pool": "0xa41Bc0AFfbA7Fd420d186b84899d7ab2aC57fcD1",
"venue": "aerodrome-cl-1"
},
{
"dex": "aerodrome",
"pool": "0xCc68Cb8B514A2216D2eECe3A0e8597Ce483610eb",
"stable": false,
"venue": "aerodrome"
}
]
},
"ts": 1790247318433,
"validUntil": 1790247321433,
"worstCaseSlippageBps": 441.2840739321799
}Security scan
- No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.
Recent checks
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 4 h ago | Passed | 402 | 296 ms | $0.02 |