A

Anywaypossible · Treasury

by Anywaypossible

POSTBase

$0.02

per call · USD Coin on Base

Preflight a Base USDC payment before an AI agent signs it. Check live funding and gas, confirm Base chain intent, classify the destination as an EOA or contract, catch zero-address, token-contract, and self-payment hazards, and receive a machine-readable proceed, fund, review, or reject decision. No account or API key.

Endpoint

POST https://anywaypossible.com/api/treasury

7

Calls / 30d

4

Unique payers / 30d

Aug 30

Last called

exact

Payment scheme

Call this service

TypeScript · @x402/fetch
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);

const res = await fetchWithPay("https://anywaypossible.com/api/treasury", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "address": "0x1111111111111111111111111111111111111111",
    "destinationAddress": "0x2222222222222222222222222222222222222222",
    "expectedChainId": 8453,
    "minGasReserveEth": "0.00005",
    "plannedSpendUsdc": "1.00"
  }),
});
const data = await res.json();
cURL
curl -X POST \
  "https://anywaypossible.com/api/treasury" \
  -H "Content-Type: application/json" \
  -d '{"address":"0x1111111111111111111111111111111111111111","destinationAddress":"0x2222222222222222222222222222222222222222","expectedChainId":8453,"minGasReserveEth":"0.00005","plannedSpendUsdc":"1.00"}' \
  -H "X-PAYMENT: <signed x402 payment>"

Example response

{
  "address": "0x1111111111111111111111111111111111111111",
  "alerts": [
    "USDC balance is below the planned spend.",
    "ETH balance is below the requested gas reserve."
  ],
  "blockNumber": 12345678,
  "chainId": 8453,
  "checks": [
    {
      "id": "network",
      "message": "Base mainnet confirmed.",
      "status": "pass"
    }
  ],
  "decision": "needs_funding",
  "destinationAddress": "0x2222222222222222222222222222222222222222",
  "destinationKind": "eoa",
  "eth": "0",
  "gasShortfallEth": "0.00005",
  "limitations": [
    "Onchain state and basic destination hazards only; recipient identity and contract behavior are not guaranteed."
  ],
  "minGasReserveEth": "0.00005",
  "network": "Base",
  "observedAt": "2026-01-01T00:00:00.000Z",
  "paymentCapacity": {
    "at0_001": "0",
    "at0_01": "0",
    "at0_05": "0",
    "at0_10": "0"
  },
  "plannedSpendUsdc": "1",
  "ready": false,
  "recommendedAction": "Fund the wallet with at least 1 USDC and 0.00005 ETH before paying.",
  "riskLevel": "medium",
  "safeToProceed": false,
  "status": "needs_funding",
  "usdc": "0",
  "usdcShortfall": "1"
}

Payment details

Pay to0xe5690d37805107c56f6195e65a262b234e0e5e75
AssetUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
NetworksBase
Schemesexact

Is this your API?

Pin it to the top of Onchain Data and the homepage with a featured placement.

Get featured →

More from Anywaypossible & similar services