# Alpaca trade_updates

Independent and unofficial. Not affiliated with or endorsed by any broker or platform named here. Educational only: nothing here is advice, and nothing here recommends a broker or a trade.

This is the markdown version of https://openbrokerapi.com/brokers/alpaca/messages/trade-updates, written from the same records as that page.

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.

One message per order event on the account: the event name, the whole order object as the REST API returns it, and for fills the price, quantity and resulting position.

- Message: `trade_updates`
- Interface: Alpaca WebSocket streams
- Group: Account events
- Status: verified. Source: [docs.alpaca.markets](https://docs.alpaca.markets/us/docs/websocket-streaming.md), checked 2026-11-30.

This is a subscription of the Alpaca WebSocket streams, not an HTTP endpoint. It has no method and no path: it is sent as JSON, or as MessagePack where the client asks for it, over an open WebSocket connection. It is in no OpenAPI file on this site and the request builder does not list it.

Note: The Placing Orders page points to this stream, rather than polling, for keeping the state of open orders. The page's multi leg options example adds at, event_id, position_qtys and legs. Values in the sample are invented.

## The message

- Name: `trade_updates`
- Direction: Subscription, opened by the client and then fed by the server
- Subscribed to as: `trade_updates`
- Carried by: WebSocket. Alpaca's page says the stream speaks JSON or MessagePack, the latter when the client sends the header Content-Type: application/msgpack, and that trade_updates from the paper address arrives in binary frames.
- Paper account stream: `wss://paper-api.alpaca.markets/stream`
- Live account stream: `wss://api.alpaca.markets/stream`
- Answers: [listen](https://openbrokerapi.com/brokers/alpaca/messages/listen)

## Fields

- `stream` (type string, required or not: not stated): trade_updates.
- `data.event` (type string, required or not: not stated): What happened. Common: new, fill, partial_fill, canceled, expired, done_for_day, replaced. Less common: accepted, rejected, pending_new, stopped, pending_cancel, pending_replace, calculated, suspended, order_replace_rejected, order_cancel_rejected.
- `data.order` (type object, required or not: not stated): The order, in the same shape as GET /v2/orders/{order_id} returns it.
- `data.timestamp` (type string, required or not: not stated): When the event happened. Present on fill, partial_fill, canceled, expired, replaced and rejected.
- `data.price` (type string, required or not: not stated): fill and partial_fill: the price of this execution.
- `data.qty` (type string, required or not: not stated): fill and partial_fill: the quantity of this execution.
- `data.position_qty` (type string, required or not: not stated): fill and partial_fill: the position in the symbol after this execution.
- `data.execution_id` (type string, required or not: not stated): fill and partial_fill: the id of the execution, in the page's single leg example.

## Sample

Written by this site from the fields recorded on this page. It has not been run against a terminal, a server or an account, and the values in it are placeholders. No credential is typed into it: where a field holds one, the placeholder says where it comes from. Nothing is entered on this site.

```json
{
  "stream": "trade_updates",
  "data": {
    "event": "fill",
    "timestamp": "2026-11-30T14:30:01.000000000Z",
    "price": "100.50",
    "qty": "1",
    "position_qty": "1",
    "execution_id": "<an execution id>",
    "order": {
      "id": "<the order id>",
      "symbol": "MOCK",
      "side": "buy",
      "type": "market",
      "status": "filled"
    }
  }
}
```

## Return codes documented for this message

The page lists rejected, order_replace_rejected and order_cancel_rejected among the events of this stream, and the unauthorized status and the error action as the other messages the account stream sends; this site holds each as a record. Status: verified. Source: [docs.alpaca.markets](https://docs.alpaca.markets/us/docs/websocket-streaming.md), checked 2026-11-30.

- [internal server error](https://openbrokerapi.com/errors/alpaca/stream-internal-server-error): The error_message of an error action on the account stream, which the page says the server sends before closing the connection.
- [order_cancel_rejected](https://openbrokerapi.com/errors/alpaca/stream-order-cancel-rejected): An event on the trade_updates stream: a request to cancel the order was rejected.
- [order_replace_rejected](https://openbrokerapi.com/errors/alpaca/stream-order-replace-rejected): An event on the trade_updates stream: a request to replace the order was rejected.
- [rejected](https://openbrokerapi.com/errors/alpaca/stream-rejected): An event on the trade_updates stream: the order was rejected.
- [unauthorized](https://openbrokerapi.com/errors/alpaca/stream-unauthorized): The status in an authorization message on the account stream: the auth message failed, or a listen message was sent before the connection was authorised (then the message carries action listen).

## Limits that apply at Alpaca

- client_order_id length: 128 characters
  - Scope: POST /v2/orders and PATCH /v2/orders/{order_id}
  - Status: verified. Source: [docs.alpaca.markets](https://docs.alpaca.markets/openapi/trading-api.json), checked 2026-11-30.
  - Note: From the CreateOrderRequest and PatchOrderRequest schemas.
- Crypto order size: 200,000 US dollars notional per order
  - Scope: Crypto spot orders, buy or sell
  - Status: verified. Source: [docs.alpaca.markets](https://docs.alpaca.markets/us/docs/crypto-trading.md), checked 2026-11-30.
  - Note: The Crypto Spot Trading page: each order is limited to 200,000 US dollars in notional value.
- Market data historical API, Basic plan: 200 requests per minute
  - Scope: Market Data API historical calls, Basic (free) plan
  - Status: verified. Source: [docs.alpaca.markets](https://docs.alpaca.markets/us/docs/about-market-data-api.md), checked 2026-11-30.
  - Note: The About Market Data API page: Historical API limit of 200 calls per minute on Basic, with IEX real time data and stock history since 2016 limited to data 15 minutes old.
- Market data points per page: 10,000 data points per page
  - Scope: Market Data API historical bars, trades and quotes, counted across all symbols
  - Status: verified. Source: [docs.alpaca.markets](https://docs.alpaca.markets/openapi/market-data-api.json), checked 2026-11-30.
  - Note: The limit query parameter: default 1000, maximum 10000, counted across every symbol in the request. Pages continue with next_page_token.
- Market data historical API, Algo Trader Plus: 10,000 requests per minute
  - Scope: Market Data API historical calls, Algo Trader Plus plan (99 US dollars a month)
  - Status: verified. Source: [docs.alpaca.markets](https://docs.alpaca.markets/us/docs/about-market-data-api.md), checked 2026-11-30.
  - Note: The About Market Data API page: Historical API limit of 10,000 calls per minute on Algo Trader Plus.
- GTC order age: 90 days
  - Scope: Orders with time in force gtc
  - Status: verified. Source: [docs.alpaca.markets](https://docs.alpaca.markets/us/docs/orders-at-alpaca.md), checked 2026-11-30.
  - Note: The Placing Orders page: GTC orders are cancelled automatically 90 days after creation, the date shown in expires_at, by a job that runs at 4:15 pm ET.
- Trading API request rate: HTTP 429 above the limit, with X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers on replies; no figure on the pages opened
  - Scope: Trading API, per account
  - Status: verified. Source: [docs.alpaca.markets](https://docs.alpaca.markets/openapi/trading-api.json), checked 2026-11-30.
  - Note: The Trading API OpenAPI document gives the 429 reply and the three headers. None of the Trading API pages opened on 30 Nov 2026 prints a number, so this site records none.
- Market data WebSocket authentication timeout: 10 seconds
  - Scope: Market data WebSocket, from connecting to the auth message
  - Status: verified. Source: [docs.alpaca.markets](https://docs.alpaca.markets/us/docs/streaming-market-data.md), checked 2026-11-30.
  - Note: Error 404 auth timeout where no auth message arrives in time.
- Market data WebSocket connections: Depends on the subscription; 1 for many subscriptions and with none. A second connection is answered with error 406 connection limit exceeded
  - Scope: Market data WebSocket, per account
  - Status: verified. Source: [docs.alpaca.markets](https://docs.alpaca.markets/us/docs/streaming-market-data.md), checked 2026-11-30.
  - Note: The WebSocket Stream page gives no table of figures by plan.
- Market data WebSocket symbols, Basic plan: 30 symbol subscriptions
  - Scope: Market data WebSocket, US equities, Basic (free) plan; Algo Trader Plus is unlimited
  - Status: verified. Source: [docs.alpaca.markets](https://docs.alpaca.markets/us/docs/about-market-data-api.md), checked 2026-11-30.
  - Note: The About Market Data API page: up to 30 WebSocket symbol subscriptions on Basic for equities, unlimited on Algo Trader Plus; for options 200 quote subscriptions on Basic and 1,000 on Algo Trader Plus. Over the limit the stream answers error 405.

## Related Alpaca messages: Account events

- [listen](https://openbrokerapi.com/brokers/alpaca/messages/listen): Asks the account stream to send a named stream, trade_updates being the one the page documents. Each listen message replaces the whole set: send every stream you still want, or an empty list to stop.

## More on Alpaca

- [All Alpaca messages](https://openbrokerapi.com/brokers/alpaca/messages): 9 documented here, grouped by what they do.
- [Alpaca API quickstart](https://openbrokerapi.com/brokers/alpaca/quickstart)
- [All Alpaca error codes](https://openbrokerapi.com/errors/alpaca)
- [Alpaca API page](https://openbrokerapi.com/brokers/alpaca): The full record: access, authentication, limits and the source for each.

## Licence and how to cite

The records behind this page are all rights reserved. This file is the page itself, at its own address, in another format. It is not part of the CC BY 4.0 downloads listed at https://openbrokerapi.com/data. Quote from it with a link to the page.

Cite as: Alpaca trade_updates. Broker API Hub, https://openbrokerapi.com/brokers/alpaca/messages/trade-updates, newest check 2026-11-30.

Where you rely on a single figure, cite the source and the checked date printed beside it as well. Where this page and a broker's own documentation differ, the documentation wins.
