// SQUANT DESK · API REFERENCE

API REFERENCE

REST API de SQuant Desk para integraciones institucionales. Todos los endpoints retornan JSON con Content-Type application/json. Base URL: https://squantdesk.com

// AUTENTICACIÓN

BEARER TOKEN

Los endpoints marcados como AUTH requieren un token JWT de Supabase. Obtenlo desde tu sesión autenticada e inclúyelo en el header Authorization.

// Obtener token (JavaScript / TypeScript)
const { data: { session } } = await supabase.auth.getSession()
const token = session?.access_token

// Usar en requests
fetch('https://squantdesk.com/api/vps/champions', {
  headers: {
    'Authorization': `Bearer ${token}`,
    'Content-Type': 'application/json',
  }
})
# cURL
curl -H "Authorization: Bearer <token>" \
     https://squantdesk.com/api/public/engine-stats
// RATE LIMITS

LÍMITES DE USO

PLAN
REQ / MIN
REQ / DÍA
BURST
Free
10
200
3
PRO
60
5 000
10
Institutional
600
Sin límite
50

Exceder el límite retorna HTTP 429 con header Retry-After: <seconds>.

// ENDPOINTS

REFERENCIA DE ENDPOINTS

GET/api/public/engine-statsPUBLIC

Estado global del motor cuantitativo: backtests procesados, win rate, drawdown, régimen de mercado y equity curve.

EJEMPLO DE RESPUESTA
{
  "total": 16386795,
  "rate_hr": 124075,
  "timeframes": 7,
  "by_tf": { "4h": 3472285, "1h": 5672653, "15m": 5696032 },
  "assets": 5,
  "live": true,
  "regime": "BULL",
  "equity": 11422.53,
  "equity_initial": 10000,
  "return_pct": 14.23,
  "profit_factor": 1.935,
  "max_dd_pct": -8.74,
  "win_rate": 59.1,
  "total_trades": 22,
  "computed_at": "2026-07-02T14:30:00Z"
}
GET/api/vps/championsAUTH

Lista de modelos campeones activos con métricas out-of-sample, walk-forward test y Monte Carlo por timeframe.

🔐Requiere Authorization: Bearer <token>
EJEMPLO DE RESPUESTA
[
  {
    "slot": "4h_01",
    "sym": "BTCUSDT",
    "tf": "4h",
    "strategy": "PRO.MACD",
    "direction": "LONG",
    "grade": "A+",
    "cagr": 38.2,
    "win_rate": 61.4,
    "max_dd": -7.8,
    "profit_factor": 2.14,
    "mc_confidence": 0.87,
    "risk_pct": 2.5,
    "saved_at": "2026-07-02T12:00:00Z"
  }
]
GET/api/lp-signal/activeAUTH

Señal LP activa aprobada por el sistema con hipótesis, rango de precio, Kelly sizing y días proyectados. Requiere plan PRO.

🔐Requiere Authorization: Bearer <token>
EJEMPLO DE RESPUESTA
{
  "signal": {
    "id": "uuid",
    "hyp": "bullish_lp",
    "hyp_text": "Rango alcista concentrado en soporte clave",
    "pool": "ETH/USDC",
    "fee_tier": "0.05%",
    "range_low_pct": -8.5,
    "range_high_pct": 12.0,
    "kelly_pct": 18.4,
    "days_projected": 14,
    "ref_price": 3480.22,
    "created_at": "2026-07-01T08:00:00Z",
    "expires_at": "2026-07-15T08:00:00Z"
  }
}
GET/api/community-setupsPUBLIC

Setups publicados por la comunidad con reputación ≥ 10. Incluye par, tipo (LONG/SHORT/LP), entry, SL, TP y votos.

EJEMPLO DE RESPUESTA
[
  {
    "id": "uuid",
    "par": "BTCUSDT",
    "tipo": "LONG",
    "entry": 61500,
    "sl": 59800,
    "tp": 67000,
    "rr": 3.24,
    "timeframe": "4h",
    "votos_up": 12,
    "votos_down": 1,
    "estado": "ACTIVO",
    "created_at": "2026-07-01T10:00:00Z",
    "profiles": { "username": "sigma_trader", "reputation": 47 }
  }
]
POST/api/community-setupsAUTH

Publicar un nuevo setup. Requiere reputación ≥ 10 en el perfil del usuario autenticado.

🔐Requiere Authorization: Bearer <token>
EJEMPLO DE RESPUESTA
// Body (application/json):
{
  "par": "ETHUSDT",
  "tipo": "SHORT",           // "LONG" | "SHORT" | "LP"
  "entry": 3480,
  "sl": 3650,
  "tp": 3100,
  "rr": 2.11,
  "timeframe": "1h",
  "metodologia": "OB + divergencia RSI en resistencia",
  "nota": "Invalidado si cierra > 3700"
}

// Response 201:
{ "id": "uuid", ... }
GET/api/motor/signalsAUTH

Señales activas del motor en vivo: símbolo, dirección, régimen HMM, confianza y timestamp.

🔐Requiere Authorization: Bearer <token>
EJEMPLO DE RESPUESTA
{
  "regime": "BULL",
  "signals": [
    {
      "sym": "BTCUSDT",
      "tf": "4h",
      "direction": "LONG",
      "confidence": 0.78,
      "entry": 61500,
      "updated_at": "2026-07-02T14:00:00Z"
    }
  ]
}
// ERRORES

CÓDIGOS DE ERROR

200OK — respuesta exitosa
400Bad Request — parámetro inválido o faltante
401Unauthorized — token ausente, expirado o inválido
403Forbidden — plan sin acceso al endpoint solicitado
429Too Many Requests — rate limit excedido
500Internal Server Error — error en el motor o base de datos
503Service Unavailable — motor VPS sin respuesta
// Estructura de error estándar
{
  "error": "Descripción del error",
  "code":  "ERROR_CODE"          // presente en algunos endpoints
}
// ACCESO INSTITUCIONAL

PLAN INSTITUCIONAL

Rate limits sin tope
600 req/min, sin límite diario, burst de 50.
Modelos a medida
Backtests y champions parametrizados por contrato.
White label disponible
Branding propio sobre la infraestructura SIGMA.
SLA garantizado
99.5% uptime mensual con notificaciones proactivas.
¿Necesitas acceso institucional o una integración personalizada?
Tiempo de respuesta: < 24h hábiles · Cotización sin compromiso
CONTACTAR →
SQuant Desk API v2 · 2026
TérminosPrivacidadContacto