Hi,
While the taxation depends upon the underlying asset (crypto, forex, commodity) in which you have done the trade, but largely it will be your business income if the transaction are huge and done very frequently.
You should show the entire realised profit in your return irrespective of whether the money has been withdrawn or not. If you dont disclose it, it will be termed as undisclosed income and there are heavy penalties if the same is unearthed by It department.
For legality, pls consult with a regulatory lawyer but based on my limited understanding, its not strictly illegal.