Skip to content
Fourohtwo

Instant AMM swap quote

amanchain-relay.gitajhd.workers.dev/api/x402/aman-swap-quote

Instant AMM swap quote — exact output amount, price impact and swap fee for any token pair; DeFi exchange-rate and swap pricing API. Deterministic on-chain execution by the AmanChain node — live consensus state, real blocks, pools and balances. Pay per call via x402 (USDC on Base), no account, no API key. POST JSON {"serviceId":"aman-swap-quote","request":"<input>"}.

BaseAnswering
POSThttps://amanchain-relay.gitajhd.workers.dev/api/x402/aman-swap-quote

Uptime100% of 5 checks 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

// npm install fourohtwo
import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://amanchain-relay.gitajhd.workers.dev/api/x402/aman-swap-quote", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"request":"100 AMAN->USDT","serviceId":"aman-swap-quote"}),
});
console.log(await res.json());

Example input

{
  "request": "100 AMAN->USDT",
  "serviceId": "aman-swap-quote"
}
Instant AMM swap quote by Swap Quote · x402 API | Fourohtwo