The electricity trading network increases network flexibility and lowers trading costs with the aid of 5G and IOT technology. While it has improved trading efficiency and enhanced system intelligence, its security vulnerabilities pose significant challenges. In this study, we propose an intrusion detection method that focuses on feature reduction and model pruning in electricity trading network. The method effectively addresses the imbalance issue of the IDS2017 dataset by employing the SMOTE algorithm, reduces feature size and computational complexity through the application of PCA, autoencoder, and random forest techniques, and develops a lightweight intrusion detection model specifically designed for electricity trading network using model pruning and compression techniques. Experimental results demonstrate the effectiveness of the proposed model in detecting intrusions. The achieved precision, recall, F1 score, and false positive rate are at least 98.8%, 87.9%, 90.0%, and 0.08%, respectively. Furthermore, we conducted a comparative analysis of different pruning thresholds and determined that reducing the dimensionality to 49 dimensions yields superior model performance, making it particularly suitable for resource-constrained electricity trading network.