“To The Moon” 🚀Coin Calculator

Finished the First Version of the Calculator

A few weeks ago, I wrote an article on Calculating “To The Moon” 🚀 as a thought process based on something that @dragosroua posted. A few days ago, I posted Scientific Proof that To The Moon Caused BitCoin Crash!, in which I used the previous article and an article from @edje to “prove” that my calculations were correct based on his theory of anti-Moon gravitational issues with cryptocurrency.

When I was writing the article Air Drop – Success!, I used my calculation to figure out when IOSToken would go “To The Moon” and I had doubts about my formula. So, this got me thinking, why don’t I create a page to show my formula in action.

The first thing I needed to do was get cryptocurrency information. Luckily, Cryptocurrency Market Capitalizations (aka Coin Market Cap) has an open API for public use. In the API, you can get the list of coins or a particular coin returned using JSON.

A sample output of a call to get BitCoin
[
{
"id": "bitcoin",
"name": "Bitcoin",
"symbol": "BTC",
"rank": "1",
"price_usd": "573.137",
"price_btc": "1.0",
"24h_volume_usd": "72855700.0",
"market_cap_usd": "9080883500.0",
"available_supply": "15844176.0",
"total_supply": "15844176.0",
"max_supply": "21000000.0",
"percent_change_1h": "0.04",
"percent_change_24h": "-0.3",
"percent_change_7d": "-0.57",
"last_updated": "1472762067"
}
]

The results have all the basic information that I need. The coin, the BTC price, the USD price, the max supply and the total supply. From there, I can calculate “The Moon”, “The Sun” and what percentage complete each coin has done towards reaching those goals.

For my first step, I am selecting the current Top 10 coins listed. Every time the page is refreshed, it will go to the API and pull back the results and automatically figure out the calculations. I used PHP to parse out the file data and do the math calculations.

Here is an example of the results

By showing the percentage to each goal, it makes more sense as to how the formula works. Part of the formula requires that coin being calculated be compared to BitCoin. I divide the base Max Coin value of BitCoin by the Max Coin or Total Supply of the coin being calculated to create the “deMultiplier”. For coins with large amounts of coins, it shows that “The Moon” value is much lower than BitCoin’s. At first glance, this doesn’t seem to make sense, but when you look at the percentage complete, it gives a better picture. For example, Cardano has a “The Moon” value of $7.00, which doesn’t seem that far. But, at $0.38, Cardano is only 5% towards “The Moon” goal.

My next step will be either to allow people to enter in the Coin ID listed in Coin Market Cap, or choose from a drop list of coins to see the “To The Moon” Calculation. Unfortunately, you can only get 1 coin or a set of coins through the API.

Want to see it live? To The Moon! Coin Calculator

This article was also posted on my Steemit.com blog.

 

About DeanLogic
Dean has been playing around with programming ever since his family got an IBM PC back in the early 80's. Things have changed since BASICA and Dean has dabbled in HTML, JavaScript, Action Script, Flex, Flash, PHP, C#, C++, J2ME and SQL. On this site Dean likes to share his adventures in coding. And since programming isn't enough of a time killer, Dean has also picked up the hobby of short film creation.

About DeanLogic

Dean has been playing around with programming ever since his family got an IBM PC back in the early 80's. Things have changed since BASICA and Dean has dabbled in HTML, JavaScript, Action Script, Flex, Flash, PHP, C#, C++, J2ME and SQL. On this site Dean likes to share his adventures in coding. And since programming isn't enough of a time killer, Dean has also picked up the hobby of short film creation.