how to acccess rate out side any variable
        rates.fromBTC(1, currency, function (err, rate) {     
                return rate;
        })
how to acccess rate out side any variable
        rates.fromBTC(1, currency, function (err, rate) {     
                return rate;
        })
 
    
    var rates = require('./rate.js');
rates.fromBTC(1, currency, function (response) {     
        console.log(response) //you will get rate here
})
//in rate.js file
exports.fromBTC = function(num,currency,callback){
  /*
  do some operation to find rate
  */
  return callback
}
