81trust / 100

Money Format

by money-format in Onchain & crypto

x402 APIPassing, checked 2 h ago

Format a numeric amount with thousands separators, a chosen decimal precision and a currency symbol.

POST https://x402.agentindex.world/money/format

Last 30 days

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

How to call it

# See the payment challenge (nothing is charged)
curl -i -X POST "https://x402.agentindex.world/money/format" \
  -H "content-type: application/json" \
  -d '{"amount":1234567.5,"currency_symbol":"$","decimals":2}'
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%2Fx402.agentindex.world%2Fmoney%2Fformat
const res = await pay("https://x402.agentindex.world/money/format", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"amount":1234567.5,"currency_symbol":"$","decimals":2}),
});
console.log(await res.json());

Example input

{
  "amount": 1234567.5,
  "currency_symbol": "$",
  "decimals": 2
}

Example output

{
  "formatted": "$1,234,567.50"
}

Security scan

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

Recent checks

WhenResultHTTPTimePrice
2 h agoPassed40275 ms$0.001
6 h agoPassed40260 ms$0.001
10 h agoPassed40278 ms$0.001
13 h agoPassed40243 ms$0.001
17 h agoPassed40247 ms$0.001
20 h agoPassed40272 ms$0.001
24 h agoPassed40256 ms$0.001
29 h agoPassed40244 ms$0.001