{"uid":"cap_c8fzzxQD0mCoPbDppJBFe","slug":"fastx402-token-unit-converter-0668a885","name":"FastX402 Token Unit Converter","description":"146 pay-per-call tools for AI agents, from $0.001 per request in USDC on Base or Solana with x402. No account, no API key.","url":"https://fastx402.tools/token-units?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["value","decimals","direction"],"properties":{"value":{"type":"string","description":"Amount: a decimal like 1.5 for to_atomic, or an integer like 1500000 for from_atomic"},"decimals":{"type":"string","description":"Token decimals, 0-36 (USDC 6, ETH 18)"},"direction":{"enum":["to_atomic","from_atomic"],"type":"string","description":"to_atomic or from_atomic"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"atomic":{"type":"string"},"decimal":{"type":"string"},"decimals":{"type":"integer"}}}}}}},"responseSchema":{"type":"json","example":{"atomic":"1500000","decimal":"1.5","decimals":6}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_MZi-9RvkDFpVNFn-hctDo","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts a token amount between its human-readable decimal form and its on-chain atomic (integer) unit representation given a token's decimal precision.","exampleAgentPrompt":"Convert 1.5 USDC to its atomic unit value — USDC has 6 decimals, so go to_atomic direction.","exampleUseCases":[{"title":"Prepare USDC amount for on-chain transfer","prompt":"I need to send 2.75 USDC in a smart contract call — convert 2.75 to its atomic integer value using 6 decimals, going to_atomic."},{"title":"Read atomic ETH value as human-readable decimal","prompt":"I got back 18500000000000000 from a contract — that's an ETH amount with 18 decimals. Can you convert it from_atomic so I can see the readable decimal value?"},{"title":"Calculate exact token units for DeFi transaction","prompt":"I want to supply 500 USDT (6 decimals) to a DeFi protocol that expects the amount in atomic units — convert 500 to_atomic for me."}],"resultDescription":"Returns a JSON object with three fields: 'atomic' (the integer/smallest-unit representation as a string), 'decimal' (the human-readable decimal string), and 'decimals' (the integer number of decimal places used in the conversion).","failureModes":["Missing required query parameters (value, decimals, direction) returns an error","Invalid direction enum value (not 'to_atomic' or 'from_atomic') causes rejection","Non-numeric 'value' string causes a parse error","Decimals outside 0-36 range may cause unexpected results","Passing a non-integer string when direction is from_atomic may fail parsing"],"whenToPreferThis":"Use this endpoint when you need a quick, reliable, pay-per-call conversion between human-readable token amounts and their on-chain atomic integer equivalents for any ERC-20 or EVM-compatible token, without needing to set up an account or API key. Prefer it over manual arithmetic for precision-sensitive DeFi or contract interactions.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-17T12:40:47.626Z","isFirstParty":false,"canonicalSlug":"fastx402-token-unit-converter-0668a885"}