If the United States and China have a trade war, American farmers could be the ones who take the biggest hit.

"A significant part of U.S. exports in China and greater China are agricultural products," said Brad Setser, a senior fellow at the Council on Foreign Relations.

"The Chinese have made it clear that if the U.S. were to impose some kind of duties, … China would respond in some way and on exports to China," he said.

China is the second largest market for U.S. agricultural exports, according to the U.S. Department of Agriculture Foreign Agricultural Service. Of the $20.2 billion in farm exports to China in 2015, soybeans accounted for $10.5 billion.

And in retaliation for any U.S. tariffs on China, Beijing will take action against the soybean and corn industries, China's state-backed Global Times said in an editorial after the U.S. presidential election. Rising tensions between the U.S. and China have many in the agriculture industry concerned.

"It's all about the potential," said Brandon Kliethermes, an agricultural economist at IHS Markit in Missouri.

"You don't want to irritate one of your largest buyers," he said, "and that's got everybody on edge right now."

The stakes are highest for growers of nuts such as almonds, which Chinese traditionally enjoy as snacks. The U.S. is the largest supplier of walnuts to China and the single largest almond supplier to the country, the USDA Foreign Agricultural Service said.

"In some cases, Chinese sanctions prove to be ineffective, but no doubt in areas in meat and nut production, there's potential for damage from sanctions," Setser said.

"Those are currently the kinds of products which have been on the front-line retaliation cycles in the past, and I'd expect them to be on the front line for retaliation again," he said.

Soybeans make up the bulk of U.S. agricultural imports to China, but analysts do not expect that industry to suffer much in the event of Chinese sanctions. China doesn't grow enough soybeans to meet its own demand. And if China imports soybeans from producers in Brazil or Argentina, the U.S. may end up diverting its production to those southern countries, analysts said.

Farmers are not the only ones with a stake in U.S.-China agricultural trade. Costco, which sells dried nuts and cranberries in bulk, launched sales on Chinese e-commerce giant Alibaba's Tmall site in October 2014. The U.S. retailer declined a CNBC request for comment.

Alibaba Executive Chairman Jack Ma told reporters after meeting with President Donald Trump earlier this month that the company's expansion would focus on products such as fruit and regions such as the American Midwest.

The potential for further growth is significant. A November 2016 study from the U.S. Chamber of Commerce projected that resolving trade barriers between the U.S. and China and better regulation on agricultural products would add $11.75 billion to the U.S. economy from 2016 to 2025, and $3.82 billion to China. Similar cooperation on farm machinery would add nearly $1.1 billion to that segment of U.S. industry, the study said.

"Just mentioning [China] can get people excited," Kliethermes said. "A lot of people in that market don't want to close that market down."