Skip to content
Fourohtwo

x402.halowerk.com/route/optimize

Takes what the caller holds and what the seller accepts and works out which combinations can settle the amount. All costs are brought into USD, otherwise no comparison is possible: gas on the source chain plus, where needed, the cost of a swap or a bridge. Routes that require a swap or a bridge are marked explicitly - they often look cheaper on paper and are slower and riskier in practice. Every a

BaseAnswering
POSThttps://x402.halowerk.com/route/optimize

Uptime100% of 1 check 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://x402.halowerk.com/route/optimize", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"accepted_by_seller":[{"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","chain":"eip155:8453","scheme":"exact"}],"amount_usd":0.01,"available":[{"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","balance":25,"chain":"eip155:8453"}]}),
});
console.log(await res.json());

Example input

{
  "accepted_by_seller": [
    {
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "chain": "eip155:8453",
      "scheme": "exact"
    }
  ],
  "amount_usd": 0.01,
  "available": [
    {
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "balance": 25,
      "chain": "eip155:8453"
    }
  ]
}

More from HALOWERK x402werkProvider status