Timing matters in July.

The Giants moved from definite sellers to potential buyers with a hot streak this month. The Cardinals, with a surge over the past few weeks, climbed off the uncertainty fence and will try to upgrade their roster, while the Rays, with Blake Snell needing surgery coinciding with their worst play of the season, have lowered their tolerance for the big purchase.

The market is fluid, hypersensitive to hot and cold spells and injuries.

So the fact the Yankees have been historically awful in the past week is bad timing. From July 2-19, the Yankees’ rotation had a 2.88 ERA in 14 games, and on July 20, Masahiro Tanaka opened with five shutout innings. He then allowed a five-run sixth to unleash an avalanche of starting failure.

The Yankees became the first team in the live-ball era (since 1920) to have a starter permit at least six runs and not exceed four innings in six consecutive games, according to STATS. The six-game starting total is 47 runs in 21²/₃ innings. All five starters have worked at least once in that stretch, and James Paxton has gone twice, including allowing seven runs (and four homers) in four innings Friday at Fenway Park, meaning the Yankees’ staff has surrendered at least three homers in a record-tying five straight games.

Before the latest debacle, general manager Brian Cashman insisted the Yankees were aggressive in the market, but that no failure by the rotation would motivate what he would consider rash, overpaying action. But from the outset of the season, the entire sport knew the Yankees would be trying to upgrade the rotation before July 31 at 4 p.m. So having their rotation permit its most runs over six games since 1912 only will embolden sellers — and that the Yankees might have ignited the Red Sox in the meantime makes it all the worse for them.

This already was a seller’s market. High prices are being asked. Most of the clubs with available starters have alternatives — for example, the Giants can put the qualifying offer on Madison Bumgarner and try to pursue a wild card and the Indians can attempt to make the playoffs with Trevor Bauer, then trade him in the offseason — so the expectation is prices will drop little or not at all. Why would any seller, seeing the Yankees’ rotation bomb, lower prices when it has alternatives and the Yanks are potentially in a desperate spot?

Over the past few years the Yankees have been disciplined within their process, mostly refusing to go outside their value determination to secure a player. For example, they did not go beyond four years for their top free-agent starting pitcher target, Patrick Corbin, who got six from the Nationals. They did not approach the $13 million the Braves guaranteed in-season to Dallas Keuchel.

Those decisions could haunt the 2019 Yankees, because those starters just cost money, as opposed to prospects. So will the Yankees act more desperately?

“The Yankees’ lead is so substantial that I don’t think they will do anything crazy to get a starter, especially because they have guys potentially coming off the IL, too,” said an executive from a team also in the pitching market. “They are not looking to reach October, but to win in October, and there may not be that true impact starter in this market, so what are they chasing?”

Both of those statements are accurate — the Yankees are comfortably ahead in the AL East and there might not be a true ace type available. Nevertheless, the Yankees risk further wearing out one of the game’s most overused bullpens if they do not get longer, more productive starts, so workhorses such as Bumgarner and Bauer have value beyond starting in the playoffs.

An executive whose team is more in the market for relief said of the Yankees, “They don’t need to make a splash. They will be creative and responsible.”

The Yankees’ fallback position, if they are unable to secure a significant starter, is to add a reliever (or two) to deepen the pool of quality pitchers and protect the current members of the bullpen. The hope is that Luis Severino and Dellin Betances and perhaps even Jonathan Loaisiga will make it back from the injured list to upgrade the staff and the Yankees can shorten games in October by throwing a lot of quality arms each game.

But Betances and Severino have not thrown an inning this season, Loaisiga is young and injury-prone and the current rotation is proving flammable, thus overtaxing the strong pen. It puts the Yankees — even comfortably ahead in the AL East — in need of finding reinforcements this week.

Timing is everything and time is running out.