I have started work on an api to help do some calculations for developers to save time and help the less technical minded play with their own creations without dealing without the need for complex coding.
It is currently hosted on free hosting so don’t expect it to be lightning fast or able to handle millions of requests a minute.
Its very basic at the moment but allows you to get the following information for a given address
- Coin Weight
- Btc value
- Usd Value
- Estimated time to stake in minutes
There is also http://stevenbrown.uphero.com/api.php?lookup=info that gives certain generic information like network weight, current price, difficulty etc.
Here is an example
and this is an example of it being used to create a basic web based RddCompanion
The api might go down or things might alter slightly so while you can use it to build anything you want, I would not rely on it for a major service.
I have no idea how far I shall take this as I am short on ideas, but if you feel there is something I should add or do differently please let me know.
Just in case any of you want to see how easy it is to use you can test or adapt the code below
<?php $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, "http://stevenbrown.uphero.com/api.php?lookup=RvmwBpHbwQgLZcTvkcpdhGqt17FA11U1it"); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); $rawData = curl_exec($curl); curl_close($curl); $data = json_decode($rawData); $address = $data->address; $bal = $data->balance; $value = $data->value; $usdvalue = $data->usdvalue; $minstostake = $data->minstostake / 60; echo "<b>Wallet Address:</b><br> $address<br>"; echo "<b>Balance:</b><br> $bal<br>"; echo "<b>Bitcoin Value:</b><br>$value<br>"; echo "<b>USD Value:</b><br>$ $usdvalue<br>"; echo "<b>Estimated Time until stake:</b><br>$minstostake<br>"; ?>
I have a second api to add bits to and use for testing until I know it works it can be accessed using api2.php