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
| Network | X Layer (eip155:196) |
| Token | USDT0 |
| Revenue Wallet | 0xedcb1bd369a3ad9c940726149622327808816015 |
| Scheme | exact (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.
| Parameter | Type | Required | Description |
|---|---|---|---|
| url | string | Yes | Full URL to monitor |
| name | string | No | Human-readable label |
| intervalSec | number | No | Check interval in seconds (min 30, default 120) |
get_signals
Retrieve the latest classified signals with optional filtering.
| Parameter | Type | Required | Description |
|---|---|---|---|
| limit | number | No | Max results (default 20, max 100) |
| token | string | No | Filter by token symbol (e.g. "BTC") |
| eventType | string | No | Filter: listing, delisting, hack, regulatory, etc. |
get_event_detail
Deep-dive into a specific signal by ID. Returns the full PageChange diff and momentum window.
| Parameter | Type | Required | Description |
|---|---|---|---|
| event_id | string | Yes | Signal 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
| event_type | string | Yes | Event type to forecast |
| token | string | No | Token symbol |
list_monitored_sources
List all monitored sources with status, last-checked time, and content hash.
| Parameter | Type | Required | Description |
|---|---|---|---|
| status | string | No | Filter 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 Type | Direction | Exit Window | Peak Estimate |
|---|---|---|---|
| listing | bullish | 48 hours | 6 hours |
| delisting | bearish | 4 hours | 1 hour |
| hack | bearish | 2 hours | 15 minutes |
| regulatory | bearish | 7 days | 24 hours |
| partnership | bullish | 24 hours | 3 hours |
| policy | neutral | 3 days | 8 hours |