{"uid":"cap_co7IGcKxkc6hi-YDaH9oN","slug":"vybe-solana-analytics-api-close-token-accounts-utility-4faf5366","name":"Vybe Solana Analytics API – Close Token Accounts Utility","description":"Closes zero-balance token accounts to reclaim rent. Supports manual or auto-discovery.\n\nThis route is currently in beta and is subject to change.","url":"https://x402-api.vybenetwork.xyz/v4/wallets/util/close-token-accounts?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","required":["ownerAddress"],"properties":{"gasless":{"type":"boolean","nullable":true,"description":"Use Vybe fee payer for gas"},"partner":{"type":"string","nullable":true,"description":"Partner identifier"},"rentFee":{"type":"number","format":"double","nullable":true,"description":"Fee percentage on recovered rent (0-1, e.g., 0.20 for 20%)"},"ownerAddress":{"type":"string","format":"pubkey"},"accountAddresses":{"type":"array","items":{"type":"string","format":"pubkey"},"nullable":true,"description":"Specific token account addresses to close (auto-fetches if not provided)"}}},"responseSchema":{"type":"object","required":["transactions","errors","summary"],"properties":{"errors":{"type":"array","items":{},"description":"Array of error objects for failed accounts"},"summary":{"type":"object","required":["totalAccountsClosed","totalRentRecovered","totalFeeCharged","netRecovered"],"properties":{"netRecovered":{"type":"number","format":"double","description":"Net recovered"},"totalFeeCharged":{"type":"number","format":"double","description":"Total fee deducted (in SOL units)"},"totalRentRecovered":{"type":"number","format":"double","description":"Total SOL recovered from rent (in SOL units)"},"totalAccountsClosed":{"type":"string","description":"Total number of token accounts closed"}}},"transactions":{"type":"array","items":{"type":"object","required":["transaction","accountsClosed","rentRecovered","feeCharged"],"properties":{"feeCharged":{"type":"number","format":"double","description":"Fee deducted (in SOL units)"},"transaction":{"type":"string","description":"Base64-encoded unsigned transaction"},"rentRecovered":{"type":"number","format":"double","description":"SOL recovered from rent (in SOL units)"},"accountsClosed":{"type":"integer","format":"int32","minimum":0,"description":"Number of accounts closed in this transaction"}}},"description":"Array of transaction objects"}},"description":"Wallet performance attribution response for API endpoints.\n\nAll fields default to 0.0 when no historical data is available."},"example":null,"exampleRequest":null,"tags":["x402","finance"],"displayCostAmount":"0.003","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","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.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.012","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.012","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_adMFFI_2b8RWLWP8Y6yH-","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.012","costPer":"request","priority":0,"asset":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Identifies and closes empty or dust Solana token accounts for a wallet to reclaim rent SOL","exampleAgentPrompt":"Can you close all my empty and dust token accounts on Solana for wallet address 7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU and reclaim the rent SOL back into my main wallet?","exampleUseCases":null,"resultDescription":"Returns a list of token accounts that were closed, the amount of SOL reclaimed from rent exemption deposits, and relevant transaction signatures confirming the on-chain state changes.","failureModes":["Wallet has no closeable token accounts — returns empty result","Invalid or malformed wallet public key — 400 bad request","Token accounts still hold non-zero balances — cannot be closed","Payment insufficient or x402 payment header missing — 402 Payment Required","Solana network congestion causing transaction failures — 503 or timeout","Wallet does not own the specified token accounts — authorization error"],"whenToPreferThis":"Use this endpoint when an agent needs to help a Solana wallet owner reclaim SOL locked as rent in unused or zero-balance SPL token accounts. Prefer this over generic Solana RPC calls when you want a managed, analytics-enriched approach with per-call micropayment billing via x402 USDC and no API key setup required.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-24T12:32:19.645Z","isFirstParty":false,"canonicalSlug":"vybe-solana-analytics-api-close-token-accounts-utility-4faf5366"}