Skip to content
Fourohtwo

402.com.tr/api/x402/unit-convert

Convert an amount between wei, kwei, mwei, gwei, szabo, finney and ether — or between any token decimals (pass a number like 6 for USDC). Integer-exact, no precision loss. Pass amount, from, to. Pure compute, sub-cent — the unit-conversion commodity agents call constantly when building transactions. Not financial advice.

BaseSolanaAnswering
GEThttps://402.com.tr/api/x402/unit-convert

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://402.com.tr/api/x402/unit-convert?amount=1.5&from=ether&to=wei");
console.log(await res.json());

Example input

{
  "amount": "1.5",
  "from": "ether",
  "to": "wei"
}

More from Unit ConvertProvider status