Why am I unable to buy stock options close to the expiry?
You will not be able to enter into new long positions in stock options in the last two days of expiry (i.e. Wednesday and Thursday) since the contracts can become due for physical settlement.
Margin requirements can exponentially increase if your option contracts become due for physical delivery. Since stock options can be illiquid, it becomes difficult to exit the contract and increases the risk for the brokerage firm.
Note: You will be allowed to exit the open short options positions for the quantity you hold.