/** * Positions Component * Handles position display and updates */ export class PositionsComponent { constructor(containerId) { this.container = document.getElementById(containerId); this.positions = []; } async load() { try { const response = await fetch('/api/strategy/positions'); const data = await response.json(); this.positions = data.positions || []; this.render(); } catch (error) { console.error('[Positions] Error loading positions:', error); this.showError('Failed to load positions'); } } render() { if (!this.container) return; if (this.positions.length === 0) { this.container.innerHTML = '