Bitcoin Forum

Other => Beginners & Help => Topic started by: xaznarrac on August 27, 2014, 02:49:30 AM



Title: How to get info from a ticker API like BTC-e?
Post by: xaznarrac on August 27, 2014, 02:49:30 AM
I want to make a web app with the info from

https://btc-e.com/api/2/ltc_usd/ticker

But I don't know how to get individual arrays.

Can anyone with experience please help me?


Title: Re: How to get info from a ticker API like BTC-e?
Post by: xaznarrac on August 27, 2014, 02:57:12 AM
Code:
<!DOCTYPE html>
<html>
<head>
<title>jQuery Data</title>
<script src="https://code.jquery.com/jquery-1.11.1.min.js"></script>

<script>

$(document).ready(function() {

$.getJSON('https://btc-e.com/api/2/ltc_usd/ticker', function(ticker) {

document.write(ticker.avg);

});

});

</script>

</head>
<body>



</body>

</html>

Here's a test of what I have.


Title: Re: How to get info from a ticker API like BTC-e?
Post by: catena5260 on August 27, 2014, 08:30:16 AM
There are lots of examples in the API documentation page:


https://btc-e.com/api/documentation

Just use them as inspiration.

If you planning to use other language, at least you know what you must look for


Title: Re: How to get info from a ticker API like BTC-e?
Post by: FeelTheBeat on August 27, 2014, 11:57:33 AM
No matter what language you will use, you will always need JSON parser. You can also parse it manually but it is not recommended cause it will take you more time than you want to use for such an easy job.


Title: Re: How to get info from a ticker API like BTC-e?
Post by: noel57 on August 28, 2014, 01:07:45 PM
Check out this link https://btc-e.com/api/documentation i believe its the answer you want.