Wall Street cooled on Monday afternoon after soaring to new highs on news the United States and China have agreed to a trade war truce.

The Dow Jones Industrial Average, which had gained 254 points at the opening bell, eased to a 30-point gain by mid-afternoon.

The S&P 500, which hit an all-time intraday high of 2,976 on Monday morning, had pulled back to around 2,953 in afternoon trading. The tech-heavy Nasdaq notched a 0.75 percent gain.

Shares in tech companies and chipmakers with broad exposure to China performed well all day, with Apple, Qualcomm and Broadcom rallying.

Monday's trading comes on the heels of the best June performance for markets since 1938, with the Dow chalking up a 7.2 percent monthly gain.

Following a meeting with Chinese President Xi Jinping on the sidelines of the G-20 economic summit in Osaka, Japan, President Donald Trump said Saturday that the U.S. is "winning big" in the trade war. He said the two sides had agreed to keep current tariffs in place but that the U.S. would not be levying additional taxes on the remaining $300 billion in Chinese imports.

Trump also said he was lifting his ban on U.S. companies selling technology to Huawei, the Chinese telecom firm, which Washington accused of conducting surveillance for the Chinese government and posing a cybersecurity threat.

The White House has yet to release any official statement regarding the details of the agreement.

Market watchers had eagerly anticipated the meeting between the heads of the world's top two economic superpowers; talks between the two sides had stalled in May when China sent Washington a heavily redacted 150-page document reneging on a number of compromises made during months of negotiations.

Markets have been on a tear so far this year, recording the best first half on record, fueled partly by the change of direction by the Federal Reserve, which now looks set to cut interest rates for the first time since the financial crisis.