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": 68
}
| 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, apply safety rules, and submit — all in one call. Send a signed transaction and TxShield handles everything: simulation, risk checks, and routing (direct RPC or Jito MEV protection).
Auth required{
"transaction": "base64-encoded-signed-solana-transaction"
}
That's it. Sensible defaults protect against failed simulations, high MEV risk, and blacklisted programs.
Override any rule. Only include the fields you want to change.
{
"transaction": "base64-encoded-signed-solana-transaction",
"policy": {
"max_mev_score": 0.5,
"max_slippage_bps": 100,
"block_risky_tokens": true
}
}
| Field | Type | Default | Description |
|---|---|---|---|
require_simulation_pass | bool | true | Block if simulation fails |
max_risk_level | string | "high" | Block if risk exceeds this (safe/low/medium/high/critical) |
max_mev_score | float | 0.7 | Block if MEV score exceeds this (0.0–1.0) |
jito_threshold | float | 0.4 | Route via Jito bundle if MEV score exceeds this |
block_if_known_bots | bool | false | Block if known sandwich bots detected on pair |
force_jito | bool | false | Always submit via Jito regardless of MEV score |
block_blacklisted | bool | true | Block transactions with malicious programs |
block_risky_tokens | bool | false | Block if token screening detects rug-pull/honeypot |
block_token_flags | string[] | [] | Specific flags: "rug_pull", "honeypot", "freeze_authority" |
max_slippage_bps | int | null | Block if estimated slippage exceeds this (basis points) |
max_compute_units | int | null | Block if compute units exceed this |
max_fee_sol | float | null | Block if estimated fee exceeds this (SOL) |
{
"simulation_success": true,
"action": "submitted",
"reason": "Low MEV risk — submitted via direct RPC",
"signature": "5xK2gR...",
"jito_bundle_id": null,
"route": "direct_rpc",
"mev_score": 0.03,
"risk_level": "safe",
"recommended_priority_fee": 5000,
"compute_units": 148230,
"policy_applied": {
"require_simulation_pass": true,
"max_risk_level": "high",
"max_mev_score": 0.7,
"jito_threshold": 0.4,
"block_blacklisted": true,
"block_risky_tokens": false,
"max_slippage_bps": null
},
"latency_ms": 85
}
| Action | Meaning |
|---|---|
submitted | Transaction passed all checks and was submitted to Solana |
blocked | Simulation passed but policy blocked it (MEV, risk, slippage, etc.) |
simulation_failed | Simulation failed — transaction would fail on-chain |
| Route | When |
|---|---|
direct_rpc | MEV score below Jito threshold — submitted via normal Solana RPC |
jito_bundle | MEV score above threshold or force_jito=true — submitted via Jito for sandwich protection |
none | Transaction was blocked or simulation failed — not submitted |
Reliable transaction landing. Multi-RPC with auto-retry, optional Jito routing, and confirmation tracking.
Auth required{
"transaction": "base64-encoded-signed-solana-transaction"
}
{
"transaction": "base64-encoded-signed-solana-transaction",
"use_jito": true,
"wait_confirmation": true,
"max_retries": 3
}
| Field | Type | Default | Description |
|---|---|---|---|
use_jito | bool | false | Route via Jito for MEV protection |
wait_confirmation | bool | false | Wait up to 30s for on-chain confirmation before returning |
max_retries | int | 3 | Retry attempts across multiple RPCs (max 5) |
{
"signature": "5xK2gR...",
"route": "direct_rpc",
"confirmation": "confirmed",
"attempts": 1,
"latency_ms": 2450
}
| Feature | Raw RPC | TxShield /send |
|---|---|---|
| Staked connections | Only with paid RPC | Included |
| Multi-RPC fallback | You build it | Automatic (staked → public) |
| Auto-retry | You build it | Up to 5 attempts |
| Jito routing | Separate integration | One flag: use_jito: true |
| Confirmation tracking | You poll yourself | wait_confirmation: true |
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": 67.4,
"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://txshield.dev",
apiKey: "your_api_key",
});
const result = await txshield.simulate(base64Transaction);
if (result.risk.risk_level === "critical") {
console.warn("Blocked:", result.risk);
}
// Simplest — just send the signed transaction
const result = await txshield.execute(signedBase64Transaction);
// result.action: "submitted" | "blocked" | "simulation_failed"
// result.signature: "5xK2gR..." (if submitted)
// result.route: "direct_rpc" | "jito_bundle"
// With custom policy
const result = await txshield.execute(signedBase64Transaction, {
max_slippage_bps: 50,
block_risky_tokens: true,
force_jito: true,
});
| Endpoint | Price / call | Per 1,000 | Free tier | What it does |
|---|---|---|---|---|
/simulate | $0.002 | $2 | 20,000 / mo | Analyze — you submit |
/send | $0.001 | $1 | 10,000 / mo | Land it (multi-RPC, retry, confirm) |
/execute | $0.005 | $5 | 5,000 / mo | Analyze + smart submit + Jito |
Covers Solana + 7 EVM chains. No monthly minimums. Custom rules require Enterprise — contact sales.
| Plan | Instances | Price |
|---|---|---|
| Starter | 1 (Docker) | $299/mo |
| Pro | 3 (Helm) | $999/mo |
| Enterprise | Unlimited | $2,499/mo |
Self-hosted: unlimited simulations. Your data stays on your servers. License key required.