Japan avoided the biggest of all “fat finger” meltdowns on Wednesday when an unidentified large stockbroker managed to cancel rogue trades worth more than the size of Sweden’s economy.

Orders for shares in 42 companies worth 67.78 trillion yen (£380bn) were cancelled in Tokyo, according to data compiled by Bloomberg News. If the orders had gone through the hapless dealer would have traded more than half the shares of Toyota, the world’s biggest carmaker, for 12.7tn yen. Trades were also scrapped for other big Japanese names such as Sony, Honda and Nomura.

Ayako Sera, a market strategist at Sumitomo Mitsui Trust in Tokyo, told Bloomberg: “I’ve never heard of orders this big being cancelled before. There must have been an error.”

Despite a regulatory clampdown since the financial crisis, the world’s watchdogs have been unable to stamp out one of the biggest threats to orderly markets – human error.

The firm whose trader almost committed the ultimate typo will not suffer losses because it managed to correct the order. But other distracted or exhausted traders have not been so lucky.

HSBC’s shares briefly leapt 10% last year when a dealer mistakenly ordered 2.5m shares in the bank, instead of $2.5m (£1.5m) worth of shares, compounding the error by sending competing orders all trying to buy the shares. In 2005, Japan’s Mizuho Financial lost 27bn yen when it was unable to cancel a mistyped share order in cable operator J-com in time.

Michael Hewson, chief market analyst at CMC Markets, said that though markets self-correct after aberrant trades, the Japanese orders would have caused blind panic as automated trades tracked the market downwards.

“When you get an order of that size it’s human nature and with a large move the robots, the algorithms, will jump on the back of it.”

The unidentified broker who made the Toyota order was able to cancel the trades because they were carried out on the over-the-counter (OTC) market, which gives traders time to cancel before completion. OTC transactions are carried out directly between the buyer and the seller and not through an exchange.

The biggest stock market fall ever, 2010’s flash crash in New York, was initially blamed on a fat finger sell order for Procter & Gamble shares. The investigation into the $1 trillion collapse concluded that a large but intended single trade in a fragile market had set off a spiral of selling.