Trump has sought to pressure China to agree to reduce trade barriers

U.S. President Donald Trump said on Wednesday that a deal to end a nearly 15-month trade war with China could happen sooner than people think and that the Chinese were making big agricultural purchases from the United States, including of beef and pork.

"They want to make a deal very badly... It could happen sooner than you think," Trump told reporters in New York.

Trump said later after trade discussions with Japanese Prime Minister Shinzo Abe there was a good chance of reaching a trade deal with China.

He said China was trying to be nice to him and added to reporters: "I was nice to them."

The U.S. leader spoke a day after delivering a stinging rebuke to China's trade practices at the United Nations General Assembly, saying he would not accept a "bad deal" in U.S.-China trade negotiations.

U.S. Trade Representative Robert Lighthizer said there was communication between the two sides and the Chinese would be in the United States for talks in early October.

"At this stage what you want to do is have confidence building and show goodwill, and I think ... we're doing that," he told reporters. "The president wants a deal if he can get a good deal. If he doesn't ... we have a tariff policy in place."

China's top diplomat hit back at U.S. criticism of its trade and development model after Trump spoke on Tuesday. Wang Yi, China's foreign minister and state councillor, said Beijing would not bow to threats, including on trade, though he said he hoped the high-level trade talks next month would produce positive results.

The early October meetings are to include the top trade negotiators from both sides: Chinese Vice Premier Liu He, Lighthizer and U.S. Treasury Secretary Steven Mnuchin. They are expected to determine whether the world's two largest economies are starting to chart a path out of their trade war or headed for new and higher tariffs on each others' goods.

Trump has sought to pressure China to agree to reduce trade barriers through a policy of increasing tariffs on Chinese products. On Tuesday, he accused China of the theft of trade secrets "on a grand scale" and said it was taking advantage of World Trade Organisation rules.

Although Trump held out hope in his U.N. speech that the United States and China could still reach an agreement, he made clear he wanted a deal that would rebalance the relationship between the two economic superpowers.

Wang said the trade war was inflicting unnecessary damage on both countries, raising costs for American firms, pushing up consumer prices and dampening U.S. growth potential.