Alpaca Trading
Connect Alpaca Trading to the rest of your business, with the right person approving what changes and a record of every action.
22 ways to read, 3 ways to write, each write switched on by you.
Quality checks
Built and tested with example responses.
- Ready to connect: doneEvery listed action is built in.
- Built and tested with example responses: doneEach action is built from the provider’s published API and tested against example responses, errors, rate limits and paging.
Connected, approved, proven.
The things teams do most with Alpaca Trading, an example flow with a person in the loop, and what Nexra keeps as proof.
Top actions
- Add symbol to watchlist
watchlist_assets.createApproval by rule - Create watchlist
watchlists.createApproval by rule - List account activities
activities.listRead
Example flow
- Alpaca Trading · List account activities
activities.listDone - Alpaca Trading · Add symbol to watchlist
watchlist_assets.createMaker-checker - Nexra · Record the decision and result in the evidence chainProven
Example workflow. Routine runs go through on their own. Only a change your rules flag, such as one over a limit you set, waits for the right person, who sees the exact change and the rule before it reaches Alpaca Trading.
What gets logged
- Whether it ran on its own or who approved it, and under which rule
- A fingerprint of the exact request sent to Alpaca Trading
- Alpaca Trading's reply: what it created or changed
- One entry in the evidence chain, linked to the one before
Try this in the sandbox
Run the whole flow with test data in your sandbox, then connect a Alpaca Trading test account before you go live.
For developers
Technical detail
Read Alpaca brokerage accounts, positions, orders, activities, portfolio history and market reference data; manage watchlists.
Alpaca Trading API docs- Source actions
- 22
- Destination actions
- 3
- Data types
- 15
What you can map
Reads are always available. Writes are off until you switch them on for a connection, and governed writes follow your policies.
account configurations1
- Get account configurationSource
Read trading configuration flags such as fractional trading, shorting and margin multiplier. Changing them is not supported.
account1
- Get investment accountSource
Read account balances and status; no orders or transfers are submitted.
activities1
- List account activitiesSourceIncremental
Trade fills and non-trade activities such as dividends, interest, fees and cash transactions, for reconciliation.
assets2
- Get assetSource
One asset by symbol, asset ID or CUSIP.
- List assetsSource
US equity or option assets with tradability, marginability and order increments.
calendar1
- List US market calendarSource
US equity trading days with open, close and session times.
clock1
- Get US market clockSource
Whether the US equity market is open and the next open and close times.
corporate actions2
- Get corporate action announcementSource
One corporate action announcement by ID.
- List corporate action announcementsSource
Dividends, splits, mergers, spinoffs and reorganisations in a date range.
market calendar1
- List market calendar (v3)Source
Trading days and pre, core, lunch and post session times for a named market (for example NYSE, XLON, HKEX).
market clocks1
- List market clocks (v3)Source
Current phase (pre, core, lunch, post or closed) and next open and close per market.
option contracts2
- Get option contractSource
One option contract by OCC symbol or contract ID.
- List option contractsSource
Option contract reference data filtered by underlying, expiry, type and strike.
orders3
- Get orderSource
One order by its Alpaca order ID.
- List ordersSourceIncremental
Orders with status, quantities, prices and fill details, newest first by default. Reading only; nothing is placed or cancelled.
- Find order by client order IDSource
Look up an order by the client_order_id your system assigned when it was placed.
portfolio history1
- Get portfolio historySource
Equity and profit-and-loss time series, one record per timestamp, for performance reporting.
positions2
- Get open positionSource
One open position by symbol or asset ID.
- List open positionsSource
Open positions with quantity, cost basis, market value and unrealised P&L.
watchlist assets1
- Add symbol to watchlistDestinationNot retried automaticallyApproval before production
Append one symbol to the end of a watchlist. No order is placed.
watchlists5
- Create watchlistDestinationNot retried automaticallyApproval before production
Create a named watchlist with an initial list of symbols. No order is placed.
- Get watchlistSource
One watchlist with its assets.
- List watchlistsSource
Watchlists on the account (names and timestamps; assets come from get).
- Find watchlist by nameSource
One watchlist with its assets, looked up by name.
- Update watchlistDestinationProvider duplicate protectionApproval before production
Rename a watchlist and/or replace its full symbol list (PUT replaces the existing assets).
Access and limits
- Authentication
- Alpaca API key and secret
- Plans and access
- Alpaca Trading API account with environment-specific keys. Live brokerage eligibility depends on country and provider onboarding. Paper keys do not authorise live accounts.
- Test environment
- Paper trading environment supported.
- Rate limits
- Alpaca documents an account-level request quota (200 requests per minute for the Trading API); HTTP 429 uses bounded retries and Retry-After when supplied.
- Pagination
- Orders page by the last order ID (up to 500 per page); activities page with page_token (up to 100); option contracts use next_page_token. Other reads return one response.
- Provider events
- Alpaca streams trade updates over WebSocket and account activities over server-sent events; Nexra does not consume them. Flows run on demand, on a schedule, or when a scheduled check finds new or changed records.
Before you build a flow
- Read-only for trading: Alpaca orders are never placed, replaced or cancelled and positions are never closed.
- Intentionally excluded: POST/PATCH/DELETE /v2/orders (place, replace, cancel), DELETE /v2/positions (close), option exercise and do-not-exercise, crypto wallets, transfers and whitelists, tokenisation mints, locates, PATCH /v2/account/configurations and every delete.
- Crypto is excluded: asset listing is limited to US equities and options, and crypto funding endpoints are not implemented. Orders, positions and activities are returned as Alpaca reports them.
- Asset, position and calendar listings are single unpaginated responses; Nexra refuses a response above 2,000 records, so narrow assets with status, exchange or symbols and calendars with a date range.
- Order time filters (after/until) apply server-side on the first page and client-side on later pages, because Alpaca does not allow combining them with order-ID pagination.
- Corporate action announcements accept a range of at most 90 days; Alpaca also offers corporate actions through the separate Market Data API, which is not included.
- Market data (bars, quotes, trades) is a separate API host and is not included.
Developer reference
- Create the Alpaca Trading credentials described above with the narrowest permissions your flows need.
- In Nexra, open Connect, then Connections, then New connection, choose Alpaca Trading, enter its settings and credentials, and tick only the write actions you need. Connection guide
- Test the connection, then use its actions as flow sources and destinations. Flow guide
Machine-readable detail: GET /api/public/connect/connectors/alpaca and the Connections API.