{"uid":"cap_PbGpWk2i9PwOzdb9UrzJz","slug":"token-raw-to-human-amount-91ac194f","name":"Token Raw to Human Amount","description":"Scale raw token units by decimals into human-readable amounts. Call when rendering balances or logs that store raw integer token units. Returns human amount plus raw and decimals as deterministic JSON for $0.001 USDC via x402 on Base. First-party local math only—no RPC, live market feed, API keys, storage, or mediagen. Advisory only; the caller owns capital, risk, and production controls.","url":"https://api.delx.ai/api/v1/x402/token-raw-to-amount","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"raw":{"type":"string","description":"Input field: raw."},"decimals":{"type":"integer","description":"Input field: decimals."}}},"responseSchema":{"type":"json","example":{"raw":"1250000","amount":1.25,"schema":"delx/util-token-raw-to-amount/v1","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_4gH6jyDbviRlRCW4iW-UN","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 raw integer token units (e.g. wei, satoshi) into human-readable decimal amounts by scaling with the token's decimal places.","exampleAgentPrompt":"Convert a raw token amount of 1500000000 with 6 decimals into its human-readable amount — what's the actual balance I should display?","exampleUseCases":[{"title":"Display ERC20 wallet balance","prompt":"I have a raw USDC balance of 2500000000 from the blockchain with 6 decimals — what's the human-readable amount I should show the user?"},{"title":"Parse token transfer event log","prompt":"I got a Transfer event log from an ERC20 contract with a raw value of 1000000000000000000 and 18 decimals. What does that convert to in human-readable token units?"},{"title":"Format DeFi yield amount","prompt":"My protocol returned a raw reward amount of 750000 with 6 decimals. Convert that to a human-readable figure so I can display the user's earned yield."}],"resultDescription":"Returns a deterministic JSON object containing the human-readable token amount (raw divided by 10^decimals), the original raw amount, and the decimals used — computed locally without any RPC call or external data source.","failureModes":["Missing or invalid 'raw' string causes a validation error","Non-integer or negative decimals value may return an error","Extremely large raw values may hit precision limits depending on implementation","Payment failure via x402 if USDC balance is insufficient"],"whenToPreferThis":"Use this endpoint when you need a quick, deterministic, pure-math conversion from raw on-chain token integers to human-readable decimals — especially in agent pipelines processing ERC20 balances, event logs, or DeFi positions, without needing any RPC connection, API key, or live data feed. Prefer this over manual calculation when you want a clean, validated JSON response with the result and provenance fields included.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T06:57:59.965Z","isFirstParty":false}