Docs📊 Trading & CryptoBTC Trading Signal
POST/api/btc-signal$0.01

📊 BTC Trading Signal

Composite BTC directional signal using 8 indicators from Binance and OKX derivatives: taker flow, open interest direction, funding rate, CVD divergence, mean reversion, long/short ratio, RSI extremes, and EMA trend. 57–64% accuracy on 5-candle lookahead (walk-forward validated).

Request Body

ParameterTypeRequiredDescriptionDefault
timeframestringoptionalCandle timeframe: 1m, 3m, 5m, 15m, 30m, 1h5m

Response Fields

FieldTypeDescription
directionstringSignal direction: up | down | neutral
confidencenumberConfidence score 0.5–0.85
pricenumberCurrent BTC price (USDT)
scorenumberRaw composite score (positive = bullish)
signals_firednumberNumber of indicators that fired
indicatorsobjectPer-indicator values and signals
metaobjectData sources, method, disclaimer

Code Examples

cURL
bash
curl -X POST https://sparkforge.sh/api/btc-signal \
  -H "Content-Type: application/json" \
  -H "X-PAYMENT: <x402-payment-token>" \
  -d '{"timeframe": "5m"}'
Python
python
import requests

response = requests.post(
    "https://sparkforge.sh/api/btc-signal",
    headers={"Content-Type": "application/json", "X-PAYMENT": "<token>"},
    json={"timeframe": "5m"}
)

data = response.json()
print(f"{data['direction']} ({data['confidence']:.0%} confidence) @ ${data['price']:,.0f}")
TypeScript / Node.js
typescript
const res = await fetch402("https://sparkforge.sh/api/btc-signal", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ timeframe: "5m" }),
});

const { direction, confidence, price, indicators } = await res.json();
console.log(`${direction} at $${price} (${(confidence * 100).toFixed(0)}% confidence)`);

Example Response

json
{
  "direction": "up",
  "confidence": 0.68,
  "price": 84521.30,
  "timeframe": "5m",
  "lookahead": "5 candles (~25 min)",
  "score": 5.7,
  "signals_fired": 4,
  "indicators": {
    "taker_flow": { "value": 0.623, "signal": "strong_buying" },
    "oi_direction": { "value": "0.18%", "signal": "new_longs_winning" },
    "funding_rate": { "value": "1.2%", "signal": "neutral" },
    "rsi_14": { "value": 58.3, "signal": "neutral" },
    "ema_trend": { "value": "bullish", "signal": "ema9_above_21" }
  },
  "meta": {
    "backtest_accuracy": "57-64%",
    "disclaimer": "Not financial advice."
  }
}

💳 Payment via x402

This endpoint costs $0.01 per call, paid in USDC on Base, Polygon, or Solana. Use the @x402/fetch library to handle payments automatically, or implement the x402 handshake manually.

bash
# Free demo mode (no payment)
curl https://sparkforge.sh/api/btc-signal?demo=true

# Or try via MCP (Claude Desktop, Cursor, Windsurf)
# Add to mcp config: { "url": "https://sparkforge.sh/api/mcp" }
Previous
Text-to-Speech
Next
Crypto Price