A group of pension funds has joined with the City of Providence, R.I., in a lawsuit that claims that major stock exchanges improperly favored high-frequency traders at the expense of other investors.

The pension funds, including one in Boston and another in Stockholm, have joined a lawsuit originally filed by Providence in April, according to a filing in the Federal District Court in Manhattan. They are taking aim at some of the biggest stock exchanges — including the New York Stock Exchange, Nasdaq and BATS Global Markets — as well as the investment bank Barclays, which operates a private stock trading venue known as a dark pool.

  NYT