HTB for Broker API
Hard-to-Borrow (HTB) Locates on Broker API lets your customers short US equities that are not on Alpaca’s Easy-to-Borrow (ETB) list. For an HTB name, request a quote, then create a locate. Alpaca returns that locate as active or rejected on the create response. If the locate is active, submit a sell order up to the located quantity.
General knowledge points
- Easy-to-borrow (ETB) securities are securities Alpaca has determined to be generally easy to borrow for short sale facilitation.
- Hard-to-borrow (HTB) securities are limited because of existing short-selling demand, market events, security-specific constraints, or limited inventory availability.
- Short selling is available only on eligible margin accounts. Cash accounts and accounts limited to 1x buying power cannot open short positions. This is the same rule as short selling today.
- Alpaca classifies each US equity as ETB or HTB. To check the classification, read
borrow_statusfrom the Broker API assets endpoint (GET /v1/assets/{symbol}). - When a security is on the ETB list, Alpaca approves the short immediately. HTB names require an active locate on that account for that symbol before Alpaca approves a new short.
- Locate quantity must be requested in round lots of 100 shares. An active locate expires at 8:00 PM ET on the locate trading day. Any unused quantity is not carried over to the next day.
- The locate fee is charged when the locate is accepted and is separate from the daily stock borrow fee. Any unused locate quantity after shorting is not refunded.
- The daily stock borrow fee uses the trade-date short quantity still open at the end of the trading day, rounded up to a multiple of 100 shares.
- Holding an open HTB short does not require a new locate each day. Adding size, or closing and reopening the short, currently requires an additional locate approval.
- Currently, locates are not reusable after the short is covered. To short the same security again, a new locate must be requested and approved.
- There is no guarantee that inventory will be available for any symbol or quantity. Availability and fees move with market supply and demand.
Roles and responsibilities
| Task | Alpaca | Partner |
|---|---|---|
| Enable Locates for your correspondent | Performs | Request through your Alpaca contact |
| Provision customer accounts that can short | Provides Broker API account and trading configuration | Create and maintain eligible margin accounts for customers who will short |
| Obtain and retain customer consent and disclosures required for short selling in your markets | Not applicable | Must present and retain per your obligations |
| Quote locate availability and price, reject locates, and enforce remaining locate quantity on short orders | Performs | Call Broker API endpoints in the order below |
| Book locate fees and daily HTB borrow fees per your account structure | Performs | Reconcile fees and positions for your customers |
| Cover street borrow after a short fill | Performs | Monitor positions and customer communications |
Prerequisites
Complete these steps before you call the Broker API locate endpoints:
- Ask your Alpaca contact to enable HTB Locates for your correspondent. Until enablement is complete, locate endpoints return HTTP 403 with the message "Broker API locates are not enabled for this correspondent".
- Confirm that each eligible customer has a Broker API trading account that allows shorting. Verify that
shorting_enabledis enabled on the trading account and that the account is not limited to 1x buying power. - Confirm that the required customer agreements for margin and short selling are in place for that account under your Alpaca agreement and local requirements. Work with your Alpaca contact on the agreement set for your model (Fully Disclosed or OmniSub).
- Verify that your integration can authenticate to Broker API and call trading endpoints for the customer's
account_id. - Use Broker API sandbox to test a quote, locates, and a sell order with no long position, up to the located quantity. Your Alpaca contact enables HTB Locates for the sandbox correspondent before those calls succeed.
API information
| Call | Use |
|---|---|
GET /v1/trading/accounts/{account_id}/account | Confirm the account can short (Step 1) |
GET /v1/assets/{symbol} | Read borrow_status (Step 2) |
GET /v1/trading/accounts/{account_id}/locates/quotes | Preview availability and the locate fee (Step 3) |
POST /v1/trading/accounts/{account_id}/locates | Request the locate (Step 4) |
GET /v1/trading/accounts/{account_id}/locates | List locates (Step 5) |
GET /v1/trading/accounts/{account_id}/locates/{locate_id} | Retrieve one locate (Step 5) |
Step 1: Confirm the account can short
Endpoint: GET /v1/trading/accounts/{account_id}/account
Purpose: Confirm the customer account is short-enabled and has buying power for locate fees and the short.
Key Considerations:
shorting_enabledmust be set totruebefore you can request a locate.- Locate approval checks buying power for the locate fee.
Request Example:
curl --location 'https://broker-api.sandbox.alpaca.markets/v1/trading/accounts/{account_id}/account' \
--header 'Authorization: Basic <your-credentials>'
Step 2: Check borrow status
Endpoint: GET /v1/assets/{symbol}
Purpose: Determine whether the symbol is ETB or HTB before you request a locate.
Key Considerations:
borrow_statusofeasy_to_borrow: skip Steps 3 through 5. Submit a sell order (Step 6) if the account may short.borrow_statusofhard_to_borrow: continue with locate quote and create.- Create locate returns an HTTP 422 error with code
easy_to_borrowfor ETB symbols, and no locate is created. Do not call create locate for ETB names.
Request Example:
curl --location 'https://broker-api.sandbox.alpaca.markets/v1/assets/{symbol}' \
--header 'Authorization: Basic <your-credentials>'
Response Example:
{
"id": "{asset_id}",
"class": "us_equity",
"symbol": "{symbol}",
"status": "active",
"tradable": true,
"shortable": false,
"borrow_status": "hard_to_borrow"
}Step 3: Preview locate quote
Endpoint: GET /v1/trading/accounts/{account_id}/locates/quotes?symbols={symbols}
Purpose: Preview account-specific availability and locate fee per share. Quotes are informational and do not reserve inventory.
Key Considerations:
priceis the locate fee per share for that quote snapshot, not the equity trade price.- Repeating a quote request returns a fresh snapshot. It does not request a locate.
- A
quotewithavailable_qtyof 0 means you should not expect an approved locate for that quantity at that moment due to inventory unavailability.priceis omitted when no quantity is available. symbolsis a query parameter where you pass one symbol, or several separated by commas. The request accepts up to 100 unique symbols.
Request Example:
curl --location 'https://broker-api.sandbox.alpaca.markets/v1/trading/accounts/{account_id}/locates/quotes?symbols={symbol}' \
--header 'Authorization: Basic <your-credentials>'
Response Example:
{
"quotes": [
{
"symbol": "{symbol}",
"available_qty": 1000,
"price": "0.0123",
"quoted_at": "2026-01-02T15:04:05Z"
}
]
}
Step 4: Create a locate
Endpoint: POST /v1/trading/accounts/{account_id}/locates
Purpose: Request a locate for an HTB symbol.
Key Considerations:
- Send an
Idempotency-Keyheader on each create call. The same key with the same body returns the original locate. The same key with a different body returns HTTP 422 with codeidempotency_key_conflict. Note: This is for deduping purposes. - Use a new UUIDv4 or UUIDv7 (36 characters, including hyphens) for each create call.
- When Alpaca approves a locate, the locate fee is charged even if the customer never shorts and it is not refundable.
- Threshold securities and ETB symbols are available to short immediately. Both return an HTTP 422 error, with code
threshold_securityoreasy_to_borrow. - If inventory is unavailable or the fee is above the
limit_price, Alpaca returns HTTP 201 with the locate instatusrejected. A request for an ETB symbol, a threshold symbol, or an account without enough buying power for the fee returns an HTTP 422 error and no locate is approved.
Request Example:
curl --location 'https://broker-api.sandbox.alpaca.markets/v1/trading/accounts/{account_id}/locates' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic <your-credentials>' \
--header 'Idempotency-Key: 018f3c2e-7b1a-7c3d-9e2f-123456789abc' \
--data '{
"symbol": "{symbol}",
"qty": 100,
"limit_price": "0.05",
"all_or_none": true
}'
Request Fields:
| Field | Required | Description |
|---|---|---|
symbol | Yes | US equity symbol |
qty | Yes | # of shares requested for a locate and it must be in positive round lot(s) of 100 |
limit_price | No | Maximum locate fee per share in USD. If omitted, any quoted fee may be accepted. |
all_or_none | No | When true, Alpaca rejects the locate unless the full quantity is available. When false or omitted, Alpaca can return a partial locate in lots of 100. |
Response Example:
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"symbol": "{symbol}",
"requested_qty": 100,
"limit_price": "0.05",
"all_or_none": true,
"status": "active",
"created_at": "2026-01-02T15:04:05Z",
"located_qty": 100,
"located_price": "0.0123",
"total_fee": "1.23",
"expires_at": "2026-01-03T01:00:00Z"
}Rejected Response Example:
{
"id": "550e8400-e29b-41d4-a716-446655440001",
"symbol": "{symbol}",
"requested_qty": 100,
"status": "rejected",
"rejection_reason": "inventory_unavailable",
"created_at": "2026-01-02T15:04:05Z"
}
Locate Status Values:
| Field | Description |
|---|---|
active | Locate is approved. Remaining quantity may be used for short orders until expiry |
rejected | Locate not granted. See
|
expired | Locate is past expires_at and cannot be used for new shorts |
Step 5: List or retrieve locates
Endpoint: GET /v1/trading/accounts/{account_id}/locates
Purpose: Monitor active locates and reconcile history.
Key Considerations:
- Use
status,symbol, anddatefilters when reconciling active locate quantity against short orders. - Retrieve one locate with
GET /v1/trading/accounts/{account_id}/locates/{locate_id}when you have thelocate_idfrom the create response. - Results are sorted by
created_at, newest first.
Request Example:
curl --location 'https://broker-api.sandbox.alpaca.markets/v1/trading/accounts/{account_id}/locates?status=active&symbol={symbol}' \
--header 'Authorization: Basic <your-credentials>'
Retrieve One Locate:
curl --location 'https://broker-api.sandbox.alpaca.markets/v1/trading/accounts/{account_id}/locates/{locate_id}' \
--header 'Authorization: Basic <your-credentials>'
Query Parameters:
status(optional):active,expired, orrejectedsymbol(optional)start(optional): inclusive locate trading date inYYYY-MM-DDend(optional): exclusive locate trading date inYYYY-MM-DD. Locate trading dates useAmerica/New_Yorkand expire at 8:00 PM ETlimit/page_token(optional): pagination
Response Example:
{
"locates": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"symbol": "{symbol}",
"requested_qty": 100,
"limit_price": "0.05",
"all_or_none": true,
"status": "active",
"created_at": "2026-01-02T15:04:05Z",
"located_qty": 100,
"located_price": "0.0123",
"total_fee": "1.23",
"expires_at": "2026-01-03T01:00:00Z"
}
],
"next_page_token": "{value_to_send_to_continue_paging}"
}
Step 6: Submit the short sale order
Endpoint: POST /v1/trading/accounts/{account_id}/orders
Purpose: Open the short using remaining active locate quantity for that account and symbol.
Key Considerations:
- Send
sideassell. The Broker API does not acceptsell_short. When the account is flat in that symbol, or already short, Alpaca treats the sell as opening or increasing the short and checks it against the remaining active locate quantity. When the account is long that symbol, a sell reduces the long. This guide covers the opening short, which is the flat or already-short case. - HTB short orders must use
time_in_forceofday. - Order quantity must not exceed remaining active locate quantity for that account and symbol. Orders above the remaining quantity are rejected.
- One order may consume quantity from more than one active locate. Later orders may use the remainder until expiry.
- For ETB names, omit the locate steps and submit the sell order when the account may short.
Request Example:
curl --location 'https://broker-api.sandbox.alpaca.markets/v1/trading/accounts/{account_id}/orders' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic <your-credentials>' \
--data '{
"symbol": "{symbol}",
"qty": "100",
"side": "sell",
"type": "market",
"time_in_force": "day"
}'
Step 7: Reconcile fees and positions (ongoing)
Purpose: After a locate is approved by Alpaca and after HTB shorts remain open, reconcile fee and position activity for your customers.
Key Considerations:
- Locate fee: Alpaca posts this when the locate becomes active. On account activities the row has
activity_type=FEEandactivity_sub_typeofLOC. The amount is the locatetotal_fee. Alpaca does not refund it if the quantity goes unused. - Daily HTB borrow fee: Alpaca posts this for the trade-date short quantity still open at the end of the trading day, rounded up to a multiple of 100 shares. On account activities the row has
activity_typeofFEEandactivity_sub_typeofHTB. The description has the form{date} HTB Borrow Fee - {symbol} (short qty: N, charged qty: N, rate: R). An ETB name is not charged this fee while it remains ETB. - Where the fee posts: On Fully Disclosed, both fees will post directly to the customer account. On OmniSub, both fees post to the sub-account.
- Currently, closing a short does not restore the locate quantity. A new short in that symbol needs a new locate if the earlier locate expired or has no quantity left.
Locate Errors:
An HTTP 400 or HTTP 422 response does not grant locate approval. An HTTP 201 response creates a locate row, including when status is rejected.
| Condition | Result |
|---|---|
| Request body cannot be parsed | HTTP 400 error invalid_request_body. |
limit_price is not a decimal string | HTTP 400 error invalid_limit_price. |
Symbol, quantity, limit_price, or idempotency key is invalid | HTTP 400 error invalid_input. |
The symbols query is empty, contains an empty value, or lists more than 100 unique symbols | HTTP 400 error invalid_symbols. |
| Symbol is easy to borrow | HTTP 422 error easy_to_borrow. The quote returns HTTP 200 with code easy_to_borrow in errors. |
| Symbol is on the threshold list | HTTP 422 error threshold_security. The quote returns HTTP 200 with code threshold_security in errors. |
| Symbol is not found | HTTP 422 error symbol_not_found. The quote returns HTTP 200 with code symbol_not_found in errors. |
| Security has no CUSIP | HTTP 422 error security_not_found. |
| Buying power does not cover the locate fee | HTTP 422 error insufficient_buying_power. |
| The same idempotency key is sent with a different body | HTTP 422 error idempotency_key_conflict. |
| No closing price is available for the symbol | HTTP 422 error quote_unavailable. The quote returns HTTP 200 with code quote_unavailable in errors. |
| Symbol cannot be quoted because of a corporate action | The quote returns HTTP 200 with code corporate_action in errors. The message is "symbol cannot be quoted due to a corporate action". Create returns HTTP 422 error symbol_not_found. |
| Inventory cannot cover the requested quantity, including an all-or-none request that cannot be filled in full | HTTP 201 with status rejected and rejection_reason inventory_unavailable. |
The locate fee is above limit_price | HTTP 201 with status rejected and rejection_reason price_above_limit. |
Important notes
-
Ask your Alpaca contact to enable locates for your Broker API correspondent and arrange sandbox access before you use locates.
-
Use the inventory reserved by an Alpaca-approved locate for that account before the locate expires at 8:00 PM ET.
-
Tell the customer the fee per share before you create a locate. We charge that fee when the locate becomes active, and we do not refund it if the customer never sends the short or closes it the same day.
-
Account for unused locate quantity expiring at 8:00 PM ET and daily borrow fees applying while an HTB short stays open.
-
Send a new
Idempotency-Keyon each create call. A retry of that same call can reuse the key. -
In the Broker API sandbox, run a quote, a create, a list, and a short fill before production. Confirm a short-enabled test account and hard-to-borrow test symbols with your Alpaca contact. Our team also recommends testing the complete E2E flow including both happy and unhappy paths.
Short selling involves significant risks and may result in losses exceeding the initial investment. Losses from short selling are potentially unlimited because the price of a security can continue to rise. Short selling is subject to securities borrowing availability, applicable margin requirements, and associated fees.
Hard-to-borrow (HTB) securities may be subject to additional locate fees and daily stock borrow fees. Locate fees are charged when a locate is approved and are nonrefundable, even if the shares are not subsequently shorted. Daily stock borrow fees are separate from locate fees and apply while an HTB short position remains open. Borrowing availability and applicable fees may fluctuate based on market conditions. Approval of a locate does not guarantee execution of a short sale. For additional information on applicable charges, please refer to Alpaca's Broker API Fee Schedule.Margin trading involves significant risk and is not suitable for all investors. Before considering a margin loan, it is crucial that you carefully consider how borrowing fits with your investment objectives and risk tolerance. When trading on margin, you assume higher market risk, and potential losses can exceed the collateral value in your account. Alpaca may sell any securities in your account, without prior notice, to satisfy a margin call. Alpaca may also change its “house” maintenance margin requirements at any time without advance written notice. You are not entitled to an extension of time on a margin call. Please review the Firm’s Margin Disclosure Statement before investing.
Securities brokerage services are provided by Alpaca Securities LLC (dba "Alpaca Clearing"), member FINRA/SIPC, a wholly-owned subsidiary of AlpacaDB, Inc. Technology and services are offered by AlpacaDB, Inc.
-
This is not an offer, solicitation of an offer, or advice to buy or sell securities or open a brokerage account in any jurisdiction where Alpaca Securities is not registered or licensed, as applicable.
Updated 38 minutes ago