When did cannons fall from use on merchant ships?

May 2019
96
Earth
#21
and piracy was dwindling, especially traditional hotspots in Caribbean and Med.
Britain (and other western powers) were running some major commerce through the South China Sea during the first half of the 19th century, and that region has been a pirate hot spot for centuries until fairly recently. Seeing as the simpler, comparatively cheaper muzzle loading smoothbore cannon were still in use into the 1860s, I wouldn't be surprised if there were were China traders carrying them aboard at that date. But I hadn't seen much mention of it, which is why I came here...