API Documentation

AlphaWire exposes an MCP (Model Context Protocol) endpoint that AI agents can call to query trading signals. All requests require payment via the x402 protocol on X Layer.

Endpoint

All MCP tool calls are sent as POST requests to /api/mcp with a JSON body containing the tool name and arguments.

POST /api/mcp Content-Type: application/json { "tool": "get_signals", "arguments": { "limit": 10, "token": "BTC" } }

Payment

The endpoint is gated by the x402 Payment Protocol. Unpaid requests receive HTTP 402 with payment instructions. After paying, the client replays the request with the payment header to receive the data.

Signal Query
1.00 USDT
get_signals, get_event_detail, get_momentum_forecast
Monitor Setup
0.50 USDT
monitor_url, list_monitored_sources
NetworkX Layer (eip155:196)
TokenUSDT0
Revenue Wallet0xedcb1bd369a3ad9c940726149622327808816015
Schemeexact (instant settlement)

MCP Tools

Five tools available to AI agents:

monitor_url
Add a new URL to the monitoring engine. The page will be checked at the given interval.
ParameterTypeRequiredDescription
urlstringYesFull URL to monitor
namestringNoHuman-readable label
intervalSecnumberNoCheck interval in seconds (min 30, default 120)
get_signals
Retrieve the latest classified signals with optional filtering.
ParameterTypeRequiredDescription
limitnumberNoMax results (default 20, max 100)
tokenstringNoFilter by token symbol (e.g. "BTC")
eventTypestringNoFilter: listing, delisting, hack, regulatory, etc.
get_event_detail
Deep-dive into a specific signal by ID. Returns the full PageChange diff and momentum window.
ParameterTypeRequiredDescription
event_idstringYesSignal ID (e.g. "sig_xyz123")
get_momentum_forecast
Get the momentum window forecast for an event type. Returns estimated exit window, peak time, and active status.
ParameterTypeRequiredDescription
event_typestringYesEvent type to forecast
tokenstringNoToken symbol
list_monitored_sources
List all monitored sources with status, last-checked time, and content hash.
ParameterTypeRequiredDescription
statusstringNoFilter by "active" or "paused"

Example: Get Latest Signals

# 1. Agent sends request (gets 402) curl -X POST https://your-host/api/mcp \ -H "Content-Type: application/json" \ -d '{"tool":"get_signals","arguments":{"limit":5}}' # Response: 402 Payment Required # Headers include payment requirements for 1 USDT on X Layer # 2. Agent pays via x402 protocol # (OKX Agent Payments Protocol handles signing + settlement) # 3. Agent replays with payment header → gets signals { "ok": true, "data": { "count": 5, "signals": [ { "eventType": "listing", "direction": "bullish", "confidence": 85, "affectedTokens": ["BTC","SOL"], "momentumWindow": { "exitWindowHuman": "48.0h", "peakTimeEstimate": "2024-..." } } ] } }

Momentum Window Reference

Event TypeDirectionExit WindowPeak Estimate
listingbullish48 hours6 hours
delistingbearish4 hours1 hour
hackbearish2 hours15 minutes
regulatorybearish7 days24 hours
partnershipbullish24 hours3 hours
policyneutral3 days8 hours