Alpaca API endpoints
25 documented Alpaca API endpoints, grouped by what they do. Each has its method, path, parameters and the source it was read from.
Independent and unofficialNewest check
Risk warning: CFDs and spread bets are complex instruments and come with a high risk of losing money rapidly due to leverage. You can lose money on these products, and each provider publishes its own loss figure under FCA rules. You should consider whether you understand how they work and whether you can afford to take the high risk of losing your money. Automated and API trading can amplify losses through bugs, connectivity failures and runaway orders.
Account
- GET/v2/accountThe account behind the keys: status, cash, equity, buying power and margin figures. Start here to prove the keys work.
- GET/v2/account/activitiesThe account's activity log: fills (FILL) and non trade activities such as dividends, fees and journals, paged.
- GET/v2/account/portfolio/historyThe account's equity and profit or loss over time, as parallel arrays of timestamps and values.
Assets
Calendar
Market data (crypto)
Market data (stocks)
- GET/v2/stocks/barsHistorical bars (OHLC with volume, trade count and VWAP) for a list of stock symbols, sorted by symbol then time, paged.
- GET/v2/stocks/quotes/latestThe latest best bid and ask for a list of stock symbols: one quote per symbol.
- GET/v2/stocks/snapshotsFor each symbol, the latest trade, latest quote, current minute bar, current daily bar and previous daily bar in one reply.
- GET/v2/stocks/tradesHistorical trades (prints) for a list of stock symbols, sorted by symbol then time, paged.
Orders
- DELETE/v2/ordersCancels every open order on the account. Replies 207 with one status per order.
- GET/v2/ordersLists orders: open ones by default, or closed or all, newest first, with paging by time or by order id.
- POST/v2/ordersPlaces an order: market, limit, stop, stop limit or trailing stop, alone or as a bracket, OCO, OTO or multi leg order. The reply is the Order with its id.
- GET/v2/orders:by_client_order_idOne order by the client_order_id you gave it.
- DELETE/v2/orders/{order_id}Cancels one open order. 204 with no body on success; 422 where the order can no longer be cancelled.
- GET/v2/orders/{order_id}One order by its id, whatever its state: status, filled quantity and average fill price.
- PATCH/v2/orders/{order_id}Replaces an open order with new quantity, prices, time in force or trail. The reply is a new Order with a new id.
Positions
- GET/v2/positionsEvery open position on the account: symbol, quantity, side, average entry, market value and unrealised profit or loss.
- DELETE/v2/positions/{symbol_or_asset_id}Closes one open position, in full or in part, by placing the closing order. The reply is that order.
- GET/v2/positions/{symbol_or_asset_id}One open position, by symbol or by asset id.