The world's two largest economies, the US and China, are in the midst of a trade spat that threatens to erupt into a full-scale trade war.
It put up restrictions, such as insisting on accepting only silver as payment, and confining China's trade with the West to an area of Guangzhou city, near Hong Kong, called The Thirteen Factories.
And even back then, US traders struggled to find products that China wanted to buy. They sold mostly ginseng and fur to the Chinese, and instead made more money selling China's products to American consumers.
China has come a long way since then - it is now the world's biggest trading nation. It exports more than any country, and its imports are second only to the US.
But the desire to be self-reliant remains very strong, which partly explains why it imposes high tariffs on foreign products, restricts foreign companies' market access, tries to learn to make the products they sell by forcing them to transfer technology, and turns a blind eye on intellectual property rights violations by its companies.
History helps explain this mentality.
Still on Chinese people's minds is the period when China was forced to open up to trading with Western countries.
In the 19th Century, European nations used military power to pry open China's market. To earn hard currency from China, the British and Americans even smuggled opium into China and basically drugged its people.
Japan meanwhile forced China to sign unequal treaties that allowed foreigners to establish autonomous economic bases in the country.
Previous centuries of being taken advantage of, and recent decades of being mired in communist economic standstill, have instilled in the Chinese the sense - even to this day - that China is vulnerable, in need of protecting itself and catching up with stronger nations.
Given its history and its mindset, it is no wonder that to China and many Chinese people, trade was never about fair play. To them, it is practically their right to have a huge trade surplus with the US.
Also fuelling this is the traditional Chinese belief that the shrewdest business person deserves the best deal or outcome.
People who have visited China would have experienced a microcosm of this mentality while shopping. At many street-side markets, including the famous Silk Market in Beijing, prices are not posted.
Instead, shoppers and vendors play a game of each trying to get the best deal for himself or herself. The vendors pre-empt the shoppers by asking for a much higher price than their bottom line.
The shoppers, at least those who are experienced, ask for a much lower price than what they're willing to pay.
A lot of back and forth haggling then takes place, which may include the vendor pretending to be upset at the shopper's low asking price, and the shopper pretending to walk away to another stall.
But the vendor almost always calls back the shopper, albeit with feigned disapproval. It's just an act, the vendor would never sell the product at a loss, and is simply making the customer think he or she is getting a good deal.
If all goes well, and it usually does, both sides laugh and behave like the best of friends because they've met each other halfway and both have gotten what they wanted.
I used to dislike shopping this way, considering it too laborious, and thinking I was being cheated. I even made the mistake of getting upset at the vendors asking for an unreasonable price. But I later learned that I got better deals by smiling and playing along.
That's something that has been missing in China-US trade over the years. In their eagerness to make money from each other, the Chinese and Americans have forgotten to make each other feel that they are getting a good deal.
China should remind the US that its companies have profited immensely by manufacturing their products cheaply in China, not to mention polluting its environment, and that when the US has what China wants - such as Boeing airliners, China buys a lot of them.
Beijing could do well by also reminding America that heavy spending American consumers have benefitted from the cheaper goods imported from China.
The US, at the same time, needs to remind China that it's benefited tremendously from relatively low US tariffs, and a level playing field in the US. And that despite historical wrongs done by Western powers to the Middle Kingdom, China is no longer a victim, and it needs to practice fair play as a major trading nation.
But it will be an uphill battle. That's because while the Americans may feel cheated, the Chinese feel much worse. Many truly think, be it true or not, that America is out to contain China or even destroy it.
As the trade spat brewed, I received an opinion piece circulated on Wechat, the social media portal widely used in China. It accused Trump and the US of acting out of fear of China's rise, and trying to impose tariffs on China's technology exports such as aircraft parts, to kill its high-tech development.
"This is really strange," it said. "So China should only build houses, make clothes, and lend money to the United States? It cannot develop computers, aircraft, and weapons technology? What **** logic is that!"
The article then accused the US of wanting to "repeat the plundering of the Opium War."
To Westerners, this might seem odd, but one must not forget history is still fresh on Chinese people's minds, and such deep family- and country-destroying wounds do not heal easily.
The editorial even expressed the fear in the back of Chinese minds that the US wants to split up China into many small countries (like the former Soviet Union) to weaken it.
"Facts have once again educated the Chinese people that the US imperialists' wishes of killing China still exist," it said. "We must not be in an illusion about this world-class evil empire."
Needless to say, it will take a lot of time, effort and wisdom to bring the two sides closer to understanding and trusting each other.
But President Trump seems to understand how to negotiate with the Chinese. Just when the trade spat looked like it could turn ugly, after Trump called for imposing $100bn (£74bn) in new tariffs on Chinese products, he tweeted that he and President Xi will always be friends, no matter what happens with their dispute on trade.
Ahead of next week's US-China trade talks in Beijing that was a wise move. It assures China that things won't get ugly, and that it's not personal.
One good that may come out of this trade dispute is that the world's second-largest economy may finally realize it has risen up - it is no longer powerless and taken advantage of. It has benefited immensely from other countries' openness towards trade and as its companies expand globally, China needs to play fair in order for its companies to get fair treatment abroad.
That's perhaps what has led Chinese President Xi, at the recent Boao Forum on economic development and on the 40th anniversary of the opening up of China's economy, to pledge that China will increase imports, lower import tariffs, increase market access and further protect intellectual property rights.
In his speech, President Xi said: "China will enter a new phase of opening up."
It remains to be seen whether President Xi will carry out his promises.
But there's no need for the US to be too anxious. Unlike during the Qing and earlier dynasties, when the Chinese found little need to trade with the outside world, it is now trading widely around the globe.
And with its emerging middle class and their growing income, it will have a growing appetite for Western products, especially those that are considered the best in their league.
So if the US continues to innovate great products and if the Trump administration bargains well with the Chinese, trade between the two sides will eventually become more balanced, and the two trading partners could even behave like the best of friends.