The deposit of cash you place down is for the full price of your limit order, before it gets matched against any other trades. The orderbook is not considered at all when the deposit is placed. You must have the full funds to place an order, even if it will fill at a cheaper price. I have too much cash for this to work, but if you try this the system will reject your order, even if when it’s actually executed you DO have enough money.
Notice how after the order executes, my cash balance raises slightly. That’s the remainder being refunded to my account.
My account balance goes from 501,790 to 502,090. A difference of 300NCC, which given this situation, is the result of 30 units overpaid by 10NCC\ea.
This 300ncc difference exists somewhere in the “materials purchased vs. refund of deposit” ledger lines. One is for 18,750, one is for 19,050. Could it be delineated as it’s own item? I guess but it’s not that important.