RULE CHANGE
Account streaming
Article adds new price alert event type to streaming API alongside existing account, order, fill, and position events. Four other changes to event structure and deduplication.
What this means
New price_alert event type added with fire_id and alert_id fields; account_id field now only included in account, order, fill, and position events, not all events; deduplication instructions changed to use fire_id for price alerts instead of id; replayed price alert events after since now follow snapshot_end, whereas previously only account/order/fill/position replays were mentioned.
▸ View exact changes
The change in place, line by line
Before Oct 31, 2026
order | triggered | order | A stop or take order's trigger fired and it began executing.
order | partially_filled | order | Part of the order filled. Limit orders normally fill in full.
| order | filled | order | The order filled. Its fill event comes first. |
|---|---|---|---|
| order | canceled | order | The order was canceled. See cancel_reason. |
| order | rejected | order | The order was rejected. See reject_reason and reject_rule_id. |
| order | expired | order | A GTD order reached its expiry time, or an order could not execute. |
| fill | none | fill | One execution. See the fill fields below. |
| position | opened | position | A new position. |
| position | changed | position | Size, entry price, margin, or other position fields changed. |
| position | closed | position | The position closed. See close_reason. |
| account | updated | account | Balance, status, or lockout changed. changes lists the changed fields. |
| account | removed | none | The account is no longer reachable with this key. |
− Every event also has seq, time (when the service observed the change, in
− epoch milliseconds), and account_id.
An order that is placed and finishes before the stream observes it working,
such as a market order that fills immediately, produces its fill and
filled (or rejected) events without a preceding created event. Several
changes to one working order in quick succession can arrive as a single
edited event carrying the latest state.
Fills
A fill is one execution. Its id is unique and matches the id of the same
fill in GET /v1/fills, so streamed and fetched fills reconcile directly.
| Field | Meaning |
|---|---|
| id | Unique fill identifier. |
| order_id | The order this fill belongs to. |
| client_order_id | Your order identifier, when you supplied one. |
| realized_pnl | Realized profit or loss on the reduced portion, before fees. |
|---|---|
| time | Execution time in epoch milliseconds. |
| position_side_after | long, short, or flat: the position in this market after the fill. |
| position_size_after | The position size in base-asset units after the fill. 0 when flat. |
| side, order_type | buy or sell, and the order type that executed. |
| market_id, symbol | The market, as returned by /v1/markets. |
Accounts
account events carry the account object plus locked_out, which is true
while a trader lockout blocks new trading. changes lists every field that
changed, for example ["balance"] after a fill, or a list including
status when a challenge passes, fails, or closes. balance is the realized balance;
request GET /v1/accounts/{account_id} for equity and rule room.
Take-profit and stop-loss links
Attached take-profit and stop-loss orders are linked in both directions. When
an entry with attached exits fills, you receive the entry's fill and
filled events, then a created event for each exit order. Each exit names
its entry in parent_order_id and its role in bracket_role (take_profit
or stop_loss). The filled entry names them in take_profit_order_id and
stop_loss_order_id. Changing an entry's attached exit prices before it fills
produces an edited event on the entry; changing an exit after the fill
produces an edited event on that exit.
Cancel and close reasons
Canceled orders carry cancel_reason: user, oco, reduce_only,
replaced, liquidation, expired, account_closed, trading_restricted,
you processed that has one (heartbeats included).
To recover after a disconnect, reconnect with all three:
text theme={null}
wss://account-stream.myfundedperpetuals.com/v1/stream?resume=<stream_id>&last_seq=&since=
- If the server still holds your stream (for about 60 seconds after the
disconnect), hello reports "resumed":true and you receive every frame
after last_seq, with no new snapshot.
- Otherwise, for example after a service restart or deploy, hello reports
"resumed":false with a new stream_id. Each account's snapshot follows,
and right after it the fills, filled, canceled, rejected, and expired orders,
and closed positions since since, each flagged "replay":true. Replace
your local state with the snapshot; use the replayed events to record what
− happened while you were away. Replayed events can repeat ones you already
− processed just before the disconnect: deduplicate by id.
snapshot_end then reports replay.complete. Replay reaches back about 100
seconds. If complete is false (you were away longer, or
incomplete_accounts lists an account), or you connected without since,
compare each snapshot's latest_fill.id with the last fill you processed for
that account. If they differ, request GET /v1/fills for the account (newest
first) and page until you reach your last processed fill. An order you held as
working that is missing from the snapshot and from the replay ended while you
were away: GET /v1/orders/{order_id} returns its outcome.
Keepalive and closing
The server sends {"type":"heartbeat"} every 15 seconds and a WebSocket ping
every 20 seconds. A heartbeat with "upstream_connected":false means the
service is reconnecting to its data source and events may be delayed; they
After Nov 2, 2026
order | triggered | order | A stop or take order's trigger fired and it began executing.
order | partially_filled | order | Part of the order filled. Limit orders normally fill in full.
| order | filled | order | The order filled. Its fill event comes first. |
|---|---|---|---|
| order | canceled | order | The order was canceled. See cancel_reason. |
| order | rejected | order | The order was rejected. See reject_reason and reject_rule_id. |
| order | expired | order | A GTD order reached its expiry time, or an order could not execute. |
| fill | none | fill | One execution. See the fill fields below. |
| position | opened | position | A new position. |
| position | changed | position | Size, entry price, margin, or other position fields changed. |
| position | closed | position | The position closed. See close_reason. |
| account | updated | account | Balance, status, or lockout changed. changes lists the changed fields. |
| account | removed | none | The account is no longer reachable with this key. |
+
| price_alert | triggered | alert | One of your price alerts fired. See Price alerts. |
|---|
+ Every event also has seq and time (when the service observed the change,
+ in epoch milliseconds). Account, order, fill, and position events also have
+ account_id.
An order that is placed and finishes before the stream observes it working,
such as a market order that fills immediately, produces its fill and
filled (or rejected) events without a preceding created event. Several
changes to one working order in quick succession can arrive as a single
edited event carrying the latest state.
Fills
A fill is one execution. Its id is unique and matches the id of the same
fill in GET /v1/fills, so streamed and fetched fills reconcile directly.
| Field | Meaning |
|---|---|
| id | Unique fill identifier. |
| order_id | The order this fill belongs to. |
| client_order_id | Your order identifier, when you supplied one. |
| realized_pnl | Realized profit or loss on the reduced portion, before fees. |
|---|---|
| time | Execution time in epoch milliseconds. |
| position_side_after | long, short, or flat: the position in this market after the fill. |
| position_size_after | The position size in base-asset units after the fill. 0 when flat. |
| side, order_type | buy or sell, and the order type that executed. |
| market_id, symbol | The market, as returned by /v1/markets. |
Accounts
account events carry the account object plus locked_out, which is true
while a trader lockout blocks new trading. changes lists every field that
changed, for example ["balance"] after a fill, or a list including
status when a challenge passes, fails, or closes. balance is the realized balance;
request GET /v1/accounts/{account_id} for equity and rule room.
+ Price alerts
+ A price_alert event fires once each time one of your
+ price alerts triggers, including each fire
+ of a re-armed alert. Alerts belong to your user, so every key you own
+ receives them, including keys limited to certain accounts.
+
| Field | Meaning |
|---|---|
| fire_id | Unique per fire. Use it to deduplicate. |
| alert_id | The alert's id, as in GET /v1/price-alerts/{id}. |
| alert | The alert as it was when it fired: id, market_id, provider, symbol, coin, price, condition, note, price_source, trigger_price, triggered_at, and status triggered. |
+ The event is sent even if the alert was re-armed, edited, or deleted right
+ after it fired.
+ Price alerts are not part of the snapshot. A stream receives the fires from
+ when it connects, and can include one from up to 10 seconds earlier, so
+ deduplicate by fire_id. On a fresh connection with since, fires after
+ since are replayed after snapshot_end. For a longer gap, list
+ GET /v1/price-alerts: triggered alerts show triggered_at, but an alert
+ re-armed since it fired shows only its current state.
Take-profit and stop-loss links
Attached take-profit and stop-loss orders are linked in both directions. When
an entry with attached exits fills, you receive the entry's fill and
filled events, then a created event for each exit order. Each exit names
its entry in parent_order_id and its role in bracket_role (take_profit
or stop_loss). The filled entry names them in take_profit_order_id and
stop_loss_order_id. Changing an entry's attached exit prices before it fills
produces an edited event on the entry; changing an exit after the fill
produces an edited event on that exit.
Cancel and close reasons
Canceled orders carry cancel_reason: user, oco, reduce_only,
replaced, liquidation, expired, account_closed, trading_restricted,
you processed that has one (heartbeats included).
To recover after a disconnect, reconnect with all three:
text theme={null}
wss://account-stream.myfundedperpetuals.com/v1/stream?resume=<stream_id>&last_seq=&since=
- If the server still holds your stream (for about 60 seconds after the
disconnect), hello reports "resumed":true and you receive every frame
after last_seq, with no new snapshot.
- Otherwise, for example after a service restart or deploy, hello reports
"resumed":false with a new stream_id. Each account's snapshot follows,
and right after it the fills, filled, canceled, rejected, and expired orders,
and closed positions since since, each flagged "replay":true. Replace
your local state with the snapshot; use the replayed events to record what
+ happened while you were away. Price alerts that fired since since follow
+ snapshot_end. Replayed events can repeat ones you already processed just
+ before the disconnect: deduplicate by id (fire_id for price alerts).
snapshot_end then reports replay.complete. Replay reaches back about 100
seconds. If complete is false (you were away longer, or
incomplete_accounts lists an account), or you connected without since,
compare each snapshot's latest_fill.id with the last fill you processed for
that account. If they differ, request GET /v1/fills for the account (newest
first) and page until you reach your last processed fill. An order you held as
working that is missing from the snapshot and from the replay ended while you
were away: GET /v1/orders/{order_id} returns its outcome.
Keepalive and closing
The server sends {"type":"heartbeat"} every 15 seconds and a WebSocket ping
every 20 seconds. A heartbeat with "upstream_connected":false means the
service is reconnecting to its data source and events may be delayed; they
order | triggered | order | A stop or take order's trigger fired and it began executing.
order | partially_filled | order | Part of the order filled. Limit orders normally fill in full.
| order | filled | order | The order filled. Its fill event comes first. |
|---|---|---|---|
| order | canceled | order | The order was canceled. See cancel_reason. |
| order | rejected | order | The order was rejected. See reject_reason and reject_rule_id. |
| order | expired | order | A GTD order reached its expiry time, or an order could not execute. |
| fill | none | fill | One execution. See the fill fields below. |
| position | opened | position | A new position. |
| position | changed | position | Size, entry price, margin, or other position fields changed. |
| position | closed | position | The position closed. See close_reason. |
| account | updated | account | Balance, status, or lockout changed. changes lists the changed fields. |
| account | removed | none | The account is no longer reachable with this key. |
− Every event also has seq, time (when the service observed the change, in
− epoch milliseconds), and account_id.
+
| price_alert | triggered | alert | One of your price alerts fired. See Price alerts. |
|---|
+ Every event also has seq and time (when the service observed the change,
+ in epoch milliseconds). Account, order, fill, and position events also have
+ account_id.
An order that is placed and finishes before the stream observes it working,
such as a market order that fills immediately, produces its fill and
filled (or rejected) events without a preceding created event. Several
changes to one working order in quick succession can arrive as a single
edited event carrying the latest state.
Fills
A fill is one execution. Its id is unique and matches the id of the same
fill in GET /v1/fills, so streamed and fetched fills reconcile directly.
| Field | Meaning |
|---|---|
| id | Unique fill identifier. |
| order_id | The order this fill belongs to. |
| client_order_id | Your order identifier, when you supplied one. |
| realized_pnl | Realized profit or loss on the reduced portion, before fees. |
|---|---|
| time | Execution time in epoch milliseconds. |
| position_side_after | long, short, or flat: the position in this market after the fill. |
| position_size_after | The position size in base-asset units after the fill. 0 when flat. |
| side, order_type | buy or sell, and the order type that executed. |
| market_id, symbol | The market, as returned by /v1/markets. |
Accounts
account events carry the account object plus locked_out, which is true
while a trader lockout blocks new trading. changes lists every field that
changed, for example ["balance"] after a fill, or a list including
status when a challenge passes, fails, or closes. balance is the realized balance;
request GET /v1/accounts/{account_id} for equity and rule room.
+ Price alerts
+ A price_alert event fires once each time one of your
+ price alerts triggers, including each fire
+ of a re-armed alert. Alerts belong to your user, so every key you own
+ receives them, including keys limited to certain accounts.
+
| Field | Meaning |
|---|---|
| fire_id | Unique per fire. Use it to deduplicate. |
| alert_id | The alert's id, as in GET /v1/price-alerts/{id}. |
| alert | The alert as it was when it fired: id, market_id, provider, symbol, coin, price, condition, note, price_source, trigger_price, triggered_at, and status triggered. |
+ The event is sent even if the alert was re-armed, edited, or deleted right
+ after it fired.
+ Price alerts are not part of the snapshot. A stream receives the fires from
+ when it connects, and can include one from up to 10 seconds earlier, so
+ deduplicate by fire_id. On a fresh connection with since, fires after
+ since are replayed after snapshot_end. For a longer gap, list
+ GET /v1/price-alerts: triggered alerts show triggered_at, but an alert
+ re-armed since it fired shows only its current state.
Take-profit and stop-loss links
Attached take-profit and stop-loss orders are linked in both directions. When
an entry with attached exits fills, you receive the entry's fill and
filled events, then a created event for each exit order. Each exit names
its entry in parent_order_id and its role in bracket_role (take_profit
or stop_loss). The filled entry names them in take_profit_order_id and
stop_loss_order_id. Changing an entry's attached exit prices before it fills
produces an edited event on the entry; changing an exit after the fill
produces an edited event on that exit.
Cancel and close reasons
Canceled orders carry cancel_reason: user, oco, reduce_only,
replaced, liquidation, expired, account_closed, trading_restricted,
you processed that has one (heartbeats included).
To recover after a disconnect, reconnect with all three:
text theme={null}
wss://account-stream.myfundedperpetuals.com/v1/stream?resume=<stream_id>&last_seq=&since=
- If the server still holds your stream (for about 60 seconds after the
disconnect), hello reports "resumed":true and you receive every frame
after last_seq, with no new snapshot.
- Otherwise, for example after a service restart or deploy, hello reports
"resumed":false with a new stream_id. Each account's snapshot follows,
and right after it the fills, filled, canceled, rejected, and expired orders,
and closed positions since since, each flagged "replay":true. Replace
your local state with the snapshot; use the replayed events to record what
− happened while you were away. Replayed events can repeat ones you already
− processed just before the disconnect: deduplicate by id.
+ happened while you were away. Price alerts that fired since since follow
+ snapshot_end. Replayed events can repeat ones you already processed just
+ before the disconnect: deduplicate by id (fire_id for price alerts).
snapshot_end then reports replay.complete. Replay reaches back about 100
seconds. If complete is false (you were away longer, or
incomplete_accounts lists an account), or you connected without since,
compare each snapshot's latest_fill.id with the last fill you processed for
that account. If they differ, request GET /v1/fills for the account (newest
first) and page until you reach your last processed fill. An order you held as
working that is missing from the snapshot and from the replay ended while you
were away: GET /v1/orders/{order_id} returns its outcome.
Keepalive and closing
The server sends {"type":"heartbeat"} every 15 seconds and a WebSocket ping
every 20 seconds. A heartbeat with "upstream_connected":false means the
service is reconnecting to its data source and events may be delayed; they