Yes, Coinbase is a legal company.
It has licenses from several US states, and it is authorized by the New York State Department of Financial Services (DFS) to trade Ethereum and Litecoin.
DFS also approved four more companies at that time: XRP II, Circle Internet Financial, Gemini Trust Company, and itBit Trust Company.
As a legal company that tries to stay compliant with all the rules, Coinbase sometimes encounters difficulties.
In 2017, the US Internal Revenue Services (IRS) asked Coinbase to provide information about every account from 2013 and 2015. The company didn’t want to comply, so it was sued. In November, the California federal court requested that the crypto exchange provide the records for every user that traded over $20,000 in a year. Coinbase said that 14,355 customers were on that list. The IRS asked the exchange the user’s name, address, birth date, taxpayer ID, and all activity data for each account in the list.
It seems that IRS couldn’t manage to obtain the IDs from Coinbase. The agency said at the court:
“U.S. taxpayers, including Coinbase users, have made use of virtual currencies to avoid the reporting and paying taxes. [We need to] gain some degree of visibility into a space where it is already necessarily moving about somewhat in the dark.”
In 2018, Coinbase started to send 1099-K forms (tax forms) for that list of users…something like this:
This caused much concern among the US-based clients.
Users who bought virtual currency and haven’t sold them for fiat money are not required to pay taxes to the IRS.
At least customers outside the US can trade on Coinbase without such problems (though there are often other types of problems).