West Ham secured their place in the fourth round of the Carabao Cup after recording their biggest win since beating Bury 10-0 in 1983.

Ryan Fredericks, Lucas Pérez and Robert Snodgrass scored their first West Ham goals and the 24,833 supporters who showed up at the London Stadium enjoyed a first look at Grady Diangana, who hogged the limelight scoring twice on his senior debut.

Manuel Pellegrini praised Diangana for seizing his opportunity and the Chilean, who won this competition twice with Manchester City, was also pleased with his side for adopting a ruthless attitude against Macclesfield Town.

The only consolation for Macclesfield was that West Ham declared after Diangana made it 8-0 with eight minutes left. “It wasn’t the result we were looking for,” Mark Yates, the visiting manager, said.

The floodgates opened when Declan Rice, an early replacement for the injured Carlos Sánchez, crossed for Michail Antonio to head his first goal of the season past Kieran O’Hara in the 30th minute.

The second arrived when Diangana, a 20-year-old winger, cut inside from the right and unleashed a shot that O’Hara failed to hold. James Pearson’s goal-line clearance hit Fiacre Kelleher, leaving Snodgrass with an easy finish.

Macclesfield, who are bottom of League Two after earning two points from their first nine games, fell further behind when Aaron Cresswell picked out Pérez, who scored his first since his £4m move from Arsenal. Fredericks added a fourth with a venomous drive shortly after half-time and woeful defending allowed Angelo Ogbonna to convert Snodgrass’s corner. Pellegrini gave two more youngsters, Conor Coventry and Joe Powell, their debuts in the second half and Snodgrass scored his second after a surge from Fredericks.

The moment the home fans were waiting for arrived when Diangana combined with Powell, skipped into the area and rolled a low finish past O’Hara. “I was pleased for him because the only thing I demand from young players when they have the opportunity is to take the opportunity,” Pellegrini said. “He did very well, not only for the two goals.”

It was a good way for West Ham to warm up for the more daunting task of hosting Manchester United on Saturday.