{"uid":"cap_MPFvcmYTe7Xz-tPt7qhP1","slug":"solana-token-amount-converter-base-units-human-readable-ed1710f3","name":"Solana Token Amount Converter (Base Units ↔ Human Readable)","description":"Use before putting any token amount into a transaction. \"5 USDC\" is 5,000,000 base units; getting decimals wrong sends 1,000x too much or too little. Converts between human amounts and base units using the token's real on-chain decimals.","url":"https://solana-pulse-gateway-1021990235790.us-central1.run.app/api/tools/convert_amount?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":null,"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_xQLM21HkF-mikc1l3-EWl","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts between human-readable token amounts and on-chain base units using a token's real on-chain decimal precision, preventing transaction errors from decimal mismatches.","exampleAgentPrompt":"Before I build this transaction, convert 5 USDC to its correct base unit amount using the real on-chain decimals for the USDC mint on Solana — I don't want to send the wrong amount.","exampleUseCases":[{"title":"USDC transfer amount normalization","prompt":"I want to send 12.5 USDC to another wallet on Solana — can you convert that to the correct base units using the actual on-chain decimals before I put it in the transaction?"},{"title":"BONK meme token purchase conversion","prompt":"I'm buying BONK and the DEX expects a raw base unit amount. Convert 1,000,000 BONK to its on-chain base units using the real token decimals from the BONK mint address."},{"title":"Reverse conversion from raw chain amount","prompt":"I got back 500000000 base units from a Solana account balance for this token mint — can you convert that back to a human-readable amount using the token's actual decimals?"}],"resultDescription":"Returns the converted amount in the target unit (base units or human-readable), along with the token's on-chain decimal count used for the conversion, enabling agents to safely construct or validate Solana transactions with correct numeric precision.","failureModes":["Invalid or unrecognized token mint address returns an error","Token not found on-chain or not yet indexed","Network timeout when fetching decimals from Solana RPC","Input amount cannot be parsed or is negative","Mint address provided for wrong network (e.g. devnet vs mainnet)"],"whenToPreferThis":"Use this endpoint whenever an agent needs to translate a user-specified token amount (e.g. '5 USDC') into the exact base units required by Solana transaction instructions, or vice versa. It is essential before signing any SPL token transfer to avoid sending 1000x too much or too little due to decimal errors. Prefer this over hardcoding decimals (e.g. assuming 6 for USDC) because token decimals must be fetched from on-chain state and may differ per token.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-13T12:44:44.017Z","isFirstParty":false,"canonicalSlug":"solana-token-amount-converter-base-units-human-readable-ed1710f3"}