<?php
require_once __DIR__.'/../../config.php';
require_once __DIR__ . '/../../engine/Kernel.php';
require_once __DIR__.'/../../engine/Logger.php';
require_once __DIR__.'/../../engine/InvestmentEngine.php';
$ctx = Kernel::handle(['auth' => true]);
$u   = $ctx['user'];
$portfolio = InvestmentEngine::getMyPortfolio((int)$u['id']);
echo json_encode(['ok'=>true,'data'=>$portfolio], JSON_UNESCAPED_UNICODE);
