I have the following formula which can be used to estimate someones mining profits for ethereum:
(UserHashMh * 1e6 / ((difficultyTH / BlockTimeSec)*1000*1e9))*((60/ BlockTimeSec)*BlockReward)*(60*24*30)*(EthPrice)
I can quite easily get the data by going to websites and pulling it that way, but im looking to design my program to not be dependent on a third-party to produce these estimates. I have access to a full node with full IPC/RPC access. Ideally im looking to be able to calculate this using RPC or IPC calls with my local node and not have to go to a third party. The only calls I'm anticipating having to go to a third-party are for the eth price, and users hash rate.