Aller au contenu principal
API

Documentation

Complete reference for the DYOR REST API — 9 endpoints, API key auth, 60 req/min

API Plans

Authentication

All API requests must include your API key in the X-API-Key header. You can generate and manage your API keys from your account settings.

Example request
curl -H "X-API-Key: your_api_key_here" \
     https://dyor.net/api/v1/scanner

Keep your API key secret. Do not expose it in client-side code or public repositories. If compromised, regenerate it immediately from your account page.

Rate Limits

The API is rate-limited to 60 requests per minute per API key. Exceeding this limit will return an HTTP 429 Too Many Requests response.

60
Requests / minute
200
Max items per page
429
HTTP code on exceed

Rate limit headers are included in every response: X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset.

Response Format

All endpoints return JSON with a consistent envelope containing meta (pagination info) and data (array of results).

Success response (HTTP 200)
{
  "meta": {
    "page": 1,
    "limit": 50,
    "total": 487,
    "pages": 10
  },
  "data": [
    { ... },
    { ... }
  ]
}
Error response (HTTP 401 / 429)
{
  "error": {
    "code": 401,
    "message": "Invalid or missing API key."
  }
}
GET /api/v1/scanner

Returns the full list of scanned coins with composite scores, technical indicators, and market data. This is the primary endpoint for screening coins by technical strength across multiple timeframes.

Query Parameters

Parameter Type Default Description
pair string USDT Market pair. Values: USDT, BTC, PERP
sort string score_1d Sort field. Values: name, price, change, marketcap, vol24h, score_15m, score_1h, score_4h, score_1d, score_3d, score_1w
direction string desc Sort direction. Values: asc, desc
limit int 50 Results per page. Range: 1-200
page int 1 Page number for pagination
q string -- Search by coin name or symbol
min_mcap int -- Minimum market cap filter (in USD)
min_vol int -- Minimum 24h volume filter (in USD)

Response Example

200 OK
{
  "meta": { "page": 1, "limit": 2, "total": 487, "pages": 244 },
  "data": [
    {
      "name": "Bitcoin",
      "symbol": "BTC",
      "pair": "USDT",
      "price": 87420.50,
      "change_pct": 2.34,
      "high_24h": 88100.00,
      "low_24h": 85200.00,
      "volume_24h": 32450000000,
      "market_cap": 1720000000000,
      "scores": {
        "15m": { "score": 68, "bullish": 75, "bearish": 18 },
        "1h":  { "score": 72, "bullish": 85, "bearish": 12 },
        "4h":  { "score": 45, "bullish": 60, "bearish": 38 },
        "1d":  { "score": 81, "bullish": 90, "bearish": 8 },
        "3d":  { "score": 77, "bullish": 82, "bearish": 15 },
        "1w":  { "score": 63, "bullish": 70, "bearish": 25 }
      },
      "indicators": {
        "1h": { "rsi": 62.3, "adx": 28.1, "macd": 145.2, "bb_width": 0.032 },
        "4h": { "rsi": 55.8, "adx": 22.5, "macd": -30.5, "bb_width": 0.045 },
        "1d": { "rsi": 70.1, "adx": 35.4, "macd": 520.8, "bb_width": 0.058 }
      }
    },
    {
      "name": "Ethereum",
      "symbol": "ETH",
      "pair": "USDT",
      "price": 3285.40,
      "change_pct": 1.87,
      "high_24h": 3340.00,
      "low_24h": 3210.00,
      "volume_24h": 18750000000,
      "market_cap": 395000000000,
      "scores": {
        "15m": { "score": 55, "bullish": 60, "bearish": 32 },
        "1h":  { "score": 61, "bullish": 70, "bearish": 25 },
        "4h":  { "score": 48, "bullish": 55, "bearish": 40 },
        "1d":  { "score": 73, "bullish": 80, "bearish": 16 },
        "3d":  { "score": 65, "bullish": 72, "bearish": 22 },
        "1w":  { "score": 58, "bullish": 64, "bearish": 30 }
      },
      "indicators": {
        "1h": { "rsi": 58.1, "adx": 24.3, "macd": 12.5, "bb_width": 0.028 },
        "4h": { "rsi": 52.4, "adx": 19.8, "macd": -5.2, "bb_width": 0.041 },
        "1d": { "rsi": 64.7, "adx": 30.1, "macd": 48.3, "bb_width": 0.052 }
      }
    }
  ]
}
GET /api/v1/signals

Returns active technical signals (buy/sell) detected across all scanned coins. Signals are derived from indicator crossovers, momentum shifts, and trend confirmations.

Query Parameters

Parameter Type Default Description
pair string USDT Market pair: USDT, BTC, PERP
tf string -- Timeframe filter: 15m, 1h, 4h, 1d
q string -- Search by coin name or symbol
limit int 50 Results per page. Range: 1-200
page int 1 Page number for pagination

Response Example

200 OK
{
  "meta": { "page": 1, "limit": 50, "total": 124, "pages": 3 },
  "data": [
    {
      "name": "Bitcoin",
      "symbol": "BTC",
      "pair": "USDT",
      "tf": "4h",
      "price": 87420.50,
      "market_cap": 1720000000000,
      "volume_24h": 32450000000,
      "signals": {
        "rsi_oversold": false,
        "rsi_overbought": false,
        "macd_bullish_cross": true,
        "macd_bearish_cross": false,
        "bb_squeeze": false,
        "ema_golden_cross": false,
        "ema_death_cross": false,
        "adx_trending": true,
        "volume_spike": true
      }
    }
  ]
}
GET /api/v1/patterns

Returns detected chart patterns (triangles, wedges, channels, etc.) with support/resistance levels and breakout proximity. Patterns are detected automatically using price structure analysis.

Query Parameters

Parameter Type Default Description
pair string USDT Market pair: USDT, BTC, PERP
tf string -- Timeframe: 15m, 1h, 4h, 1d
type string -- Pattern type: triangle, wedge, channel, flag, etc.
q string -- Search by coin name or symbol
limit int 50 Results per page. Range: 1-200
page int 1 Page number for pagination

Response Example

200 OK
{
  "meta": { "page": 1, "limit": 50, "total": 38, "pages": 1 },
  "data": [
    {
      "name": "Solana",
      "symbol": "SOL",
      "pair": "USDT",
      "price": 187.45,
      "tf": "4h",
      "type": "ascending_triangle",
      "resistance": 195.20,
      "support": 178.50,
      "breakout_proximity_pct": 4.13,
      "breakdown_proximity_pct": 4.77,
      "spotted_at": "2026-03-22T08:30:00Z"
    },
    {
      "name": "Avalanche",
      "symbol": "AVAX",
      "pair": "USDT",
      "price": 42.80,
      "tf": "1d",
      "type": "falling_wedge",
      "resistance": 45.10,
      "support": 40.20,
      "breakout_proximity_pct": 5.37,
      "breakdown_proximity_pct": 6.07,
      "spotted_at": "2026-03-22T06:00:00Z"
    }
  ]
}
GET /api/v1/divergences

Returns detected divergences between price action and technical indicators. Supports both standard and hidden divergences on RSI, MACD, OBV, and other indicators.

Query Parameters

Parameter Type Default Description
pair string USDT Market pair: USDT, BTC, PERP
tf string -- Timeframe: 15m, 1h, 4h, 1d
type string -- Divergence type: standard, hidden
direction string -- Direction: bullish, bearish
indicator string -- Filter by indicator: rsi, macd, obv, etc.
q string -- Search by coin name or symbol
limit int 50 Results per page. Range: 1-200
page int 1 Page number for pagination

Response Example

200 OK
{
  "meta": { "page": 1, "limit": 50, "total": 15, "pages": 1 },
  "data": [
    {
      "name": "Chainlink",
      "symbol": "LINK",
      "pair": "USDT",
      "price": 18.42,
      "tf": "4h",
      "indicator": "rsi",
      "type": "standard",
      "direction": "bullish",
      "spotted_at": "2026-03-22T10:00:00Z"
    },
    {
      "name": "Polkadot",
      "symbol": "DOT",
      "pair": "USDT",
      "price": 8.95,
      "tf": "1d",
      "indicator": "macd",
      "type": "hidden",
      "direction": "bearish",
      "spotted_at": "2026-03-22T06:00:00Z"
    }
  ]
}
GET /api/v1/pumping

Returns real-time pump and dump events detected across exchanges. Events are triggered when a coin experiences a sudden price movement exceeding predefined thresholds.

Query Parameters

Parameter Type Default Description
pair string USDT Market pair: USDT, BTC, PERP
type string -- Event type: pump, dump
event string -- Specific event name filter
min_pct float -- Minimum percentage change threshold
q string -- Search by coin name or symbol
limit int 50 Results per page. Range: 1-200
page int 1 Page number for pagination

Response Example

200 OK
{
  "meta": { "page": 1, "limit": 50, "total": 23, "pages": 1 },
  "data": [
    {
      "name": "Pepe",
      "symbol": "PEPE",
      "pair": "USDT",
      "exchange": "binance",
      "price": 0.00001245,
      "market_cap": 5234000000,
      "volume_24h": 892000000,
      "event": "5m_pump",
      "type": "pump",
      "pct": 12.45,
      "compared_price": 0.00001107,
      "spotted_price": 0.00001198,
      "spotted_at": "2026-03-22T14:32:18Z"
    },
    {
      "name": "Worldcoin",
      "symbol": "WLD",
      "pair": "USDT",
      "exchange": "binance",
      "price": 2.85,
      "market_cap": 820000000,
      "volume_24h": 145000000,
      "event": "1h_dump",
      "type": "dump",
      "pct": -8.33,
      "compared_price": 3.11,
      "spotted_price": 2.92,
      "spotted_at": "2026-03-22T14:15:00Z"
    }
  ]
}
GET /api/v1/setups

Returns AI-generated smart trading setups combining multiple technical signals, chart patterns, and multi-timeframe analysis. Each setup includes a confidence score and actionable key levels.

Query Parameters

Parameter Type Default Description
pair string USDT Market pair: USDT, BTC, PERP
tf string -- Timeframe: 15m, 1h, 4h, 1d
bias string -- Directional bias: bullish, bearish
min_confidence int 5 Minimum confidence score. Range: 1-10
q string -- Search by coin name or symbol
limit int 50 Results per page. Range: 1-200
page int 1 Page number for pagination

Response Example

200 OK
{
  "meta": { "page": 1, "limit": 50, "total": 12, "pages": 1 },
  "data": [
    {
      "name": "Sui",
      "symbol": "SUI",
      "pair": "USDT",
      "price": 3.42,
      "tf": "4h",
      "bias": "bullish",
      "confidence": 8,
      "signals": {
        "macd_bullish_cross": true,
        "rsi_oversold_recovery": true,
        "volume_spike": true,
        "ema_golden_cross": false,
        "bb_squeeze_breakout": true
      },
      "key_levels": {
        "entry": 3.42,
        "stop_loss": 3.15,
        "target_1": 3.80,
        "target_2": 4.10,
        "support": 3.20,
        "resistance": 3.85
      },
      "multi_tf_confirmed": true,
      "detected_at": "2026-03-22T12:00:00Z"
    },
    {
      "name": "Injective",
      "symbol": "INJ",
      "pair": "USDT",
      "price": 28.65,
      "tf": "1d",
      "bias": "bearish",
      "confidence": 7,
      "signals": {
        "macd_bearish_cross": true,
        "rsi_overbought_rejection": true,
        "volume_decline": true,
        "ema_death_cross": false,
        "bb_upper_rejection": true
      },
      "key_levels": {
        "entry": 28.65,
        "stop_loss": 30.50,
        "target_1": 26.00,
        "target_2": 24.20,
        "support": 25.80,
        "resistance": 30.10
      },
      "multi_tf_confirmed": false,
      "detected_at": "2026-03-22T06:00:00Z"
    }
  ]
}
GET /api/v1/strategies

Returns all custom strategies created by the authenticated user. Each strategy includes aggregate performance metrics like win rate and average return. No query parameters are needed -- the endpoint automatically returns all strategies belonging to the API key owner.

This endpoint requires no parameters. It returns all strategies owned by the authenticated user.

Response Example

200 OK
{
  "data": [
    {
      "id": 42,
      "name": "RSI Reversal + Volume",
      "description": "Buy when RSI oversold + volume spike",
      "created_at": "2026-01-15T10:30:00+00:00"
    }
  ]
}
GET /api/v1/strategies/{id}/results

Returns all coins currently matching a specific strategy from the latest scan. Each result includes the coin name, pair, timeframe and composite score. The strategy must be owned by the authenticated user.

Path Parameters

Parameter Type Description
id int Strategy ID. Must be owned by the authenticated user (returns 403 otherwise).

Query Parameters

Parameter Type Description
min_marketcap float Minimum market cap filter (USD). Optional.
min_vol24h float Minimum 24h volume filter (USD). Optional.

Response Example

200 OK
{
  "meta": {
    "strategy_id": 42,
    "strategy_name": "RSI Reversal + Volume",
    "total": 12
  },
  "data": [
    {
      "name": "BTC",
      "pair": "USDT",
      "tf": "4h",
      "score": 74.5,
      "listed_on": "Binance"
    },
    {
      "name": "ETH",
      "pair": "USDT",
      "tf": "1d",
      "score": 62.3,
      "listed_on": "Binance"
    }
  ]
}
GET /api/v1/score-history

Returns the DYOR Score history for a specific coin and timeframe. Each entry is aligned to the corresponding candle timestamp, making it easy to overlay on price charts. Stores up to 300 data points per coin/TF.

Query Parameters

Parameter Type Default Description
symbol string required Coin symbol (e.g. BTC, ETH, SOL)
pair string USDT Market pair: USDT, BTC, PERP
tf string 1h Timeframe: 15m, 1h, 4h, 1d, 3d, 1w
limit int 100 Number of data points. Range: 1-300

Response Fields

Field Type Description
time int Unix timestamp aligned to the candle open (e.g. 1743580800 for a 1h candle at 08:00 UTC)
bullish float Bullish composite score (sum of bullish indicator signals)
bearish float Bearish composite score (sum of bearish indicator signals)
score float Net DYOR Score (bullish - bearish). Positive = bullish bias, negative = bearish bias.

Response Example

200 OK GET /api/v1/score-history?symbol=BTC&pair=USDT&tf=4h&limit=5
{
  "symbol": "BTC",
  "pair": "USDT",
  "tf": "4h",
  "count": 5,
  "history": [
    { "time": 1743523200, "bullish": 48.20, "bearish": 12.50, "score": 35.70 },
    { "time": 1743537600, "bullish": 42.80, "bearish": 15.30, "score": 27.50 },
    { "time": 1743552000, "bullish": 38.10, "bearish": 22.70, "score": 15.40 },
    { "time": 1743566400, "bullish": 44.60, "bearish": 18.90, "score": 25.70 },
    { "time": 1743580800, "bullish": 51.30, "bearish": 10.20, "score": 41.10 }
  ]
}

Error Codes

The API uses standard HTTP status codes. All error responses follow a consistent format with a descriptive message.

Code Status Description
200 OK Request successful
400 Bad Request Invalid parameters (e.g. unknown pair, limit out of range)
401 Unauthorized Missing or invalid API key
403 Forbidden API key valid but insufficient permissions (e.g. accessing another user's strategy)
429 Too Many Requests Rate limit exceeded (60 req/min). Retry after the window resets.
500 Server Error Unexpected error. Contact support if persistent.
401 Unauthorized
{
  "error": {
    "code": 401,
    "message": "Invalid or missing API key."
  }
}
429 Too Many Requests
{
  "error": {
    "code": 429,
    "message": "Rate limit exceeded. Try again in 42 seconds."
  }
}