Bitcoin Forum

Economy => Services => Topic started by: fastminer on October 19, 2014, 01:19:37 AM



Title: coinmarketcap api in word press
Post by: fastminer on October 19, 2014, 01:19:37 AM
i am looking to know how i can add api like the one coinmarketcap uses to wordpress page. i would be happy to pay if someone could teach me how to do this.


Title: Re: coinmarketcap api in word press
Post by: kingscrown on October 19, 2014, 01:30:49 AM
check how we made it on http://exclusivecoin.pw
not exactly same but i assume thats what u want to get


Title: Re: coinmarketcap api in word press
Post by: 9inety7even on October 19, 2014, 01:40:17 AM
Here is an example that uses the coinmarketcap API, updating the price every 5 minutes. You can modify the code to put the text wherever you want, as long as you keep the id.

Save the code as demo.html and open it with your browser to see it in action.

Code:
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script type="text/javascript">
function updatePrice() {
    $.getJSON("http://whateverorigin.org/get?url=" + encodeURIComponent("http://coinmarketcap-nexuist.rhcloud.com/api/btc") + "&callback=?", function(data) {
        $("#BTCPrice").append("<center>BTC: $" + data['contents']['price']['usd'] + "</center>")
    })
}
$(document).ready(setInterval(updatePrice(), 300000))
</script>
<div id="BTCPrice" style="height:40px;margin:auto;position:absolute;top:-20;left:0;bottom:0;right:0" />

My address is 14pZ8o1ASSCC7HqjJPU4UFXq9FrewW5GDc.


Title: Re: coinmarketcap api in word press
Post by: mailsforcyr on January 09, 2018, 10:36:03 AM
is anyone have idea for this request..iam also planing the same..if anyone knows please suggest us


Title: Re: coinmarketcap api in word press
Post by: endlasuresh on January 09, 2018, 10:57:54 AM
Have you checked the wordpress plugins if any exists? I am too wondering to add on my crypto blog. It is good to integrate for such API so readers can find enough information.