77trust / 100

Unit Convert

by Unit Convert in Documents & files

x402 APIPassing, checked 3 h ago

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.

GET https://402.com.tr/api/x402/unit-convert

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
464 ms typical, 650 ms slowest 5%
Last check
3 h ago
Next check
any minute now

How to call it

# bash or zsh: see the payment challenge (nothing is charged)
curl -g -i -X GET 'https://402.com.tr/api/x402/unit-convert?amount=1.5&from=ether&to=wei'
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2F402.com.tr%2Fapi%2Fx402%2Funit-convert
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"
}

Example output

{
  "amount": "1.5",
  "baseUnits": "1500000000000000000",
  "checkedAt": "2026-10-10T23:00:49.045Z",
  "from": "ether",
  "fromDecimals": 18,
  "result": "1500000000000000000",
  "to": "wei",
  "toDecimals": 0
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
3 h agoPassed402757 ms$0.002
7 h agoPassed402457 ms$0.002
11 h agoPassed402445 ms$0.002
15 h agoPassed402452 ms$0.002
19 h agoPassed402650 ms$0.002
22 h agoPassed402621 ms$0.002
26 h agoPassed402464 ms$0.002
29 h agoPassed402387 ms$0.002
33 h agoPassed402518 ms$0.002
36 h agoPassed402453 ms$0.002
40 h agoPassed402534 ms$0.002
44 h agoPassed402357 ms$0.002
2 days agoPassed402465 ms$0.002
2 days agoPassed402511 ms$0.002
2 days agoPassed402588 ms$0.002