By Sarah N. Lynch and Suzanne Barlyn

WASHINGTON (Reuters) - Citigroup <C.N> agreed on Tuesday to pay $7 million and admit to wrongdoing, after the U.S. Securities and Exchange Commission accused its brokerage arm of providing incomplete trading data to regulators for 15 years.

The Securities and Exchange Commission said a computer coding error led Citigroup Global Markets to make mistakes every time the SEC made a "blue sheet" request, or a request to provide details on things including the timing, pricing and volume of trades.

A Citigroup representative said ““We are pleased to have resolved this matter.”

The coding error occurred in software Citigroup used from 1999 to 2014 to process the SEC's requests for blue sheet data, the SEC's settlement order said. Citigroup, as a result, omitted 26,810 securities transactions from responses to more than 2,300 blue sheet requests by the SEC.

After Citigroup discovered the error, it failed to report it to the SEC and waited nine months to produce the omitted data, the SEC said.

(Reporting by Sarah N. Lynch and Suzanne Barlyn; Editing by David Gregorio)