Bitcoin generates a massive amount of data every day due to its innate transparency and capacity of operating completely decentralised. In this paper, we introduce on-chain metrics derived from data on the bitcoin network that enable us to describe the state and usage of the underlying network. Based on their characteristics, we classify them into user, miner, exchange activities and run a correlation analysis with the price to understand the dynamics of bitcoin's price and its underlying mechanics. Using the correlated data, we develop a deep learning model. However, determining the best values of parameters in a deep learning model can be a very challenging and time-consuming task. Hence, we propose a self-adaptive technique using a jSO optimization algorithm to find the best values of these parameters to accurately predict the price of bitcoin. Compared to traditional LSTM model, our approach is highly accurate and optimised with a minimum error rate.