Every trade deadline carries uncertainty. Few players have lived through as many sides of it as Zack Wheeler.

This year’s deadline arrives with a fitting bookend. Carlos Beltrán entered the Baseball Hall of Fame last Sunday, almost exactly 15 years after Wheeler learned secondhand he had been traded for him.

The 21-year-old Wheeler was pitching for High-A San Jose in the Giants’ organization in 2011. He was staying with his host family in California’s Silicon Valley when he woke up and saw the news moving across ESPN’s ticker.

“It was a little different then, just because there wasn’t as much social media-type stuff,” Wheeler said. “I woke up and we were kind of just sitting there, and we saw it ticking across the bottom that it probably was going to happen.”

The Giants had won the World Series the year before. Their pitching staff was strong enough to repeat, but their offense needed help.

Beltrán, already one of the greatest postseason performers in baseball history, was the impact bat they wanted.

Wheeler, their 2009 first-rounder, was the price.

“The Giants were trying to go back to back, basically,” Wheeler said. “They were having a good run there for a little bit. It was nice to be part of the organization and everything.”

He did not want to leave.

“I really enjoyed my time there,” Wheeler said. “I wanted to stay there, obviously. But it’s a business, and that’s when I learned that it was a business.”

Wheeler had heard that the Giants could move either him or outfielder Gary Brown. They chose Wheeler.

“I guess the Mets wanted me,” he said.

That decision helped shape his career.

Beltrán played well after the trade, but the Giants missed the postseason. He signed with the Cardinals that offseason. San Francisco won another World Series without him in 2012.

Wheeler remained with the Mets and reached the majors in 2013.

By 2015, New York had built one of baseball’s most celebrated young rotations around Matt Harvey, Jacob deGrom and Noah Syndergaard. Wheeler was supposed to be part of it, but Tommy John surgery wiped out his season.

He was rehabbing in Port St. Lucie when the deadline placed his future in doubt again. This time, the news did not crawl quietly across a television screen the next morning. Social media had changed the way trades unfolded.

“I was just sitting there watching the game on TV, and then it came across that me and Wilmer [Flores] got traded,” Wheeler said.

The reported deal would have sent Wheeler and Flores to Milwaukee for outfielder Carlos Gómez.

Flores remained in the game at Citi Field as the news spread through the crowd. Believing he had played his final game for the only major-league organization he had known, Flores famously cried on the field.

Wheeler had become close with Flores. He felt for him as an unfinished transaction became public in the middle of a game.

“I hated that it happened midgame to him,” Wheeler said. “It probably could have worked out a little bit differently. Things do happen, and they probably didn’t mean for it to get out then, but it did.”

The trade never became official. The Mets backed out because of concerns raised by Gómez’s medical information.

Wheeler and Flores remained with New York.

Wheeler later called Mets general manager Sandy Alderson and expressed his desire to stay. But the collapsed Gómez deal did not exactly remove him from the market.

His name soon resurfaced in talks involving Cincinnati outfielder Jay Bruce. Over the next several years, Wheeler heard himself connected to the Yankees and other clubs.

“I felt like I was kind of in trade discussions every year,” he said. “They had basically the top guys in the rotation at the time. I was kind of the bottom half of it.”

Harvey, deGrom and Syndergaard had established themselves. Wheeler was talented enough to interest other organizations but had not stayed healthy long enough to cement his place beside them.

“I wasn’t one of the main guys,” he said. “So I was able to be traded, basically. I was always kind of the guy floated out there.”

The uncertainty became a familiar part of his summers.

“I wouldn’t say nervous,” Wheeler said. “It was more of [an] anxious time of year, because I knew I’d always kind of be out there.”

Wheeler never spent much time imagining how his career might have unfolded elsewhere. He learned to accept how little control players have at the deadline.

“I’m a laid-back guy, and whatever happens, happens,” Wheeler said. “If I did get traded, so be it.”

Older teammates also helped him understand that appearing in trade discussions was not necessarily a rejection.

“If somebody trades for you, they want you,” he said. “They see potential in you, and they think that you can help them.”

It also did not always mean the team moving a player had stopped believing in him.

“Maybe we have a surplus of guys, which we did at the time,” Wheeler said. “It just happens to work out that way numbers-wise.”

The failed Gómez trade eventually worked out for the Mets.

They acquired Yoenis Céspedes from Detroit for pitching prospects Michael Fulmer and Luis Cessa. Céspedes transformed their lineup and helped push them to the National League pennant.

Wheeler watched while recovering from surgery. Rehabilitation setbacks also cost him the entire 2016 season.

He returned in 2017.

Two years later, with his contract nearing its expiration, Wheeler again became one of the most discussed pitchers ahead of the deadline.

The Mets were hanging around the playoff race. Wheeler was healthy, pitching well and months from free agency. Contenders searching for rotation help had every reason to call.

The Mets listened but did not move him.

Wheeler made 11 starts after the deadline and posted a 2.66 ERA. He proved his health, strengthened his free-agent market and finished his Mets tenure with the type of run that once existed mostly as projection.

Zack Wheeler signed a five-year contract worth $118 million this past offseason with the Phillies and he’s been nothing but spectacular. Ricky Bottalico believes it’s the best signing of the offseason.

The Phillies signed him to a five-year, $118 million contract that December.

From Aug. 1, 2019 through now, Wheeler owns a 2.86 ERA, the lowest among the 76 major-league starters who have made at least 110 starts over that span.

The last time Wheeler was not traded, he began the best stretch of his career.

The Phillies should be thrilled.

Beltrán’s induction offers another way to measure how far Wheeler has traveled since that morning in California.

When the Giants acquired Beltrán, Wheeler was known nationally as the prospect surrendered for an established star. Beltrán was already a nine-time All-Star with one of the greatest postseason résumés in baseball history.

Wheeler said people around the sport helped him understand what it meant.

“You got traded for a future Hall of Famer,” Wheeler recalled being told.

Beltrán’s path to Cooperstown later became complicated by his role in the Astros’ sign-stealing scandal. His induction still added another layer to Wheeler’s first deadline experience.

“He’s one of the best switch hitters that has ever come through the game,” Wheeler said. “It’s definitely cool to look back on my career and think that was part of it.”

Wheeler has Hall of Fame aspirations of his own.

If he eventually reaches Cooperstown, the 2011 deal would join a short list of trades involving a future Hall of Fame player on each side.

According to Sportradar, there have been three known one-for-one trades involving players who were later inducted: Amos Rusie for Christy Mathewson in 1900, Edd Roush for High Pockets Kelly in 1927 and Joe Torre for Orlando Cepeda in 1969, although Torre was inducted as a manager rather than a player.

The possibility is striking.

“That would be pretty cool,” Zack Wheeler said.