workspace-v1/projects/trading-platform/apps/data-service/examples/api_examples.sh
rckrdmrd 66161b1566 feat: Workspace-v1 complete migration with NEXUS v3.4
Sistema NEXUS v3.4 migrado con:

Estructura principal:
- core/orchestration: Sistema SIMCO + CAPVED (27 directivas, 28 perfiles)
- core/catalog: Catalogo de funcionalidades reutilizables
- shared/knowledge-base: Base de conocimiento compartida
- devtools/scripts: Herramientas de desarrollo
- control-plane/registries: Control de servicios y CI/CD
- orchestration/: Configuracion de orquestacion de agentes

Proyectos incluidos (11):
- gamilit (submodule -> GitHub)
- trading-platform (OrbiquanTIA)
- erp-suite con 5 verticales:
  - erp-core, construccion, vidrio-templado
  - mecanicas-diesel, retail, clinicas
- betting-analytics
- inmobiliaria-analytics
- platform_marketing_content
- pos-micro, erp-basico

Configuracion:
- .gitignore completo para Node.js/Python/Docker
- gamilit como submodule (git@github.com:rckrdmrd/gamilit-workspace.git)
- Sistema de puertos estandarizado (3005-3199)

Generated with NEXUS v3.4 Migration System
EPIC-010: Configuracion Git y Repositorios
2026-01-04 03:37:42 -06:00

99 lines
2.7 KiB
Bash
Executable File

#!/bin/bash
# API Examples for Data Service - Massive.com Integration
# OrbiQuant IA Trading Platform
BASE_URL="http://localhost:8001"
echo "=========================================="
echo "OrbiQuant Data Service - API Examples"
echo "=========================================="
echo ""
# 1. Check service health
echo "1. Checking service health..."
curl -s "${BASE_URL}/health" | jq '.'
echo ""
# 2. Get root info
echo "2. Getting service info..."
curl -s "${BASE_URL}/" | jq '.'
echo ""
# 3. List all supported symbols
echo "3. Listing all supported symbols..."
curl -s "${BASE_URL}/api/sync/symbols" | jq '.symbols | length'
echo ""
# 4. List forex symbols only
echo "4. Listing forex symbols..."
curl -s "${BASE_URL}/api/sync/symbols?asset_type=forex" | jq '.symbols[] | {symbol, polygon_symbol, asset_type}'
echo ""
# 5. Get info for specific symbol
echo "5. Getting EURUSD info..."
curl -s "${BASE_URL}/api/sync/symbols/EURUSD" | jq '.'
echo ""
# 6. Sync EURUSD - 5min data (last 30 days)
echo "6. Syncing EURUSD (5min, 30 days)..."
curl -s -X POST "${BASE_URL}/api/sync/sync/EURUSD" \
-H "Content-Type: application/json" \
-d '{
"asset_type": "forex",
"timeframe": "5min",
"backfill_days": 30
}' | jq '.'
echo ""
# 7. Sync GBPUSD - 1hour data (last 7 days)
echo "7. Syncing GBPUSD (1hour, 7 days)..."
curl -s -X POST "${BASE_URL}/api/sync/sync/GBPUSD" \
-H "Content-Type: application/json" \
-d '{
"asset_type": "forex",
"timeframe": "1hour",
"backfill_days": 7
}' | jq '.'
echo ""
# 8. Get sync status for all tickers
echo "8. Getting sync status..."
curl -s "${BASE_URL}/api/sync/status" | jq '.[] | {symbol, timeframe, status, rows_synced}'
echo ""
# 9. Get sync status for EURUSD only
echo "9. Getting EURUSD sync status..."
curl -s "${BASE_URL}/api/sync/status/EURUSD" | jq '.'
echo ""
# 10. Check sync service health
echo "10. Checking sync service health..."
curl -s "${BASE_URL}/api/sync/health" | jq '.'
echo ""
# 11. Get scheduler status
echo "11. Getting scheduler status..."
curl -s "${BASE_URL}/scheduler/status" | jq '.'
echo ""
# 12. Get market data for EURUSD
echo "12. Getting EURUSD ticker price..."
curl -s "${BASE_URL}/api/v1/ticker/EURUSD" | jq '.'
echo ""
# 13. Get candlestick data
echo "13. Getting EURUSD candles (1hour, last 100)..."
curl -s "${BASE_URL}/api/v1/candles/EURUSD?timeframe=1hour&limit=100" | jq '.candles | length'
echo ""
# 14. Get symbols from main API
echo "14. Getting symbols from main API..."
curl -s "${BASE_URL}/api/v1/symbols?asset_type=forex&limit=10" | jq '.symbols[] | {symbol, asset_type}'
echo ""
echo "=========================================="
echo "Examples completed!"
echo "=========================================="
echo ""
echo "For more info, visit: ${BASE_URL}/docs"