A DraftKings player filed a class action lawsuit against the MLB and two of its teams on Thursday — accusing them of creating an unfair gambling platform by turning a blind eye to the recently uncovered sign-stealing scandal.

Fantasy baseball contests from 2017 — when the Houston Astros first used electronic equipment to steal signs — to 2019, were “tainted by cheating and compromised,” according to lead plaintiff Kristopher Olson.

The Manhattan federal court suit argues that because of the cheating, the statistics of Astros players were distorted, altering the outcome of DraftKings fantasy baseball contests involving players from the team.

From 2017 to 2019, the suit alleges, the “MLB was well aware that its member teams were engaging in corrupt and fraudulent conduct that rendered player performance statistics dishonest and undermined the validity of its fan wagers on DraftKings’ fantasy baseball contests.”

DraftKings users competing in fantasy baseball contests pay entry fees to participate in either daily or weekly competitions.

The users choose teams made up of real-life MLB players from any of the leagues 30 teams, basing their selections off the players past statistical performances.

“Plaintiff Olson and his fellow DraftKings’ contestants made wagers on DraftKings’ fantasy baseball contests that they thought were based on the honest performance of MLB’s players,” the suit says.

But it claims, “instead the contests were based on the cheating by MLB’s teams and their players that MLB chose to turn a blind [eye] to and knowingly failed to prevent or disclose.”

MLB in 2015 publicly invested in DraftKings, entering into a league partnership which promoted the betting providers fantasy baseball competitions across various platforms, the suit says.

A year before the league partnership, DraftKings raked in over $300 million in daily fantasy sports betting entry fees and reported over $30 million in revenue, according to the suit.

Olson, from 2017 to 2019, placed at least 226 DraftKings fantasy baseball bets.

“Plaintiff Olson would not have entered into DraftKings’ MLB DFS contests during the Class Period had he known that the Houston Astros were engaged in the Trash Can Scheme and Astros Replay Room Scheme,” the suit says.

The suit alleges the defendants engaged in unfair and deceptive practices, violated state consumer protection laws, among other offenses.

Olson, of Massachusetts, is seeking unspecified monetary damages.

So far, just the Houston Astros have been penalized for cheating, announced by the league’s commissioner following a lengthy investigation earlier this month.

The Boston Red Sox, also a defendant in the suit, are under active investigation by the league for a similar sign-stealing scheme.

A spokesman for MLB declined to immediately comment. Reps for the Astros, the Red Sox, and Draftkings did not return messages.