oracle / inspect_trades.py
zirobtc's picture
Upload folder using huggingface_hub
2063c38
import torch
from pprint import pprint
def inspect_sample():
data = torch.load("/workspace/apollo/data/cache/sample_11afZmnX7QPUA6N4_0.pt", map_location="cpu", weights_only=False)
events = data.get('event_sequence', [])
print("Trades in event sequence:")
for e in events:
if e.get("event_type") == "Trade":
print(f"- {e.get('timestamp')}: {e.get('wallet_address')} dir={e.get('trade_direction')} amount={e.get('sol_amount')} slippage={e.get('slippage')} base_amount?")
if __name__ == "__main__":
inspect_sample()