API

Get Started

WelcomeQuickstartExamplesChangelogSDKs and ToolsOrder Limits

Authorization

POSTCreate personal access token

List Accounts

GETGet accounts

Account Details

GETGet account portfolio v2GETGet history

Instrument Details

GETGet all instrumentsGETGet instrument

Market Data

POSTGet quotesPOSTGet option expirationsPOSTGet option chainGETGet bars v2GETGet bars v2 with aggregation

Order Placement

POSTPreflight single legPOSTPreflight multi legPOSTPlace orderPUTReplace orderPOSTPlace multileg orderGETGet orderDELETECancel order

Option Details

GETGet option greeks
HelpFeedback

Get Started

Placing your first short order

Learn how to open and close a short position with the Public API, including the rules and constraints specific to shorting at Public.

Things to consider when shorting at Public

⚠️ You can’t flip from long to short in a single order

When shorting at Public, you must first have no position in the stock. You can’t go from long to short — or short to long — in a single order.

For example, if you own 100 shares of a stock, you can’t place one order to sell 200 shares and expect to end up short 100. Instead, flatten the position to 0 first (sell 100 shares), then place a second order to open the short (sell another 100). The same applies in reverse: to go long from a short position, cover the short first, then place a separate buy order.

Get your margin account ID

Shorts require a margin account. Retrieve your accounts and pick the one with brokerageAccountType: MARGIN:

curl --request GET \
  --url https://api.public.com/userapigateway/trading/account \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN'

A margin brokerage account in the response looks like this:

{
  "accounts": [
    {
      "accountId": "YOUR_ACCOUNT_ID",
      "accountType": "BROKERAGE",
      "optionsLevel": "LEVEL_2",
      "brokerageAccountType": "MARGIN",
      "tradePermissions": "BUY_AND_SELL"
    }
  ]
}

Check if the stock is shortable

Before placing a short, confirm the symbol is available to borrow using the instrument endpoint. The shortingAvailability field tells you whether the stock can be shorted and at what borrow difficulty:

curl --request GET \
  --url https://api.public.com/userapigateway/marketdata/instruments/AAPL \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN'

A shortable instrument returns a non-null shortingAvailability value — for example, EASY_TO_BORROW. Hard-to-borrow names will surface a rate in hardToBorrowPercentageRate:

{
  "instrument": {
    "symbol": "AAPL",
    "type": "EQUITY"
  },
  "trading": "BUY_AND_SELL",
  "fractionalTrading": "BUY_AND_SELL",
  "optionTrading": "BUY_AND_SELL",
  "optionSpreadTrading": "BUY_AND_SELL",
  "instrumentDetails": null,
  "shortingAvailability": "EASY_TO_BORROW",
  "hardToBorrowPercentageRate": null,
  "optionContractPriceIncrements": {
    "incrementBelow3": "0.01",
    "incrementAbove3": "0.05"
  }
}

Place the short order

Once you’ve confirmed the stock is shortable, you have no existing long position, and you meet buying power and margin requirements, you can open the short. Use orderSide: SELL with openCloseIndicator: OPEN— this tells the API you’re selling with the intent to open a new short position.

Shorts can only be placed in whole shares (quantity). Notional (amount) shorting is not currently supported. If the uptick rule is active for the symbol, you must use a LIMIT order; market orders will be rejected.

curl --request POST \
  --url https://api.public.com/userapigateway/trading/{YOUR_ACCOUNT_ID}/order \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "orderId": "a3f9b2c1-4d8e-4f7a-9b3c-1e2d3f4a5b6c",
    "instrument": {
      "symbol": "AAPL",
      "type": "EQUITY"
    },
    "orderSide": "SELL",
    "orderType": "LIMIT",
    "limitPrice": "150.20",
    "expiration": {
      "timeInForce": "DAY"
    },
    "quantity": "10",
    "openCloseIndicator": "OPEN"
  }'

The response returns the orderId you submitted, confirming the order was accepted:

{
  "orderId": "a3f9b2c1-4d8e-4f7a-9b3c-1e2d3f4a5b6c"
}

Check order status

Use the returned orderId to poll the order status until the short fills:

curl --request GET \
  --url https://api.public.com/userapigateway/trading/{YOUR_ACCOUNT_ID}/order/a3f9b2c1-4d8e-4f7a-9b3c-1e2d3f4a5b6c \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN'

Once filled, the response reflects the open short leg:

{
  "orderId": "a3f9b2c1-4d8e-4f7a-9b3c-1e2d3f4a5b6c",
  "instrument": {
    "symbol": "AAPL",
    "type": "EQUITY"
  },
  "createdAt": "2026-04-24T16:00:00Z",
  "type": "LIMIT",
  "side": "SELL",
  "status": "FILLED",
  "quantity": "10",
  "filledQuantity": "10",
  "averagePrice": "150.22",
  "limitPrice": "150.20",
  "openCloseIndicator": "OPEN",
  "expiration": {
    "timeInForce": "DAY"
  }
}

Close the short position

To exit the short, submit a buy order with openCloseIndicator: CLOSE— you’re buying the shares back to cover the borrow and close the position:

curl --request POST \
  --url https://api.public.com/userapigateway/trading/{YOUR_ACCOUNT_ID}/order \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "orderId": "b4d9c3a2-5e7f-4a8b-8c4d-2f3e4d5b6c7d",
    "instrument": {
      "symbol": "AAPL",
      "type": "EQUITY"
    },
    "orderSide": "BUY",
    "orderType": "MARKET",
    "expiration": {
      "timeInForce": "DAY"
    },
    "quantity": "10",
    "openCloseIndicator": "CLOSE"
  }'

📝 Important Notes

  • Shorts require a MARGIN account. Cash accounts will be rejected.
  • You must have no existing position in the symbol before opening a short. Flatten first, then short.
  • Shorts are placed in whole shares only — notional (amount-based) shorting is not supported.
  • When the uptick rule is active for a symbol, only LIMIT orders are accepted.
  • Always check shortingAvailability on the instrument before submitting — unavailable names will be rejected, and hard-to-borrow names will surface a rate in hardToBorrowPercentageRate.