Why am I unable to buy stock options close to the expiry?

You can buy stock options close to expiry if you have sufficient margin in your account. The margin required for holding an open position or buying a stock option increases as the contracts are close to expiry. To know more about the margin required details with respect to stock options as they come close to expiry click on this link.