Using API v2, you can submit and fill orders during pre-market and after-hours. Full Extended hours trading has specific risks due to the less liquidity. Please read through Alpaca's Extended Hours Trading Risk Disclosure for more details.

Currently, we support full extended hours:

Pre-market: 4:00am - 9:30am ET

After-hours: 4:00pm - 8:00pm ET

For more information please read the Alpaca Docs.

Understand Orders - Documentation | Alpaca
Alpaca API lets you build and trade with real-time market data for free.