Bitcoin Forum
June 25, 2024, 11:36:23 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How to get info from a ticker API like BTC-e?  (Read 1068 times)
xaznarrac (OP)
Member
**
Offline Offline

Activity: 70
Merit: 10


View Profile
August 27, 2014, 02:49:30 AM
 #1

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?

Cryptocurrencyboard.com Dedicated to helping cryptocurrency newcomers.
xaznarrac (OP)
Member
**
Offline Offline

Activity: 70
Merit: 10


View Profile
August 27, 2014, 02:57:12 AM
 #2

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.

Cryptocurrencyboard.com Dedicated to helping cryptocurrency newcomers.
catena5260
Sr. Member
****
Offline Offline

Activity: 476
Merit: 501


View Profile
August 27, 2014, 08:30:16 AM
 #3

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
FeelTheBeat
Hero Member
*****
Offline Offline

Activity: 700
Merit: 500



View Profile
August 27, 2014, 11:57:33 AM
 #4

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.


▄▄▄███████▄▄▄
▄▄█████▀▀''`▀▀█████▄▄
▄███P'            `YY██▄
▄██P'                  `Y██▄
███'                      `███
███'                         ███
▄██'   ▄█████▄▄  ,▄▄▄▄▄▄▄▄▄▄p   ███
▄██▀  ,████▀P▀███.`██████████P   ▀██▄
███[ ,████ __. ███.   ,▄████▀    ███
███[ ]████████████[  ▄████▀       ███
███[ `████   ,oo2 ▄████▀'       ,███
▀██▄  `████▄▄█████d███████████   ▄██▀
▀██.   `▀▀▀▀▀▀"  Y▀▀▀▀▀▀▀▀▀▀▀  ,██▀
███.                        ,███
▀██▄                      ▄██▀
▀███▄_                 ,███▀
▀███▄▄_          _▄▄███▀
▀▀████▄▄ooo▄▄█████▀
▀▀███████▀▀'

365

TM

EZ365 is a digital ecosystem that combines
the best aspects of online gaming, cryptocurrency
trading
and blockchain education. ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

..WHITEPAPER..    ..INVESTOR PITCH..

.Telegram     Twitter   Facebook

                       .'M████▀▀██  ██
                      W█Ws'V██  ██▄▄███▀▀█
                     i█████m.~M████▀▀██  ███
                     d███████Ws'V██  ██████
                     ****M██████m.~███f~~__mW█
          ██▀▀▀████████=  Y██▀▀██W ,gm███████
      g█████▄▄▄██   █A~`_WW Y█  ██!,████████
   g▀▀▀███   ████▀▀`_m████i!████P W███  ██
 _███▄▄▄██▀▀▀███Af`_m███   █W ███A ]███  ██
__ ~~~▀▀▀▀▄▄▄█*f_m██████   ██i!██!i███████
Y█████▄▄▄▄__. i██▀▀▀██████████ █!,██████
 8█  █▀▀█████.!██   ██████████i! █████
 '█  █  █   █W M█▄▄▄██████   ██ !██
  !███▄▄█   ██i'██████████   ██
   Y███████████.]██████████████
   █   ███████b ███   ██████
   Y   █   █▀▀█i!██   ████
    V███   █  █W Y█████
      ~~▀███▄▄▄█['███
            ~~*██

Play

            │
    │      ███
    │      ███
    │      ███
    │   │  ███
   ███  │  ███
   ███ ███ ███
 │  ███ ███ ███
███ ███ ███ ███
███ ███  │   │
███ ███  │   │
 │   │
 │

Trade

           __▄▄████▄▄
     __▄▄███████████████▄▄▄
 _▄▄█████████▀▀~`,▄████████████▄▄▄
 ~▀▀████▀▀~`,_▄▄███████████████▀▀▀
   d█~  =▀███████████████▀▀
   ]█! m▄▄ '~▀▀▀████▀▀~~ ,_▄▄
  ,W█. *████▄▄__ '  __▄▄█████
  !██P  █████████████████████
   W█. - ██████████████████▀
  i██[   ~ ▀▀█████████▀▀▀
 g███!
Y███

Learn
noel57
Sr. Member
****
Offline Offline

Activity: 392
Merit: 250



View Profile
August 28, 2014, 01:07:45 PM
 #5

Check out this link https://btc-e.com/api/documentation i believe its the answer you want.

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!