Author

Topic: [HTML] Altcoin Ticker for your Website (Read 1382 times)

full member
Activity: 161
Merit: 100
January 08, 2014, 02:11:30 AM
#6
I'd like to have a simple HTML page, that I can click on, from my desktop, that displays Litecoin, Devcoin, Infinitecoin, Dogecoin, and Lottocoin USD values, based on whatever mathematical calculation is needed, to convert from coin:BTC value.

It can be displayed in single column form like:

LTC = $24.75 USD
DVC = $0.00024 USD
IFC = $0.000086 USD
Etc.

I want it to update every 5 sec. and Email me, when the values reach specified "goal values", to inform me the date/time when the coin(s) reached those values.  Naturally, I don't want it Emailing me more than once, when they reaches a given value.

I will gladly offer 1,500 Doge or more (if necessary) for this (this is the only coin I'm mining currently).  Name your price and I'll let you know if I can do it.  If trust is an issue, I will gladly send four individual payments of 25%, for four progressive progress pages.  As a born-again Christian, I believe that integrity and honesty are top priority!

Thank you for your time.
legendary
Activity: 1124
Merit: 1013
ParalleCoin's ruler from the shadow
September 06, 2013, 08:49:41 PM
#5
I have tried something right now and succeed!!! Cheesy

Code:

$c 
curl_init();
curl_setopt($cCURLOPT_RETURNTRANSFER1);
curl_setopt($cCURLOPT_HTTPHEADER, array('Accept: application/json''Content-Type: application/json'));
curl_setopt($cCURLOPT_URL'http://pubapi.cryptsy.com/api.php?method=singlemarketdata&marketid=10');

$avg curl_exec($c);
curl_close($c);

$obj json_decode($avg);

?>



last trade price : echo print_r($obj->{'return'}->{'markets'}->{'BQC'}->{'lasttradeprice'}."\n"true);?>


volume : echo print_r($obj->{'return'}->{'markets'}->{'BQC'}->{'volume'}."\n"true);?>


last trade time : echo print_r($obj->{'return'}->{'markets'}->{'BQC'}->{'lasttradetime'}."\n"true);?>

legendary
Activity: 1124
Merit: 1013
ParalleCoin's ruler from the shadow
September 06, 2013, 08:38:09 PM
#4
Same here Smiley
I forget that I have code of ticker for bter.  Embarrassed
I have managed to display bter api before using some mtgox ticker I found  but with cryptsy api did not have luck and did not found some solution.
sr. member
Activity: 308
Merit: 250
verified ✔
September 06, 2013, 08:02:05 PM
#3
This is great!!!

Thank you! Cheesy

Can you make it for the Cryptsy api also?

NO


I thought i could do it but wasted some Time with trying, with bter it just worked, with cryptsy and coins-e
i had serious Problems.
Will try to, but first i must learn JSON or ask around
legendary
Activity: 1124
Merit: 1013
ParalleCoin's ruler from the shadow
September 06, 2013, 07:45:40 PM
#2
This is great!!!

Thank you! Cheesy

Can you make it for the Cryptsy api also?
sr. member
Activity: 308
Merit: 250
verified ✔
September 06, 2013, 07:34:08 PM
#1
Want a Ticker for your favorite Alt Coin ?

it's using the bter.com API

EXP: http://butbut.allalla.com/ftt/assets/img/bter.php


For your prefered Coin just change the Coin Letters in the bter URL

http://bter.com/api/1/ticker/red_ltc
http://bter.com/api/1/ticker/ltc_btc


http://bter.com/api#ticker


Code:

$c 
curl_init();
curl_setopt($cCURLOPT_RETURNTRANSFER1);
curl_setopt($cCURLOPT_HTTPHEADER, array('Accept: application/json''Content-Type: application/json'));
curl_setopt($cCURLOPT_URL'http://bter.com/api/1/ticker/red_ltc');

$avg curl_exec($c);
curl_close($c);

$obj json_decode($avg);


?>


RED/LTC


avg   echo print_r($obj->{'avg'}."\n"true);?>


last echo print_r($obj->{'last'}."\n"true);?>


buy  echo print_r($obj->{'sell'}."\n"true);?>


sell echo print_r($obj->{'buy'}."\n"true);?>





The Code and JSON makes absolutely no sense to me but it's working.
If someone knows how to do this with Cryptsy, please let me know, it would be a lot better,
and you are invited to post better Versions.
Jump to: