GET/base-arb$0.02 USDCWETH/USDC cross-DEX spread oracle
High-frequency financial oracles, whale trackers, and MEV protection feeds gated by instant x402 USDC micro-payments.
https://morning-limit-78aa.rushabh1328.workers.dev/.well-known/x402.jsonDiscovery manifest. Point any x402 agent here to find every paid route.
Each route answers HTTP 402 until a USDC payment on Base is verified. Prices are per request.
GET/base-arb$0.02 USDCWETH/USDC cross-DEX spread oracle
GET/new-pools$0.02 USDCReal-time volatile token pool deployment scanner
GET/btc-orderflow$0.02 USDCCross-market BTC/ETH exchange rates & funding basis
GET/agent-score$0.05 USDCAI agent behavioral risk & reputation scoring
GET/agent-router$0.10 USDCM2M task escrow gateway
GET/whale-watch$0.10 USDCInstitutional whale wallet tracking feed
GET/mev-shield$0.15 USDCToxic flow & sandwich attack warning feed
Pick a route and run it from your browser. The playground key returns the live mock response without a payment.
/base-arb?key=rushabh$ curl -s "https://morning-limit-78aa.rushabh1328.workers.dev/base-arb?key=rushabh"
Press “Run request” to call the endpoint.
An autonomous agent needs three steps: read the 402, pay in USDC, retry with the transaction hash.
1. Request
Call a route. Unpaid calls return 402 with accepts[] (asset, payTo, atomic amount).
2. Pay
Send that exact USDC amount to payTo on Base and wait for the receipt.
3. Retry
Repeat the request with the tx hash in X-Payment-TxHash to get 200 OK.
import { createWalletClient, createPublicClient, http, erc20Abi } from "viem";
import { base } from "viem/chains";
import { privateKeyToAccount } from "viem/accounts";
const API = "https://morning-limit-78aa.rushabh1328.workers.dev";
const account = privateKeyToAccount(process.env.AGENT_PK); // never hardcode keys
const wallet = createWalletClient({ account, chain: base, transport: http() });
const rpc = createPublicClient({ chain: base, transport: http() });
export async function callPaid(path) {
// 1. Probe the route. Unpaid requests get HTTP 402 + payment instructions.
let res = await fetch(API + path);
if (res.status !== 402) return res.json();
const { accepts: [req] } = await res.json();
// 2. Pay the exact atomic USDC amount to payTo on Base (chain 8453).
const hash = await wallet.writeContract({
address: req.asset,
abi: erc20Abi,
functionName: "transfer",
args: [req.payTo, BigInt(req.maxAmountRequired ?? req.amount)],
});
await rpc.waitForTransactionReceipt({ hash });
// 3. Retry with proof of payment.
res = await fetch(API + path, { headers: { "X-Payment-TxHash": hash } });
if (!res.ok) throw new Error("Payment rejected: HTTP " + res.status);
return res.json();
}
console.log(await callPaid("/base-arb"));