API Reference

LeadEdge detects when ETH, BTC, LINK, XRP, or DOGE moves on Binance Futures and predicts follow-through on other exchanges. Integrate via REST API or WebSocket for real-time signals.

Quick start

  1. 1.Sign up at leadedge.dev/login
  2. 2.Generate an API key in your dashboard
  3. 3.Make your first request:
curl
curl -H "Authorization: Bearer le_live_your_key_here" \
  https://leadedge.dev/api/v1/signals/latest
python
import requests

headers = {"Authorization": "Bearer le_live_your_key_here"}
response = requests.get("https://leadedge.dev/api/v1/signals/latest", headers=headers)
signal = response.json()
print(signal)
javascript
const res = await fetch("https://leadedge.dev/api/v1/signals/latest", {
  headers: { "Authorization": "Bearer le_live_your_key_here" }
});
const signal = await res.json();
console.log(signal);

Base URL: https://leadedge.dev/api/v1

Authentication

All API requests require an API key sent in the Authorization header:

http
Authorization: Bearer le_live_your_key_here

API keys are generated in your dashboard. Keys are prefixed for identification:

le_live_Production keys
le_test_Test keys (return sample data)

Keep your API keys secret. Never expose them in client-side code, public repositories, or browser requests.

Get latest signal

GET
/api/v1/signals/latest

Returns the most recent signal.

Free tier receives signals with a 30-second delay. Pro tier receives real-time signals.

curl
curl -H "Authorization: Bearer le_live_..." \
  https://leadedge.dev/api/v1/signals/latest

Response:

json
{
  "signal": {
    "id": "sig_a1b2c3d4e5f6",
    "timestamp": 1680000000123,
    "asset": "ETH",
    "leader_exchange": "binance",
    "leader_market_type": "futures",
    "leader_pair": "ETH/USDT",
    "leader_direction": "up",
    "leader_magnitude_pct": 0.1654,
    "leader_price_before": 2000.50,
    "leader_price_after": 2003.81,
    "signal_quality": "medium",
    "threshold_triggered": 0.1,
    "predictions": [
      {
        "exchange": "coinbase",
        "market_type": "spot",
        "pair": "ETH/USD",
        "expected_direction": "up",
        "confidence": 0.907,
        "expected_magnitude_pct": 0.1223,
        "expected_follow_within_ms": 300,
        "breakeven_fee_pct": 0.1223
      }
    ],
    "outcome": {
      "coinbase-spot": {
        "followed": true,
        "actual_magnitude_pct": 0.105,
        "follow_time_ms": 283,
        "profitable_at_fee": 0.08
      }
    }
  },
  "meta": {
    "tier": "pro",
    "delay_ms": 0
  }
}

Signal history

GET
/api/v1/signals/history

Returns paginated signal history with optional filters.

Query parameters:

limitintNumber of results (default 50, max 200)
offsetintPagination offset (default 0)
qualitystringFilter by quality: strong, medium, weak
min_thresholdfloatMinimum leader move (e.g., 0.1)
sinceintUnix timestamp — signals after this time
curl
curl -H "Authorization: Bearer le_live_..." \
  "https://leadedge.dev/api/v1/signals/history?quality=strong&limit=20"

Response:

json
{
  "signals": [ ... ],
  "total": 1234,
  "limit": 20,
  "offset": 0,
  "meta": { "tier": "pro" }
}

Free tier: last 24 hours only. Pro tier: full history.

Get signal by ID

GET
/api/v1/signals/:id

Returns a specific signal by ID, including outcome if resolved.

curl
curl -H "Authorization: Bearer le_live_..." \
  https://leadedge.dev/api/v1/signals/sig_a1b2c3d4e5f6

Performance stats

GET
/api/v1/stats/performance

Returns aggregate signal performance metrics.

Query parameters:

periodstringTime period: 24h, 7d, or 30d (default 7d)
curl
curl -H "Authorization: Bearer le_live_..." \
  "https://leadedge.dev/api/v1/stats/performance?period=7d"

Response:

json
{
  "period": "7d",
  "period_window_hours": 168,
  "total_signals_resolved": 412,
  "quality_breakdown": {
    "strong": 38,
    "medium": 210,
    "weak": 164
  },
  "follow_through_rates": {
    "coinbase-spot-ETH": { "rate": 0.907, "avg_magnitude_pct": 0.0958, "sample_size": 312 },
    "bybit-spot-BTC":    { "rate": 0.886, "avg_magnitude_pct": 0.0623, "sample_size": 128 },
    "bybit-spot-LINK":   { "rate": 0.833, "avg_magnitude_pct": 0.0712, "sample_size": 84 }
  },
  "profitable_rates": {
    "at_0.04_fee": 0.78,
    "at_0.08_fee": 0.64,
    "at_0.12_fee": 0.39,
    "at_0.2_fee": 0.07
  },
  "avg_follow_time_ms": {
    "coinbase-spot-ETH": 283,
    "bybit-spot-BTC": 36,
    "bybit-spot-LINK": 36
  },
  "note": "Stats include only signals with resolved outcomes; aggregated from all live signals in the period, not tier-restricted."
}

Account info

GET
/api/v1/account

Returns your account details, tier, and rate limit status.

curl
curl -H "Authorization: Bearer le_live_..." \
  https://leadedge.dev/api/v1/account

Response:

json
{
  "account": {
    "email": "[email protected]",
    "tier": "pro",
    "subscription_status": "active"
  },
  "api_keys": {
    "active": 2,
    "max": 5
  },
  "rate_limit": {
    "daily_limit": 10000,
    "used_today": 142,
    "remaining": 9858,
    "resets_at": "2026-04-15T00:00:00.000Z"
  }
}

API keys

GET
/api/v1/keys

List all your API keys (prefix only, never the full key).

curl
curl -H "Authorization: Bearer le_live_..." \
  https://leadedge.dev/api/v1/keys
POST
/api/v1/keys

Generate a new API key. The full key is returned only once.

curl
curl -X POST \
  -H "Authorization: Bearer le_live_..." \
  -H "Content-Type: application/json" \
  -d '{"name": "My Trading Bot"}' \
  https://leadedge.dev/api/v1/keys

Response:

json
{
  "key": "le_live_7fb46256e72353a754cb...",
  "prefix": "le_live_7fb46256...",
  "name": "My Trading Bot",
  "message": "Save this key — it will not be shown again"
}

Save your API key immediately after creation. It cannot be retrieved later. Maximum 5 keys per account.

DELETE
/api/v1/keys/:id

Revoke an API key. This action is permanent.

curl
curl -X DELETE \
  -H "Authorization: Bearer le_live_..." \
  https://leadedge.dev/api/v1/keys/key_id_here

WebSocket stream

Connect to the real-time signal stream for instant notifications. Signals are pushed the moment they are detected — no polling needed.

Endpoint: wss://api.leadedge.dev/v1/stream?api_key=le_live_...

python
import websocket
import json

def on_message(ws, message):
    data = json.loads(message)
    
    if data["type"] == "signal":
        signal = data["data"]
        direction = signal["leader"]["direction"]
        magnitude = signal["leader"]["magnitude_pct"]
        confidence = signal["predictions"][0]["confidence"]
        
        print(f"Signal: ETH {direction} {magnitude}% (conf: {confidence})")
        
        if confidence > 0.85:
            place_order(signal)
    
    elif data["type"] == "outcome":
        print(f"Outcome: {data['data']}")
    
    elif data["type"] == "heartbeat":
        pass  # Connection alive

def on_open(ws):
    # Subscribe to specific quality levels
    ws.send(json.dumps({
        "type": "subscribe",
        "channels": ["signal:strong", "signal:medium", "outcome"]
    }))

ws = websocket.WebSocketApp(
    "wss://api.leadedge.dev/v1/stream?api_key=le_live_...",
    on_message=on_message,
    on_open=on_open
)
ws.run_forever()
javascript
const ws = new WebSocket(
  "wss://api.leadedge.dev/v1/stream?api_key=le_live_..."
);

ws.onopen = () => {
  ws.send(JSON.stringify({
    type: "subscribe",
    channels: ["signal:strong", "signal:medium", "outcome"]
  }));
};

ws.onmessage = (event) => {
  const data = JSON.parse(event.data);
  
  if (data.type === "signal") {
    const { leader, predictions } = data.data;
    console.log(`ETH ${leader.direction} ${leader.magnitude_pct}%`);
    console.log(`Confidence: ${predictions[0].confidence}`);
  }
  
  if (data.type === "outcome") {
    console.log("Outcome:", data.data);
  }
};

Message types

signalNew signal detected. Contains full signal data with predictions.
outcomeSignal resolved. Shows whether followers actually followed and by how much.
heartbeatSent every 30 seconds. Confirms the connection is alive.
connectedSent on initial connection with your client ID.

Subscription channels

Subscribe to specific signal quality levels to filter what you receive:

signal:strongLeader move ≥ 0.2%
signal:mediumLeader move 0.1% – 0.2%
outcomeOutcome updates for all signals

Connection limits

Free tier:1 connection, 30-second signal delay
Pro tier:3 connections, real-time signals

Signal format

Every signal contains the leader move details, predictions for follower exchanges, and (once resolved) the actual outcome.

Signal fields

idstringUnique signal identifier (sig_...)
timestampintUnix timestamp in milliseconds
assetstringAsset symbol — ETH, BTC, LINK, XRP, or DOGE
leader_directionstringPrice direction: up or down
leader_magnitude_pctfloatSize of the leader move in percent
signal_qualitystringSignal strength: strong, medium, weak
predictionsarrayPredicted follow-through for each follower exchange
outcomeobjectActual result after time window (null if pending)

Prediction fields

exchangestringFollower exchange name
confidencefloatHistorical follow-through probability (0-1)
expected_magnitude_pctfloatExpected size of follower move
expected_follow_within_msintExpected time for follower to react
breakeven_fee_pctfloatMaximum round-trip fee for profitability

Quality levels

strongLeader move ≥ 0.2% — highest confidence predictions
mediumLeader move 0.1% – 0.2% — good confidence
weakLeader move 0.05% – 0.1% — marginal confidence

Confidence values reflect historical probability based on collected data. They are not guarantees. Past performance does not predict future results.

Rate limits

ResourceFreePro
REST API calls100/day10,000/day
WebSocket connections13
Signal history24 hoursUnlimited
Signal delay30 secondsReal-time

Rate limit headers are included in every response:

http
X-RateLimit-Remaining: 9857
X-RateLimit-Limit: 10000
X-RateLimit-Reset: 2026-04-15T00:00:00.000Z

Errors

All errors return a JSON object with an error code and message:

json
{
  "error": "RATE_LIMITED",
  "message": "Daily API limit exceeded",
  "limit": 100,
  "reset_at": "2026-04-15T00:00:00.000Z"
}
StatusCodeDescription
401UNAUTHORIZEDMissing or invalid API key
401INVALID_KEYAPI key not found or wrong format
401KEY_REVOKEDAPI key has been revoked
404NOT_FOUNDSignal or resource not found
429RATE_LIMITEDDaily API limit exceeded
500QUERY_ERRORServer-side error

Questions? Contact us