{"uid":"cap_caSMx_QP1I_MdLnOC6LVw","slug":"evm-unit-converter-parse-and-format-token-amounts-b776a741","name":"EVM Unit Converter — Parse and Format Token Amounts","description":"Verify an x402 endpoint before paying: live payTo, USDC quote, network, asset, resource binding, TLS and endpoint safety for $0.001 on Base or Solana.","url":"https://agentresolver.vercel.app/api/evm-units","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"mode":{"enum":["parse","format"],"type":"string"},"value":{"type":"string","maxLength":256},"decimals":{"type":"integer","maximum":255,"minimum":0}}},"responseSchema":{"type":"json","example":{}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_ep0I89hWJcdpcmYRqyugf","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts EVM token amounts between human-readable decimal and raw base-unit (wei-style) representations for any token with a specified decimal precision.","exampleAgentPrompt":"Convert 1.5 USDC (which has 6 decimals) to its raw base-unit amount so I can pass it directly to a smart contract — use parse mode.","exampleUseCases":[{"title":"Smart contract token transfer preparation","prompt":"I need to send 250 USDC on-chain. Can you convert 250 to its raw integer amount using 6 decimals in parse mode so I can pass it to the contract?"},{"title":"Display balance from raw blockchain data","prompt":"My wallet is showing a raw balance of 1000000000000000000 for an 18-decimal token — can you format that to a human-readable decimal so I know how much ETH-equivalent I actually have?"},{"title":"DeFi amount validation before signing","prompt":"Before I approve this transaction, convert 0.005 WBTC (8 decimals) to base units in parse mode so I can verify the contract is asking for the right amount."}],"resultDescription":"Returns a JSON object echoing back the mode, input value, and decimals, along with the converted result as a string and a resultKind field indicating whether the output is in 'base-units' (raw integer) or 'decimal' (human-readable) form.","failureModes":["Invalid mode value (not 'parse' or 'format') returns validation error","Non-numeric value string causes conversion failure","Decimals outside 0–255 range rejected by schema","Floating point precision edge cases may produce unexpected string results","Payment of 0.005 USDC required per call; missing or invalid payment returns 402"],"whenToPreferThis":"Use this endpoint when you need a reliable, on-demand conversion between human-readable token amounts and raw EVM base units for any ERC-20 or EVM-compatible token, especially when the token's decimal count varies (e.g. USDC=6, ETH=18, WBTC=8). Prefer this over custom code when working in agent pipelines where introducing arithmetic errors in payment or transfer amounts would be costly.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-18T12:51:22.516Z","isFirstParty":false}