 <p><code>btc_usd</code> and <code>btsx_btc</code> are promises, not numbers! You cannot simply multiply them - and you <a href="http://stackoverflow.com/q/14220321/1048572">can't make the asynchronous <code>getJSON</code> return a number</a>. Instead, use <a href="http://api.jquery.com/jQuery.when/" rel="nofollow"><code>jQuery.when</code></a> to wait for both values to arrive:</p> <pre><code>getValue = (url) -&gt; $.getJSON url .then (json) -&gt; json.last $(window).load -&gt; btsx_btc = getValue "http://data.bter.com/api/1/ticker/btsx_btc" btsx_btc.done (data) -&gt; $('#v_btsx_btc').html data btc_usd = getValue "http://data.bter.com/api/1/ticker/btc_usd" btc_usd.done (data) -&gt; $('#v_btc_usd').html data $.when btsx_btc, btc_usd .done (data1, data2) -&gt; $('#v_btsx_usd').html data1*data2 </code></pre>