How is BID and ASK Calculated for crypto currencies? I am trying to create a graph to moniter order data, similar to:

http://www.cryptocoincharts.info/orderbook.php?pair=pc-btc&amp;market=bittrex

I am using the cryptsy api (http://pubapi.cryptsy.com/api.php?method=orderdatav2) to fetch all the order data and for each coins it returns some thing like:

          "price": "395.00000000",
          "quantity": "0.00100000",
          "total": "0.39500000"


The question that I have is, is there any formula or some thing to calculate bid and ask, so that I can plot the graph?

Thanks.
Generally, the ask price displayed by the exchanges is the sell order at the lowest price. Ask is another way of saying sell. So Ask order = Sell order.

The same for bid orders. The bid price is the buy order at the highest price.

Speaking for the result of the below API call:

http://pubapi.cryptsy.com/api.php?method=orderdatav2


The order with lowest price among the "sellorders" is the Ask.

The order with the highest price among the "buyorders" is the Bid.

This is true for any trading pair.

There seems to be pairs where "buyorders" is null. That is either an error on their part or there are no bids for those pairs.