so can u make it print out the spl tokens so i can see whats going on and if the information is accurate ??  import asyncio
import websockets
import json
import base64
from datetime import datetime
import time


class QuantumSniper:
    def __init__(self):
        self.ws_endpoint = "wss://marga-e56m84-fast-mainnet.helius-rpc.com"
        self.seen_pools = set()
        self.MIN_POOL_SIZE = 752
        self.SNIPE_WINDOW_SECONDS = 3
        self.stats = {
            "pools_scanned": 0,
            "start_time": time.time(),
            "snipes_found": 0,
            "scalps_found": 0,
        }

    def update_stats(self):
        elapsed = time.time() - self.stats["start_time"]
        scan_rate = self.stats["pools_scanned"] / elapsed if elapsed > 0 else 0

        print(f"\n📊 QUANTUM STATS:")
        print(f"⚡ Scan Rate: {scan_rate:.1f} pools/s")
        print(f"🎯 Total Scanned: {self.stats['pools_scanned']:,}")
        print(f"💎 Snipe Opportunities: {self.stats['snipes_found']}")
        print(f"📈 Scalp Opportunities: {self.stats['scalps_found']}")
        print(f"⏱️ Uptime: {elapsed:.1f}s\n")

    def decode_pool_data(self, raw_bytes, pool_address):
        try:
            return {
                "pool_address": pool_address,
                "creation_time": time.time(),
                "metrics": {
                    "total_supply": int.from_bytes(raw_bytes[32:40], "little"),
                    "circulating_supply": int.from_bytes(raw_bytes[40:48], "little"),
                    "liquidity_usd": int.from_bytes(raw_bytes[48:56], "little") / 1e6,
                    "holders": int.from_bytes(raw_bytes[56:64], "little"),
                    "max_holder_percent": int.from_bytes(raw_bytes[64:72], "little")
                    / 100,
                    "mint_authority": bool(raw_bytes[72] & 1),
                    "liquidity_locked_percent": int.from_bytes(
                        raw_bytes[80:88], "little"
                    )
                    / 100,
                    "buy_pressure": int.from_bytes(raw_bytes[88:92], "little"),
                    "sell_pressure": int.from_bytes(raw_bytes[92:96], "little"),
                    "volume_5min": int.from_bytes(raw_bytes[96:104], "little") / 1e6,
                    "price": int.from_bytes(raw_bytes[104:112], "little") / 1e9,
                },
            }
        except Exception as e:
            print(f"💥 Decode Error: {str(e)}")
            return None

    def is_snipeable(self, data):
        metrics = data["metrics"]
        age = time.time() - data["creation_time"]

        conditions = {
            "🕒 Age ≤ 3s": age <= self.SNIPE_WINDOW_SECONDS,
            "💰 Supply ≥ 900M": metrics["total_supply"] >= 900_000_000,
            "👥 Max Holder ≤ 10%": metrics["max_holder_percent"] <= 10,
            "🔒 Mint Locked": not metrics["mint_authority"],
            "💧 Liquidity Locked ≥ 95%": metrics["liquidity_locked_percent"] >= 95,
            "💎 Pool $500-$10k": 500 <= metrics["liquidity_usd"] <= 10_000,
        }

        return all(conditions.values()), conditions

    def is_scalpable(self, data):
        metrics = data["metrics"]
        buy_sell_ratio = (
            metrics["buy_pressure"] / metrics["sell_pressure"]
            if metrics["sell_pressure"] > 0
            else 0
        )

        conditions = {
            "📈 B/S Ratio > 2": buy_sell_ratio > 2,
            "📊 5m Vol > $1000": metrics["volume_5min"] > 1000,
            "🔒 Mint Locked": not metrics["mint_authority"],
            "💧 Liquidity Locked ≥ 95%": metrics["liquidity_locked_percent"] >= 95,
        }

        return all(conditions.values()), conditions, buy_sell_ratio

    async def hunt(self):
        print("🚀 QUANTUM SNIPER ACTIVATED")
        print(f"⏰ Hunt Start: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}")
        last_stats_update = time.time()

        async with websockets.connect(self.ws_endpoint) as ws:
            print("✅ MAINNET LOCKED")
            print("📡 INITIALIZING WEBSOCKET...")

            await ws.send(
                json.dumps(
                    {
                        "jsonrpc": "2.0",
                        "id": "quantum-sniper",
                        "method": "programSubscribe",
                        "params": [
                            "675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8",
                            {"encoding": "base64", "commitment": "processed"},
                        ],
                    }
                )
            )

            print("\n🎯 SCANNING FOR OPPORTUNITIES...")

            while True:
                try:
                    msg = await ws.recv()
                    self.stats["pools_scanned"] += 1

                    # Update stats every 10 seconds
                    if time.time() - last_stats_update > 10:
                        self.update_stats()
                        last_stats_update = time.time()

                    data = json.loads(msg)
                    if "params" in data:
                        raw = base64.b64decode(
                            data["params"]["result"]["value"]["account"]["data"][0]
                        )
                        if len(raw) < self.MIN_POOL_SIZE:
                            continue

                        pool_address = raw[0:32].hex()
                        if pool_address in self.seen_pools:
                            continue

                        self.seen_pools.add(pool_address)
                        pool_data = self.decode_pool_data(raw, pool_address)

                        if pool_data:
                            # SNIPE CHECK
                            snipeable, snipe_conditions = self.is_snipeable(pool_data)
                            if snipeable:
                                self.stats["snipes_found"] += 1
                                print("\n🎯 SNIPE OPPORTUNITY DETECTED!")
                                print(f"💎 Pool: {pool_data['pool_address']}")
                                print(
                                    f"💲 Price: ${pool_data['metrics']['price']:.10f}"
                                )
                                print(
                                    f"💰 Supply: {pool_data['metrics']['total_supply']:,}"
                                )
                                print(
                                    f"💧 Liquidity: ${pool_data['metrics']['liquidity_usd']:,.2f}"
                                )
                                for check, passed in snipe_conditions.items():
                                    print(f"{'✅' if passed else '❌'} {check}")
                                print()

                            # SCALP CHECK
                            scalpable, scalp_conditions, bs_ratio = self.is_scalpable(
                                pool_data
                            )
                            if scalpable:
                                self.stats["scalps_found"] += 1
                                print("\n💎 SCALP OPPORTUNITY DETECTED!")
                                print(f"🎯 Pool: {pool_data['pool_address']}")
                                print(
                                    f"💲 Price: ${pool_data['metrics']['price']:.10f}"
                                )
                                print(f"📊 B/S Ratio: {bs_ratio:.1f}")
                                print(
                                    f"📈 5m Volume: ${pool_data['metrics']['volume_5min']:,.2f}"
                                )
                                for check, passed in scalp_conditions.items():
                                    print(f"{'✅' if passed else '❌'} {check}")
                                print()

                except Exception as e:
                    print(f"💥 Error: {str(e)}")
                    continue


if __name__ == "__main__":
    sniper = QuantumSniper()
    try:
        asyncio.run(sniper.hunt())
    except KeyboardInterrupt:
        print("\n🛑 Hunt Terminated")