feat(ml): Complete FASE 11 - BTCUSD update and comprehensive documentation alignment

ML Engine Updates:
- Updated BTCUSD with Polygon API data (2024-2025): 215,699 new records
- Re-trained all ML models: Attention (R²: 0.223), Base, Metamodel (87.3% confidence)
- Backtest results: +176.71R profit with aggressive_filter strategy

Documentation Consolidation:
- Created docs/99-analisis/_MAP.md index with 13 new analysis documents
- Consolidated inventories: removed duplicates from orchestration/inventarios/
- Updated ML_INVENTORY.yml with BTCUSD metrics and training results
- Added execution reports: FASE11-BTCUSD, correction issues, alignment validation

Architecture & Integration:
- Updated all module documentation with NEXUS v3.4 frontmatter
- Fixed _MAP.md indexes across all folders
- Updated orchestration plans and traces

Files: 229 changed, 5064 insertions(+), 1872 deletions(-)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
rckrdmrd 2026-01-07 09:31:29 -06:00
parent a7cca885f0
commit c1b5081208
229 changed files with 5068 additions and 1876 deletions

View File

@ -1,4 +1,4 @@
# Guia para Agentes de IA - Trading Platform (OrbiQuant) # Guia para Agentes de IA - Trading Platform (Trading Platform)
**Version:** 1.0 **Version:** 1.0
**Ultima actualizacion:** 2026-01-04 **Ultima actualizacion:** 2026-01-04

View File

@ -1,8 +1,8 @@
# OrbiQuant IA - Trading Platform # Trading Platform - Trading Platform
## Descripción ## Descripción
**OrbiQuant IA** es una plataforma integral de gestión de inversiones asistida por inteligencia artificial que combina: **Trading Platform** es una plataforma integral de gestión de inversiones asistida por inteligencia artificial que combina:
- **Money Manager con IA**: Agentes que gestionan cuentas de trading e inversión con diferentes perfiles de riesgo (conservador, moderado, agresivo) - **Money Manager con IA**: Agentes que gestionan cuentas de trading e inversión con diferentes perfiles de riesgo (conservador, moderado, agresivo)
- **Plataforma Educativa**: Cursos de trading accesibles generados con IA - **Plataforma Educativa**: Cursos de trading accesibles generados con IA
@ -28,7 +28,7 @@
| LLM Agent | Python + FastAPI + Ollama | 3085 | | LLM Agent | Python + FastAPI + Ollama | 3085 |
| Trading Agents | Python + FastAPI + CCXT | 3086 | | Trading Agents | Python + FastAPI + CCXT | 3086 |
| Ollama WebUI | Interfaz gestión modelos LLM | 3087 | | Ollama WebUI | Interfaz gestión modelos LLM | 3087 |
| Database | PostgreSQL 16 (orbiquant_platform) | 5432 | | Database | PostgreSQL 16 (trading_platform) | 5432 |
| Cache | Redis 7 | 6379 | | Cache | Redis 7 | 6379 |
## Estructura del Proyecto ## Estructura del Proyecto
@ -165,9 +165,9 @@ docker-compose up -d
### TypeScript ### TypeScript
```typescript ```typescript
import { OrbiQuantClient } from '@orbiquant/sdk-typescript'; import { Trading PlatformClient } from '@trading-platform/sdk-typescript';
const client = new OrbiQuantClient({ const client = new Trading PlatformClient({
baseUrl: 'http://localhost:3000', baseUrl: 'http://localhost:3000',
}); });
@ -185,10 +185,10 @@ const response = await client.ml.chat({
### Python ### Python
```python ```python
from orbiquant_sdk import OrbiQuantClient, Config from trading_sdk import Trading PlatformClient, Config
config = Config.from_env() config = Config.from_env()
async with OrbiQuantClient(config) as client: async with Trading PlatformClient(config) as client:
# Obtener predicción # Obtener predicción
prediction = await client.get_prediction("BTCUSDT", "1h") prediction = await client.get_prediction("BTCUSDT", "1h")
@ -216,7 +216,7 @@ async with OrbiQuantClient(config) as client:
## Documentación ## Documentación
- [Análisis de Migración e Integración](./docs/00-overview/ANALISIS-MIGRACION-INTEGRACION.md) - [Análisis de Migración e Integración](./docs/00-overview/ANALISIS-MIGRACION-INTEGRACION.md)
- [Requerimientos MVP](./docs/00-overview/REQUERIMIENTOS-MVP-ORBIQUANT.md) - [Requerimientos MVP](./docs/00-overview/REQUERIMIENTOS-MVP.md)
- [Servicios](./SERVICES.md) - [Servicios](./SERVICES.md)
- [Próxima Acción](./orchestration/PROXIMA-ACCION.md) - [Próxima Acción](./orchestration/PROXIMA-ACCION.md)

View File

@ -1,5 +1,5 @@
# MCP Binance Connector Dockerfile # MCP Binance Connector Dockerfile
# OrbiQuant Trading Platform # Trading Platform
# Version: 1.0.0 # Version: 1.0.0
# ========================================== # ==========================================

View File

@ -2,7 +2,7 @@
**Version:** 1.0.0 **Version:** 1.0.0
**Date:** 2026-01-04 **Date:** 2026-01-04
**System:** OrbiQuant Trading Platform + NEXUS v3.4 + SIMCO **System:** Trading Platform + NEXUS v3.4 + SIMCO
--- ---
@ -342,4 +342,4 @@ The order may exceed configured limits. Check:
--- ---
**Maintained by:** @PERFIL_MCP_DEVELOPER **Maintained by:** @PERFIL_MCP_DEVELOPER
**Project:** OrbiQuant Trading Platform **Project:** Trading Platform

View File

@ -26,7 +26,7 @@
"trading", "trading",
"ccxt" "ccxt"
], ],
"author": "OrbiQuant Trading Platform", "author": "Trading Platform Trading Platform",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@modelcontextprotocol/sdk": "^1.0.0", "@modelcontextprotocol/sdk": "^1.0.0",

View File

@ -4,7 +4,7 @@
* Manages environment variables and creates Binance clients via CCXT. * Manages environment variables and creates Binance clients via CCXT.
* *
* @version 1.0.0 * @version 1.0.0
* @author OrbiQuant Trading Platform * @author Trading Platform Trading Platform
*/ */
import ccxt from 'ccxt'; import ccxt from 'ccxt';

View File

@ -5,7 +5,7 @@
* Uses CCXT library to communicate with Binance API. * Uses CCXT library to communicate with Binance API.
* *
* @version 1.0.0 * @version 1.0.0
* @author OrbiQuant Trading Platform * @author Trading Platform Trading Platform
*/ */
import express, { Request, Response, NextFunction } from 'express'; import express, { Request, Response, NextFunction } from 'express';
@ -292,7 +292,7 @@ if (!configValidation.valid) {
app.listen(PORT, () => { app.listen(PORT, () => {
console.log(''); console.log('');
console.log('================================================================'); console.log('================================================================');
console.log(' MCP Binance Connector - OrbiQuant Trading Platform '); console.log(' MCP Binance Connector - Trading Platform Trading Platform ');
console.log('================================================================'); console.log('================================================================');
console.log(` Service: ${SERVICE_NAME}`); console.log(` Service: ${SERVICE_NAME}`);
console.log(` Version: ${VERSION}`); console.log(` Version: ${VERSION}`);

View File

@ -4,7 +4,7 @@
* Pre-trade risk validation to ensure orders comply with risk limits. * Pre-trade risk validation to ensure orders comply with risk limits.
* *
* @version 1.0.0 * @version 1.0.0
* @author OrbiQuant Trading Platform * @author Trading Platform Trading Platform
*/ */
import { riskConfig } from '../config'; import { riskConfig } from '../config';

View File

@ -5,7 +5,7 @@
* Provides a unified interface for both Spot and Futures trading. * Provides a unified interface for both Spot and Futures trading.
* *
* @version 1.0.0 * @version 1.0.0
* @author OrbiQuant Trading Platform * @author Trading Platform Trading Platform
*/ */
import ccxt, { Ticker, OrderBook, OHLCV, Balance, Order, Trade } from 'ccxt'; import ccxt, { Ticker, OrderBook, OHLCV, Balance, Order, Trade } from 'ccxt';

View File

@ -5,7 +5,7 @@
* - binance_get_open_orders: Get all open orders * - binance_get_open_orders: Get all open orders
* *
* @version 1.0.0 * @version 1.0.0
* @author OrbiQuant Trading Platform * @author Trading Platform Trading Platform
*/ */
import { z } from 'zod'; import { z } from 'zod';

View File

@ -4,7 +4,7 @@
* Exports all Binance MCP tools and their schemas for registration * Exports all Binance MCP tools and their schemas for registration
* *
* @version 1.0.0 * @version 1.0.0
* @author OrbiQuant Trading Platform * @author Trading Platform Trading Platform
*/ */
// Import handlers for use in toolHandlers map // Import handlers for use in toolHandlers map

View File

@ -6,7 +6,7 @@
* - binance_get_klines: Get OHLCV candles * - binance_get_klines: Get OHLCV candles
* *
* @version 1.0.0 * @version 1.0.0
* @author OrbiQuant Trading Platform * @author Trading Platform Trading Platform
*/ */
import { z } from 'zod'; import { z } from 'zod';

View File

@ -5,7 +5,7 @@
* - binance_cancel_order: Cancel a pending order * - binance_cancel_order: Cancel a pending order
* *
* @version 1.0.0 * @version 1.0.0
* @author OrbiQuant Trading Platform * @author Trading Platform Trading Platform
*/ */
import { z } from 'zod'; import { z } from 'zod';

View File

@ -4,7 +4,7 @@
* Winston-based logging for the MCP Binance Connector. * Winston-based logging for the MCP Binance Connector.
* *
* @version 1.0.0 * @version 1.0.0
* @author OrbiQuant Trading Platform * @author Trading Platform Trading Platform
*/ */
import winston from 'winston'; import winston from 'winston';

View File

@ -2,7 +2,7 @@
**Version:** 0.1.0 **Version:** 0.1.0
**Date:** 2026-01-04 **Date:** 2026-01-04
**System:** OrbiQuant Trading Platform + NEXUS v3.4 + SIMCO **System:** Trading Platform + NEXUS v3.4 + SIMCO
--- ---
@ -274,4 +274,4 @@ curl http://localhost:3605/tools/mt4_execute_trade
--- ---
**Maintained by:** @PERFIL_MCP_DEVELOPER **Maintained by:** @PERFIL_MCP_DEVELOPER
**Project:** OrbiQuant Trading Platform **Project:** Trading Platform

View File

@ -2,7 +2,7 @@
**Version:** 0.1.0 **Version:** 0.1.0
**Date:** 2026-01-04 **Date:** 2026-01-04
**System:** OrbiQuant Trading Platform **System:** Trading Platform
--- ---

View File

@ -26,7 +26,7 @@
"trading", "trading",
"forex" "forex"
], ],
"author": "OrbiQuant Trading Platform", "author": "Trading Platform Trading Platform",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@modelcontextprotocol/sdk": "^1.0.0", "@modelcontextprotocol/sdk": "^1.0.0",

View File

@ -5,7 +5,7 @@
* Communicates with mt4-gateway service to execute trading operations. * Communicates with mt4-gateway service to execute trading operations.
* *
* @version 0.1.0 * @version 0.1.0
* @author OrbiQuant Trading Platform * @author Trading Platform Trading Platform
*/ */
import express, { Request, Response, NextFunction } from 'express'; import express, { Request, Response, NextFunction } from 'express';

View File

@ -1,6 +1,6 @@
version: '3.8' version: '3.8'
# OrbiQuant IA - Trading Platform Services # Trading Platform - Trading Platform Services
# ML Engine, LLM Agent, Trading Agents # ML Engine, LLM Agent, Trading Agents
services: services:
@ -11,12 +11,12 @@ services:
build: build:
context: ./apps/ml-engine context: ./apps/ml-engine
dockerfile: Dockerfile dockerfile: Dockerfile
container_name: orbiquant-ml-engine container_name: trading-ml-engine
ports: ports:
- "8001:8000" - "8001:8000"
environment: environment:
- ENV=development - ENV=development
- DATABASE_URL=postgresql://postgres:postgres@postgres:5432/orbiquant - DATABASE_URL=postgresql://postgres:postgres@postgres:5432/trading
- REDIS_URL=redis://redis:6379/0 - REDIS_URL=redis://redis:6379/0
- GPU_ENABLED=true - GPU_ENABLED=true
volumes: volumes:
@ -33,7 +33,7 @@ services:
- postgres - postgres
- redis - redis
networks: networks:
- orbiquant-network - trading-network
healthcheck: healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"] test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s interval: 30s
@ -47,7 +47,7 @@ services:
build: build:
context: ./apps/llm-agent context: ./apps/llm-agent
dockerfile: Dockerfile dockerfile: Dockerfile
container_name: orbiquant-llm-agent container_name: trading-llm-agent
ports: ports:
- "8003:8000" - "8003:8000"
environment: environment:
@ -66,7 +66,7 @@ services:
- ml-engine - ml-engine
- redis - redis
networks: networks:
- orbiquant-network - trading-network
healthcheck: healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"] test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s interval: 30s
@ -78,7 +78,7 @@ services:
# ============================================ # ============================================
ollama: ollama:
image: ollama/ollama:latest image: ollama/ollama:latest
container_name: orbiquant-ollama container_name: trading-ollama
ports: ports:
- "11434:11434" - "11434:11434"
volumes: volumes:
@ -91,7 +91,7 @@ services:
count: 1 count: 1
capabilities: [gpu] capabilities: [gpu]
networks: networks:
- orbiquant-network - trading-network
healthcheck: healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:11434/api/tags"] test: ["CMD", "curl", "-f", "http://localhost:11434/api/tags"]
interval: 30s interval: 30s
@ -105,13 +105,13 @@ services:
build: build:
context: ./apps/trading-agents context: ./apps/trading-agents
dockerfile: Dockerfile dockerfile: Dockerfile
container_name: orbiquant-trading-agents container_name: trading-trading-agents
ports: ports:
- "8004:8000" - "8004:8000"
environment: environment:
- ENV=development - ENV=development
- ML_ENGINE_URL=http://ml-engine:8000 - ML_ENGINE_URL=http://ml-engine:8000
- DATABASE_URL=postgresql://postgres:postgres@postgres:5432/orbiquant - DATABASE_URL=postgresql://postgres:postgres@postgres:5432/trading
- REDIS_URL=redis://redis:6379/2 - REDIS_URL=redis://redis:6379/2
- BINANCE_TESTNET=true - BINANCE_TESTNET=true
- BINANCE_API_KEY=${BINANCE_API_KEY:-} - BINANCE_API_KEY=${BINANCE_API_KEY:-}
@ -124,7 +124,7 @@ services:
- postgres - postgres
- redis - redis
networks: networks:
- orbiquant-network - trading-network
healthcheck: healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"] test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s interval: 30s
@ -137,18 +137,18 @@ services:
postgres: postgres:
image: postgres:15-alpine image: postgres:15-alpine
container_name: orbiquant-postgres container_name: trading-postgres
ports: ports:
- "5432:5432" - "5432:5432"
environment: environment:
- POSTGRES_USER=postgres - POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres - POSTGRES_PASSWORD=postgres
- POSTGRES_DB=orbiquant - POSTGRES_DB=trading
volumes: volumes:
- postgres-data:/var/lib/postgresql/data - postgres-data:/var/lib/postgresql/data
- ./apps/database/schemas:/docker-entrypoint-initdb.d - ./apps/database/schemas:/docker-entrypoint-initdb.d
networks: networks:
- orbiquant-network - trading-network
healthcheck: healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"] test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s interval: 10s
@ -157,14 +157,14 @@ services:
redis: redis:
image: redis:7-alpine image: redis:7-alpine
container_name: orbiquant-redis container_name: trading-redis
ports: ports:
- "6379:6379" - "6379:6379"
volumes: volumes:
- redis-data:/data - redis-data:/data
command: redis-server --appendonly yes command: redis-server --appendonly yes
networks: networks:
- orbiquant-network - trading-network
healthcheck: healthcheck:
test: ["CMD", "redis-cli", "ping"] test: ["CMD", "redis-cli", "ping"]
interval: 10s interval: 10s
@ -178,7 +178,7 @@ services:
# Ollama Web UI para testing # Ollama Web UI para testing
ollama-webui: ollama-webui:
image: ghcr.io/open-webui/open-webui:main image: ghcr.io/open-webui/open-webui:main
container_name: orbiquant-ollama-webui container_name: trading-ollama-webui
ports: ports:
- "3001:8080" - "3001:8080"
environment: environment:
@ -188,7 +188,7 @@ services:
depends_on: depends_on:
- ollama - ollama
networks: networks:
- orbiquant-network - trading-network
profiles: profiles:
- debug - debug
@ -201,5 +201,5 @@ volumes:
trading-data: trading-data:
networks: networks:
orbiquant-network: trading-network:
driver: bridge driver: bridge

View File

@ -1,55 +1,33 @@
version: '3.8' version: '3.8'
# ============================================================================= # =============================================================================
# ORBIQUANT IA TRADING PLATFORM - Docker Compose Configuration # TRADING PLATFORM - Docker Compose Configuration
# ============================================================================= # =============================================================================
# Este archivo define todos los servicios del proyecto para desarrollo # Este archivo define los servicios de APLICACION del proyecto.
# Fecha: 2025-12-05 # PostgreSQL y Redis usan instancias NATIVAS compartidas del workspace.
# Ref: orchestration/inventarios/DEVENV-PORTS-INVENTORY.yml
# Fecha: 2026-01-07
# =============================================================================
#
# IMPORTANTE - Arquitectura de Instancia Unica Compartida:
# - PostgreSQL: Instancia nativa en puerto 5432 (NO Docker)
# - Redis: Instancia nativa en puerto 6379 (NO Docker)
# - Los proyectos se separan por DATABASE + USER, no por puerto
#
# ============================================================================= # =============================================================================
services: services:
# =========================================================================== # ===========================================================================
# INFRASTRUCTURE SERVICES # NOTA: PostgreSQL y Redis son NATIVOS (no Docker)
# ===========================================================================
# PostgreSQL nativo: localhost:5432
# - Database: trading_platform
# - User: trading_user
# - Password: trading_dev_2025
#
# Redis nativo: localhost:6379
# - DB: 1 (asignado a trading-platform)
# =========================================================================== # ===========================================================================
postgres:
image: postgres:16-alpine
container_name: orbiquantia-postgres
restart: unless-stopped
environment:
POSTGRES_DB: orbiquantia_platform
POSTGRES_USER: orbiquantia
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-orbiquantia_dev_2025}
POSTGRES_INITDB_ARGS: "-E UTF8"
ports:
- "${POSTGRES_PORT:-5433}:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./apps/database/schemas:/docker-entrypoint-initdb.d:ro
networks:
- orbiquant-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U orbiquantia -d orbiquantia_platform"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
container_name: orbiquant-redis
restart: unless-stopped
command: redis-server --appendonly yes
ports:
- "${REDIS_PORT:-6379}:6379"
volumes:
- redis_data:/data
networks:
- orbiquant-network
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
# =========================================================================== # ===========================================================================
# BACKEND SERVICES # BACKEND SERVICES
@ -59,18 +37,21 @@ services:
build: build:
context: ./apps/backend context: ./apps/backend
dockerfile: Dockerfile dockerfile: Dockerfile
container_name: orbiquant-backend container_name: trading-backend
restart: unless-stopped restart: unless-stopped
environment: environment:
NODE_ENV: ${NODE_ENV:-development} NODE_ENV: ${NODE_ENV:-development}
PORT: ${BACKEND_API_PORT:-3081} PORT: ${BACKEND_API_PORT:-3081}
DB_HOST: postgres # PostgreSQL nativo (host.docker.internal para acceder desde Docker a host)
DB_HOST: host.docker.internal
DB_PORT: 5432 DB_PORT: 5432
DB_NAME: orbiquantia_platform DB_NAME: trading_platform
DB_USER: orbiquantia DB_USER: trading_user
DB_PASSWORD: ${POSTGRES_PASSWORD:-orbiquantia_dev_2025} DB_PASSWORD: ${DB_PASSWORD:-trading_dev_2025}
REDIS_HOST: redis # Redis nativo
REDIS_HOST: host.docker.internal
REDIS_PORT: 6379 REDIS_PORT: 6379
REDIS_DB: 1
ML_ENGINE_URL: http://ml-engine:3083 ML_ENGINE_URL: http://ml-engine:3083
FRONTEND_URL: http://localhost:${FRONTEND_WEB_PORT:-3080} FRONTEND_URL: http://localhost:${FRONTEND_WEB_PORT:-3080}
JWT_ACCESS_SECRET: ${JWT_ACCESS_SECRET} JWT_ACCESS_SECRET: ${JWT_ACCESS_SECRET}
@ -83,12 +64,9 @@ services:
- ./apps/backend/src:/app/src - ./apps/backend/src:/app/src
- backend_node_modules:/app/node_modules - backend_node_modules:/app/node_modules
networks: networks:
- orbiquant-network - trading-network
depends_on: extra_hosts:
postgres: - "host.docker.internal:host-gateway"
condition: service_healthy
redis:
condition: service_healthy
command: npm run dev command: npm run dev
# =========================================================================== # ===========================================================================
@ -99,7 +77,7 @@ services:
build: build:
context: ./apps/frontend context: ./apps/frontend
dockerfile: Dockerfile dockerfile: Dockerfile
container_name: orbiquant-frontend container_name: trading-frontend
restart: unless-stopped restart: unless-stopped
environment: environment:
VITE_API_URL: http://localhost:${BACKEND_API_PORT:-3081}/api/v1 VITE_API_URL: http://localhost:${BACKEND_API_PORT:-3081}/api/v1
@ -112,7 +90,7 @@ services:
- ./apps/frontend/public:/app/public - ./apps/frontend/public:/app/public
- frontend_node_modules:/app/node_modules - frontend_node_modules:/app/node_modules
networks: networks:
- orbiquant-network - trading-network
depends_on: depends_on:
- backend - backend
command: npm run dev -- --host 0.0.0.0 --port 3080 command: npm run dev -- --host 0.0.0.0 --port 3080
@ -125,17 +103,20 @@ services:
build: build:
context: ./apps/ml-engine context: ./apps/ml-engine
dockerfile: Dockerfile dockerfile: Dockerfile
container_name: orbiquant-ml-engine container_name: trading-ml-engine
restart: unless-stopped restart: unless-stopped
environment: environment:
PYTHONUNBUFFERED: 1 PYTHONUNBUFFERED: 1
DB_HOST: postgres # PostgreSQL nativo
DB_HOST: host.docker.internal
DB_PORT: 5432 DB_PORT: 5432
DB_NAME: orbiquantia_platform DB_NAME: trading_platform
DB_USER: orbiquantia DB_USER: trading_user
DB_PASSWORD: ${POSTGRES_PASSWORD:-orbiquantia_dev_2025} DB_PASSWORD: ${DB_PASSWORD:-trading_dev_2025}
REDIS_HOST: redis # Redis nativo
REDIS_HOST: host.docker.internal
REDIS_PORT: 6379 REDIS_PORT: 6379
REDIS_DB: 1
PORT: ${ML_ENGINE_PORT:-3083} PORT: ${ML_ENGINE_PORT:-3083}
LOG_LEVEL: INFO LOG_LEVEL: INFO
ports: ports:
@ -145,27 +126,25 @@ services:
- ./apps/ml-engine/models:/app/models - ./apps/ml-engine/models:/app/models
- ml_models:/app/trained_models - ml_models:/app/trained_models
networks: networks:
- orbiquant-network - trading-network
depends_on: extra_hosts:
postgres: - "host.docker.internal:host-gateway"
condition: service_healthy
redis:
condition: service_healthy
command: uvicorn src.api.main:app --host 0.0.0.0 --port 3083 --reload command: uvicorn src.api.main:app --host 0.0.0.0 --port 3083 --reload
data-service: data-service:
build: build:
context: ./apps/data-service context: ./apps/data-service
dockerfile: Dockerfile dockerfile: Dockerfile
container_name: orbiquant-data-service container_name: trading-data-service
restart: unless-stopped restart: unless-stopped
environment: environment:
PYTHONUNBUFFERED: 1 PYTHONUNBUFFERED: 1
DB_HOST: postgres # PostgreSQL nativo
DB_HOST: host.docker.internal
DB_PORT: 5432 DB_PORT: 5432
DB_NAME: orbiquantia_platform DB_NAME: trading_platform
DB_USER: orbiquantia DB_USER: trading_user
DB_PASSWORD: ${POSTGRES_PASSWORD:-orbiquantia_dev_2025} DB_PASSWORD: ${DB_PASSWORD:-trading_dev_2025}
POLYGON_API_KEY: ${POLYGON_API_KEY} POLYGON_API_KEY: ${POLYGON_API_KEY}
METAAPI_TOKEN: ${METAAPI_TOKEN} METAAPI_TOKEN: ${METAAPI_TOKEN}
METAAPI_ACCOUNT_ID: ${METAAPI_ACCOUNT_ID} METAAPI_ACCOUNT_ID: ${METAAPI_ACCOUNT_ID}
@ -177,22 +156,99 @@ services:
volumes: volumes:
- ./apps/data-service/src:/app/src - ./apps/data-service/src:/app/src
networks: networks:
- orbiquant-network - trading-network
depends_on: extra_hosts:
postgres: - "host.docker.internal:host-gateway"
condition: service_healthy
command: python -m src.main command: python -m src.main
llm-agent:
build:
context: ./apps/llm-agent
dockerfile: Dockerfile
container_name: trading-llm-agent
restart: unless-stopped
environment:
PYTHONUNBUFFERED: 1
PORT: ${LLM_AGENT_PORT:-3085}
ML_ENGINE_URL: http://ml-engine:3083
DATA_SERVICE_URL: http://data-service:3084
# PostgreSQL nativo
DB_HOST: host.docker.internal
DB_PORT: 5432
DB_NAME: trading_platform
DB_USER: trading_user
DB_PASSWORD: ${DB_PASSWORD:-trading_dev_2025}
# Redis nativo
REDIS_HOST: host.docker.internal
REDIS_PORT: 6379
REDIS_DB: 1
LLM_PROVIDER: ${LLM_PROVIDER:-ollama}
LLM_MODEL: ${LLM_MODEL:-llama3.2}
OLLAMA_URL: ${OLLAMA_URL:-http://host.docker.internal:11434}
LOG_LEVEL: INFO
ports:
- "${LLM_AGENT_PORT:-3085}:3085"
volumes:
- ./apps/llm-agent/src:/app/src
- ./apps/llm-agent/config:/app/config
networks:
- trading-network
extra_hosts:
- "host.docker.internal:host-gateway"
depends_on:
- ml-engine
- data-service
command: uvicorn src.api.main:app --host 0.0.0.0 --port 3085 --reload
trading-agents:
build:
context: ./apps/trading-agents
dockerfile: Dockerfile
container_name: trading-trading-agents
restart: unless-stopped
environment:
PYTHONUNBUFFERED: 1
PORT: ${TRADING_AGENTS_PORT:-3086}
ML_ENGINE_URL: http://ml-engine:3083
LLM_AGENT_URL: http://llm-agent:3085
DATA_SERVICE_URL: http://data-service:3084
# PostgreSQL nativo
DB_HOST: host.docker.internal
DB_PORT: 5432
DB_NAME: trading_platform
DB_USER: trading_user
DB_PASSWORD: ${DB_PASSWORD:-trading_dev_2025}
# Redis nativo
REDIS_HOST: host.docker.internal
REDIS_PORT: 6379
REDIS_DB: 1
EXCHANGE_MODE: ${EXCHANGE_MODE:-paper}
INITIAL_BALANCE: ${INITIAL_BALANCE:-100000}
LOG_LEVEL: INFO
ports:
- "${TRADING_AGENTS_PORT:-3086}:3086"
volumes:
- ./apps/trading-agents/src:/app/src
- ./apps/trading-agents/config:/app/config
networks:
- trading-network
extra_hosts:
- "host.docker.internal:host-gateway"
depends_on:
- ml-engine
- llm-agent
command: uvicorn src.api.main:app --host 0.0.0.0 --port 3086 --reload
# =========================================================================== # ===========================================================================
# DEVELOPMENT TOOLS (Optional) # DEVELOPMENT TOOLS (Optional)
# =========================================================================== # ===========================================================================
pgadmin: pgadmin:
image: dpage/pgadmin4:latest image: dpage/pgadmin4:latest
container_name: orbiquant-pgadmin container_name: trading-pgadmin
restart: unless-stopped restart: unless-stopped
environment: environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_EMAIL:-admin@orbiquant.io} PGADMIN_DEFAULT_EMAIL: ${PGADMIN_EMAIL:-admin@trading-platform.local}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_PASSWORD:-admin} PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_PASSWORD:-admin}
PGADMIN_CONFIG_SERVER_MODE: 'False' PGADMIN_CONFIG_SERVER_MODE: 'False'
ports: ports:
@ -200,32 +256,29 @@ services:
volumes: volumes:
- pgadmin_data:/var/lib/pgadmin - pgadmin_data:/var/lib/pgadmin
networks: networks:
- orbiquant-network - trading-network
depends_on: extra_hosts:
- postgres - "host.docker.internal:host-gateway"
profiles: profiles:
- dev-tools - dev-tools
mailhog: mailhog:
image: mailhog/mailhog:latest image: mailhog/mailhog:latest
container_name: orbiquant-mailhog container_name: trading-mailhog
restart: unless-stopped restart: unless-stopped
ports: ports:
- "${MAILHOG_SMTP_PORT:-1025}:1025" # SMTP - "${MAILHOG_SMTP_PORT:-1025}:1025" # SMTP
- "${MAILHOG_WEB_PORT:-8025}:8025" # Web UI - "${MAILHOG_WEB_PORT:-8025}:8025" # Web UI
networks: networks:
- orbiquant-network - trading-network
profiles: profiles:
- dev-tools - dev-tools
# ============================================================================= # =============================================================================
# VOLUMES # VOLUMES
# ============================================================================= # =============================================================================
# NOTA: postgres_data y redis_data eliminados - se usan instancias nativas
volumes: volumes:
postgres_data:
driver: local
redis_data:
driver: local
backend_node_modules: backend_node_modules:
driver: local driver: local
frontend_node_modules: frontend_node_modules:
@ -239,9 +292,9 @@ volumes:
# NETWORKS # NETWORKS
# ============================================================================= # =============================================================================
networks: networks:
orbiquant-network: trading-network:
driver: bridge driver: bridge
name: orbiquant-network name: trading-network
# ============================================================================= # =============================================================================
# USAGE INSTRUCTIONS # USAGE INSTRUCTIONS

View File

@ -1,20 +1,49 @@
--- ---
id: "NOTA-DISCREPANCIA-PUERTOS-2025-12-08" id: "NOTA-DISCREPANCIA-PUERTOS-2025-12-08"
title: "Discrepancia de Puertos Detectada" title: "Discrepancia de Puertos - RESUELTA"
type: "Documentation" type: "Documentation"
project: "trading-platform" project: "trading-platform"
version: "1.0.0" version: "2.0.0"
updated_date: "2026-01-04" updated_date: "2026-01-07"
status: "RESUELTO"
--- ---
# NOTA: Discrepancia de Puertos Detectada # NOTA: Discrepancia de Puertos - RESUELTA
**Fecha:** 2025-12-08 **Fecha Original:** 2025-12-08
**Fecha Resolución:** 2026-01-07
**Para:** DevEnv-Agent **Para:** DevEnv-Agent
**De:** Requirements-Analyst **De:** Requirements-Analyst / Claude Code
**Urgencia:** Media **Urgencia:** ~~Media~~ RESUELTA
**Proyecto:** trading-platform **Proyecto:** trading-platform
## RESOLUCIÓN (2026-01-07)
La discrepancia ha sido resuelta alineando todos los archivos con la fuente de verdad oficial:
- **Fuente de verdad:** `/home/isem/workspace-v1/control-plane/registries/ports.registry.yml`
### Puertos Oficiales Aplicados:
| Servicio | Puerto |
|----------|--------|
| Frontend | 3080 |
| Backend | 3081 |
| WebSocket | 3082 |
| ML Engine | 3083 |
| Data Service | 3084 |
| LLM Agent | 3085 |
| Trading Agents | 3086 |
### Archivos Actualizados:
- [x] `docker-compose.yml`
- [x] `apps/*/\*.env.example` (5 archivos)
- [x] `apps/ml-engine/config/database.yaml`
- [x] `apps/frontend/src/services/*.ts` (4 archivos)
- [x] `orchestration/inventarios/MASTER_INVENTORY.yml`
---
## Historial Original (para referencia)
--- ---
## Descripcion del Problema ## Descripcion del Problema

View File

@ -1,13 +1,13 @@
--- ---
id: "ARQUITECTURA-GENERAL" id: "ARQUITECTURA-GENERAL"
title: "Arquitectura General - OrbiQuant IA" title: "Arquitectura General - Trading Platform"
type: "Documentation" type: "Documentation"
project: "trading-platform" project: "trading-platform"
version: "1.0.0" version: "1.0.0"
updated_date: "2026-01-04" updated_date: "2026-01-04"
--- ---
# Arquitectura General - OrbiQuant IA # Arquitectura General - Trading Platform
**Version:** 1.0.0 **Version:** 1.0.0
**Fecha:** 2025-12-05 **Fecha:** 2025-12-05

View File

@ -1,13 +1,13 @@
--- ---
id: "STACK-TECNOLOGICO" id: "STACK-TECNOLOGICO"
title: "Stack Tecnologico - OrbiQuant IA" title: "Stack Tecnologico - Trading Platform"
type: "Documentation" type: "Documentation"
project: "trading-platform" project: "trading-platform"
version: "1.0.0" version: "1.0.0"
updated_date: "2026-01-04" updated_date: "2026-01-04"
--- ---
# Stack Tecnologico - OrbiQuant IA # Stack Tecnologico - Trading Platform
**Version:** 1.0.0 **Version:** 1.0.0
**Fecha:** 2025-12-05 **Fecha:** 2025-12-05
@ -261,7 +261,7 @@ from fastapi import FastAPI, HTTPException
from pydantic import BaseModel from pydantic import BaseModel
import numpy as np import numpy as np
app = FastAPI(title="OrbiQuant ML Engine") app = FastAPI(title="Trading Platform ML Engine")
class PredictionRequest(BaseModel): class PredictionRequest(BaseModel):
symbol: str symbol: str
@ -389,7 +389,7 @@ const client = twilio(accountSid, authToken);
// Send WhatsApp OTP // Send WhatsApp OTP
await client.messages.create({ await client.messages.create({
body: `Tu codigo OrbiQuant: ${otp}`, body: `Tu codigo Trading Platform: ${otp}`,
from: 'whatsapp:+14155238886', from: 'whatsapp:+14155238886',
to: `whatsapp:${phoneNumber}`, to: `whatsapp:${phoneNumber}`,
}); });

View File

@ -1,13 +1,13 @@
--- ---
id: "VISION-PRODUCTO" id: "VISION-PRODUCTO"
title: "Vision del Producto - OrbiQuant IA" title: "Vision del Producto - Trading Platform"
type: "Documentation" type: "Documentation"
project: "trading-platform" project: "trading-platform"
version: "1.0.0" version: "1.0.0"
updated_date: "2026-01-04" updated_date: "2026-01-04"
--- ---
# Vision del Producto - OrbiQuant IA # Vision del Producto - Trading Platform
**Version:** 1.0.0 **Version:** 1.0.0
**Fecha:** 2025-12-05 **Fecha:** 2025-12-05

View File

@ -11,13 +11,13 @@ updated_date: "2026-01-04"
**Ultima actualizacion:** 2025-12-05 **Ultima actualizacion:** 2025-12-05
**Estado:** ✅ Completado **Estado:** ✅ Completado
**Version:** 1.0.0 **Version:** 1.0.0
**Proposito:** Documentacion de alto nivel del proyecto OrbiQuant IA **Proposito:** Documentacion de alto nivel del proyecto Trading Platform
--- ---
## Proposito ## Proposito
Esta carpeta contiene la vision general, arquitectura y definiciones fundamentales del proyecto OrbiQuant IA. Sirve como punto de entrada para entender el alcance, objetivos y estructura tecnica de la plataforma. Esta carpeta contiene la vision general, arquitectura y definiciones fundamentales del proyecto Trading Platform. Sirve como punto de entrada para entender el alcance, objetivos y estructura tecnica de la plataforma.
--- ---
@ -37,7 +37,7 @@ Esta carpeta contiene la vision general, arquitectura y definiciones fundamental
## Vision del Producto ## Vision del Producto
**OrbiQuant IA** es una plataforma SaaS que democratiza el acceso a herramientas de trading e inversion profesionales mediante: **Trading Platform** es una plataforma SaaS que democratiza el acceso a herramientas de trading e inversion profesionales mediante:
1. **Educacion Accesible** - Cursos estructurados de trading 1. **Educacion Accesible** - Cursos estructurados de trading
2. **Agentes IA** - Gestion automatizada de inversiones 2. **Agentes IA** - Gestion automatizada de inversiones
@ -59,7 +59,7 @@ Esta carpeta contiene la vision general, arquitectura y definiciones fundamental
## Diferenciadores Clave ## Diferenciadores Clave
| Competidor | OrbiQuant Diferenciador | | Competidor | Trading Platform Diferenciador |
|------------|------------------------| |------------|------------------------|
| Trade Republic | + Educacion integrada + Agentes IA personalizables | | Trade Republic | + Educacion integrada + Agentes IA personalizables |
| eToro | + Sin comisiones ocultas + ML transparente | | eToro | + Sin comisiones ocultas + ML transparente |

View File

@ -30,7 +30,7 @@ Este documento describe la arquitectura de integracion entre:
``` ```
┌─────────────────────────────────────────────────────────────────────────────────────┐ ┌─────────────────────────────────────────────────────────────────────────────────────┐
ORBIQUANT IA - TRADING PLATFORM ARCHITECTURE TRADING PLATFORM ARCHITECTURE
├─────────────────────────────────────────────────────────────────────────────────────┤ ├─────────────────────────────────────────────────────────────────────────────────────┤
│ │ │ │
│ ┌─────────────────────────────────────────────────────────────────────────────────┐ │ │ ┌─────────────────────────────────────────────────────────────────────────────────┐ │
@ -249,4 +249,4 @@ Response ──► MT4 Gateway ──► MCP Server ──► LLM Agent ──
--- ---
*Documento generado por Tech-Leader Agent* *Documento generado por Tech-Leader Agent*
*OrbiQuant IA Trading Platform* *Trading Platform*

View File

@ -29,7 +29,7 @@ Esta arquitectura permite ejecutar **múltiples agentes de trading**, cada uno c
``` ```
┌─────────────────────────────────────────────────────────────────────────────┐ ┌─────────────────────────────────────────────────────────────────────────────┐
ORBIQUANT MULTI-AGENT PLATFORM TRADING MULTI-AGENT PLATFORM
├─────────────────────────────────────────────────────────────────────────────┤ ├─────────────────────────────────────────────────────────────────────────────┤
│ │ │ │
│ ┌────────────────────────────────────────────────────────────────────────┐ │ │ ┌────────────────────────────────────────────────────────────────────────┐ │
@ -214,7 +214,7 @@ class MT4Client:
lots: float, lots: float,
sl: Optional[float] = None, sl: Optional[float] = None,
tp: Optional[float] = None, tp: Optional[float] = None,
comment: str = "OrbiQuant" comment: str = "Trading Platform"
) -> Dict: ) -> Dict:
async with aiohttp.ClientSession() as session: async with aiohttp.ClientSession() as session:
async with session.post( async with session.post(
@ -309,7 +309,7 @@ async def execute_agent_trade(
lots=trade_request["lots"], lots=trade_request["lots"],
sl=trade_request.get("sl"), sl=trade_request.get("sl"),
tp=trade_request.get("tp"), tp=trade_request.get("tp"),
comment=f"OrbiQuant-{config['name']}" comment=f"Trading Platform-{config['name']}"
) )

View File

@ -1,13 +1,13 @@
--- ---
id: "ARQUITECTURA-UNIFICADA" id: "ARQUITECTURA-UNIFICADA"
title: "Arquitectura Unificada - OrbiQuant IA Trading Platform" title: "Arquitectura Unificada - Trading Platform"
type: "Documentation" type: "Documentation"
project: "trading-platform" project: "trading-platform"
version: "1.0.0" version: "1.0.0"
updated_date: "2026-01-04" updated_date: "2026-01-04"
--- ---
# Arquitectura Unificada - OrbiQuant IA Trading Platform # Arquitectura Unificada - Trading Platform
**Versión:** 2.0.0 **Versión:** 2.0.0
**Última actualización:** 2025-12-05 **Última actualización:** 2025-12-05
@ -17,7 +17,7 @@ updated_date: "2026-01-04"
## Resumen Ejecutivo ## Resumen Ejecutivo
Este documento define la arquitectura completa de OrbiQuant IA, integrando el sistema TradingAgent existente con la nueva plataforma de trading. Define cómo interactúan todos los componentes para ofrecer una experiencia completa de Money Manager con IA. Este documento define la arquitectura completa de Trading Platform, integrando el sistema TradingAgent existente con la nueva plataforma de trading. Define cómo interactúan todos los componentes para ofrecer una experiencia completa de Money Manager con IA.
--- ---
@ -25,7 +25,7 @@ Este documento define la arquitectura completa de OrbiQuant IA, integrando el si
``` ```
┌─────────────────────────────────────────────────────────────────────────────────────────────────┐ ┌─────────────────────────────────────────────────────────────────────────────────────────────────┐
ORBIQUANT IA PLATFORM TRADING PLATFORM
│ │ │ │
│ ┌─────────────────────────────────────────────────────────────────────────────────────────┐ │ │ ┌─────────────────────────────────────────────────────────────────────────────────────────┐ │
│ │ FRONTEND LAYER │ │ │ │ FRONTEND LAYER │ │

View File

@ -1,13 +1,13 @@
--- ---
id: "DIAGRAMA-INTEGRACIONES" id: "DIAGRAMA-INTEGRACIONES"
title: "Diagrama de Integraciones - OrbiQuant IA Trading Platform" title: "Diagrama de Integraciones - Trading Platform"
type: "Documentation" type: "Documentation"
project: "trading-platform" project: "trading-platform"
version: "1.0.0" version: "1.0.0"
updated_date: "2026-01-04" updated_date: "2026-01-04"
--- ---
# Diagrama de Integraciones - OrbiQuant IA Trading Platform # Diagrama de Integraciones - Trading Platform
**Version:** 1.0.0 **Version:** 1.0.0
**Fecha:** 2025-12-05 **Fecha:** 2025-12-05
@ -18,7 +18,7 @@ updated_date: "2026-01-04"
## 1. Resumen Ejecutivo ## 1. Resumen Ejecutivo
Este documento detalla todos los flujos de integracion entre componentes del sistema OrbiQuant IA, incluyendo: Este documento detalla todos los flujos de integracion entre componentes del sistema Trading Platform, incluyendo:
- **Flujos de datos** entre servicios - **Flujos de datos** entre servicios
- **APIs y endpoints** disponibles - **APIs y endpoints** disponibles
- **Eventos y webhooks** para comunicacion asincrona - **Eventos y webhooks** para comunicacion asincrona
@ -338,8 +338,8 @@ Este documento detalla todos los flujos de integracion entre componentes del sis
│ HTTPS │ { │ HTTPS │ {
└────┬────────────┘ "mode": "subscription", └────┬────────────┘ "mode": "subscription",
│ "line_items": [{ price: "price_pro" }], │ "line_items": [{ price: "price_pro" }],
│ "success_url": "https://app.orbiquant.com/success", │ "success_url": "https://app.trading.com/success",
│ "cancel_url": "https://app.orbiquant.com/cancel" │ "cancel_url": "https://app.trading.com/cancel"
│ } │ }
│ Response: { url: "checkout.stripe.com/..." } │ Response: { url: "checkout.stripe.com/..." }
@ -372,7 +372,7 @@ Este documento detalla todos los flujos de integracion entre componentes del sis
│ 5. Webhook trigger (async) │ 5. Webhook trigger (async)
┌─────────────────┐ ┌─────────────────┐
│ Stripe │ POST https://api.orbiquant.com/payments/webhook │ Stripe │ POST https://api.trading.com/payments/webhook
│ Webhook │ Headers: │ Webhook │ Headers:
└────┬────────────┘ Stripe-Signature: t=...,v1=... └────┬────────────┘ Stripe-Signature: t=...,v1=...
│ Body: │ Body:

View File

@ -12,7 +12,7 @@ updated_date: "2026-01-04"
**Version:** 1.0.0 **Version:** 1.0.0
**Fecha:** 2025-12-08 **Fecha:** 2025-12-08
**Modulo:** Data Services **Modulo:** Data Services
**Autor:** Trading Strategist - OrbiQuant IA **Autor:** Trading Strategist - Trading Platform
--- ---
@ -890,7 +890,7 @@ from pydantic import BaseModel
from typing import List, Optional from typing import List, Optional
from datetime import datetime from datetime import datetime
app = FastAPI(title="OrbiQuant Data Service") app = FastAPI(title="Trading Platform Data Service")
class SyncRequest(BaseModel): class SyncRequest(BaseModel):
symbol: str symbol: str
@ -1005,7 +1005,7 @@ async def health():
from celery import Celery from celery import Celery
from celery.schedules import crontab from celery.schedules import crontab
celery_app = Celery('orbiquant_data') celery_app = Celery('trading_data')
celery_app.conf.beat_schedule = { celery_app.conf.beat_schedule = {
# Full sync once a day at 4 AM UTC # Full sync once a day at 4 AM UTC
@ -1102,52 +1102,52 @@ services:
build: build:
context: . context: .
dockerfile: Dockerfile.data dockerfile: Dockerfile.data
container_name: orbiquant-data container_name: trading-data
ports: ports:
- "3604:3604" # Data service (base 3600 + 4) - "3604:3604" # Data service (base 3600 + 4)
environment: environment:
- API_MASSIVE_KEY=${API_MASSIVE_KEY} - API_MASSIVE_KEY=${API_MASSIVE_KEY}
- DATABASE_URL=postgresql://orbiquant_user:orbiquant_dev_2025@postgres:5438/orbiquant_trading - DATABASE_URL=postgresql://trading_user:trading_dev_2025@postgres:5438/trading_data
- REDIS_URL=redis://redis:6385 - REDIS_URL=redis://redis:6385
- SERVICE_PORT=3604 - SERVICE_PORT=3604
depends_on: depends_on:
- redis - redis
networks: networks:
- orbiquant-network - trading-network
restart: unless-stopped restart: unless-stopped
celery-worker: celery-worker:
build: build:
context: . context: .
dockerfile: Dockerfile.data dockerfile: Dockerfile.data
container_name: orbiquant-celery container_name: trading-celery
command: celery -A tasks worker -l info command: celery -A tasks worker -l info
environment: environment:
- API_MASSIVE_KEY=${API_MASSIVE_KEY} - API_MASSIVE_KEY=${API_MASSIVE_KEY}
- DATABASE_URL=postgresql://orbiquant_user:orbiquant_dev_2025@postgres:5438/orbiquant_trading - DATABASE_URL=postgresql://trading_user:trading_dev_2025@postgres:5438/trading_data
- REDIS_URL=redis://redis:6385 - REDIS_URL=redis://redis:6385
networks: networks:
- orbiquant-network - trading-network
restart: unless-stopped restart: unless-stopped
celery-beat: celery-beat:
build: build:
context: . context: .
dockerfile: Dockerfile.data dockerfile: Dockerfile.data
container_name: orbiquant-beat container_name: trading-beat
command: celery -A tasks beat -l info command: celery -A tasks beat -l info
environment: environment:
- REDIS_URL=redis://redis:6385 - REDIS_URL=redis://redis:6385
depends_on: depends_on:
- redis - redis
networks: networks:
- orbiquant-network - trading-network
restart: unless-stopped restart: unless-stopped
# Redis dedicado para trading-platform (puerto 6385) # Redis dedicado para trading-platform (puerto 6385)
redis: redis:
image: redis:7-alpine image: redis:7-alpine
container_name: orbiquant-redis container_name: trading-redis
ports: ports:
- "6385:6379" - "6385:6379"
volumes: volumes:
@ -1155,7 +1155,7 @@ services:
restart: unless-stopped restart: unless-stopped
networks: networks:
orbiquant-network: trading-network:
external: true # Red compartida del workspace external: true # Red compartida del workspace
volumes: volumes:
@ -1165,4 +1165,4 @@ volumes:
--- ---
**Documento Generado:** 2025-12-08 **Documento Generado:** 2025-12-08
**Trading Strategist - OrbiQuant IA** **Trading Strategist - Trading Platform**

View File

@ -6,7 +6,7 @@ project: "trading-platform"
version: "1.0.0" version: "1.0.0"
created_date: "2026-01-04" created_date: "2026-01-04"
updated_date: "2026-01-04" updated_date: "2026-01-04"
author: "Orquestador Agent - OrbiQuant IA" author: "Orquestador Agent - Trading Platform"
--- ---
# Integracion LLM con Fine-Tuning para Trading Agent # Integracion LLM con Fine-Tuning para Trading Agent
@ -50,7 +50,7 @@ Crear un agente LLM inteligente que funcione como cerebro del sistema de trading
``` ```
┌─────────────────────────────────────────────────────────────────────────────────┐ ┌─────────────────────────────────────────────────────────────────────────────────┐
ORBIQUANT LLM TRADING AGENT LLM TRADING AGENT
├─────────────────────────────────────────────────────────────────────────────────┤ ├─────────────────────────────────────────────────────────────────────────────────┤
│ │ │ │
│ ┌───────────────────────────────────────────────────────────────────────────┐ │ │ ┌───────────────────────────────────────────────────────────────────────────┐ │
@ -185,7 +185,7 @@ El fine-tuning se realizara con definiciones de estrategias de trading:
```yaml ```yaml
# Estructura del dataset de fine-tuning # Estructura del dataset de fine-tuning
dataset: dataset:
name: orbiquant_trading_strategies_v1 name: trading_data_strategies_v1
format: JSONL format: JSONL
categories: categories:
@ -241,7 +241,7 @@ lora_config = LoraConfig(
# Training config optimizado para GPU 16GB # Training config optimizado para GPU 16GB
training_args = TrainingArguments( training_args = TrainingArguments(
output_dir="./orbiquant-llm-finetuned", output_dir="./trading-llm-finetuned",
per_device_train_batch_size=4, per_device_train_batch_size=4,
gradient_accumulation_steps=4, gradient_accumulation_steps=4,
num_train_epochs=3, num_train_epochs=3,
@ -1338,14 +1338,14 @@ Esperar confirmacion de nueva fase con:
# Configuracion # Configuracion
MODEL_NAME="meta-llama/Meta-Llama-3-8B-Instruct" MODEL_NAME="meta-llama/Meta-Llama-3-8B-Instruct"
OUTPUT_DIR="./orbiquant-llm-finetuned" OUTPUT_DIR="./trading-llm-finetuned"
DATASET_PATH="./data/trading_strategies.jsonl" DATASET_PATH="./data/trading_strategies.jsonl"
# Verificar GPU # Verificar GPU
nvidia-smi nvidia-smi
# Activar ambiente # Activar ambiente
source activate orbiquant-llm source activate trading-llm
# Ejecutar entrenamiento # Ejecutar entrenamiento
python train_lora.py \ python train_lora.py \
@ -1391,7 +1391,7 @@ services:
# Ollama con modelo fine-tuned # Ollama con modelo fine-tuned
ollama: ollama:
image: ollama/ollama:latest image: ollama/ollama:latest
container_name: orbiquant-ollama container_name: trading-ollama
ports: ports:
- "11434:11434" - "11434:11434"
volumes: volumes:
@ -1413,14 +1413,14 @@ services:
build: build:
context: ./apps/llm-agent context: ./apps/llm-agent
dockerfile: Dockerfile dockerfile: Dockerfile
container_name: orbiquant-llm-agent container_name: trading-llm-agent
ports: ports:
- "3085:3085" - "3085:3085"
environment: environment:
- OLLAMA_URL=http://ollama:11434 - OLLAMA_URL=http://ollama:11434
- LLM_MODEL=orbiquant-trading:latest # Modelo fine-tuned - LLM_MODEL=trading-trading:latest # Modelo fine-tuned
- REDIS_URL=redis://redis:6379 - REDIS_URL=redis://redis:6379
- DATABASE_URL=postgresql://user:pass@postgres:5432/orbiquant - DATABASE_URL=postgresql://user:pass@postgres:5432/trading
- ML_ENGINE_URL=http://ml-engine:3083 - ML_ENGINE_URL=http://ml-engine:3083
- MCP_MT4_URL=http://mcp-mt4:3605 - MCP_MT4_URL=http://mcp-mt4:3605
- MCP_BINANCE_URL=http://mcp-binance:3606 - MCP_BINANCE_URL=http://mcp-binance:3606
@ -1435,7 +1435,7 @@ services:
build: build:
context: ./apps/mcp-mt4-connector context: ./apps/mcp-mt4-connector
dockerfile: Dockerfile dockerfile: Dockerfile
container_name: orbiquant-mcp-mt4 container_name: trading-mcp-mt4
ports: ports:
- "3605:3605" - "3605:3605"
environment: environment:
@ -1448,7 +1448,7 @@ services:
build: build:
context: ./apps/mcp-binance-connector context: ./apps/mcp-binance-connector
dockerfile: Dockerfile dockerfile: Dockerfile
container_name: orbiquant-mcp-binance container_name: trading-mcp-binance
ports: ports:
- "3606:3606" - "3606:3606"
environment: environment:
@ -1462,11 +1462,11 @@ services:
build: build:
context: ./apps/ml-engine context: ./apps/ml-engine
dockerfile: Dockerfile dockerfile: Dockerfile
container_name: orbiquant-ml-engine container_name: trading-ml-engine
ports: ports:
- "3083:3083" - "3083:3083"
environment: environment:
- DATABASE_URL=postgresql://user:pass@postgres:5432/orbiquant - DATABASE_URL=postgresql://user:pass@postgres:5432/trading
- REDIS_URL=redis://redis:6379 - REDIS_URL=redis://redis:6379
volumes: volumes:
- ml_models:/app/models - ml_models:/app/models
@ -1475,7 +1475,7 @@ services:
# Redis # Redis
redis: redis:
image: redis:7-alpine image: redis:7-alpine
container_name: orbiquant-redis container_name: trading-redis
ports: ports:
- "6379:6379" - "6379:6379"
volumes: volumes:
@ -1485,13 +1485,13 @@ services:
# PostgreSQL # PostgreSQL
postgres: postgres:
image: postgres:16-alpine image: postgres:16-alpine
container_name: orbiquant-postgres container_name: trading-postgres
ports: ports:
- "5432:5432" - "5432:5432"
environment: environment:
- POSTGRES_USER=user - POSTGRES_USER=user
- POSTGRES_PASSWORD=pass - POSTGRES_PASSWORD=pass
- POSTGRES_DB=orbiquant - POSTGRES_DB=trading
volumes: volumes:
- postgres_data:/var/lib/postgresql/data - postgres_data:/var/lib/postgresql/data
restart: unless-stopped restart: unless-stopped
@ -1509,7 +1509,7 @@ volumes:
#!/bin/bash #!/bin/bash
# scripts/init_llm_system.sh # scripts/init_llm_system.sh
echo "=== OrbiQuant LLM Trading System Setup ===" echo "=== Trading Platform LLM Trading System Setup ==="
# 1. Verificar GPU # 1. Verificar GPU
echo "[1/6] Verificando GPU..." echo "[1/6] Verificando GPU..."
@ -1522,11 +1522,11 @@ docker-compose -f docker-compose.llm-advanced.yaml up -d postgres redis
# 3. Esperar a que postgres este listo # 3. Esperar a que postgres este listo
echo "[3/6] Esperando PostgreSQL..." echo "[3/6] Esperando PostgreSQL..."
sleep 10 sleep 10
docker exec orbiquant-postgres pg_isready docker exec trading-postgres pg_isready
# 4. Ejecutar migraciones # 4. Ejecutar migraciones
echo "[4/6] Ejecutando migraciones SQL..." echo "[4/6] Ejecutando migraciones SQL..."
docker exec -i orbiquant-postgres psql -U user -d orbiquant < ./apps/database/ddl/schemas/ml/llm_predictions.sql docker exec -i trading-postgres psql -U user -d trading < ./apps/database/ddl/schemas/ml/llm_predictions.sql
# 5. Iniciar Ollama y cargar modelo # 5. Iniciar Ollama y cargar modelo
echo "[5/6] Iniciando Ollama..." echo "[5/6] Iniciando Ollama..."
@ -1534,12 +1534,12 @@ docker-compose -f docker-compose.llm-advanced.yaml up -d ollama
sleep 10 sleep 10
# Verificar si existe modelo fine-tuned # Verificar si existe modelo fine-tuned
if [ -f "./models/orbiquant-trading.gguf" ]; then if [ -f "./models/trading-trading.gguf" ]; then
echo "Cargando modelo fine-tuned..." echo "Cargando modelo fine-tuned..."
docker exec orbiquant-ollama ollama create orbiquant-trading -f /models/Modelfile docker exec trading-ollama ollama create trading-trading -f /models/Modelfile
else else
echo "Modelo fine-tuned no encontrado, usando Llama 3..." echo "Modelo fine-tuned no encontrado, usando Llama 3..."
docker exec orbiquant-ollama ollama pull llama3:8b-instruct-q5_K_M docker exec trading-ollama ollama pull llama3:8b-instruct-q5_K_M
fi fi
# 6. Iniciar resto de servicios # 6. Iniciar resto de servicios
@ -1695,5 +1695,5 @@ async def test_fine_tuned_trading_knowledge():
--- ---
**Documento Generado:** 2026-01-04 **Documento Generado:** 2026-01-04
**Autor:** Orquestador Agent - OrbiQuant IA **Autor:** Orquestador Agent - Trading Platform
**Version:** 1.0.0 **Version:** 1.0.0

View File

@ -12,7 +12,7 @@ updated_date: "2026-01-04"
**Version:** 1.0.0 **Version:** 1.0.0
**Fecha:** 2025-12-08 **Fecha:** 2025-12-08
**Modulo:** OQI-007-llm-agent **Modulo:** OQI-007-llm-agent
**Autor:** Trading Strategist - OrbiQuant IA **Autor:** Trading Strategist - Trading Platform
--- ---
@ -649,7 +649,7 @@ TOOL_DEFINITIONS = [
```python ```python
# prompts/system_prompt.py # prompts/system_prompt.py
SYSTEM_PROMPT = """Eres OrbiQuant AI, un copiloto de trading especializado en mercados de forex y metales preciosos. SYSTEM_PROMPT = """Eres Trading Platform AI, un copiloto de trading especializado en mercados de forex y metales preciosos.
## Tu Rol ## Tu Rol
- Analizar senales de los modelos ML y explicarlas claramente - Analizar senales de los modelos ML y explicarlas claramente
@ -758,7 +758,7 @@ from typing import List, Optional
import redis import redis
import json import json
app = FastAPI(title="OrbiQuant LLM Service") app = FastAPI(title="Trading Platform LLM Service")
class Message(BaseModel): class Message(BaseModel):
role: str # "user" or "assistant" role: str # "user" or "assistant"
@ -1009,7 +1009,7 @@ version: '3.8'
services: services:
ollama: ollama:
image: ollama/ollama:latest image: ollama/ollama:latest
container_name: orbiquant-ollama container_name: trading-ollama
ports: ports:
- "11434:11434" - "11434:11434"
volumes: volumes:
@ -1027,7 +1027,7 @@ services:
build: build:
context: . context: .
dockerfile: Dockerfile.llm dockerfile: Dockerfile.llm
container_name: orbiquant-llm container_name: trading-llm
ports: ports:
- "3602:3602" # LLM service (base 3600 + 2) - "3602:3602" # LLM service (base 3600 + 2)
environment: environment:
@ -1042,7 +1042,7 @@ services:
redis: redis:
image: redis:7-alpine image: redis:7-alpine
container_name: orbiquant-redis container_name: trading-redis
ports: ports:
- "6385:6379" # Puerto asignado segun DEVENV-PORTS - "6385:6379" # Puerto asignado segun DEVENV-PORTS
volumes: volumes:
@ -1060,7 +1060,7 @@ volumes:
#!/bin/bash #!/bin/bash
# scripts/init_llm.sh # scripts/init_llm.sh
echo "=== OrbiQuant LLM Setup ===" echo "=== Trading Platform LLM Setup ==="
# 1. Check GPU # 1. Check GPU
echo "Checking GPU..." echo "Checking GPU..."
@ -1173,4 +1173,4 @@ async def test_response_time():
--- ---
**Documento Generado:** 2025-12-08 **Documento Generado:** 2025-12-08
**Trading Strategist - OrbiQuant IA** **Trading Strategist - Trading Platform**

View File

@ -12,7 +12,7 @@ updated_date: "2026-01-04"
**Version:** 1.0.0 **Version:** 1.0.0
**Fecha:** 2025-12-08 **Fecha:** 2025-12-08
**Modulo:** Trading Operations **Modulo:** Trading Operations
**Autor:** Trading Strategist - OrbiQuant IA **Autor:** Trading Strategist - Trading Platform
--- ---
@ -65,7 +65,7 @@ Integrar MetaTrader4 (MT4) como broker de ejecucion para:
├─────────────────────────────────────────────────────────────────────────────┤ ├─────────────────────────────────────────────────────────────────────────────┤
│ │ │ │
│ ┌─────────────────────┐ │ │ ┌─────────────────────┐ │
│ │ OrbiQuant IA │ │ │ │ Trading Platform │ │
│ │ Trading Service │ │ │ │ Trading Service │ │
│ │ │ │ │ │ │ │
│ │ ┌───────────────┐ │ ┌─────────────────────────────────────────┐ │ │ │ ┌───────────────┐ │ ┌─────────────────────────────────────────┐ │
@ -201,8 +201,8 @@ async def provision_account(
'server': server, 'server': server,
'platform': 'mt4', 'platform': 'mt4',
'magic': 123456, # Magic number for our trades 'magic': 123456, # Magic number for our trades
'application': 'OrbiQuantIA', 'application': 'Trading PlatformIA',
'keywords': ['orbiquant', 'ml-trading'] 'keywords': ['trading', 'ml-trading']
}) })
# Deploy and wait for connection # Deploy and wait for connection
@ -465,7 +465,7 @@ class TradeManager:
stop_loss=adjusted_sl, stop_loss=adjusted_sl,
take_profit=adjusted_tp, take_profit=adjusted_tp,
options={ options={
'comment': request.comment or 'OrbiQuant IA', 'comment': request.comment or 'Trading Platform',
'clientId': f'OQ_{int(time.time())}', 'clientId': f'OQ_{int(time.time())}',
'magic': request.magic, 'magic': request.magic,
'slippage': self.config['risk']['max_slippage_pips'] 'slippage': self.config['risk']['max_slippage_pips']
@ -478,7 +478,7 @@ class TradeManager:
stop_loss=adjusted_sl, stop_loss=adjusted_sl,
take_profit=adjusted_tp, take_profit=adjusted_tp,
options={ options={
'comment': request.comment or 'OrbiQuant IA', 'comment': request.comment or 'Trading Platform',
'clientId': f'OQ_{int(time.time())}', 'clientId': f'OQ_{int(time.time())}',
'magic': request.magic, 'magic': request.magic,
'slippage': self.config['risk']['max_slippage_pips'] 'slippage': self.config['risk']['max_slippage_pips']
@ -760,7 +760,7 @@ from fastapi import FastAPI, HTTPException
from pydantic import BaseModel from pydantic import BaseModel
from typing import List, Optional from typing import List, Optional
app = FastAPI(title="OrbiQuant Trading Service") app = FastAPI(title="Trading Platform Trading Service")
class TradeRequestModel(BaseModel): class TradeRequestModel(BaseModel):
symbol: str symbol: str
@ -1056,14 +1056,14 @@ services:
build: build:
context: . context: .
dockerfile: Dockerfile.trading dockerfile: Dockerfile.trading
container_name: orbiquant-trading container_name: trading-trading
ports: ports:
- "3603:3603" # Trading service (base 3600 + 3) - "3603:3603" # Trading service (base 3600 + 3)
environment: environment:
- METAAPI_TOKEN=${METAAPI_TOKEN} - METAAPI_TOKEN=${METAAPI_TOKEN}
- ML_ENGINE_URL=http://ml-engine:3601 - ML_ENGINE_URL=http://ml-engine:3601
- REDIS_URL=redis://redis:6385 - REDIS_URL=redis://redis:6385
- DATABASE_URL=postgresql://orbiquant_user:orbiquant_dev_2025@postgres:5438/orbiquant_trading - DATABASE_URL=postgresql://trading_user:trading_dev_2025@postgres:5438/trading_data
volumes: volumes:
- ./config:/app/config - ./config:/app/config
- ./logs:/app/logs - ./logs:/app/logs
@ -1163,4 +1163,4 @@ async def test_spread_too_high(trade_manager):
--- ---
**Documento Generado:** 2025-12-08 **Documento Generado:** 2025-12-08
**Trading Strategist - OrbiQuant IA** **Trading Strategist - Trading Platform**

View File

@ -1,13 +1,13 @@
--- ---
id: "INTEGRACION-TRADINGAGENT" id: "INTEGRACION-TRADINGAGENT"
title: "Integracion TradingAgent - OrbiQuant IA" title: "Integracion TradingAgent - Trading Platform"
type: "Documentation" type: "Documentation"
project: "trading-platform" project: "trading-platform"
version: "1.0.0" version: "1.0.0"
updated_date: "2026-01-04" updated_date: "2026-01-04"
--- ---
# Integración TradingAgent - OrbiQuant IA # Integración TradingAgent - Trading Platform
**Versión:** 1.0.0 **Versión:** 1.0.0
**Última actualización:** 2025-12-05 **Última actualización:** 2025-12-05
@ -17,7 +17,7 @@ updated_date: "2026-01-04"
## Resumen ## Resumen
Este documento detalla el plan de integración del proyecto TradingAgent existente (`[LEGACY: apps/ml-engine - migrado desde TradingAgent]`) con la nueva plataforma OrbiQuant IA. El objetivo es reutilizar los componentes ML ya desarrollados y probados. Este documento detalla el plan de integración del proyecto TradingAgent existente (`[LEGACY: apps/ml-engine - migrado desde TradingAgent]`) con la nueva plataforma Trading Platform. El objetivo es reutilizar los componentes ML ya desarrollados y probados.
--- ---
@ -84,7 +84,7 @@ ANTES (TradingAgent standalone):
├── config/ ├── config/
└── scripts/ └── scripts/
DESPUÉS (Integrado en OrbiQuant): DESPUÉS (Integrado en Trading Platform):
/home/isem/workspace/projects/trading-platform/ /home/isem/workspace/projects/trading-platform/
├── apps/ ├── apps/
│ ├── frontend/ # React (nuevo) │ ├── frontend/ # React (nuevo)
@ -119,7 +119,7 @@ async def get_prediction(symbol: str):
} }
``` ```
#### API Nueva (OrbiQuant) #### API Nueva (Trading Platform)
```python ```python
# apps/ml-engine/app/api/routers/predictions.py # apps/ml-engine/app/api/routers/predictions.py
@ -311,7 +311,7 @@ export class SignalSubscriberService {
### Modelos ML ### Modelos ML
| TradingAgent | OrbiQuant | Cambios Requeridos | | TradingAgent | Trading Platform | Cambios Requeridos |
|--------------|-----------|-------------------| |--------------|-----------|-------------------|
| `XGBoostModel` | `RangePredictor` | Renombrar, agregar schemas | | `XGBoostModel` | `RangePredictor` | Renombrar, agregar schemas |
| `TPSLClassifier` | `TPSLClassifier` | Sin cambios | | `TPSLClassifier` | `TPSLClassifier` | Sin cambios |
@ -322,7 +322,7 @@ export class SignalSubscriberService {
### Features ### Features
```python ```python
# Mapeo de features TradingAgent → OrbiQuant # Mapeo de features TradingAgent → Trading Platform
FEATURE_MAPPING = { FEATURE_MAPPING = {
# Volatilidad # Volatilidad
@ -353,7 +353,7 @@ FEATURE_MAPPING = {
### Estrategias ### Estrategias
| TradingAgent | OrbiQuant Agent | Descripción | | TradingAgent | Trading Platform Agent | Descripción |
|--------------|-----------------|-------------| |--------------|-----------------|-------------|
| AMD Accumulation | Atlas Entry | Entradas en acumulación | | AMD Accumulation | Atlas Entry | Entradas en acumulación |
| AMD Distribution | Atlas Exit | Salidas en distribución | | AMD Distribution | Atlas Exit | Salidas en distribución |
@ -377,7 +377,7 @@ API_PORT=8000
API_KEY=your-ml-api-key API_KEY=your-ml-api-key
# Database (nuevo PostgreSQL) # Database (nuevo PostgreSQL)
DATABASE_URL=postgresql://user:pass@postgres:5432/orbiquant DATABASE_URL=postgresql://user:pass@postgres:5432/trading
LEGACY_MYSQL_URL=mysql://root:pass@72.60.226.4:3306/db_trading_meta LEGACY_MYSQL_URL=mysql://root:pass@72.60.226.4:3306/db_trading_meta
# Redis # Redis

View File

@ -6,7 +6,7 @@ project: "trading-platform"
version: "1.0.0" version: "1.0.0"
created_date: "2026-01-04" created_date: "2026-01-04"
updated_date: "2026-01-04" updated_date: "2026-01-04"
author: "Orquestador Agent - OrbiQuant IA" author: "Orquestador Agent - Trading Platform"
--- ---
# MCP Binance Connector - Especificacion Tecnica # MCP Binance Connector - Especificacion Tecnica
@ -1056,7 +1056,7 @@ app.get('/health', (req, res) => {
// MCP Server setup // MCP Server setup
const server = new Server({ const server = new Server({
name: 'orbiquant-binance-mcp', name: 'trading-binance-mcp',
version: '1.0.0' version: '1.0.0'
}, { }, {
capabilities: { capabilities: {
@ -1251,5 +1251,5 @@ describe('MCP Binance Connector API', () => {
--- ---
**Documento Generado:** 2026-01-04 **Documento Generado:** 2026-01-04
**Autor:** Orquestador Agent - OrbiQuant IA **Autor:** Orquestador Agent - Trading Platform
**Version:** 1.0.0 **Version:** 1.0.0

View File

@ -11,7 +11,7 @@ updated_date: "2026-01-04"
## Resumen Ejecutivo ## Resumen Ejecutivo
La épica OQI-001 establece los fundamentos técnicos del proyecto OrbiQuant IA, incluyendo un sistema de autenticación robusto y flexible que soporta múltiples métodos de acceso para maximizar la conversión de usuarios. La épica OQI-001 establece los fundamentos técnicos del proyecto Trading Platform, incluyendo un sistema de autenticación robusto y flexible que soporta múltiples métodos de acceso para maximizar la conversión de usuarios.
--- ---

View File

@ -22,7 +22,7 @@ updated_date: "2026-01-04"
## Resumen ## Resumen
Esta especificación detalla la implementación técnica del sistema de autenticación OAuth 2.0 multi-proveedor para OrbiQuant IA. Esta especificación detalla la implementación técnica del sistema de autenticación OAuth 2.0 multi-proveedor para Trading Platform.
--- ---

View File

@ -22,7 +22,7 @@ updated_date: "2026-01-04"
## Resumen ## Resumen
Esta especificación detalla la implementación del sistema de tokens JWT para autenticación y autorización en OrbiQuant IA. Esta especificación detalla la implementación del sistema de tokens JWT para autenticación y autorización en Trading Platform.
--- ---
@ -131,8 +131,8 @@ export class TokenService {
{ {
expiresIn: this.accessTokenExpiry, expiresIn: this.accessTokenExpiry,
algorithm: 'RS256', algorithm: 'RS256',
issuer: 'orbiquant.com', issuer: 'trading.com',
audience: 'orbiquant.com', audience: 'trading.com',
} }
); );
@ -147,7 +147,7 @@ export class TokenService {
{ {
expiresIn: this.refreshTokenExpiry, expiresIn: this.refreshTokenExpiry,
algorithm: 'RS256', algorithm: 'RS256',
issuer: 'orbiquant.com', issuer: 'trading.com',
} }
); );
@ -166,8 +166,8 @@ export class TokenService {
try { try {
const payload = jwt.verify(token, this.accessTokenSecret, { const payload = jwt.verify(token, this.accessTokenSecret, {
algorithms: ['RS256'], algorithms: ['RS256'],
issuer: 'orbiquant.com', issuer: 'trading.com',
audience: 'orbiquant.com', audience: 'trading.com',
}) as TokenPayload; }) as TokenPayload;
return payload; return payload;
@ -237,8 +237,8 @@ export class TokenService {
"permissions": ["read:portfolio", "trade:paper", "read:education"], "permissions": ["read:portfolio", "trade:paper", "read:education"],
"iat": 1701792000, "iat": 1701792000,
"exp": 1701792900, "exp": 1701792900,
"iss": "orbiquant.com", "iss": "trading.com",
"aud": "orbiquant.com" "aud": "trading.com"
} }
``` ```
@ -259,7 +259,7 @@ export class TokenService {
"type": "refresh", "type": "refresh",
"iat": 1701792000, "iat": 1701792000,
"exp": 1702396800, "exp": 1702396800,
"iss": "orbiquant.com" "iss": "trading.com"
} }
``` ```
@ -428,8 +428,8 @@ JWT_ACCESS_EXPIRY=15m
JWT_REFRESH_EXPIRY=7d JWT_REFRESH_EXPIRY=7d
# Issuer/Audience # Issuer/Audience
JWT_ISSUER=orbiquant.com JWT_ISSUER=trading.com
JWT_AUDIENCE=orbiquant.com JWT_AUDIENCE=trading.com
``` ```
### Generación de Keys RS256 ### Generación de Keys RS256

View File

@ -21,7 +21,7 @@ updated_date: "2026-01-04"
## Resumen ## Resumen
Esta especificación detalla el esquema de base de datos para el sistema de autenticación de OrbiQuant IA. Esta especificación detalla el esquema de base de datos para el sistema de autenticación de Trading Platform.
--- ---
@ -652,10 +652,10 @@ INSERT INTO users (
email_verified email_verified
) VALUES ( ) VALUES (
'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa', 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa',
'admin@orbiquant.com', 'admin@trading.com',
crypt('AdminPassword123!', gen_salt('bf', 12)), crypt('AdminPassword123!', gen_salt('bf', 12)),
'Admin', 'Admin',
'OrbiQuant', 'Trading Platform',
'superadmin', 'superadmin',
'active', 'active',
TRUE TRUE

View File

@ -21,14 +21,14 @@ updated_date: "2026-01-04"
## Resumen ## Resumen
Esta especificación detalla todos los endpoints de la API de autenticación de OrbiQuant IA. Esta especificación detalla todos los endpoints de la API de autenticación de Trading Platform.
--- ---
## Base URL ## Base URL
``` ```
Production: https://api.orbiquant.com/api/v1 Production: https://api.trading.com/api/v1
Development: http://localhost:3000/api/v1 Development: http://localhost:3000/api/v1
``` ```
@ -491,7 +491,7 @@ Authorization: Bearer {accessToken}
"data": { "data": {
"secret": "JBSWY3DPEHPK3PXP", "secret": "JBSWY3DPEHPK3PXP",
"qrCode": "data:image/png;base64,iVBORw0KGgo...", "qrCode": "data:image/png;base64,iVBORw0KGgo...",
"otpauthUrl": "otpauth://totp/OrbiQuant:usuario@example.com?..." "otpauthUrl": "otpauth://totp/Trading Platform:usuario@example.com?..."
} }
} }
``` ```
@ -821,4 +821,4 @@ X-RateLimit-Reset: 1701792060
## Referencias ## Referencias
- [OpenAPI Spec](../../../98-standards/openapi/auth.yaml) - [OpenAPI Spec](../../../98-standards/openapi/auth.yaml)
- [Postman Collection](../../../96-quick-reference/postman/OrbiQuant-Auth.json) - [Postman Collection](../../../96-quick-reference/postman/Trading Platform-Auth.json)

View File

@ -21,7 +21,7 @@ updated_date: "2026-01-04"
## Resumen ## Resumen
Esta especificación detalla las medidas de seguridad implementadas en el sistema de autenticación de OrbiQuant IA. Esta especificación detalla las medidas de seguridad implementadas en el sistema de autenticación de Trading Platform.
--- ---
@ -295,7 +295,7 @@ export const securityHeaders = helmet({
scriptSrc: ["'self'", "'unsafe-inline'"], // Para OAuth popups scriptSrc: ["'self'", "'unsafe-inline'"], // Para OAuth popups
styleSrc: ["'self'", "'unsafe-inline'"], styleSrc: ["'self'", "'unsafe-inline'"],
imgSrc: ["'self'", 'data:', 'https:'], imgSrc: ["'self'", 'data:', 'https:'],
connectSrc: ["'self'", 'https://api.orbiquant.com'], connectSrc: ["'self'", 'https://api.trading.com'],
fontSrc: ["'self'", 'https://fonts.gstatic.com'], fontSrc: ["'self'", 'https://fonts.gstatic.com'],
objectSrc: ["'none'"], objectSrc: ["'none'"],
mediaSrc: ["'self'"], mediaSrc: ["'self'"],

View File

@ -23,7 +23,7 @@ updated_date: "2026-01-04"
## Historia de Usuario ## Historia de Usuario
**Como** visitante de OrbiQuant **Como** visitante de Trading Platform
**Quiero** poder crear una cuenta usando mi email y contraseña **Quiero** poder crear una cuenta usando mi email y contraseña
**Para** acceder a las funcionalidades de la plataforma **Para** acceder a las funcionalidades de la plataforma
@ -87,7 +87,7 @@ updated_date: "2026-01-04"
**Dado** que me registré exitosamente **Dado** que me registré exitosamente
**Cuando** reviso mi email **Cuando** reviso mi email
**Entonces** debería recibir un email con: **Entonces** debería recibir un email con:
- Asunto: "Verifica tu cuenta de OrbiQuant" - Asunto: "Verifica tu cuenta de Trading Platform"
- Un link de verificación válido por 24 horas - Un link de verificación válido por 24 horas
- Instrucciones claras - Instrucciones claras
@ -106,7 +106,7 @@ updated_date: "2026-01-04"
``` ```
┌─────────────────────────────────────────────────────────────┐ ┌─────────────────────────────────────────────────────────────┐
│ │ │ │
│ 🌟 Crea tu cuenta en OrbiQuant │ 🌟 Crea tu cuenta en Trading Platform
│ │ │ │
│ ┌─────────────────────────────────────────────────────┐ │ │ ┌─────────────────────────────────────────────────────┐ │
│ │ Email │ │ │ │ Email │ │

View File

@ -23,7 +23,7 @@ updated_date: "2026-01-04"
## Historia de Usuario ## Historia de Usuario
**Como** usuario registrado de OrbiQuant **Como** usuario registrado de Trading Platform
**Quiero** iniciar sesión con mi email y contraseña **Quiero** iniciar sesión con mi email y contraseña
**Para** acceder a mi cuenta y utilizar la plataforma **Para** acceder a mi cuenta y utilizar la plataforma
@ -107,7 +107,7 @@ updated_date: "2026-01-04"
``` ```
┌─────────────────────────────────────────────────────────────┐ ┌─────────────────────────────────────────────────────────────┐
│ │ │ │
│ 🌟 Inicia sesión en OrbiQuant │ 🌟 Inicia sesión en Trading Platform
│ │ │ │
│ ┌─────────────────────────────────────────────────────┐ │ │ ┌─────────────────────────────────────────────────────┐ │
│ │ Email │ │ │ │ Email │ │

View File

@ -23,7 +23,7 @@ updated_date: "2026-01-04"
## Historia de Usuario ## Historia de Usuario
**Como** visitante de OrbiQuant **Como** visitante de Trading Platform
**Quiero** poder iniciar sesión con mi cuenta de Google **Quiero** poder iniciar sesión con mi cuenta de Google
**Para** acceder rápidamente sin crear nuevas credenciales **Para** acceder rápidamente sin crear nuevas credenciales
@ -46,7 +46,7 @@ updated_date: "2026-01-04"
### AC-003: Autorización exitosa (usuario nuevo) ### AC-003: Autorización exitosa (usuario nuevo)
**Dado** que autorizo el acceso en Google **Dado** que autorizo el acceso en Google
**Y** mi email de Google no está registrado en OrbiQuant **Y** mi email de Google no está registrado en Trading Platform
**Cuando** Google me redirige de vuelta **Cuando** Google me redirige de vuelta
**Entonces** debería: **Entonces** debería:
1. Crear una nueva cuenta automáticamente 1. Crear una nueva cuenta automáticamente
@ -58,7 +58,7 @@ updated_date: "2026-01-04"
### AC-004: Autorización exitosa (usuario existente) ### AC-004: Autorización exitosa (usuario existente)
**Dado** que autorizo el acceso en Google **Dado** que autorizo el acceso en Google
**Y** mi email de Google ya está registrado en OrbiQuant **Y** mi email de Google ya está registrado en Trading Platform
**Cuando** Google me redirige de vuelta **Cuando** Google me redirige de vuelta
**Entonces** debería: **Entonces** debería:
1. Vincular Google a mi cuenta existente 1. Vincular Google a mi cuenta existente
@ -105,7 +105,7 @@ updated_date: "2026-01-04"
│ │ │ │
│ ┌────────────────────────────────────────────────────────────────────┐ │ │ ┌────────────────────────────────────────────────────────────────────┐ │
│ │ │ │ │ │ │ │
│ │ Inicia sesión en OrbiQuant │ │ │ │ Inicia sesión en Trading Platform │ │
│ │ │ │ │ │ │ │
│ │ ┌──────────────────────────────────────────────────────────────┐│ │ │ │ ┌──────────────────────────────────────────────────────────────┐│ │
│ │ │ 🔵 Continuar con Google → ││ │ │ │ │ 🔵 Continuar con Google → ││ │
@ -121,9 +121,9 @@ updated_date: "2026-01-04"
│ │ ┌────────────────────────────────────────────────────────────┐ │ │ │ │ ┌────────────────────────────────────────────────────────────┐ │ │
│ │ │ Google │ │ │ │ │ │ Google │ │ │
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ OrbiQuant IA quiere acceder a tu cuenta de Google │ │ │ │ │ │ Trading Platform quiere acceder a tu cuenta de Google │ │ │
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ Esto permitirá a OrbiQuant IA: │ │ │ │ │ │ Esto permitirá a Trading Platform: │ │ │
│ │ │ • Ver tu dirección de correo electrónico │ │ │ │ │ │ • Ver tu dirección de correo electrónico │ │ │
│ │ │ • Ver tu información personal básica │ │ │ │ │ │ • Ver tu información personal básica │ │ │
│ │ │ │ │ │ │ │ │ │ │ │
@ -190,7 +190,7 @@ updated_date: "2026-01-04"
```env ```env
GOOGLE_CLIENT_ID=xxx.apps.googleusercontent.com GOOGLE_CLIENT_ID=xxx.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=xxx GOOGLE_CLIENT_SECRET=xxx
GOOGLE_CALLBACK_URL=https://api.orbiquant.com/auth/oauth/google/callback GOOGLE_CALLBACK_URL=https://api.trading.com/auth/oauth/google/callback
``` ```
### Scopes Solicitados ### Scopes Solicitados

View File

@ -23,7 +23,7 @@ updated_date: "2026-01-04"
## Historia de Usuario ## Historia de Usuario
**Como** visitante o usuario de OrbiQuant **Como** visitante o usuario de Trading Platform
**Quiero** poder registrarme e iniciar sesión usando mi cuenta de Facebook **Quiero** poder registrarme e iniciar sesión usando mi cuenta de Facebook
**Para** tener un acceso rápido y sencillo sin crear una nueva contraseña **Para** tener un acceso rápido y sencillo sin crear una nueva contraseña
@ -108,7 +108,7 @@ updated_date: "2026-01-04"
``` ```
┌─────────────────────────────────────────────────────────────┐ ┌─────────────────────────────────────────────────────────────┐
│ │ │ │
│ 🌟 Bienvenido a OrbiQuant │ 🌟 Bienvenido a Trading Platform
│ │ │ │
│ ┌─────────────────────────────────────────────────────┐ │ │ ┌─────────────────────────────────────────────────────┐ │
│ │ 📧 Email │ │ │ │ 📧 Email │ │
@ -131,7 +131,7 @@ Ventana de Facebook OAuth:
│ facebook.com ✕ │ │ facebook.com ✕ │
├─────────────────────────────────────────────────────────────┤ ├─────────────────────────────────────────────────────────────┤
│ │ │ │
OrbiQuant desea acceder a: │ Trading Platform desea acceder a: │
│ │ │ │
│ ✓ Tu nombre y foto de perfil │ │ ✓ Tu nombre y foto de perfil │
│ ✓ Tu dirección de email │ │ ✓ Tu dirección de email │
@ -282,7 +282,7 @@ Ventana de Facebook OAuth:
```env ```env
FACEBOOK_APP_ID=your_app_id FACEBOOK_APP_ID=your_app_id
FACEBOOK_APP_SECRET=your_app_secret FACEBOOK_APP_SECRET=your_app_secret
FACEBOOK_CALLBACK_URL=https://orbiquant.com/api/v1/auth/facebook/callback FACEBOOK_CALLBACK_URL=https://trading.com/api/v1/auth/facebook/callback
``` ```
### Security Considerations ### Security Considerations

View File

@ -23,7 +23,7 @@ updated_date: "2026-01-04"
## Historia de Usuario ## Historia de Usuario
**Como** visitante o usuario de OrbiQuant **Como** visitante o usuario de Trading Platform
**Quiero** poder registrarme e iniciar sesión usando mi cuenta de Twitter/X **Quiero** poder registrarme e iniciar sesión usando mi cuenta de Twitter/X
**Para** tener un acceso rápido sin crear una nueva contraseña **Para** tener un acceso rápido sin crear una nueva contraseña
@ -104,7 +104,7 @@ updated_date: "2026-01-04"
``` ```
┌─────────────────────────────────────────────────────────────┐ ┌─────────────────────────────────────────────────────────────┐
│ │ │ │
│ 🌟 Bienvenido a OrbiQuant │ 🌟 Bienvenido a Trading Platform
│ │ │ │
│ ┌─────────────────────────────────────────────────────┐ │ │ ┌─────────────────────────────────────────────────────┐ │
│ │ 📧 Email │ │ │ │ 📧 Email │ │
@ -127,7 +127,7 @@ Ventana de X OAuth:
│ x.com ✕ │ │ x.com ✕ │
├─────────────────────────────────────────────────────────────┤ ├─────────────────────────────────────────────────────────────┤
│ │ │ │
│ Autorizar OrbiQuant │ Autorizar Trading Platform
│ │ │ │
│ Esta aplicación podrá: │ │ Esta aplicación podrá: │
│ │ │ │
@ -297,7 +297,7 @@ Formulario adicional si falta email:
```env ```env
TWITTER_CLIENT_ID=your_client_id TWITTER_CLIENT_ID=your_client_id
TWITTER_CLIENT_SECRET=your_client_secret TWITTER_CLIENT_SECRET=your_client_secret
TWITTER_CALLBACK_URL=https://orbiquant.com/api/v1/auth/twitter/callback TWITTER_CALLBACK_URL=https://trading.com/api/v1/auth/twitter/callback
``` ```
### Consideraciones Especiales de X ### Consideraciones Especiales de X

View File

@ -23,7 +23,7 @@ updated_date: "2026-01-04"
## Historia de Usuario ## Historia de Usuario
**Como** visitante o usuario de OrbiQuant **Como** visitante o usuario de Trading Platform
**Quiero** poder registrarme e iniciar sesión usando Apple Sign In **Quiero** poder registrarme e iniciar sesión usando Apple Sign In
**Para** tener un acceso seguro y privado sin compartir mi email real **Para** tener un acceso seguro y privado sin compartir mi email real
@ -107,7 +107,7 @@ updated_date: "2026-01-04"
``` ```
┌─────────────────────────────────────────────────────────────┐ ┌─────────────────────────────────────────────────────────────┐
│ │ │ │
│ 🌟 Bienvenido a OrbiQuant │ 🌟 Bienvenido a Trading Platform
│ │ │ │
│ ┌─────────────────────────────────────────────────────┐ │ │ ┌─────────────────────────────────────────────────────┐ │
│ │ 📧 Email │ │ │ │ 📧 Email │ │
@ -133,7 +133,7 @@ Ventana de Apple Sign In:
│ │ │ │
│ │ │ │
│ │ │ │
│ "OrbiQuant" desea usar tu Apple ID para iniciar sesión │ │ "Trading Platform" desea usar tu Apple ID para iniciar sesión │
│ │ │ │
│ ┌─────────────────────────────────────────────────────┐ │ │ ┌─────────────────────────────────────────────────────┐ │
│ │ Nombre │ │ │ │ Nombre │ │
@ -149,7 +149,7 @@ Ventana de Apple Sign In:
│ └─────────────────────────────────────────────────────┘ │ │ └─────────────────────────────────────────────────────┘ │
│ │ │ │
│ Tu información será compartida según las políticas de │ │ Tu información será compartida según las políticas de │
│ privacidad de OrbiQuant. │ │ privacidad de Trading Platform. │
│ │ │ │
│ ┌─────────────────────────────────────────────────────┐ │ │ ┌─────────────────────────────────────────────────────┐ │
│ │ Continuar con Touch ID │ │ │ │ Continuar con Touch ID │ │
@ -288,7 +288,7 @@ Ventana de Apple Sign In:
```json ```json
{ {
"iss": "https://appleid.apple.com", "iss": "https://appleid.apple.com",
"aud": "com.orbiquant.service", "aud": "com.trading.service",
"exp": 1234567890, "exp": 1234567890,
"iat": 1234567890, "iat": 1234567890,
"sub": "001234.abc123...", // Apple User ID "sub": "001234.abc123...", // Apple User ID
@ -302,11 +302,11 @@ Ventana de Apple Sign In:
### Environment Variables ### Environment Variables
```env ```env
APPLE_SERVICE_ID=com.orbiquant.service APPLE_SERVICE_ID=com.trading.service
APPLE_TEAM_ID=ABC123XYZ APPLE_TEAM_ID=ABC123XYZ
APPLE_KEY_ID=KEY123 APPLE_KEY_ID=KEY123
APPLE_PRIVATE_KEY_PATH=/path/to/AuthKey_KEY123.p8 APPLE_PRIVATE_KEY_PATH=/path/to/AuthKey_KEY123.p8
APPLE_CALLBACK_URL=https://orbiquant.com/api/v1/auth/apple/callback APPLE_CALLBACK_URL=https://trading.com/api/v1/auth/apple/callback
``` ```
### Consideraciones Especiales de Apple ### Consideraciones Especiales de Apple

View File

@ -23,7 +23,7 @@ updated_date: "2026-01-04"
## Historia de Usuario ## Historia de Usuario
**Como** desarrollador o usuario técnico de OrbiQuant **Como** desarrollador o usuario técnico de Trading Platform
**Quiero** poder registrarme e iniciar sesión usando mi cuenta de GitHub **Quiero** poder registrarme e iniciar sesión usando mi cuenta de GitHub
**Para** tener un acceso rápido usando mis credenciales de desarrollador **Para** tener un acceso rápido usando mis credenciales de desarrollador
@ -102,7 +102,7 @@ updated_date: "2026-01-04"
``` ```
┌─────────────────────────────────────────────────────────────┐ ┌─────────────────────────────────────────────────────────────┐
│ │ │ │
│ 🌟 Bienvenido a OrbiQuant │ 🌟 Bienvenido a Trading Platform
│ │ │ │
│ ┌─────────────────────────────────────────────────────┐ │ │ ┌─────────────────────────────────────────────────────┐ │
│ │ 📧 Email │ │ │ │ 📧 Email │ │
@ -125,9 +125,9 @@ Ventana de GitHub OAuth:
│ github.com ✕ │ │ github.com ✕ │
├─────────────────────────────────────────────────────────────┤ ├─────────────────────────────────────────────────────────────┤
│ │ │ │
│ Authorize OrbiQuant │ Authorize Trading Platform
│ │ │ │
OrbiQuant by OrbiQuant Team │ Trading Platform by Trading Platform Team │
│ wants to access your juanperez account │ │ wants to access your juanperez account │
│ │ │ │
│ This application will be able to: │ │ This application will be able to: │
@ -137,10 +137,10 @@ Ventana de GitHub OAuth:
│ ✓ Read your profile information │ │ ✓ Read your profile information │
│ │ │ │
│ Authorizing will redirect to: │ │ Authorizing will redirect to: │
│ https://orbiquant.com/api/v1/auth/github/callback │ │ https://trading.com/api/v1/auth/github/callback │
│ │ │ │
│ ┌─────────────────────────────────────────────────────┐ │ │ ┌─────────────────────────────────────────────────────┐ │
│ │ Authorize OrbiQuant │ │ │ │ Authorize Trading Platform │ │
│ └─────────────────────────────────────────────────────┘ │ │ └─────────────────────────────────────────────────────┘ │
│ │ │ │
│ Cancel │ │ Cancel │
@ -286,7 +286,7 @@ Ventana de GitHub OAuth:
```env ```env
GITHUB_CLIENT_ID=your_client_id GITHUB_CLIENT_ID=your_client_id
GITHUB_CLIENT_SECRET=your_client_secret GITHUB_CLIENT_SECRET=your_client_secret
GITHUB_CALLBACK_URL=https://orbiquant.com/api/v1/auth/github/callback GITHUB_CALLBACK_URL=https://trading.com/api/v1/auth/github/callback
``` ```
### Consideraciones Especiales de GitHub ### Consideraciones Especiales de GitHub

View File

@ -23,7 +23,7 @@ updated_date: "2026-01-04"
## Historia de Usuario ## Historia de Usuario
**Como** usuario de OrbiQuant **Como** usuario de Trading Platform
**Quiero** poder registrarme e iniciar sesión usando mi número de teléfono y un código SMS **Quiero** poder registrarme e iniciar sesión usando mi número de teléfono y un código SMS
**Para** tener un acceso rápido sin necesidad de recordar contraseñas **Para** tener un acceso rápido sin necesidad de recordar contraseñas
@ -64,7 +64,7 @@ updated_date: "2026-01-04"
**Cuando** recibo el SMS **Cuando** recibo el SMS
**Entonces** debería tener el formato: **Entonces** debería tener el formato:
``` ```
Tu código de OrbiQuant es: 123456 Tu código de Trading Platform es: 123456
Válido por 10 minutos. Válido por 10 minutos.
No compartas este código. No compartas este código.
@ -384,7 +384,7 @@ const client = twilio(accountSid, authToken);
// Enviar SMS // Enviar SMS
await client.messages.create({ await client.messages.create({
body: `Tu código de OrbiQuant es: ${code}\n\nVálido por 10 minutos.`, body: `Tu código de Trading Platform es: ${code}\n\nVálido por 10 minutos.`,
from: twilioPhoneNumber, from: twilioPhoneNumber,
to: userPhoneNumber to: userPhoneNumber
}); });

View File

@ -23,7 +23,7 @@ updated_date: "2026-01-04"
## Historia de Usuario ## Historia de Usuario
**Como** usuario de OrbiQuant **Como** usuario de Trading Platform
**Quiero** poder registrarme e iniciar sesión recibiendo el código por WhatsApp **Quiero** poder registrarme e iniciar sesión recibiendo el código por WhatsApp
**Para** usar una aplicación que ya tengo instalada y me resulta más familiar que SMS **Para** usar una aplicación que ya tengo instalada y me resulta más familiar que SMS
@ -57,14 +57,14 @@ updated_date: "2026-01-04"
``` ```
¡Hola! 👋 ¡Hola! 👋
Tu código de verificación de OrbiQuant es: Tu código de verificación de Trading Platform es:
*123456* *123456*
Válido por 10 minutos. Válido por 10 minutos.
No compartas este código con nadie. No compartas este código con nadie.
OrbiQuant - Inversiones Inteligentes Trading Platform - Inversiones Inteligentes
``` ```
### AC-004: Código recibido ### AC-004: Código recibido
@ -137,19 +137,19 @@ Mensaje de WhatsApp:
│ WhatsApp 🔍 ⋮ │ │ WhatsApp 🔍 ⋮ │
├─────────────────────────────────────────────────────────────┤ ├─────────────────────────────────────────────────────────────┤
│ │ │ │
│ ◀ OrbiQuant ✓✓ │ │ ◀ Trading Platform ✓✓ │
│ │ │ │
│ ┌──────────────────────────────────────────────────────┐ │ │ ┌──────────────────────────────────────────────────────┐ │
│ │ ¡Hola! 👋 │ │ │ │ ¡Hola! 👋 │ │
│ │ │ │ │ │ │ │
│ │ Tu código de verificación de OrbiQuant es: │ │ │ │ Tu código de verificación de Trading Platform es: │ │
│ │ │ │ │ │ │ │
│ │ *123456* │ │ │ │ *123456* │ │
│ │ │ │ │ │ │ │
│ │ Válido por 10 minutos. │ │ │ │ Válido por 10 minutos. │ │
│ │ No compartas este código con nadie. │ │ │ │ No compartas este código con nadie. │ │
│ │ │ │ │ │ │ │
│ │ OrbiQuant - Inversiones Inteligentes │ │ │ │ Trading Platform - Inversiones Inteligentes │ │
│ └──────────────────────────────────────────────────────┘ │ │ └──────────────────────────────────────────────────────┘ │
│ 15:42 │ │ 15:42 │
│ │ │ │
@ -297,7 +297,7 @@ const hasWhatsApp = lookup.lineTypeIntelligence?.type === 'whatsapp';
// Enviar mensaje por WhatsApp // Enviar mensaje por WhatsApp
await client.messages.create({ await client.messages.create({
body: `¡Hola! 👋\n\nTu código de verificación de OrbiQuant es:\n\n*${code}*\n\nVálido por 10 minutos.\nNo compartas este código con nadie.\n\nOrbiQuant - Inversiones Inteligentes`, body: `¡Hola! 👋\n\nTu código de verificación de Trading Platform es:\n\n*${code}*\n\nVálido por 10 minutos.\nNo compartas este código con nadie.\n\nTrading Platform - Inversiones Inteligentes`,
from: 'whatsapp:+14155238886', // Twilio WhatsApp number from: 'whatsapp:+14155238886', // Twilio WhatsApp number
to: `whatsapp:${phoneNumber}` to: `whatsapp:${phoneNumber}`
}); });
@ -340,14 +340,14 @@ Language: es
Body: Body:
¡Hola! 👋 ¡Hola! 👋
Tu código de verificación de OrbiQuant es: Tu código de verificación de Trading Platform es:
*{{1}}* *{{1}}*
Válido por 10 minutos. Válido por 10 minutos.
No compartas este código con nadie. No compartas este código con nadie.
OrbiQuant - Inversiones Inteligentes Trading Platform - Inversiones Inteligentes
``` ```
### Fallback Strategy ### Fallback Strategy

View File

@ -23,7 +23,7 @@ updated_date: "2026-01-04"
## Historia de Usuario ## Historia de Usuario
**Como** usuario de OrbiQuant **Como** usuario de Trading Platform
**Quiero** poder activar autenticación de dos factores **Quiero** poder activar autenticación de dos factores
**Para** proteger mi cuenta con una capa adicional de seguridad **Para** proteger mi cuenta con una capa adicional de seguridad
@ -270,8 +270,8 @@ import speakeasy from 'speakeasy';
// Generar secreto // Generar secreto
const secret = speakeasy.generateSecret({ const secret = speakeasy.generateSecret({
length: 20, length: 20,
name: `OrbiQuant:${user.email}`, name: `Trading Platform:${user.email}`,
issuer: 'OrbiQuant IA', issuer: 'Trading Platform',
}); });
// Verificar código // Verificar código

View File

@ -23,7 +23,7 @@ updated_date: "2026-01-04"
## Historia de Usuario ## Historia de Usuario
**Como** usuario de OrbiQuant que olvidó su contraseña **Como** usuario de Trading Platform que olvidó su contraseña
**Quiero** poder recuperar el acceso a mi cuenta **Quiero** poder recuperar el acceso a mi cuenta
**Para** poder volver a iniciar sesión sin necesidad de crear una nueva cuenta **Para** poder volver a iniciar sesión sin necesidad de crear una nueva cuenta
@ -76,7 +76,7 @@ updated_date: "2026-01-04"
**Dado** que solicité recuperación de contraseña **Dado** que solicité recuperación de contraseña
**Cuando** reviso mi email **Cuando** reviso mi email
**Entonces** debería recibir un email con: **Entonces** debería recibir un email con:
- Asunto: "Recupera tu contraseña de OrbiQuant" - Asunto: "Recupera tu contraseña de Trading Platform"
- Saludo personalizado con mi nombre - Saludo personalizado con mi nombre
- Explicación clara del proceso - Explicación clara del proceso
- Botón/link de "Restablecer contraseña" - Botón/link de "Restablecer contraseña"
@ -207,9 +207,9 @@ Paso 2: Confirmación
Email de recuperación: Email de recuperación:
┌─────────────────────────────────────────────────────────────┐ ┌─────────────────────────────────────────────────────────────┐
│ │ │ │
│ De: OrbiQuant <noreply@orbiquant.com> │ De: Trading Platform <noreply@trading.com>
│ Para: usuario@example.com │ │ Para: usuario@example.com │
│ Asunto: Recupera tu contraseña de OrbiQuant │ Asunto: Recupera tu contraseña de Trading Platform
│ │ │ │
│ ───────────────────────────────────────────────────── │ │ ───────────────────────────────────────────────────── │
│ │ │ │
@ -224,7 +224,7 @@ Email de recuperación:
│ └─────────────────────────────────────────────────────┘ │ │ └─────────────────────────────────────────────────────┘ │
│ │ │ │
│ O copia este link en tu navegador: │ │ O copia este link en tu navegador: │
│ https://orbiquant.com/reset-password?token=abc123... │ │ https://trading.com/reset-password?token=abc123... │
│ │ │ │
│ Este link expirará en 1 hora. │ │ Este link expirará en 1 hora. │
│ │ │ │
@ -232,7 +232,7 @@ Email de recuperación:
│ email. Tu contraseña no cambiará. │ │ email. Tu contraseña no cambiará. │
│ │ │ │
│ Saludos, │ │ Saludos, │
│ El equipo de OrbiQuant │ El equipo de Trading Platform
│ │ │ │
└─────────────────────────────────────────────────────────────┘ └─────────────────────────────────────────────────────────────┘
@ -470,7 +470,7 @@ const hashedToken = crypto
PASSWORD_RESET_TOKEN_EXPIRY=3600 # 1 hora en segundos PASSWORD_RESET_TOKEN_EXPIRY=3600 # 1 hora en segundos
PASSWORD_RESET_RATE_LIMIT=3 # intentos por ventana PASSWORD_RESET_RATE_LIMIT=3 # intentos por ventana
PASSWORD_RESET_RATE_WINDOW=3600 # 1 hora PASSWORD_RESET_RATE_WINDOW=3600 # 1 hora
FRONTEND_URL=https://orbiquant.com FRONTEND_URL=https://trading.com
``` ```
### Security Best Practices ### Security Best Practices

View File

@ -23,7 +23,7 @@ updated_date: "2026-01-04"
## Historia de Usuario ## Historia de Usuario
**Como** usuario de OrbiQuant **Como** usuario de Trading Platform
**Quiero** poder ver y gestionar mis sesiones activas en diferentes dispositivos **Quiero** poder ver y gestionar mis sesiones activas en diferentes dispositivos
**Para** tener control sobre dónde está abierta mi cuenta y poder cerrar sesiones remotamente por seguridad **Para** tener control sobre dónde está abierta mi cuenta y poder cerrar sesiones remotamente por seguridad
@ -242,7 +242,7 @@ Modal de confirmación:
Email de nueva sesión: Email de nueva sesión:
┌─────────────────────────────────────────────────────────────┐ ┌─────────────────────────────────────────────────────────────┐
│ De: OrbiQuant Security <security@orbiquant.com> │ De: Trading Platform Security <security@trading.com>
│ Asunto: Nueva sesión iniciada en tu cuenta │ │ Asunto: Nueva sesión iniciada en tu cuenta │
│ │ │ │
│ Hola Juan, │ │ Hola Juan, │

View File

@ -259,7 +259,7 @@ TWITTER_CLIENT_ID=xxx
TWITTER_CLIENT_SECRET=xxx TWITTER_CLIENT_SECRET=xxx
# Apple OAuth # Apple OAuth
APPLE_CLIENT_ID=com.orbiquant.auth APPLE_CLIENT_ID=com.trading.auth
APPLE_TEAM_ID=xxx APPLE_TEAM_ID=xxx
APPLE_KEY_ID=xxx APPLE_KEY_ID=xxx
APPLE_PRIVATE_KEY=xxx APPLE_PRIVATE_KEY=xxx
@ -269,8 +269,8 @@ GITHUB_CLIENT_ID=xxx
GITHUB_CLIENT_SECRET=xxx GITHUB_CLIENT_SECRET=xxx
# Callback URLs # Callback URLs
OAUTH_CALLBACK_URL=https://api.orbiquant.com/auth/oauth/callback OAUTH_CALLBACK_URL=https://api.trading.com/auth/oauth/callback
FRONTEND_URL=https://app.orbiquant.com FRONTEND_URL=https://app.trading.com
``` ```
--- ---

View File

@ -239,11 +239,11 @@ Usuario Frontend Backend
### Verificación de Email ### Verificación de Email
```html ```html
Asunto: Verifica tu cuenta de OrbiQuant Asunto: Verifica tu cuenta de Trading Platform
Hola {{firstName}}, Hola {{firstName}},
Gracias por registrarte en OrbiQuant IA. Gracias por registrarte en Trading Platform.
Para completar tu registro, verifica tu email haciendo click aquí: Para completar tu registro, verifica tu email haciendo click aquí:
{{verificationUrl}} {{verificationUrl}}
@ -253,13 +253,13 @@ Este link expira en 24 horas.
Si no creaste esta cuenta, ignora este email. Si no creaste esta cuenta, ignora este email.
Saludos, Saludos,
Equipo OrbiQuant Equipo Trading Platform
``` ```
### Recuperación de Contraseña ### Recuperación de Contraseña
```html ```html
Asunto: Recupera tu contraseña de OrbiQuant Asunto: Recupera tu contraseña de Trading Platform
Hola {{firstName}}, Hola {{firstName}},
@ -274,7 +274,7 @@ Si no solicitaste este cambio, ignora este email.
Tu contraseña actual seguirá funcionando. Tu contraseña actual seguirá funcionando.
Saludos, Saludos,
Equipo OrbiQuant Equipo Trading Platform
``` ```
--- ---

View File

@ -190,13 +190,13 @@ await redis.setEx(key, 300, JSON.stringify(otpData));
### SMS ### SMS
``` ```
OrbiQuant: Tu código de verificación es 123456. Expira en 5 minutos. Trading Platform: Tu código de verificación es 123456. Expira en 5 minutos.
``` ```
### WhatsApp ### WhatsApp
``` ```
🔐 *OrbiQuant IA* 🔐 *Trading Platform*
Tu código de verificación es: *123456* Tu código de verificación es: *123456*
@ -253,7 +253,7 @@ TWILIO_WHATSAPP_NUMBER=+14155238886
```typescript ```typescript
await twilioClient.messages.create({ await twilioClient.messages.create({
body: `OrbiQuant: Tu código es ${otp}. Expira en 5 min.`, body: `Trading Platform: Tu código es ${otp}. Expira en 5 min.`,
from: process.env.TWILIO_PHONE_NUMBER, from: process.env.TWILIO_PHONE_NUMBER,
to: phone, to: phone,
}); });
@ -263,7 +263,7 @@ await twilioClient.messages.create({
```typescript ```typescript
await twilioClient.messages.create({ await twilioClient.messages.create({
body: `🔐 *OrbiQuant IA*\n\nTu código es: *${otp}*\n\nExpira en 5 minutos.`, body: `🔐 *Trading Platform*\n\nTu código es: *${otp}*\n\nExpira en 5 minutos.`,
from: `whatsapp:${process.env.TWILIO_WHATSAPP_NUMBER}`, from: `whatsapp:${process.env.TWILIO_WHATSAPP_NUMBER}`,
to: `whatsapp:${phone}`, to: `whatsapp:${phone}`,
}); });

View File

@ -91,8 +91,8 @@ import speakeasy from 'speakeasy';
const secret = speakeasy.generateSecret({ const secret = speakeasy.generateSecret({
length: 20, length: 20,
name: 'OrbiQuant IA', name: 'Trading Platform',
issuer: 'OrbiQuant', issuer: 'Trading Platform',
}); });
// secret.base32 → almacenar encriptado // secret.base32 → almacenar encriptado
@ -314,7 +314,7 @@ await db.query(`
### 2FA Activado ### 2FA Activado
``` ```
Asunto: 2FA activado en tu cuenta OrbiQuant Asunto: 2FA activado en tu cuenta Trading Platform
Hola {{firstName}}, Hola {{firstName}},
@ -327,7 +327,7 @@ IP: {{ip}}
Si no realizaste esta acción, contacta soporte inmediatamente. Si no realizaste esta acción, contacta soporte inmediatamente.
Saludos, Saludos,
Equipo OrbiQuant Equipo Trading Platform
``` ```
### Backup Code Usado ### Backup Code Usado
@ -347,7 +347,7 @@ Códigos restantes: {{remainingCodes}}
Si no fuiste tú, cambia tu contraseña y contacta soporte. Si no fuiste tú, cambia tu contraseña y contacta soporte.
Saludos, Saludos,
Equipo OrbiQuant Equipo Trading Platform
``` ```
--- ---

View File

@ -317,7 +317,7 @@ Response 200:
### Email de Nuevo Dispositivo ### Email de Nuevo Dispositivo
``` ```
Asunto: Nuevo inicio de sesión en tu cuenta OrbiQuant Asunto: Nuevo inicio de sesión en tu cuenta Trading Platform
Hola {{firstName}}, Hola {{firstName}},
@ -338,7 +338,7 @@ Si NO fuiste tú:
[Asegurar mi cuenta] [Asegurar mi cuenta]
Saludos, Saludos,
Equipo OrbiQuant Equipo Trading Platform
``` ```
--- ---

View File

@ -16,7 +16,7 @@ updated_date: "2026-01-04"
## Propósito ## Propósito
Esta épica implementa la plataforma educativa de OrbiQuant IA, permitiendo a los usuarios aprender trading a través de cursos estructurados con video, texto, quizzes y sistema de progreso con gamificación. Esta épica implementa la plataforma educativa de Trading Platform, permitiendo a los usuarios aprender trading a través de cursos estructurados con video, texto, quizzes y sistema de progreso con gamificación.
--- ---

View File

@ -21,7 +21,7 @@ updated_date: "2026-01-04"
## Descripción ## Descripción
Define el modelo de datos completo para el módulo educativo de OrbiQuant IA, implementado en PostgreSQL 15+ bajo el schema `education`. Incluye todas las entidades necesarias para gestionar cursos, lecciones, progreso de estudiantes, evaluaciones, certificaciones y gamificación. Define el modelo de datos completo para el módulo educativo de Trading Platform, implementado en PostgreSQL 15+ bajo el schema `education`. Incluye todas las entidades necesarias para gestionar cursos, lecciones, progreso de estudiantes, evaluaciones, certificaciones y gamificación.
--- ---
@ -827,7 +827,7 @@ Interfaces TypeScript generadas automáticamente desde el schema usando Prisma o
```bash ```bash
# PostgreSQL # PostgreSQL
DATABASE_URL=postgresql://user:password@localhost:5432/orbiquant DATABASE_URL=postgresql://user:password@localhost:5432/trading
DATABASE_SCHEMA=education DATABASE_SCHEMA=education
DATABASE_POOL_MIN=2 DATABASE_POOL_MIN=2
DATABASE_POOL_MAX=10 DATABASE_POOL_MAX=10

View File

@ -21,7 +21,7 @@ updated_date: "2026-01-04"
## Descripción ## Descripción
Define todos los endpoints REST del módulo educativo de OrbiQuant IA, implementados en Express.js con TypeScript. Incluye autenticación JWT, validación de datos, paginación, filtros y manejo de errores. Define todos los endpoints REST del módulo educativo de Trading Platform, implementados en Express.js con TypeScript. Incluye autenticación JWT, validación de datos, paginación, filtros y manejo de errores.
--- ---
@ -73,7 +73,7 @@ Define todos los endpoints REST del módulo educativo de OrbiQuant IA, implement
### Base URL ### Base URL
``` ```
Production: https://api.orbiquant.ai/v1/education Production: https://api.trading.ai/v1/education
Development: http://localhost:3000/v1/education Development: http://localhost:3000/v1/education
``` ```
@ -1551,7 +1551,7 @@ PORT=3000
NODE_ENV=production NODE_ENV=production
# Database # Database
DATABASE_URL=postgresql://user:password@localhost:5432/orbiquant DATABASE_URL=postgresql://user:password@localhost:5432/trading
DATABASE_SCHEMA=education DATABASE_SCHEMA=education
# JWT # JWT
@ -1564,13 +1564,13 @@ RATE_LIMIT_MAX_REQUESTS=100
RATE_LIMIT_AUTHENTICATED_MAX=1000 RATE_LIMIT_AUTHENTICATED_MAX=1000
# CORS # CORS
CORS_ORIGIN=https://orbiquant.ai,https://app.orbiquant.ai CORS_ORIGIN=https://trading.ai,https://app.trading.ai
CORS_CREDENTIALS=true CORS_CREDENTIALS=true
# External Services # External Services
VIMEO_API_KEY=xxx VIMEO_API_KEY=xxx
AWS_S3_BUCKET=orbiquant-videos AWS_S3_BUCKET=trading-videos
AWS_CLOUDFRONT_URL=https://cdn.orbiquant.ai AWS_CLOUDFRONT_URL=https://cdn.trading.ai
# Email (para certificados) # Email (para certificados)
SMTP_HOST=smtp.sendgrid.net SMTP_HOST=smtp.sendgrid.net

View File

@ -1256,11 +1256,11 @@ Ver archivo: `/src/types/index.ts`
```bash ```bash
# API # API
VITE_API_URL=https://api.orbiquant.ai/v1 VITE_API_URL=https://api.trading.ai/v1
VITE_API_TIMEOUT=30000 VITE_API_TIMEOUT=30000
# CDN # CDN
VITE_CDN_URL=https://cdn.orbiquant.ai VITE_CDN_URL=https://cdn.trading.ai
VITE_VIMEO_PLAYER_ID=xxxxx VITE_VIMEO_PLAYER_ID=xxxxx
# Features # Features

View File

@ -321,7 +321,7 @@ export const VimeoPlayer: React.FC<VimeoPlayerProps> = ({
```yaml ```yaml
Bucket Configuration: Bucket Configuration:
Name: orbiquant-videos-prod Name: trading-videos-prod
Region: us-east-1 Region: us-east-1
Versioning: Enabled Versioning: Enabled
Encryption: AES-256 (SSE-S3) Encryption: AES-256 (SSE-S3)
@ -358,18 +358,18 @@ Folder Structure:
export const cloudFrontConfig = { export const cloudFrontConfig = {
distribution: { distribution: {
enabled: true, enabled: true,
comment: 'OrbiQuant Video CDN', comment: 'Trading Platform Video CDN',
origins: [ origins: [
{ {
id: 'S3-orbiquant-videos', id: 'S3-trading-videos',
domainName: 'orbiquant-videos-prod.s3.amazonaws.com', domainName: 'trading-videos-prod.s3.amazonaws.com',
s3OriginConfig: { s3OriginConfig: {
originAccessIdentity: 'origin-access-identity/cloudfront/XXXXX' originAccessIdentity: 'origin-access-identity/cloudfront/XXXXX'
} }
} }
], ],
defaultCacheBehavior: { defaultCacheBehavior: {
targetOriginId: 'S3-orbiquant-videos', targetOriginId: 'S3-trading-videos',
viewerProtocolPolicy: 'redirect-to-https', viewerProtocolPolicy: 'redirect-to-https',
allowedMethods: ['GET', 'HEAD', 'OPTIONS'], allowedMethods: ['GET', 'HEAD', 'OPTIONS'],
cachedMethods: ['GET', 'HEAD'], cachedMethods: ['GET', 'HEAD'],
@ -967,7 +967,7 @@ VIMEO_ACCESS_TOKEN=xxxxx
AWS_ACCESS_KEY_ID=xxxxx AWS_ACCESS_KEY_ID=xxxxx
AWS_SECRET_ACCESS_KEY=xxxxx AWS_SECRET_ACCESS_KEY=xxxxx
AWS_REGION=us-east-1 AWS_REGION=us-east-1
AWS_S3_BUCKET=orbiquant-videos-prod AWS_S3_BUCKET=trading-videos-prod
# CloudFront # CloudFront
CLOUDFRONT_DOMAIN=d1234abcd.cloudfront.net CLOUDFRONT_DOMAIN=d1234abcd.cloudfront.net
@ -1017,8 +1017,8 @@ VIDEO_DEFAULT_QUALITY=720p
```typescript ```typescript
// Para Vimeo // Para Vimeo
const allowedDomains = [ const allowedDomains = [
'orbiquant.ai', 'trading.ai',
'app.orbiquant.ai', 'app.trading.ai',
'localhost:3000' // Solo dev 'localhost:3000' // Solo dev
]; ];
``` ```
@ -1060,7 +1060,7 @@ ffmpeg(inputPath)
import loadtest from 'loadtest'; import loadtest from 'loadtest';
const options = { const options = {
url: 'https://api.orbiquant.ai/v1/education/lessons/xxx/video-url', url: 'https://api.trading.ai/v1/education/lessons/xxx/video-url',
maxRequests: 1000, maxRequests: 1000,
concurrency: 100, concurrency: 100,
headers: { headers: {

View File

@ -9,7 +9,7 @@ updated_date: "2026-01-04"
# Especificaciones Técnicas - OQI-002 Módulo Educativo # Especificaciones Técnicas - OQI-002 Módulo Educativo
Este directorio contiene las especificaciones técnicas detalladas para el módulo educativo de OrbiQuant IA. Este directorio contiene las especificaciones técnicas detalladas para el módulo educativo de Trading Platform.
## Índice de Especificaciones ## Índice de Especificaciones

View File

@ -41,7 +41,7 @@ El usuario debe poder acceder a una página que muestre todos los cursos educati
``` ```
┌─────────────────────────────────────────────────────────────────┐ ┌─────────────────────────────────────────────────────────────────┐
│ [LOGO] OrbiQuant IA Educación Trading Cuentas 👤 │ │ [LOGO] Trading Platform Educación Trading Cuentas 👤 │
├─────────────────────────────────────────────────────────────────┤ ├─────────────────────────────────────────────────────────────────┤
│ │ │ │
│ CATÁLOGO DE CURSOS [🔍 Buscar cursos...] │ │ CATÁLOGO DE CURSOS [🔍 Buscar cursos...] │
@ -240,7 +240,7 @@ Y los filtros activos se mantienen
title: "Fibonacci Retracement Básico", title: "Fibonacci Retracement Básico",
slug: "fibonacci-retracement-basico", slug: "fibonacci-retracement-basico",
shortDescription: "Aprende a usar Fibonacci...", shortDescription: "Aprende a usar Fibonacci...",
thumbnail: "https://cdn.orbiquant.com/courses/fib.jpg", thumbnail: "https://cdn.trading.com/courses/fib.jpg",
category: { category: {
id: "cat-1", id: "cat-1",
name: "Análisis Técnico", name: "Análisis Técnico",

View File

@ -41,7 +41,7 @@ El usuario debe poder acceder a un dashboard educativo centralizado que muestre
``` ```
┌─────────────────────────────────────────────────────────────────┐ ┌─────────────────────────────────────────────────────────────────┐
│ [LOGO] OrbiQuant IA Educación Trading Cuentas 👤 │ │ [LOGO] Trading Platform Educación Trading Cuentas 👤 │
├─────────────────────────────────────────────────────────────────┤ ├─────────────────────────────────────────────────────────────────┤
│ │ │ │
│ MI APRENDIZAJE │ │ MI APRENDIZAJE │

View File

@ -35,7 +35,7 @@ updated_date: "2026-01-04"
## Descripción Detallada ## Descripción Detallada
El usuario debe recibir automáticamente un certificado digital en formato PDF al completar el 100% de un curso. El certificado debe tener diseño profesional con logo de OrbiQuant, nombre del usuario, título del curso, fecha de finalización, ID único de verificación, y QR code. El usuario debe poder descargar el PDF, compartir en LinkedIn, y el certificado debe ser verificable públicamente. El usuario debe recibir automáticamente un certificado digital en formato PDF al completar el 100% de un curso. El certificado debe tener diseño profesional con logo de Trading Platform, nombre del usuario, título del curso, fecha de finalización, ID único de verificación, y QR code. El usuario debe poder descargar el PDF, compartir en LinkedIn, y el certificado debe ser verificable públicamente.
## Mockups/Wireframes ## Mockups/Wireframes
@ -103,7 +103,7 @@ El usuario debe recibir automáticamente un certificado digital en formato PDF a
[PÁGINA DE VERIFICACIÓN PÚBLICA] [PÁGINA DE VERIFICACIÓN PÚBLICA]
┌─────────────────────────────────────────────────────────────────┐ ┌─────────────────────────────────────────────────────────────────┐
│ [LOGO] OrbiQuant IA │ [LOGO] Trading Platform
│ │ │ │
│ VERIFICACIÓN DE CERTIFICADO │ │ VERIFICACIÓN DE CERTIFICADO │
│ │ │ │
@ -120,14 +120,14 @@ El usuario debe recibir automáticamente un certificado digital en formato PDF a
│ │ Módulos: 5 | Lecciones: 23 │ │ │ │ Módulos: 5 | Lecciones: 23 │ │
│ │ │ │ │ │ │ │
│ │ Instructor: Carlos Mendoza │ │ │ │ Instructor: Carlos Mendoza │ │
│ │ Institución: OrbiQuant IA │ │ │ │ Institución: Trading Platform │ │
│ │ │ │ │ │ │ │
│ │ Estado: ✅ Activo │ │ │ │ Estado: ✅ Activo │ │
│ │ Emitido: 05/12/2025 15:45:00 UTC │ │ │ │ Emitido: 05/12/2025 15:45:00 UTC │ │
│ └────────────────────────────────────────────────────────────┘ │ │ └────────────────────────────────────────────────────────────┘ │
│ │ │ │
│ Este certificado puede ser verificado en cualquier momento en: │ │ Este certificado puede ser verificado en cualquier momento en: │
orbiquant.com/verify/OQI-EDU-A3F8D291 │ trading.com/verify/OQI-EDU-A3F8D291 │
│ │ │ │
└─────────────────────────────────────────────────────────────────┘ └─────────────────────────────────────────────────────────────────┘
``` ```
@ -165,7 +165,7 @@ DADO que el usuario tiene un certificado
CUANDO hace click en "Descargar PDF" CUANDO hace click en "Descargar PDF"
ENTONCES se descarga archivo PDF ENTONCES se descarga archivo PDF
Y el PDF contiene: Y el PDF contiene:
- Logo de OrbiQuant IA - Logo de Trading Platform
- Título "Certificado de Finalización" - Título "Certificado de Finalización"
- Nombre completo del usuario - Nombre completo del usuario
- Título del curso - Título del curso
@ -183,10 +183,10 @@ CUANDO hace click en "Compartir en LinkedIn"
ENTONCES se abre nueva pestaña de LinkedIn ENTONCES se abre nueva pestaña de LinkedIn
Y el formulario de certificación está pre-llenado con: Y el formulario de certificación está pre-llenado con:
- Nombre: "Fibonacci Retracement Básico" - Nombre: "Fibonacci Retracement Básico"
- Organización: "OrbiQuant IA" - Organización: "Trading Platform"
- Fecha de emisión: "Diciembre 2025" - Fecha de emisión: "Diciembre 2025"
- ID de certificado: "OQI-EDU-A3F8D291" - ID de certificado: "OQI-EDU-A3F8D291"
- URL de verificación: "orbiquant.com/verify/..." - URL de verificación: "trading.com/verify/..."
``` ```
**Escenario 5: Ver galería de certificados** **Escenario 5: Ver galería de certificados**
@ -203,7 +203,7 @@ Y se pueden ordenar por: más reciente, alfabético
**Escenario 6: Verificar certificado públicamente** **Escenario 6: Verificar certificado públicamente**
```gherkin ```gherkin
DADO que alguien tiene el ID de un certificado DADO que alguien tiene el ID de un certificado
CUANDO accede a orbiquant.com/verify/OQI-EDU-A3F8D291 CUANDO accede a trading.com/verify/OQI-EDU-A3F8D291
ENTONCES se muestra página de verificación pública ENTONCES se muestra página de verificación pública
Y NO requiere login Y NO requiere login
Y se muestra: Y se muestra:
@ -399,7 +399,7 @@ async function onCourseCompleted(userId, courseId) {
**LinkedIn pre-fill URL:** **LinkedIn pre-fill URL:**
```javascript ```javascript
const linkedInUrl = `https://www.linkedin.com/profile/add?startTask=CERTIFICATION_NAME&name=${encodeURIComponent(courseTitle)}&organizationName=OrbiQuant%20IA&issueYear=${year}&issueMonth=${month}&certUrl=${encodeURIComponent(verifyUrl)}&certId=${certificateNumber}`; const linkedInUrl = `https://www.linkedin.com/profile/add?startTask=CERTIFICATION_NAME&name=${encodeURIComponent(courseTitle)}&organizationName=Trading Platform%20IA&issueYear=${year}&issueMonth=${month}&certUrl=${encodeURIComponent(verifyUrl)}&certId=${certificateNumber}`;
``` ```
**Seguridad:** **Seguridad:**

View File

@ -497,7 +497,7 @@ recent_changes:
description: "Seeds de cursos ICT/IPDA con 1 curso, 7 módulos, 28 lecciones, 5 quizzes" description: "Seeds de cursos ICT/IPDA con 1 curso, 7 módulos, 28 lecciones, 5 quizzes"
issues_found: issues_found:
- "DDL loader no carga 00-extensions.sql ni 01-enums.sql correctamente" - "DDL loader no carga 00-extensions.sql ni 01-enums.sql correctamente"
- "Script usa DB_NAME=orbiquant pero Docker usa orbiquant_trading/orbiquant_platform" - "Script usa DB_NAME=trading pero Docker usa trading_trading/trading_platform"
- date: "2026-01-04" - date: "2026-01-04"
developer: "Claude Code" developer: "Claude Code"
@ -510,8 +510,8 @@ recent_changes:
fixes: fixes:
- "Agregada carga de 00-extensions.sql antes de enums" - "Agregada carga de 00-extensions.sql antes de enums"
- "Búsqueda de enums en 00-enums.sql y 01-enums.sql" - "Búsqueda de enums en 00-enums.sql y 01-enums.sql"
- "Defaults unificados: DB_NAME=orbiquantia_platform, DB_PORT=5433" - "Defaults unificados: DB_NAME=trading_platform, DB_PORT=5433"
- "Credenciales: orbiquantia/orbiquantia_dev_2025" - "Credenciales: trading/trading_dev_2025"
- type: database_ddl - type: database_ddl
files: files:
- apps/database/ddl/schemas/auth/tables/01-users.sql - apps/database/ddl/schemas/auth/tables/01-users.sql

View File

@ -43,7 +43,7 @@ El sistema debe:
### RF-EDU-005.2: Contenido del Certificado ### RF-EDU-005.2: Contenido del Certificado
Cada certificado debe incluir: Cada certificado debe incluir:
- Logo de OrbiQuant IA - Logo de Trading Platform
- Título: "Certificado de Finalización" - Título: "Certificado de Finalización"
- Nombre completo del usuario - Nombre completo del usuario
- Título del curso completado - Título del curso completado
@ -52,7 +52,7 @@ Cada certificado debe incluir:
- Firma digital del instructor (imagen) - Firma digital del instructor (imagen)
- Firma digital de la plataforma - Firma digital de la plataforma
- QR code para verificación online - QR code para verificación online
- Footer: "Verifica este certificado en orbiquant.com/verify/{certificateId}" - Footer: "Verifica este certificado en trading.com/verify/{certificateId}"
Template: Template:
``` ```
@ -77,7 +77,7 @@ Template:
│ [Firma Instructor] [Firma Plataforma] │ │ [Firma Instructor] [Firma Plataforma] │
│ │ │ │
│ [QR CODE] │ │ [QR CODE] │
│ Verifica en orbiquant.com/verify/XXXX │ │ Verifica en trading.com/verify/XXXX │
│ │ │ │
└─────────────────────────────────────────────────────────┘ └─────────────────────────────────────────────────────────┘
``` ```
@ -117,14 +117,14 @@ El sistema debe permitir:
Integración LinkedIn: Integración LinkedIn:
```javascript ```javascript
// Pre-llenar certificación en LinkedIn // Pre-llenar certificación en LinkedIn
const linkedInUrl = `https://www.linkedin.com/profile/add?startTask=CERTIFICATION_NAME&name=${encodeURIComponent(courseTitle)}&organizationName=OrbiQuant IA&issueYear=${year}&issueMonth=${month}&certUrl=${verifyUrl}&certId=${certificateId}`; const linkedInUrl = `https://www.linkedin.com/profile/add?startTask=CERTIFICATION_NAME&name=${encodeURIComponent(courseTitle)}&organizationName=Trading Platform&issueYear=${year}&issueMonth=${month}&certUrl=${verifyUrl}&certId=${certificateId}`;
``` ```
### RF-EDU-005.6: Perfil Público de Certificados ### RF-EDU-005.6: Perfil Público de Certificados
El sistema debe: El sistema debe:
- Permitir al usuario crear perfil público opcional - Permitir al usuario crear perfil público opcional
- URL: orbiquant.com/u/:username/certificates - URL: trading.com/u/:username/certificates
- Mostrar solo certificados que el usuario hizo públicos - Mostrar solo certificados que el usuario hizo públicos
- Galería visual de certificados - Galería visual de certificados
- Bio del usuario - Bio del usuario
@ -234,14 +234,14 @@ Escenario: Usuario comparte en LinkedIn
ENTONCES se abre LinkedIn en nueva pestaña ENTONCES se abre LinkedIn en nueva pestaña
Y el formulario está pre-llenado con: Y el formulario está pre-llenado con:
- Nombre del curso - Nombre del curso
- Organización: OrbiQuant IA - Organización: Trading Platform
- Fecha de emisión - Fecha de emisión
- URL de verificación - URL de verificación
- ID del certificado - ID del certificado
Escenario: Tercero verifica certificado Escenario: Tercero verifica certificado
DADO que alguien tiene el ID de un certificado DADO que alguien tiene el ID de un certificado
CUANDO accede a orbiquant.com/verify/OQI-EDU-12345678 CUANDO accede a trading.com/verify/OQI-EDU-12345678
ENTONCES se muestra página de verificación ENTONCES se muestra página de verificación
Y se muestra: nombre del usuario, curso, fecha Y se muestra: nombre del usuario, curso, fecha
Y se muestra badge "✓ Certificado Válido" Y se muestra badge "✓ Certificado Válido"

View File

@ -205,7 +205,7 @@ Ejemplos:
El sistema debe permitir canjear XP o logros por: El sistema debe permitir canjear XP o logros por:
- Descuentos en suscripción premium (1000 XP = 5% descuento) - Descuentos en suscripción premium (1000 XP = 5% descuento)
- Acceso early a nuevos cursos (500 XP) - Acceso early a nuevos cursos (500 XP)
- Merch de OrbiQuant (camisetas, stickers) (5000 XP) - Merch de Trading Platform (camisetas, stickers) (5000 XP)
- Consulta 1-on-1 con instructor (10,000 XP) - Consulta 1-on-1 con instructor (10,000 XP)
- Features premium temporales (2,000 XP = 1 mes) - Features premium temporales (2,000 XP = 1 mes)
@ -349,7 +349,7 @@ Escenario: Usuario ve leaderboard
Escenario: Usuario canjea recompensa Escenario: Usuario canjea recompensa
DADO que el usuario tiene 5000 XP disponibles DADO que el usuario tiene 5000 XP disponibles
CUANDO canjea "Merch OrbiQuant" (5000 XP) CUANDO canjea "Merch Trading Platform" (5000 XP)
ENTONCES se deduce 5000 XP de balance ENTONCES se deduce 5000 XP de balance
Y se registra el canje Y se registra el canje
Y se envía email de confirmación Y se envía email de confirmación

View File

@ -72,7 +72,7 @@ Esta especificación detalla todos los endpoints REST API del módulo de trading
## Base URL ## Base URL
``` ```
Production: https://api.orbiquant.com/api/v1/trading Production: https://api.trading.com/api/v1/trading
Development: http://localhost:3001/api/v1/trading Development: http://localhost:3001/api/v1/trading
``` ```

View File

@ -9,7 +9,7 @@ updated_date: "2026-01-04"
# Especificaciones Técnicas - OQI-003 Trading y Charts # Especificaciones Técnicas - OQI-003 Trading y Charts
Este directorio contiene las especificaciones técnicas detalladas para el módulo de Trading y Charts de OrbiQuant IA. Este directorio contiene las especificaciones técnicas detalladas para el módulo de Trading y Charts de Trading Platform.
## Índice de Especificaciones ## Índice de Especificaciones
@ -212,7 +212,7 @@ BINANCE_API_KEY=your_api_key
BINANCE_API_SECRET=your_api_secret BINANCE_API_SECRET=your_api_secret
# Database # Database
DATABASE_URL=postgresql://user:password@localhost:5432/orbiquant DATABASE_URL=postgresql://user:password@localhost:5432/trading
DB_SCHEMA=trading DB_SCHEMA=trading
# Redis # Redis
@ -231,7 +231,7 @@ WS_URL=ws://localhost:3001
```bash ```bash
# Crear schema de base de datos # Crear schema de base de datos
psql -d orbiquant -f migrations/001_create_trading_schema.sql psql -d trading -f migrations/001_create_trading_schema.sql
# Ejecutar tests # Ejecutar tests
npm run test:backend npm run test:backend

View File

@ -111,7 +111,7 @@ ENTONCES se muestra un tooltip con:
- [ ] El chart debe ser responsive y funcionar en mobile - [ ] El chart debe ser responsive y funcionar en mobile
- [ ] Colores de velas: Verde para alcista, Rojo para bajista - [ ] Colores de velas: Verde para alcista, Rojo para bajista
- [ ] Crosshair debe seguir el cursor - [ ] Crosshair debe seguir el cursor
- [ ] Logo watermark de OrbiQuant en esquina - [ ] Logo watermark de Trading Platform en esquina
--- ---

View File

@ -776,7 +776,7 @@ END $$;
```bash ```bash
# Database # Database
DATABASE_URL=postgresql://user:password@localhost:5432/orbiquant DATABASE_URL=postgresql://user:password@localhost:5432/trading
DATABASE_POOL_MIN=2 DATABASE_POOL_MIN=2
DATABASE_POOL_MAX=10 DATABASE_POOL_MAX=10

View File

@ -1241,7 +1241,7 @@ describe('Investment Accounts API', () => {
```yaml ```yaml
openapi: 3.0.0 openapi: 3.0.0
info: info:
title: OrbiQuant IA - Investment API title: Trading Platform - Investment API
version: 1.0.0 version: 1.0.0
description: API para gestión de cuentas de inversión description: API para gestión de cuentas de inversión

View File

@ -754,7 +754,7 @@ REACT_APP_STRIPE_PUBLISHABLE_KEY=pk_test_51abc...
### 6.2 Configuración de Webhook en Stripe Dashboard ### 6.2 Configuración de Webhook en Stripe Dashboard
1. Ir a Stripe Dashboard > Developers > Webhooks 1. Ir a Stripe Dashboard > Developers > Webhooks
2. Crear endpoint: `https://api.orbiquant.com/webhooks/stripe` 2. Crear endpoint: `https://api.trading.com/webhooks/stripe`
3. Seleccionar eventos: 3. Seleccionar eventos:
- `payment_intent.succeeded` - `payment_intent.succeeded`
- `payment_intent.payment_failed` - `payment_intent.payment_failed`

View File

@ -36,7 +36,7 @@ updated_date: "2026-01-04"
## Descripción Detallada ## Descripción Detallada
El usuario debe poder generar y descargar un reporte PDF profesional que incluya: resumen de la cuenta, rendimiento histórico, gráficos, lista de transacciones, métricas clave, y disclaimers legales. El PDF debe ser bien formateado, con branding de OrbiQuant IA, y optimizado para impresión. El usuario debe poder generar y descargar un reporte PDF profesional que incluya: resumen de la cuenta, rendimiento histórico, gráficos, lista de transacciones, métricas clave, y disclaimers legales. El PDF debe ser bien formateado, con branding de Trading Platform, y optimizado para impresión.
## Mockups/Wireframes ## Mockups/Wireframes
@ -119,7 +119,7 @@ El usuario debe poder generar y descargar un reporte PDF profesional que incluya
│ [Más secciones...] │ │ [Más secciones...] │
│ │ │ │
│ ──────────────────────────────────────────────────────────── │ │ ──────────────────────────────────────────────────────────── │
│ Página 1 de 5 orbiquant.ai │ │ Página 1 de 5 trading.ai │
└─────────────────────────────────────────────────────────────────┘ └─────────────────────────────────────────────────────────────────┘
``` ```
@ -187,7 +187,7 @@ Y se sugiere generar reporte personalizado desde fecha de apertura
- [ ] PDF optimizado para impresión (tamaño A4) - [ ] PDF optimizado para impresión (tamaño A4)
- [ ] Incluir tabla de contenidos en reportes largos - [ ] Incluir tabla de contenidos en reportes largos
- [ ] Marca de agua "Generado por OrbiQuant IA" - [ ] Marca de agua "Generado por Trading Platform"
- [ ] Footer con disclaimers legales - [ ] Footer con disclaimers legales
- [ ] Compresión de imágenes para tamaño óptimo - [ ] Compresión de imágenes para tamaño óptimo
- [ ] Límite de 10 MB por archivo - [ ] Límite de 10 MB por archivo
@ -297,7 +297,7 @@ Y se sugiere generar reporte personalizado desde fecha de apertura
**Estructura del PDF:** **Estructura del PDF:**
1. **Portada** 1. **Portada**
- Logo OrbiQuant IA - Logo Trading Platform
- Título "Reporte de Inversión" - Título "Reporte de Inversión"
- Nombre de cuenta y titular - Nombre de cuenta y titular
- Período del reporte - Período del reporte

View File

@ -636,7 +636,7 @@ GROUP BY user_id;
```bash ```bash
# Database # Database
DATABASE_URL=postgresql://user:password@localhost:5432/orbiquant DATABASE_URL=postgresql://user:password@localhost:5432/trading
# Financial Schema # Financial Schema
FINANCIAL_DEFAULT_CURRENCY=usd FINANCIAL_DEFAULT_CURRENCY=usd

View File

@ -64,7 +64,7 @@ Implementación de medidas de seguridad para cumplimiento PCI DSS:
**SAQ-A (Self-Assessment Questionnaire A)** **SAQ-A (Self-Assessment Questionnaire A)**
OrbiQuant califica para SAQ-A porque: Trading Platform califica para SAQ-A porque:
- No almacena, procesa ni transmite datos de tarjetas - No almacena, procesa ni transmite datos de tarjetas
- Usa Stripe.js y Elements (redirección completa a Stripe) - Usa Stripe.js y Elements (redirección completa a Stripe)
- Solo maneja tokens de Stripe, no datos de tarjetas - Solo maneja tokens de Stripe, no datos de tarjetas

View File

@ -24,7 +24,7 @@ updated_date: "2026-01-04"
## Historia de Usuario ## Historia de Usuario
**Como** visitante o usuario registrado de OrbiQuant **Como** visitante o usuario registrado de Trading Platform
**Quiero** ver los diferentes planes de suscripción disponibles con sus características y precios **Quiero** ver los diferentes planes de suscripción disponibles con sus características y precios
**Para** decidir cuál plan se adapta mejor a mis necesidades de trading **Para** decidir cuál plan se adapta mejor a mis necesidades de trading
@ -251,7 +251,7 @@ Próximamente ofreceremos planes anuales con 20% de descuento.
### SEO ### SEO
- Meta title: "Planes y Precios - OrbiQuant IA" - Meta title: "Planes y Precios - Trading Platform"
- Meta description: "Elige el plan perfecto para tu trading. Desde gratis hasta $99/mes con análisis personalizados." - Meta description: "Elige el plan perfecto para tu trading. Desde gratis hasta $99/mes con análisis personalizados."
- Schema markup: `offers` para planes - Schema markup: `offers` para planes

View File

@ -24,7 +24,7 @@ updated_date: "2026-01-04"
## Historia de Usuario ## Historia de Usuario
**Como** usuario registrado de OrbiQuant **Como** usuario registrado de Trading Platform
**Quiero** suscribirme a un plan de pago (Basic, Pro o Premium) **Quiero** suscribirme a un plan de pago (Basic, Pro o Premium)
**Para** acceder a funcionalidades premium y mejorar mi experiencia de trading **Para** acceder a funcionalidades premium y mejorar mi experiencia de trading
@ -225,7 +225,7 @@ Feature: Suscripción a Plan Pro
And después de 2-5 segundos debería ver página de confirmación And después de 2-5 segundos debería ver página de confirmación
And debería ver mensaje "¡Trial iniciado! No se te cobrará hasta el 12/12/2025" And debería ver mensaje "¡Trial iniciado! No se te cobrará hasta el 12/12/2025"
And debería recibir email con asunto "Bienvenido a OrbiQuant Pro" And debería recibir email con asunto "Bienvenido a Trading Platform Pro"
And mi perfil debería mostrar badge "Pro" And mi perfil debería mostrar badge "Pro"
And debería tener acceso a predicciones avanzadas And debería tener acceso a predicciones avanzadas
And debería tener acceso a todos los cursos And debería tener acceso a todos los cursos
@ -303,12 +303,12 @@ Feature: Suscripción a Plan Pro
### Email Templates ### Email Templates
**Subject:** Bienvenido a OrbiQuant Pro **Subject:** Bienvenido a Trading Platform Pro
``` ```
Hola Juan, Hola Juan,
¡Bienvenido a OrbiQuant Pro! 🎉 ¡Bienvenido a Trading Platform Pro! 🎉
Tu trial de 7 días ha comenzado. Tienes acceso completo a: Tu trial de 7 días ha comenzado. Tienes acceso completo a:
✅ Predicciones avanzadas con IA ✅ Predicciones avanzadas con IA
@ -321,10 +321,10 @@ Tu primer cobro será el 12/12/2025 por $49 USD.
Puedes cancelar en cualquier momento desde: Puedes cancelar en cualquier momento desde:
[Gestionar Suscripción] [Gestionar Suscripción]
¿Preguntas? Escríbenos a support@orbiquant.com ¿Preguntas? Escríbenos a support@trading.com
Saludos, Saludos,
El equipo de OrbiQuant El equipo de Trading Platform
``` ```
--- ---

View File

@ -24,7 +24,7 @@ updated_date: "2026-01-04"
## Historia de Usuario ## Historia de Usuario
**Como** usuario de OrbiQuant (con o sin suscripción) **Como** usuario de Trading Platform (con o sin suscripción)
**Quiero** comprar acceso a un curso específico con pago único **Quiero** comprar acceso a un curso específico con pago único
**Para** aprender sobre trading sin compromiso de suscripción mensual **Para** aprender sobre trading sin compromiso de suscripción mensual
@ -353,10 +353,10 @@ Detalles de la compra:
- Fecha: 05/12/2025 - Fecha: 05/12/2025
- Factura: INV-2025-000042 - Factura: INV-2025-000042
¿Necesitas ayuda? Escríbenos a support@orbiquant.com ¿Necesitas ayuda? Escríbenos a support@trading.com
¡Feliz aprendizaje! ¡Feliz aprendizaje!
El equipo de OrbiQuant El equipo de Trading Platform
``` ```
--- ---

View File

@ -24,7 +24,7 @@ updated_date: "2026-01-04"
## Historia de Usuario ## Historia de Usuario
**Como** usuario registrado de OrbiQuant **Como** usuario registrado de Trading Platform
**Quiero** agregar y gestionar mis métodos de pago **Quiero** agregar y gestionar mis métodos de pago
**Para** realizar compras y renovar suscripciones sin fricciones **Para** realizar compras y renovar suscripciones sin fricciones

View File

@ -24,7 +24,7 @@ updated_date: "2026-01-04"
## Historia de Usuario ## Historia de Usuario
**Como** usuario de OrbiQuant que ha realizado pagos **Como** usuario de Trading Platform que ha realizado pagos
**Quiero** ver y descargar mis facturas **Quiero** ver y descargar mis facturas
**Para** tener comprobantes de mis transacciones y poder deducir impuestos **Para** tener comprobantes de mis transacciones y poder deducir impuestos
@ -64,9 +64,9 @@ updated_date: "2026-01-04"
**Cuando** hago click en "Descargar PDF" **Cuando** hago click en "Descargar PDF"
**Entonces** debería: **Entonces** debería:
- Descargar archivo PDF inmediatamente - Descargar archivo PDF inmediatamente
- Nombre del archivo: `OrbiQuant_Factura_INV-2025-000042.pdf` - Nombre del archivo: `Trading Platform_Factura_INV-2025-000042.pdf`
- PDF contiene: - PDF contiene:
- Logo de OrbiQuant - Logo de Trading Platform
- Datos fiscales de empresa - Datos fiscales de empresa
- Mis datos (nombre, email, país) - Mis datos (nombre, email, país)
- Número de factura y fecha - Número de factura y fecha
@ -94,7 +94,7 @@ updated_date: "2026-01-04"
**Entonces** debería: **Entonces** debería:
- Ver confirmación: "Factura enviada a juan@example.com" - Ver confirmación: "Factura enviada a juan@example.com"
- Recibir email con: - Recibir email con:
- Asunto: "Tu factura de OrbiQuant - #INV-2025-000042" - Asunto: "Tu factura de Trading Platform - #INV-2025-000042"
- PDF adjunto - PDF adjunto
- Link de descarga (válido 24h) - Link de descarga (válido 24h)
@ -259,9 +259,9 @@ Feature: Ver y Descargar Facturas
Scenario: Descargar factura PDF Scenario: Descargar factura PDF
Given que estoy viendo mi lista de facturas Given que estoy viendo mi lista de facturas
When hago click en "Descargar PDF" en factura "INV-2025-000042" When hago click en "Descargar PDF" en factura "INV-2025-000042"
Then debería descargar archivo "OrbiQuant_Factura_INV-2025-000042.pdf" Then debería descargar archivo "Trading Platform_Factura_INV-2025-000042.pdf"
And el PDF debería contener mis datos fiscales And el PDF debería contener mis datos fiscales
And el PDF debería tener logo de OrbiQuant And el PDF debería tener logo de Trading Platform
And el PDF debería mostrar total de $56.84 (incluido IVA) And el PDF debería mostrar total de $56.84 (incluido IVA)
Scenario: Ver detalles de factura Scenario: Ver detalles de factura
@ -351,12 +351,12 @@ Feature: Ver y Descargar Facturas
### PDF Storage ### PDF Storage
- S3 Bucket: `orbiquant-invoices` - S3 Bucket: `trading-invoices`
- Path: `invoices/{year}/{month}/{invoiceId}.pdf` - Path: `invoices/{year}/{month}/{invoiceId}.pdf`
- Generar URL firmada con expiración: - Generar URL firmada con expiración:
```typescript ```typescript
const url = s3.getSignedUrl('getObject', { const url = s3.getSignedUrl('getObject', {
Bucket: 'orbiquant-invoices', Bucket: 'trading-invoices',
Key: `invoices/2025/12/${invoiceId}.pdf`, Key: `invoices/2025/12/${invoiceId}.pdf`,
Expires: 86400, // 24 horas Expires: 86400, // 24 horas
}); });
@ -364,12 +364,12 @@ const url = s3.getSignedUrl('getObject', {
### Email Template ### Email Template
**Subject:** Tu factura de OrbiQuant - #INV-2025-000042 **Subject:** Tu factura de Trading Platform - #INV-2025-000042
``` ```
Hola Juan, Hola Juan,
Adjuntamos tu factura de OrbiQuant. Adjuntamos tu factura de Trading Platform.
Número de factura: INV-2025-000042 Número de factura: INV-2025-000042
Fecha: 05/12/2025 Fecha: 05/12/2025
@ -378,10 +378,10 @@ Total: $56.84 USD
También puedes descargarla desde: También puedes descargarla desde:
[Descargar Factura] (válido por 24 horas) [Descargar Factura] (válido por 24 horas)
¿Necesitas ayuda? Escríbenos a billing@orbiquant.com ¿Necesitas ayuda? Escríbenos a billing@trading.com
Saludos, Saludos,
El equipo de OrbiQuant El equipo de Trading Platform
``` ```
--- ---

View File

@ -24,7 +24,7 @@ updated_date: "2026-01-04"
## Historia de Usuario ## Historia de Usuario
**Como** usuario de OrbiQuant con actividad de pagos **Como** usuario de Trading Platform con actividad de pagos
**Quiero** ver un historial completo de mis transacciones **Quiero** ver un historial completo de mis transacciones
**Para** rastrear mis gastos, recargas de wallet y compras realizadas **Para** rastrear mis gastos, recargas de wallet y compras realizadas
@ -323,7 +323,7 @@ Feature: Ver Historial de Pagos
When hago click en "Exportar" When hago click en "Exportar"
And selecciono "CSV" And selecciono "CSV"
And selecciono "Últimos 3 meses" And selecciono "Últimos 3 meses"
Then debería descargar archivo "OrbiQuant_Historial_2025.csv" Then debería descargar archivo "Trading Platform_Historial_2025.csv"
And archivo debería contener todas las transacciones del período And archivo debería contener todas las transacciones del período
Scenario: Usuario sin transacciones Scenario: Usuario sin transacciones

View File

@ -178,8 +178,8 @@ POST /api/v1/payments/create-checkout-session
{ {
"priceId": "price_1Sb3k64dPtEGmLmpm5n5bbJH", "priceId": "price_1Sb3k64dPtEGmLmpm5n5bbJH",
"mode": "subscription", "mode": "subscription",
"successUrl": "https://app.orbiquant.com/checkout/success?session_id={CHECKOUT_SESSION_ID}", "successUrl": "https://app.trading.com/checkout/success?session_id={CHECKOUT_SESSION_ID}",
"cancelUrl": "https://app.orbiquant.com/pricing" "cancelUrl": "https://app.trading.com/pricing"
} }
``` ```
@ -432,17 +432,17 @@ VITE_STRIPE_PUBLISHABLE_KEY=pk_test_51Sb3k64dPtEGmLmp...
# Backend (.env) # Backend (.env)
STRIPE_SECRET_KEY=sk_test_51Sb3k64dPtEGmLmp... STRIPE_SECRET_KEY=sk_test_51Sb3k64dPtEGmLmp...
STRIPE_WEBHOOK_SECRET=whsec_... STRIPE_WEBHOOK_SECRET=whsec_...
FRONTEND_URL=https://app.orbiquant.com FRONTEND_URL=https://app.trading.com
``` ```
### Stripe Checkout URLs ### Stripe Checkout URLs
```typescript ```typescript
// success_url // success_url
https://app.orbiquant.com/checkout/success?session_id={CHECKOUT_SESSION_ID} https://app.trading.com/checkout/success?session_id={CHECKOUT_SESSION_ID}
// cancel_url // cancel_url
https://app.orbiquant.com/pricing https://app.trading.com/pricing
``` ```
--- ---

View File

@ -68,10 +68,10 @@ El sistema debe generar, almacenar y entregar facturas electrónicas automática
**DEBE incluir:** **DEBE incluir:**
**Información del Emisor:** **Información del Emisor:**
- Razón Social: "OrbiQuant IA Inc." - Razón Social: "Trading Platform Inc."
- RFC/Tax ID: XX-XXXXXXX-XX - RFC/Tax ID: XX-XXXXXXX-XX
- Dirección fiscal completa - Dirección fiscal completa
- Email de contacto: billing@orbiquant.com - Email de contacto: billing@trading.com
**Información del Cliente:** **Información del Cliente:**
- Nombre completo - Nombre completo
@ -129,7 +129,7 @@ async function generateInvoiceNumber(type: InvoiceType): Promise<string> {
**DEBE:** **DEBE:**
1. Usar librería de generación de PDF (puppeteer, pdfkit, react-pdf) 1. Usar librería de generación de PDF (puppeteer, pdfkit, react-pdf)
2. Aplicar diseño responsive (A4) 2. Aplicar diseño responsive (A4)
3. Incluir logo de OrbiQuant 3. Incluir logo de Trading Platform
4. Soportar múltiples idiomas (ES, EN) 4. Soportar múltiples idiomas (ES, EN)
5. Tamaño máximo: 1 MB 5. Tamaño máximo: 1 MB
@ -137,9 +137,9 @@ async function generateInvoiceNumber(type: InvoiceType): Promise<string> {
``` ```
┌─────────────────────────────────────────────────────────┐ ┌─────────────────────────────────────────────────────────┐
│ │ │ │
│ [Logo OrbiQuant] FACTURA / INVOICE │ │ [Logo Trading Platform] FACTURA / INVOICE │
│ │ │ │
OrbiQuant IA Inc. #INV-2025-000042 │ Trading Platform Inc. #INV-2025-000042 │
│ 1234 Tech Street Fecha: 05/12/2025 │ │ 1234 Tech Street Fecha: 05/12/2025 │
│ San Francisco, CA 94105 │ │ San Francisco, CA 94105 │
│ RFC: XX-XXXXXXX-XX │ │ RFC: XX-XXXXXXX-XX │
@ -170,7 +170,7 @@ async function generateInvoiceNumber(type: InvoiceType): Promise<string> {
│ │ │ │
│ Powered by Stripe | ID: pi_3Abc123... │ │ Powered by Stripe | ID: pi_3Abc123... │
│ │ │ │
│ Dudas: support@orbiquant.com │ │ Dudas: support@trading.com │
│ │ │ │
└─────────────────────────────────────────────────────────┘ └─────────────────────────────────────────────────────────┘
``` ```
@ -222,7 +222,7 @@ class Invoice {
**Template de Email:** **Template de Email:**
``` ```
Asunto: Tu factura de OrbiQuant - #INV-2025-000042 Asunto: Tu factura de Trading Platform - #INV-2025-000042
Hola Juan, Hola Juan,
@ -236,10 +236,10 @@ Detalles de la compra:
- Período: 01/01/2025 - 31/01/2025 - Período: 01/01/2025 - 31/01/2025
- Total: $49.00 USD - Total: $49.00 USD
¿Preguntas? Escríbenos a support@orbiquant.com ¿Preguntas? Escríbenos a support@trading.com
Saludos, Saludos,
El equipo de OrbiQuant El equipo de Trading Platform
``` ```
### RF-PAY-004.7: Actualización de Datos Fiscales ### RF-PAY-004.7: Actualización de Datos Fiscales
@ -387,19 +387,19 @@ El equipo de OrbiQuant
```env ```env
# Storage # Storage
AWS_S3_BUCKET=orbiquant-invoices AWS_S3_BUCKET=trading-invoices
AWS_S3_REGION=us-east-1 AWS_S3_REGION=us-east-1
INVOICE_PDF_RETENTION_YEARS=7 INVOICE_PDF_RETENTION_YEARS=7
# Facturación # Facturación
COMPANY_LEGAL_NAME="OrbiQuant IA Inc." COMPANY_LEGAL_NAME="Trading Platform Inc."
COMPANY_TAX_ID=XX-XXXXXXX-XX COMPANY_TAX_ID=XX-XXXXXXX-XX
COMPANY_ADDRESS="1234 Tech Street, San Francisco, CA 94105" COMPANY_ADDRESS="1234 Tech Street, San Francisco, CA 94105"
COMPANY_EMAIL=billing@orbiquant.com COMPANY_EMAIL=billing@trading.com
# Email # Email
INVOICE_FROM_EMAIL=billing@orbiquant.com INVOICE_FROM_EMAIL=billing@trading.com
INVOICE_REPLY_TO=support@orbiquant.com INVOICE_REPLY_TO=support@trading.com
``` ```
--- ---

View File

@ -351,7 +351,7 @@ Stripe reintenta webhooks automáticamente:
1. Ir a **Developers → Webhooks** 1. Ir a **Developers → Webhooks**
2. Click "Add endpoint" 2. Click "Add endpoint"
3. URL: `https://api.orbiquant.com/payments/webhook` 3. URL: `https://api.trading.com/payments/webhook`
4. Seleccionar eventos: 4. Seleccionar eventos:
**Eventos esenciales (P0):** **Eventos esenciales (P0):**

View File

@ -350,7 +350,7 @@ class Refund {
### RN-003: Fees de Stripe ### RN-003: Fees de Stripe
- Stripe **NO devuelve** el fee de procesamiento (~2.9% + $0.30) - Stripe **NO devuelve** el fee de procesamiento (~2.9% + $0.30)
- OrbiQuant absorbe este costo - Trading Platform absorbe este costo
- Calcular pérdida real: `loss = refundAmount * 0.029 + 0.30` - Calcular pérdida real: `loss = refundAmount * 0.029 + 0.30`
### RN-004: Reembolso de Suscripciones ### RN-004: Reembolso de Suscripciones
@ -398,7 +398,7 @@ class Refund {
- Reembolsos manuales: 1-3 días hábiles de revisión - Reembolsos manuales: 1-3 días hábiles de revisión
## Contacto ## Contacto
Si tienes dudas, contacta a support@orbiquant.com Si tienes dudas, contacta a support@trading.com
``` ```
--- ---

View File

@ -329,7 +329,7 @@ BINANCE_API_KEY=xxx # Opcional para rate limits
```bash ```bash
cd apps/ml-services cd apps/ml-services
conda activate orbiquantia-ml conda activate trading-ml
uvicorn src.api.server:app --host 0.0.0.0 --port 8000 --reload uvicorn src.api.server:app --host 0.0.0.0 --port 8000 --reload
``` ```

View File

@ -17,7 +17,7 @@ updated_date: "2026-01-04"
## Descripcion General ## Descripcion General
Este directorio contiene la documentacion formal de epicas e historias de usuario para el modulo de Senales ML de OrbiQuant IA, con enfoque en la estrategia AMD (Accumulation-Manipulation-Distribution) y modelos ML avanzados. Este directorio contiene la documentacion formal de epicas e historias de usuario para el modulo de Senales ML de Trading Platform, con enfoque en la estrategia AMD (Accumulation-Manipulation-Distribution) y modelos ML avanzados.
--- ---

View File

@ -185,7 +185,7 @@ async def lifespan(app: FastAPI):
await market_fetcher.stop() await market_fetcher.stop()
app = FastAPI( app = FastAPI(
title="OrbiQuant ML Engine", title="Trading Platform ML Engine",
version="1.0.0", version="1.0.0",
lifespan=lifespan lifespan=lifespan
) )

View File

@ -35,7 +35,7 @@ Especificar los endpoints de la API REST del ML Engine, incluyendo schemas de re
## Base URL ## Base URL
``` ```
Production: https://ml.orbiquant.com/api/v1 Production: https://ml.trading.com/api/v1
Development: http://localhost:8000/api/v1 Development: http://localhost:8000/api/v1
``` ```
@ -102,7 +102,7 @@ Genera predicción de rango de precio.
**Example:** **Example:**
```bash ```bash
curl -X POST https://ml.orbiquant.com/api/v1/predictions \ curl -X POST https://ml.trading.com/api/v1/predictions \
-H "X-API-Key: your-key" \ -H "X-API-Key: your-key" \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d '{"symbol": "BTCUSDT", "horizon": 18}' -d '{"symbol": "BTCUSDT", "horizon": 18}'
@ -208,7 +208,7 @@ Genera señal de trading.
**Example:** **Example:**
```bash ```bash
curl -X POST https://ml.orbiquant.com/api/v1/signals \ curl -X POST https://ml.trading.com/api/v1/signals \
-H "X-API-Key: your-key" \ -H "X-API-Key: your-key" \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d '{"symbol": "BTCUSDT", "horizon": 18, "include_range": true, "include_tpsl": true}' -d '{"symbol": "BTCUSDT", "horizon": 18, "include_range": true, "include_tpsl": true}'

View File

@ -11,7 +11,7 @@ updated_date: "2026-01-04"
**Version:** 1.0.0 **Version:** 1.0.0
**Fecha:** 2025-12-08 **Fecha:** 2025-12-08
**Proyecto:** OrbiQuant IA Trading Platform **Proyecto:** Trading Platform
**Autor:** Requirements Analyst / Trading Strategist **Autor:** Requirements Analyst / Trading Strategist
--- ---
@ -479,4 +479,4 @@ Segun la politica de puertos del workspace, trading-platform usa el rango **3600
--- ---
**Documento Generado:** 2025-12-08 **Documento Generado:** 2025-12-08
**Requirements Analyst / Trading Strategist - OrbiQuant IA** **Requirements Analyst / Trading Strategist - Trading Platform**

View File

@ -12,7 +12,7 @@ updated_date: "2026-01-04"
**Version:** 2.0.0 **Version:** 2.0.0
**Fecha:** 2025-12-08 **Fecha:** 2025-12-08
**Modulo:** OQI-006-ml-signals **Modulo:** OQI-006-ml-signals
**Autor:** Trading Strategist - OrbiQuant IA **Autor:** Trading Strategist - Trading Platform
--- ---
@ -952,7 +952,7 @@ def execute_trade(
### System Prompt para LLM ### System Prompt para LLM
``` ```
You are OrbiQuant AI Trading Copilot, a specialized assistant for trading operations. You are Trading Platform AI Trading Copilot, a specialized assistant for trading operations.
You have access to the following tools: You have access to the following tools:
1. get_ml_signal(symbol, timeframe) - Get ML-generated trading signals 1. get_ml_signal(symbol, timeframe) - Get ML-generated trading signals
@ -979,4 +979,4 @@ Current market context:
--- ---
**Documento Generado:** 2025-12-08 **Documento Generado:** 2025-12-08
**Trading Strategist - OrbiQuant IA** **Trading Strategist - Trading Platform**

View File

@ -12,7 +12,7 @@ updated_date: "2026-01-04"
**Versi\u00f3n:** 1.0.0 **Versi\u00f3n:** 1.0.0
**Fecha:** 2025-12-05 **Fecha:** 2025-12-05
**M\u00f3dulo:** OQI-006-ml-signals **M\u00f3dulo:** OQI-006-ml-signals
**Autor:** Trading Strategist - OrbiQuant IA **Autor:** Trading Strategist - Trading Platform
--- ---
@ -1423,4 +1423,4 @@ elif current_phase['phase'] == 'manipulation':
**Documento Generado:** 2025-12-05 **Documento Generado:** 2025-12-05
**Pr\u00f3xima Revisi\u00f3n:** 2025-Q1 **Pr\u00f3xima Revisi\u00f3n:** 2025-Q1
**Contacto:** trading-strategist@orbiquant.ai **Contacto:** trading-strategist@trading.ai

View File

@ -12,7 +12,7 @@ updated_date: "2026-01-04"
**Versi\u00f3n:** 1.0.0 **Versi\u00f3n:** 1.0.0
**Fecha:** 2025-12-05 **Fecha:** 2025-12-05
**M\u00f3dulo:** OQI-006-ml-signals **M\u00f3dulo:** OQI-006-ml-signals
**Autor:** Trading Strategist - OrbiQuant IA **Autor:** Trading Strategist - Trading Platform
--- ---
@ -1274,4 +1274,4 @@ def label_with_confluence(df, i, forward_window=18):
**Documento Generado:** 2025-12-05 **Documento Generado:** 2025-12-05
**Pr\u00f3xima Revisi\u00f3n:** 2025-Q1 **Pr\u00f3xima Revisi\u00f3n:** 2025-Q1
**Contacto:** trading-strategist@orbiquant.ai **Contacto:** trading-strategist@trading.ai

View File

@ -1,18 +1,18 @@
--- ---
id: "FEATURES-TARGETS-COMPLETO" id: "FEATURES-TARGETS-COMPLETO"
title: "Features y Targets Completos - Modelos ML OrbiQuant IA" title: "Features y Targets Completos - Modelos ML Trading Platform"
type: "Documentation" type: "Documentation"
project: "trading-platform" project: "trading-platform"
version: "1.0.0" version: "1.0.0"
updated_date: "2026-01-04" updated_date: "2026-01-04"
--- ---
# Features y Targets Completos - Modelos ML OrbiQuant IA # Features y Targets Completos - Modelos ML Trading Platform
**Version:** 2.0.0 **Version:** 2.0.0
**Fecha:** 2025-12-08 **Fecha:** 2025-12-08
**Modulo:** OQI-006-ml-signals **Modulo:** OQI-006-ml-signals
**Autor:** Trading Strategist - OrbiQuant IA **Autor:** Trading Strategist - Trading Platform
--- ---
@ -990,4 +990,4 @@ def temporal_validation(model, X, y, n_splits=5):
--- ---
**Documento Generado:** 2025-12-08 **Documento Generado:** 2025-12-08
**Trading Strategist - OrbiQuant IA** **Trading Strategist - Trading Platform**

View File

@ -12,7 +12,7 @@ updated_date: "2026-01-04"
**Versi\u00f3n:** 1.0.0 **Versi\u00f3n:** 1.0.0
**Fecha:** 2025-12-05 **Fecha:** 2025-12-05
**M\u00f3dulo:** OQI-006-ml-signals **M\u00f3dulo:** OQI-006-ml-signals
**Autor:** Trading Strategist - OrbiQuant IA **Autor:** Trading Strategist - Trading Platform
--- ---
@ -33,7 +33,7 @@ updated_date: "2026-01-04"
## Introducci\u00f3n ## Introducci\u00f3n
Este documento define el cat\u00e1logo completo de features (variables de entrada) y targets (variables objetivo) utilizados en los modelos ML de OrbiQuant IA. Este documento define el cat\u00e1logo completo de features (variables de entrada) y targets (variables objetivo) utilizados en los modelos ML de Trading Platform.
### Dimensiones Totales ### Dimensiones Totales
@ -875,4 +875,4 @@ def temporal_validation_split(df, train_pct=0.7, val_pct=0.15):
**Documento Generado:** 2025-12-05 **Documento Generado:** 2025-12-05
**Pr\u00f3xima Revisi\u00f3n:** 2025-Q1 **Pr\u00f3xima Revisi\u00f3n:** 2025-Q1
**Contacto:** ml-engineering@orbiquant.ai **Contacto:** ml-engineering@trading.ai

View File

@ -1,18 +1,18 @@
--- ---
id: "MODELOS-ML-DEFINICION" id: "MODELOS-ML-DEFINICION"
title: "Arquitectura de Modelos ML - OrbiQuant IA" title: "Arquitectura de Modelos ML - Trading Platform"
type: "Documentation" type: "Documentation"
project: "trading-platform" project: "trading-platform"
version: "1.0.0" version: "1.0.0"
updated_date: "2026-01-04" updated_date: "2026-01-04"
--- ---
# Arquitectura de Modelos ML - OrbiQuant IA # Arquitectura de Modelos ML - Trading Platform
**Versi\u00f3n:** 1.0.0 **Versi\u00f3n:** 1.0.0
**Fecha:** 2025-12-05 **Fecha:** 2025-12-05
**M\u00f3dulo:** OQI-006-ml-signals **M\u00f3dulo:** OQI-006-ml-signals
**Autor:** Trading Strategist - OrbiQuant IA **Autor:** Trading Strategist - Trading Platform
--- ---
@ -1600,7 +1600,7 @@ class SignalBacktester:
from fastapi import FastAPI, HTTPException from fastapi import FastAPI, HTTPException
from pydantic import BaseModel from pydantic import BaseModel
app = FastAPI(title="OrbiQuant ML Service") app = FastAPI(title="Trading Platform ML Service")
# Load models # Load models
orchestrator = StrategyOrchestrator.load('models/orchestrator_v1.pkl') orchestrator = StrategyOrchestrator.load('models/orchestrator_v1.pkl')
@ -1718,4 +1718,4 @@ class AutoRetrainingPipeline:
**Documento Generado:** 2025-12-05 **Documento Generado:** 2025-12-05
**Pr\u00f3xima Revisi\u00f3n:** 2025-Q1 **Pr\u00f3xima Revisi\u00f3n:** 2025-Q1
**Contacto:** ml-engineering@orbiquant.ai **Contacto:** ml-engineering@trading.ai

Some files were not shown because too many files have changed in this diff Show More