Bitcoin Forum

Bitcoin => Project Development => Topic started by: bram_vnl on September 12, 2016, 09:44:03 AM



Title: Price chart script
Post by: bram_vnl on September 12, 2016, 09:44:03 AM
I'm looking for a simpel script to show the charts on my website from a altcoin

example
http://media.coindesk.com/uploads/2013/08/litecoinusd.png


Title: Re: Price chart script
Post by: jacktheking on September 12, 2016, 09:46:23 AM
Where do you want your website to fetch the data from? A altcoin trading platform? And does they accept API?


Title: Re: Price chart script
Post by: bram_vnl on September 12, 2016, 09:50:09 AM
Where do you want your website to fetch the data from? A altcoin trading platform? And does they accept API?

From bittrex to chart, just for the information


Title: Re: Price chart script
Post by: mocacinno on September 12, 2016, 09:52:10 AM
IIRC, i've helped you over PM a long time ago to fetch the data from the NLG-BTC api's of bleutrade.com, bittrex.com and litebit.eu. I've searched my PM archive, and here's the code:

Code:
<?php
$url 
'https://www.litebit.eu/requests/jsonp.php?call=nlg';
$response file_get_contents($url);
$obj json_decode($responsetrue);
echo 
'sell : '$obj['sell'] . '<br>';
?>


Code:
<?php
$url 
'https://bleutrade.com/api/v2/public/getticker?market=NLG_BTC';
$response file_get_contents($url);
$obj json_decode($responsetrue);
echo 
'ask : '$obj['result'][0]['Ask'] . '<br>';
?>


Code:
<?php
$url 
'https://bittrex.com/api/v1.1/public/getmarketsummary?market=btc-nlg';
$response file_get_contents($url);
$obj json_decode($responsetrue);
echo 
'Bid : '$obj['result'][0]['Bid'] . '<br>';
?>


You'll need to save this data (or any other data you can fetch from an api) in your database instead of showing it on your screen, and use one of the open source tools to make a graph...


Title: Re: Price chart script
Post by: bram_vnl on September 12, 2016, 09:53:53 AM
IIRC, i've helped you over PM a long time ago to fetch the data from the NLG-BTC api's of bleutrade.com, bittrex.com and litebit.eu. I've searched my PM archive, and here's the code:

Code:
<?php
$url 
'https://www.litebit.eu/requests/jsonp.php?call=nlg';
$response file_get_contents($url);
$obj json_decode($responsetrue);
echo 
'sell : '$obj['sell'] . '<br>';
?>


Code:
<?php
$url 
'https://bleutrade.com/api/v2/public/getticker?market=NLG_BTC';
$response file_get_contents($url);
$obj json_decode($responsetrue);
echo 
'ask : '$obj['result'][0]['Ask'] . '<br>';
?>


Code:
<?php
$url 
'https://bittrex.com/api/v1.1/public/getmarketsummary?market=btc-nlg';
$response file_get_contents($url);
$obj json_decode($responsetrue);
echo 
'Bid : '$obj['result'][0]['Bid'] . '<br>';
?>


You'll need to save this data in your database, and use one of the open source tools to make a graph...

Yes I have your scripts on my website, oke i will look for it


Title: Re: Price chart script
Post by: mocacinno on September 12, 2016, 09:55:18 AM
Yes I have your scripts on my website, oke i will look for it

I don't really have loads of time at the moment (so i cannot write the complete script for you at the moment), but if you need help to get started, you can always PM me (in dutch if you want to)


Title: Re: Price chart script
Post by: bram_vnl on September 12, 2016, 09:57:26 AM
Yes I have your scripts on my website, oke i will look for it

I don't really have loads of time at the moment (so i cannot write the complete script for you at the moment), but if you need help to get started, you can always PM me (in dutch if you want to)

That will be awesome, first i will make a script to test if it is not oke, i will pm