(Javascript) Function not returning expected value

The function below is supposed to return a number(ie: 1.3023123, or 0.0005300). However, The function is not returning anything at all. Ticker[pair] seems to be working, and the console does log the expected value.

function get_coin_price_BTC(coin) {
  var x = "";

  binance.prices(function(ticker) {
    var pair = coin + "btc";
    pair = pair.toUpperCase();


    console.log("Price of " + pair + ": " + ticker[pair]);
    x = ticker[pair];
    console.log("x: " + x);


  });

  return x;
}