Suppose I place a sell order for 1 btc at $45k on your favourite exchange. Next, I place a buy order for 2 btc at 46k, will the exchange execute the trade?
You are creating two different order. You can only create both orders if you have at least 1 BTC + $46*2 in your exchange balance.