Shanghai reported 2.8 trillion yuan (427.5 billion U.S. dollars) of foreign trade last year, down 2.1 percent from 2014, according to municipal customs Sunday.
The figure breaks down into 1.6 trillion yuan of imports and 1.2 trillion yuan of exports, Shanghai Customs said in a press release.
It said the city's imports went up a slight 0.5 percent year-on-year and accounted for 15.2 percent of China's total imports.
Forty percent of Shanghai's imports were high technology products, valued at 527 billion yuan, up 4.6 percent year-on-year, the document said.
It said Shanghaiers showed a robust demand for imported consumer goods, which totaled 193 billion yuan last year, up 9.4 percent from 2014.Imports of meat surged 66.1 percent, while imports of fruits and clothing were up by 31.6 percent and 9.4 percent respectively.
Shanghai's exports, meanwhile, dropped by 5.3 percent year-on-year and made up 8.7 percent of China's total.
Two-way trade with the European Union and the United States, Shanghai's top two trading partners, totaled 576 billion yuan and 460 billion yuan respectively, down 9.6 percent and 1.9 percent.
ASEAN (the Association of Southeast Asian Nations) has replaced Japan to be Shanghai's third largest trading partner, with 332 billion yuan of trade.
Trade with Japan dropped 7.6 percent to 310 billion yuan.
Last year, China's total export and import values decreased 7 percent year on year, falling for the first time in six years, according to data released by the General Administration of Customs.