Write a function btc2usd
that calculates how much dollars you need to buy X bitcoin at this moment.
A sample asks
part of the orderbook looks like this:
asks = [['1.00000000', '100.00', 1], ['2.00000000', '200.00', 2], ['4.00000000', '400.00', 4], ['8.00000000', '800.00', 8], ['16.00000000', '1600.00', 16]]
// | | |
// amount of btc price per BTC no. of equal orders