Tokens left a Solana wallet and you don't know why? The first two questions are always the same: which transactions touched this wallet recently, and does any address still have permission to move its tokens. Wallet Doctor's /v1/drain_forensics endpoint answers both in one GET request: the last 25 transaction signatures with failed ones flagged, plus every active SPL token delegate (SPL Token and Token-2022).
| Field | Meaning |
|---|---|
recent_transactions | Up to 25 most recent signatures for the wallet, each with blockTime (Unix seconds) and status (ok or failed) |
failed_count | How many of those failed. A burst of failed transactions can mean a bot racing you for the remaining balance |
active_delegates | Token accounts that currently have a delegate: token_account, mint, delegate, delegated_amount, balance, program |
note | A one-line reminder of what to do with the result |
Example response (shape as served; values illustrative):
{"ok": true,
"wallet": "YOUR_WALLET",
"recent_transactions": [{"signature": "5h…", "blockTime": 1794496949, "status": "ok"}, …],
"failed_count": 0,
"active_delegates": [],
"note": "Active delegates can move the delegated tokens; revoke any you do not recognise. Use txtrace on suspicious signatures."}
To dig into one suspicious signature, /v1/txtrace ($0.0005) returns its status, fee, SOL balance changes per account and the first 20 program log lines.
delegated_amount: that address can still move those tokens. Revoke it from the owner wallet (spl-token revoke <TOKEN_ACCOUNT>, or your wallet app's approvals screen). More on this in the token approvals guide.Unpaid, the endpoint answers 402 Payment Required with its price. Trimmed live response:
curl -i "https://manhourplan.com/wallet-doctor/v1/drain_forensics?wallet=YOUR_WALLET"
HTTP/2 402
{"x402Version":2,
"accepts":[
{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","amount":"2500"},
{"scheme":"exact","network":"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","asset":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","amount":"2500", …}],
"error":"PAYMENT-SIGNATURE header is required"}
amount: "2500" is USDC with 6 decimals: $0.0025 per check, payable on Base or Solana. Payment settles through the PayAI facilitator only after the lookup succeeds; if the Solana RPC fails, you are not charged. With the official client:
import { wrapFetchWithPaymentFromConfig } from "@x402/fetch";
import { ExactEvmScheme } from "@x402/evm";
import { privateKeyToAccount } from "viem/accounts";
const pay = wrapFetchWithPaymentFromConfig(fetch, {
schemes: [{ network: "eip155:8453", client: new ExactEvmScheme(privateKeyToAccount(process.env.BOT_KEY)) }],
});
const res = await pay("https://manhourplan.com/wallet-doctor/v1/drain_forensics?wallet=YOUR_WALLET");
const { result } = await res.json();
console.log(result.failed_count, result.active_delegates);
MCP clients can call the same check as the drain_forensics tool on https://manhourplan.com/wallet-doctor/mcp. No wallet set up in code? The try page lets you pay for one call from Coinbase Wallet, MetaMask or Phantom; it shows the price before you sign.
The check is one getSignaturesForAddress call plus the two getTokenAccountsByOwner calls from the approvals guide:
curl -s https://api.mainnet-beta.solana.com -H 'content-type: application/json' -d '{
"jsonrpc":"2.0","id":1,"method":"getSignaturesForAddress","params":["YOUR_WALLET",{"limit":25}]}'
A block explorer (Solscan, Solana Explorer) shows the same history for free. The paid endpoint is for bots and agents that need it as one machine-readable call without an RPC key.