API

Get Started

WelcomeQuickstartGuidesChangelogSDKs 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 greeksPOSTGet strategy quote
HelpFeedback

Account Details

Get account balance

Retrieve your account portfolio including buying power, positions, and equity breakdown.

Get your account ID

First, retrieve your account ID using the accounts endpoint:

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

This returns your available accounts with their IDs:

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

Get account portfolio details

curl --request GET \
  --url https://api.public.com/userapigateway/trading/{YOUR_ACCOUNT_ID}/portfolio/v2 \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN'

The response includes your account balance and portfolio details:

{
  "accountId": "YOUR_ACCOUNT_ID",
  "accountType": "BROKERAGE",
  "buyingPower": {
    "cashOnlyBuyingPower": "5000.00",
    "buyingPower": "10000.00",
    "optionsBuyingPower": "10000.00"
  },
  "equity": [
    {
      "type": "CASH",
      "value": "2500.00",
      "percentageOfPortfolio": "25.00"
    },
    {
      "type": "STOCK",
      "value": "7500.00",
      "percentageOfPortfolio": "75.00"
    }
  ],
  "positions": [
    {
      "instrument": {
        "symbol": "AAPL",
        "name": "Apple Inc.",
        "type": "EQUITY"
      },
      "quantity": "10.0",
      "currentValue": "1500.00",
      "percentOfPortfolio": "15.00"
    }
  ],
  "orders": []
}