On March 31.1854 ; Commodore Matthew Perry signs the Convention of Kanagawa with the Tokugawa Shogunate, opening the ports of Shimoda and Hakodate to American trade.