Yes, it is legal. Bitcoin miners used to be arrested by law enforcement authorities, alternatively in January 2018 Carlos Vargas, the government’s cryptocurrency superintendent said “It is an exercise that is now perfectly legal. We have had conferences with the Supreme Court so that people who have been victims of seizures and arrests in previous years will have charges dismissed.”