Answers to common questions about building with the Public API.
Generate a secret key on the API settings page, exchange it for an access token with POST /userapiauthservice/personal/access-tokens, then send Authorization: Bearer YOUR_ACCESS_TOKEN with every request. The Quickstart walks through each step.
You choose when you create it. Set validityInMinutes in the request body when you exchange your secret key for a token. See Generate a new access token.
Yes. There is an official Python SDK, a Public CLI, and Postman collections for every endpoint. Find them all on SDKs and Tools.
10 requests per second per account, across all endpoints. Requests over the limit return 429, so retry with exponential backoff.
Yes. You can open multiple brokerage accounts on Public, for example to separate strategies or AI agents. Trading endpoints take an accountId, so each request targets one account.
Email api-support@public.com, or open an issue on the relevant GitHub repository to report a bug or request a feature.
brokerageAccountType is MARGIN in the Get accounts response.
There's no field or non-mutating check for it today. Instrument lookup and preflight can succeed, and placement then fails with error 50154 (crypto is not enabled for account). Treat that error as the signal. See Account capabilities.
Stocks and ETFs, equity and index options, corporate bonds and treasuries, prediction markets, and crypto.
Use the preflight endpoints for single-leg and multi-leg orders. They return the estimated cost, commission, and fees without placing anything. Order limits are enforced at placement, so preflight is the way to validate an order first. See Order Limits.
No. Some checks only run at placement, such as crypto entitlement, so still handle rejections from the place order request. See Validating orders with preflight.
No. Use Portfolio v2 for open orders, Get order for a single order, Search orders for up to 500 orders from the last 30 days, and history for posted transactions. See Finding and tracking orders.
No. Poll for order and fill status within the 10 requests per second per account limit. See Polling for updates.
No. It returns aggregate fields such as filledQuantity and averagePrice, with no per-fill records, execution IDs, or per-fill fees. Use history for execution amounts and fees once they post.
Not with an ID. History rows don't include the order ID, so track each order you submit and match by symbol, side, quantity, and timestamp. See Reconciling history with orders.
History can post after an order shows as filled. Build reconciliation to retry with backoff so late postings are picked up.
Yes. Set equityMarketSession to EXTENDED to trade from 4:00 a.m. to 8:00 p.m. ET (DAY orders in whole shares only), or to TWENTY_FOUR_HOURS to trade around the clock, five days a week. See Market sessions.
MARKET, LIMIT, STOP, and STOP_LIMIT, with DAY or GTD time in force. See Advanced Orders for a request body for each.
Up to 90 days. Set timeInForce to GTD and expirationTime to the exact time the order should expire. See Time in force.
Yes. Send a PUT request to the order endpoint to cancel and replace an open equity, options, or crypto quantity order in a single request. Set orderIdto the order you're replacing and requestId to a new UUID. See Cancel and replace.
Only its exit legs. The entry can't be replaced, and the exit legs can change limitPrice and stopPrice only, with quantity, orderType, and expiration resubmitted unchanged.
Yes. Set orderClass to BRACKET, OCO, or OTO with takeProfit and/or stopLoss, and the exit legs are placed automatically when the entry order fills. See Placing your first bracket order.
Exit legs inherit the entry's time in force and expiration. An invalid leg rejects the whole bracket with 400, and cancelling an unfilled entry cancels both exit legs. See Bracket order legs.
Yes, from a margin account. Check the instrument's shortingAvailability first; hard-to-borrow names report a borrow rate in hardToBorrowPercentageRate. See Placing your first short order.
Set useMargin to false on the order. It is then evaluated against cash-only buying power. If you omit it, margin is applied when your account allows it.
Yes. When you sell to close an equity position, include taxLotMatchingInstructions to name the lots to sell. See Selling specific tax lots.
Crypto fees are tiered by monthly trading volume, from 0.60% for the first $10K down to 0.10% above $100M. The full table is in the Changelog.
Up to 1,999 contracts for equity options and 1,499 for SPY and QQQ, and multi-leg orders can have up to 6 legs. See Order Limits for index options and price increments.
See How Greeks Are Calculated. Greeks are also included in the option chain response.
Between $0.00 and $1.00. The price is the market's implied probability, and a contract pays $1.00 if it settles in your favor and $0.00 if it doesn't. See Trading prediction markets.
Yes, through the API. Place a SELL order for the same contract while its outcome is in BUY_AND_SELL mode. The Public MCP server can only buy event contracts, so sell from the Public app or the API.
See Trading 15-minute prediction markets for the API and a Python script, or Trading prediction markets with the Public MCP to ask an AI assistant.
Claude and Claude Code, ChatGPT and Codex, Meta Muse, Perplexity, and Grok connect through the hosted MCP server. OpenClaw and Perplexity Computer connect through the Public Agent Skill.
Most assistants connect with OAuth, so you sign in to Public and never share a key. Meta Muse and the Public Agent Skill connect with a Public API key instead. Treat that key like a password, because anyone with it can view your account and place trades.
Yes. An order placed through any MCP client or agent is a real order using real money in your Public account. Review the preflight details before you confirm.