how can i get data from GDAX Bitfinex using API and show like bottom how can i get and show below link data, can someone please help me 

https://runcoders.com/live-bitcoin/

i am trying by this but failed to show like up link 

&lt;?php
//define API endpoint
$url = "https://api.gdax.com/products/BTC-USD/stats";

//fetch the url and convert the JSON into an associative array
$fgc = json_decode(file_get_contents($url), true);

//assign values to variables
$open = $fgc["open"];
$high = $fgc["high"];
$low = $fgc["low"];
$close = $fgc["close"];
?&gt;
&lt;html&gt;
&lt;h1&gt;My Website&lt;/h1&gt;
&lt;p&gt;Bitcoin 24 HR stats&lt;/p&gt;
Open: $&lt;?php echo $open; ?&gt;&lt;br&gt;
High: $&lt;?php echo $high; ?&gt;&lt;br&gt;
Low: $&lt;?php echo $low; ?&gt;&lt;br&gt;
Close: $&lt;?php echo $close; ?&gt;&lt;br&gt;
&lt;/html&gt;
They are just using websocket to connect to the exchange and then outputting the lives trades to the page by appending it to an element. 

Here's a simple example using bitfinex:

&lt;html&gt;
&lt;div id="btc"&gt;&lt;/div&gt;
&lt;script&gt;
var ws = new WebSocket("wss://api2.bitfinex.com:3000/ws");
ws.onopen = function(){
  ws.send(JSON.stringify({"event":"subscribe", "channel":"ticker", "pair":"BTCUSD"}))
};
ws.onmessage = function(msg){
  var response = JSON.parse(msg.data);
  var hb = response[1];
  if(hb != "hb"){
    document.getElementById("btc").innerHTML = "$" + response[7];
  }
};
&lt;/script&gt;
&lt;/html&gt;