public-dot-com
Interact with your Public.com brokerage account using the Public.com API. Able to view portfolio, get stock quotes, place trades, and get account updates. To create a Public.com account head to public
Interact with your Public.com brokerage account using the Public.com API. Able to view portfolio, get stock quotes, place trades, and get account updates. To create a Public.com account head to public
Real data. Real impact.
Growing
Developers
Per week
Open source
Skills give you superpowers. Install in 30 seconds.
Disclaimer: For illustrative and informational purposes only. Not investment advice or recommendations.
We recommend running this skill in as isolated of an instance as possible. If possible, test the integration on a new Public account as well.
This skill allows users to interact with their Public.com brokerage account.
The
publicdotcom-py SDK is required. It will be auto-installed on first run, or you can install manually:
pip install publicdotcom-py
This skill uses two environment variables:
PUBLIC_COM_SECRET (required) and PUBLIC_COM_ACCOUNT_ID (optional). Each is resolved in the following order:
~/.openclaw/workspace/.secrets/public_com_secret.txt (or public_com_account.txt)PUBLIC_COM_SECRET / PUBLIC_COM_ACCOUNT_IDSetting a value via
openclaw config set writes to the secure file location automatically.
If
PUBLIC_COM_SECRET is not set:
openclaw config set skills.publicdotcom.PUBLIC_COM_SECRET [VALUE]If the user wants to set a default account for all requests:
openclaw config set skills.publicdotcom.PUBLIC_COM_ACCOUNT_ID [VALUE]--account-id on each command.When the user asks to "get my accounts", "list accounts", or "show my Public.com accounts":
python3 scripts/get_accounts.pyWhen the user asks to "get my portfolio", "show my holdings", or "what's in my account":
PUBLIC_COM_ACCOUNT_ID is set, execute python3 scripts/get_portfolio.py (no arguments needed).get_accounts.py to retrieve it.python3 scripts/get_portfolio.py --account-id [ACCOUNT_ID]When the user asks to "get my orders", "show my orders", "active orders", or "pending orders":
PUBLIC_COM_ACCOUNT_ID is set, execute python3 scripts/get_orders.py (no arguments needed).get_accounts.py to retrieve it.python3 scripts/get_orders.py --account-id [ACCOUNT_ID]When the user asks to "get my history", "show my transactions", "transaction history", "trade history", or wants to see past account activity:
Optional parameters:
--type: Filter by transaction type (TRADE, MONEY_MOVEMENT, POSITION_ADJUSTMENT)--limit: Limit the number of transactions returnedExamples:
Get all transaction history:
python3 scripts/get_history.py
Get only trades:
python3 scripts/get_history.py --type TRADE
Get only money movements (deposits, withdrawals, dividends, fees):
python3 scripts/get_history.py --type MONEY_MOVEMENT
Get last 10 transactions:
python3 scripts/get_history.py --limit 10
With explicit account ID:
python3 scripts/get_history.py --account-id YOUR_ACCOUNT_ID
Workflow:
PUBLIC_COM_ACCOUNT_ID is not set and you don't know the user's account ID, first run get_accounts.py to retrieve it.python3 scripts/get_history.py [OPTIONS]Transaction Types:
When the user asks to "get a quote", "what's the price of", "check the price", or wants stock/crypto prices:
Format:
SYMBOL or SYMBOL:TYPE (TYPE defaults to EQUITY)
Examples:
Single equity quote (uses default account):
python3 scripts/get_quotes.py AAPL
Multiple equity quotes:
python3 scripts/get_quotes.py AAPL GOOGL MSFT
Mixed instrument types:
python3 scripts/get_quotes.py AAPL:EQUITY BTC:CRYPTO
Option quote:
python3 scripts/get_quotes.py AAPL260320C00280000:OPTION
With explicit account ID:
python3 scripts/get_quotes.py AAPL --account-id YOUR_ACCOUNT_ID
Workflow:
PUBLIC_COM_ACCOUNT_ID is not set and you don't know the user's account ID, first run get_accounts.py to retrieve it.python3 scripts/get_quotes.py [SYMBOLS...] [--account-id ACCOUNT_ID]When the user asks to "list instruments", "what can I trade", "show available stocks", or wants to see tradeable instruments:
Optional parameters:
--type: Instrument types to filter (EQUITY, OPTION, CRYPTO). Defaults to EQUITY.--trading: Trading status filter (BUY_AND_SELL, BUY_ONLY, SELL_ONLY, NOT_TRADABLE)--search: Search by symbol or name--limit: Limit number of resultsExamples:
List all equities (default):
python3 scripts/get_instruments.py
List equities and crypto:
python3 scripts/get_instruments.py --type EQUITY CRYPTO
List only tradeable instruments:
python3 scripts/get_instruments.py --type EQUITY --trading BUY_AND_SELL
Search for specific instruments:
python3 scripts/get_instruments.py --search AAPL
Limit results:
python3 scripts/get_instruments.py --limit 50
Workflow:
python3 scripts/get_instruments.py [OPTIONS]When the user asks to "get instrument details", "show instrument info", "what are the details for AAPL", or wants to see details for a specific instrument:
Required parameters:
--symbol: The ticker symbol (e.g., AAPL, BTC)Optional parameters:
--type: Instrument type (EQUITY, OPTION, CRYPTO). Defaults to EQUITY.Examples:
Get equity instrument details:
python3 scripts/get_instrument.py --symbol AAPL
Get crypto instrument details:
python3 scripts/get_instrument.py --symbol BTC --type CRYPTO
Workflow:
python3 scripts/get_instrument.py --symbol [SYMBOL] [--type TYPE]This skill CAN list all available option expiration dates for any symbol.
When the user asks to "get option expirations", "list expirations", "show expiration dates", "when do options expire", or wants to know what option expiration dates are available for a stock:
python3 scripts/get_option_expirations.py [SYMBOL]Common user phrasings:
Required parameters:
symbol: The underlying symbol (e.g., AAPL, GOOGL, TSLA, SPY). Convert company names to ticker symbols.Examples:
python3 scripts/get_option_expirations.py AAPL python3 scripts/get_option_expirations.py GOOGL python3 scripts/get_option_expirations.py TSLA python3 scripts/get_option_expirations.py SPY
Common company name to symbol mappings:
Workflow:
python3 scripts/get_option_expirations.py [SYMBOL]get_option_chain.py.When the user asks for "option greeks", "delta", "gamma", "theta", "vega", or wants to analyze options:
Required parameters:
OSI Symbol Format:
AAPL260116C00270000 ^^^^------^-------- | | | Strike price ($270.00) | | Call (C) or Put (P) | Expiration (Jan 16, 2026 = 260116) Underlying symbol
Examples:
Single option:
python3 scripts/get_option_greeks.py AAPL260116C00270000
Multiple options (e.g., call and put at same strike):
python3 scripts/get_option_greeks.py AAPL260116C00270000 AAPL260116P00270000
Workflow:
python3 scripts/get_option_greeks.py [OSI_SYMBOLS...]When the user asks for "option chain", "options for AAPL", "show me calls and puts", or wants to see available options:
Required parameters:
symbol: The underlying symbol (e.g., AAPL)Optional parameters:
--expiration: Expiration date (YYYY-MM-DD). If not provided, uses the nearest expiration.--list-expirations: List available expiration dates instead of fetching the chain.Examples:
List available expirations:
python3 scripts/get_option_chain.py AAPL --list-expirations
Get option chain for nearest expiration:
python3 scripts/get_option_chain.py AAPL
Get option chain for specific expiration:
python3 scripts/get_option_chain.py AAPL --expiration 2026-03-20
Workflow:
--list-expirations to show available dates.python3 scripts/get_option_chain.py [SYMBOL] [--expiration DATE]When the user asks to "set my default account" or "use account X as default":
openclaw config set skills.publicdotcom.PUBLIC_COM_ACCOUNT_ID [ACCOUNT_ID]When the user asks to "estimate order cost", "preflight an order", "what would it cost to buy", "check buying power impact", or wants to see the estimated cost and account impact before placing an order:
Required parameters:
--symbol: The ticker symbol (e.g., AAPL, BTC, or option symbol like NVDA260213P00177500)--type: EQUITY, OPTION, or CRYPTO--side: BUY or SELL--order-type: LIMIT, MARKET, STOP, or STOP_LIMIT--quantity OR --amount: Number of shares/contracts OR notional dollar amountConditional parameters:
--limit-price: Required for LIMIT and STOP_LIMIT orders--stop-price: Required for STOP and STOP_LIMIT orders--session: CORE (default) or EXTENDED for equity orders--open-close: OPEN or CLOSE for options orders (OPEN to open a new position, CLOSE to close existing)--time-in-force: DAY (default) or GTC (Good Till Cancelled)Examples:
Equity limit buy preflight:
python3 scripts/preflight.py --symbol AAPL --type EQUITY --side BUY --order-type LIMIT --quantity 10 --limit-price 227.50
Equity market sell preflight:
python3 scripts/preflight.py --symbol AAPL --type EQUITY --side SELL --order-type MARKET --quantity 10
Crypto buy by amount preflight:
python3 scripts/preflight.py --symbol BTC --type CRYPTO --side BUY --order-type MARKET --amount 100
Option contract buy preflight (opening a new position):
python3 scripts/preflight.py --symbol NVDA260213P00177500 --type OPTION --side BUY --order-type LIMIT --quantity 1 --limit-price 4.00 --open-close OPEN
Option contract sell preflight (closing a position):
python3 scripts/preflight.py --symbol NVDA260213P00177500 --type OPTION --side SELL --order-type LIMIT --quantity 1 --limit-price 5.00 --open-close CLOSE
Workflow:
python3 scripts/preflight.py [OPTIONS]place_order.py script with the same parameters.When the user asks to "buy", "sell", "place an order", or "trade":
Required parameters:
--symbol: The ticker symbol (e.g., AAPL, BTC)--type: EQUITY, OPTION, or CRYPTO--side: BUY or SELL--order-type: LIMIT, MARKET, STOP, or STOP_LIMIT--quantity OR --amount: Number of shares OR notional dollar amountConditional parameters:
--limit-price: Required for LIMIT and STOP_LIMIT orders--stop-price: Required for STOP and STOP_LIMIT orders--session: CORE (default) or EXTENDED for equity orders--open-close: OPEN or CLOSE for options orders--time-in-force: DAY (default) or GTC (Good Till Cancelled)Examples:
Buy 10 shares of AAPL at limit price $227.50:
python3 scripts/place_order.py --symbol AAPL --type EQUITY --side BUY --order-type LIMIT --quantity 10 --limit-price 227.50
Sell $500 worth of AAPL at market price:
python3 scripts/place_order.py --symbol AAPL --type EQUITY --side SELL --order-type MARKET --amount 500
Buy crypto with extended hours:
python3 scripts/place_order.py --symbol BTC --type CRYPTO --side BUY --order-type MARKET --amount 100
Buy with Good Till Cancelled (GTC) order:
python3 scripts/place_order.py --symbol AAPL --type EQUITY --side BUY --order-type LIMIT --quantity 10 --limit-price 220.00 --time-in-force GTC
Workflow:
python3 scripts/place_order.py [OPTIONS]When the user asks to "cancel order", "cancel my order", or wants to cancel a specific order:
Required parameters:
--order-id: The order ID to cancelExample:
python3 scripts/cancel_order.py --order-id 345d3e58-5ba3-401a-ac89-1b756332cc94
With explicit account ID:
python3 scripts/cancel_order.py --order-id 345d3e58-5ba3-401a-ac89-1b756332cc94 --account-id YOUR_ACCOUNT_ID
Workflow:
get_orders.py to show them their active orders.python3 scripts/cancel_order.py --order-id [ORDER_ID]When the user asks about options strategies, how to automate a strategy, which strategy to use for a given scenario, or wants help constructing multi-leg options trades:
options-automation-library.md (located in the same directory as this skill) for detailed strategy context.get_option_chain.py, get_option_expirations.py, preflight.py, place_order.py).No automatic installation available. Please visit the source repository for installation instructions.
View Installation Instructions1,500+ AI skills, agents & workflows. Install in 30 seconds. Part of the Torly.ai family.
© 2026 Torly.ai. All rights reserved.