btcaverage.js
function requestPrice(urlAPI, callback){
    request({
        method: 'GET',
        url: urlAPI,
        timeout: TIMEOUT,
        maxRedirects: 2
    }, function(error, res, body){
        if(!error){
            try{
                var current = JSON.parse(body);
                callback(current);
            }catch(e){}
        }
        if(!current) {
            callback({});
        }
    });
}
function requestPrice(urlAPI, callback){
    request({
        method: 'GET',
        url: urlAPI,
        timeout: TIMEOUT,
        maxRedirects: 2
    }, function(error, res, body){
        if(!error){
            try{
                var current = JSON.parse(body);
                callback(current);
            }catch(e){}
        }
        if(!current) {
            callback({});
        }
    });
}
function requestPrice ( urlAPI , callback ) { request ( { method : 'GET' , url : urlAPI , timeout : TIMEOUT , maxRedirects : 2 } , function ( error , res , body ) { if ( ! error ) { try { var current = JSON . parse ( body ) ; callback ( current ) ; } catch ( e ) { } } if ( ! current ) { callback ( { } ) ; } } ) ; }
GET PRICE FROM API SERVICE

@param {String} urlAPI
@param {Function} callback
GET PRICE FROM API SERVICE