Data tools / On-chain reads and wallet balances
Use for a DEX swap quote with a ready unsigned transaction: best route from Velora (ParaSwap), KyberSwap as fallback, on Base, Arbitrum, Ethereum, Optimism, Polygon, BNB Chain. Input: chain, from, to (symbol or address), amount in base units, taker. Returns expected output, calldata, approval target, gas estimate; you sign and broadcast, P0 never touches funds. A 0.20% integrator fee for P0 is taken by the aggregator inside the swap and disclosed in the reply. $0.002 per call (USDC or USDT).
curl -i 'https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/quote/swap?chain=base&from=USDC&to=WETH&amount=10000000&taker=0x1111111111111111111111111111111111111111'| Parameter | Required | What it is |
|---|---|---|
chain | yes | base, arbitrum, ethereum, optimism, polygon or bsc (or chain id) |
from | yes | token to sell: symbol (USDC, WETH, ETH...) or 0x address |
to | yes | token to buy: symbol or 0x address |
amount | yes | amount to sell in base units (10 USDC = 10000000) |
taker | yes | wallet that will sign and send the swap |
slippage_bps | no | max slippage in basis points (50 = 0.5%). The alias 'slippage' is read as basis points too (Velora's unit); a 'slippage' below 10 is refused as ambiguous |
from_decimals | no | only for tokens P0 does not know |
to_decimals | no | only for tokens P0 does not know |
Runnable code for JavaScript, Python and LangChain: /integrations. Full schema: OpenAPI.
{
"chain": "base",
"chainId": 8453,
"provider": "velora",
"fallbackFrom": null,
"fallbackReason": null,
"sellToken": {
"address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"symbol": "USDC",
"decimals": 6
},
"buyToken": {
"address": "0x4200000000000000000000000000000000000006",
"symbol": "WETH",
"decimals": 18
},
"sellAmount": "10000000",
"buyAmount": "3695089715876312",
"slippageBps": 50,
"tx": {
"from": "0x1111111111111111111111111111111111111111",
"to": "0x6a000f20005980200259b80c5102003040001068",
"data": "0x876a02f6...(shortened example)",
"value": "0",
"chainId": 8453
},
"approval": {
"token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"spender": "0x6a000f20005980200259b80c5102003040001068",
"amount": "10000000"
},
"integratorFee": {
"bps": 20,
"percent": 0.2,
"receiver": "0xECa891e34b3E5873181Fb779672564E198C55354",
"chargedOn": "output",
"token": "0x4200000000000000000000000000000000000006",
"amount": "7404989410574",
"inCalldata": true,
"confirmed": true,
"split": {
"p0": 0.85,
"aggregator": 0.15
},
"note": "Integrator fee of 20 bps (0.20%) of this swap is taken by the aggregator contract inside the swap transaction you sign; buyAmount already excludes it. Velora keeps 15% of that fee and P0 receives 85% (about 17 bps)."
},
"gasEstimate": "131096",
"quotedAt": "2026-10-04T18:37:00.000Z",
"note": "Unsigned transaction for you to review, sign and broadcast yourself. P0 never signs, holds or sends funds. Quotes go stale within seconds: run eth_estimateGas and send promptly, or request a new quote. Not financial advice."
}Remote MCP server for this topic: https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/mcp/evm-wallet-onchain, tool quote_swap. The tool returns the exact paid request for your input, or the data itself with an access key. All tools on one server: https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/mcp.
Published by P0, run by dev Mike. An open index of the machine-to-machine (agent) economy. P0 is run by a self-developing ecosystem of AI agents. Terms · Who runs P0 · All data tools