Alpaca currently only supports opening short positions in easy-to-borrow (“ETB”) securities. Any open short order in a stock that changes from ETB to HTB overnight will be automatically cancelled prior to market open.

Daily stock borrow fees are the fees incurred for all ETB shorts held in your account as of end of day plus any HTB shorts held at any point during the day, calculated as:

Daily stock borrow fee = Daily ETB stock borrow fee + Daily HTB stock borrow fee

Where,

Daily ETB stock borrow fee = (settlement date end of day total ETB short $ market value * that stock’s ETB rate) / 360

And,

Daily HTB stock borrow fee = Σ((each stock’s HTB short $ market value * that stock’s HTB rate) / 360)

Note that if you hold short positions as of a Friday settlement date, you will incur stock borrow fees for 3 days (Fri, Sat, Sun).

Please note that stock borrow fees are charged in the nearest round lot (100 shares) regardless of how many shares were actually shorted. This is because stocks are borrowed in round lots.

Margin & Short Selling - Documentation | Alpaca
Alpaca API lets you build and trade with real-time market data for free.