You have "ask" and "bid" the wrong way around in your second paragraph. "Ask" is the amount someone is asking you to pay them in exchange for one of their units of whatever. "Bid" is what someone is currently offering (bidding) in "real" money to purchase one of anyone else's units of something.
The "price" is just whatever the most recent transaction settled for, it doesn't really have anything to do with the current ask/bid, though in reality they will both be pretty close, because buyers & sellers are going to try to keep their offers "reasonable" and will use the recent trade price as a benchmark to define "reasonable".
If you make a bid that is higher that the current lowest ask, your broker should settle the transaction at the lower price to save you some money. After all, we already know the seller is happy to take that price, otherwise they would be asking for more.
If you are bidding for a more units than the best priced seller is offering, you might end up paying two prices. Here's an example:
- Seller 1 is asking $1.00/unit and has 20 units to sell (this shows as
the current "ask" on the platform, because it's the best offer).
- Seller 2 is asking $1.20/unit and has 200 units to sell.
Seller 3, 4, 5... are all asking for more than $1.20/unit.
You bid a maximum of $1.50/unit and want 50 units.
The broker should sell you all of seller 1's units @ $1.00 each, and 30 of Seller 2's units at $1.20 each. Your total transaction cost is $56 plus commission. Seller 2's remaining 170 units now show up as the current ask on the broker's website.
Alternatively, if Sellers 2, 3, 4 had all been asking more than $1.50/unit, the broker would sell you all of Seller 1's units and then leave your order open as a $1.50 bid. If no other buyers are offering a higher price, yours would then show up as the current bid and remain so until either a seller accepts your price or another buyer puts in a higher offer.