
x402ti
io.github.malwowar-maker/x402ti
11 pay-per-call crypto market, safety, arb, macro & slippage tools on Base USDC via x402 V2.
Documentation
x402ti (v3) - Pay-Per-Call Market, Safety & Execution Intelligence for AI Agents
Deterministic x402 V2 market, token-safety, arbitrage, macro, and pre-trade execution API on Base Mainnet (eip155:8453, USDC) - 11 endpoints ($0.005-$0.02/call), zero API keys, zero subscriptions, and strict Pay-Only-On-Success settlement (400/404/502/503 never settle).
Informational market/security data only; not financial advice.
- Live Base URL: https://x402ti.malwowar.workers.dev
- x402scan Listing (11/11 live): https://www.x402scan.com/server/ca2b4d4b-52eb-43f4-9fb0-4eba4d557b9e
- npm MCP Server:
x402ti-mcp(npx -y x402ti-mcp) - Discovery:
/.well-known/x402|/.well-known/agent-card.json|/openapi.json|/llms.txt|/health
30-Second Quickstart
Option A: Claude Desktop / Cursor / OpenClaw (MCP via npx)
Add this block to claude_desktop_config.json or your MCP client config:
{
"mcpServers": {
"x402ti": {
"command": "npx",
"args": ["-y", "x402ti-mcp"],
"env": {
"BUYER_PRIVATE_KEY": "0xYOUR_LOW_BALANCE_AGENT_WALLET_KEY",
"MAX_PAYMENT_USD": "$0.05"
}
}
}
}
Wallet tip: Fund a dedicated low-balance Base wallet (e.g.
$2-$5USDC) and keepMAX_PAYMENT_USDcapped at$0.05.
Option B: Zero-Install Discovery Probe (curl)
curl -s https://x402ti.malwowar.workers.dev/health
curl -s https://x402ti.malwowar.workers.dev/llms.txt
curl -i "https://x402ti.malwowar.workers.dev/v1/evm/safety?address=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913&chain=base"
(Unpaid /v1/* probes return HTTP 402 with exact x402 V2 PAYMENT-REQUIRED terms.)
When to Use Which Tool (Agent Playbooks)
| Agent Decision | Recommended Call(s) | Total Cost |
|---|---|---|
| Before buying a Base/EVM token | GET /v1/evm/safety + GET /v1/execution/quote-check?mode=evm | $0.02 |
| Before buying a Solana token | GET /v1/solana/safety?mint=<MINT> | $0.01 |
| Before placing a Hyperliquid perp trade | GET /v1/perps/snapshot?coin=BTC ($0.005) or GET /v1/execution/quote-check?mode=perps&coin=BTC ($0.01) | $0.005-$0.01 |
| Find cross-venue perp funding spreads | GET /v1/perps/funding-arb (Hyperliquid vs. dYdX v4 vs. Kraken) | $0.015 |
| Find Polymarket vs. Kalshi mispricings | GET /v1/predictions/arb (verify settlement rules whenever resolution_risk_warning: true) | $0.02 |
| Macro + crypto volatility regime brief | GET /v1/macro/liquidity + GET /v1/options/surface?currency=BTC | $0.025 |
Endpoints & Pricing (11 Paid Resources - Base Mainnet USDC)
Pre-Trade Safety & Execution Checks
| Method & Path | Price | Query Params | What It Returns |
|---|---|---|---|
GET /v1/evm/safety | $0.01 | address (req, 0x...), chain (base default, ethereum, arbitrum, optimism, polygon, bsc) | Deterministic 0-100 risk score, honeypot simulation, buy/sell taxes, GoPlus + Honeypot.is disagreement flags & DEX liquidity ratios |
GET /v1/execution/quote-check | $0.01 | mode (perps or evm, req), coin/side (perps) or token_out/chain/token_in (evm), sizes_usd | Multi-tier slippage ($1k/$10k/$50k+) via KyberSwap Aggregator or Hyperliquid L2, max_size_under_100bps_usd, and liquidity_grade (DEEP/ADEQUATE/THIN/ILLIQUID) |
GET /v1/solana/safety | $0.01 | mint (req, Base58 SPL mint) | Deterministic 0-100 RugCheck risk score, tier (LOW-CRITICAL), authority flags (mint/freeze/mutable), lp_locked_pct & liquidity/FDV ratios |
GET /v1/perps/snapshot | $0.005 | coin (req, e.g. BTC, ETH, kPEPE) | Mark/oracle basis (bps), hourly & annualized funding, OI USD, spread (bps), L2 depth imbalance & $10k buy/sell VWAP slippage |
Multi-Venue Scanners & Arbitrage
| Method & Path | Price | Optional Query Params | What It Returns |
|---|---|---|---|
GET /v1/predictions/arb | $0.02 | min_spread_bps (default 150), min_liquidity_usd (5000), query, limit (1-30) | Matches overlapping Polymarket & Kalshi markets within a 72h expiry window for fee-adjusted net edge (bps), annualized APY & resolution_risk_warning |
GET /v1/predictions/scanner | $0.015 | venue (all/polymarket/kalshi), query, min_volume_24h_usd, limit (1-25) | Live Polymarket + Kalshi scanner: implied probabilities, spreads, 24h volume/liquidity ratios, keyword search & high-conviction annualized carry |
GET /v1/perps/funding-arb | $0.015 | min_oi_usd (100000), limit (1-25), coin | Live 3-venue annualized funding spread scanner comparing Hyperliquid vs. dYdX v4 vs. Kraken Futures with bottleneck OI & mark spreads |
GET /v1/perps/screener | $0.01 | min_oi_usd (1000000), limit (1-25) | Scans ~180+ Hyperliquid perps: market breadth, median funding APR, extreme funding, basis dislocations & turnover leaderboards |
GET /v1/solana/trending | $0.015 | limit (1-8, default 5), max_risk_score (0-100) | Live trending Solana pools pre-screened in parallel with RugCheck risk scores, authority flags, liquidity & 24h trader flow |
Options Volatility & US Macro Liquidity
| Method & Path | Price | Optional Query Params | What It Returns |
|---|---|---|---|
GET /v1/options/surface | $0.015 | currency (BTC default, or ETH) | Distills hundreds of live Deribit options into ATM IV term structure, contango/backwardation slope, OTM skew, exact Max Pain & Call/Put OI walls |
GET /v1/macro/liquidity | $0.01 | lookback_obs (2-20, default 5) | Combines 5 official US Treasury & NY Fed feeds: US public debt, TGA balance & flows, ON RRP, EFFR/SOFR funding spread & net USD liquidity impulse (-DeltaTGA - DeltaRRP) |
Sample Agent Payload
Pre-swap EVM quote check (GET /v1/execution/quote-check?mode=evm&chain=base&token_out=0x4200...0006):
{
"mode": "evm",
"chain": "base",
"summary": {
"executable": true,
"liquidity_grade": "DEEP",
"max_size_under_100bps_usd": 250000,
"worst_executable_impact_bps": 18.4,
"flags": []
},
"tiers": [
{ "size_usd": 1000, "executable": true, "price_impact_bps": 4.2, "estimated_gas_usd": 0.01, "dexes_used": ["aerodrome"] },
{ "size_usd": 10000, "executable": true, "price_impact_bps": 8.7, "estimated_gas_usd": 0.01, "dexes_used": ["aerodrome", "uniswap-v3"] },
{ "size_usd": 50000, "executable": true, "price_impact_bps": 18.4, "estimated_gas_usd": 0.02, "dexes_used": ["aerodrome", "uniswap-v3"] }
]
}
TypeScript SDK Example (@x402/fetch, with Spend Cap)
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const account = privateKeyToAccount(process.env.BUYER_PRIVATE_KEY as `0x${string}`);
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.05" });
registerExactEvmScheme(client, { signer: account });
const fetchWithPay = wrapFetchWithPayment(fetch, client);
// 1. Audit a Base token before swapping ($0.01)
const safety = await fetchWithPay(
"https://x402ti.malwowar.workers.dev/v1/evm/safety?address=0x4200000000000000000000000000000000000006&chain=base"
).then((r) => r.json());
// 2. Simulate $1k / $10k / $50k DEX execution impact ($0.01)
const quote = await fetchWithPay(
"https://x402ti.malwowar.workers.dev/v1/execution/quote-check?mode=evm&chain=base&token_out=0x4200000000000000000000000000000000000006"
).then((r) => r.json());
Also discoverable via AgentCash CLI:
npx -y @agentcash/discovery@latest discover https://x402ti.malwowar.workers.dev --json
Architecture & Self-Hosting
- Runtime: Cloudflare Workers (
nodejs_compat) + Cloudflare D1 + Hono + strict TypeScript ($0infrastructure) - Payments: Strict x402 V2 (
@x402/hono,@x402/core,@x402/evm,@x402/extensions,@coinbase/x402) lazily initialized only on/v1/* - Caching & Fail-Closed Resilience: Bounded 500-entry in-isolate TTL
Mapcache + best-effort Edge Cache, 3.5sAbortControllertimeouts, graceful partial-venue fallbacks, and strict fail-closed502on missing security engines (never marks unverified tokens as safe) - Operator Console: Private dark-mode dashboard at
/dashboard(SHA-256 Bearer auth, manual refresh only, daily cron pruning old unpaid402probes while keepingSETTLEDrows forever, and a503pause gate)
npm install
cp .dev.vars.example .dev.vars # fill CDP_API_KEY_ID, CDP_API_KEY_SECRET, DASHBOARD_TOKEN
npm run db:migrate:local
npm test
npm run dev
License
MIT - see LICENSE.
x402ti-mcpnpm install x402ti-mcp