feat: trading terminal live rates + fix spread negativo + fix USD→BRL

- Adiciona widget de cotações ao vivo (USD/BRL e EUR/BRL) com design
  estilo terminal de trading (dark theme, tipografia mono, glow effects)
- Proxy server-side /api/cotacao com cache 3s e token AwesomeAPI
- Auto-refresh a cada 3 segundos apenas quando a página está aberta
- Corrige cálculo de spread negativo: remove Math.abs() em USD→BRL
  e Math.max(0,...) no spread líquido
- Corrige seção USD→BRL que não aparecia (filtro status !== 'finalizado')
- Corrige valor_reais no fluxo USD→BRL: agora calcula valor * cotação
- Adiciona classe CSS spread-negative para destacar spreads negativos
- Bandeiras de fluxo (BR/US/EU) nos botões de compra e venda

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
root
2026-02-10 22:30:43 -05:00
parent 1ad28f54dd
commit 7ee15ad5e5
12 changed files with 1285 additions and 436 deletions

View File

@@ -11,6 +11,7 @@ services:
# Netbird VPN Setup Key
- NETBIRD_SETUP_KEY=${NETBIRD_SETUP_KEY:-14A782C8-24D2-46A9-B427-A422854E9B50}
- NETBIRD_MANAGEMENT_URL=${NETBIRD_MANAGEMENT_URL:-https://netbird.cambioreal.com}
- NETBIRD_HOSTNAME=${NETBIRD_HOSTNAME:-bi-ccc}
# MySQL RDS Connection (via Netbird)
- MYSQL_URL=${MYSQL_URL}
@@ -20,9 +21,12 @@ services:
# App Config
- SESSION_SECRET=${SESSION_SECRET:-bi-agentes-secret-key-change-me}
- PORT=3080
- AWESOME_API_TOKEN=${AWESOME_API_TOKEN:-2dbcf6a26f9bd9016859a2d31f99fbd8fc9ac4e9e8e440d94002ac3b436a747a}
volumes:
# Persist SQLite database
- ./data:/app/data
# Persist NetBird config (keeps same peer/IP between restarts)
- ./netbird:/var/lib/netbird
cap_add:
# Required for Netbird VPN
- NET_ADMIN