You need to create a plugin, then register the variables to the header template. Then in your header template you would inset tags where you want the data to appear.
Maybe something like this: create a new plugin using hook location parse_templates and this code:
PHP Code:
function GetJsonFeed($json_url)
{
$feed = file_get_contents($json_url);
return json_decode($feed, true);
}
$LTC_BTC = GetJsonFeed("https://btc-e.com/api/2/ltc_btc/ticker");
$LTC_USD = GetJsonFeed("https://btc-e.com/api/2/ltc_usd/ticker");
$BTC_USD = GetJsonFeed("https://btc-e.com/api/2/btc_usd/ticker");
vB_Template::preRegister('header', array('LTC_BTC' => $LTC_BTC, 'LTC_USD' => $LTC_USD, 'BTC_USD' => $BTC_USD));
Then in the header template you would use something like
Code:
BTC: {vb:raw BTC_USD.ticker.last}, LTC: {vb:raw LTC_USD.ticker.last}, {vb:raw LTC_BTC.ticker.last} LTC/BTC <br />
Note: this is a very simple implementation. You may not want the plugin to get the feeds every time someone views a page on your site, in which case you'd need to change the code to get the feeds every so often and cache the results.