import sys import os from datetime import datetime # Adjust path if needed to import TradingStats sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) from src.stats.trading_stats import TradingStats def print_open_positions_mark_prices(): stats = TradingStats() open_positions = stats.get_open_positions() print(f"Found {len(open_positions)} open positions:") for pos in open_positions: symbol = pos.get('symbol', 'N/A') entry_price = pos.get('entry_price', 'N/A') mark_price = pos.get('mark_price', 'N/A') print(f"Symbol: {symbol}, Entry Price: {entry_price}, Mark Price: {mark_price}") if __name__ == "__main__": print_open_positions_mark_prices()