Pre-flight transaction intelligence for Solana wallets, bots, and DEX frontends.
All endpoints require authentication via API key or JWT token.
X-API-Key: your_api_key # or Authorization: Bearer your_jwt_token
Simulate a single Solana transaction and get a full risk breakdown.
Auth required{
"transaction": "base64-encoded-solana-transaction"
}
{
"success": true,
"compute_units": 42000,
"fee_estimate_sol": 0.000005,
"priority_fees": {
"low": 1000,
"medium": 10000,
"high": 100000,
"very_high": 1000000,
"samples": 150
},
"failure_reason": null,
"failure_code": null,
"is_terminal": null,
"risk": {
"mev_score": 0.3,
"mev_level": "low",
"mev_type": "swap_frontrun",
"has_blacklisted_program": false,
"blacklisted_programs": [],
"dex_programs": [{"program_id": "JUP6...", "name": "Jupiter v6"}],
"token_risk": {
"mint": "...",
"symbol": "BONK",
"risk_score": 0.2,
"risk_level": "low",
"flags": [],
"top_holder_concentration": 0.15,
"has_mint_authority": false,
"has_freeze_authority": false,
"has_liquidity": true
},
"risk_level": "safe"
},
"logs": [],
"latency_ms": 47
}
| Level | Meaning |
|---|---|
safe | No issues detected |
low | Minor MEV exposure (e.g. simple swap) |
medium | Moderate risk (multi-hop swap, simulation warning) |
high | High MEV risk or terminal simulation failure |
critical | Blacklisted program or token rug-pull indicators |
| Code | Terminal? | Meaning |
|---|---|---|
insufficient_sol | Yes | Fee payer lacks SOL for fees |
insufficient_token_balance | Yes | Sender lacks token balance |
account_not_found | No | Required account missing (ATA?) |
blockhash_expired | No | Stale blockhash — rebuild tx |
program_error | No | On-chain program returned error |
Simulate up to 50 transactions in parallel.
Auth required{
"transactions": ["base64_tx_1", "base64_tx_2", "..."]
}
{
"results": [
{"index": 0, "success": true, "risk_level": "safe", "mev_score": 0.0, ...},
{"index": 1, "success": false, "risk_level": "high", "failure_code": "insufficient_sol", ...}
],
"total": 2,
"succeeded": 1,
"failed": 1
}
Get your simulation usage statistics.
Auth required{
"total_simulations": 12450,
"success_count": 11200,
"fail_count": 1250,
"success_rate": 0.9,
"avg_latency_ms": 52.3,
"avg_mev_score": 0.12,
"mev_distribution": {"none": 8000, "low": 3000, "medium": 1200, "high": 250},
"top_failure_reasons": [{"code": "insufficient_sol", "count": 500}],
"risk_distribution": [{"level": "safe", "count": 9000}],
"simulations_today": 340,
"simulations_7d": 2100
}
Paginated simulation history.
Auth required| Param | Type | Default |
|---|---|---|
limit | integer | 50 (max 200) |
offset | integer | 0 |
success | boolean | (all) |
npm install @txshield/sdk
import { TxShieldClient } from "@txshield/sdk";
const txshield = new TxShieldClient({
baseUrl: "https://api.txshield.dev",
apiKey: "your_api_key",
});
const result = await txshield.simulate(base64Transaction);
if (result.risk.risk_level === "critical") {
console.warn("Transaction blocked:", result.risk);
} else {
// Safe to submit
}
| Plan | Simulations/month | Price |
|---|---|---|
| Free | 1,000 | $0 |
| Starter | 50,000 | $49/mo |
| Growth | 150,000 | $99/mo |
| Pro | 500,000 | $299/mo |
| Custom | Unlimited | Contact us |
Overages: ~$0.001/sim. First 2 weeks free on paid plans.