create account

Here is a Steem PriceTicker I made with CoinmarketCap API by frankenmint

View this thread on: hive.blogpeakd.comecency.com
· @frankenmint · (edited)
$0.06
Here is a Steem PriceTicker I made with CoinmarketCap API
<html>
<p><br></p>
<p><img src="http://puu.sh/q3tGs/e61ae6d11e.png" width="257" height="186"/></p>
<p>This #priceticker can even be denoted into #BTC with a little bit of help. &nbsp;It's a simplified version of my #<a href="http://honeybadgerofmoney.com/give-cryptocurrency-ticker/?shared=email&amp;msg=fail">HBOM</a> ticker I made a few months back. &nbsp;I'll likely include it on the site in due time, but in case you'd like to jump on and use it now: here you go. &nbsp;Any and all feedback is greatly appreciated 😁</p>
<p>I've embedded Jquery so it's easy to use the $GET() requests, but if you have a more efficient method that could get rid of JQuery I'm open to advice. &nbsp;Take care and and cheers peeps.</p>
<p><code>&lt;script &nbsp;&nbsp;src="https://code.jquery.com/jquery-2.2.4.min.js" &nbsp;&nbsp;integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" &nbsp;&nbsp;crossorigin="anonymous"&gt;&lt;/script&gt;&lt;div id="tickerBox"&gt;&lt;/div&gt;</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&lt;script&gt;</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;var tickerBox = document.getElementById('tickerBox');</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;var divTicker = document.createElement('div');</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;divTicker.setAttribute("id", "ticker");</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;tickerBox.appendChild(divTicker);</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;divTicker.style.fontSize="4rem";</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;divTicker.style.fontWeight="bold";</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;divTicker.style.letterSpacing="2px";</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;var checked = document.createElement('div');</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;checked.setAttribute("id", "checked");</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;tickerBox.appendChild(checked);</code></p>
<p><br></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;var dataLast;</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;function priceData (){</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var ticker = document.getElementById('ticker');</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var lastUpdated = document.getElementById('checked');</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var datetime = "Last Updated: &lt;br/&gt;" + new Date().toLocaleTimeString();</code></p>
<p><code>//https://api.bitcoinaverage.com/ticker/global/USD/last</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;$.get(</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"https://api.coinmarketcap.com/v1/ticker/steem/",</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function(data) {</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;data = data[0].price_usd;</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (data &gt; dataLast) {</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;divTicker.style.color = "green";</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else {</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;divTicker.style.color = "red";</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ticker.innerHTML = "$" + data.toFixed(2)+" &lt;span id='super'&gt;USD&lt;/span&gt;";</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;superscript = document.getElementById('super');</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;superscript.style.fontSize="xx-small";</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;superscript.style.verticalAlign="top";</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;superscript.style.letterSpacing="0px";</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;checked.innerHTML = datetime;</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dataLast = data;</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;);</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;}</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;priceData();</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;setInterval(priceData, 5000);</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;checked.style.paddingLeft="10px";</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;checked.style.marginTop="-14px";</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;checked.style.color="black";</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;checked.style.textShadow="2px 2px 1px #4ba2f2";</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;checked.style.float="right";</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;ticker.style.textShadow="1px 2px 2px black";</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;ticker.style.paddingLeft="10px";</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;tickerBox.style.width="13rem";</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;tickerBox.style.height="10rem";</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;ticker.style.paddingTop="1rem";</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;ticker.style.paddingBottom=".5rem"; &nbsp;&nbsp;&nbsp;</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;tickerBox.style.borderRadius="5px";</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;tickerBox.style.backgroundImage="url('https://puu.sh/q1VUF/d9e60eef32.png')";</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;tickerBox.style.backgroundSize="contain";</code></p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;//tickerBox.style.backgroundPosition="40px 0px";</code></p>
&nbsp;&nbsp;&nbsp;&nbsp;&lt;/script&gt;</code>
</html>
👍  , , , , , , , , , , , , , , , , , , , , ,
properties (23)
authorfrankenmint
permlinkhere-is-a-steem-priceticker-i-made-with-coinmarketcap-api
categorysteemit
json_metadata{"tags":["steemit","price","ticker","priceticker","BTC"],"image":["http://puu.sh/q3tGs/e61ae6d11e.png"],"links":["http://honeybadgerofmoney.com/give-cryptocurrency-ticker/?shared=email&msg=fail"]}
created2016-07-16 09:09:42
last_update2016-07-16 09:28:21
depth0
children9
last_payout2016-08-20 00:23:06
cashout_time1969-12-31 23:59:59
total_payout_value0.056 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length5,837
author_reputation79,037,816,252
root_title"Here is a Steem PriceTicker I made with CoinmarketCap API"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id133,058
net_rshares37,588,051,115
author_curate_reward""
vote details (22)
@powerage ·
Steemit to the moon!
👍  ,
properties (23)
authorpowerage
permlinkre-frankenmint-here-is-a-steem-priceticker-i-made-with-coinmarketcap-api-20160716t091315215z
categorysteemit
json_metadata{"tags":["steemit"]}
created2016-07-16 09:13:15
last_update2016-07-16 09:13:15
depth1
children0
last_payout2016-08-20 00:23:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length20
author_reputation15,139,265,880
root_title"Here is a Steem PriceTicker I made with CoinmarketCap API"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id133,089
net_rshares411,926,739
author_curate_reward""
vote details (2)
@vato · (edited)
Post your code in < code ><code>this is my code</code> < /code > without spaces.
👍  
properties (23)
authorvato
permlinkre-frankenmint-here-is-a-steem-priceticker-i-made-with-coinmarketcap-api-20160716t091246897z
categorysteemit
json_metadata{"tags":["steemit"]}
created2016-07-16 09:12:45
last_update2016-07-16 09:12:57
depth1
children2
last_payout2016-08-20 00:23:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length80
author_reputation3,378,892,006,080
root_title"Here is a Steem PriceTicker I made with CoinmarketCap API"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id133,084
net_rshares315,034,424
author_curate_reward""
vote details (1)
@frankenmint ·
I tried it a few different ways and resorted to using the monoblock button on the editor as using your suggestion didn't seem to work above.  Thanks for helping me figure the formatting out.
👍  
properties (23)
authorfrankenmint
permlinkre-vato-re-frankenmint-here-is-a-steem-priceticker-i-made-with-coinmarketcap-api-20160716t092540550z
categorysteemit
json_metadata{"tags":["steemit"]}
created2016-07-16 09:25:39
last_update2016-07-16 09:25:39
depth2
children1
last_payout2016-08-20 00:23:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length190
author_reputation79,037,816,252
root_title"Here is a Steem PriceTicker I made with CoinmarketCap API"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id133,215
net_rshares315,034,424
author_curate_reward""
vote details (1)
@cryptovore ·
I am getting into programming here today and started with this. How on earth do I run a file that pulls the JSON api data? :P
properties (22)
authorcryptovore
permlinkre-frankenmint-re-vato-re-frankenmint-here-is-a-steem-priceticker-i-made-with-coinmarketcap-api-20170716t161052505z
categorysteemit
json_metadata{"tags":["steemit"],"app":"steemit/0.1"}
created2017-07-16 16:10:54
last_update2017-07-16 16:10:54
depth3
children0
last_payout2017-07-23 16:10:54
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length125
author_reputation2,087,456,656
root_title"Here is a Steem PriceTicker I made with CoinmarketCap API"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id8,681,734
net_rshares0
@yonuts · (edited)
hello, i have the domain steemcoins.com and steemdollars.net but i don't have helpfull purpose yet that benefits the community . Neither am i a programmer, can we maybe work together? Or at least put this ticker at the steemcoins.com or/and steemdollars.net ?
👍  ,
properties (23)
authoryonuts
permlinkre-frankenmint-here-is-a-steem-priceticker-i-made-with-coinmarketcap-api-20160716t091832007z
categorysteemit
json_metadata{"tags":["steemit"]}
created2016-07-16 09:18:30
last_update2016-07-16 09:34:33
depth1
children4
last_payout2016-08-20 00:23:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length259
author_reputation1,817,762,656,977
root_title"Here is a Steem PriceTicker I made with CoinmarketCap API"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id133,135
net_rshares1,431,757,892
author_curate_reward""
vote details (2)
@frankenmint ·
Of course...shoot me a pm through social media channels or elsewhere if you need more help.   Some Quickstart Directions:

[here is a link to the code block](https://gist.githubusercontent.com/Frankenmint/a3ce3dab7eafa57db959236834c52dcc/raw/db2fa2a067cb0dd0d8e723989165bf81a391e14f/priceticker.html) - steemit editing doesn't seem to play nice when I tried to share the code above and in this comment  :(
1. put this code into a new document or on a page...end that page with .html
2.  it works.
👍  ,
properties (23)
authorfrankenmint
permlinkre-yonuts-re-frankenmint-here-is-a-steem-priceticker-i-made-with-coinmarketcap-api-20160716t092431472z
categorysteemit
json_metadata{"tags":["steemit"],"links":["https://gist.githubusercontent.com/Frankenmint/a3ce3dab7eafa57db959236834c52dcc/raw/db2fa2a067cb0dd0d8e723989165bf81a391e14f/priceticker.html"]}
created2016-07-16 09:24:30
last_update2016-07-16 09:24:30
depth2
children3
last_payout2016-08-20 00:23:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length496
author_reputation79,037,816,252
root_title"Here is a Steem PriceTicker I made with CoinmarketCap API"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id133,197
net_rshares1,464,736,050
author_curate_reward""
vote details (2)
@yonuts ·
thank you, but it doesn't work yet. How can i contact you?
properties (22)
authoryonuts
permlinkre-frankenmint-re-yonuts-re-frankenmint-here-is-a-steem-priceticker-i-made-with-coinmarketcap-api-20160716t093409986z
categorysteemit
json_metadata{"tags":["steemit"]}
created2016-07-16 09:34:09
last_update2016-07-16 09:34:09
depth3
children2
last_payout2016-08-20 00:23:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length58
author_reputation1,817,762,656,977
root_title"Here is a Steem PriceTicker I made with CoinmarketCap API"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id133,296
net_rshares0