Bitcoin speculators aren’t the only ones who stand to cash in from the crypto-currency boom. Uncle Sam is now set to collect back taxes from thousands of customers of a digital currency exchange who failed to report bitcoin transactions.
In a ruling on Tuesday, a federal court judge ordered San Francisco-based Coinbase to comply with a summons that requires it to identify 14,355 accounts, which have accounted for nearly 9 million transactions.
The order, which covers transactions between 2013 and 2015, comes after a prolonged court fight that began when the IRS demanded that Coinbase provide detailed personal information for more than a million customer accounts.
The IRS subsequently limited its demand to ask only for accounts that conducted bitcoin transactions—either exchanging bitcoin for dollars, or sending or receiving coins from another bitcoin user—worth $20,000 or more.
Coinbase claimed that even the narrower IRS request represented an illegal imposition, but the court disagreed.
“The summons as narrowed by the Court serves the IRS’s legitimate purpose of investigating Coinbase account holders who may not have paid federal taxes on their virtual currency profits,” wrote U.S. District Judge Jacqueline Corley.
In response to an inquiry from Fortune about whether it would appeal, Coinbase pointed to a blog post in which it stated the company was pleased that it had drastically reduced the scope of the original IRS demand.
“Although we are disappointed not to be able to entirely defeat the summons, we are proud to fight for our customers and in the result we were able to achieve as a small company against a large government agency,” said the blog post, which did not address the appeal question.
The investigation began after the IRS searched its electronic filings and discovered that only 802 people had declared bitcoin-related losses or gains in 2015.
During the three years covered by the IRS demand, the price of bitcoin soared from $13 to over $1,100. The currency this week broke the $11,000 for the first time.
The IRS dispute with Coinbase is likely to be just the opening salvo in a prolonged effort by the federal government to ensure digital currency speculators pay their taxes. While Tuesday’s ruling may lead the agency to demand back taxes from thousands of people, it only covers a three-year period and is limited to bitcoin.
While bitcoin is the most popular digital currency, there are dozens of others in a market that is now worth over $200 billion dollars. Moreover, Coinbase is just one of numerous exchanges where people buy bitcoin and other currencies.
The IRS, however, has so far not announced investigations into other exchanges. Meanwhile, the creation of the split-off currency, Bitcoin Cash (which is to be delivered to every Coinbase customer in January) is likely to trigger another round of tax complications.
In a small victory for Coinbase, the judge refused to order the exchange to provide certain personal information, including passport information or third-party communications. You can read the full ruling for yourself here (h/t The Verge).
This is part of Fortune’s new initiative, The Ledger, a trusted news source at the intersection of tech and finance. For more on The Ledger, click here.