Thanks, that's what I'd wanted to know, plus following:
How does it work with partial match, i.e. when the number of bitcoins you want ask/bid is higher than the matched corresponding bid/ask? Does it continue to try match next corresponding bid/ask?
Yes, if it can find another match, it will continue until either your entire order is filled or there are no longer any matches. In the latter case the rest of your order will remain on the order book until you either remove it or someone else makes an offer that matches it.