    public function get_account() {
        $user_id = get_current_user_id();
        $account = FXSim_Database::get_account_by_user( $user_id );
        
        if (!$account) {
            return new WP_REST_Response(['success' => false, 'message' => 'Account not found'], 404);
        }

        // Direct Database values (Safe from Pricing Engine Errors)
        $balance = (float) $account['balance'];
        $margin_used = (float) $account['margin_used'];
        $equity = $balance; // We will add live PnL here later
        $free_margin = (float) $account['free_margin'];

        return new WP_REST_Response([
            'success'        => true,
            'balance'        => $balance,
            'equity'         => $equity,
            'margin_used'    => $margin_used,
            'free_margin'    => $free_margin,
            'margin_level'   => $margin_used > 0 ? ($equity / $margin_used) * 100 : 0,
            'account_number' => $account['account_number'] ?? 'N/A',
            'leverage'       => (int) $account['leverage'] ?? 100,
        ], 200 );
    }<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://binary.atlanticworldwide.io/wp-sitemap-index.xsl" ?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><sitemap><loc>https://binary.atlanticworldwide.io/wp-sitemap-posts-post-1.xml</loc></sitemap><sitemap><loc>https://binary.atlanticworldwide.io/wp-sitemap-posts-page-1.xml</loc></sitemap><sitemap><loc>https://binary.atlanticworldwide.io/wp-sitemap-taxonomies-category-1.xml</loc></sitemap><sitemap><loc>https://binary.atlanticworldwide.io/wp-sitemap-users-1.xml</loc></sitemap></sitemapindex>
