Skip to content

Benrolfe1/402-crypto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

402-crypto — Curated BTC Market Data for AI Agents

Pay-per-use MCP server providing analysis-ready BTC perpetuals market data as structured JSON.

36 data products. 7 independent sources. Multi-timeframe analysis. Reliability scoring. x402 autonomous payment on Arbitrum.

No account needed. AI agents can discover, connect, and pay autonomously.

Live now: https://402-crypto.com


Why 402-crypto Instead of Raw Exchange APIs

Raw exchange APIs return data dumps. 402-crypto returns curated intelligence:

Feature Raw API 402-crypto
Timeframes 1 per call 6 in one call (1m → 1d)
Sources Single exchange 7 cross-validated sources
Reliability Unknown Per-source scoring (high/medium/low)
Limitations Undocumented Explicitly declared per product
Labels "Overbought" retail bias Raw numeric values only
Freshness You check Staleness tracked in seconds
Format Varies per exchange Unified JSON envelope

Every product is battle-tested in live BTC perpetuals trading by fintech professionals. The same pipeline that powers real trading decisions with real capital.


Quick Start

Option 1: MCP Client (Recommended)

Add to your MCP config (Claude Desktop, Cursor, OpenClaw, or any MCP client):

{
  "mcpServers": {
    "402crypto": {
      "url": "https://402-crypto.com/mcp"
    }
  }
}

Your LLM gets two tools:

  • list_products — Browse all 36 products with descriptions and pricing
  • get_market_data — Fetch any product by ID

Option 2: REST API with API Key

# Browse products (no auth needed)
curl https://402-crypto.com/api/v1/products

# Fetch data with API key
curl -H "Authorization: Bearer grd_your_key" \
  https://402-crypto.com/api/v1/products/rsi?symbol=BTC

Option 3: x402 Autonomous Payment (No Account)

# 1. Request without auth → HTTP 402 with payment details
curl https://402-crypto.com/api/v1/products/rsi
# Returns: { "x402Version": 1, "accepts": [{ "network": "arbitrum-one", ... }] }

# 2. Pay USDC on Arbitrum (~250ms finality)

# 3. Retry with payment proof
curl -H "X-PAYMENT: 0x<tx_hash>" \
  https://402-crypto.com/api/v1/products/rsi?symbol=BTC

Products

Tier 1 — Snapshots ($0.001/call)

Product Description
price Live BTC mid-price from Hyperliquid
funding Current perpetual funding rate + annualised equivalent
dominance BTC/ETH/stablecoin/alt market dominance (CoinGecko)

Tier 2 — Standard ($0.005/call)

Product Description
rsi RSI across 1m, 5m, 15m, 30m, 1h, 4h, 1d (500+ bars)
candles OHLCV candlestick data with volume
atr Average true range at multiple timeframes
macd MACD with signal crossover and momentum classification
bollinger_bands Bollinger Bands with volatility regime
rsi_trendlines RSI S/R trendlines with breakout detection
cvd_realtime Cumulative volume delta (Hyperliquid WebSocket)
coinglass_cvd Perps + spot CVD aggregated across exchanges
coinglass_ls_ratio Global long/short account ratio
coinglass_oi_history Open interest with 24h directional trend
coinglass_max_pain Options max pain strike (Deribit)
orderbook Bid/ask depth and imbalance
volume_profile POC, VAH, VAL, HVN/LVN zones
liquidations 24h rolling liquidation totals (long/short split)
liq_heatmap Per-price-level liquidation concentrations
sr_signals LuxAlgo-style support/resistance zones
price_channels High/low channel structure with compression state
market_structure Structural levels, VWAP, volatility
key_levels Daily/weekly opens, session H/L, rolling extremes
basis Spot-perp basis spread (carry cost signal)
correlation BTC vs ETH, SOL, S&P 500, DXY correlations
sp500 S&P 500 (SPY) price for macro correlation

Tier 2 — On-Chain ($0.01/call)

Product Description
sth_metrics STH-SOPR with trend, LTH-SOPR, realized price bands
supply_profit_loss Supply in profit %, NUPL zone, MVRV
exchange_flows Exchange netflow, reserve, Coinbase premium
onchain_regime Taker buy/sell ratio, MPI, NVT Golden Cross
options_surface Deribit ATM implied vol term structure + skew

Tier 3 — Composites ($0.02/call)

Product Description
order_flow CVD + OI + funding from 3 independent sources
structure Price channels + S/R signals + market structure
momentum Full RSI + MACD momentum profile
volatility Bollinger Bands + ATR complete picture
ohlcv_rsi Price action + multi-TF momentum overlay
ohlcv_rsi_atr Price + momentum + volatility for sizing

Data Format

Every product returns a unified JSON envelope:

{
  "product": {
    "id": "rsi",
    "name": "RSI Multi-Timeframe",
    "tier": 2
  },
  "meta": {
    "symbol": "BTC",
    "timestamp_utc": "2026-03-21T12:00:00.000Z",
    "sources": [
      {
        "tool": "rsi_multi_timeframe",
        "source": "hyperliquid_api",
        "reliability": "high",
        "status": "ok",
        "staleness_seconds": 2.3,
        "limitations": ["Wilder smoothing: first 140 bars unreliable"]
      }
    ],
    "overall_reliability": "high"
  },
  "data": {
    "rsi": {
      "1m":  { "value": 42.3, "bars_computed": 500 },
      "5m":  { "value": 55.1, "bars_computed": 500 },
      "15m": { "value": 54.9, "bars_computed": 500 },
      "1h":  { "value": 58.9, "bars_computed": 500 },
      "4h":  { "value": 61.2, "bars_computed": 500 },
      "1d":  { "value": 54.5, "bars_computed": 500 }
    }
  }
}

Key design principles:

  • No retail labels — raw numeric values, no "overbought"/"bearish"
  • Reliability per source — your LLM knows what to trust
  • Limitations declared — known blind spots listed explicitly
  • Staleness tracked — freshness in seconds, not guessed

Pricing

All prices in USDC on Arbitrum One (250ms finality, sub-cent gas).

Tier Price Products
Tier 1 — Snapshots $0.001/call 3 products
Tier 2 — Standard $0.005/call 22 products
Tier 2 — On-Chain $0.01/call 5 products
Tier 3 — Composites $0.02/call 6 products

Prepaid Balance (Recommended for High Volume)

Deposit USDC to eliminate per-call payment latency:

Wallet: 0x37B861F6e05a10C87938Ebc8a574197Dd525C866
Chain:  Arbitrum One
Token:  USDC (0xaf88d065e77c8cC2239327C5EDb3A432268e5831)
  1. Send any amount of USDC to the wallet above
  2. Note your transaction hash
  3. API key issued with balance loaded

Larger deposits receive higher rate limits.


x402 Protocol

402-crypto implements the x402 protocol for autonomous AI agent payments:

Client                          402-crypto
  |                                 |
  |  GET /api/v1/products/rsi       |
  |  (no auth)                      |
  |-------------------------------->|
  |                                 |
  |  HTTP 402                       |
  |  { x402Version: 1,              |
  |    accepts: [{                  |
  |      network: "arbitrum-one",   |
  |      maxAmountRequired: "5000", |
  |      payTo: "0x37B8...",        |
  |      asset: "0xaf88..." }] }    |
  |<--------------------------------|
  |                                 |
  |  Pay 0.005 USDC on Arbitrum     |
  |  (~250ms)                       |
  |                                 |
  |  GET /api/v1/products/rsi       |
  |  X-PAYMENT: 0x<tx_hash>        |
  |-------------------------------->|
  |                                 |
  |  HTTP 200                       |
  |  { product, meta, data }        |
  |<--------------------------------|

Compatible with Coinbase AgentKit and any x402-aware HTTP client.


Data Sources

Source Data Reliability
Hyperliquid Price, candles, CVD, orderbook High
CoinGlass Funding, OI, liquidations, L/S ratio Medium
CryptoQuant SOPR, NUPL, MVRV, exchange flows Medium
Deribit Options IV surface, max pain Medium
Finnhub S&P 500 (SPY) pricing Medium
CoinGecko Market dominance percentages Medium
Yahoo Finance DXY (USD Index) Medium

Coverage

  • BTC perpetuals — all 36 products live now
  • ETH perpetuals — coming soon
  • SOL perpetuals — coming soon
  • Historical backtesting — planned
  • WebSocket streaming — planned

Links

Resource URL
Website https://402-crypto.com
MCP Endpoint https://402-crypto.com/mcp
REST API https://402-crypto.com/api/v1/products
LLM Discovery https://402-crypto.com/llms.txt
Health Status https://402-crypto.com/health
API Docs (OpenAPI) https://402-crypto.com/docs

License

Proprietary. The API is a commercial service. This repository contains documentation only.

About

Curated BTC market data for AI agents via MCP. x402 autonomous payment on Arbitrum. 36 products, 7 sources, multi-timeframe analysis, reliability scoring. https://402-crypto.com

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors