Digital currencies such as Ethereum and XRP allow for all transactions to be carried out online. To emphasize the decentralized nature of fiat currency, we can refer, for example, to the fact that all virtual currency users may access services without third-party involvement. Cryptocurrency price swings are non-stationary and highly erratic, similarly to the price changes of conventional stocks. Owing to the appeal of cryptocurrencies, both investors and researchers have paid more attention to cryptocurrency price forecasts. With the rise of deep learning, cryptocurrency forecasting has gained great importance. In this study, we present a long short-term memory (LSTM) algorithm that can be used to forecast the values of four types of cryptocurrencies: AMP, Ethereum, Electro-Optical System, and XRP. Mean square error (MSE), root mean square error (RMSE), and normalize root mean square error (NRMSE) analyses were used to evaluate the LSTM model. The findings obtained from these models showed that the LSTM algorithm had superior performance in predicting all forms of cryptocurrencies. Thus, it can be regarded as the most effective algorithm. The LSTM model provided promising and accurate forecasts for all cryptocurrencies. The model was applied to forecast the future closing prices of cryptocurrencies over a period of 180 days. The Pearson correlation metric was applied to assess the correlation between the prediction and target values in the training and testing processes. The LSTM algorithm achieved the highest correlation values in training (R = 96.73%) and in testing (96.09%) in predicting XRP currency prices. Cryptocurrency prices could be accurately predicted using the established LSTM model, which displayed highly efficient performance. The relevance of applying these models is that they may have huge repercussions for the economy by assisting investors and traders in identifying trends in the sales and purchases of different types of cryptocurrencies. The results of the LSTM model were compared with those of existing systems. The results of this study demonstrate that the proposed model showed superior accuracy based on the low prediction errors of the proposed system.