$ npm i okx-watchtower-middleware

Pre-Execution Security for Autonomous Trading Agents.

WatchTower doesn't just tell agents what's safe. It proves what they're allowed to do. Every autonomous action now carries a cryptographically verifiable execution authorization.

Protect every autonomous decision.

Integrate through the REST API or MCP Server and receive a machine-readable execution decision before your agent acts.

Synchronous API

Fast request-response authorization for autonomous agents that need an execution decision before every trade.

Native MCP Server

Bring the same authorization flow to MCP-compatible agents with a single tool interface and identical execution logic.

agent.ts
import { WatchTowerClient } from 'okx-watchtower-middleware';

const wt = new WatchTowerClient({ ... });

async function executeTrade(targetToken) {
  // 1. Request Execution Authorization (1 USDT via x402)
  const result = await wt.authorize({
    action: 'swap',
    token: targetToken,
  });

  // 2. Execute only after the verified permit gate
  if (!result.executable) {
    console.log(`Execution blocked: ${result.decision}`);
    return;
  }

  // 3. Permit verified — execute this exact intent
  console.log('✓ Execution Authorization verified');
  await router.swap(targetToken);
}
1. Agent Intent
{
"action": "swap",
"token": "0x123..."
}
WatchTower Oracle
4 Threat Modules
3. Execution Authorization
{
"decision": "AUTHORIZED",
"permit.id": "permit_a1b2...",
"signature": "0x1f3a..."
}

Multi-Layered Threat Detection

WatchTower combines live market, contract, holder, and activity signals into one decision your agent can use immediately.

Liquidity Intelligence

liquidity_usd: "low"
volume_24h: "thin"
pair_age: "new"

Contract DNA Scanner

is_honeypot: false
has_hidden_mint: true
can_take_back_ownership: true

Whale & Holder Analysis

top_10_holder_concentration: "85.4%"
creator_wallet_balance: "0.00"
is_supply_centralized: true

Social Threat Radar

social_links: "missing"
buy_sell_ratio: "skewed"
price_change_24h: "volatile"

A receipt your users can trust.

WatchTower authorizes execution with a verified Execution Permit, then anchors the decision on X Layer as an audit record. Your agent gets permission quickly, and your users get a receipt they can inspect.

API Pricing for Autonomous Scale

Pay only for the checks your agents use. Firewall is built for frequent screening; Authorization is built for decisions that may move capital.

Firewall

0.5 USDT / scan
  • Fast
  • Lightweight
  • Low cost
  • Immediate verdict
  • Designed for frequent checks
Popular

Authorization

1.0 USDT / authorization
  • Full threat intelligence
  • Deep analysis
  • Policy evaluation
  • Signed execution permit
  • On-chain attestation
  • Built for autonomous execution