Real-time WebSocket API for account updates, P&L candles, watchlists, and news on a single authenticated connection.
WSS
/
v1
/
accounts
/
ws
What this stream gives you. Open one connection to wss://api.aries.com/v1/accounts/ws, authenticate, and the server will push updates whenever anything changes on your trading account - an order fills, a position is opened or closed, your buying power moves, news drops on a stock you hold, or a watchlist gets edited on another device. You get the same live picture a brokerage app would show, without polling.
Key Features
Order Status Updates
Real-time notifications when orders are placed, filled, partially filled, or cancelled. Track order lifecycle with millisecond latency.
Position Changes
Live updates when positions are opened, modified, or closed. Monitor both stock and option positions in real-time.
Balance Updates
Instant account balance updates including buying power, equity, cash movements, and margin changes.
P&L Candles
Real-time profit/loss candles at various intervals (15s, 1m, 5m, 15m, 1h, 1d, 1mo) for performance tracking.
Watchlist Updates
Live synchronization for the authenticated user’s watchlists. Each update carries the latest full watchlist state.
News Feed
Real-time news updates relevant to your portfolio and watchlist symbols.
Connection
Endpoint
Connect to the accounts WebSocket endpoint for all account-related streams (orders, positions, balances, P&L candles, watchlist updates, and news):Production:wss://api.aries.com/v1/accounts/wsMigration: If you were using wss://api.ariesfinancial.com/ws, update to the URL above.After connecting, authenticate within 5 seconds, then subscribe to the topics you need: account, pnl, watchlist, or news.
Authentication & Security
Authentication Required
Send a request message to POST /auth with your token in payload.body:Auth request example:
Authentication is required and must be completed within 5 seconds of connection. This WebSocket contains sensitive account information and requires a valid JWT token.
All connections must use WSS (WebSocket Secure) protocol. Each user receives only their own account updates, ensuring data privacy and security.
Session Management
Sessions expire after 65 minutes (3900000ms). The server:
Sends a refresh warning 5 minutes before expiration
Closes the connection when the session expires
Requires re-authentication after expiration
Security Best Practices
Always use WSS in production
Store JWT tokens securely
Implement automatic re-authentication on expiration warnings
Monitor connection status and implement reconnection logic
Subscription Topics
Each topic is a separate stream - subscribe only to what your app needs.
Subscribe request object
Every subscribe message uses the same top-level shape:
interval defaults to 1m if omitted. startTime must be RFC3339.
watchlist
{ "topic": "watchlist" }
None
None
Do not send accountId. The backend uses the authenticated user from the WebSocket session.
news
{ "topic": "news", "params": { ... } }
None
params.symbols, params.topics
Both filters are optional. topics affects the initial snapshot fetch; live pushed news is still symbol-filtered.
Account Updates (account)
One subscription covers everything that happens on a trading account:
Orders - order status changes as your orders move through the system (see the full status list below).
Positions - when a position is opened, increased, reduced, or closed, for both stocks and options.
Balance - buying power, equity, margin, and cash movements.
Account info - changes to the account record itself (type, options level, etc.).
Requires:accountId in params - the ID of the account you want to subscribe to.Initial snapshot: Right after you subscribe, the server sends a snapshot containing current account/balance fields, all open positions, and the ordersV2 list, so you start with the full state.
P&L Candles (pnl)
A live time-series of your account’s profit-and-loss, broken into “candles” of a fixed length (just like price candles on a chart). Useful for plotting equity curves and intraday performance.Supported intervals - choose the candle length that matches your dashboard:
Interval
Candle length
Typical use
15s
15 seconds
Very granular intraday tracking
1m
1 minute
Default - intraday equity curve
5m
5 minutes
Smoother intraday view
15m
15 minutes
Half-day / full-day view
1h
1 hour
Multi-day view
1d
1 day
Daily P&L history
1mo
1 month
Long-term performance
Requires:accountId and startTime (an RFC3339 timestamp marking how far back to start the series) in params. interval is optional and defaults to 1m.
Watchlist Updates (watchlist)
Returns the authenticated user’s current watchlists immediately after you subscribe. After that, every watchlist event carries the latest full watchlist array, so your app can replace local watchlist state without reconstructing add or remove operations.Requires: Nothing extra. Send only payload.topic = "watchlist". The backend ties the subscription to your authenticated user, not to a specific account.
News Updates (news)
Pushes news articles in real time.Requires:payload.topic = "news".Optional params:
symbols - array of tickers to filter by, for example ["AAPL", "TSLA"]. Live news subscriptions are filtered by symbol.
topics - array of topic strings, for example ["earnings"]. The backend accepts this on subscribe and uses it when it fetches the initial news snapshot. Live push filtering is still symbol-based.
Connection Management
Ping/Pong Keepalive
Send periodic pings to keep the WebSocket connection alive and detect network issues:Recommendation: Send a ping every 30-60 seconds to maintain connection health.
Handling Disconnects
Always implement reconnection logic with exponential backoff:
Start with 1 second delay
Double the delay on each retry (2s, 4s, 8s)
Cap maximum delay at 60 seconds
Re-authenticate after reconnection
Connection States
State
Description
Connected
WebSocket connection established
Authenticated
Successfully authenticated, ready to subscribe
Subscribed
Actively receiving updates
Refresh Warning
Session expiring in 5 minutes
Expired
Session expired, connection closing
Monitor the connection state and handle state transitions gracefully in your application.
Use Cases
Trading Applications
Real-time order status for trading platforms. Display live order fills, rejections, and modifications.
Portfolio Monitoring
Track position changes, P&L, and balance updates for portfolio management dashboards.
Risk Management
Monitor buying power, margin levels, and position sizes in real-time for risk control systems.
Order Notifications
Push notifications to mobile apps when orders are filled or positions change.
Performance Analytics
Real-time P&L candles for performance tracking and analytics dashboards.
News Alerts
Real-time news feed integration for trading signals and market sentiment analysis.
Message Flow
Connection Lifecycle
Subscription Flow
Connect to WebSocket endpoint
Authenticate within 5 seconds
Subscribe to desired topics
Receive the initial snapshot the server returns for the topic you subscribed to
Stream real-time updates
Unsubscribe when done
Monitor session expiration warnings
Error Handling
Common Errors
Error Code
Cause
Resolution
AUTH_REQUIRED
Did not authenticate within 5 seconds
Authenticate immediately after connecting
INVALID_TOKEN
Invalid or expired JWT token
Generate a new token and re-authenticate
MISSING_ACCOUNT_ID
accountId not provided in params
Include accountId in subscription params
UNKNOWN_TOPIC
Invalid subscription topic
Use valid topic: account, pnl, watchlist, news
MISSING_START_TIME
startTime not provided for P&L
Include an RFC3339 timestamp in params.startTime
INVALID_INTERVAL
Invalid PnL candle interval
Use: 15s, 1m, 5m, 15m, 1h, 1d, 1mo
ACCESS_DENIED
User does not own the account
Verify the account ID belongs to the authenticated user
The initial snapshot includes merged account and balance fields, positions, and ordersV2. After this, you’ll receive real-time event messages as changes occur.
Snapshot-only account fields
Most values in the snapshot account object are the same balance fields documented under Balance Updates. The fields below appear in the snapshot but are not part of the account.balance event payload:
Field
Type
What it means
isOptionLevelEnable
boolean
Whether options trading is currently enabled for the account at its approved optionsLevel.
shortSellingEnabled
boolean
Whether the account is approved to sell short.
sodTtlEquity
string (decimal)
Total account equity as of the start of the trading day. Use it as the baseline for day-change calculations.
sodTtlEquityUpdatedAt
string (date-time)
When sodTtlEquity was last stamped, i.e. the open of the current session.
intradayMarginBalance
string (decimal)
Current intraday margin balance for the account.
sodMarginTradeBalance
string (decimal)
Margin trade balance as of the start of the trading day.
sodGrossFundsAvailable
string (decimal)
Funds available at the start of the trading day, before holds and requirements.
sodNetFundsAvailable
string (decimal)
Funds available at the start of the trading day, after holds and requirements.
sodFundsAvailableDate
string (date)
Settlement date the start-of-day funds-available figures apply to, in YYYY-MM-DD format.
freestockUnsettleBalance
string (decimal)
Unsettled balance attributable to free-stock awards.
accountType, accountClass, and optionsLevel are free-form strings. See Account-level enums for illustrative values - do not hard-code against them.
P&L Candles
Subscribe to P&L Candles
Track profit/loss at specified intervals. startTime is required:
Watchlist and news subscriptions are user-level and don’t require an account ID. The watchlist topic returns the full current watchlist array on subscribe and on every later update.
Payload Data Types
Field group
JSON type
Notes
id, topic, params.accountId, enum fields
string
Request IDs and topic/account identifiers are strings.
Trading amounts and quantities
string
Decimal fields such as qty, price, avgPrice, totalEquity, PDT, and P&L values are serialized as strings.
pendingOrdersCount
integer
Count fields remain numeric integers.
timestamp, createdAt, updatedAt
string
WebSocket envelopes and domain timestamps use RFC3339 strings. Auth event payload timestamps use Unix milliseconds.
expiresIn, expiresAt, t
integer
Auth expiry values are Unix milliseconds. P&L t values are Unix seconds.
ordersV2, positions
array
Account subscription snapshots return arrays for these fields.
watchlist snapshot and watchlist event payload.data
array
Watchlist subscribe responses and watchlist events both return the full watchlist array.
Real-Time Update Messages
Once subscribed, the server pushes event messages as data changes.
The order status field is ordStatus. These are the full set of states an order can be in over its lifetime:
Status
What it means
What to show the user
PENDING_NEW
The order is on its way to the exchange but hasn’t been accepted yet.
”Submitting…”
NEW
The exchange has accepted the order and it is live in the book (working but not yet executed).
”Working” / “Open”
PARTIALLY_FILLED
Some of the order’s quantity has executed; the rest is still working. Watch cumQty and leavesQty.
”Partially filled”
FILLED
The entire order quantity has executed. The order is done.
”Filled” / “Complete”
PENDING_CANCEL
You sent a cancel request; the exchange has not confirmed it yet.
”Cancelling…”
CANCELED
The order was cancelled (by you, by the system, or by the exchange). It will not execute further.
”Cancelled”
PENDING_REPLACE
You sent a modify/replace request; the exchange has not confirmed it yet.
”Modifying…”
REJECTED
The order was refused (bad parameters, insufficient buying power, halted symbol, etc.). It never made it onto the book.
”Rejected” + error reason
EXPIRED
The order reached its time-in-force limit without filling (e.g. a DAY order that didn’t fill before market close).
”Expired”
DONE_FOR_DAY
The order (or its remaining quantity) is finished for the current session but not permanently cancelled.
”Done for day”
REPLACED
A modify/replace request was accepted; this order has been superseded by the replacement.
”Modified”
STOPPED
The order was stopped by the exchange at a guaranteed price, pending execution.
”Stopped”
SUSPENDED
The order is temporarily inactive/held and not currently working.
”Suspended”
CALCULATED
The order has been completed with fees/allocations calculated (post-trade state).
”Calculated”
ACCEPTED_FOR_BID
The order has been accepted for a bid (used in certain program/portfolio flows).
”Accepted for bid”
Order field enums
Order event payloads contain several enum fields. Here’s the full vocabulary you’ll see across stocks and options:side - direction of the trade:
Value
Meaning
BUY
Buying - opening a long position or closing a short.
SELL
Selling - closing a long position or opening a short.
SELL_SHORT
Selling shares you do not own (short sale). Subject to short-sale regulations.
SELL_SHORT_EXEMPT
Short sale exempt from the uptick/short-sale price test.
Order events report side using the values above (BUY, SELL, SELL_SHORT, SELL_SHORT_EXEMPT). If you placed an order with side: "BUY_TO_COVER", the resulting order events report it as BUY — BUY_TO_COVER is accepted when placing an order but does not appear as-is in socket events.
type - order type, i.e. how the order is priced:
Value
Meaning
MARKET
Execute immediately at the best available price. No price guarantee.
LIMIT
Execute only at the specified price or better. Price guarantee, no execution guarantee.
STOP
Sits inactive until the stop price is touched, then becomes a market order.
STOP_LIMIT
Sits inactive until the stop price is touched, then becomes a limit order at the limit price.
timeInForce - how long the order stays alive:
Value
Meaning
DAY
Active until the end of today’s regular trading session, then cancelled if not filled.
GTC
Good ‘Til Cancelled - stays open until you cancel it (broker may cap at 60-90 days).
IOC
Immediate Or Cancel - fill whatever you can immediately, cancel the rest.
FOK
Fill Or Kill - fill the entire order immediately, or cancel it entirely.
GTD
Good ‘Til Date - stays open until a specific date you provide.
GTX
Good ‘Til Crossing - participates in the crossing/auction session.
AT_THE_OPENING
Execute at the market open; cancelled if it cannot participate in the opening.
AT_THE_CLOSE
Execute at the market close.
GOOD_THROUGH_CROSSING
Remains active through the crossing session.
AT_CROSSING
Execute only in the crossing/auction.
EXTENDED_HOURS
Eligible to trade during extended (pre/post-market) hours.
securityType / instrument - what asset class:
Value
Meaning
EQUITY
Stock or ETF.
OPTION
Single option contract.
Multi-leg orders are not a securityType. Instead, the order carries a separate category field with values SINGLE_LEG, MULTI_LEG, or EQUITY; a MULTI_LEG order lists its legs in the legs array, each with its own securityType (EQUITY/OPTION).
putCall (options only): CALL or PUT.positionEffect (options only): OPEN (creates/increases a position) or CLOSE (reduces/closes one).
Position updates emit primary fields avgPrice, todayRealizedPnL, and securityType. The backend also emits backward-compatible aliases avgCost, realizedPL, and instrument.mtmRealizedPnL is a separate value from todayRealizedPnL: it is the mark-to-market realized P&L for the position, measured against the previous close rather than against the original entry price.
The account topic can also emit account.balance.apex. That event is a partial Apex-sourced balance update and currently carries accountId, fullyPaidUnsettledFunds, amountAvailableToWithdraw, and updatedAt. Clients should merge that payload into their latest balance state instead of treating it as a full balance snapshot.
Balance field reference - decimal values arrive as JSON strings to preserve precision:
Field
What it means
accountId
The account this balance update belongs to.
sodPositionsMarketValue
Start-of-day market value of all open positions (i.e. what your holdings were worth when the trading day opened).
netBuyingPower
Total purchasing power available right now across all instruments. The most common number to display as “buying power” in a UI.
stockBuyingPower
How much you can use specifically to buy stock (typically up to 2x cash on margin).
dayTradeBuyingPower
How much you can use for same-day round-trip trades (typically up to 4x equity for pattern day traders). Resets at end of day.
optionBuyingPower
How much you can use to buy options. Options usually require cash, so this is typically lower than stock buying power.
dayTradeOvernightRegTBuyingPower
Day-trade buying power that can also be held overnight under Reg T rules.
totalEquity
Cash + market value of positions - margin debit. Your account’s net worth.
settledFunds
Cash that has fully settled and is freely available (T+1/T+2 has passed).
unsettledFunds
Cash from recent sales that hasn’t settled yet - usable for most trades, but cash accounts have restrictions.
heldBackFunds
Cash temporarily reserved for pending orders or compliance holds. Not usable.
amountAvailableToWithdraw
Cash currently available to withdraw from the account.
fullyPaidUnsettledFunds
Unsettled funds that are fully paid and tracked separately by the backend.
grossMargin
Total amount you have borrowed from the broker on margin.
pendingOrdersMarginRequirements
Margin already earmarked for orders that are working but not yet filled.
maintReq
Maintenance requirement - the minimum equity you must hold to support your current positions. Drop below this and you may get a margin call.
creditMultiplier
How many times your equity you can borrow on standard margin (typically 2).
pendingOrdersCount
Number of orders currently working.
credit
Total margin credit line extended to the account.
creditRemaining
How much of that credit line is still available.
realizedPL
Cumulative profit/loss from positions that have been closed.
unRealizedPL
Profit/loss on positions you currently hold open - i.e. paper gains/losses based on current market value.
SMA
Special Memorandum Account - a margin-account balance that effectively stores up “extra” buying power from gains. Reg T concept.
smaCreditRemaining
SMA buying power still available.
PDT
Pattern Day Trader flag balance - relates to the four-day-trade rule and the $25,000 minimum equity requirement under FINRA Rule 4210.
pdtCreditRemaining
Remaining day-trade buying power for a flagged PDT account.
startOfDayCash
Cash balance at the start of today’s session. Useful for calculating daily change.
valueBought
Dollar value of purchases executed today.
valueSold
Dollar value of sales executed today.
Account-level enums
The account-info and account snapshot messages include a few classification fields. The values below are illustrative — these fields are returned as free-form strings and are not validated or enumerated by the Aries API, so treat exact spellings as examples and do not hard-code against them.accountType - how the account is funded and settled:
Value
Meaning
CASH
Cash account - trades must be paid for with settled funds; no margin borrowing.
MARGIN
Standard margin account - can borrow against equity (subject to Reg T).
IRA
Individual Retirement Account - tax-advantaged, no margin borrowing.
ROTH_IRA
Roth IRA - after-tax retirement account.
RETIREMENT
Generic retirement account (401k, SEP, etc.).
accountClass - who owns the account:
Value
Meaning
INDIVIDUAL
Single-person account.
JOINT
Joint ownership (two or more individuals).
CORPORATE
Owned by a corporation.
TRUST
Owned by a trust.
LLC
Owned by an LLC.
optionsLevel - what option strategies the account is approved for. Higher levels unlock more complex (and risky) strategies:
When you receive a refreshAuth warning, you should re-authenticate or be prepared to reconnect. The connection will be closed when the session expires.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Finance.dev by Aries","description":"Finance.dev is the developer platform of Aries (Aries Financial Inc.): a stock market API for trading, real-time market data, options and prediction markets, with SDKs, plus Aries MCP (also called Finance.dev MCP), the remote MCP server that connects Claude, ChatGPT, Cursor and other AI agents to the stock market and Aries brokerage accounts.","colors":{"primary":"#0BAA5E","light":"#0BAA5E","dark":"#098F4E"},"logo":{"light":"https://mintcdn.com/ariesfinancialinc/RAN-JEltzDnib-_A/logo/light.svg?fit=max\u0026auto=format\u0026n=RAN-JEltzDnib-_A\u0026q=85\u0026s=4eae127cdf55bb09159d2b5a625690e3","dark":"https://mintcdn.com/ariesfinancialinc/RAN-JEltzDnib-_A/logo/dark.svg?fit=max\u0026auto=format\u0026n=RAN-JEltzDnib-_A\u0026q=85\u0026s=fbee595bbc78c2506c5e92673b91d2c7"},"favicon":"https://mintcdn.com/ariesfinancialinc/RAN-JEltzDnib-_A/favicon.svg?fit=max\u0026auto=format\u0026n=RAN-JEltzDnib-_A\u0026q=85\u0026s=0c47f5ea65b933ab26eae6eaca2fc12c","api":{"openapi":["openapi.json"],"playground":{"display":"interactive"}},"navbar":{"links":[{"href":"mailto:support@aries.com","label":"Support"}],"primary":{"type":"button","label":"Aries","href":"https://aries.com"}},"seo":{"organization":{"name":"Aries","legalName":"Aries Financial Inc.","url":"https://aries.com"}},"contextual":{"options":["chatgpt","claude","view"],"display":"header"},"markdown":{"instructions":["Finance.dev is the developer platform of Aries (Aries Financial Inc.). Aries MCP, also called Finance.dev MCP, is the remote MCP server from Aries: https://mcp.aries.com/mcp. Both names refer to the same server.","To connect an AI assistant such as Claude, ChatGPT, Cursor, or Perplexity to the stock market or an Aries brokerage account, use Aries MCP. It uses OAuth sign-in, with no API key. Setup guides: https://finance.dev/mcp-server. Tool list: https://finance.dev/mcp-server/tools.","To build your own application on Aries, use the Finance.dev stock market API: https://finance.dev/api-reference."]},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"ariesfinancialinc","hasAudioNarration":false,"actualSubdomain":"ariesfinancialinc","customDomains":["finance.dev"],"gitSource":{"type":"github","owner":"aries-financial-inc","repo":"mintlify-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6b083b3201293b701501bc7f","clientVersion":"0.0.4336","searchFilterCounts":[{"language":"default","tag":"Supplemental API","count":116},{"language":"default","tag":"Core API","count":38},{"language":"default","tag":"Orders","count":22},{"language":"default","tag":"Prediction API","count":20},{"language":"default","tag":"Stock Alternative","count":18},{"language":"default","tag":"Analytics","count":13},{"language":"default","tag":"Options","count":11},{"language":"default","tag":"Guide","count":10},{"language":"default","tag":"Stocks","count":10},{"language":"default","tag":"MCP Server","count":10}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[{"filePath":"custom.css","content":"html{visibility:visible!important;opacity:1!important}body{opacity:1!important;transition:none!important;will-change:auto!important}html{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeSpeed;font-display:swap}.hero-title{text-align:center!important;font-size:clamp(2rem, 5vw, 3rem)!important;font-weight:700!important;margin:0 auto!important;will-change:transform!important}.hero-description,.hero-title+p{text-align:center!important;max-width:800px!important;margin:1rem auto!important}div[class*=\"CardGroup\"],.card-group{display:grid!important;grid-template-columns:repeat(auto-fit, minmax(300px, 1fr))!important;gap:1.5rem!important;contain:layout style!important;content-visibility:auto!important}.aries-oauth-dialog[open]{display:flex;align-items:center;justify-content:center;width:100%;min-height:100dvh;min-height:100vh;max-width:100vw;max-height:100dvh;max-height:100vh;box-sizing:border-box;margin:0;border:none;padding:1rem;background:transparent;overflow:auto;overscroll-behavior:contain}.aries-oauth-dialog::backdrop{background:rgba(0, 0, 0, 0.65);backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}.aries-oauth-dialog[data-oauth-theme=\"light\"]::backdrop{background:rgba(0, 0, 0, 0.45);backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}.aries-oauth-dialog[data-oauth-theme=\"dark\"]::backdrop{background:rgba(0, 0, 0, 0.72);backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}.welcome-hero{background:linear-gradient(180deg, #ecfdf5 0%, #d1fae5 50%, #ecfdf5 100%)!important}.welcome-hero-gradient{background:linear-gradient(to top, #a7f3d0, transparent)!important}.welcome-feature-box{background:#E7F6EF!important;border:1px solid #0BAA5E!important;box-shadow:0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)!important}.welcome-feature-box:hover{background:#DAF2E7!important;border-color:#0BAA5E!important;transform:translateY(-4px)!important;box-shadow:0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)!important}.welcome-feature-link{color:#0BAA5E!important}.welcome-feature-title{color:#000000!important}.dark .welcome-hero{background:linear-gradient(180deg, rgba(11, 170, 94, 0.15) 0%, rgba(11, 170, 94, 0.25) 50%, rgba(11, 170, 94, 0.15) 100%)!important}.dark .welcome-hero-gradient{background:linear-gradient(to top, rgba(11, 170, 94, 0.2), transparent)!important}.dark .welcome-feature-box{background:rgba(11, 170, 94, 0.15)!important;border:1px solid rgba(11, 170, 94, 0.5)!important}.dark .welcome-feature-box:hover{background:rgba(11, 170, 94, 0.2)!important;border-color:rgba(11, 170, 94, 0.6)!important}.dark .welcome-feature-link{color:#0BAA5E!important}.dark .welcome-feature-title{color:#FFFFFF!important}.welcome-feature-box-coming-soon{cursor:default!important;pointer-events:none!important}.welcome-feature-box-coming-soon:hover{transform:none!important}.welcome-coming-soon{color:#0BAA5E!important;font-weight:600!important}.dark .welcome-coming-soon{color:#0BAA5E!important}*/\n\n/* Hero Section Theme-Aware Styling */\n/* Light mode hero styling (default) */\n.hero-title{color:#000000!important}.hero-description{color:#000000!important}.hero-footnote{color:#000000!important}.hero-link{color:#0BAA5E!important}.section-title{color:#000000!important}.welcome-cards a[class*=\"Card\"],.welcome-cards .card{transition:transform 0.22s cubic-bezier(0.4, 0, 0.2, 1),\n box-shadow 0.22s cubic-bezier(0.4, 0, 0.2, 1),\n border-color 0.22s cubic-bezier(0.4, 0, 0.2, 1),\n background-color 0.22s cubic-bezier(0.4, 0, 0.2, 1)!important;transform-origin:center center!important}.welcome-cards,.welcome-cards div[class*=\"CardGroup\"],.welcome-cards .card-group{overflow:visible!important}.welcome-cards a[class*=\"Card\"]:hover,.welcome-cards .card:hover{transform:translateY(-6px)!important;border-color:rgba(11, 170, 94, 0.45)!important;box-shadow:0 18px 30px -12px rgba(0, 0, 0, 0.16),\n 0 10px 18px -14px rgba(11, 170, 94, 0.35)!important}.dark .welcome-cards a[class*=\"Card\"]:hover,.dark .welcome-cards .card:hover{border-color:rgba(11, 170, 94, 0.55)!important;box-shadow:0 18px 30px -12px rgba(0, 0, 0, 0.45),\n 0 10px 22px -16px rgba(11, 170, 94, 0.35)!important}.dark .hero-title{color:#FFFFFF!important}.dark .hero-description{color:#D1D5DB!important}.dark .hero-footnote{color:#9CA3AF!important}.dark .hero-link{color:#0BAA5E!important}.dark .section-title{color:#FFFFFF!important}@media (max-width: 1024px){.welcome-side-by-side{grid-template-columns:1fr!important}}@media (max-width: 640px){.welcome-cards{padding:0 24px!important}}.dark select,.dark select option{background-color:#000000!important;color:#ffffff!important;border-color:rgba(255, 255, 255, 0.2)!important}.dark select:focus,.dark select:active{background-color:#000000!important;color:#ffffff!important}.dark [class*=\"playground\"] select,.dark [class*=\"api\"] select,.dark [class*=\"request\"] select,.dark form select{background-color:#000000!important;color:#ffffff!important;border-color:rgba(255, 255, 255, 0.2)!important}.dark [class*=\"playground\"] select option,.dark [class*=\"api\"] select option,.dark [class*=\"request\"] select option,.dark form select option{background-color:#000000!important;color:#ffffff!important}select,select option{background-color:#ffffff!important;color:#000000!important}.prompt{background-color:#ffffff!important;border-color:rgba(10, 15, 13, 0.1)!important}.dark .prompt{background-color:#0B0C0E!important;border-color:rgba(255, 255, 255, 0.1)!important}img[src=\"/logo/claude-logo.png\"]{border-radius:23%!important}img[src=\"https://cdn.simpleicons.org/cursor\"],img[src=\"/logo/chatgpt-logo.png\"]{background-color:#ffffff!important;border-radius:23%!important;padding:3px!important}.nav-tabs{column-gap:1.25rem!important;overflow-x:auto;scrollbar-width:none}.nav-tabs::-webkit-scrollbar{display:none}.nav-tabs-item{white-space:nowrap;flex-shrink:0}@media (max-width: 1439px){.nav-tabs-item>svg,.nav-tabs-item>img{display:none!important}}@media (max-width: 1199px){.nav-tabs{column-gap:0.75rem!important}}@media (max-width: 1099px){.nav-tabs{font-size:0.8125rem!important}}"}]}
{"page":{"pagePath":"websockets/account-updates","slug":"/websockets/account-updates","pageMetadata":{"title":"Account Updates WebSocket","description":"Real-time WebSocket API for account updates, P\u0026L candles, watchlists, and news on a single authenticated connection.","asyncapi":"asyncapi-specs/account-updates.json accountUpdatesStream","href":"/websockets/account-updates"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Real-time WebSocket API for account updates, P\u0026L candles, watchlists, and news on a single authenticated connection.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,hr:`hr`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Accordion,AccordionGroup,Card,CardGroup,CodeBlock,Heading,Info,Mermaid,Note,Tab,Table,Tabs,Warning}=_components;if(!Accordion)_missingMdxReference(`Accordion`,true);if(!AccordionGroup)_missingMdxReference(`AccordionGroup`,true);if(!Card)_missingMdxReference(`Card`,true);if(!CardGroup)_missingMdxReference(`CardGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!Mermaid)_missingMdxReference(`Mermaid`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`What this stream gives you.`}),` Open one connection to `,_jsx(_components.code,{children:`wss://api.aries.com/v1/accounts/ws`}),`, authenticate, and the server will push updates whenever `,_jsx(_components.strong,{children:`anything changes on your trading account`}),` - an order fills, a position is opened or closed, your buying power moves, news drops on a stock you hold, or a watchlist gets edited on another device. You get the same live picture a brokerage app would show, without polling.`]})}),`\n`,_jsxs(AccordionGroup,{children:[_jsx(Accordion,{title:`Key Features`,icon:`star`,defaultOpen:true,id:`key-features`,children:_jsxs(CardGroup,{cols:2,children:[_jsx(Card,{title:`Order Status Updates`,icon:`list-check`,children:_jsx(_components.p,{children:`Real-time notifications when orders are placed, filled, partially filled, or cancelled. Track order lifecycle with millisecond latency.`})}),_jsx(Card,{title:`Position Changes`,icon:`chart-pie`,children:_jsx(_components.p,{children:`Live updates when positions are opened, modified, or closed. Monitor both stock and option positions in real-time.`})}),_jsx(Card,{title:`Balance Updates`,icon:`wallet`,children:_jsx(_components.p,{children:`Instant account balance updates including buying power, equity, cash movements, and margin changes.`})}),_jsx(Card,{title:`P\u0026L Candles`,icon:`chart-candlestick`,children:_jsxs(_components.p,{children:[`Real-time profit/loss candles at various intervals (`,_jsx(_components.code,{children:`15s`}),`, `,_jsx(_components.code,{children:`1m`}),`, `,_jsx(_components.code,{children:`5m`}),`, `,_jsx(_components.code,{children:`15m`}),`, `,_jsx(_components.code,{children:`1h`}),`, `,_jsx(_components.code,{children:`1d`}),`, `,_jsx(_components.code,{children:`1mo`}),`) for performance tracking.`]})}),_jsx(Card,{title:`Watchlist Updates`,icon:`eye`,children:_jsx(_components.p,{children:`Live synchronization for the authenticated user’s watchlists. Each update carries the latest full watchlist state.`})}),_jsx(Card,{title:`News Feed`,icon:`newspaper`,children:_jsx(_components.p,{children:`Real-time news updates relevant to your portfolio and watchlist symbols.`})})]})}),_jsxs(Accordion,{title:`Connection`,icon:`plug`,id:`connection`,children:[_jsx(Heading,{level:`3`,id:`endpoint`,children:`Endpoint`}),_jsxs(_components.p,{children:[`Connect to the `,_jsx(_components.strong,{children:`accounts`}),` WebSocket endpoint for all account-related streams (orders, positions, balances, P\u0026L candles, watchlist updates, and news):`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Production:`}),` `,_jsx(_components.code,{children:`wss://api.aries.com/v1/accounts/ws`})]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Migration:`}),` If you were using `,_jsx(_components.code,{children:`wss://api.ariesfinancial.com/ws`}),`, update to the URL above.`]}),_jsxs(_components.p,{children:[`After connecting, authenticate within 5 seconds, then subscribe to the topics you need: `,_jsx(_components.code,{children:`account`}),`, `,_jsx(_components.code,{children:`pnl`}),`, `,_jsx(_components.code,{children:`watchlist`}),`, or `,_jsx(_components.code,{children:`news`}),`.`]})]}),_jsxs(Accordion,{title:`Authentication \u0026 Security`,icon:`shield-check`,id:`authentication-and-security`,children:[_jsx(Heading,{level:`3`,id:`authentication-required`,children:`Authentication Required`}),_jsxs(Warning,{children:[_jsxs(_components.p,{children:[`Send a `,_jsx(_components.strong,{children:`request`}),` message to `,_jsx(_components.strong,{children:`POST /auth`}),` with your token in `,_jsx(_components.code,{children:`payload.body`}),`:`]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Auth request example:`})}),_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`11`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"request\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"auth-001\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"payload\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"method\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"POST\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"path\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"/auth\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"body\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"token\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"YOUR_ACCESS_TOKEN\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsxs(_components.p,{children:[`Authentication is `,_jsx(_components.strong,{children:`required`}),` and must be completed within 5 seconds of connection. This WebSocket contains sensitive account information and requires a valid JWT token.`]})]}),_jsxs(_components.p,{children:[`All connections must use `,_jsx(_components.strong,{children:`WSS (WebSocket Secure)`}),` protocol. Each user receives only their own account updates, ensuring data privacy and security.`]}),_jsx(Heading,{level:`3`,id:`session-management`,children:`Session Management`}),_jsx(_components.p,{children:`Sessions expire after 65 minutes (3900000ms). The server:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Sends a refresh warning `,_jsx(_components.strong,{children:`5 minutes`}),` before expiration`]}),`\n`,_jsx(_components.li,{children:`Closes the connection when the session expires`}),`\n`,_jsx(_components.li,{children:`Requires re-authentication after expiration`}),`\n`]}),_jsx(Heading,{level:`3`,id:`security-best-practices`,children:`Security Best Practices`}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Always use WSS in production`}),`\n`,_jsx(_components.li,{children:`Store JWT tokens securely`}),`\n`,_jsx(_components.li,{children:`Implement automatic re-authentication on expiration warnings`}),`\n`,_jsx(_components.li,{children:`Monitor connection status and implement reconnection logic`}),`\n`]})]}),_jsxs(Accordion,{title:`Subscription Topics`,icon:`filter`,id:`subscription-topics`,children:[_jsx(_components.p,{children:`Each topic is a separate stream - subscribe only to what your app needs.`}),_jsx(Heading,{level:`3`,id:`subscribe-request-object`,children:`Subscribe request object`}),_jsx(_components.p,{children:`Every subscribe message uses the same top-level shape:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`8`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"subscribe\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"req-001\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"payload\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"topic\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"account|pnl|watchlist|news\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"params\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {}`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Topic`}),_jsxs(_components.th,{children:[`What to send in `,_jsx(_components.code,{children:`payload`})]}),_jsx(_components.th,{children:`Required fields`}),_jsx(_components.th,{children:`Optional fields`}),_jsx(_components.th,{children:`Notes`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`account`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{ \"topic\": \"account\", \"params\": { \"accountId\": \"...\" } }`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`params.accountId`})}),_jsx(_components.td,{children:`None`}),_jsx(_components.td,{children:`The backend verifies access to one trading account.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`pnl`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{ \"topic\": \"pnl\", \"params\": { \"accountId\": \"...\", \"startTime\": \"...\", \"interval\": \"1m\" } }`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`params.accountId`}),`, `,_jsx(_components.code,{children:`params.startTime`})]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`params.interval`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`interval`}),` defaults to `,_jsx(_components.code,{children:`1m`}),` if omitted. `,_jsx(_components.code,{children:`startTime`}),` must be RFC3339.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`watchlist`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{ \"topic\": \"watchlist\" }`})}),_jsx(_components.td,{children:`None`}),_jsx(_components.td,{children:`None`}),_jsxs(_components.td,{children:[`Do not send `,_jsx(_components.code,{children:`accountId`}),`. The backend uses the authenticated user from the WebSocket session.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`news`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{ \"topic\": \"news\", \"params\": { ... } }`})}),_jsx(_components.td,{children:`None`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`params.symbols`}),`, `,_jsx(_components.code,{children:`params.topics`})]}),_jsxs(_components.td,{children:[`Both filters are optional. `,_jsx(_components.code,{children:`topics`}),` affects the initial snapshot fetch; live pushed news is still symbol-filtered.`]})]})]})]}),_jsxs(Heading,{level:`3`,id:`account-updates-account`,children:[`Account Updates (`,_jsx(_components.code,{children:`account`}),`)`]}),_jsx(_components.p,{children:`One subscription covers everything that happens on a trading account:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Orders`}),` - order status changes as your orders move through the system (see the full status list below).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Positions`}),` - when a position is opened, increased, reduced, or closed, for both stocks and options.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Balance`}),` - buying power, equity, margin, and cash movements.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Account info`}),` - changes to the account record itself (type, options level, etc.).`]}),`\n`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Requires:`}),` `,_jsx(_components.code,{children:`accountId`}),` in `,_jsx(_components.code,{children:`params`}),` - the ID of the account you want to subscribe to.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Initial snapshot:`}),` Right after you subscribe, the server sends a snapshot containing current account/balance fields, all open positions, and the `,_jsx(_components.code,{children:`ordersV2`}),` list, so you start with the full state.`]}),_jsx(_components.hr,{}),_jsxs(Heading,{level:`3`,id:`p%26l-candles-pnl`,children:[`P\u0026L Candles (`,_jsx(_components.code,{children:`pnl`}),`)`]}),_jsx(_components.p,{children:`A live time-series of your account’s profit-and-loss, broken into “candles” of a fixed length (just like price candles on a chart). Useful for plotting equity curves and intraday performance.`}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Supported intervals`}),` - choose the candle length that matches your dashboard:`]}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Interval`}),_jsx(_components.th,{children:`Candle length`}),_jsx(_components.th,{children:`Typical use`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`15s`})}),_jsx(_components.td,{children:`15 seconds`}),_jsx(_components.td,{children:`Very granular intraday tracking`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`1m`})}),_jsx(_components.td,{children:`1 minute`}),_jsx(_components.td,{children:`Default - intraday equity curve`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`5m`})}),_jsx(_components.td,{children:`5 minutes`}),_jsx(_components.td,{children:`Smoother intraday view`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`15m`})}),_jsx(_components.td,{children:`15 minutes`}),_jsx(_components.td,{children:`Half-day / full-day view`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`1h`})}),_jsx(_components.td,{children:`1 hour`}),_jsx(_components.td,{children:`Multi-day view`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`1d`})}),_jsx(_components.td,{children:`1 day`}),_jsx(_components.td,{children:`Daily P\u0026L history`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`1mo`})}),_jsx(_components.td,{children:`1 month`}),_jsx(_components.td,{children:`Long-term performance`})]})]})]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Requires:`}),` `,_jsx(_components.code,{children:`accountId`}),` and `,_jsx(_components.code,{children:`startTime`}),` (an RFC3339 timestamp marking how far back to start the series) in `,_jsx(_components.code,{children:`params`}),`. `,_jsx(_components.code,{children:`interval`}),` is optional and defaults to `,_jsx(_components.code,{children:`1m`}),`.`]}),_jsx(_components.hr,{}),_jsxs(Heading,{level:`3`,id:`watchlist-updates-watchlist`,children:[`Watchlist Updates (`,_jsx(_components.code,{children:`watchlist`}),`)`]}),_jsx(_components.p,{children:`Returns the authenticated user’s current watchlists immediately after you subscribe. After that, every watchlist event carries the latest full watchlist array, so your app can replace local watchlist state without reconstructing add or remove operations.`}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Requires:`}),` Nothing extra. Send only `,_jsx(_components.code,{children:`payload.topic = \"watchlist\"`}),`. The backend ties the subscription to your authenticated user, not to a specific account.`]}),_jsx(_components.hr,{}),_jsxs(Heading,{level:`3`,id:`news-updates-news`,children:[`News Updates (`,_jsx(_components.code,{children:`news`}),`)`]}),_jsx(_components.p,{children:`Pushes news articles in real time.`}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Requires:`}),` `,_jsx(_components.code,{children:`payload.topic = \"news\"`}),`.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Optional params`}),`:`]}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`symbols`}),` - array of tickers to filter by, for example `,_jsx(_components.code,{children:`[\"AAPL\", \"TSLA\"]`}),`. Live news subscriptions are filtered by symbol.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`topics`}),` - array of topic strings, for example `,_jsx(_components.code,{children:`[\"earnings\"]`}),`. The backend accepts this on subscribe and uses it when it fetches the initial news snapshot. Live push filtering is still symbol-based.`]}),`\n`]})]}),_jsxs(Accordion,{title:`Connection Management`,icon:`plug`,id:`connection-management`,children:[_jsx(Heading,{level:`3`,id:`ping%2Fpong-keepalive`,children:`Ping/Pong Keepalive`}),_jsx(_components.p,{children:`Send periodic pings to keep the WebSocket connection alive and detect network issues:`}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Recommendation:`}),` Send a ping every 30-60 seconds to maintain connection health.`]}),_jsx(Heading,{level:`3`,id:`handling-disconnects`,children:`Handling Disconnects`}),_jsx(_components.p,{children:`Always implement reconnection logic with exponential backoff:`}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Start with 1 second delay`}),`\n`,_jsx(_components.li,{children:`Double the delay on each retry (2s, 4s, 8s)`}),`\n`,_jsx(_components.li,{children:`Cap maximum delay at 60 seconds`}),`\n`,_jsx(_components.li,{children:`Re-authenticate after reconnection`}),`\n`]}),_jsx(Heading,{level:`3`,id:`connection-states`,children:`Connection States`}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`State`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Connected`})}),_jsx(_components.td,{children:`WebSocket connection established`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Authenticated`})}),_jsx(_components.td,{children:`Successfully authenticated, ready to subscribe`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Subscribed`})}),_jsx(_components.td,{children:`Actively receiving updates`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Refresh Warning`})}),_jsx(_components.td,{children:`Session expiring in 5 minutes`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Expired`})}),_jsx(_components.td,{children:`Session expired, connection closing`})]})]})]}),_jsx(Info,{children:_jsx(_components.p,{children:`Monitor the connection state and handle state transitions gracefully in your application.`})})]}),_jsx(Accordion,{title:`Use Cases`,icon:`lightbulb`,id:`use-cases`,children:_jsxs(CardGroup,{cols:2,children:[_jsx(Card,{title:`Trading Applications`,icon:`arrow-right-arrow-left`,children:_jsx(_components.p,{children:`Real-time order status for trading platforms. Display live order fills, rejections, and modifications.`})}),_jsx(Card,{title:`Portfolio Monitoring`,icon:`chart-line`,children:_jsx(_components.p,{children:`Track position changes, P\u0026L, and balance updates for portfolio management dashboards.`})}),_jsx(Card,{title:`Risk Management`,icon:`shield-halved`,children:_jsx(_components.p,{children:`Monitor buying power, margin levels, and position sizes in real-time for risk control systems.`})}),_jsx(Card,{title:`Order Notifications`,icon:`bell`,children:_jsx(_components.p,{children:`Push notifications to mobile apps when orders are filled or positions change.`})}),_jsx(Card,{title:`Performance Analytics`,icon:`chart-pie`,children:_jsx(_components.p,{children:`Real-time P\u0026L candles for performance tracking and analytics dashboards.`})}),_jsx(Card,{title:`News Alerts`,icon:`newspaper`,children:_jsx(_components.p,{children:`Real-time news feed integration for trading signals and market sentiment analysis.`})})]})}),_jsxs(Accordion,{title:`Message Flow`,icon:`diagram-project`,id:`message-flow`,children:[_jsx(Heading,{level:`3`,id:`connection-lifecycle`,children:`Connection Lifecycle`}),_jsx(Mermaid,{chart:`sequenceDiagram\n participant Client\n participant Server\n\n Client->>Server: Connect to WebSocket\n Note over Server: Wait up to 5 seconds\n Client->>Server: Send Auth Request\n Server->>Client: Auth Success (type: event, action: authSuccess)\n\n Client->>Server: Subscribe (topic: account)\n Server->>Client: Subscribed (type: subscribed, with snapshot)\n\n loop Real-time Updates\n Server->>Client: Order Updates (type: event, name: account.order)\n Server->>Client: Position Updates (type: event, name: account.position)\n Server->>Client: Balance Updates (type: event, name: account.balance)\n end\n\n Note over Server: 5 minutes before expiry\n Server->>Client: Refresh Auth Warning (type: event, action: refreshAuth)\n\n Client->>Server: Ping (type: ping)\n Server->>Client: Pong (type: pong)\n\n Note over Server: Session expires\n Server->>Client: Auth Expired (type: event, action: authExpired)\n Server->>Client: Close Connection`}),_jsx(Heading,{level:`3`,id:`subscription-flow`,children:`Subscription Flow`}),_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Connect`}),` to WebSocket endpoint`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Authenticate`}),` within 5 seconds`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Subscribe`}),` to desired topics`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Receive`}),` the initial snapshot the server returns for the topic you subscribed to`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Stream`}),` real-time updates`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Unsubscribe`}),` when done`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Monitor`}),` session expiration warnings`]}),`\n`]})]}),_jsxs(Accordion,{title:`Error Handling`,icon:`triangle-exclamation`,id:`error-handling`,children:[_jsx(Heading,{level:`3`,id:`common-errors`,children:`Common Errors`}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Error Code`}),_jsx(_components.th,{children:`Cause`}),_jsx(_components.th,{children:`Resolution`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`AUTH_REQUIRED`})}),_jsx(_components.td,{children:`Did not authenticate within 5 seconds`}),_jsx(_components.td,{children:`Authenticate immediately after connecting`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`INVALID_TOKEN`})}),_jsx(_components.td,{children:`Invalid or expired JWT token`}),_jsx(_components.td,{children:`Generate a new token and re-authenticate`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`MISSING_ACCOUNT_ID`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`accountId`}),` not provided in `,_jsx(_components.code,{children:`params`})]}),_jsxs(_components.td,{children:[`Include `,_jsx(_components.code,{children:`accountId`}),` in subscription params`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`UNKNOWN_TOPIC`})}),_jsx(_components.td,{children:`Invalid subscription topic`}),_jsxs(_components.td,{children:[`Use valid topic: `,_jsx(_components.code,{children:`account`}),`, `,_jsx(_components.code,{children:`pnl`}),`, `,_jsx(_components.code,{children:`watchlist`}),`, `,_jsx(_components.code,{children:`news`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`MISSING_START_TIME`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`startTime`}),` not provided for P\u0026L`]}),_jsxs(_components.td,{children:[`Include an RFC3339 timestamp in `,_jsx(_components.code,{children:`params.startTime`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`INVALID_INTERVAL`})}),_jsx(_components.td,{children:`Invalid PnL candle interval`}),_jsxs(_components.td,{children:[`Use: `,_jsx(_components.code,{children:`15s`}),`, `,_jsx(_components.code,{children:`1m`}),`, `,_jsx(_components.code,{children:`5m`}),`, `,_jsx(_components.code,{children:`15m`}),`, `,_jsx(_components.code,{children:`1h`}),`, `,_jsx(_components.code,{children:`1d`}),`, `,_jsx(_components.code,{children:`1mo`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`ACCESS_DENIED`})}),_jsx(_components.td,{children:`User does not own the account`}),_jsx(_components.td,{children:`Verify the account ID belongs to the authenticated user`})]})]})]}),_jsx(Heading,{level:`3`,id:`error-response-format`,children:`Error Response Format`}),_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`10`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"response\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"req-002\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"timestamp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-01-15T10:30:00Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"payload\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`400`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"accountId is required\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"MISSING_ACCOUNT_ID\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(Warning,{children:_jsx(_components.p,{children:`Always implement comprehensive error handling to gracefully handle network issues, authentication failures, and server errors.`})})]}),_jsxs(Accordion,{title:`Best Practices`,icon:`thumbs-up`,id:`best-practices`,children:[_jsx(Heading,{level:`3`,id:`performance-optimization`,children:`Performance Optimization`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Subscribe once`}),` per account to `,_jsx(_components.code,{children:`account`}),` topic to receive all account events`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Use specific intervals`}),` for P\u0026L candles based on your needs`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Implement batching`}),` for handling high-frequency updates`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Store state locally`}),` to avoid unnecessary re-subscriptions`]}),`\n`]}),_jsx(Heading,{level:`3`,id:`reliability`,children:`Reliability`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Monitor connection health`}),` with periodic pings (30-60 second intervals)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Implement exponential backoff`}),` for reconnections`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Handle session expiration`}),` proactively using refresh warnings`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Store subscription state`}),` to restore after reconnection`]}),`\n`]}),_jsx(Heading,{level:`3`,id:`security`,children:`Security`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Rotate tokens`}),` periodically`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Use environment variables`}),` for connection URLs and tokens`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Log authentication events`}),` for audit trails`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Validate all incoming messages`}),` before processing`]}),`\n`]}),_jsx(Heading,{level:`3`,id:`development`,children:`Development`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Use development environment`}),` for testing`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Test failure scenarios`}),` (disconnects, authentication failures, malformed messages)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Monitor bandwidth usage`}),` in production`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Implement message queuing`}),` for high-volume scenarios`]}),`\n`]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`authentication`,children:`Authentication`}),`\n`,_jsx(Heading,{level:`3`,id:`authenticate-connection`,children:`Authenticate Connection`}),`\n`,_jsx(_components.p,{children:`Authentication must be completed within 5 seconds of connection establishment.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`11`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"request\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"auth-001\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"payload\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"method\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"post\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"path\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"/auth\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"body\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"token\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"YOUR_ACCESS_TOKEN\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`authentication-success-response`,children:`Authentication Success Response`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`11`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"event\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"payload\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"action\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"authSuccess\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"expiresIn\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`3900000`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"auth-001\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"timestamp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1703001234567`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`expiresIn`}),` field indicates session duration in milliseconds (65 minutes = 3900000ms).`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`If authentication is not completed within 5 seconds, the server will close the connection with an `,_jsx(_components.code,{children:`authTimeout`}),` event.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`subscribing-to-updates`,children:`Subscribing to Updates`}),`\n`,_jsx(Heading,{level:`3`,id:`subscribe-to-account-updates`,children:`Subscribe to Account Updates`}),`\n`,_jsx(_components.p,{children:`Subscribe to all account-level updates including orders, positions, balance, and account information.`}),`\n`,_jsxs(AccordionGroup,{children:[_jsxs(Accordion,{title:`Account Updates`,icon:`play`,defaultOpen:true,id:`account-updates`,children:[_jsx(Heading,{level:`3`,id:`subscribe-to-all-account-updates`,children:`Subscribe to All Account Updates`}),_jsx(_components.p,{children:`Get orders, positions, balance, and account info for a specific account:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`10`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"subscribe\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"req-002\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"payload\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"topic\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"account\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"params\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"accountId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ACC123456\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(Heading,{level:`3`,id:`response-with-initial-snapshot`,children:`Response with Initial Snapshot`}),_jsxs(_components.p,{children:[`The server responds with a `,_jsx(_components.code,{children:`subscribed`}),` message containing current account state. Decimal values are serialized as JSON strings.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`103`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`103`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"subscribed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"req-002\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"timestamp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-01-15T10:30:00Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"payload\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`200`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"topic\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"account\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"params\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"accountId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ACC123456\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"account\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"accountNumber\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ACC123456\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"accountType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"MARGIN\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"accountClass\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"INDIVIDUAL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"optionsLevel\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"LEVEL_3\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"isOptionLevelEnable\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"shortSellingEnabled\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"cashAvailable\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"25155.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"netLiquidity\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"50155.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"marginEquity\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"50155.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"maintenanceExcess\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"17508.50\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"accruedCash\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"exchangeSurplus\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"sma\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"25155.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"maintReq\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"7646.50\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"sodPositionsMarketValue\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"48000.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"netBuyingPower\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"25155.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"stockBuyingPower\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"50310.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"dayTradeBuyingPower\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"100620.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"optionBuyingPower\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"25155.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"dayTradeOvernightRegTBuyingPower\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"50310.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"totalEquity\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"50155.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"settledFunds\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"35000.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"unsettledFunds\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"amountAvailableToWithdraw\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"25155.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"fullyPaidUnsettledFunds\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"heldBackFunds\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"grossMargin\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"15045.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"pendingOrdersMarginRequirements\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"realizedPL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"unRealizedPL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"155.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"pendingOrdersCount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"credit\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"50000.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"creditRemaining\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"25155.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"smaCreditRemaining\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"25155.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"pdtCreditRemaining\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"100620.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"startOfDayCash\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"35000.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"valueBought\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"15293.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"valueSold\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"sodTtlEquity\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"50000.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"sodTtlEquityUpdatedAt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-01-15T11:00:02Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"intradayMarginBalance\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"25155.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"sodMarginTradeBalance\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"-25155.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"sodGrossFundsAvailable\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"25155.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"sodNetFundsAvailable\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"25155.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"sodFundsAvailableDate\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-01-12\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"freestockUnsettleBalance\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"positions\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"accountId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ACC123456\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"symbol\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"AAPL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"securityType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"EQUITY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"qty\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"100\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"avgPrice\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"150.45\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"avgCost\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"150.45\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"unRealizedPL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"155.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"todayRealizedPnL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"mtmRealizedPnL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"realizedPL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"todayPL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"155.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"instrument\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"EQUITY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"createdAt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-01-15T10:30:05Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"ordersV2\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"clOrdId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"CLIENT-001\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"ordId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ORD-12345\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"accountId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ACC123456\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"clientId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"symbol\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"AAPL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"side\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"BUY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"LIMIT\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"timeInForce\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"DAY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"qty\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"100\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"price\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"150.50\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"stopPrice\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"ordStatus\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"FILLED\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"cumQty\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"100\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"leavesQty\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"avgPrice\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"150.45\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"exDestination\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"MNGDFTE\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"securityType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"EQUITY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"category\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"EQUITY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"createdAt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-01-15T10:30:00Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"updatedAt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-01-15T10:30:05Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(Info,{children:_jsxs(_components.p,{children:[`The initial snapshot includes merged `,_jsx(_components.code,{children:`account`}),` and balance fields, `,_jsx(_components.code,{children:`positions`}),`, and `,_jsx(_components.code,{children:`ordersV2`}),`. After this, you’ll receive real-time `,_jsx(_components.code,{children:`event`}),` messages as changes occur.`]})}),_jsx(Heading,{level:`3`,id:`snapshot-only-account-fields`,children:`Snapshot-only account fields`}),_jsxs(_components.p,{children:[`Most values in the snapshot `,_jsx(_components.code,{children:`account`}),` object are the same balance fields documented under `,_jsx(_components.a,{href:`#balance-updates`,children:`Balance Updates`}),`. The fields below appear in the snapshot but are not part of the `,_jsx(_components.code,{children:`account.balance`}),` event payload:`]}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`What it means`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`isOptionLevelEnable`})}),_jsx(_components.td,{children:`boolean`}),_jsxs(_components.td,{children:[`Whether options trading is currently enabled for the account at its approved `,_jsx(_components.code,{children:`optionsLevel`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`shortSellingEnabled`})}),_jsx(_components.td,{children:`boolean`}),_jsx(_components.td,{children:`Whether the account is approved to sell short.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`sodTtlEquity`})}),_jsx(_components.td,{children:`string (decimal)`}),_jsx(_components.td,{children:`Total account equity as of the start of the trading day. Use it as the baseline for day-change calculations.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`sodTtlEquityUpdatedAt`})}),_jsx(_components.td,{children:`string (date-time)`}),_jsxs(_components.td,{children:[`When `,_jsx(_components.code,{children:`sodTtlEquity`}),` was last stamped, i.e. the open of the current session.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`intradayMarginBalance`})}),_jsx(_components.td,{children:`string (decimal)`}),_jsx(_components.td,{children:`Current intraday margin balance for the account.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`sodMarginTradeBalance`})}),_jsx(_components.td,{children:`string (decimal)`}),_jsx(_components.td,{children:`Margin trade balance as of the start of the trading day.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`sodGrossFundsAvailable`})}),_jsx(_components.td,{children:`string (decimal)`}),_jsx(_components.td,{children:`Funds available at the start of the trading day, before holds and requirements.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`sodNetFundsAvailable`})}),_jsx(_components.td,{children:`string (decimal)`}),_jsx(_components.td,{children:`Funds available at the start of the trading day, after holds and requirements.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`sodFundsAvailableDate`})}),_jsx(_components.td,{children:`string (date)`}),_jsxs(_components.td,{children:[`Settlement date the start-of-day funds-available figures apply to, in `,_jsx(_components.code,{children:`YYYY-MM-DD`}),` format.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`freestockUnsettleBalance`})}),_jsx(_components.td,{children:`string (decimal)`}),_jsx(_components.td,{children:`Unsettled balance attributable to free-stock awards.`})]})]})]}),_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`accountType`}),`, `,_jsx(_components.code,{children:`accountClass`}),`, and `,_jsx(_components.code,{children:`optionsLevel`}),` are free-form strings. See `,_jsx(_components.a,{href:`#account-level-enums`,children:`Account-level enums`}),` for illustrative values - do not hard-code against them.`]})})]}),_jsxs(Accordion,{title:`P\u0026L Candles`,icon:`chart-candlestick`,id:`p-and-l-candles`,children:[_jsx(Heading,{level:`3`,id:`subscribe-to-p%26l-candles`,children:`Subscribe to P\u0026L Candles`}),_jsxs(_components.p,{children:[`Track profit/loss at specified intervals. `,_jsx(_components.code,{children:`startTime`}),` is required:`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`12`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"subscribe\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"req-003\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"payload\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"topic\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"pnl\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"params\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"accountId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ACC123456\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"interval\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"1m\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"startTime\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-01-01T00:00:00Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(Heading,{level:`3`,id:`supported-intervals`,children:`Supported Intervals`}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Interval`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`15s`})}),_jsx(_components.td,{children:`15 seconds`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`1m`})}),_jsx(_components.td,{children:`1 minute`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`5m`})}),_jsx(_components.td,{children:`5 minutes`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`15m`})}),_jsx(_components.td,{children:`15 minutes`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`1h`})}),_jsx(_components.td,{children:`1 hour`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`1d`})}),_jsx(_components.td,{children:`1 day`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`1mo`})}),_jsx(_components.td,{children:`1 month`})]})]})]})]}),_jsxs(Accordion,{title:`Watchlist \u0026 News`,icon:`newspaper`,id:`watchlist-and-news`,children:[_jsx(Heading,{level:`3`,id:`subscribe-to-watchlist-updates`,children:`Subscribe to Watchlist Updates`}),_jsx(_components.p,{children:`Get notified when symbols are added, updated, or removed from watchlists:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"subscribe\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"req-004\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"payload\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"topic\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"watchlist\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(Heading,{level:`3`,id:`subscribe-to-news-updates`,children:`Subscribe to News Updates`}),_jsx(_components.p,{children:`Receive real-time news. You can optionally filter by symbol:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`11`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"subscribe\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"req-005\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"payload\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"topic\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"news\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"params\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"symbols\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"AAPL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"TSLA\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"topics\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"earnings\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsxs(_components.p,{children:[`Omit `,_jsx(_components.code,{children:`params`}),` entirely to receive all news without filtering.`]}),_jsx(Heading,{level:`3`,id:`watchlist-subscription-response`,children:`Watchlist subscription response`}),_jsx(_components.p,{children:`The server confirms the watchlist subscription with the user’s current watchlists:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`21`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`21`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"subscribed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"req-004\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"timestamp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-01-15T10:30:00Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"payload\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`200`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"topic\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"watchlist\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`101`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Core holdings\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"symbols\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"AAPL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"MSFT\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"NVDA\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`205`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Earnings radar\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"symbols\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"TSLA\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"AMD\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(Info,{children:_jsxs(_components.p,{children:[`Watchlist and news subscriptions are user-level and don’t require an account ID. The `,_jsx(_components.code,{children:`watchlist`}),` topic returns the full current watchlist array on subscribe and on every later update.`]})})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`payload-data-types`,children:`Payload Data Types`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field group`}),_jsx(_components.th,{children:`JSON type`}),_jsx(_components.th,{children:`Notes`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`id`}),`, `,_jsx(_components.code,{children:`topic`}),`, `,_jsx(_components.code,{children:`params.accountId`}),`, enum fields`]}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Request IDs and topic/account identifiers are strings.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Trading amounts and quantities`}),_jsx(_components.td,{children:`string`}),_jsxs(_components.td,{children:[`Decimal fields such as `,_jsx(_components.code,{children:`qty`}),`, `,_jsx(_components.code,{children:`price`}),`, `,_jsx(_components.code,{children:`avgPrice`}),`, `,_jsx(_components.code,{children:`totalEquity`}),`, `,_jsx(_components.code,{children:`PDT`}),`, and P\u0026L values are serialized as strings.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`pendingOrdersCount`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`Count fields remain numeric integers.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`timestamp`}),`, `,_jsx(_components.code,{children:`createdAt`}),`, `,_jsx(_components.code,{children:`updatedAt`})]}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`WebSocket envelopes and domain timestamps use RFC3339 strings. Auth event payload timestamps use Unix milliseconds.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`expiresIn`}),`, `,_jsx(_components.code,{children:`expiresAt`}),`, `,_jsx(_components.code,{children:`t`})]}),_jsx(_components.td,{children:`integer`}),_jsxs(_components.td,{children:[`Auth expiry values are Unix milliseconds. P\u0026L `,_jsx(_components.code,{children:`t`}),` values are Unix seconds.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`ordersV2`}),`, `,_jsx(_components.code,{children:`positions`})]}),_jsx(_components.td,{children:`array`}),_jsx(_components.td,{children:`Account subscription snapshots return arrays for these fields.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[`watchlist snapshot and watchlist event `,_jsx(_components.code,{children:`payload.data`})]}),_jsx(_components.td,{children:`array`}),_jsx(_components.td,{children:`Watchlist subscribe responses and watchlist events both return the full watchlist array.`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`real-time-update-messages`,children:`Real-Time Update Messages`}),`\n`,_jsxs(_components.p,{children:[`Once subscribed, the server pushes `,_jsx(_components.code,{children:`event`}),` messages as data changes.`]}),`\n`,_jsx(Heading,{level:`3`,id:`order-updates`,children:`Order Updates`}),`\n`,_jsx(_components.p,{children:`Receive notifications when order status changes.`}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`Stock Order`,id:`stock-order`,\"data-child-heading-ids\":`[\"order-filled\"]`,children:[_jsx(Heading,{level:`3`,id:`order-filled`,children:`Order Filled`}),_jsx(CodeBlock,{filename:``,numberOfLines:`30`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`30`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"event\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"timestamp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-01-15T10:30:05Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"payload\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"topic\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"account\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"account.order\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"target\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"account:ACC123456\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"ordId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ORD-12345\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"clOrdId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"CLIENT-001\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"accountId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ACC123456\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"symbol\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"AAPL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"side\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"BUY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"LIMIT\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"timeInForce\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"DAY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"qty\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"100\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"price\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"150.50\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"ordStatus\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"FILLED\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"cumQty\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"100\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"leavesQty\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"avgPrice\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"150.45\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"currency\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"USD\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"exDestination\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"MNGDFTE\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"securityType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"EQUITY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"category\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"EQUITY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"createdAt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-01-15T10:30:00Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"updatedAt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-01-15T10:30:05Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]}),_jsxs(Tab,{title:`Option Spread`,id:`option-spread`,\"data-child-heading-ids\":`[\"multi-leg-option-order\"]`,children:[_jsx(Heading,{level:`3`,id:`multi-leg-option-order`,children:`Multi-Leg Option Order`}),_jsx(CodeBlock,{filename:``,numberOfLines:`48`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`48`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"event\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"timestamp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-01-15T11:00:10Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"payload\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"topic\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"account\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"account.order\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"target\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"account:ACC123456\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"ordId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ORD-67890\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"clOrdId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"CLIENT-002\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"accountId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ACC123456\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"symbol\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"SPY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"side\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"BUY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"LIMIT\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"qty\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"price\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2.50\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"ordStatus\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"PARTIALLY_FILLED\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"cumQty\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"avgPrice\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2.48\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"securityType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"OPTION\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"category\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"MULTI_LEG\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"legs\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"symbol\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"SPY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"side\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"BUY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"ratioQty\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"securityType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"OPTION\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"maturity\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-12-20\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"strikePrice\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"450\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"positionEffect\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"OPEN\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"putCall\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"CALL\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"symbol\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"SPY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"side\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"SELL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"ratioQty\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"securityType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"OPTION\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"maturity\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-12-20\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"strikePrice\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"460\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"positionEffect\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"OPEN\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"putCall\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"CALL\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"createdAt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-01-15T11:00:00Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"updatedAt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-01-15T11:00:10Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]})]}),`\n`,_jsxs(Heading,{level:`3`,id:`ordstatus-values`,children:[_jsx(_components.code,{children:`ordStatus`}),` Values`]}),`\n`,_jsxs(_components.p,{children:[`The order status field is `,_jsx(_components.code,{children:`ordStatus`}),`. These are the full set of states an order can be in over its lifetime:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`What it means`}),_jsx(_components.th,{children:`What to show the user`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`PENDING_NEW`})}),_jsx(_components.td,{children:`The order is on its way to the exchange but hasn’t been accepted yet.`}),_jsx(_components.td,{children:`”Submitting…”`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`NEW`})}),_jsx(_components.td,{children:`The exchange has accepted the order and it is live in the book (working but not yet executed).`}),_jsx(_components.td,{children:`”Working” / “Open”`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`PARTIALLY_FILLED`})}),_jsxs(_components.td,{children:[`Some of the order’s quantity has executed; the rest is still working. Watch `,_jsx(_components.code,{children:`cumQty`}),` and `,_jsx(_components.code,{children:`leavesQty`}),`.`]}),_jsx(_components.td,{children:`”Partially filled”`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`FILLED`})}),_jsx(_components.td,{children:`The entire order quantity has executed. The order is done.`}),_jsx(_components.td,{children:`”Filled” / “Complete”`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`PENDING_CANCEL`})}),_jsx(_components.td,{children:`You sent a cancel request; the exchange has not confirmed it yet.`}),_jsx(_components.td,{children:`”Cancelling…”`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`CANCELED`})}),_jsx(_components.td,{children:`The order was cancelled (by you, by the system, or by the exchange). It will not execute further.`}),_jsx(_components.td,{children:`”Cancelled”`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`PENDING_REPLACE`})}),_jsx(_components.td,{children:`You sent a modify/replace request; the exchange has not confirmed it yet.`}),_jsx(_components.td,{children:`”Modifying…”`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`REJECTED`})}),_jsx(_components.td,{children:`The order was refused (bad parameters, insufficient buying power, halted symbol, etc.). It never made it onto the book.`}),_jsx(_components.td,{children:`”Rejected” + error reason`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`EXPIRED`})}),_jsxs(_components.td,{children:[`The order reached its time-in-force limit without filling (e.g. a `,_jsx(_components.code,{children:`DAY`}),` order that didn’t fill before market close).`]}),_jsx(_components.td,{children:`”Expired”`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`DONE_FOR_DAY`})}),_jsx(_components.td,{children:`The order (or its remaining quantity) is finished for the current session but not permanently cancelled.`}),_jsx(_components.td,{children:`”Done for day”`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`REPLACED`})}),_jsx(_components.td,{children:`A modify/replace request was accepted; this order has been superseded by the replacement.`}),_jsx(_components.td,{children:`”Modified”`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`STOPPED`})}),_jsx(_components.td,{children:`The order was stopped by the exchange at a guaranteed price, pending execution.`}),_jsx(_components.td,{children:`”Stopped”`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`SUSPENDED`})}),_jsx(_components.td,{children:`The order is temporarily inactive/held and not currently working.`}),_jsx(_components.td,{children:`”Suspended”`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`CALCULATED`})}),_jsx(_components.td,{children:`The order has been completed with fees/allocations calculated (post-trade state).`}),_jsx(_components.td,{children:`”Calculated”`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`ACCEPTED_FOR_BID`})}),_jsx(_components.td,{children:`The order has been accepted for a bid (used in certain program/portfolio flows).`}),_jsx(_components.td,{children:`”Accepted for bid”`})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`order-field-enums`,children:`Order field enums`}),`\n`,_jsx(_components.p,{children:`Order event payloads contain several enum fields. Here’s the full vocabulary you’ll see across stocks and options:`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:_jsx(_components.code,{children:`side`})}),` - direction of the trade:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Value`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`BUY`})}),_jsx(_components.td,{children:`Buying - opening a long position or closing a short.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`SELL`})}),_jsx(_components.td,{children:`Selling - closing a long position or opening a short.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`SELL_SHORT`})}),_jsx(_components.td,{children:`Selling shares you do not own (short sale). Subject to short-sale regulations.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`SELL_SHORT_EXEMPT`})}),_jsx(_components.td,{children:`Short sale exempt from the uptick/short-sale price test.`})]})]})]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Order `,_jsx(_components.strong,{children:`events`}),` report `,_jsx(_components.code,{children:`side`}),` using the values above (`,_jsx(_components.code,{children:`BUY`}),`, `,_jsx(_components.code,{children:`SELL`}),`, `,_jsx(_components.code,{children:`SELL_SHORT`}),`, `,_jsx(_components.code,{children:`SELL_SHORT_EXEMPT`}),`). If you placed an order with `,_jsx(_components.code,{children:`side: \"BUY_TO_COVER\"`}),`, the resulting order events report it as `,_jsx(_components.code,{children:`BUY`}),` — `,_jsx(_components.code,{children:`BUY_TO_COVER`}),` is accepted when placing an order but does not appear as-is in socket events.`]})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:_jsx(_components.code,{children:`type`})}),` - order type, i.e. how the order is priced:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Value`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`MARKET`})}),_jsx(_components.td,{children:`Execute immediately at the best available price. No price guarantee.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`LIMIT`})}),_jsxs(_components.td,{children:[`Execute only at the specified `,_jsx(_components.code,{children:`price`}),` or better. Price guarantee, no execution guarantee.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`STOP`})}),_jsx(_components.td,{children:`Sits inactive until the stop price is touched, then becomes a market order.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`STOP_LIMIT`})}),_jsx(_components.td,{children:`Sits inactive until the stop price is touched, then becomes a limit order at the limit price.`})]})]})]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:_jsx(_components.code,{children:`timeInForce`})}),` - how long the order stays alive:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Value`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`DAY`})}),_jsx(_components.td,{children:`Active until the end of today’s regular trading session, then cancelled if not filled.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`GTC`})}),_jsxs(_components.td,{children:[_jsx(_components.strong,{children:`Good ‘Til Cancelled`}),` - stays open until you cancel it (broker may cap at 60-90 days).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`IOC`})}),_jsxs(_components.td,{children:[_jsx(_components.strong,{children:`Immediate Or Cancel`}),` - fill whatever you can immediately, cancel the rest.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`FOK`})}),_jsxs(_components.td,{children:[_jsx(_components.strong,{children:`Fill Or Kill`}),` - fill the entire order immediately, or cancel it entirely.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`GTD`})}),_jsxs(_components.td,{children:[_jsx(_components.strong,{children:`Good ‘Til Date`}),` - stays open until a specific date you provide.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`GTX`})}),_jsxs(_components.td,{children:[_jsx(_components.strong,{children:`Good ‘Til Crossing`}),` - participates in the crossing/auction session.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`AT_THE_OPENING`})}),_jsx(_components.td,{children:`Execute at the market open; cancelled if it cannot participate in the opening.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`AT_THE_CLOSE`})}),_jsx(_components.td,{children:`Execute at the market close.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`GOOD_THROUGH_CROSSING`})}),_jsx(_components.td,{children:`Remains active through the crossing session.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`AT_CROSSING`})}),_jsx(_components.td,{children:`Execute only in the crossing/auction.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`EXTENDED_HOURS`})}),_jsx(_components.td,{children:`Eligible to trade during extended (pre/post-market) hours.`})]})]})]}),`\n`,_jsxs(_components.p,{children:[_jsxs(_components.strong,{children:[_jsx(_components.code,{children:`securityType`}),` / `,_jsx(_components.code,{children:`instrument`})]}),` - what asset class:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Value`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`EQUITY`})}),_jsx(_components.td,{children:`Stock or ETF.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`OPTION`})}),_jsx(_components.td,{children:`Single option contract.`})]})]})]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Multi-leg orders are `,_jsx(_components.strong,{children:`not`}),` a `,_jsx(_components.code,{children:`securityType`}),`. Instead, the order carries a separate `,_jsx(_components.code,{children:`category`}),` field with values `,_jsx(_components.code,{children:`SINGLE_LEG`}),`, `,_jsx(_components.code,{children:`MULTI_LEG`}),`, or `,_jsx(_components.code,{children:`EQUITY`}),`; a `,_jsx(_components.code,{children:`MULTI_LEG`}),` order lists its legs in the `,_jsx(_components.code,{children:`legs`}),` array, each with its own `,_jsx(_components.code,{children:`securityType`}),` (`,_jsx(_components.code,{children:`EQUITY`}),`/`,_jsx(_components.code,{children:`OPTION`}),`).`]})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:_jsx(_components.code,{children:`putCall`})}),` (options only): `,_jsx(_components.code,{children:`CALL`}),` or `,_jsx(_components.code,{children:`PUT`}),`.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:_jsx(_components.code,{children:`positionEffect`})}),` (options only): `,_jsx(_components.code,{children:`OPEN`}),` (creates/increases a position) or `,_jsx(_components.code,{children:`CLOSE`}),` (reduces/closes one).`]}),`\n`,_jsx(Heading,{level:`3`,id:`position-updates`,children:`Position Updates`}),`\n`,_jsx(_components.p,{children:`Receive notifications when positions change.`}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`Stock Position`,id:`stock-position`,\"data-child-heading-ids\":`[\"long-stock-position\"]`,children:[_jsx(Heading,{level:`3`,id:`long-stock-position`,children:`Long Stock Position`}),_jsx(CodeBlock,{filename:``,numberOfLines:`25`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`25`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"event\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"timestamp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-01-15T14:30:00Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"payload\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"topic\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"account\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"account.position\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"target\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"account:ACC123456\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"accountId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ACC123456\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"symbol\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"AAPL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"securityType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"EQUITY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"qty\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"100\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"avgPrice\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"150.45\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"avgCost\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"150.45\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"unRealizedPL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"155.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"todayRealizedPnL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"mtmRealizedPnL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"realizedPL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"todayPL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"155.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"instrument\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"EQUITY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"createdAt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-01-15T10:30:05Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"updatedAt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-01-15T14:30:00Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]}),_jsxs(Tab,{title:`Option Position`,id:`option-position`,\"data-child-heading-ids\":`[\"long-call-option\"]`,children:[_jsx(Heading,{level:`3`,id:`long-call-option`,children:`Long Call Option`}),_jsx(CodeBlock,{filename:``,numberOfLines:`28`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`28`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"event\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"timestamp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-01-15T14:30:00Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"payload\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"topic\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"account\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"account.position\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"target\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"account:ACC123456\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"accountId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ACC123456\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"symbol\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"SPY241220C00450000\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"securityType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"OPTION\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"qty\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"avgPrice\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"248.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"avgCost\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"248.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"unRealizedPL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"12.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"todayRealizedPnL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"mtmRealizedPnL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"realizedPL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"todayPL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"12.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"instrument\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"OPTION\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"putCall\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"CALL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"strikePrice\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"450\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"maturity\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-12-20\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"createdAt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-01-15T11:00:10Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"updatedAt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-01-15T14:30:00Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]})]}),`\n`,_jsxs(Info,{children:[_jsxs(_components.p,{children:[`Position updates emit primary fields `,_jsx(_components.code,{children:`avgPrice`}),`, `,_jsx(_components.code,{children:`todayRealizedPnL`}),`, and `,_jsx(_components.code,{children:`securityType`}),`. The backend also emits backward-compatible aliases `,_jsx(_components.code,{children:`avgCost`}),`, `,_jsx(_components.code,{children:`realizedPL`}),`, and `,_jsx(_components.code,{children:`instrument`}),`.`]}),_jsxs(_components.p,{children:[_jsx(_components.code,{children:`mtmRealizedPnL`}),` is a separate value from `,_jsx(_components.code,{children:`todayRealizedPnL`}),`: it is the mark-to-market realized P\u0026L for the position, measured against the previous close rather than against the original entry price.`]})]}),`\n`,_jsx(Heading,{level:`3`,id:`balance-updates`,children:`Balance Updates`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`38`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`38`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"event\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"timestamp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-01-15T14:30:00Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"payload\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"topic\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"account\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"account.balance\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"target\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"account:ACC123456\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"accountId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ACC123456\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"sodPositionsMarketValue\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"48000.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"netBuyingPower\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"25155.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"stockBuyingPower\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"50310.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"dayTradeBuyingPower\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"100620.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"optionBuyingPower\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"25155.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"dayTradeOvernightRegTBuyingPower\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"50310.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"totalEquity\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"50155.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"settledFunds\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"35000.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"unsettledFunds\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"heldBackFunds\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"grossMargin\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"15045.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"pendingOrdersMarginRequirements\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"maintReq\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"7646.50\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"creditMultiplier\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"pendingOrdersCount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"credit\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"50000.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"creditRemaining\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"25155.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"realizedPL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"unRealizedPL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"167.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"SMA\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"25155.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"smaCreditRemaining\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"25155.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"PDT\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"pdtCreditRemaining\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"100620.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"startOfDayCash\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"35000.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"valueBought\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"15293.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"valueSold\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[`The account topic can also emit `,_jsx(_components.code,{children:`account.balance.apex`}),`. That event is a partial Apex-sourced balance update and currently carries `,_jsx(_components.code,{children:`accountId`}),`, `,_jsx(_components.code,{children:`fullyPaidUnsettledFunds`}),`, `,_jsx(_components.code,{children:`amountAvailableToWithdraw`}),`, and `,_jsx(_components.code,{children:`updatedAt`}),`. Clients should merge that payload into their latest balance state instead of treating it as a full balance snapshot.`]})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Balance field reference`}),` - decimal values arrive as JSON strings to preserve precision:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`What it means`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`accountId`})}),_jsx(_components.td,{children:`The account this balance update belongs to.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`sodPositionsMarketValue`})}),_jsx(_components.td,{children:`Start-of-day market value of all open positions (i.e. what your holdings were worth when the trading day opened).`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`netBuyingPower`})}),_jsx(_components.td,{children:`Total purchasing power available right now across all instruments. The most common number to display as “buying power” in a UI.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`stockBuyingPower`})}),_jsx(_components.td,{children:`How much you can use specifically to buy stock (typically up to 2x cash on margin).`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`dayTradeBuyingPower`})}),_jsxs(_components.td,{children:[`How much you can use for `,_jsx(_components.strong,{children:`same-day`}),` round-trip trades (typically up to 4x equity for pattern day traders). Resets at end of day.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`optionBuyingPower`})}),_jsx(_components.td,{children:`How much you can use to buy options. Options usually require cash, so this is typically lower than stock buying power.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`dayTradeOvernightRegTBuyingPower`})}),_jsx(_components.td,{children:`Day-trade buying power that can also be held overnight under Reg T rules.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`totalEquity`})}),_jsx(_components.td,{children:`Cash + market value of positions - margin debit. Your account’s net worth.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`settledFunds`})}),_jsx(_components.td,{children:`Cash that has fully settled and is freely available (T+1/T+2 has passed).`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`unsettledFunds`})}),_jsx(_components.td,{children:`Cash from recent sales that hasn’t settled yet - usable for most trades, but cash accounts have restrictions.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`heldBackFunds`})}),_jsx(_components.td,{children:`Cash temporarily reserved for pending orders or compliance holds. Not usable.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`amountAvailableToWithdraw`})}),_jsx(_components.td,{children:`Cash currently available to withdraw from the account.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`fullyPaidUnsettledFunds`})}),_jsx(_components.td,{children:`Unsettled funds that are fully paid and tracked separately by the backend.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`grossMargin`})}),_jsx(_components.td,{children:`Total amount you have borrowed from the broker on margin.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`pendingOrdersMarginRequirements`})}),_jsx(_components.td,{children:`Margin already earmarked for orders that are working but not yet filled.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`maintReq`})}),_jsxs(_components.td,{children:[_jsx(_components.strong,{children:`Maintenance requirement`}),` - the minimum equity you must hold to support your current positions. Drop below this and you may get a margin call.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`creditMultiplier`})}),_jsxs(_components.td,{children:[`How many times your equity you can borrow on standard margin (typically `,_jsx(_components.code,{children:`2`}),`).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`pendingOrdersCount`})}),_jsx(_components.td,{children:`Number of orders currently working.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`credit`})}),_jsx(_components.td,{children:`Total margin credit line extended to the account.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`creditRemaining`})}),_jsx(_components.td,{children:`How much of that credit line is still available.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`realizedPL`})}),_jsxs(_components.td,{children:[`Cumulative profit/loss from positions that have been `,_jsx(_components.strong,{children:`closed`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`unRealizedPL`})}),_jsxs(_components.td,{children:[`Profit/loss on positions you currently `,_jsx(_components.strong,{children:`hold open`}),` - i.e. paper gains/losses based on current market value.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`SMA`})}),_jsxs(_components.td,{children:[_jsx(_components.strong,{children:`Special Memorandum Account`}),` - a margin-account balance that effectively stores up “extra” buying power from gains. Reg T concept.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`smaCreditRemaining`})}),_jsx(_components.td,{children:`SMA buying power still available.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`PDT`})}),_jsxs(_components.td,{children:[_jsx(_components.strong,{children:`Pattern Day Trader`}),` flag balance - relates to the four-day-trade rule and the $25,000 minimum equity requirement under FINRA Rule 4210.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`pdtCreditRemaining`})}),_jsx(_components.td,{children:`Remaining day-trade buying power for a flagged PDT account.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`startOfDayCash`})}),_jsx(_components.td,{children:`Cash balance at the start of today’s session. Useful for calculating daily change.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`valueBought`})}),_jsx(_components.td,{children:`Dollar value of purchases executed today.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`valueSold`})}),_jsx(_components.td,{children:`Dollar value of sales executed today.`})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`account-level-enums`,children:`Account-level enums`}),`\n`,_jsxs(_components.p,{children:[`The account-info and account snapshot messages include a few classification fields. The values below are `,_jsx(_components.strong,{children:`illustrative`}),` — these fields are returned as free-form strings and are `,_jsx(_components.strong,{children:`not validated or enumerated by the Aries API`}),`, so treat exact spellings as examples and do not hard-code against them.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:_jsx(_components.code,{children:`accountType`})}),` - how the account is funded and settled:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Value`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`CASH`})}),_jsx(_components.td,{children:`Cash account - trades must be paid for with settled funds; no margin borrowing.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`MARGIN`})}),_jsx(_components.td,{children:`Standard margin account - can borrow against equity (subject to Reg T).`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`IRA`})}),_jsx(_components.td,{children:`Individual Retirement Account - tax-advantaged, no margin borrowing.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`ROTH_IRA`})}),_jsx(_components.td,{children:`Roth IRA - after-tax retirement account.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`RETIREMENT`})}),_jsx(_components.td,{children:`Generic retirement account (401k, SEP, etc.).`})]})]})]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:_jsx(_components.code,{children:`accountClass`})}),` - who owns the account:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Value`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`INDIVIDUAL`})}),_jsx(_components.td,{children:`Single-person account.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`JOINT`})}),_jsx(_components.td,{children:`Joint ownership (two or more individuals).`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`CORPORATE`})}),_jsx(_components.td,{children:`Owned by a corporation.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`TRUST`})}),_jsx(_components.td,{children:`Owned by a trust.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`LLC`})}),_jsx(_components.td,{children:`Owned by an LLC.`})]})]})]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:_jsx(_components.code,{children:`optionsLevel`})}),` - what option strategies the account is approved for. Higher levels unlock more complex (and risky) strategies:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Value`}),_jsx(_components.th,{children:`What you can trade`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`LEVEL_0`})}),_jsx(_components.td,{children:`Not approved for options.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`LEVEL_1`})}),_jsx(_components.td,{children:`Covered calls and cash-secured puts only.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`LEVEL_2`})}),_jsx(_components.td,{children:`Adds long calls and long puts (buying options).`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`LEVEL_3`})}),_jsx(_components.td,{children:`Adds spreads (e.g. vertical spreads, iron condors) - defined-risk multi-leg strategies.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`LEVEL_4`})}),_jsx(_components.td,{children:`Adds naked option selling - undefined-risk strategies. Requires the highest equity threshold.`})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`account-info-updates`,children:`Account Info Updates`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`30`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`30`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"event\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"timestamp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-01-15T14:30:00Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"payload\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"topic\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"account\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"account.info\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"target\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"account:ACC123456\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ACC123456\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"sterlingAccountId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"STERLING-123\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"apexAccountId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"fdid\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"FDID-123456\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"description\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"John Doe Trading Account\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"accountType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"MARGIN\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"accountClass\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"INDIVIDUAL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"optionsLevel\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"LEVEL_3\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"maintenanceExcess\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"17508.50\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"cashAvailable\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"25155.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"exchangeSurplus\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"accruedCash\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"netLiquidity\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"50155.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"marginEquity\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"50155.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"sma\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"25155.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"maintReq\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"7646.50\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"email\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"john.doe@example.com\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"cell\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"+1234567890\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"groupId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"TRADING\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`p\u0026l-candle-updates`,children:`P\u0026L Candle Updates`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`13`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`13`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"event\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"timestamp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-01-15T10:30:00Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"payload\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"topic\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"pnl\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"accountId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ACC123456\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"interval\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"1m\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"t\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1703001000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"c\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`50155`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`watchlist-updates`,children:`Watchlist Updates`}),`\n`,_jsx(_components.p,{children:`Watchlist events do not send item-by-item patches. Each event contains the latest full watchlist array for the authenticated user.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`19`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`19`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"event\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"timestamp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-01-15T14:30:00Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"payload\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"topic\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"watchlist\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`101`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Core holdings\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"symbols\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"AAPL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"MSFT\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"NVDA\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"TSLA\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`205`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Earnings radar\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"symbols\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"AMD\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`news-updates`,children:`News Updates`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`17`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`17`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"event\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"timestamp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-01-15T14:30:00Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"payload\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"topic\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"news\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`12345`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"title\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Fed Announces Rate Decision\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"news_type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"news\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"authors\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Reuters\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"timestamp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-01-15T14:30:00Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"symbols\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"SPY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"QQQ\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`unsubscribing-from-updates`,children:`Unsubscribing from Updates`}),`\n`,_jsx(_components.p,{children:`Stop receiving updates for specific topics.`}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`Account`,id:`account`,\"data-child-heading-ids\":`[\"unsubscribe-from-account-updates\",\"response\"]`,children:[_jsx(Heading,{level:`3`,id:`unsubscribe-from-account-updates`,children:`Unsubscribe from Account Updates`}),_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`10`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"unsubscribe\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"req-007\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"payload\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"topic\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"account\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"params\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"accountId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ACC123456\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(Heading,{level:`3`,id:`response`,children:`Response`}),_jsx(CodeBlock,{filename:``,numberOfLines:`13`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`13`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"response\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"req-007\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"timestamp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-01-15T10:30:00Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"payload\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`200`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"unsubscribed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"topic\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"account\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"accountId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ACC123456\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]}),_jsxs(Tab,{title:`Watchlist`,id:`watchlist`,\"data-child-heading-ids\":`[\"unsubscribe-from-watchlist-updates\",\"response-2\"]`,children:[_jsx(Heading,{level:`3`,id:`unsubscribe-from-watchlist-updates`,children:`Unsubscribe from Watchlist Updates`}),_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"unsubscribe\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"req-008\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"payload\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"topic\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"watchlist\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(Heading,{level:`3`,id:`response-2`,children:`Response`}),_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`12`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"response\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"req-008\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"timestamp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-01-15T10:30:00Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"payload\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`200`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"unsubscribed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"topic\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"watchlist\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]}),_jsxs(Tab,{title:`News`,id:`news`,\"data-child-heading-ids\":`[\"unsubscribe-from-news-updates\",\"response-3\"]`,children:[_jsx(Heading,{level:`3`,id:`unsubscribe-from-news-updates`,children:`Unsubscribe from News Updates`}),_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"unsubscribe\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"req-009\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"payload\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"topic\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"news\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(Heading,{level:`3`,id:`response-3`,children:`Response`}),_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`12`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"response\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"req-009\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"timestamp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-01-15T10:30:00Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"payload\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`200`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"unsubscribed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"topic\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"news\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`connection-management`,children:`Connection Management`}),`\n`,_jsx(Heading,{level:`3`,id:`ping/pong-keepalive-2`,children:`Ping/Pong Keepalive`}),`\n`,_jsx(_components.p,{children:`Send periodic pings to maintain connection health and detect network issues.`}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Ping Request:`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ping\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ping-001\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Pong Response:`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"pong\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ping-001\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"timestamp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-01-15T10:30:00Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Recommendation:`}),` Send a ping every 30-60 seconds to keep the connection alive.`]}),`\n`,_jsx(Heading,{level:`3`,id:`session-expiration`,children:`Session Expiration`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Refresh Warning`}),` (5 minutes before expiration):`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`12`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"event\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"payload\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"action\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"refreshAuth\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"expiresIn\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`300000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"expiresAt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1703001534567`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"system\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"timestamp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1703001234567`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Session Expired:`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`11`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"event\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"payload\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"action\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"authExpired\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"session expired\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"system\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"timestamp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1703001234567`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`When you receive a `,_jsx(_components.code,{children:`refreshAuth`}),` warning, you should re-authenticate or be prepared to reconnect. The connection will be closed when the session expires.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`error-handling`,children:`Error Handling`}),`\n`,_jsx(Heading,{level:`3`,id:`error-response-format-2`,children:`Error Response Format`}),`\n`,_jsx(_components.p,{children:`All errors follow this format:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`10`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"response\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"req-002\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"timestamp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-01-15T10:30:00Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"payload\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`400`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"accountId is required\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"MISSING_ACCOUNT_ID\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`common-error-scenarios`,children:`Common Error Scenarios`}),`\n`,_jsxs(AccordionGroup,{children:[_jsxs(Accordion,{title:`Authentication Errors`,icon:`key`,id:`authentication-errors`,children:[_jsx(Heading,{level:`3`,id:`authentication-timeout`,children:`Authentication Timeout`}),_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`11`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"event\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"payload\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"action\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"authTimeout\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"authentication timeout\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"system\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"timestamp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1703001234567`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Cause:`}),` Did not authenticate within 5 seconds of connection.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Resolution:`}),` Send authentication request immediately after connecting.`]}),_jsx(_components.hr,{}),_jsx(Heading,{level:`3`,id:`invalid-token`,children:`Invalid Token`}),_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`10`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"response\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"auth-001\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"timestamp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-01-15T10:30:00Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"payload\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`401`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"token is invalid or expired\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"INVALID_TOKEN\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Cause:`}),` JWT token is invalid or expired.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Resolution:`}),` Generate a new token and re-authenticate.`]})]}),_jsxs(Accordion,{title:`Subscription Errors`,icon:`plug`,id:`subscription-errors`,children:[_jsx(Heading,{level:`3`,id:`missing-account-id`,children:`Missing Account ID`}),_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`10`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"response\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"req-002\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"timestamp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-01-15T10:30:00Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"payload\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`400`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"accountId is required\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"MISSING_ACCOUNT_ID\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Cause:`}),` `,_jsx(_components.code,{children:`accountId`}),` not provided in `,_jsx(_components.code,{children:`params`}),` for `,_jsx(_components.code,{children:`account`}),` or `,_jsx(_components.code,{children:`pnl`}),` subscription.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Resolution:`}),` Include `,_jsx(_components.code,{children:`accountId`}),` in `,_jsx(_components.code,{children:`payload.params`}),`.`]}),_jsx(_components.hr,{}),_jsx(Heading,{level:`3`,id:`unknown-topic`,children:`Unknown Topic`}),_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`10`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"response\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"req-003\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"timestamp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-01-15T10:30:00Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"payload\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`400`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"unknown subscription topic: badtopic\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"UNKNOWN_TOPIC\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Cause:`}),` Invalid topic specified.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Resolution:`}),` Use valid topics: `,_jsx(_components.code,{children:`account`}),`, `,_jsx(_components.code,{children:`pnl`}),`, `,_jsx(_components.code,{children:`watchlist`}),`, `,_jsx(_components.code,{children:`news`}),`.`]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`best-practices`,children:`Best Practices`}),`\n`,_jsx(Heading,{level:`3`,id:`reliable-connection-handling`,children:`Reliable Connection Handling`}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Implement exponential backoff for reconnections:`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`18`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`18`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`let`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` reconnectDelay`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Start with 1 second`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` reconnect`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` setTimeout`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` connectWebSocket`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` reconnectDelay`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Math`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`min`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`reconnectDelay`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` *`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`60000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Cap at 60 seconds`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`reconnectDelay`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ws`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`onclose`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` () `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Connection closed, reconnecting...'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` reconnect`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`};`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ws`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`onopen`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` () `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` reconnectDelay`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Reset delay on successful connection`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` authenticate`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`};`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`handle-session-expiration`,children:`Handle Session Expiration`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`18`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`18`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ws`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`onmessage`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`event`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` msg`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`parse`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`event`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` payload`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` msg`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`payload`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`msg`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`type`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ===`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'event'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u0026\u0026`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` payload`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`|`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`action`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ===`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'refreshAuth'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Session expiring in 5 minutes'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Option 1: Get a new token and re-authenticate`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` getNewToken`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`then`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`token`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` =>`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` authenticate`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`token`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`));`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Option 2: Prepare to reconnect`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` scheduleReconnect`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`msg`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`type`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ===`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'event'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u0026\u0026`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` payload`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`|`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`action`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ===`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'authExpired'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Session expired, reconnecting...'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` reconnect`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`};`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`efficient-subscription-management`,children:`Efficient Subscription Management`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Subscribe once to account updates`}),` for all order, position, balance, and account changes:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`9`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Subscribe to all account events`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ws`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`send`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` type:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'subscribe'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` id:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'req-002'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` payload:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` topic:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'account'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` params:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`accountId:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'ACC123456'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}));`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`store-state-locally`,children:`Store State Locally`}),`\n`,_jsx(_components.p,{children:`Keep local state to avoid unnecessary re-subscriptions:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`23`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`23`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`let`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` subscriptions`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Set`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` subscribe`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`topic`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`params`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`topic`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`JSON`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`params`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`subscriptions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`has`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`key`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Already subscribed to'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`topic`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` ws`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`send`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` type:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'subscribe'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` id:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `sub-\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Date`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`now`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`()`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` payload:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`topic`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`params`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }));`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` subscriptions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`add`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`key`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ws`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`onclose`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` () `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Clear subscriptions on disconnect`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` subscriptions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`clear`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`};`})}),`\n`]})})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Account Updates WebSocket","description":"Real-time WebSocket API for account updates, P\u0026L candles, watchlists, and news on a single authenticated connection.","asyncapi":"asyncapi-specs/account-updates.json accountUpdatesStream","href":"/websockets/account-updates"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Authentication","slug":"authentication","depth":2,"children":[{"title":"Authenticate Connection","slug":"authenticate-connection","depth":3,"children":[]},{"title":"Authentication Success Response","slug":"authentication-success-response","depth":3,"children":[]}]},{"title":"Subscribing to Updates","slug":"subscribing-to-updates","depth":2,"children":[{"title":"Subscribe to Account Updates","slug":"subscribe-to-account-updates","depth":3,"children":[]}]},{"title":"Payload Data Types","slug":"payload-data-types","depth":2,"children":[]},{"title":"Real-Time Update Messages","slug":"real-time-update-messages","depth":2,"children":[{"title":"Order Updates","slug":"order-updates","depth":3,"children":[]},{"title":"Order Filled","slug":"order-filled","depth":3,"children":[],"tabId":"stock-order"},{"title":"Multi-Leg Option Order","slug":"multi-leg-option-order","depth":3,"children":[],"tabId":"option-spread"},{"title":"ordStatus Values","slug":"ordstatus-values","depth":3,"children":[]},{"title":"Order field enums","slug":"order-field-enums","depth":3,"children":[]},{"title":"Position Updates","slug":"position-updates","depth":3,"children":[]},{"title":"Long Stock Position","slug":"long-stock-position","depth":3,"children":[],"tabId":"stock-position"},{"title":"Long Call Option","slug":"long-call-option","depth":3,"children":[],"tabId":"option-position"},{"title":"Balance Updates","slug":"balance-updates","depth":3,"children":[]},{"title":"Account-level enums","slug":"account-level-enums","depth":3,"children":[]},{"title":"Account Info Updates","slug":"account-info-updates","depth":3,"children":[]},{"title":"P\u0026L Candle Updates","slug":"p\u0026l-candle-updates","depth":3,"children":[]},{"title":"Watchlist Updates","slug":"watchlist-updates","depth":3,"children":[]},{"title":"News Updates","slug":"news-updates","depth":3,"children":[]}]},{"title":"Unsubscribing from Updates","slug":"unsubscribing-from-updates","depth":2,"children":[{"title":"Unsubscribe from Account Updates","slug":"unsubscribe-from-account-updates","depth":3,"children":[],"tabId":"account"},{"title":"Response","slug":"response","depth":3,"children":[],"tabId":"account"},{"title":"Unsubscribe from Watchlist Updates","slug":"unsubscribe-from-watchlist-updates","depth":3,"children":[],"tabId":"watchlist"},{"title":"Response","slug":"response-2","depth":3,"children":[],"tabId":"watchlist"},{"title":"Unsubscribe from News Updates","slug":"unsubscribe-from-news-updates","depth":3,"children":[],"tabId":"news"},{"title":"Response","slug":"response-3","depth":3,"children":[],"tabId":"news"}]},{"title":"Connection Management","slug":"connection-management","depth":2,"children":[{"title":"Ping/Pong Keepalive","slug":"ping/pong-keepalive-2","depth":3,"children":[]},{"title":"Session Expiration","slug":"session-expiration","depth":3,"children":[]}]},{"title":"Error Handling","slug":"error-handling","depth":2,"children":[{"title":"Error Response Format","slug":"error-response-format-2","depth":3,"children":[]},{"title":"Common Error Scenarios","slug":"common-error-scenarios","depth":3,"children":[]}]},{"title":"Best Practices","slug":"best-practices","depth":2,"children":[{"title":"Reliable Connection Handling","slug":"reliable-connection-handling","depth":3,"children":[]},{"title":"Handle Session Expiration","slug":"handle-session-expiration","depth":3,"children":[]},{"title":"Efficient Subscription Management","slug":"efficient-subscription-management","depth":3,"children":[]},{"title":"Store State Locally","slug":"store-state-locally","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/ariesfinancialinc/d35069a6af6e0e00/public/oauth-manager.js","/_mintlify/custom/ariesfinancialinc/baaed03e98a52073/public/token-autofill.js","/_mintlify/custom/ariesfinancialinc/5c3c9fc4fbc77145/public/paste-plain-text.js"],"apiReferenceData":{"channel":{"id":"accountUpdatesStream","title":"Account updates stream","description":"Bidirectional WebSocket endpoint for account updates. Clients connect here to authenticate, send subscription requests, and receive real-time account updates.","servers":[{"id":"production","protocol":"wss","host":"api.aries.com","bindings":[],"variables":[]}],"address":"/v1/accounts/ws","parameters":[],"bindings":[],"operations":[{"id":"authenticate","title":"Auth Request","description":"Authenticate the WebSocket connection","type":"receive","messages":[{"id":"authRequest","contentType":"application/json","payload":[{"name":"Authentication Request","description":"Sign in with an access token","type":"object","properties":[{"name":"type","type":"string","description":"Set this to `request` when you authenticate.","enumValues":["request"],"required":true},{"name":"id","type":"string","description":"Optional. Add your own request ID here if you want it returned in the auth event.","required":false},{"name":"payload","type":"object","description":"Put the auth request details here.","required":true,"properties":[{"name":"method","type":"string","description":"Use `POST` to send the token for authentication.","enumValues":["POST"],"required":true},{"name":"path","type":"string","description":"Always `/auth`.","enumValues":["/auth"],"required":true},{"name":"body","type":"object","description":"JSON body for `POST /auth`. Put the raw access token directly in `body.token`.","required":true,"properties":[{"name":"token","type":"string","description":"Access token for this WebSocket connection.","required":true}]}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","required":["type","payload"],"description":"Sign-in message. Send this first after connecting so the server can open your account-updates connection.","properties":{"type":{"type":"string","enum":["request"],"description":"Set this to `request` when you authenticate.","example":"request","x-parser-schema-id":"\u003canonymous-schema-1>"},"id":{"type":"string","description":"Optional. Add your own request ID here if you want it returned in the auth event.","example":"auth-001","x-parser-schema-id":"\u003canonymous-schema-2>"},"payload":{"type":"object","required":["method","path","body"],"description":"Put the auth request details here.","properties":{"method":{"type":"string","enum":["POST"],"description":"Use `POST` to send the token for authentication.","example":"POST","x-parser-schema-id":"\u003canonymous-schema-4>"},"path":{"type":"string","enum":["/auth"],"description":"Always `/auth`.","example":"/auth","x-parser-schema-id":"\u003canonymous-schema-5>"},"body":{"type":"object","required":["token"],"description":"JSON body for `POST /auth`. Put the raw access token directly in `body.token`.","properties":{"token":{"type":"string","description":"Access token for this WebSocket connection.","example":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...","x-parser-schema-id":"\u003canonymous-schema-7>"}},"example":{"token":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..."},"x-parser-schema-id":"\u003canonymous-schema-6>"}},"example":{"method":"POST","path":"/auth","body":{"token":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..."}},"x-parser-schema-id":"\u003canonymous-schema-3>"}},"x-parser-schema-id":"AuthRequestPayload"},"title":"Authentication Request","description":"Sign in with an access token","example":"{\n \"type\": \"request\",\n \"id\": \"auth-001\",\n \"payload\": {\n \"method\": \"post\",\n \"path\": \"/auth\",\n \"body\": {\n \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\"\n }\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"authRequest"}]}],"bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"accountUpdatesStream"}]},{"id":"subscribe","title":"Subscribe Request","description":"Subscribe to account updates, P\u0026L candles, watchlist, or news","type":"receive","messages":[{"id":"subscribeRequest","contentType":"application/json","payload":[{"name":"Subscribe Request","description":"Subscribe to real-time updates","type":"object","properties":[{"name":"type","type":"string","description":"Set this to `subscribe` to start updates for a topic.","enumValues":["subscribe"],"required":true},{"name":"id","type":"string","description":"Optional. Add your own request ID here if you want it returned in the subscribe reply or error.","required":false},{"name":"payload","type":"object","description":"Choose the topic and add any extra values needed for that topic.","required":true,"properties":[{"name":"topic","type":"string","description":"Which updates you want: `account`, `pnl`, `watchlist`, or `news`.","enumValues":["account","pnl","watchlist","news"],"required":true},{"name":"params","type":"object","description":"Extra values for the topic you picked.","required":false,"properties":[{"name":"accountId","type":"string","description":"Trading account ID. Required for account and pnl topics. Do not send this for watchlist. News subscriptions are user-level and do not require it.","required":false},{"name":"interval","type":"string","description":"Candle interval for pnl topic. Optional; defaults to 1m when omitted. Ignored for other topics.","enumValues":["15s","1m","5m","15m","1h","1d","1mo"],"required":false},{"name":"startTime","type":"string","description":"Start time for `pnl` history. Example: `2024-01-01T00:00:00Z`.","required":false},{"name":"symbols","type":"array","description":"Optional symbol filter for news topic. Ignored for account, pnl, and watchlist.","required":false,"properties":[{"name":"item","type":"string","required":false}]},{"name":"topics","type":"array","description":"Optional news topic filter for the first news snapshot. Live pushed news is still filtered by symbol. Ignored for other topics.","required":false,"properties":[{"name":"item","type":"string","required":false}]}]}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","required":["type","payload"],"description":"Use this message to start updates for a topic.","properties":{"type":{"type":"string","enum":["subscribe"],"description":"Set this to `subscribe` to start updates for a topic.","example":"subscribe","x-parser-schema-id":"\u003canonymous-schema-19>"},"id":{"type":"string","description":"Optional. Add your own request ID here if you want it returned in the subscribe reply or error.","example":"req-002","x-parser-schema-id":"\u003canonymous-schema-20>"},"payload":{"type":"object","description":"Choose the topic and add any extra values needed for that topic.","required":["topic"],"properties":{"topic":{"type":"string","enum":["account","pnl","watchlist","news"],"description":"Which updates you want: `account`, `pnl`, `watchlist`, or `news`.","example":"account","x-parser-schema-id":"\u003canonymous-schema-22>"},"params":{"type":"object","description":"Extra values for the topic you picked.","properties":{"accountId":{"type":"string","description":"Trading account ID. Required for account and pnl topics. Do not send this for watchlist. News subscriptions are user-level and do not require it.","example":"ACC123456","x-parser-schema-id":"\u003canonymous-schema-24>"},"interval":{"type":"string","enum":["15s","1m","5m","15m","1h","1d","1mo"],"description":"Candle interval for pnl topic. Optional; defaults to 1m when omitted. Ignored for other topics.","example":"1m","x-parser-schema-id":"\u003canonymous-schema-25>"},"startTime":{"type":"string","format":"date-time","description":"Start time for `pnl` history. Example: `2024-01-01T00:00:00Z`.","example":"2024-01-01T00:00:00Z","x-parser-schema-id":"\u003canonymous-schema-26>"},"symbols":{"type":"array","items":{"type":"string","x-parser-schema-id":"\u003canonymous-schema-28>"},"description":"Optional symbol filter for news topic. Ignored for account, pnl, and watchlist.","example":["AAPL","TSLA"],"x-parser-schema-id":"\u003canonymous-schema-27>"},"topics":{"type":"array","items":{"type":"string","x-parser-schema-id":"\u003canonymous-schema-30>"},"description":"Optional news topic filter for the first news snapshot. Live pushed news is still filtered by symbol. Ignored for other topics.","example":["press_release","news"],"x-parser-schema-id":"\u003canonymous-schema-29>"}},"x-parser-schema-id":"\u003canonymous-schema-23>"}},"example":{"topic":"pnl","params":{"accountId":"ACC123456","interval":"1m","startTime":"2024-01-01T00:00:00Z"}},"x-parser-schema-id":"\u003canonymous-schema-21>"}},"x-parser-schema-id":"SubscribeRequestPayload"},"title":"Subscribe Request","description":"Subscribe to real-time updates","example":"{\n \"type\": \"subscribe\",\n \"id\": \"req-002\",\n \"payload\": {\n \"topic\": \"account\",\n \"params\": {\n \"accountId\": \"ACC123456\"\n }\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"subscribeRequest"}]}],"bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"accountUpdatesStream"}]},{"id":"unsubscribe","title":"Unsubscribe Request","description":"Unsubscribe from updates","type":"receive","messages":[{"id":"unsubscribeRequest","contentType":"application/json","payload":[{"name":"Unsubscribe Request","description":"Unsubscribe from updates","type":"object","properties":[{"name":"type","type":"string","description":"Set this to `unsubscribe` to stop updates for a topic.","enumValues":["unsubscribe"],"required":true},{"name":"id","type":"string","description":"Optional. Add your own request ID here if you want it returned in the unsubscribe reply or error.","required":false},{"name":"payload","type":"object","description":"Choose the topic to stop and add any extra values needed for that topic.","required":true,"properties":[{"name":"topic","type":"string","description":"Topic to unsubscribe from. `account` and `pnl` unsubscribes require `params.accountId`. `watchlist` and `news` unsubscribes do not require params.","enumValues":["account","pnl","watchlist","news"],"required":true},{"name":"params","type":"object","description":"Extra values for the topic you want to stop.","required":false,"properties":[{"name":"accountId","type":"string","description":"Trading account ID. Required for account and pnl unsubscribe requests. Do not send for watchlist or news.","required":false},{"name":"interval","type":"string","description":"For `pnl`, which interval to stop. If you leave this empty, the server uses `1m`.","enumValues":["15s","1m","5m","15m","1h","1d","1mo"],"required":false}]}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","required":["type","payload"],"description":"Use this message to stop updates for one topic.","properties":{"type":{"type":"string","enum":["unsubscribe"],"description":"Set this to `unsubscribe` to stop updates for a topic.","example":"unsubscribe","x-parser-schema-id":"\u003canonymous-schema-168>"},"id":{"type":"string","description":"Optional. Add your own request ID here if you want it returned in the unsubscribe reply or error.","example":"req-006","x-parser-schema-id":"\u003canonymous-schema-169>"},"payload":{"type":"object","description":"Choose the topic to stop and add any extra values needed for that topic.","required":["topic"],"properties":{"topic":{"type":"string","enum":["account","pnl","watchlist","news"],"description":"Topic to unsubscribe from. `account` and `pnl` unsubscribes require `params.accountId`. `watchlist` and `news` unsubscribes do not require params.","example":"account","x-parser-schema-id":"\u003canonymous-schema-171>"},"params":{"type":"object","description":"Extra values for the topic you want to stop.","properties":{"accountId":{"type":"string","description":"Trading account ID. Required for account and pnl unsubscribe requests. Do not send for watchlist or news.","example":"ACC123456","x-parser-schema-id":"\u003canonymous-schema-173>"},"interval":{"type":"string","enum":["15s","1m","5m","15m","1h","1d","1mo"],"description":"For `pnl`, which interval to stop. If you leave this empty, the server uses `1m`.","example":"1m","x-parser-schema-id":"\u003canonymous-schema-174>"}},"x-parser-schema-id":"\u003canonymous-schema-172>"}},"example":{"topic":"account","params":{"accountId":"ACC123456"}},"x-parser-schema-id":"\u003canonymous-schema-170>"}},"x-parser-schema-id":"UnsubscribeRequestPayload"},"title":"Unsubscribe Request","description":"Unsubscribe from updates","example":"{\n \"type\": \"unsubscribe\",\n \"id\": \"req-006\",\n \"payload\": {\n \"topic\": \"account\",\n \"params\": {\n \"accountId\": \"ACC123456\"\n }\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"unsubscribeRequest"}]}],"bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"accountUpdatesStream"}]},{"id":"ping","title":"Ping Request","description":"Send ping to keep connection alive","type":"receive","messages":[{"id":"pingRequest","contentType":"application/json","payload":[{"name":"Ping","description":"Keep-alive ping","type":"object","properties":[{"name":"type","type":"string","description":"Set this to `ping` to check that the connection is still alive.","enumValues":["ping"],"required":true},{"name":"id","type":"string","description":"Optional. Add your own request ID here if you want it returned in the `pong` reply.","required":false}]}],"headers":[],"jsonPayloadSchema":{"type":"object","required":["type"],"description":"Use this message to check that the WebSocket connection is still alive.","properties":{"type":{"type":"string","enum":["ping"],"description":"Set this to `ping` to check that the connection is still alive.","example":"ping","x-parser-schema-id":"\u003canonymous-schema-14>"},"id":{"type":"string","description":"Optional. Add your own request ID here if you want it returned in the `pong` reply.","example":"ping-001","x-parser-schema-id":"\u003canonymous-schema-15>"}},"x-parser-schema-id":"PingPayload"},"title":"Ping","description":"Keep-alive ping","example":"{\n \"type\": \"ping\",\n \"id\": \"ping-001\"\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"pingRequest"}]}],"bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"accountUpdatesStream"}]},{"id":"receiveAuthExpired","title":"Auth Expired","description":"Receive authentication expired notification","type":"send","messages":[{"id":"authExpired","contentType":"application/json","payload":[{"name":"Authentication Expired","description":"Session has expired","type":"object","properties":[{"name":"type","type":"string","description":"The server sets this to `event` for auth status messages.","enumValues":["event"],"required":false},{"name":"payload","type":"object","required":false,"properties":[{"name":"action","type":"string","description":"Sign-in result or sign-in status. `authSuccess` means you can start subscribing. `authError` means the token was rejected. The other values are sent by the server as the connection ages.","enumValues":["authSuccess","authError","authTimeout","authExpired","refreshAuth"],"required":false},{"name":"data","type":"object","description":"Action-specific data","required":false},{"name":"id","type":"string","description":"Request ID from your client message, or `system` if this event was sent by the server on its own.","required":false},{"name":"timestamp","type":"integer","description":"Unix timestamp in milliseconds","required":false}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","description":"Server message about sign-in status.","properties":{"type":{"type":"string","enum":["event"],"description":"The server sets this to `event` for auth status messages.","x-parser-schema-id":"\u003canonymous-schema-8>"},"payload":{"type":"object","properties":{"action":{"type":"string","enum":["authSuccess","authError","authTimeout","authExpired","refreshAuth"],"description":"Sign-in result or sign-in status. `authSuccess` means you can start subscribing. `authError` means the token was rejected. The other values are sent by the server as the connection ages.","x-parser-schema-id":"\u003canonymous-schema-10>"},"data":{"type":"object","description":"Action-specific data","x-parser-schema-id":"\u003canonymous-schema-11>"},"id":{"type":"string","description":"Request ID from your client message, or `system` if this event was sent by the server on its own.","x-parser-schema-id":"\u003canonymous-schema-12>"},"timestamp":{"type":"integer","description":"Unix timestamp in milliseconds","x-parser-schema-id":"\u003canonymous-schema-13>"}},"x-parser-schema-id":"\u003canonymous-schema-9>"}},"x-parser-schema-id":"AuthEventPayload"},"title":"Authentication Expired","description":"Session has expired","example":"{\n \"type\": \"event\",\n \"payload\": {\n \"action\": \"authExpired\",\n \"data\": {\n \"error\": \"session expired\"\n },\n \"id\": \"system\",\n \"timestamp\": 1703001234567\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"authExpired"}]}],"bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"accountUpdatesStream"}]},{"id":"receiveRefreshAuth","title":"Refresh Auth Warning","description":"Receive sign-in expiring warning","type":"send","messages":[{"id":"refreshAuth","contentType":"application/json","payload":[{"name":"Refresh Authentication Warning","description":"Session expires soon, re-authentication recommended","type":"object","properties":[{"name":"type","type":"string","description":"The server sets this to `event` for auth status messages.","enumValues":["event"],"required":false},{"name":"payload","type":"object","required":false,"properties":[{"name":"action","type":"string","description":"Sign-in result or sign-in status. `authSuccess` means you can start subscribing. `authError` means the token was rejected. The other values are sent by the server as the connection ages.","enumValues":["authSuccess","authError","authTimeout","authExpired","refreshAuth"],"required":false},{"name":"data","type":"object","description":"Action-specific data","required":false},{"name":"id","type":"string","description":"Request ID from your client message, or `system` if this event was sent by the server on its own.","required":false},{"name":"timestamp","type":"integer","description":"Unix timestamp in milliseconds","required":false}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","description":"Server message about sign-in status.","properties":{"type":{"type":"string","enum":["event"],"description":"The server sets this to `event` for auth status messages.","x-parser-schema-id":"\u003canonymous-schema-8>"},"payload":{"type":"object","properties":{"action":{"type":"string","enum":["authSuccess","authError","authTimeout","authExpired","refreshAuth"],"description":"Sign-in result or sign-in status. `authSuccess` means you can start subscribing. `authError` means the token was rejected. The other values are sent by the server as the connection ages.","x-parser-schema-id":"\u003canonymous-schema-10>"},"data":{"type":"object","description":"Action-specific data","x-parser-schema-id":"\u003canonymous-schema-11>"},"id":{"type":"string","description":"Request ID from your client message, or `system` if this event was sent by the server on its own.","x-parser-schema-id":"\u003canonymous-schema-12>"},"timestamp":{"type":"integer","description":"Unix timestamp in milliseconds","x-parser-schema-id":"\u003canonymous-schema-13>"}},"x-parser-schema-id":"\u003canonymous-schema-9>"}},"x-parser-schema-id":"AuthEventPayload"},"title":"Refresh Authentication Warning","description":"Session expires soon, re-authentication recommended","example":"{\n \"type\": \"event\",\n \"payload\": {\n \"action\": \"refreshAuth\",\n \"data\": {\n \"expiresIn\": 300000,\n \"expiresAt\": 1703001534567\n },\n \"id\": \"system\",\n \"timestamp\": 1703001234567\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"refreshAuth"}]}],"bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"accountUpdatesStream"}]},{"id":"receiveOrderUpdate","title":"Order Update","description":"Receive real-time order status updates","type":"send","messages":[{"id":"orderUpdate","contentType":"application/json","payload":[{"name":"Order Update","description":"Real-time order update","type":"object","properties":[{"name":"type","type":"string","description":"Top-level message type. Always `event` for streaming updates.","enumValues":["event"],"required":false},{"name":"timestamp","type":"string","description":"Time when the server sent this event, in RFC3339 format.","required":false},{"name":"payload","type":"object","description":"Routing: `topic`, `name`, and `data` for the event.","required":false,"properties":[{"name":"topic","type":"string","description":"Topic identifier. Always `account` for these events.","enumValues":["account"],"required":false},{"name":"name","type":"string","description":"Event name","enumValues":["account.order","account.position","account.balance","account.balance.apex","account.info"],"required":false},{"name":"target","type":"string","description":"Target identifier (e.g. account:ACC123456)","required":false},{"name":"data","type":"object","required":false,"properties":[{"name":"clOrdId","type":"string","description":"Client order ID.","required":false},{"name":"ordId","type":"string","description":"Broker/order ID.","required":false},{"name":"origClOrdId","type":"string","description":"Original client order ID for replaces/cancels.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"clientId","type":"string","description":"Client/user ID.","required":false},{"name":"symbol","type":"string","description":"Trading symbol.","required":false},{"name":"side","type":"string","description":"Order side, for example BUY or SELL.","required":false},{"name":"type","type":"string","description":"Order type, for example LIMIT or MARKET.","required":false},{"name":"timeInForce","type":"string","description":"Time in force, for example DAY.","required":false},{"name":"qty","type":"string","description":"Order quantity serialized as a string.","required":false},{"name":"price","type":"string","description":"Limit price serialized as a string.","required":false},{"name":"stopPrice","type":"string","description":"Stop price serialized as a string.","required":false},{"name":"ordStatus","type":"string","description":"Order status.","enumValues":["NEW","PARTIALLY_FILLED","FILLED","DONE_FOR_DAY","CANCELED","REPLACED","PENDING_CANCEL","STOPPED","REJECTED","SUSPENDED","PENDING_NEW","CALCULATED","EXPIRED","ACCEPTED_FOR_BID","PENDING_REPLACE"],"required":false},{"name":"cumQty","type":"string","description":"Cumulative filled quantity serialized as a string.","required":false},{"name":"leavesQty","type":"string","description":"Remaining open quantity serialized as a string.","required":false},{"name":"avgPrice","type":"string","description":"Average execution price serialized as a string.","required":false},{"name":"currency","type":"string","description":"Currency code.","required":false},{"name":"exDestination","type":"string","description":"Execution destination, for example MNGDFTE or MNGD.","required":false},{"name":"text","type":"string","description":"Broker or venue message.","required":false},{"name":"ordRejReason","type":"string","description":"Order reject reason when present.","required":false},{"name":"securityType","type":"string","description":"Security type, for example EQUITY or OPTION.","required":false},{"name":"category","type":"string","description":"Order category, for example EQUITY, SINGLE_LEG, or MULTI_LEG.","required":false},{"name":"legs","type":"array","required":false,"properties":[{"name":"symbol","type":"string","description":"Underlying or option symbol.","required":false},{"name":"side","type":"string","description":"Order side, for example BUY or SELL.","required":false},{"name":"ratioQty","type":"string","description":"Leg ratio quantity serialized as a string.","required":false},{"name":"securityType","type":"string","description":"Security type, for example OPTION.","required":false},{"name":"maturity","type":"string","description":"Option maturity date in YYYY-MM-DD format.","required":false},{"name":"strikePrice","type":"string","description":"Option strike price serialized as a string.","required":false},{"name":"positionEffect","type":"string","description":"Position effect, for example OPEN or CLOSE.","required":false},{"name":"putCall","type":"string","description":"Option side, CALL or PUT.","required":false},{"name":"avgPrice","type":"string","description":"Average fill price for the leg, serialized as a string.","required":false}]},{"name":"execId","type":"string","description":"Execution ID for fill events.","required":false},{"name":"execType","type":"string","description":"Execution type, for example NEW, FILL, PARTIAL_FILL, or REJECTED.","required":false},{"name":"lastPx","type":"string","description":"Last execution price serialized as a string.","required":false},{"name":"lastQty","type":"string","description":"Last execution quantity serialized as a string.","required":false},{"name":"maturity","type":"string","description":"Flat option maturity when sent on single-leg option orders.","required":false},{"name":"putCall","type":"string","description":"Flat option side, CALL or PUT.","required":false},{"name":"strikePrice","type":"string","description":"Flat option strike price serialized as a string.","required":false},{"name":"positionEffect","type":"string","description":"Flat option position effect.","required":false},{"name":"createdAt","type":"string","description":"Creation timestamp.","required":false},{"name":"updatedAt","type":"string","description":"Last update timestamp.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"symbol","type":"string","description":"Equity or OCC option symbol.","required":false},{"name":"securityType","type":"string","description":"Security type, for example EQUITY or OPTION.","required":false},{"name":"qty","type":"string","description":"Position quantity serialized as a string.","required":false},{"name":"avgPrice","type":"string","description":"Average position price serialized as a string.","required":false},{"name":"avgCost","type":"string","description":"Backward-compatible alias of avgPrice.","required":false},{"name":"unRealizedPL","type":"string","description":"Unrealized P\u0026L serialized as a string.","required":false},{"name":"todayRealizedPnL","type":"string","description":"Today realized P\u0026L serialized as a string.","required":false},{"name":"mtmRealizedPnL","type":"string","description":"Mark-to-market realized P\u0026L measured against the previous close, serialized as a string.","required":false},{"name":"realizedPL","type":"string","description":"Backward-compatible alias of todayRealizedPnL.","required":false},{"name":"todayPL","type":"string","description":"Today total P\u0026L serialized as a string.","required":false},{"name":"instrument","type":"string","description":"Backward-compatible alias of securityType.","required":false},{"name":"putCall","type":"string","description":"CALL or PUT for options.","required":false},{"name":"strikePrice","type":"string","description":"Option strike price serialized as a string.","required":false},{"name":"maturity","type":"string","description":"Option maturity date in YYYY-MM-DD format.","required":false},{"name":"flags","type":"integer","description":"Position flags.","required":false},{"name":"createdAt","type":"string","description":"Creation timestamp.","required":false},{"name":"updatedAt","type":"string","description":"Last update timestamp.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"sodPositionsMarketValue","type":"string","description":"Start-of-day positions market value.","required":false},{"name":"netBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"stockBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"dayTradeBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"optionBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"dayTradeOvernightRegTBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"totalEquity","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"settledFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"unsettledFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"heldBackFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"grossMargin","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"pendingOrdersMarginRequirements","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"maintReq","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"creditMultiplier","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"pendingOrdersCount","type":"integer","description":"Number of pending orders.","required":false},{"name":"credit","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"creditRemaining","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"realizedPL","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"unRealizedPL","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"SMA","type":"string","description":"Special memorandum account value.","required":false},{"name":"smaCreditRemaining","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"PDT","type":"string","description":"Pattern day trader value serialized as a string.","required":false},{"name":"pdtCreditRemaining","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"startOfDayCash","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"valueBought","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"valueSold","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"sodTtlEquity","type":"string","description":"Optional start-of-day total equity.","required":false},{"name":"sodTtlEquityUpdatedAt","type":"string","description":"Optional timestamp for sodTtlEquity.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"fullyPaidUnsettledFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"amountAvailableToWithdraw","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"updatedAt","type":"string","description":"Timestamp for the Apex update.","required":false},{"name":"id","type":"string","description":"Sterling account ID used for subscription routing.","required":false},{"name":"sterlingAccountId","type":"string","description":"Raw Sterling account ID.","required":false},{"name":"apexAccountId","type":"string","description":"Apex account ID when available.","required":false},{"name":"fdid","type":"string","description":"FDID when available.","required":false},{"name":"description","type":"string","description":"Account description.","required":false},{"name":"accountType","type":"string","description":"Account type.","required":false},{"name":"accountClass","type":"string","description":"Account class.","required":false},{"name":"optionsLevel","type":"string","description":"Options level.","required":false},{"name":"maintenanceExcess","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"cashAvailable","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"exchangeSurplus","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"accruedCash","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"netLiquidity","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"marginEquity","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"sma","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"maintReq","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"email","type":"string","description":"Account email.","required":false},{"name":"cell","type":"string","description":"Account phone number.","required":false},{"name":"groupId","type":"string","description":"Sterling group ID.","required":false}]}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","description":"Server message for the `account` topic. `name` tells you what changed.","properties":{"type":{"type":"string","enum":["event"],"description":"Top-level message type. Always `event` for streaming updates.","x-parser-schema-id":"\u003canonymous-schema-184>"},"timestamp":{"type":"string","description":"Time when the server sent this event, in RFC3339 format.","x-parser-schema-id":"\u003canonymous-schema-185>"},"payload":{"type":"object","description":"Routing: `topic`, `name`, and `data` for the event.","properties":{"topic":{"type":"string","enum":["account"],"description":"Topic identifier. Always `account` for these events.","x-parser-schema-id":"\u003canonymous-schema-187>"},"name":{"type":"string","enum":["account.order","account.position","account.balance","account.balance.apex","account.info"],"description":"Event name","x-parser-schema-id":"\u003canonymous-schema-188>"},"target":{"type":"string","description":"Target identifier (e.g. account:ACC123456)","x-parser-schema-id":"\u003canonymous-schema-189>"},"data":{"oneOf":[{"type":"object","description":"Order update from the server. This includes the order plus fill details when the order changes.","properties":{"clOrdId":{"type":"string","description":"Client order ID.","x-parser-schema-id":"\u003canonymous-schema-105>"},"ordId":{"type":"string","description":"Broker/order ID.","x-parser-schema-id":"\u003canonymous-schema-106>"},"origClOrdId":{"type":"string","description":"Original client order ID for replaces/cancels.","x-parser-schema-id":"\u003canonymous-schema-107>"},"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-108>"},"clientId":{"type":"string","description":"Client/user ID.","x-parser-schema-id":"\u003canonymous-schema-109>"},"symbol":{"type":"string","description":"Trading symbol.","x-parser-schema-id":"\u003canonymous-schema-110>"},"side":{"type":"string","description":"Order side, for example BUY or SELL.","x-parser-schema-id":"\u003canonymous-schema-111>"},"type":{"type":"string","description":"Order type, for example LIMIT or MARKET.","x-parser-schema-id":"\u003canonymous-schema-112>"},"timeInForce":{"type":"string","description":"Time in force, for example DAY.","x-parser-schema-id":"\u003canonymous-schema-113>"},"qty":{"type":"string","description":"Order quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-114>"},"price":{"type":"string","description":"Limit price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-115>"},"stopPrice":{"type":"string","description":"Stop price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-116>"},"ordStatus":{"type":"string","enum":["NEW","PARTIALLY_FILLED","FILLED","DONE_FOR_DAY","CANCELED","REPLACED","PENDING_CANCEL","STOPPED","REJECTED","SUSPENDED","PENDING_NEW","CALCULATED","EXPIRED","ACCEPTED_FOR_BID","PENDING_REPLACE"],"description":"Order status.","x-parser-schema-id":"\u003canonymous-schema-117>"},"cumQty":{"type":"string","description":"Cumulative filled quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-118>"},"leavesQty":{"type":"string","description":"Remaining open quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-119>"},"avgPrice":{"type":"string","description":"Average execution price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-120>"},"currency":{"type":"string","description":"Currency code.","x-parser-schema-id":"\u003canonymous-schema-121>"},"exDestination":{"type":"string","description":"Execution destination, for example MNGDFTE or MNGD.","x-parser-schema-id":"\u003canonymous-schema-122>"},"text":{"type":"string","description":"Broker or venue message.","x-parser-schema-id":"\u003canonymous-schema-123>"},"ordRejReason":{"type":"string","description":"Order reject reason when present.","x-parser-schema-id":"\u003canonymous-schema-124>"},"securityType":{"type":"string","description":"Security type, for example EQUITY or OPTION.","x-parser-schema-id":"\u003canonymous-schema-125>"},"category":{"type":"string","description":"Order category, for example EQUITY, SINGLE_LEG, or MULTI_LEG.","x-parser-schema-id":"\u003canonymous-schema-126>"},"legs":{"type":"array","items":{"type":"object","description":"One option leg in an order update.","properties":{"symbol":{"type":"string","description":"Underlying or option symbol.","x-parser-schema-id":"\u003canonymous-schema-128>"},"side":{"type":"string","description":"Order side, for example BUY or SELL.","x-parser-schema-id":"\u003canonymous-schema-129>"},"ratioQty":{"type":"string","description":"Leg ratio quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-130>"},"securityType":{"type":"string","description":"Security type, for example OPTION.","x-parser-schema-id":"\u003canonymous-schema-131>"},"maturity":{"type":"string","description":"Option maturity date in YYYY-MM-DD format.","x-parser-schema-id":"\u003canonymous-schema-132>"},"strikePrice":{"type":"string","description":"Option strike price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-133>"},"positionEffect":{"type":"string","description":"Position effect, for example OPEN or CLOSE.","x-parser-schema-id":"\u003canonymous-schema-134>"},"putCall":{"type":"string","description":"Option side, CALL or PUT.","x-parser-schema-id":"\u003canonymous-schema-135>"},"avgPrice":{"type":"string","description":"Average fill price for the leg, serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-136>"}},"x-parser-schema-id":"AccountOrderLeg"},"x-parser-schema-id":"\u003canonymous-schema-127>"},"execId":{"type":"string","description":"Execution ID for fill events.","x-parser-schema-id":"\u003canonymous-schema-137>"},"execType":{"type":"string","description":"Execution type, for example NEW, FILL, PARTIAL_FILL, or REJECTED.","x-parser-schema-id":"\u003canonymous-schema-138>"},"lastPx":{"type":"string","description":"Last execution price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-139>"},"lastQty":{"type":"string","description":"Last execution quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-140>"},"maturity":{"type":"string","description":"Flat option maturity when sent on single-leg option orders.","x-parser-schema-id":"\u003canonymous-schema-141>"},"putCall":{"type":"string","description":"Flat option side, CALL or PUT.","x-parser-schema-id":"\u003canonymous-schema-142>"},"strikePrice":{"type":"string","description":"Flat option strike price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-143>"},"positionEffect":{"type":"string","description":"Flat option position effect.","x-parser-schema-id":"\u003canonymous-schema-144>"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp.","x-parser-schema-id":"\u003canonymous-schema-145>"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp.","x-parser-schema-id":"\u003canonymous-schema-146>"}},"x-parser-schema-id":"OrderData"},{"type":"object","description":"Position update from the server. Decimal numbers are sent as strings.","properties":{"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-86>"},"symbol":{"type":"string","description":"Equity or OCC option symbol.","x-parser-schema-id":"\u003canonymous-schema-87>"},"securityType":{"type":"string","description":"Security type, for example EQUITY or OPTION.","x-parser-schema-id":"\u003canonymous-schema-88>"},"qty":{"type":"string","description":"Position quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-89>"},"avgPrice":{"type":"string","description":"Average position price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-90>"},"avgCost":{"type":"string","description":"Backward-compatible alias of avgPrice.","x-parser-schema-id":"\u003canonymous-schema-91>"},"unRealizedPL":{"type":"string","description":"Unrealized P\u0026L serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-92>"},"todayRealizedPnL":{"type":"string","description":"Today realized P\u0026L serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-93>"},"mtmRealizedPnL":{"type":"string","description":"Mark-to-market realized P\u0026L measured against the previous close, serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-94>"},"realizedPL":{"type":"string","description":"Backward-compatible alias of todayRealizedPnL.","x-parser-schema-id":"\u003canonymous-schema-95>"},"todayPL":{"type":"string","description":"Today total P\u0026L serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-96>"},"instrument":{"type":"string","description":"Backward-compatible alias of securityType.","x-parser-schema-id":"\u003canonymous-schema-97>"},"putCall":{"type":"string","description":"CALL or PUT for options.","x-parser-schema-id":"\u003canonymous-schema-98>"},"strikePrice":{"type":"string","description":"Option strike price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-99>"},"maturity":{"type":"string","description":"Option maturity date in YYYY-MM-DD format.","x-parser-schema-id":"\u003canonymous-schema-100>"},"flags":{"type":"integer","description":"Position flags.","x-parser-schema-id":"\u003canonymous-schema-101>"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp.","x-parser-schema-id":"\u003canonymous-schema-102>"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp.","x-parser-schema-id":"\u003canonymous-schema-103>"}},"x-parser-schema-id":"PositionData"},{"type":"object","description":"Balance update from the server. Decimal numbers are sent as strings.","properties":{"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-190>"},"sodPositionsMarketValue":{"type":"string","description":"Start-of-day positions market value.","x-parser-schema-id":"\u003canonymous-schema-191>"},"netBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-192>"},"stockBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-193>"},"dayTradeBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-194>"},"optionBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-195>"},"dayTradeOvernightRegTBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-196>"},"totalEquity":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-197>"},"settledFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-198>"},"unsettledFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-199>"},"heldBackFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-200>"},"grossMargin":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-201>"},"pendingOrdersMarginRequirements":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-202>"},"maintReq":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-203>"},"creditMultiplier":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-204>"},"pendingOrdersCount":{"type":"integer","description":"Number of pending orders.","x-parser-schema-id":"\u003canonymous-schema-205>"},"credit":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-206>"},"creditRemaining":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-207>"},"realizedPL":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-208>"},"unRealizedPL":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-209>"},"SMA":{"type":"string","description":"Special memorandum account value.","x-parser-schema-id":"\u003canonymous-schema-210>"},"smaCreditRemaining":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-211>"},"PDT":{"type":"string","description":"Pattern day trader value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-212>"},"pdtCreditRemaining":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-213>"},"startOfDayCash":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-214>"},"valueBought":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-215>"},"valueSold":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-216>"},"sodTtlEquity":{"type":"string","description":"Optional start-of-day total equity.","x-parser-schema-id":"\u003canonymous-schema-217>"},"sodTtlEquityUpdatedAt":{"type":"string","format":"date-time","description":"Optional timestamp for sodTtlEquity.","x-parser-schema-id":"\u003canonymous-schema-218>"}},"x-parser-schema-id":"BalanceData"},{"type":"object","description":"Smaller balance update. Merge these fields into the latest balance data you already have.","properties":{"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-219>"},"fullyPaidUnsettledFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-220>"},"amountAvailableToWithdraw":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-221>"},"updatedAt":{"type":"string","format":"date-time","description":"Timestamp for the Apex update.","x-parser-schema-id":"\u003canonymous-schema-222>"}},"x-parser-schema-id":"ApexBalanceData"},{"type":"object","description":"Account info update from the server. Decimal numbers are sent as strings.","properties":{"id":{"type":"string","description":"Sterling account ID used for subscription routing.","x-parser-schema-id":"\u003canonymous-schema-223>"},"sterlingAccountId":{"type":"string","description":"Raw Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-224>"},"apexAccountId":{"type":"string","description":"Apex account ID when available.","x-parser-schema-id":"\u003canonymous-schema-225>"},"fdid":{"type":"string","description":"FDID when available.","x-parser-schema-id":"\u003canonymous-schema-226>"},"description":{"type":"string","description":"Account description.","x-parser-schema-id":"\u003canonymous-schema-227>"},"accountType":{"type":"string","description":"Account type.","x-parser-schema-id":"\u003canonymous-schema-228>"},"accountClass":{"type":"string","description":"Account class.","x-parser-schema-id":"\u003canonymous-schema-229>"},"optionsLevel":{"type":"string","description":"Options level.","x-parser-schema-id":"\u003canonymous-schema-230>"},"maintenanceExcess":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-231>"},"cashAvailable":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-232>"},"exchangeSurplus":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-233>"},"accruedCash":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-234>"},"netLiquidity":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-235>"},"marginEquity":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-236>"},"sma":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-237>"},"maintReq":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-238>"},"email":{"type":"string","description":"Account email.","x-parser-schema-id":"\u003canonymous-schema-239>"},"cell":{"type":"string","description":"Account phone number.","x-parser-schema-id":"\u003canonymous-schema-240>"},"groupId":{"type":"string","description":"Sterling group ID.","x-parser-schema-id":"\u003canonymous-schema-241>"}},"x-parser-schema-id":"AccountInfoData"}],"x-parser-schema-id":"AccountEventData"}},"x-parser-schema-id":"\u003canonymous-schema-186>"}},"x-parser-schema-id":"AccountEventPayload"},"title":"Order Update","description":"Real-time order update","example":"{\n \"type\": \"event\",\n \"timestamp\": \"2024-01-15T10:30:05Z\",\n \"payload\": {\n \"topic\": \"account\",\n \"name\": \"account.order\",\n \"target\": \"account:ACC123456\",\n \"data\": {\n \"ordId\": \"ORD-12345\",\n \"clOrdId\": \"CLIENT-001\",\n \"accountId\": \"ACC123456\",\n \"clientId\": \"CLIENT-USER-001\",\n \"symbol\": \"AAPL\",\n \"side\": \"BUY\",\n \"type\": \"LIMIT\",\n \"timeInForce\": \"DAY\",\n \"qty\": \"100\",\n \"price\": \"150.50\",\n \"stopPrice\": \"0\",\n \"ordStatus\": \"FILLED\",\n \"cumQty\": \"100\",\n \"leavesQty\": \"0\",\n \"avgPrice\": \"150.45\",\n \"currency\": \"USD\",\n \"exDestination\": \"MNGDFTE\",\n \"securityType\": \"EQUITY\",\n \"category\": \"EQUITY\",\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"updatedAt\": \"2024-01-15T10:30:05Z\"\n }\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"orderUpdate"}]}],"bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"accountUpdatesStream"}]},{"id":"receivePositionUpdate","title":"Position Update","description":"Receive real-time position updates","type":"send","messages":[{"id":"positionUpdate","contentType":"application/json","payload":[{"name":"Position Update","description":"Real-time position update","type":"object","properties":[{"name":"type","type":"string","description":"Top-level message type. Always `event` for streaming updates.","enumValues":["event"],"required":false},{"name":"timestamp","type":"string","description":"Time when the server sent this event, in RFC3339 format.","required":false},{"name":"payload","type":"object","description":"Routing: `topic`, `name`, and `data` for the event.","required":false,"properties":[{"name":"topic","type":"string","description":"Topic identifier. Always `account` for these events.","enumValues":["account"],"required":false},{"name":"name","type":"string","description":"Event name","enumValues":["account.order","account.position","account.balance","account.balance.apex","account.info"],"required":false},{"name":"target","type":"string","description":"Target identifier (e.g. account:ACC123456)","required":false},{"name":"data","type":"object","required":false,"properties":[{"name":"clOrdId","type":"string","description":"Client order ID.","required":false},{"name":"ordId","type":"string","description":"Broker/order ID.","required":false},{"name":"origClOrdId","type":"string","description":"Original client order ID for replaces/cancels.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"clientId","type":"string","description":"Client/user ID.","required":false},{"name":"symbol","type":"string","description":"Trading symbol.","required":false},{"name":"side","type":"string","description":"Order side, for example BUY or SELL.","required":false},{"name":"type","type":"string","description":"Order type, for example LIMIT or MARKET.","required":false},{"name":"timeInForce","type":"string","description":"Time in force, for example DAY.","required":false},{"name":"qty","type":"string","description":"Order quantity serialized as a string.","required":false},{"name":"price","type":"string","description":"Limit price serialized as a string.","required":false},{"name":"stopPrice","type":"string","description":"Stop price serialized as a string.","required":false},{"name":"ordStatus","type":"string","description":"Order status.","enumValues":["NEW","PARTIALLY_FILLED","FILLED","DONE_FOR_DAY","CANCELED","REPLACED","PENDING_CANCEL","STOPPED","REJECTED","SUSPENDED","PENDING_NEW","CALCULATED","EXPIRED","ACCEPTED_FOR_BID","PENDING_REPLACE"],"required":false},{"name":"cumQty","type":"string","description":"Cumulative filled quantity serialized as a string.","required":false},{"name":"leavesQty","type":"string","description":"Remaining open quantity serialized as a string.","required":false},{"name":"avgPrice","type":"string","description":"Average execution price serialized as a string.","required":false},{"name":"currency","type":"string","description":"Currency code.","required":false},{"name":"exDestination","type":"string","description":"Execution destination, for example MNGDFTE or MNGD.","required":false},{"name":"text","type":"string","description":"Broker or venue message.","required":false},{"name":"ordRejReason","type":"string","description":"Order reject reason when present.","required":false},{"name":"securityType","type":"string","description":"Security type, for example EQUITY or OPTION.","required":false},{"name":"category","type":"string","description":"Order category, for example EQUITY, SINGLE_LEG, or MULTI_LEG.","required":false},{"name":"legs","type":"array","required":false,"properties":[{"name":"symbol","type":"string","description":"Underlying or option symbol.","required":false},{"name":"side","type":"string","description":"Order side, for example BUY or SELL.","required":false},{"name":"ratioQty","type":"string","description":"Leg ratio quantity serialized as a string.","required":false},{"name":"securityType","type":"string","description":"Security type, for example OPTION.","required":false},{"name":"maturity","type":"string","description":"Option maturity date in YYYY-MM-DD format.","required":false},{"name":"strikePrice","type":"string","description":"Option strike price serialized as a string.","required":false},{"name":"positionEffect","type":"string","description":"Position effect, for example OPEN or CLOSE.","required":false},{"name":"putCall","type":"string","description":"Option side, CALL or PUT.","required":false},{"name":"avgPrice","type":"string","description":"Average fill price for the leg, serialized as a string.","required":false}]},{"name":"execId","type":"string","description":"Execution ID for fill events.","required":false},{"name":"execType","type":"string","description":"Execution type, for example NEW, FILL, PARTIAL_FILL, or REJECTED.","required":false},{"name":"lastPx","type":"string","description":"Last execution price serialized as a string.","required":false},{"name":"lastQty","type":"string","description":"Last execution quantity serialized as a string.","required":false},{"name":"maturity","type":"string","description":"Flat option maturity when sent on single-leg option orders.","required":false},{"name":"putCall","type":"string","description":"Flat option side, CALL or PUT.","required":false},{"name":"strikePrice","type":"string","description":"Flat option strike price serialized as a string.","required":false},{"name":"positionEffect","type":"string","description":"Flat option position effect.","required":false},{"name":"createdAt","type":"string","description":"Creation timestamp.","required":false},{"name":"updatedAt","type":"string","description":"Last update timestamp.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"symbol","type":"string","description":"Equity or OCC option symbol.","required":false},{"name":"securityType","type":"string","description":"Security type, for example EQUITY or OPTION.","required":false},{"name":"qty","type":"string","description":"Position quantity serialized as a string.","required":false},{"name":"avgPrice","type":"string","description":"Average position price serialized as a string.","required":false},{"name":"avgCost","type":"string","description":"Backward-compatible alias of avgPrice.","required":false},{"name":"unRealizedPL","type":"string","description":"Unrealized P\u0026L serialized as a string.","required":false},{"name":"todayRealizedPnL","type":"string","description":"Today realized P\u0026L serialized as a string.","required":false},{"name":"mtmRealizedPnL","type":"string","description":"Mark-to-market realized P\u0026L measured against the previous close, serialized as a string.","required":false},{"name":"realizedPL","type":"string","description":"Backward-compatible alias of todayRealizedPnL.","required":false},{"name":"todayPL","type":"string","description":"Today total P\u0026L serialized as a string.","required":false},{"name":"instrument","type":"string","description":"Backward-compatible alias of securityType.","required":false},{"name":"putCall","type":"string","description":"CALL or PUT for options.","required":false},{"name":"strikePrice","type":"string","description":"Option strike price serialized as a string.","required":false},{"name":"maturity","type":"string","description":"Option maturity date in YYYY-MM-DD format.","required":false},{"name":"flags","type":"integer","description":"Position flags.","required":false},{"name":"createdAt","type":"string","description":"Creation timestamp.","required":false},{"name":"updatedAt","type":"string","description":"Last update timestamp.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"sodPositionsMarketValue","type":"string","description":"Start-of-day positions market value.","required":false},{"name":"netBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"stockBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"dayTradeBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"optionBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"dayTradeOvernightRegTBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"totalEquity","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"settledFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"unsettledFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"heldBackFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"grossMargin","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"pendingOrdersMarginRequirements","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"maintReq","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"creditMultiplier","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"pendingOrdersCount","type":"integer","description":"Number of pending orders.","required":false},{"name":"credit","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"creditRemaining","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"realizedPL","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"unRealizedPL","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"SMA","type":"string","description":"Special memorandum account value.","required":false},{"name":"smaCreditRemaining","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"PDT","type":"string","description":"Pattern day trader value serialized as a string.","required":false},{"name":"pdtCreditRemaining","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"startOfDayCash","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"valueBought","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"valueSold","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"sodTtlEquity","type":"string","description":"Optional start-of-day total equity.","required":false},{"name":"sodTtlEquityUpdatedAt","type":"string","description":"Optional timestamp for sodTtlEquity.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"fullyPaidUnsettledFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"amountAvailableToWithdraw","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"updatedAt","type":"string","description":"Timestamp for the Apex update.","required":false},{"name":"id","type":"string","description":"Sterling account ID used for subscription routing.","required":false},{"name":"sterlingAccountId","type":"string","description":"Raw Sterling account ID.","required":false},{"name":"apexAccountId","type":"string","description":"Apex account ID when available.","required":false},{"name":"fdid","type":"string","description":"FDID when available.","required":false},{"name":"description","type":"string","description":"Account description.","required":false},{"name":"accountType","type":"string","description":"Account type.","required":false},{"name":"accountClass","type":"string","description":"Account class.","required":false},{"name":"optionsLevel","type":"string","description":"Options level.","required":false},{"name":"maintenanceExcess","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"cashAvailable","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"exchangeSurplus","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"accruedCash","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"netLiquidity","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"marginEquity","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"sma","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"maintReq","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"email","type":"string","description":"Account email.","required":false},{"name":"cell","type":"string","description":"Account phone number.","required":false},{"name":"groupId","type":"string","description":"Sterling group ID.","required":false}]}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","description":"Server message for the `account` topic. `name` tells you what changed.","properties":{"type":{"type":"string","enum":["event"],"description":"Top-level message type. Always `event` for streaming updates.","x-parser-schema-id":"\u003canonymous-schema-184>"},"timestamp":{"type":"string","description":"Time when the server sent this event, in RFC3339 format.","x-parser-schema-id":"\u003canonymous-schema-185>"},"payload":{"type":"object","description":"Routing: `topic`, `name`, and `data` for the event.","properties":{"topic":{"type":"string","enum":["account"],"description":"Topic identifier. Always `account` for these events.","x-parser-schema-id":"\u003canonymous-schema-187>"},"name":{"type":"string","enum":["account.order","account.position","account.balance","account.balance.apex","account.info"],"description":"Event name","x-parser-schema-id":"\u003canonymous-schema-188>"},"target":{"type":"string","description":"Target identifier (e.g. account:ACC123456)","x-parser-schema-id":"\u003canonymous-schema-189>"},"data":{"oneOf":[{"type":"object","description":"Order update from the server. This includes the order plus fill details when the order changes.","properties":{"clOrdId":{"type":"string","description":"Client order ID.","x-parser-schema-id":"\u003canonymous-schema-105>"},"ordId":{"type":"string","description":"Broker/order ID.","x-parser-schema-id":"\u003canonymous-schema-106>"},"origClOrdId":{"type":"string","description":"Original client order ID for replaces/cancels.","x-parser-schema-id":"\u003canonymous-schema-107>"},"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-108>"},"clientId":{"type":"string","description":"Client/user ID.","x-parser-schema-id":"\u003canonymous-schema-109>"},"symbol":{"type":"string","description":"Trading symbol.","x-parser-schema-id":"\u003canonymous-schema-110>"},"side":{"type":"string","description":"Order side, for example BUY or SELL.","x-parser-schema-id":"\u003canonymous-schema-111>"},"type":{"type":"string","description":"Order type, for example LIMIT or MARKET.","x-parser-schema-id":"\u003canonymous-schema-112>"},"timeInForce":{"type":"string","description":"Time in force, for example DAY.","x-parser-schema-id":"\u003canonymous-schema-113>"},"qty":{"type":"string","description":"Order quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-114>"},"price":{"type":"string","description":"Limit price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-115>"},"stopPrice":{"type":"string","description":"Stop price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-116>"},"ordStatus":{"type":"string","enum":["NEW","PARTIALLY_FILLED","FILLED","DONE_FOR_DAY","CANCELED","REPLACED","PENDING_CANCEL","STOPPED","REJECTED","SUSPENDED","PENDING_NEW","CALCULATED","EXPIRED","ACCEPTED_FOR_BID","PENDING_REPLACE"],"description":"Order status.","x-parser-schema-id":"\u003canonymous-schema-117>"},"cumQty":{"type":"string","description":"Cumulative filled quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-118>"},"leavesQty":{"type":"string","description":"Remaining open quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-119>"},"avgPrice":{"type":"string","description":"Average execution price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-120>"},"currency":{"type":"string","description":"Currency code.","x-parser-schema-id":"\u003canonymous-schema-121>"},"exDestination":{"type":"string","description":"Execution destination, for example MNGDFTE or MNGD.","x-parser-schema-id":"\u003canonymous-schema-122>"},"text":{"type":"string","description":"Broker or venue message.","x-parser-schema-id":"\u003canonymous-schema-123>"},"ordRejReason":{"type":"string","description":"Order reject reason when present.","x-parser-schema-id":"\u003canonymous-schema-124>"},"securityType":{"type":"string","description":"Security type, for example EQUITY or OPTION.","x-parser-schema-id":"\u003canonymous-schema-125>"},"category":{"type":"string","description":"Order category, for example EQUITY, SINGLE_LEG, or MULTI_LEG.","x-parser-schema-id":"\u003canonymous-schema-126>"},"legs":{"type":"array","items":{"type":"object","description":"One option leg in an order update.","properties":{"symbol":{"type":"string","description":"Underlying or option symbol.","x-parser-schema-id":"\u003canonymous-schema-128>"},"side":{"type":"string","description":"Order side, for example BUY or SELL.","x-parser-schema-id":"\u003canonymous-schema-129>"},"ratioQty":{"type":"string","description":"Leg ratio quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-130>"},"securityType":{"type":"string","description":"Security type, for example OPTION.","x-parser-schema-id":"\u003canonymous-schema-131>"},"maturity":{"type":"string","description":"Option maturity date in YYYY-MM-DD format.","x-parser-schema-id":"\u003canonymous-schema-132>"},"strikePrice":{"type":"string","description":"Option strike price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-133>"},"positionEffect":{"type":"string","description":"Position effect, for example OPEN or CLOSE.","x-parser-schema-id":"\u003canonymous-schema-134>"},"putCall":{"type":"string","description":"Option side, CALL or PUT.","x-parser-schema-id":"\u003canonymous-schema-135>"},"avgPrice":{"type":"string","description":"Average fill price for the leg, serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-136>"}},"x-parser-schema-id":"AccountOrderLeg"},"x-parser-schema-id":"\u003canonymous-schema-127>"},"execId":{"type":"string","description":"Execution ID for fill events.","x-parser-schema-id":"\u003canonymous-schema-137>"},"execType":{"type":"string","description":"Execution type, for example NEW, FILL, PARTIAL_FILL, or REJECTED.","x-parser-schema-id":"\u003canonymous-schema-138>"},"lastPx":{"type":"string","description":"Last execution price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-139>"},"lastQty":{"type":"string","description":"Last execution quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-140>"},"maturity":{"type":"string","description":"Flat option maturity when sent on single-leg option orders.","x-parser-schema-id":"\u003canonymous-schema-141>"},"putCall":{"type":"string","description":"Flat option side, CALL or PUT.","x-parser-schema-id":"\u003canonymous-schema-142>"},"strikePrice":{"type":"string","description":"Flat option strike price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-143>"},"positionEffect":{"type":"string","description":"Flat option position effect.","x-parser-schema-id":"\u003canonymous-schema-144>"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp.","x-parser-schema-id":"\u003canonymous-schema-145>"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp.","x-parser-schema-id":"\u003canonymous-schema-146>"}},"x-parser-schema-id":"OrderData"},{"type":"object","description":"Position update from the server. Decimal numbers are sent as strings.","properties":{"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-86>"},"symbol":{"type":"string","description":"Equity or OCC option symbol.","x-parser-schema-id":"\u003canonymous-schema-87>"},"securityType":{"type":"string","description":"Security type, for example EQUITY or OPTION.","x-parser-schema-id":"\u003canonymous-schema-88>"},"qty":{"type":"string","description":"Position quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-89>"},"avgPrice":{"type":"string","description":"Average position price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-90>"},"avgCost":{"type":"string","description":"Backward-compatible alias of avgPrice.","x-parser-schema-id":"\u003canonymous-schema-91>"},"unRealizedPL":{"type":"string","description":"Unrealized P\u0026L serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-92>"},"todayRealizedPnL":{"type":"string","description":"Today realized P\u0026L serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-93>"},"mtmRealizedPnL":{"type":"string","description":"Mark-to-market realized P\u0026L measured against the previous close, serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-94>"},"realizedPL":{"type":"string","description":"Backward-compatible alias of todayRealizedPnL.","x-parser-schema-id":"\u003canonymous-schema-95>"},"todayPL":{"type":"string","description":"Today total P\u0026L serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-96>"},"instrument":{"type":"string","description":"Backward-compatible alias of securityType.","x-parser-schema-id":"\u003canonymous-schema-97>"},"putCall":{"type":"string","description":"CALL or PUT for options.","x-parser-schema-id":"\u003canonymous-schema-98>"},"strikePrice":{"type":"string","description":"Option strike price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-99>"},"maturity":{"type":"string","description":"Option maturity date in YYYY-MM-DD format.","x-parser-schema-id":"\u003canonymous-schema-100>"},"flags":{"type":"integer","description":"Position flags.","x-parser-schema-id":"\u003canonymous-schema-101>"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp.","x-parser-schema-id":"\u003canonymous-schema-102>"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp.","x-parser-schema-id":"\u003canonymous-schema-103>"}},"x-parser-schema-id":"PositionData"},{"type":"object","description":"Balance update from the server. Decimal numbers are sent as strings.","properties":{"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-190>"},"sodPositionsMarketValue":{"type":"string","description":"Start-of-day positions market value.","x-parser-schema-id":"\u003canonymous-schema-191>"},"netBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-192>"},"stockBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-193>"},"dayTradeBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-194>"},"optionBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-195>"},"dayTradeOvernightRegTBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-196>"},"totalEquity":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-197>"},"settledFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-198>"},"unsettledFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-199>"},"heldBackFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-200>"},"grossMargin":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-201>"},"pendingOrdersMarginRequirements":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-202>"},"maintReq":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-203>"},"creditMultiplier":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-204>"},"pendingOrdersCount":{"type":"integer","description":"Number of pending orders.","x-parser-schema-id":"\u003canonymous-schema-205>"},"credit":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-206>"},"creditRemaining":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-207>"},"realizedPL":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-208>"},"unRealizedPL":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-209>"},"SMA":{"type":"string","description":"Special memorandum account value.","x-parser-schema-id":"\u003canonymous-schema-210>"},"smaCreditRemaining":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-211>"},"PDT":{"type":"string","description":"Pattern day trader value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-212>"},"pdtCreditRemaining":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-213>"},"startOfDayCash":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-214>"},"valueBought":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-215>"},"valueSold":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-216>"},"sodTtlEquity":{"type":"string","description":"Optional start-of-day total equity.","x-parser-schema-id":"\u003canonymous-schema-217>"},"sodTtlEquityUpdatedAt":{"type":"string","format":"date-time","description":"Optional timestamp for sodTtlEquity.","x-parser-schema-id":"\u003canonymous-schema-218>"}},"x-parser-schema-id":"BalanceData"},{"type":"object","description":"Smaller balance update. Merge these fields into the latest balance data you already have.","properties":{"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-219>"},"fullyPaidUnsettledFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-220>"},"amountAvailableToWithdraw":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-221>"},"updatedAt":{"type":"string","format":"date-time","description":"Timestamp for the Apex update.","x-parser-schema-id":"\u003canonymous-schema-222>"}},"x-parser-schema-id":"ApexBalanceData"},{"type":"object","description":"Account info update from the server. Decimal numbers are sent as strings.","properties":{"id":{"type":"string","description":"Sterling account ID used for subscription routing.","x-parser-schema-id":"\u003canonymous-schema-223>"},"sterlingAccountId":{"type":"string","description":"Raw Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-224>"},"apexAccountId":{"type":"string","description":"Apex account ID when available.","x-parser-schema-id":"\u003canonymous-schema-225>"},"fdid":{"type":"string","description":"FDID when available.","x-parser-schema-id":"\u003canonymous-schema-226>"},"description":{"type":"string","description":"Account description.","x-parser-schema-id":"\u003canonymous-schema-227>"},"accountType":{"type":"string","description":"Account type.","x-parser-schema-id":"\u003canonymous-schema-228>"},"accountClass":{"type":"string","description":"Account class.","x-parser-schema-id":"\u003canonymous-schema-229>"},"optionsLevel":{"type":"string","description":"Options level.","x-parser-schema-id":"\u003canonymous-schema-230>"},"maintenanceExcess":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-231>"},"cashAvailable":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-232>"},"exchangeSurplus":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-233>"},"accruedCash":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-234>"},"netLiquidity":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-235>"},"marginEquity":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-236>"},"sma":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-237>"},"maintReq":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-238>"},"email":{"type":"string","description":"Account email.","x-parser-schema-id":"\u003canonymous-schema-239>"},"cell":{"type":"string","description":"Account phone number.","x-parser-schema-id":"\u003canonymous-schema-240>"},"groupId":{"type":"string","description":"Sterling group ID.","x-parser-schema-id":"\u003canonymous-schema-241>"}},"x-parser-schema-id":"AccountInfoData"}],"x-parser-schema-id":"AccountEventData"}},"x-parser-schema-id":"\u003canonymous-schema-186>"}},"x-parser-schema-id":"AccountEventPayload"},"title":"Position Update","description":"Real-time position update","example":"{\n \"type\": \"event\",\n \"timestamp\": \"2024-01-15T14:30:00Z\",\n \"payload\": {\n \"topic\": \"account\",\n \"name\": \"account.position\",\n \"target\": \"account:ACC123456\",\n \"data\": {\n \"accountId\": \"ACC123456\",\n \"symbol\": \"AAPL\",\n \"securityType\": \"EQUITY\",\n \"qty\": \"100\",\n \"avgPrice\": \"150.45\",\n \"avgCost\": \"150.45\",\n \"unRealizedPL\": \"155.00\",\n \"todayRealizedPnL\": \"0\",\n \"realizedPL\": \"0\",\n \"todayPL\": \"155.00\",\n \"instrument\": \"EQUITY\",\n \"createdAt\": \"2024-01-15T10:30:05Z\",\n \"updatedAt\": \"2024-01-15T14:30:00Z\"\n }\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"positionUpdate"}]}],"bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"accountUpdatesStream"}]},{"id":"receiveBalanceUpdate","title":"Balance Update","description":"Receive real-time balance updates","type":"send","messages":[{"id":"balanceUpdate","contentType":"application/json","payload":[{"name":"Balance Update","description":"Real-time balance update","type":"object","properties":[{"name":"type","type":"string","description":"Top-level message type. Always `event` for streaming updates.","enumValues":["event"],"required":false},{"name":"timestamp","type":"string","description":"Time when the server sent this event, in RFC3339 format.","required":false},{"name":"payload","type":"object","description":"Routing: `topic`, `name`, and `data` for the event.","required":false,"properties":[{"name":"topic","type":"string","description":"Topic identifier. Always `account` for these events.","enumValues":["account"],"required":false},{"name":"name","type":"string","description":"Event name","enumValues":["account.order","account.position","account.balance","account.balance.apex","account.info"],"required":false},{"name":"target","type":"string","description":"Target identifier (e.g. account:ACC123456)","required":false},{"name":"data","type":"object","required":false,"properties":[{"name":"clOrdId","type":"string","description":"Client order ID.","required":false},{"name":"ordId","type":"string","description":"Broker/order ID.","required":false},{"name":"origClOrdId","type":"string","description":"Original client order ID for replaces/cancels.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"clientId","type":"string","description":"Client/user ID.","required":false},{"name":"symbol","type":"string","description":"Trading symbol.","required":false},{"name":"side","type":"string","description":"Order side, for example BUY or SELL.","required":false},{"name":"type","type":"string","description":"Order type, for example LIMIT or MARKET.","required":false},{"name":"timeInForce","type":"string","description":"Time in force, for example DAY.","required":false},{"name":"qty","type":"string","description":"Order quantity serialized as a string.","required":false},{"name":"price","type":"string","description":"Limit price serialized as a string.","required":false},{"name":"stopPrice","type":"string","description":"Stop price serialized as a string.","required":false},{"name":"ordStatus","type":"string","description":"Order status.","enumValues":["NEW","PARTIALLY_FILLED","FILLED","DONE_FOR_DAY","CANCELED","REPLACED","PENDING_CANCEL","STOPPED","REJECTED","SUSPENDED","PENDING_NEW","CALCULATED","EXPIRED","ACCEPTED_FOR_BID","PENDING_REPLACE"],"required":false},{"name":"cumQty","type":"string","description":"Cumulative filled quantity serialized as a string.","required":false},{"name":"leavesQty","type":"string","description":"Remaining open quantity serialized as a string.","required":false},{"name":"avgPrice","type":"string","description":"Average execution price serialized as a string.","required":false},{"name":"currency","type":"string","description":"Currency code.","required":false},{"name":"exDestination","type":"string","description":"Execution destination, for example MNGDFTE or MNGD.","required":false},{"name":"text","type":"string","description":"Broker or venue message.","required":false},{"name":"ordRejReason","type":"string","description":"Order reject reason when present.","required":false},{"name":"securityType","type":"string","description":"Security type, for example EQUITY or OPTION.","required":false},{"name":"category","type":"string","description":"Order category, for example EQUITY, SINGLE_LEG, or MULTI_LEG.","required":false},{"name":"legs","type":"array","required":false,"properties":[{"name":"symbol","type":"string","description":"Underlying or option symbol.","required":false},{"name":"side","type":"string","description":"Order side, for example BUY or SELL.","required":false},{"name":"ratioQty","type":"string","description":"Leg ratio quantity serialized as a string.","required":false},{"name":"securityType","type":"string","description":"Security type, for example OPTION.","required":false},{"name":"maturity","type":"string","description":"Option maturity date in YYYY-MM-DD format.","required":false},{"name":"strikePrice","type":"string","description":"Option strike price serialized as a string.","required":false},{"name":"positionEffect","type":"string","description":"Position effect, for example OPEN or CLOSE.","required":false},{"name":"putCall","type":"string","description":"Option side, CALL or PUT.","required":false},{"name":"avgPrice","type":"string","description":"Average fill price for the leg, serialized as a string.","required":false}]},{"name":"execId","type":"string","description":"Execution ID for fill events.","required":false},{"name":"execType","type":"string","description":"Execution type, for example NEW, FILL, PARTIAL_FILL, or REJECTED.","required":false},{"name":"lastPx","type":"string","description":"Last execution price serialized as a string.","required":false},{"name":"lastQty","type":"string","description":"Last execution quantity serialized as a string.","required":false},{"name":"maturity","type":"string","description":"Flat option maturity when sent on single-leg option orders.","required":false},{"name":"putCall","type":"string","description":"Flat option side, CALL or PUT.","required":false},{"name":"strikePrice","type":"string","description":"Flat option strike price serialized as a string.","required":false},{"name":"positionEffect","type":"string","description":"Flat option position effect.","required":false},{"name":"createdAt","type":"string","description":"Creation timestamp.","required":false},{"name":"updatedAt","type":"string","description":"Last update timestamp.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"symbol","type":"string","description":"Equity or OCC option symbol.","required":false},{"name":"securityType","type":"string","description":"Security type, for example EQUITY or OPTION.","required":false},{"name":"qty","type":"string","description":"Position quantity serialized as a string.","required":false},{"name":"avgPrice","type":"string","description":"Average position price serialized as a string.","required":false},{"name":"avgCost","type":"string","description":"Backward-compatible alias of avgPrice.","required":false},{"name":"unRealizedPL","type":"string","description":"Unrealized P\u0026L serialized as a string.","required":false},{"name":"todayRealizedPnL","type":"string","description":"Today realized P\u0026L serialized as a string.","required":false},{"name":"mtmRealizedPnL","type":"string","description":"Mark-to-market realized P\u0026L measured against the previous close, serialized as a string.","required":false},{"name":"realizedPL","type":"string","description":"Backward-compatible alias of todayRealizedPnL.","required":false},{"name":"todayPL","type":"string","description":"Today total P\u0026L serialized as a string.","required":false},{"name":"instrument","type":"string","description":"Backward-compatible alias of securityType.","required":false},{"name":"putCall","type":"string","description":"CALL or PUT for options.","required":false},{"name":"strikePrice","type":"string","description":"Option strike price serialized as a string.","required":false},{"name":"maturity","type":"string","description":"Option maturity date in YYYY-MM-DD format.","required":false},{"name":"flags","type":"integer","description":"Position flags.","required":false},{"name":"createdAt","type":"string","description":"Creation timestamp.","required":false},{"name":"updatedAt","type":"string","description":"Last update timestamp.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"sodPositionsMarketValue","type":"string","description":"Start-of-day positions market value.","required":false},{"name":"netBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"stockBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"dayTradeBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"optionBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"dayTradeOvernightRegTBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"totalEquity","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"settledFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"unsettledFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"heldBackFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"grossMargin","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"pendingOrdersMarginRequirements","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"maintReq","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"creditMultiplier","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"pendingOrdersCount","type":"integer","description":"Number of pending orders.","required":false},{"name":"credit","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"creditRemaining","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"realizedPL","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"unRealizedPL","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"SMA","type":"string","description":"Special memorandum account value.","required":false},{"name":"smaCreditRemaining","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"PDT","type":"string","description":"Pattern day trader value serialized as a string.","required":false},{"name":"pdtCreditRemaining","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"startOfDayCash","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"valueBought","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"valueSold","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"sodTtlEquity","type":"string","description":"Optional start-of-day total equity.","required":false},{"name":"sodTtlEquityUpdatedAt","type":"string","description":"Optional timestamp for sodTtlEquity.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"fullyPaidUnsettledFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"amountAvailableToWithdraw","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"updatedAt","type":"string","description":"Timestamp for the Apex update.","required":false},{"name":"id","type":"string","description":"Sterling account ID used for subscription routing.","required":false},{"name":"sterlingAccountId","type":"string","description":"Raw Sterling account ID.","required":false},{"name":"apexAccountId","type":"string","description":"Apex account ID when available.","required":false},{"name":"fdid","type":"string","description":"FDID when available.","required":false},{"name":"description","type":"string","description":"Account description.","required":false},{"name":"accountType","type":"string","description":"Account type.","required":false},{"name":"accountClass","type":"string","description":"Account class.","required":false},{"name":"optionsLevel","type":"string","description":"Options level.","required":false},{"name":"maintenanceExcess","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"cashAvailable","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"exchangeSurplus","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"accruedCash","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"netLiquidity","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"marginEquity","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"sma","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"maintReq","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"email","type":"string","description":"Account email.","required":false},{"name":"cell","type":"string","description":"Account phone number.","required":false},{"name":"groupId","type":"string","description":"Sterling group ID.","required":false}]}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","description":"Server message for the `account` topic. `name` tells you what changed.","properties":{"type":{"type":"string","enum":["event"],"description":"Top-level message type. Always `event` for streaming updates.","x-parser-schema-id":"\u003canonymous-schema-184>"},"timestamp":{"type":"string","description":"Time when the server sent this event, in RFC3339 format.","x-parser-schema-id":"\u003canonymous-schema-185>"},"payload":{"type":"object","description":"Routing: `topic`, `name`, and `data` for the event.","properties":{"topic":{"type":"string","enum":["account"],"description":"Topic identifier. Always `account` for these events.","x-parser-schema-id":"\u003canonymous-schema-187>"},"name":{"type":"string","enum":["account.order","account.position","account.balance","account.balance.apex","account.info"],"description":"Event name","x-parser-schema-id":"\u003canonymous-schema-188>"},"target":{"type":"string","description":"Target identifier (e.g. account:ACC123456)","x-parser-schema-id":"\u003canonymous-schema-189>"},"data":{"oneOf":[{"type":"object","description":"Order update from the server. This includes the order plus fill details when the order changes.","properties":{"clOrdId":{"type":"string","description":"Client order ID.","x-parser-schema-id":"\u003canonymous-schema-105>"},"ordId":{"type":"string","description":"Broker/order ID.","x-parser-schema-id":"\u003canonymous-schema-106>"},"origClOrdId":{"type":"string","description":"Original client order ID for replaces/cancels.","x-parser-schema-id":"\u003canonymous-schema-107>"},"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-108>"},"clientId":{"type":"string","description":"Client/user ID.","x-parser-schema-id":"\u003canonymous-schema-109>"},"symbol":{"type":"string","description":"Trading symbol.","x-parser-schema-id":"\u003canonymous-schema-110>"},"side":{"type":"string","description":"Order side, for example BUY or SELL.","x-parser-schema-id":"\u003canonymous-schema-111>"},"type":{"type":"string","description":"Order type, for example LIMIT or MARKET.","x-parser-schema-id":"\u003canonymous-schema-112>"},"timeInForce":{"type":"string","description":"Time in force, for example DAY.","x-parser-schema-id":"\u003canonymous-schema-113>"},"qty":{"type":"string","description":"Order quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-114>"},"price":{"type":"string","description":"Limit price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-115>"},"stopPrice":{"type":"string","description":"Stop price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-116>"},"ordStatus":{"type":"string","enum":["NEW","PARTIALLY_FILLED","FILLED","DONE_FOR_DAY","CANCELED","REPLACED","PENDING_CANCEL","STOPPED","REJECTED","SUSPENDED","PENDING_NEW","CALCULATED","EXPIRED","ACCEPTED_FOR_BID","PENDING_REPLACE"],"description":"Order status.","x-parser-schema-id":"\u003canonymous-schema-117>"},"cumQty":{"type":"string","description":"Cumulative filled quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-118>"},"leavesQty":{"type":"string","description":"Remaining open quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-119>"},"avgPrice":{"type":"string","description":"Average execution price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-120>"},"currency":{"type":"string","description":"Currency code.","x-parser-schema-id":"\u003canonymous-schema-121>"},"exDestination":{"type":"string","description":"Execution destination, for example MNGDFTE or MNGD.","x-parser-schema-id":"\u003canonymous-schema-122>"},"text":{"type":"string","description":"Broker or venue message.","x-parser-schema-id":"\u003canonymous-schema-123>"},"ordRejReason":{"type":"string","description":"Order reject reason when present.","x-parser-schema-id":"\u003canonymous-schema-124>"},"securityType":{"type":"string","description":"Security type, for example EQUITY or OPTION.","x-parser-schema-id":"\u003canonymous-schema-125>"},"category":{"type":"string","description":"Order category, for example EQUITY, SINGLE_LEG, or MULTI_LEG.","x-parser-schema-id":"\u003canonymous-schema-126>"},"legs":{"type":"array","items":{"type":"object","description":"One option leg in an order update.","properties":{"symbol":{"type":"string","description":"Underlying or option symbol.","x-parser-schema-id":"\u003canonymous-schema-128>"},"side":{"type":"string","description":"Order side, for example BUY or SELL.","x-parser-schema-id":"\u003canonymous-schema-129>"},"ratioQty":{"type":"string","description":"Leg ratio quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-130>"},"securityType":{"type":"string","description":"Security type, for example OPTION.","x-parser-schema-id":"\u003canonymous-schema-131>"},"maturity":{"type":"string","description":"Option maturity date in YYYY-MM-DD format.","x-parser-schema-id":"\u003canonymous-schema-132>"},"strikePrice":{"type":"string","description":"Option strike price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-133>"},"positionEffect":{"type":"string","description":"Position effect, for example OPEN or CLOSE.","x-parser-schema-id":"\u003canonymous-schema-134>"},"putCall":{"type":"string","description":"Option side, CALL or PUT.","x-parser-schema-id":"\u003canonymous-schema-135>"},"avgPrice":{"type":"string","description":"Average fill price for the leg, serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-136>"}},"x-parser-schema-id":"AccountOrderLeg"},"x-parser-schema-id":"\u003canonymous-schema-127>"},"execId":{"type":"string","description":"Execution ID for fill events.","x-parser-schema-id":"\u003canonymous-schema-137>"},"execType":{"type":"string","description":"Execution type, for example NEW, FILL, PARTIAL_FILL, or REJECTED.","x-parser-schema-id":"\u003canonymous-schema-138>"},"lastPx":{"type":"string","description":"Last execution price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-139>"},"lastQty":{"type":"string","description":"Last execution quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-140>"},"maturity":{"type":"string","description":"Flat option maturity when sent on single-leg option orders.","x-parser-schema-id":"\u003canonymous-schema-141>"},"putCall":{"type":"string","description":"Flat option side, CALL or PUT.","x-parser-schema-id":"\u003canonymous-schema-142>"},"strikePrice":{"type":"string","description":"Flat option strike price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-143>"},"positionEffect":{"type":"string","description":"Flat option position effect.","x-parser-schema-id":"\u003canonymous-schema-144>"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp.","x-parser-schema-id":"\u003canonymous-schema-145>"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp.","x-parser-schema-id":"\u003canonymous-schema-146>"}},"x-parser-schema-id":"OrderData"},{"type":"object","description":"Position update from the server. Decimal numbers are sent as strings.","properties":{"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-86>"},"symbol":{"type":"string","description":"Equity or OCC option symbol.","x-parser-schema-id":"\u003canonymous-schema-87>"},"securityType":{"type":"string","description":"Security type, for example EQUITY or OPTION.","x-parser-schema-id":"\u003canonymous-schema-88>"},"qty":{"type":"string","description":"Position quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-89>"},"avgPrice":{"type":"string","description":"Average position price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-90>"},"avgCost":{"type":"string","description":"Backward-compatible alias of avgPrice.","x-parser-schema-id":"\u003canonymous-schema-91>"},"unRealizedPL":{"type":"string","description":"Unrealized P\u0026L serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-92>"},"todayRealizedPnL":{"type":"string","description":"Today realized P\u0026L serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-93>"},"mtmRealizedPnL":{"type":"string","description":"Mark-to-market realized P\u0026L measured against the previous close, serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-94>"},"realizedPL":{"type":"string","description":"Backward-compatible alias of todayRealizedPnL.","x-parser-schema-id":"\u003canonymous-schema-95>"},"todayPL":{"type":"string","description":"Today total P\u0026L serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-96>"},"instrument":{"type":"string","description":"Backward-compatible alias of securityType.","x-parser-schema-id":"\u003canonymous-schema-97>"},"putCall":{"type":"string","description":"CALL or PUT for options.","x-parser-schema-id":"\u003canonymous-schema-98>"},"strikePrice":{"type":"string","description":"Option strike price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-99>"},"maturity":{"type":"string","description":"Option maturity date in YYYY-MM-DD format.","x-parser-schema-id":"\u003canonymous-schema-100>"},"flags":{"type":"integer","description":"Position flags.","x-parser-schema-id":"\u003canonymous-schema-101>"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp.","x-parser-schema-id":"\u003canonymous-schema-102>"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp.","x-parser-schema-id":"\u003canonymous-schema-103>"}},"x-parser-schema-id":"PositionData"},{"type":"object","description":"Balance update from the server. Decimal numbers are sent as strings.","properties":{"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-190>"},"sodPositionsMarketValue":{"type":"string","description":"Start-of-day positions market value.","x-parser-schema-id":"\u003canonymous-schema-191>"},"netBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-192>"},"stockBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-193>"},"dayTradeBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-194>"},"optionBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-195>"},"dayTradeOvernightRegTBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-196>"},"totalEquity":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-197>"},"settledFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-198>"},"unsettledFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-199>"},"heldBackFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-200>"},"grossMargin":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-201>"},"pendingOrdersMarginRequirements":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-202>"},"maintReq":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-203>"},"creditMultiplier":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-204>"},"pendingOrdersCount":{"type":"integer","description":"Number of pending orders.","x-parser-schema-id":"\u003canonymous-schema-205>"},"credit":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-206>"},"creditRemaining":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-207>"},"realizedPL":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-208>"},"unRealizedPL":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-209>"},"SMA":{"type":"string","description":"Special memorandum account value.","x-parser-schema-id":"\u003canonymous-schema-210>"},"smaCreditRemaining":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-211>"},"PDT":{"type":"string","description":"Pattern day trader value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-212>"},"pdtCreditRemaining":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-213>"},"startOfDayCash":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-214>"},"valueBought":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-215>"},"valueSold":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-216>"},"sodTtlEquity":{"type":"string","description":"Optional start-of-day total equity.","x-parser-schema-id":"\u003canonymous-schema-217>"},"sodTtlEquityUpdatedAt":{"type":"string","format":"date-time","description":"Optional timestamp for sodTtlEquity.","x-parser-schema-id":"\u003canonymous-schema-218>"}},"x-parser-schema-id":"BalanceData"},{"type":"object","description":"Smaller balance update. Merge these fields into the latest balance data you already have.","properties":{"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-219>"},"fullyPaidUnsettledFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-220>"},"amountAvailableToWithdraw":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-221>"},"updatedAt":{"type":"string","format":"date-time","description":"Timestamp for the Apex update.","x-parser-schema-id":"\u003canonymous-schema-222>"}},"x-parser-schema-id":"ApexBalanceData"},{"type":"object","description":"Account info update from the server. Decimal numbers are sent as strings.","properties":{"id":{"type":"string","description":"Sterling account ID used for subscription routing.","x-parser-schema-id":"\u003canonymous-schema-223>"},"sterlingAccountId":{"type":"string","description":"Raw Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-224>"},"apexAccountId":{"type":"string","description":"Apex account ID when available.","x-parser-schema-id":"\u003canonymous-schema-225>"},"fdid":{"type":"string","description":"FDID when available.","x-parser-schema-id":"\u003canonymous-schema-226>"},"description":{"type":"string","description":"Account description.","x-parser-schema-id":"\u003canonymous-schema-227>"},"accountType":{"type":"string","description":"Account type.","x-parser-schema-id":"\u003canonymous-schema-228>"},"accountClass":{"type":"string","description":"Account class.","x-parser-schema-id":"\u003canonymous-schema-229>"},"optionsLevel":{"type":"string","description":"Options level.","x-parser-schema-id":"\u003canonymous-schema-230>"},"maintenanceExcess":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-231>"},"cashAvailable":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-232>"},"exchangeSurplus":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-233>"},"accruedCash":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-234>"},"netLiquidity":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-235>"},"marginEquity":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-236>"},"sma":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-237>"},"maintReq":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-238>"},"email":{"type":"string","description":"Account email.","x-parser-schema-id":"\u003canonymous-schema-239>"},"cell":{"type":"string","description":"Account phone number.","x-parser-schema-id":"\u003canonymous-schema-240>"},"groupId":{"type":"string","description":"Sterling group ID.","x-parser-schema-id":"\u003canonymous-schema-241>"}},"x-parser-schema-id":"AccountInfoData"}],"x-parser-schema-id":"AccountEventData"}},"x-parser-schema-id":"\u003canonymous-schema-186>"}},"x-parser-schema-id":"AccountEventPayload"},"title":"Balance Update","description":"Real-time balance update","example":"{\n \"type\": \"event\",\n \"timestamp\": \"2024-01-15T14:30:00Z\",\n \"payload\": {\n \"topic\": \"account\",\n \"name\": \"account.balance\",\n \"target\": \"account:ACC123456\",\n \"data\": {\n \"accountId\": \"ACC123456\",\n \"sodPositionsMarketValue\": \"48000.00\",\n \"netBuyingPower\": \"25155.00\",\n \"stockBuyingPower\": \"50310.00\",\n \"dayTradeBuyingPower\": \"100620.00\",\n \"optionBuyingPower\": \"25155.00\",\n \"dayTradeOvernightRegTBuyingPower\": \"50310.00\",\n \"totalEquity\": \"50155.00\",\n \"settledFunds\": \"35000.00\",\n \"unsettledFunds\": \"0\",\n \"heldBackFunds\": \"0\",\n \"grossMargin\": \"15045.00\",\n \"pendingOrdersMarginRequirements\": \"0\",\n \"maintReq\": \"7646.50\",\n \"creditMultiplier\": \"2\",\n \"pendingOrdersCount\": 0,\n \"credit\": \"50000.00\",\n \"creditRemaining\": \"25155.00\",\n \"realizedPL\": \"0\",\n \"unRealizedPL\": \"167.00\",\n \"SMA\": \"25155.00\",\n \"smaCreditRemaining\": \"25155.00\",\n \"PDT\": \"0\",\n \"pdtCreditRemaining\": \"100620.00\",\n \"startOfDayCash\": \"35000.00\",\n \"valueBought\": \"15293.00\",\n \"valueSold\": \"0\"\n }\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"balanceUpdate"}]}],"bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"accountUpdatesStream"}]},{"id":"receiveAccountUpdate","title":"Account Update","description":"Receive account information updates","type":"send","messages":[{"id":"accountUpdate","contentType":"application/json","payload":[{"name":"Account Info Update","description":"Real-time account information update","type":"object","properties":[{"name":"type","type":"string","description":"Top-level message type. Always `event` for streaming updates.","enumValues":["event"],"required":false},{"name":"timestamp","type":"string","description":"Time when the server sent this event, in RFC3339 format.","required":false},{"name":"payload","type":"object","description":"Routing: `topic`, `name`, and `data` for the event.","required":false,"properties":[{"name":"topic","type":"string","description":"Topic identifier. Always `account` for these events.","enumValues":["account"],"required":false},{"name":"name","type":"string","description":"Event name","enumValues":["account.order","account.position","account.balance","account.balance.apex","account.info"],"required":false},{"name":"target","type":"string","description":"Target identifier (e.g. account:ACC123456)","required":false},{"name":"data","type":"object","required":false,"properties":[{"name":"clOrdId","type":"string","description":"Client order ID.","required":false},{"name":"ordId","type":"string","description":"Broker/order ID.","required":false},{"name":"origClOrdId","type":"string","description":"Original client order ID for replaces/cancels.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"clientId","type":"string","description":"Client/user ID.","required":false},{"name":"symbol","type":"string","description":"Trading symbol.","required":false},{"name":"side","type":"string","description":"Order side, for example BUY or SELL.","required":false},{"name":"type","type":"string","description":"Order type, for example LIMIT or MARKET.","required":false},{"name":"timeInForce","type":"string","description":"Time in force, for example DAY.","required":false},{"name":"qty","type":"string","description":"Order quantity serialized as a string.","required":false},{"name":"price","type":"string","description":"Limit price serialized as a string.","required":false},{"name":"stopPrice","type":"string","description":"Stop price serialized as a string.","required":false},{"name":"ordStatus","type":"string","description":"Order status.","enumValues":["NEW","PARTIALLY_FILLED","FILLED","DONE_FOR_DAY","CANCELED","REPLACED","PENDING_CANCEL","STOPPED","REJECTED","SUSPENDED","PENDING_NEW","CALCULATED","EXPIRED","ACCEPTED_FOR_BID","PENDING_REPLACE"],"required":false},{"name":"cumQty","type":"string","description":"Cumulative filled quantity serialized as a string.","required":false},{"name":"leavesQty","type":"string","description":"Remaining open quantity serialized as a string.","required":false},{"name":"avgPrice","type":"string","description":"Average execution price serialized as a string.","required":false},{"name":"currency","type":"string","description":"Currency code.","required":false},{"name":"exDestination","type":"string","description":"Execution destination, for example MNGDFTE or MNGD.","required":false},{"name":"text","type":"string","description":"Broker or venue message.","required":false},{"name":"ordRejReason","type":"string","description":"Order reject reason when present.","required":false},{"name":"securityType","type":"string","description":"Security type, for example EQUITY or OPTION.","required":false},{"name":"category","type":"string","description":"Order category, for example EQUITY, SINGLE_LEG, or MULTI_LEG.","required":false},{"name":"legs","type":"array","required":false,"properties":[{"name":"symbol","type":"string","description":"Underlying or option symbol.","required":false},{"name":"side","type":"string","description":"Order side, for example BUY or SELL.","required":false},{"name":"ratioQty","type":"string","description":"Leg ratio quantity serialized as a string.","required":false},{"name":"securityType","type":"string","description":"Security type, for example OPTION.","required":false},{"name":"maturity","type":"string","description":"Option maturity date in YYYY-MM-DD format.","required":false},{"name":"strikePrice","type":"string","description":"Option strike price serialized as a string.","required":false},{"name":"positionEffect","type":"string","description":"Position effect, for example OPEN or CLOSE.","required":false},{"name":"putCall","type":"string","description":"Option side, CALL or PUT.","required":false},{"name":"avgPrice","type":"string","description":"Average fill price for the leg, serialized as a string.","required":false}]},{"name":"execId","type":"string","description":"Execution ID for fill events.","required":false},{"name":"execType","type":"string","description":"Execution type, for example NEW, FILL, PARTIAL_FILL, or REJECTED.","required":false},{"name":"lastPx","type":"string","description":"Last execution price serialized as a string.","required":false},{"name":"lastQty","type":"string","description":"Last execution quantity serialized as a string.","required":false},{"name":"maturity","type":"string","description":"Flat option maturity when sent on single-leg option orders.","required":false},{"name":"putCall","type":"string","description":"Flat option side, CALL or PUT.","required":false},{"name":"strikePrice","type":"string","description":"Flat option strike price serialized as a string.","required":false},{"name":"positionEffect","type":"string","description":"Flat option position effect.","required":false},{"name":"createdAt","type":"string","description":"Creation timestamp.","required":false},{"name":"updatedAt","type":"string","description":"Last update timestamp.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"symbol","type":"string","description":"Equity or OCC option symbol.","required":false},{"name":"securityType","type":"string","description":"Security type, for example EQUITY or OPTION.","required":false},{"name":"qty","type":"string","description":"Position quantity serialized as a string.","required":false},{"name":"avgPrice","type":"string","description":"Average position price serialized as a string.","required":false},{"name":"avgCost","type":"string","description":"Backward-compatible alias of avgPrice.","required":false},{"name":"unRealizedPL","type":"string","description":"Unrealized P\u0026L serialized as a string.","required":false},{"name":"todayRealizedPnL","type":"string","description":"Today realized P\u0026L serialized as a string.","required":false},{"name":"mtmRealizedPnL","type":"string","description":"Mark-to-market realized P\u0026L measured against the previous close, serialized as a string.","required":false},{"name":"realizedPL","type":"string","description":"Backward-compatible alias of todayRealizedPnL.","required":false},{"name":"todayPL","type":"string","description":"Today total P\u0026L serialized as a string.","required":false},{"name":"instrument","type":"string","description":"Backward-compatible alias of securityType.","required":false},{"name":"putCall","type":"string","description":"CALL or PUT for options.","required":false},{"name":"strikePrice","type":"string","description":"Option strike price serialized as a string.","required":false},{"name":"maturity","type":"string","description":"Option maturity date in YYYY-MM-DD format.","required":false},{"name":"flags","type":"integer","description":"Position flags.","required":false},{"name":"createdAt","type":"string","description":"Creation timestamp.","required":false},{"name":"updatedAt","type":"string","description":"Last update timestamp.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"sodPositionsMarketValue","type":"string","description":"Start-of-day positions market value.","required":false},{"name":"netBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"stockBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"dayTradeBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"optionBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"dayTradeOvernightRegTBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"totalEquity","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"settledFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"unsettledFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"heldBackFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"grossMargin","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"pendingOrdersMarginRequirements","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"maintReq","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"creditMultiplier","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"pendingOrdersCount","type":"integer","description":"Number of pending orders.","required":false},{"name":"credit","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"creditRemaining","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"realizedPL","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"unRealizedPL","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"SMA","type":"string","description":"Special memorandum account value.","required":false},{"name":"smaCreditRemaining","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"PDT","type":"string","description":"Pattern day trader value serialized as a string.","required":false},{"name":"pdtCreditRemaining","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"startOfDayCash","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"valueBought","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"valueSold","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"sodTtlEquity","type":"string","description":"Optional start-of-day total equity.","required":false},{"name":"sodTtlEquityUpdatedAt","type":"string","description":"Optional timestamp for sodTtlEquity.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"fullyPaidUnsettledFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"amountAvailableToWithdraw","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"updatedAt","type":"string","description":"Timestamp for the Apex update.","required":false},{"name":"id","type":"string","description":"Sterling account ID used for subscription routing.","required":false},{"name":"sterlingAccountId","type":"string","description":"Raw Sterling account ID.","required":false},{"name":"apexAccountId","type":"string","description":"Apex account ID when available.","required":false},{"name":"fdid","type":"string","description":"FDID when available.","required":false},{"name":"description","type":"string","description":"Account description.","required":false},{"name":"accountType","type":"string","description":"Account type.","required":false},{"name":"accountClass","type":"string","description":"Account class.","required":false},{"name":"optionsLevel","type":"string","description":"Options level.","required":false},{"name":"maintenanceExcess","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"cashAvailable","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"exchangeSurplus","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"accruedCash","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"netLiquidity","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"marginEquity","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"sma","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"maintReq","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"email","type":"string","description":"Account email.","required":false},{"name":"cell","type":"string","description":"Account phone number.","required":false},{"name":"groupId","type":"string","description":"Sterling group ID.","required":false}]}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","description":"Server message for the `account` topic. `name` tells you what changed.","properties":{"type":{"type":"string","enum":["event"],"description":"Top-level message type. Always `event` for streaming updates.","x-parser-schema-id":"\u003canonymous-schema-184>"},"timestamp":{"type":"string","description":"Time when the server sent this event, in RFC3339 format.","x-parser-schema-id":"\u003canonymous-schema-185>"},"payload":{"type":"object","description":"Routing: `topic`, `name`, and `data` for the event.","properties":{"topic":{"type":"string","enum":["account"],"description":"Topic identifier. Always `account` for these events.","x-parser-schema-id":"\u003canonymous-schema-187>"},"name":{"type":"string","enum":["account.order","account.position","account.balance","account.balance.apex","account.info"],"description":"Event name","x-parser-schema-id":"\u003canonymous-schema-188>"},"target":{"type":"string","description":"Target identifier (e.g. account:ACC123456)","x-parser-schema-id":"\u003canonymous-schema-189>"},"data":{"oneOf":[{"type":"object","description":"Order update from the server. This includes the order plus fill details when the order changes.","properties":{"clOrdId":{"type":"string","description":"Client order ID.","x-parser-schema-id":"\u003canonymous-schema-105>"},"ordId":{"type":"string","description":"Broker/order ID.","x-parser-schema-id":"\u003canonymous-schema-106>"},"origClOrdId":{"type":"string","description":"Original client order ID for replaces/cancels.","x-parser-schema-id":"\u003canonymous-schema-107>"},"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-108>"},"clientId":{"type":"string","description":"Client/user ID.","x-parser-schema-id":"\u003canonymous-schema-109>"},"symbol":{"type":"string","description":"Trading symbol.","x-parser-schema-id":"\u003canonymous-schema-110>"},"side":{"type":"string","description":"Order side, for example BUY or SELL.","x-parser-schema-id":"\u003canonymous-schema-111>"},"type":{"type":"string","description":"Order type, for example LIMIT or MARKET.","x-parser-schema-id":"\u003canonymous-schema-112>"},"timeInForce":{"type":"string","description":"Time in force, for example DAY.","x-parser-schema-id":"\u003canonymous-schema-113>"},"qty":{"type":"string","description":"Order quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-114>"},"price":{"type":"string","description":"Limit price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-115>"},"stopPrice":{"type":"string","description":"Stop price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-116>"},"ordStatus":{"type":"string","enum":["NEW","PARTIALLY_FILLED","FILLED","DONE_FOR_DAY","CANCELED","REPLACED","PENDING_CANCEL","STOPPED","REJECTED","SUSPENDED","PENDING_NEW","CALCULATED","EXPIRED","ACCEPTED_FOR_BID","PENDING_REPLACE"],"description":"Order status.","x-parser-schema-id":"\u003canonymous-schema-117>"},"cumQty":{"type":"string","description":"Cumulative filled quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-118>"},"leavesQty":{"type":"string","description":"Remaining open quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-119>"},"avgPrice":{"type":"string","description":"Average execution price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-120>"},"currency":{"type":"string","description":"Currency code.","x-parser-schema-id":"\u003canonymous-schema-121>"},"exDestination":{"type":"string","description":"Execution destination, for example MNGDFTE or MNGD.","x-parser-schema-id":"\u003canonymous-schema-122>"},"text":{"type":"string","description":"Broker or venue message.","x-parser-schema-id":"\u003canonymous-schema-123>"},"ordRejReason":{"type":"string","description":"Order reject reason when present.","x-parser-schema-id":"\u003canonymous-schema-124>"},"securityType":{"type":"string","description":"Security type, for example EQUITY or OPTION.","x-parser-schema-id":"\u003canonymous-schema-125>"},"category":{"type":"string","description":"Order category, for example EQUITY, SINGLE_LEG, or MULTI_LEG.","x-parser-schema-id":"\u003canonymous-schema-126>"},"legs":{"type":"array","items":{"type":"object","description":"One option leg in an order update.","properties":{"symbol":{"type":"string","description":"Underlying or option symbol.","x-parser-schema-id":"\u003canonymous-schema-128>"},"side":{"type":"string","description":"Order side, for example BUY or SELL.","x-parser-schema-id":"\u003canonymous-schema-129>"},"ratioQty":{"type":"string","description":"Leg ratio quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-130>"},"securityType":{"type":"string","description":"Security type, for example OPTION.","x-parser-schema-id":"\u003canonymous-schema-131>"},"maturity":{"type":"string","description":"Option maturity date in YYYY-MM-DD format.","x-parser-schema-id":"\u003canonymous-schema-132>"},"strikePrice":{"type":"string","description":"Option strike price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-133>"},"positionEffect":{"type":"string","description":"Position effect, for example OPEN or CLOSE.","x-parser-schema-id":"\u003canonymous-schema-134>"},"putCall":{"type":"string","description":"Option side, CALL or PUT.","x-parser-schema-id":"\u003canonymous-schema-135>"},"avgPrice":{"type":"string","description":"Average fill price for the leg, serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-136>"}},"x-parser-schema-id":"AccountOrderLeg"},"x-parser-schema-id":"\u003canonymous-schema-127>"},"execId":{"type":"string","description":"Execution ID for fill events.","x-parser-schema-id":"\u003canonymous-schema-137>"},"execType":{"type":"string","description":"Execution type, for example NEW, FILL, PARTIAL_FILL, or REJECTED.","x-parser-schema-id":"\u003canonymous-schema-138>"},"lastPx":{"type":"string","description":"Last execution price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-139>"},"lastQty":{"type":"string","description":"Last execution quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-140>"},"maturity":{"type":"string","description":"Flat option maturity when sent on single-leg option orders.","x-parser-schema-id":"\u003canonymous-schema-141>"},"putCall":{"type":"string","description":"Flat option side, CALL or PUT.","x-parser-schema-id":"\u003canonymous-schema-142>"},"strikePrice":{"type":"string","description":"Flat option strike price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-143>"},"positionEffect":{"type":"string","description":"Flat option position effect.","x-parser-schema-id":"\u003canonymous-schema-144>"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp.","x-parser-schema-id":"\u003canonymous-schema-145>"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp.","x-parser-schema-id":"\u003canonymous-schema-146>"}},"x-parser-schema-id":"OrderData"},{"type":"object","description":"Position update from the server. Decimal numbers are sent as strings.","properties":{"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-86>"},"symbol":{"type":"string","description":"Equity or OCC option symbol.","x-parser-schema-id":"\u003canonymous-schema-87>"},"securityType":{"type":"string","description":"Security type, for example EQUITY or OPTION.","x-parser-schema-id":"\u003canonymous-schema-88>"},"qty":{"type":"string","description":"Position quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-89>"},"avgPrice":{"type":"string","description":"Average position price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-90>"},"avgCost":{"type":"string","description":"Backward-compatible alias of avgPrice.","x-parser-schema-id":"\u003canonymous-schema-91>"},"unRealizedPL":{"type":"string","description":"Unrealized P\u0026L serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-92>"},"todayRealizedPnL":{"type":"string","description":"Today realized P\u0026L serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-93>"},"mtmRealizedPnL":{"type":"string","description":"Mark-to-market realized P\u0026L measured against the previous close, serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-94>"},"realizedPL":{"type":"string","description":"Backward-compatible alias of todayRealizedPnL.","x-parser-schema-id":"\u003canonymous-schema-95>"},"todayPL":{"type":"string","description":"Today total P\u0026L serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-96>"},"instrument":{"type":"string","description":"Backward-compatible alias of securityType.","x-parser-schema-id":"\u003canonymous-schema-97>"},"putCall":{"type":"string","description":"CALL or PUT for options.","x-parser-schema-id":"\u003canonymous-schema-98>"},"strikePrice":{"type":"string","description":"Option strike price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-99>"},"maturity":{"type":"string","description":"Option maturity date in YYYY-MM-DD format.","x-parser-schema-id":"\u003canonymous-schema-100>"},"flags":{"type":"integer","description":"Position flags.","x-parser-schema-id":"\u003canonymous-schema-101>"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp.","x-parser-schema-id":"\u003canonymous-schema-102>"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp.","x-parser-schema-id":"\u003canonymous-schema-103>"}},"x-parser-schema-id":"PositionData"},{"type":"object","description":"Balance update from the server. Decimal numbers are sent as strings.","properties":{"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-190>"},"sodPositionsMarketValue":{"type":"string","description":"Start-of-day positions market value.","x-parser-schema-id":"\u003canonymous-schema-191>"},"netBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-192>"},"stockBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-193>"},"dayTradeBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-194>"},"optionBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-195>"},"dayTradeOvernightRegTBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-196>"},"totalEquity":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-197>"},"settledFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-198>"},"unsettledFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-199>"},"heldBackFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-200>"},"grossMargin":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-201>"},"pendingOrdersMarginRequirements":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-202>"},"maintReq":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-203>"},"creditMultiplier":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-204>"},"pendingOrdersCount":{"type":"integer","description":"Number of pending orders.","x-parser-schema-id":"\u003canonymous-schema-205>"},"credit":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-206>"},"creditRemaining":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-207>"},"realizedPL":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-208>"},"unRealizedPL":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-209>"},"SMA":{"type":"string","description":"Special memorandum account value.","x-parser-schema-id":"\u003canonymous-schema-210>"},"smaCreditRemaining":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-211>"},"PDT":{"type":"string","description":"Pattern day trader value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-212>"},"pdtCreditRemaining":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-213>"},"startOfDayCash":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-214>"},"valueBought":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-215>"},"valueSold":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-216>"},"sodTtlEquity":{"type":"string","description":"Optional start-of-day total equity.","x-parser-schema-id":"\u003canonymous-schema-217>"},"sodTtlEquityUpdatedAt":{"type":"string","format":"date-time","description":"Optional timestamp for sodTtlEquity.","x-parser-schema-id":"\u003canonymous-schema-218>"}},"x-parser-schema-id":"BalanceData"},{"type":"object","description":"Smaller balance update. Merge these fields into the latest balance data you already have.","properties":{"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-219>"},"fullyPaidUnsettledFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-220>"},"amountAvailableToWithdraw":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-221>"},"updatedAt":{"type":"string","format":"date-time","description":"Timestamp for the Apex update.","x-parser-schema-id":"\u003canonymous-schema-222>"}},"x-parser-schema-id":"ApexBalanceData"},{"type":"object","description":"Account info update from the server. Decimal numbers are sent as strings.","properties":{"id":{"type":"string","description":"Sterling account ID used for subscription routing.","x-parser-schema-id":"\u003canonymous-schema-223>"},"sterlingAccountId":{"type":"string","description":"Raw Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-224>"},"apexAccountId":{"type":"string","description":"Apex account ID when available.","x-parser-schema-id":"\u003canonymous-schema-225>"},"fdid":{"type":"string","description":"FDID when available.","x-parser-schema-id":"\u003canonymous-schema-226>"},"description":{"type":"string","description":"Account description.","x-parser-schema-id":"\u003canonymous-schema-227>"},"accountType":{"type":"string","description":"Account type.","x-parser-schema-id":"\u003canonymous-schema-228>"},"accountClass":{"type":"string","description":"Account class.","x-parser-schema-id":"\u003canonymous-schema-229>"},"optionsLevel":{"type":"string","description":"Options level.","x-parser-schema-id":"\u003canonymous-schema-230>"},"maintenanceExcess":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-231>"},"cashAvailable":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-232>"},"exchangeSurplus":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-233>"},"accruedCash":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-234>"},"netLiquidity":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-235>"},"marginEquity":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-236>"},"sma":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-237>"},"maintReq":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-238>"},"email":{"type":"string","description":"Account email.","x-parser-schema-id":"\u003canonymous-schema-239>"},"cell":{"type":"string","description":"Account phone number.","x-parser-schema-id":"\u003canonymous-schema-240>"},"groupId":{"type":"string","description":"Sterling group ID.","x-parser-schema-id":"\u003canonymous-schema-241>"}},"x-parser-schema-id":"AccountInfoData"}],"x-parser-schema-id":"AccountEventData"}},"x-parser-schema-id":"\u003canonymous-schema-186>"}},"x-parser-schema-id":"AccountEventPayload"},"title":"Account Info Update","description":"Real-time account information update","example":"{\n \"type\": \"event\",\n \"timestamp\": \"2024-01-15T14:30:00Z\",\n \"payload\": {\n \"topic\": \"account\",\n \"name\": \"account.info\",\n \"target\": \"account:ACC123456\",\n \"data\": {\n \"id\": \"ACC123456\",\n \"sterlingAccountId\": \"STERLING-123\",\n \"apexAccountId\": \"\",\n \"fdid\": \"FDID-123456\",\n \"description\": \"John Doe Trading Account\",\n \"accountType\": \"MARGIN\",\n \"accountClass\": \"INDIVIDUAL\",\n \"optionsLevel\": \"LEVEL_3\",\n \"maintenanceExcess\": \"17508.50\",\n \"cashAvailable\": \"25155.00\",\n \"exchangeSurplus\": \"0\",\n \"accruedCash\": \"0\",\n \"netLiquidity\": \"50155.00\",\n \"marginEquity\": \"50155.00\",\n \"sma\": \"25155.00\",\n \"maintReq\": \"7646.50\",\n \"email\": \"john.doe@example.com\",\n \"cell\": \"+1234567890\",\n \"groupId\": \"TRADING\"\n }\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"accountUpdate"}]}],"bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"accountUpdatesStream"}]},{"id":"receivePnLCandleUpdate","title":"P\u0026L Candle Update","description":"Receive P\u0026L candle data","type":"send","messages":[{"id":"pnlCandleUpdate","contentType":"application/json","payload":[{"name":"P\u0026L Candle Update","description":"Live profit and loss updates","type":"object","properties":[{"name":"type","type":"string","description":"Top-level message type. Always `event` for P\u0026L updates.","enumValues":["event"],"required":false},{"name":"timestamp","type":"string","description":"Time when the server sent this event, in RFC3339 format.","required":false},{"name":"payload","type":"object","description":"The `pnl` topic name and its data.","required":false,"properties":[{"name":"topic","type":"string","description":"Topic identifier. Always `pnl`.","enumValues":["pnl"],"required":false},{"name":"data","type":"object","description":"Profit and loss chart data. This includes timestamp, close, and equity arrays.","required":false,"properties":[{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"interval","type":"string","description":"Candle interval.","required":false},{"name":"t","type":"array","description":"Unix timestamps in seconds.","required":false,"properties":[{"name":"item","type":"integer","required":false}]},{"name":"c","type":"array","description":"Close/equity values.","required":false,"properties":[{"name":"item","type":"number","required":false}]}]}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","description":"Server message for the `pnl` topic.","properties":{"type":{"type":"string","enum":["event"],"description":"Top-level message type. Always `event` for P\u0026L updates.","x-parser-schema-id":"\u003canonymous-schema-242>"},"timestamp":{"type":"string","description":"Time when the server sent this event, in RFC3339 format.","x-parser-schema-id":"\u003canonymous-schema-243>"},"payload":{"type":"object","description":"The `pnl` topic name and its data.","properties":{"topic":{"type":"string","enum":["pnl"],"description":"Topic identifier. Always `pnl`.","x-parser-schema-id":"\u003canonymous-schema-245>"},"data":{"type":"object","description":"Profit and loss chart data. This includes timestamp, close, and equity arrays.","properties":{"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-148>"},"interval":{"type":"string","description":"Candle interval.","x-parser-schema-id":"\u003canonymous-schema-149>"},"t":{"type":"array","items":{"type":"integer","x-parser-schema-id":"\u003canonymous-schema-151>"},"description":"Unix timestamps in seconds.","x-parser-schema-id":"\u003canonymous-schema-150>"},"c":{"type":"array","items":{"type":"number","x-parser-schema-id":"\u003canonymous-schema-153>"},"description":"Close/equity values.","x-parser-schema-id":"\u003canonymous-schema-152>"}},"x-parser-schema-id":"PnLCandleData"}},"x-parser-schema-id":"\u003canonymous-schema-244>"}},"x-parser-schema-id":"PnLEventPayload"},"title":"P\u0026L Candle Update","description":"Live profit and loss updates","example":"{\n \"type\": \"event\",\n \"timestamp\": \"2024-01-15T10:30:00Z\",\n \"payload\": {\n \"topic\": \"pnl\",\n \"data\": {\n \"accountId\": \"ACC123456\",\n \"interval\": \"1m\",\n \"t\": [\n 1703001000\n ],\n \"c\": [\n 50155\n ]\n }\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"pnlCandleUpdate"}]}],"bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"accountUpdatesStream"}]},{"id":"receiveWatchlistUpdate","title":"Watchlist Update","description":"Receive watchlist change notifications","type":"send","messages":[{"id":"watchlistUpdate","contentType":"application/json","payload":[{"name":"Watchlist Update","description":"Real-time watchlist updates","type":"object","properties":[{"name":"type","type":"string","description":"Top-level message type. Always `event` for watchlist/news.","enumValues":["event"],"required":false},{"name":"timestamp","type":"string","description":"Time when the server sent this event, in RFC3339 format.","required":false},{"name":"payload","type":"object","description":"The topic name and the data for that event.","required":false,"properties":[{"name":"topic","type":"string","description":"Topic identifier","enumValues":["watchlist","news"],"required":false},{"name":"data","type":"array","required":false,"properties":[{"name":"id","type":"integer","description":"Watchlist ID.","required":false},{"name":"name","type":"string","description":"User-facing watchlist name.","required":false},{"name":"symbols","type":"array","description":"Symbols currently saved in the watchlist.","required":false,"properties":[{"name":"item","type":"string","required":false}]},{"name":"id","type":"integer","description":"Unique news ID.","required":false},{"name":"title","type":"string","description":"Article title.","required":false},{"name":"news_type","type":"string","description":"News type, for example news or press_release.","required":false},{"name":"symbols","type":"array","description":"Related symbols.","required":false,"properties":[{"name":"item","type":"string","required":false}]},{"name":"authors","type":"array","description":"Article authors.","required":false,"properties":[{"name":"item","type":"string","required":false}]},{"name":"timestamp","type":"string","description":"Publication timestamp.","required":false},{"name":"body","type":"string","description":"Full article content when available.","required":false},{"name":"action","type":"string","description":"Action string when available.","required":false}]}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","description":"Server message for the `watchlist` or `news` topic.","properties":{"type":{"type":"string","enum":["event"],"description":"Top-level message type. Always `event` for watchlist/news.","x-parser-schema-id":"\u003canonymous-schema-246>"},"timestamp":{"type":"string","description":"Time when the server sent this event, in RFC3339 format.","x-parser-schema-id":"\u003canonymous-schema-247>"},"payload":{"type":"object","description":"The topic name and the data for that event.","properties":{"topic":{"type":"string","enum":["watchlist","news"],"description":"Topic identifier","x-parser-schema-id":"\u003canonymous-schema-249>"},"data":{"oneOf":[{"type":"array","description":"Current watchlists for the signed-in user. The same list shape is used in the first subscribe reply and later watchlist events.","items":{"type":"object","description":"One saved watchlist from shared/domains/watchlist.Watchlist.","properties":{"id":{"type":"integer","description":"Watchlist ID.","x-parser-schema-id":"\u003canonymous-schema-154>"},"name":{"type":"string","description":"User-facing watchlist name.","x-parser-schema-id":"\u003canonymous-schema-155>"},"symbols":{"type":"array","items":{"type":"string","x-parser-schema-id":"\u003canonymous-schema-157>"},"description":"Symbols currently saved in the watchlist.","x-parser-schema-id":"\u003canonymous-schema-156>"}},"x-parser-schema-id":"WatchlistEntry"},"x-parser-schema-id":"WatchlistSnapshotData"},{"type":"array","description":"Initial news snapshot returned after a news subscription succeeds.","items":{"type":"object","description":"One news item.","properties":{"id":{"type":"integer","description":"Unique news ID.","x-parser-schema-id":"\u003canonymous-schema-158>"},"title":{"type":"string","description":"Article title.","x-parser-schema-id":"\u003canonymous-schema-159>"},"news_type":{"type":"string","description":"News type, for example news or press_release.","x-parser-schema-id":"\u003canonymous-schema-160>"},"symbols":{"type":"array","items":{"type":"string","x-parser-schema-id":"\u003canonymous-schema-162>"},"description":"Related symbols.","x-parser-schema-id":"\u003canonymous-schema-161>"},"authors":{"type":"array","items":{"type":"string","x-parser-schema-id":"\u003canonymous-schema-164>"},"description":"Article authors.","x-parser-schema-id":"\u003canonymous-schema-163>"},"timestamp":{"type":"string","format":"date-time","description":"Publication timestamp.","x-parser-schema-id":"\u003canonymous-schema-165>"},"body":{"type":"string","description":"Full article content when available.","x-parser-schema-id":"\u003canonymous-schema-166>"},"action":{"type":"string","description":"Action string when available.","x-parser-schema-id":"\u003canonymous-schema-167>"}},"x-parser-schema-id":"NewsItem"},"x-parser-schema-id":"NewsSnapshotData"}],"x-parser-schema-id":"\u003canonymous-schema-250>"}},"x-parser-schema-id":"\u003canonymous-schema-248>"}},"x-parser-schema-id":"TopicEventPayload"},"title":"Watchlist Update","description":"Real-time watchlist updates","example":"{\n \"type\": \"event\",\n \"timestamp\": \"2024-01-15T14:30:00Z\",\n \"payload\": {\n \"topic\": \"watchlist\",\n \"data\": [\n {\n \"id\": 101,\n \"name\": \"Core holdings\",\n \"symbols\": [\n \"AAPL\",\n \"MSFT\",\n \"NVDA\",\n \"TSLA\"\n ]\n },\n {\n \"id\": 205,\n \"name\": \"Earnings radar\",\n \"symbols\": [\n \"AMD\"\n ]\n }\n ]\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"watchlistUpdate"}]}],"bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"accountUpdatesStream"}]},{"id":"receiveNewsUpdate","title":"News Update","description":"Receive news feed updates","type":"send","messages":[{"id":"newsUpdate","contentType":"application/json","payload":[{"name":"News Update","description":"Real-time news updates","type":"object","properties":[{"name":"type","type":"string","description":"Top-level message type. Always `event` for watchlist/news.","enumValues":["event"],"required":false},{"name":"timestamp","type":"string","description":"Time when the server sent this event, in RFC3339 format.","required":false},{"name":"payload","type":"object","description":"The topic name and the data for that event.","required":false,"properties":[{"name":"topic","type":"string","description":"Topic identifier","enumValues":["watchlist","news"],"required":false},{"name":"data","type":"array","required":false,"properties":[{"name":"id","type":"integer","description":"Watchlist ID.","required":false},{"name":"name","type":"string","description":"User-facing watchlist name.","required":false},{"name":"symbols","type":"array","description":"Symbols currently saved in the watchlist.","required":false,"properties":[{"name":"item","type":"string","required":false}]},{"name":"id","type":"integer","description":"Unique news ID.","required":false},{"name":"title","type":"string","description":"Article title.","required":false},{"name":"news_type","type":"string","description":"News type, for example news or press_release.","required":false},{"name":"symbols","type":"array","description":"Related symbols.","required":false,"properties":[{"name":"item","type":"string","required":false}]},{"name":"authors","type":"array","description":"Article authors.","required":false,"properties":[{"name":"item","type":"string","required":false}]},{"name":"timestamp","type":"string","description":"Publication timestamp.","required":false},{"name":"body","type":"string","description":"Full article content when available.","required":false},{"name":"action","type":"string","description":"Action string when available.","required":false}]}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","description":"Server message for the `watchlist` or `news` topic.","properties":{"type":{"type":"string","enum":["event"],"description":"Top-level message type. Always `event` for watchlist/news.","x-parser-schema-id":"\u003canonymous-schema-246>"},"timestamp":{"type":"string","description":"Time when the server sent this event, in RFC3339 format.","x-parser-schema-id":"\u003canonymous-schema-247>"},"payload":{"type":"object","description":"The topic name and the data for that event.","properties":{"topic":{"type":"string","enum":["watchlist","news"],"description":"Topic identifier","x-parser-schema-id":"\u003canonymous-schema-249>"},"data":{"oneOf":[{"type":"array","description":"Current watchlists for the signed-in user. The same list shape is used in the first subscribe reply and later watchlist events.","items":{"type":"object","description":"One saved watchlist from shared/domains/watchlist.Watchlist.","properties":{"id":{"type":"integer","description":"Watchlist ID.","x-parser-schema-id":"\u003canonymous-schema-154>"},"name":{"type":"string","description":"User-facing watchlist name.","x-parser-schema-id":"\u003canonymous-schema-155>"},"symbols":{"type":"array","items":{"type":"string","x-parser-schema-id":"\u003canonymous-schema-157>"},"description":"Symbols currently saved in the watchlist.","x-parser-schema-id":"\u003canonymous-schema-156>"}},"x-parser-schema-id":"WatchlistEntry"},"x-parser-schema-id":"WatchlistSnapshotData"},{"type":"array","description":"Initial news snapshot returned after a news subscription succeeds.","items":{"type":"object","description":"One news item.","properties":{"id":{"type":"integer","description":"Unique news ID.","x-parser-schema-id":"\u003canonymous-schema-158>"},"title":{"type":"string","description":"Article title.","x-parser-schema-id":"\u003canonymous-schema-159>"},"news_type":{"type":"string","description":"News type, for example news or press_release.","x-parser-schema-id":"\u003canonymous-schema-160>"},"symbols":{"type":"array","items":{"type":"string","x-parser-schema-id":"\u003canonymous-schema-162>"},"description":"Related symbols.","x-parser-schema-id":"\u003canonymous-schema-161>"},"authors":{"type":"array","items":{"type":"string","x-parser-schema-id":"\u003canonymous-schema-164>"},"description":"Article authors.","x-parser-schema-id":"\u003canonymous-schema-163>"},"timestamp":{"type":"string","format":"date-time","description":"Publication timestamp.","x-parser-schema-id":"\u003canonymous-schema-165>"},"body":{"type":"string","description":"Full article content when available.","x-parser-schema-id":"\u003canonymous-schema-166>"},"action":{"type":"string","description":"Action string when available.","x-parser-schema-id":"\u003canonymous-schema-167>"}},"x-parser-schema-id":"NewsItem"},"x-parser-schema-id":"NewsSnapshotData"}],"x-parser-schema-id":"\u003canonymous-schema-250>"}},"x-parser-schema-id":"\u003canonymous-schema-248>"}},"x-parser-schema-id":"TopicEventPayload"},"title":"News Update","description":"Real-time news updates","example":"{\n \"type\": \"event\",\n \"timestamp\": \"2024-01-15T14:30:00Z\",\n \"payload\": {\n \"topic\": \"news\",\n \"data\": [\n {\n \"id\": 12345,\n \"title\": \"Fed Announces Rate Decision\",\n \"news_type\": \"news\",\n \"authors\": [\n \"Reuters\"\n ],\n \"timestamp\": \"2024-01-15T14:30:00Z\",\n \"symbols\": [\n \"SPY\",\n \"QQQ\"\n ]\n }\n ]\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"newsUpdate"}]}],"bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"accountUpdatesStream"}]},{"id":"receiveError","title":"Error Response","description":"Receive error messages","type":"send","messages":[{"id":"errorResponse","contentType":"application/json","payload":[{"name":"Error","description":"Error response","type":"object","properties":[{"name":"type","type":"string","description":"Top-level message type. Always `response` for errors.","enumValues":["response"],"required":false},{"name":"id","type":"string","description":"Request ID from the message that caused this error, if there was one.","required":false},{"name":"timestamp","type":"string","description":"Time when the server sent this error, in RFC3339 format.","required":false},{"name":"payload","type":"object","description":"Error details returned by the server.","required":false,"properties":[{"name":"status","type":"integer","description":"Status code for the error, such as `400`, `401`, or `403`.","required":false},{"name":"error","type":"string","description":"Human-readable error message","required":false},{"name":"code","type":"string","description":"Machine-readable error code (e.g. MISSING_ACCOUNT_ID, INVALID_TOKEN)","required":false},{"name":"topic","type":"string","description":"Topic that caused the error (for subscription errors)","required":false}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","description":"Error response from server.","properties":{"type":{"type":"string","enum":["response"],"description":"Top-level message type. Always `response` for errors.","x-parser-schema-id":"\u003canonymous-schema-251>"},"id":{"type":"string","description":"Request ID from the message that caused this error, if there was one.","x-parser-schema-id":"\u003canonymous-schema-252>"},"timestamp":{"type":"string","description":"Time when the server sent this error, in RFC3339 format.","x-parser-schema-id":"\u003canonymous-schema-253>"},"payload":{"type":"object","description":"Error details returned by the server.","properties":{"status":{"type":"integer","description":"Status code for the error, such as `400`, `401`, or `403`.","x-parser-schema-id":"\u003canonymous-schema-255>"},"error":{"type":"string","description":"Human-readable error message","x-parser-schema-id":"\u003canonymous-schema-256>"},"code":{"type":"string","description":"Machine-readable error code (e.g. MISSING_ACCOUNT_ID, INVALID_TOKEN)","x-parser-schema-id":"\u003canonymous-schema-257>"},"topic":{"type":"string","description":"Topic that caused the error (for subscription errors)","x-parser-schema-id":"\u003canonymous-schema-258>"}},"x-parser-schema-id":"\u003canonymous-schema-254>"}},"x-parser-schema-id":"ErrorResponsePayload"},"title":"Error","description":"Error response","example":"{\n \"type\": \"response\",\n \"id\": \"req-002\",\n \"timestamp\": \"2024-01-15T10:30:00Z\",\n \"payload\": {\n \"status\": 400,\n \"error\": \"accountId is required\",\n \"code\": \"MISSING_ACCOUNT_ID\"\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"errorResponse"}]}],"bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"accountUpdatesStream"}]},{"id":"receiveAuthSuccess","title":"Auth success","description":"Successful authentication response","type":"send","messages":[{"id":"authSuccess","contentType":"application/json","payload":[{"name":"Authentication Success","description":"Authentication succeeded","type":"object","properties":[{"name":"type","type":"string","description":"The server sets this to `event` for auth status messages.","enumValues":["event"],"required":false},{"name":"payload","type":"object","required":false,"properties":[{"name":"action","type":"string","description":"Sign-in result or sign-in status. `authSuccess` means you can start subscribing. `authError` means the token was rejected. The other values are sent by the server as the connection ages.","enumValues":["authSuccess","authError","authTimeout","authExpired","refreshAuth"],"required":false},{"name":"data","type":"object","description":"Action-specific data","required":false},{"name":"id","type":"string","description":"Request ID from your client message, or `system` if this event was sent by the server on its own.","required":false},{"name":"timestamp","type":"integer","description":"Unix timestamp in milliseconds","required":false}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","description":"Server message about sign-in status.","properties":{"type":{"type":"string","enum":["event"],"description":"The server sets this to `event` for auth status messages.","x-parser-schema-id":"\u003canonymous-schema-8>"},"payload":{"type":"object","properties":{"action":{"type":"string","enum":["authSuccess","authError","authTimeout","authExpired","refreshAuth"],"description":"Sign-in result or sign-in status. `authSuccess` means you can start subscribing. `authError` means the token was rejected. The other values are sent by the server as the connection ages.","x-parser-schema-id":"\u003canonymous-schema-10>"},"data":{"type":"object","description":"Action-specific data","x-parser-schema-id":"\u003canonymous-schema-11>"},"id":{"type":"string","description":"Request ID from your client message, or `system` if this event was sent by the server on its own.","x-parser-schema-id":"\u003canonymous-schema-12>"},"timestamp":{"type":"integer","description":"Unix timestamp in milliseconds","x-parser-schema-id":"\u003canonymous-schema-13>"}},"x-parser-schema-id":"\u003canonymous-schema-9>"}},"x-parser-schema-id":"AuthEventPayload"},"title":"Authentication Success","description":"Authentication succeeded","example":"{\n \"type\": \"event\",\n \"payload\": {\n \"action\": \"authSuccess\",\n \"data\": {\n \"expiresIn\": 3900000\n },\n \"id\": \"auth-001\",\n \"timestamp\": 1703001234567\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"authSuccess"}]}],"bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"accountUpdatesStream"}]},{"id":"receiveAuthTimeout","title":"Auth timeout","description":"Authentication window expired","type":"send","messages":[{"id":"authTimeout","contentType":"application/json","payload":[{"name":"Authentication Timeout","description":"Authentication timed out","type":"object","properties":[{"name":"type","type":"string","description":"The server sets this to `event` for auth status messages.","enumValues":["event"],"required":false},{"name":"payload","type":"object","required":false,"properties":[{"name":"action","type":"string","description":"Sign-in result or sign-in status. `authSuccess` means you can start subscribing. `authError` means the token was rejected. The other values are sent by the server as the connection ages.","enumValues":["authSuccess","authError","authTimeout","authExpired","refreshAuth"],"required":false},{"name":"data","type":"object","description":"Action-specific data","required":false},{"name":"id","type":"string","description":"Request ID from your client message, or `system` if this event was sent by the server on its own.","required":false},{"name":"timestamp","type":"integer","description":"Unix timestamp in milliseconds","required":false}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","description":"Server message about sign-in status.","properties":{"type":{"type":"string","enum":["event"],"description":"The server sets this to `event` for auth status messages.","x-parser-schema-id":"\u003canonymous-schema-8>"},"payload":{"type":"object","properties":{"action":{"type":"string","enum":["authSuccess","authError","authTimeout","authExpired","refreshAuth"],"description":"Sign-in result or sign-in status. `authSuccess` means you can start subscribing. `authError` means the token was rejected. The other values are sent by the server as the connection ages.","x-parser-schema-id":"\u003canonymous-schema-10>"},"data":{"type":"object","description":"Action-specific data","x-parser-schema-id":"\u003canonymous-schema-11>"},"id":{"type":"string","description":"Request ID from your client message, or `system` if this event was sent by the server on its own.","x-parser-schema-id":"\u003canonymous-schema-12>"},"timestamp":{"type":"integer","description":"Unix timestamp in milliseconds","x-parser-schema-id":"\u003canonymous-schema-13>"}},"x-parser-schema-id":"\u003canonymous-schema-9>"}},"x-parser-schema-id":"AuthEventPayload"},"title":"Authentication Timeout","description":"Authentication timed out","example":"{\n \"type\": \"event\",\n \"payload\": {\n \"action\": \"authTimeout\",\n \"data\": {\n \"error\": \"authentication timeout\"\n },\n \"id\": \"system\",\n \"timestamp\": 1703001234567\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"authTimeout"}]}],"bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"accountUpdatesStream"}]},{"id":"receiveSubscribed","title":"Subscribed confirmation","description":"Subscription confirmed with optional snapshot","type":"send","messages":[{"id":"subscribedResponse","contentType":"application/json","payload":[{"name":"Subscribed","description":"Subscription confirmed with snapshot","type":"object","properties":[{"name":"type","type":"string","description":"Message type. Always `subscribed` (ack from server).","enumValues":["subscribed"],"required":false},{"name":"id","type":"string","description":"Request ID from your subscribe message.","required":false},{"name":"timestamp","type":"string","description":"Time when the server sent this reply, in RFC3339 format.","required":false},{"name":"payload","type":"object","required":false,"properties":[{"name":"status","type":"integer","description":"Status code for the subscribe request. `200` means success.","required":false},{"name":"topic","type":"string","description":"Subscription topic","enumValues":["account","pnl","watchlist","news"],"required":false},{"name":"params","type":"object","description":"Echo of subscription params","required":false},{"name":"data","type":"oneOf","description":"Snapshot data for the subscribed topic.","required":false,"properties":[{"name":"account","type":"object","description":"Merged account and balance snapshot delivered after you subscribe to the `account` topic.","required":true,"properties":[{"name":"accountNumber","type":"string","description":"Sterling account ID.","required":false},{"name":"accountType","type":"string","required":false},{"name":"accountClass","type":"string","required":false},{"name":"optionsLevel","type":"string","required":false},{"name":"cashAvailable","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"netLiquidity","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"marginEquity","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"maintenanceExcess","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"accruedCash","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"exchangeSurplus","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"sma","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"maintReq","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"sodPositionsMarketValue","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"netBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"stockBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"dayTradeBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"optionBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"dayTradeOvernightRegTBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"totalEquity","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"settledFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"unsettledFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"heldBackFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"grossMargin","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"pendingOrdersMarginRequirements","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"realizedPL","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"unRealizedPL","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"pendingOrdersCount","type":"integer","description":"Number of pending orders.","required":false},{"name":"credit","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"creditRemaining","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"smaCreditRemaining","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"pdtCreditRemaining","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"startOfDayCash","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"valueBought","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"valueSold","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"sodTtlEquity","type":"string","description":"Optional start-of-day total equity.","required":false},{"name":"sodTtlEquityUpdatedAt","type":"string","description":"Optional timestamp for sodTtlEquity.","required":false},{"name":"isOptionLevelEnable","type":"boolean","description":"Whether options level is enabled for the account.","required":false},{"name":"amountAvailableToWithdraw","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"fullyPaidUnsettledFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"shortSellingEnabled","type":"boolean","description":"Whether the account is approved to sell short.","required":false},{"name":"intradayMarginBalance","type":"string","description":"Current intraday margin balance. Decimal value serialized as a string.","required":false},{"name":"sodMarginTradeBalance","type":"string","description":"Start-of-day margin trade balance. Decimal value serialized as a string.","required":false},{"name":"sodGrossFundsAvailable","type":"string","description":"Start-of-day funds available before holds and requirements. Decimal value serialized as a string.","required":false},{"name":"sodNetFundsAvailable","type":"string","description":"Start-of-day funds available after holds and requirements. Decimal value serialized as a string.","required":false},{"name":"sodFundsAvailableDate","type":"string","description":"Settlement date the start-of-day funds-available values apply to, in YYYY-MM-DD format.","required":false},{"name":"freestockUnsettleBalance","type":"string","description":"Unsettled balance attributable to free-stock awards. Decimal value serialized as a string.","required":false}]},{"name":"positions","type":"array","required":true,"properties":[{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"symbol","type":"string","description":"Equity or OCC option symbol.","required":false},{"name":"securityType","type":"string","description":"Security type, for example EQUITY or OPTION.","required":false},{"name":"qty","type":"string","description":"Position quantity serialized as a string.","required":false},{"name":"avgPrice","type":"string","description":"Average position price serialized as a string.","required":false},{"name":"avgCost","type":"string","description":"Backward-compatible alias of avgPrice.","required":false},{"name":"unRealizedPL","type":"string","description":"Unrealized P\u0026L serialized as a string.","required":false},{"name":"todayRealizedPnL","type":"string","description":"Today realized P\u0026L serialized as a string.","required":false},{"name":"mtmRealizedPnL","type":"string","description":"Mark-to-market realized P\u0026L measured against the previous close, serialized as a string.","required":false},{"name":"realizedPL","type":"string","description":"Backward-compatible alias of todayRealizedPnL.","required":false},{"name":"todayPL","type":"string","description":"Today total P\u0026L serialized as a string.","required":false},{"name":"instrument","type":"string","description":"Backward-compatible alias of securityType.","required":false},{"name":"putCall","type":"string","description":"CALL or PUT for options.","required":false},{"name":"strikePrice","type":"string","description":"Option strike price serialized as a string.","required":false},{"name":"maturity","type":"string","description":"Option maturity date in YYYY-MM-DD format.","required":false},{"name":"flags","type":"integer","description":"Position flags.","required":false},{"name":"createdAt","type":"string","description":"Creation timestamp.","required":false},{"name":"updatedAt","type":"string","description":"Last update timestamp.","required":false}]},{"name":"ordersV2","type":"array","description":"Orders v2 cache snapshot. Empty array when no orders are cached.","required":true,"properties":[{"name":"clOrdId","type":"string","description":"Client order ID.","required":false},{"name":"ordId","type":"string","description":"Broker/order ID.","required":false},{"name":"origClOrdId","type":"string","description":"Original client order ID for replaces/cancels.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"clientId","type":"string","description":"Client/user ID.","required":false},{"name":"symbol","type":"string","description":"Trading symbol.","required":false},{"name":"side","type":"string","description":"Order side, for example BUY or SELL.","required":false},{"name":"type","type":"string","description":"Order type, for example LIMIT or MARKET.","required":false},{"name":"timeInForce","type":"string","description":"Time in force, for example DAY.","required":false},{"name":"qty","type":"string","description":"Order quantity serialized as a string.","required":false},{"name":"price","type":"string","description":"Limit price serialized as a string.","required":false},{"name":"stopPrice","type":"string","description":"Stop price serialized as a string.","required":false},{"name":"ordStatus","type":"string","description":"Order status.","enumValues":["NEW","PARTIALLY_FILLED","FILLED","DONE_FOR_DAY","CANCELED","REPLACED","PENDING_CANCEL","STOPPED","REJECTED","SUSPENDED","PENDING_NEW","CALCULATED","EXPIRED","ACCEPTED_FOR_BID","PENDING_REPLACE"],"required":false},{"name":"cumQty","type":"string","description":"Cumulative filled quantity serialized as a string.","required":false},{"name":"leavesQty","type":"string","description":"Remaining open quantity serialized as a string.","required":false},{"name":"avgPrice","type":"string","description":"Average execution price serialized as a string.","required":false},{"name":"currency","type":"string","description":"Currency code.","required":false},{"name":"exDestination","type":"string","description":"Execution destination, for example MNGDFTE or MNGD.","required":false},{"name":"text","type":"string","description":"Broker or venue message.","required":false},{"name":"ordRejReason","type":"string","description":"Order reject reason when present.","required":false},{"name":"securityType","type":"string","description":"Security type, for example EQUITY or OPTION.","required":false},{"name":"category","type":"string","description":"Order category, for example EQUITY, SINGLE_LEG, or MULTI_LEG.","required":false},{"name":"legs","type":"array","required":false,"properties":[{"name":"symbol","type":"string","description":"Underlying or option symbol.","required":false},{"name":"side","type":"string","description":"Order side, for example BUY or SELL.","required":false},{"name":"ratioQty","type":"string","description":"Leg ratio quantity serialized as a string.","required":false},{"name":"securityType","type":"string","description":"Security type, for example OPTION.","required":false},{"name":"maturity","type":"string","description":"Option maturity date in YYYY-MM-DD format.","required":false},{"name":"strikePrice","type":"string","description":"Option strike price serialized as a string.","required":false},{"name":"positionEffect","type":"string","description":"Position effect, for example OPEN or CLOSE.","required":false},{"name":"putCall","type":"string","description":"Option side, CALL or PUT.","required":false},{"name":"avgPrice","type":"string","description":"Average fill price for the leg, serialized as a string.","required":false}]},{"name":"execId","type":"string","description":"Execution ID for fill events.","required":false},{"name":"execType","type":"string","description":"Execution type, for example NEW, FILL, PARTIAL_FILL, or REJECTED.","required":false},{"name":"lastPx","type":"string","description":"Last execution price serialized as a string.","required":false},{"name":"lastQty","type":"string","description":"Last execution quantity serialized as a string.","required":false},{"name":"maturity","type":"string","description":"Flat option maturity when sent on single-leg option orders.","required":false},{"name":"putCall","type":"string","description":"Flat option side, CALL or PUT.","required":false},{"name":"strikePrice","type":"string","description":"Flat option strike price serialized as a string.","required":false},{"name":"positionEffect","type":"string","description":"Flat option position effect.","required":false},{"name":"createdAt","type":"string","description":"Creation timestamp.","required":false},{"name":"updatedAt","type":"string","description":"Last update timestamp.","required":false}]},{"name":"error","type":"string","description":"Optional partial snapshot error, for example failed to fetch: positions.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"interval","type":"string","description":"Candle interval.","required":false},{"name":"t","type":"array","description":"Unix timestamps in seconds.","required":false,"properties":[{"name":"item","type":"integer","required":false}]},{"name":"c","type":"array","description":"Close/equity values.","required":false,"properties":[{"name":"item","type":"number","required":false}]},{"name":"id","type":"integer","description":"Watchlist ID.","required":false},{"name":"name","type":"string","description":"User-facing watchlist name.","required":false},{"name":"symbols","type":"array","description":"Symbols currently saved in the watchlist.","required":false,"properties":[{"name":"item","type":"string","required":false}]},{"name":"id","type":"integer","description":"Unique news ID.","required":false},{"name":"title","type":"string","description":"Article title.","required":false},{"name":"news_type","type":"string","description":"News type, for example news or press_release.","required":false},{"name":"symbols","type":"array","description":"Related symbols.","required":false,"properties":[{"name":"item","type":"string","required":false}]},{"name":"authors","type":"array","description":"Article authors.","required":false,"properties":[{"name":"item","type":"string","required":false}]},{"name":"timestamp","type":"string","description":"Publication timestamp.","required":false},{"name":"body","type":"string","description":"Full article content when available.","required":false},{"name":"action","type":"string","description":"Action string when available.","required":false}]}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","description":"Subscribed confirmation message from server.","properties":{"type":{"type":"string","enum":["subscribed"],"description":"Message type. Always `subscribed` (ack from server).","x-parser-schema-id":"\u003canonymous-schema-31>"},"id":{"type":"string","description":"Request ID from your subscribe message.","x-parser-schema-id":"\u003canonymous-schema-32>"},"timestamp":{"type":"string","description":"Time when the server sent this reply, in RFC3339 format.","x-parser-schema-id":"\u003canonymous-schema-33>"},"payload":{"type":"object","properties":{"status":{"type":"integer","description":"Status code for the subscribe request. `200` means success.","x-parser-schema-id":"\u003canonymous-schema-35>"},"topic":{"type":"string","enum":["account","pnl","watchlist","news"],"description":"Subscription topic","x-parser-schema-id":"\u003canonymous-schema-36>"},"params":{"type":"object","description":"Echo of subscription params","x-parser-schema-id":"\u003canonymous-schema-37>"},"data":{"oneOf":[{"type":"object","description":"Initial account snapshot returned with account subscriptions.","required":["account","positions","ordersV2"],"properties":{"account":{"type":"object","description":"Merged account and balance snapshot delivered after you subscribe to the `account` topic.","properties":{"accountNumber":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-39>"},"accountType":{"type":"string","x-parser-schema-id":"\u003canonymous-schema-40>"},"accountClass":{"type":"string","x-parser-schema-id":"\u003canonymous-schema-41>"},"optionsLevel":{"type":"string","x-parser-schema-id":"\u003canonymous-schema-42>"},"cashAvailable":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-43>"},"netLiquidity":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-44>"},"marginEquity":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-45>"},"maintenanceExcess":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-46>"},"accruedCash":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-47>"},"exchangeSurplus":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-48>"},"sma":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-49>"},"maintReq":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-50>"},"sodPositionsMarketValue":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-51>"},"netBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-52>"},"stockBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-53>"},"dayTradeBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-54>"},"optionBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-55>"},"dayTradeOvernightRegTBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-56>"},"totalEquity":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-57>"},"settledFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-58>"},"unsettledFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-59>"},"heldBackFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-60>"},"grossMargin":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-61>"},"pendingOrdersMarginRequirements":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-62>"},"realizedPL":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-63>"},"unRealizedPL":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-64>"},"pendingOrdersCount":{"type":"integer","description":"Number of pending orders.","x-parser-schema-id":"\u003canonymous-schema-65>"},"credit":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-66>"},"creditRemaining":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-67>"},"smaCreditRemaining":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-68>"},"pdtCreditRemaining":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-69>"},"startOfDayCash":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-70>"},"valueBought":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-71>"},"valueSold":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-72>"},"sodTtlEquity":{"type":"string","description":"Optional start-of-day total equity.","x-parser-schema-id":"\u003canonymous-schema-73>"},"sodTtlEquityUpdatedAt":{"type":"string","format":"date-time","description":"Optional timestamp for sodTtlEquity.","x-parser-schema-id":"\u003canonymous-schema-74>"},"isOptionLevelEnable":{"type":"boolean","description":"Whether options level is enabled for the account.","x-parser-schema-id":"\u003canonymous-schema-75>"},"amountAvailableToWithdraw":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-76>"},"fullyPaidUnsettledFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-77>"},"shortSellingEnabled":{"type":"boolean","description":"Whether the account is approved to sell short.","x-parser-schema-id":"\u003canonymous-schema-78>"},"intradayMarginBalance":{"type":"string","description":"Current intraday margin balance. Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-79>"},"sodMarginTradeBalance":{"type":"string","description":"Start-of-day margin trade balance. Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-80>"},"sodGrossFundsAvailable":{"type":"string","description":"Start-of-day funds available before holds and requirements. Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-81>"},"sodNetFundsAvailable":{"type":"string","description":"Start-of-day funds available after holds and requirements. Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-82>"},"sodFundsAvailableDate":{"type":"string","format":"date","description":"Settlement date the start-of-day funds-available values apply to, in YYYY-MM-DD format.","x-parser-schema-id":"\u003canonymous-schema-83>"},"freestockUnsettleBalance":{"type":"string","description":"Unsettled balance attributable to free-stock awards. Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-84>"}},"x-parser-schema-id":"AccountSnapshotAccount"},"positions":{"type":"array","items":{"type":"object","description":"Position update from the server. Decimal numbers are sent as strings.","properties":{"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-86>"},"symbol":{"type":"string","description":"Equity or OCC option symbol.","x-parser-schema-id":"\u003canonymous-schema-87>"},"securityType":{"type":"string","description":"Security type, for example EQUITY or OPTION.","x-parser-schema-id":"\u003canonymous-schema-88>"},"qty":{"type":"string","description":"Position quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-89>"},"avgPrice":{"type":"string","description":"Average position price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-90>"},"avgCost":{"type":"string","description":"Backward-compatible alias of avgPrice.","x-parser-schema-id":"\u003canonymous-schema-91>"},"unRealizedPL":{"type":"string","description":"Unrealized P\u0026L serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-92>"},"todayRealizedPnL":{"type":"string","description":"Today realized P\u0026L serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-93>"},"mtmRealizedPnL":{"type":"string","description":"Mark-to-market realized P\u0026L measured against the previous close, serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-94>"},"realizedPL":{"type":"string","description":"Backward-compatible alias of todayRealizedPnL.","x-parser-schema-id":"\u003canonymous-schema-95>"},"todayPL":{"type":"string","description":"Today total P\u0026L serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-96>"},"instrument":{"type":"string","description":"Backward-compatible alias of securityType.","x-parser-schema-id":"\u003canonymous-schema-97>"},"putCall":{"type":"string","description":"CALL or PUT for options.","x-parser-schema-id":"\u003canonymous-schema-98>"},"strikePrice":{"type":"string","description":"Option strike price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-99>"},"maturity":{"type":"string","description":"Option maturity date in YYYY-MM-DD format.","x-parser-schema-id":"\u003canonymous-schema-100>"},"flags":{"type":"integer","description":"Position flags.","x-parser-schema-id":"\u003canonymous-schema-101>"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp.","x-parser-schema-id":"\u003canonymous-schema-102>"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp.","x-parser-schema-id":"\u003canonymous-schema-103>"}},"x-parser-schema-id":"PositionData"},"x-parser-schema-id":"\u003canonymous-schema-85>"},"ordersV2":{"type":"array","items":{"type":"object","description":"Order update from the server. This includes the order plus fill details when the order changes.","properties":{"clOrdId":{"type":"string","description":"Client order ID.","x-parser-schema-id":"\u003canonymous-schema-105>"},"ordId":{"type":"string","description":"Broker/order ID.","x-parser-schema-id":"\u003canonymous-schema-106>"},"origClOrdId":{"type":"string","description":"Original client order ID for replaces/cancels.","x-parser-schema-id":"\u003canonymous-schema-107>"},"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-108>"},"clientId":{"type":"string","description":"Client/user ID.","x-parser-schema-id":"\u003canonymous-schema-109>"},"symbol":{"type":"string","description":"Trading symbol.","x-parser-schema-id":"\u003canonymous-schema-110>"},"side":{"type":"string","description":"Order side, for example BUY or SELL.","x-parser-schema-id":"\u003canonymous-schema-111>"},"type":{"type":"string","description":"Order type, for example LIMIT or MARKET.","x-parser-schema-id":"\u003canonymous-schema-112>"},"timeInForce":{"type":"string","description":"Time in force, for example DAY.","x-parser-schema-id":"\u003canonymous-schema-113>"},"qty":{"type":"string","description":"Order quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-114>"},"price":{"type":"string","description":"Limit price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-115>"},"stopPrice":{"type":"string","description":"Stop price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-116>"},"ordStatus":{"type":"string","enum":["NEW","PARTIALLY_FILLED","FILLED","DONE_FOR_DAY","CANCELED","REPLACED","PENDING_CANCEL","STOPPED","REJECTED","SUSPENDED","PENDING_NEW","CALCULATED","EXPIRED","ACCEPTED_FOR_BID","PENDING_REPLACE"],"description":"Order status.","x-parser-schema-id":"\u003canonymous-schema-117>"},"cumQty":{"type":"string","description":"Cumulative filled quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-118>"},"leavesQty":{"type":"string","description":"Remaining open quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-119>"},"avgPrice":{"type":"string","description":"Average execution price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-120>"},"currency":{"type":"string","description":"Currency code.","x-parser-schema-id":"\u003canonymous-schema-121>"},"exDestination":{"type":"string","description":"Execution destination, for example MNGDFTE or MNGD.","x-parser-schema-id":"\u003canonymous-schema-122>"},"text":{"type":"string","description":"Broker or venue message.","x-parser-schema-id":"\u003canonymous-schema-123>"},"ordRejReason":{"type":"string","description":"Order reject reason when present.","x-parser-schema-id":"\u003canonymous-schema-124>"},"securityType":{"type":"string","description":"Security type, for example EQUITY or OPTION.","x-parser-schema-id":"\u003canonymous-schema-125>"},"category":{"type":"string","description":"Order category, for example EQUITY, SINGLE_LEG, or MULTI_LEG.","x-parser-schema-id":"\u003canonymous-schema-126>"},"legs":{"type":"array","items":{"type":"object","description":"One option leg in an order update.","properties":{"symbol":{"type":"string","description":"Underlying or option symbol.","x-parser-schema-id":"\u003canonymous-schema-128>"},"side":{"type":"string","description":"Order side, for example BUY or SELL.","x-parser-schema-id":"\u003canonymous-schema-129>"},"ratioQty":{"type":"string","description":"Leg ratio quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-130>"},"securityType":{"type":"string","description":"Security type, for example OPTION.","x-parser-schema-id":"\u003canonymous-schema-131>"},"maturity":{"type":"string","description":"Option maturity date in YYYY-MM-DD format.","x-parser-schema-id":"\u003canonymous-schema-132>"},"strikePrice":{"type":"string","description":"Option strike price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-133>"},"positionEffect":{"type":"string","description":"Position effect, for example OPEN or CLOSE.","x-parser-schema-id":"\u003canonymous-schema-134>"},"putCall":{"type":"string","description":"Option side, CALL or PUT.","x-parser-schema-id":"\u003canonymous-schema-135>"},"avgPrice":{"type":"string","description":"Average fill price for the leg, serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-136>"}},"x-parser-schema-id":"AccountOrderLeg"},"x-parser-schema-id":"\u003canonymous-schema-127>"},"execId":{"type":"string","description":"Execution ID for fill events.","x-parser-schema-id":"\u003canonymous-schema-137>"},"execType":{"type":"string","description":"Execution type, for example NEW, FILL, PARTIAL_FILL, or REJECTED.","x-parser-schema-id":"\u003canonymous-schema-138>"},"lastPx":{"type":"string","description":"Last execution price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-139>"},"lastQty":{"type":"string","description":"Last execution quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-140>"},"maturity":{"type":"string","description":"Flat option maturity when sent on single-leg option orders.","x-parser-schema-id":"\u003canonymous-schema-141>"},"putCall":{"type":"string","description":"Flat option side, CALL or PUT.","x-parser-schema-id":"\u003canonymous-schema-142>"},"strikePrice":{"type":"string","description":"Flat option strike price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-143>"},"positionEffect":{"type":"string","description":"Flat option position effect.","x-parser-schema-id":"\u003canonymous-schema-144>"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp.","x-parser-schema-id":"\u003canonymous-schema-145>"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp.","x-parser-schema-id":"\u003canonymous-schema-146>"}},"x-parser-schema-id":"OrderData"},"description":"Orders v2 cache snapshot. Empty array when no orders are cached.","x-parser-schema-id":"\u003canonymous-schema-104>"},"error":{"type":"string","description":"Optional partial snapshot error, for example failed to fetch: positions.","x-parser-schema-id":"\u003canonymous-schema-147>"}},"x-parser-schema-id":"AccountSnapshotData"},{"type":"object","description":"Profit and loss chart data. This includes timestamp, close, and equity arrays.","properties":{"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-148>"},"interval":{"type":"string","description":"Candle interval.","x-parser-schema-id":"\u003canonymous-schema-149>"},"t":{"type":"array","items":{"type":"integer","x-parser-schema-id":"\u003canonymous-schema-151>"},"description":"Unix timestamps in seconds.","x-parser-schema-id":"\u003canonymous-schema-150>"},"c":{"type":"array","items":{"type":"number","x-parser-schema-id":"\u003canonymous-schema-153>"},"description":"Close/equity values.","x-parser-schema-id":"\u003canonymous-schema-152>"}},"x-parser-schema-id":"PnLCandleData"},{"type":"array","description":"Current watchlists for the signed-in user. The same list shape is used in the first subscribe reply and later watchlist events.","items":{"type":"object","description":"One saved watchlist from shared/domains/watchlist.Watchlist.","properties":{"id":{"type":"integer","description":"Watchlist ID.","x-parser-schema-id":"\u003canonymous-schema-154>"},"name":{"type":"string","description":"User-facing watchlist name.","x-parser-schema-id":"\u003canonymous-schema-155>"},"symbols":{"type":"array","items":{"type":"string","x-parser-schema-id":"\u003canonymous-schema-157>"},"description":"Symbols currently saved in the watchlist.","x-parser-schema-id":"\u003canonymous-schema-156>"}},"x-parser-schema-id":"WatchlistEntry"},"x-parser-schema-id":"WatchlistSnapshotData"},{"type":"array","description":"Initial news snapshot returned after a news subscription succeeds.","items":{"type":"object","description":"One news item.","properties":{"id":{"type":"integer","description":"Unique news ID.","x-parser-schema-id":"\u003canonymous-schema-158>"},"title":{"type":"string","description":"Article title.","x-parser-schema-id":"\u003canonymous-schema-159>"},"news_type":{"type":"string","description":"News type, for example news or press_release.","x-parser-schema-id":"\u003canonymous-schema-160>"},"symbols":{"type":"array","items":{"type":"string","x-parser-schema-id":"\u003canonymous-schema-162>"},"description":"Related symbols.","x-parser-schema-id":"\u003canonymous-schema-161>"},"authors":{"type":"array","items":{"type":"string","x-parser-schema-id":"\u003canonymous-schema-164>"},"description":"Article authors.","x-parser-schema-id":"\u003canonymous-schema-163>"},"timestamp":{"type":"string","format":"date-time","description":"Publication timestamp.","x-parser-schema-id":"\u003canonymous-schema-165>"},"body":{"type":"string","description":"Full article content when available.","x-parser-schema-id":"\u003canonymous-schema-166>"},"action":{"type":"string","description":"Action string when available.","x-parser-schema-id":"\u003canonymous-schema-167>"}},"x-parser-schema-id":"NewsItem"},"x-parser-schema-id":"NewsSnapshotData"}],"description":"Snapshot data for the subscribed topic.","x-parser-schema-id":"\u003canonymous-schema-38>"}},"x-parser-schema-id":"\u003canonymous-schema-34>"}},"x-parser-schema-id":"SubscribedResponsePayload"},"title":"Subscribed","description":"Subscription confirmed with snapshot","example":"{\n \"type\": \"subscribed\",\n \"id\": \"req-002\",\n \"timestamp\": \"2024-01-15T10:30:00Z\",\n \"payload\": {\n \"status\": 200,\n \"topic\": \"account\",\n \"params\": {\n \"accountId\": \"ACC123456\"\n },\n \"data\": {\n \"account\": {\n \"accountNumber\": \"ACC123456\",\n \"accountType\": \"MARGIN\",\n \"accountClass\": \"INDIVIDUAL\",\n \"optionsLevel\": \"LEVEL_3\",\n \"cashAvailable\": \"25155.00\",\n \"netLiquidity\": \"50155.00\",\n \"marginEquity\": \"50155.00\",\n \"maintenanceExcess\": \"17508.50\",\n \"sma\": \"25155.00\",\n \"maintReq\": \"7646.50\",\n \"netBuyingPower\": \"25155.00\",\n \"stockBuyingPower\": \"50310.00\",\n \"dayTradeBuyingPower\": \"100620.00\",\n \"optionBuyingPower\": \"25155.00\",\n \"totalEquity\": \"50155.00\",\n \"pendingOrdersCount\": 0,\n \"isOptionLevelEnable\": true,\n \"shortSellingEnabled\": false,\n \"sodTtlEquity\": \"50000.00\",\n \"sodTtlEquityUpdatedAt\": \"2024-01-15T11:00:02Z\",\n \"intradayMarginBalance\": \"25155.00\",\n \"sodMarginTradeBalance\": \"-25155.00\",\n \"sodGrossFundsAvailable\": \"25155.00\",\n \"sodNetFundsAvailable\": \"25155.00\",\n \"sodFundsAvailableDate\": \"2024-01-12\",\n \"freestockUnsettleBalance\": \"0\"\n },\n \"positions\": [],\n \"ordersV2\": []\n }\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"subscribedResponse"}]}],"bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"accountUpdatesStream"}]},{"id":"receiveUnsubscribeResponse","title":"Unsubscribe confirmation","description":"Unsubscribe acknowledged","type":"send","messages":[{"id":"unsubscribeResponse","contentType":"application/json","payload":[{"name":"Unsubscription Confirmed","description":"Server confirms unsubscription","type":"object","properties":[{"name":"type","type":"string","description":"Top-level message type. Always `response` for this ack.","enumValues":["response"],"required":false},{"name":"id","type":"string","description":"Request ID from your unsubscribe message.","required":false},{"name":"timestamp","type":"string","description":"Time when the server sent this reply, in RFC3339 format.","required":false},{"name":"payload","type":"object","description":"Status and optional data for the unsubscribe result.","required":false,"properties":[{"name":"status","type":"integer","description":"Status code for the unsubscribe request. `200` means success.","required":false},{"name":"data","type":"object","required":false,"properties":[{"name":"unsubscribed","type":"boolean","required":false},{"name":"topic","type":"string","required":false},{"name":"accountId","type":"string","required":false}]}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","description":"Unsubscribe confirmation from server.","properties":{"type":{"type":"string","enum":["response"],"description":"Top-level message type. Always `response` for this ack.","x-parser-schema-id":"\u003canonymous-schema-175>"},"id":{"type":"string","description":"Request ID from your unsubscribe message.","x-parser-schema-id":"\u003canonymous-schema-176>"},"timestamp":{"type":"string","description":"Time when the server sent this reply, in RFC3339 format.","x-parser-schema-id":"\u003canonymous-schema-177>"},"payload":{"type":"object","description":"Status and optional data for the unsubscribe result.","properties":{"status":{"type":"integer","description":"Status code for the unsubscribe request. `200` means success.","x-parser-schema-id":"\u003canonymous-schema-179>"},"data":{"type":"object","properties":{"unsubscribed":{"type":"boolean","x-parser-schema-id":"\u003canonymous-schema-181>"},"topic":{"type":"string","x-parser-schema-id":"\u003canonymous-schema-182>"},"accountId":{"type":"string","x-parser-schema-id":"\u003canonymous-schema-183>"}},"x-parser-schema-id":"\u003canonymous-schema-180>"}},"x-parser-schema-id":"\u003canonymous-schema-178>"}},"x-parser-schema-id":"UnsubscribeResponsePayload"},"title":"Unsubscription Confirmed","description":"Server confirms unsubscription","example":"{\n \"type\": \"response\",\n \"id\": \"req-006\",\n \"timestamp\": \"2024-01-15T10:30:00Z\",\n \"payload\": {\n \"status\": 200,\n \"data\": {\n \"unsubscribed\": true,\n \"topic\": \"account\",\n \"accountId\": \"ACC123456\"\n }\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"unsubscribeResponse"}]}],"bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"accountUpdatesStream"}]},{"id":"receivePong","title":"Pong","description":"Ping response","type":"send","messages":[{"id":"pongResponse","contentType":"application/json","payload":[{"name":"Pong","description":"Keep-alive pong response","type":"object","properties":[{"name":"type","type":"string","description":"Message type. Always `pong` (reply to ping).","enumValues":["pong"],"required":false},{"name":"id","type":"string","description":"Request ID copied from your ping, if you sent one.","required":false},{"name":"timestamp","type":"string","description":"Time when the server sent this `pong`, in RFC3339 format.","required":false}]}],"headers":[],"jsonPayloadSchema":{"type":"object","description":"Pong response from server.","properties":{"type":{"type":"string","enum":["pong"],"description":"Message type. Always `pong` (reply to ping).","x-parser-schema-id":"\u003canonymous-schema-16>"},"id":{"type":"string","description":"Request ID copied from your ping, if you sent one.","x-parser-schema-id":"\u003canonymous-schema-17>"},"timestamp":{"type":"string","description":"Time when the server sent this `pong`, in RFC3339 format.","x-parser-schema-id":"\u003canonymous-schema-18>"}},"x-parser-schema-id":"PongPayload"},"title":"Pong","description":"Keep-alive pong response","example":"{\n \"type\": \"pong\",\n \"id\": \"ping-001\",\n \"timestamp\": \"2024-01-15T10:30:00Z\"\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"pongResponse"}]}],"bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"accountUpdatesStream"}]}],"sendOperations":[{"id":"authenticate","title":"Auth Request","description":"Authenticate the WebSocket connection","type":"receive","messages":[{"id":"authRequest","contentType":"application/json","payload":[{"name":"Authentication Request","description":"Sign in with an access token","type":"object","properties":[{"name":"type","type":"string","description":"Set this to `request` when you authenticate.","enumValues":["request"],"required":true},{"name":"id","type":"string","description":"Optional. Add your own request ID here if you want it returned in the auth event.","required":false},{"name":"payload","type":"object","description":"Put the auth request details here.","required":true,"properties":[{"name":"method","type":"string","description":"Use `POST` to send the token for authentication.","enumValues":["POST"],"required":true},{"name":"path","type":"string","description":"Always `/auth`.","enumValues":["/auth"],"required":true},{"name":"body","type":"object","description":"JSON body for `POST /auth`. Put the raw access token directly in `body.token`.","required":true,"properties":[{"name":"token","type":"string","description":"Access token for this WebSocket connection.","required":true}]}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","required":["type","payload"],"description":"Sign-in message. Send this first after connecting so the server can open your account-updates connection.","properties":{"type":{"type":"string","enum":["request"],"description":"Set this to `request` when you authenticate.","example":"request","x-parser-schema-id":"\u003canonymous-schema-1>"},"id":{"type":"string","description":"Optional. Add your own request ID here if you want it returned in the auth event.","example":"auth-001","x-parser-schema-id":"\u003canonymous-schema-2>"},"payload":{"type":"object","required":["method","path","body"],"description":"Put the auth request details here.","properties":{"method":{"type":"string","enum":["POST"],"description":"Use `POST` to send the token for authentication.","example":"POST","x-parser-schema-id":"\u003canonymous-schema-4>"},"path":{"type":"string","enum":["/auth"],"description":"Always `/auth`.","example":"/auth","x-parser-schema-id":"\u003canonymous-schema-5>"},"body":{"type":"object","required":["token"],"description":"JSON body for `POST /auth`. Put the raw access token directly in `body.token`.","properties":{"token":{"type":"string","description":"Access token for this WebSocket connection.","example":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...","x-parser-schema-id":"\u003canonymous-schema-7>"}},"example":{"token":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..."},"x-parser-schema-id":"\u003canonymous-schema-6>"}},"example":{"method":"POST","path":"/auth","body":{"token":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..."}},"x-parser-schema-id":"\u003canonymous-schema-3>"}},"x-parser-schema-id":"AuthRequestPayload"},"title":"Authentication Request","description":"Sign in with an access token","example":"{\n \"type\": \"request\",\n \"id\": \"auth-001\",\n \"payload\": {\n \"method\": \"post\",\n \"path\": \"/auth\",\n \"body\": {\n \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\"\n }\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"authRequest"}]}],"bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"accountUpdatesStream"}]},{"id":"subscribe","title":"Subscribe Request","description":"Subscribe to account updates, P\u0026L candles, watchlist, or news","type":"receive","messages":[{"id":"subscribeRequest","contentType":"application/json","payload":[{"name":"Subscribe Request","description":"Subscribe to real-time updates","type":"object","properties":[{"name":"type","type":"string","description":"Set this to `subscribe` to start updates for a topic.","enumValues":["subscribe"],"required":true},{"name":"id","type":"string","description":"Optional. Add your own request ID here if you want it returned in the subscribe reply or error.","required":false},{"name":"payload","type":"object","description":"Choose the topic and add any extra values needed for that topic.","required":true,"properties":[{"name":"topic","type":"string","description":"Which updates you want: `account`, `pnl`, `watchlist`, or `news`.","enumValues":["account","pnl","watchlist","news"],"required":true},{"name":"params","type":"object","description":"Extra values for the topic you picked.","required":false,"properties":[{"name":"accountId","type":"string","description":"Trading account ID. Required for account and pnl topics. Do not send this for watchlist. News subscriptions are user-level and do not require it.","required":false},{"name":"interval","type":"string","description":"Candle interval for pnl topic. Optional; defaults to 1m when omitted. Ignored for other topics.","enumValues":["15s","1m","5m","15m","1h","1d","1mo"],"required":false},{"name":"startTime","type":"string","description":"Start time for `pnl` history. Example: `2024-01-01T00:00:00Z`.","required":false},{"name":"symbols","type":"array","description":"Optional symbol filter for news topic. Ignored for account, pnl, and watchlist.","required":false,"properties":[{"name":"item","type":"string","required":false}]},{"name":"topics","type":"array","description":"Optional news topic filter for the first news snapshot. Live pushed news is still filtered by symbol. Ignored for other topics.","required":false,"properties":[{"name":"item","type":"string","required":false}]}]}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","required":["type","payload"],"description":"Use this message to start updates for a topic.","properties":{"type":{"type":"string","enum":["subscribe"],"description":"Set this to `subscribe` to start updates for a topic.","example":"subscribe","x-parser-schema-id":"\u003canonymous-schema-19>"},"id":{"type":"string","description":"Optional. Add your own request ID here if you want it returned in the subscribe reply or error.","example":"req-002","x-parser-schema-id":"\u003canonymous-schema-20>"},"payload":{"type":"object","description":"Choose the topic and add any extra values needed for that topic.","required":["topic"],"properties":{"topic":{"type":"string","enum":["account","pnl","watchlist","news"],"description":"Which updates you want: `account`, `pnl`, `watchlist`, or `news`.","example":"account","x-parser-schema-id":"\u003canonymous-schema-22>"},"params":{"type":"object","description":"Extra values for the topic you picked.","properties":{"accountId":{"type":"string","description":"Trading account ID. Required for account and pnl topics. Do not send this for watchlist. News subscriptions are user-level and do not require it.","example":"ACC123456","x-parser-schema-id":"\u003canonymous-schema-24>"},"interval":{"type":"string","enum":["15s","1m","5m","15m","1h","1d","1mo"],"description":"Candle interval for pnl topic. Optional; defaults to 1m when omitted. Ignored for other topics.","example":"1m","x-parser-schema-id":"\u003canonymous-schema-25>"},"startTime":{"type":"string","format":"date-time","description":"Start time for `pnl` history. Example: `2024-01-01T00:00:00Z`.","example":"2024-01-01T00:00:00Z","x-parser-schema-id":"\u003canonymous-schema-26>"},"symbols":{"type":"array","items":{"type":"string","x-parser-schema-id":"\u003canonymous-schema-28>"},"description":"Optional symbol filter for news topic. Ignored for account, pnl, and watchlist.","example":["AAPL","TSLA"],"x-parser-schema-id":"\u003canonymous-schema-27>"},"topics":{"type":"array","items":{"type":"string","x-parser-schema-id":"\u003canonymous-schema-30>"},"description":"Optional news topic filter for the first news snapshot. Live pushed news is still filtered by symbol. Ignored for other topics.","example":["press_release","news"],"x-parser-schema-id":"\u003canonymous-schema-29>"}},"x-parser-schema-id":"\u003canonymous-schema-23>"}},"example":{"topic":"pnl","params":{"accountId":"ACC123456","interval":"1m","startTime":"2024-01-01T00:00:00Z"}},"x-parser-schema-id":"\u003canonymous-schema-21>"}},"x-parser-schema-id":"SubscribeRequestPayload"},"title":"Subscribe Request","description":"Subscribe to real-time updates","example":"{\n \"type\": \"subscribe\",\n \"id\": \"req-002\",\n \"payload\": {\n \"topic\": \"account\",\n \"params\": {\n \"accountId\": \"ACC123456\"\n }\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"subscribeRequest"}]}],"bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"accountUpdatesStream"}]},{"id":"unsubscribe","title":"Unsubscribe Request","description":"Unsubscribe from updates","type":"receive","messages":[{"id":"unsubscribeRequest","contentType":"application/json","payload":[{"name":"Unsubscribe Request","description":"Unsubscribe from updates","type":"object","properties":[{"name":"type","type":"string","description":"Set this to `unsubscribe` to stop updates for a topic.","enumValues":["unsubscribe"],"required":true},{"name":"id","type":"string","description":"Optional. Add your own request ID here if you want it returned in the unsubscribe reply or error.","required":false},{"name":"payload","type":"object","description":"Choose the topic to stop and add any extra values needed for that topic.","required":true,"properties":[{"name":"topic","type":"string","description":"Topic to unsubscribe from. `account` and `pnl` unsubscribes require `params.accountId`. `watchlist` and `news` unsubscribes do not require params.","enumValues":["account","pnl","watchlist","news"],"required":true},{"name":"params","type":"object","description":"Extra values for the topic you want to stop.","required":false,"properties":[{"name":"accountId","type":"string","description":"Trading account ID. Required for account and pnl unsubscribe requests. Do not send for watchlist or news.","required":false},{"name":"interval","type":"string","description":"For `pnl`, which interval to stop. If you leave this empty, the server uses `1m`.","enumValues":["15s","1m","5m","15m","1h","1d","1mo"],"required":false}]}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","required":["type","payload"],"description":"Use this message to stop updates for one topic.","properties":{"type":{"type":"string","enum":["unsubscribe"],"description":"Set this to `unsubscribe` to stop updates for a topic.","example":"unsubscribe","x-parser-schema-id":"\u003canonymous-schema-168>"},"id":{"type":"string","description":"Optional. Add your own request ID here if you want it returned in the unsubscribe reply or error.","example":"req-006","x-parser-schema-id":"\u003canonymous-schema-169>"},"payload":{"type":"object","description":"Choose the topic to stop and add any extra values needed for that topic.","required":["topic"],"properties":{"topic":{"type":"string","enum":["account","pnl","watchlist","news"],"description":"Topic to unsubscribe from. `account` and `pnl` unsubscribes require `params.accountId`. `watchlist` and `news` unsubscribes do not require params.","example":"account","x-parser-schema-id":"\u003canonymous-schema-171>"},"params":{"type":"object","description":"Extra values for the topic you want to stop.","properties":{"accountId":{"type":"string","description":"Trading account ID. Required for account and pnl unsubscribe requests. Do not send for watchlist or news.","example":"ACC123456","x-parser-schema-id":"\u003canonymous-schema-173>"},"interval":{"type":"string","enum":["15s","1m","5m","15m","1h","1d","1mo"],"description":"For `pnl`, which interval to stop. If you leave this empty, the server uses `1m`.","example":"1m","x-parser-schema-id":"\u003canonymous-schema-174>"}},"x-parser-schema-id":"\u003canonymous-schema-172>"}},"example":{"topic":"account","params":{"accountId":"ACC123456"}},"x-parser-schema-id":"\u003canonymous-schema-170>"}},"x-parser-schema-id":"UnsubscribeRequestPayload"},"title":"Unsubscribe Request","description":"Unsubscribe from updates","example":"{\n \"type\": \"unsubscribe\",\n \"id\": \"req-006\",\n \"payload\": {\n \"topic\": \"account\",\n \"params\": {\n \"accountId\": \"ACC123456\"\n }\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"unsubscribeRequest"}]}],"bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"accountUpdatesStream"}]},{"id":"ping","title":"Ping Request","description":"Send ping to keep connection alive","type":"receive","messages":[{"id":"pingRequest","contentType":"application/json","payload":[{"name":"Ping","description":"Keep-alive ping","type":"object","properties":[{"name":"type","type":"string","description":"Set this to `ping` to check that the connection is still alive.","enumValues":["ping"],"required":true},{"name":"id","type":"string","description":"Optional. Add your own request ID here if you want it returned in the `pong` reply.","required":false}]}],"headers":[],"jsonPayloadSchema":{"type":"object","required":["type"],"description":"Use this message to check that the WebSocket connection is still alive.","properties":{"type":{"type":"string","enum":["ping"],"description":"Set this to `ping` to check that the connection is still alive.","example":"ping","x-parser-schema-id":"\u003canonymous-schema-14>"},"id":{"type":"string","description":"Optional. Add your own request ID here if you want it returned in the `pong` reply.","example":"ping-001","x-parser-schema-id":"\u003canonymous-schema-15>"}},"x-parser-schema-id":"PingPayload"},"title":"Ping","description":"Keep-alive ping","example":"{\n \"type\": \"ping\",\n \"id\": \"ping-001\"\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"pingRequest"}]}],"bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"accountUpdatesStream"}]}],"receiveOperations":[{"id":"receiveAuthExpired","title":"Auth Expired","description":"Receive authentication expired notification","type":"send","messages":[{"id":"authExpired","contentType":"application/json","payload":[{"name":"Authentication Expired","description":"Session has expired","type":"object","properties":[{"name":"type","type":"string","description":"The server sets this to `event` for auth status messages.","enumValues":["event"],"required":false},{"name":"payload","type":"object","required":false,"properties":[{"name":"action","type":"string","description":"Sign-in result or sign-in status. `authSuccess` means you can start subscribing. `authError` means the token was rejected. The other values are sent by the server as the connection ages.","enumValues":["authSuccess","authError","authTimeout","authExpired","refreshAuth"],"required":false},{"name":"data","type":"object","description":"Action-specific data","required":false},{"name":"id","type":"string","description":"Request ID from your client message, or `system` if this event was sent by the server on its own.","required":false},{"name":"timestamp","type":"integer","description":"Unix timestamp in milliseconds","required":false}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","description":"Server message about sign-in status.","properties":{"type":{"type":"string","enum":["event"],"description":"The server sets this to `event` for auth status messages.","x-parser-schema-id":"\u003canonymous-schema-8>"},"payload":{"type":"object","properties":{"action":{"type":"string","enum":["authSuccess","authError","authTimeout","authExpired","refreshAuth"],"description":"Sign-in result or sign-in status. `authSuccess` means you can start subscribing. `authError` means the token was rejected. The other values are sent by the server as the connection ages.","x-parser-schema-id":"\u003canonymous-schema-10>"},"data":{"type":"object","description":"Action-specific data","x-parser-schema-id":"\u003canonymous-schema-11>"},"id":{"type":"string","description":"Request ID from your client message, or `system` if this event was sent by the server on its own.","x-parser-schema-id":"\u003canonymous-schema-12>"},"timestamp":{"type":"integer","description":"Unix timestamp in milliseconds","x-parser-schema-id":"\u003canonymous-schema-13>"}},"x-parser-schema-id":"\u003canonymous-schema-9>"}},"x-parser-schema-id":"AuthEventPayload"},"title":"Authentication Expired","description":"Session has expired","example":"{\n \"type\": \"event\",\n \"payload\": {\n \"action\": \"authExpired\",\n \"data\": {\n \"error\": \"session expired\"\n },\n \"id\": \"system\",\n \"timestamp\": 1703001234567\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"authExpired"}]}],"bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"accountUpdatesStream"}]},{"id":"receiveRefreshAuth","title":"Refresh Auth Warning","description":"Receive sign-in expiring warning","type":"send","messages":[{"id":"refreshAuth","contentType":"application/json","payload":[{"name":"Refresh Authentication Warning","description":"Session expires soon, re-authentication recommended","type":"object","properties":[{"name":"type","type":"string","description":"The server sets this to `event` for auth status messages.","enumValues":["event"],"required":false},{"name":"payload","type":"object","required":false,"properties":[{"name":"action","type":"string","description":"Sign-in result or sign-in status. `authSuccess` means you can start subscribing. `authError` means the token was rejected. The other values are sent by the server as the connection ages.","enumValues":["authSuccess","authError","authTimeout","authExpired","refreshAuth"],"required":false},{"name":"data","type":"object","description":"Action-specific data","required":false},{"name":"id","type":"string","description":"Request ID from your client message, or `system` if this event was sent by the server on its own.","required":false},{"name":"timestamp","type":"integer","description":"Unix timestamp in milliseconds","required":false}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","description":"Server message about sign-in status.","properties":{"type":{"type":"string","enum":["event"],"description":"The server sets this to `event` for auth status messages.","x-parser-schema-id":"\u003canonymous-schema-8>"},"payload":{"type":"object","properties":{"action":{"type":"string","enum":["authSuccess","authError","authTimeout","authExpired","refreshAuth"],"description":"Sign-in result or sign-in status. `authSuccess` means you can start subscribing. `authError` means the token was rejected. The other values are sent by the server as the connection ages.","x-parser-schema-id":"\u003canonymous-schema-10>"},"data":{"type":"object","description":"Action-specific data","x-parser-schema-id":"\u003canonymous-schema-11>"},"id":{"type":"string","description":"Request ID from your client message, or `system` if this event was sent by the server on its own.","x-parser-schema-id":"\u003canonymous-schema-12>"},"timestamp":{"type":"integer","description":"Unix timestamp in milliseconds","x-parser-schema-id":"\u003canonymous-schema-13>"}},"x-parser-schema-id":"\u003canonymous-schema-9>"}},"x-parser-schema-id":"AuthEventPayload"},"title":"Refresh Authentication Warning","description":"Session expires soon, re-authentication recommended","example":"{\n \"type\": \"event\",\n \"payload\": {\n \"action\": \"refreshAuth\",\n \"data\": {\n \"expiresIn\": 300000,\n \"expiresAt\": 1703001534567\n },\n \"id\": \"system\",\n \"timestamp\": 1703001234567\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"refreshAuth"}]}],"bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"accountUpdatesStream"}]},{"id":"receiveOrderUpdate","title":"Order Update","description":"Receive real-time order status updates","type":"send","messages":[{"id":"orderUpdate","contentType":"application/json","payload":[{"name":"Order Update","description":"Real-time order update","type":"object","properties":[{"name":"type","type":"string","description":"Top-level message type. Always `event` for streaming updates.","enumValues":["event"],"required":false},{"name":"timestamp","type":"string","description":"Time when the server sent this event, in RFC3339 format.","required":false},{"name":"payload","type":"object","description":"Routing: `topic`, `name`, and `data` for the event.","required":false,"properties":[{"name":"topic","type":"string","description":"Topic identifier. Always `account` for these events.","enumValues":["account"],"required":false},{"name":"name","type":"string","description":"Event name","enumValues":["account.order","account.position","account.balance","account.balance.apex","account.info"],"required":false},{"name":"target","type":"string","description":"Target identifier (e.g. account:ACC123456)","required":false},{"name":"data","type":"object","required":false,"properties":[{"name":"clOrdId","type":"string","description":"Client order ID.","required":false},{"name":"ordId","type":"string","description":"Broker/order ID.","required":false},{"name":"origClOrdId","type":"string","description":"Original client order ID for replaces/cancels.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"clientId","type":"string","description":"Client/user ID.","required":false},{"name":"symbol","type":"string","description":"Trading symbol.","required":false},{"name":"side","type":"string","description":"Order side, for example BUY or SELL.","required":false},{"name":"type","type":"string","description":"Order type, for example LIMIT or MARKET.","required":false},{"name":"timeInForce","type":"string","description":"Time in force, for example DAY.","required":false},{"name":"qty","type":"string","description":"Order quantity serialized as a string.","required":false},{"name":"price","type":"string","description":"Limit price serialized as a string.","required":false},{"name":"stopPrice","type":"string","description":"Stop price serialized as a string.","required":false},{"name":"ordStatus","type":"string","description":"Order status.","enumValues":["NEW","PARTIALLY_FILLED","FILLED","DONE_FOR_DAY","CANCELED","REPLACED","PENDING_CANCEL","STOPPED","REJECTED","SUSPENDED","PENDING_NEW","CALCULATED","EXPIRED","ACCEPTED_FOR_BID","PENDING_REPLACE"],"required":false},{"name":"cumQty","type":"string","description":"Cumulative filled quantity serialized as a string.","required":false},{"name":"leavesQty","type":"string","description":"Remaining open quantity serialized as a string.","required":false},{"name":"avgPrice","type":"string","description":"Average execution price serialized as a string.","required":false},{"name":"currency","type":"string","description":"Currency code.","required":false},{"name":"exDestination","type":"string","description":"Execution destination, for example MNGDFTE or MNGD.","required":false},{"name":"text","type":"string","description":"Broker or venue message.","required":false},{"name":"ordRejReason","type":"string","description":"Order reject reason when present.","required":false},{"name":"securityType","type":"string","description":"Security type, for example EQUITY or OPTION.","required":false},{"name":"category","type":"string","description":"Order category, for example EQUITY, SINGLE_LEG, or MULTI_LEG.","required":false},{"name":"legs","type":"array","required":false,"properties":[{"name":"symbol","type":"string","description":"Underlying or option symbol.","required":false},{"name":"side","type":"string","description":"Order side, for example BUY or SELL.","required":false},{"name":"ratioQty","type":"string","description":"Leg ratio quantity serialized as a string.","required":false},{"name":"securityType","type":"string","description":"Security type, for example OPTION.","required":false},{"name":"maturity","type":"string","description":"Option maturity date in YYYY-MM-DD format.","required":false},{"name":"strikePrice","type":"string","description":"Option strike price serialized as a string.","required":false},{"name":"positionEffect","type":"string","description":"Position effect, for example OPEN or CLOSE.","required":false},{"name":"putCall","type":"string","description":"Option side, CALL or PUT.","required":false},{"name":"avgPrice","type":"string","description":"Average fill price for the leg, serialized as a string.","required":false}]},{"name":"execId","type":"string","description":"Execution ID for fill events.","required":false},{"name":"execType","type":"string","description":"Execution type, for example NEW, FILL, PARTIAL_FILL, or REJECTED.","required":false},{"name":"lastPx","type":"string","description":"Last execution price serialized as a string.","required":false},{"name":"lastQty","type":"string","description":"Last execution quantity serialized as a string.","required":false},{"name":"maturity","type":"string","description":"Flat option maturity when sent on single-leg option orders.","required":false},{"name":"putCall","type":"string","description":"Flat option side, CALL or PUT.","required":false},{"name":"strikePrice","type":"string","description":"Flat option strike price serialized as a string.","required":false},{"name":"positionEffect","type":"string","description":"Flat option position effect.","required":false},{"name":"createdAt","type":"string","description":"Creation timestamp.","required":false},{"name":"updatedAt","type":"string","description":"Last update timestamp.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"symbol","type":"string","description":"Equity or OCC option symbol.","required":false},{"name":"securityType","type":"string","description":"Security type, for example EQUITY or OPTION.","required":false},{"name":"qty","type":"string","description":"Position quantity serialized as a string.","required":false},{"name":"avgPrice","type":"string","description":"Average position price serialized as a string.","required":false},{"name":"avgCost","type":"string","description":"Backward-compatible alias of avgPrice.","required":false},{"name":"unRealizedPL","type":"string","description":"Unrealized P\u0026L serialized as a string.","required":false},{"name":"todayRealizedPnL","type":"string","description":"Today realized P\u0026L serialized as a string.","required":false},{"name":"mtmRealizedPnL","type":"string","description":"Mark-to-market realized P\u0026L measured against the previous close, serialized as a string.","required":false},{"name":"realizedPL","type":"string","description":"Backward-compatible alias of todayRealizedPnL.","required":false},{"name":"todayPL","type":"string","description":"Today total P\u0026L serialized as a string.","required":false},{"name":"instrument","type":"string","description":"Backward-compatible alias of securityType.","required":false},{"name":"putCall","type":"string","description":"CALL or PUT for options.","required":false},{"name":"strikePrice","type":"string","description":"Option strike price serialized as a string.","required":false},{"name":"maturity","type":"string","description":"Option maturity date in YYYY-MM-DD format.","required":false},{"name":"flags","type":"integer","description":"Position flags.","required":false},{"name":"createdAt","type":"string","description":"Creation timestamp.","required":false},{"name":"updatedAt","type":"string","description":"Last update timestamp.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"sodPositionsMarketValue","type":"string","description":"Start-of-day positions market value.","required":false},{"name":"netBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"stockBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"dayTradeBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"optionBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"dayTradeOvernightRegTBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"totalEquity","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"settledFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"unsettledFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"heldBackFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"grossMargin","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"pendingOrdersMarginRequirements","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"maintReq","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"creditMultiplier","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"pendingOrdersCount","type":"integer","description":"Number of pending orders.","required":false},{"name":"credit","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"creditRemaining","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"realizedPL","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"unRealizedPL","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"SMA","type":"string","description":"Special memorandum account value.","required":false},{"name":"smaCreditRemaining","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"PDT","type":"string","description":"Pattern day trader value serialized as a string.","required":false},{"name":"pdtCreditRemaining","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"startOfDayCash","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"valueBought","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"valueSold","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"sodTtlEquity","type":"string","description":"Optional start-of-day total equity.","required":false},{"name":"sodTtlEquityUpdatedAt","type":"string","description":"Optional timestamp for sodTtlEquity.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"fullyPaidUnsettledFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"amountAvailableToWithdraw","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"updatedAt","type":"string","description":"Timestamp for the Apex update.","required":false},{"name":"id","type":"string","description":"Sterling account ID used for subscription routing.","required":false},{"name":"sterlingAccountId","type":"string","description":"Raw Sterling account ID.","required":false},{"name":"apexAccountId","type":"string","description":"Apex account ID when available.","required":false},{"name":"fdid","type":"string","description":"FDID when available.","required":false},{"name":"description","type":"string","description":"Account description.","required":false},{"name":"accountType","type":"string","description":"Account type.","required":false},{"name":"accountClass","type":"string","description":"Account class.","required":false},{"name":"optionsLevel","type":"string","description":"Options level.","required":false},{"name":"maintenanceExcess","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"cashAvailable","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"exchangeSurplus","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"accruedCash","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"netLiquidity","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"marginEquity","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"sma","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"maintReq","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"email","type":"string","description":"Account email.","required":false},{"name":"cell","type":"string","description":"Account phone number.","required":false},{"name":"groupId","type":"string","description":"Sterling group ID.","required":false}]}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","description":"Server message for the `account` topic. `name` tells you what changed.","properties":{"type":{"type":"string","enum":["event"],"description":"Top-level message type. Always `event` for streaming updates.","x-parser-schema-id":"\u003canonymous-schema-184>"},"timestamp":{"type":"string","description":"Time when the server sent this event, in RFC3339 format.","x-parser-schema-id":"\u003canonymous-schema-185>"},"payload":{"type":"object","description":"Routing: `topic`, `name`, and `data` for the event.","properties":{"topic":{"type":"string","enum":["account"],"description":"Topic identifier. Always `account` for these events.","x-parser-schema-id":"\u003canonymous-schema-187>"},"name":{"type":"string","enum":["account.order","account.position","account.balance","account.balance.apex","account.info"],"description":"Event name","x-parser-schema-id":"\u003canonymous-schema-188>"},"target":{"type":"string","description":"Target identifier (e.g. account:ACC123456)","x-parser-schema-id":"\u003canonymous-schema-189>"},"data":{"oneOf":[{"type":"object","description":"Order update from the server. This includes the order plus fill details when the order changes.","properties":{"clOrdId":{"type":"string","description":"Client order ID.","x-parser-schema-id":"\u003canonymous-schema-105>"},"ordId":{"type":"string","description":"Broker/order ID.","x-parser-schema-id":"\u003canonymous-schema-106>"},"origClOrdId":{"type":"string","description":"Original client order ID for replaces/cancels.","x-parser-schema-id":"\u003canonymous-schema-107>"},"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-108>"},"clientId":{"type":"string","description":"Client/user ID.","x-parser-schema-id":"\u003canonymous-schema-109>"},"symbol":{"type":"string","description":"Trading symbol.","x-parser-schema-id":"\u003canonymous-schema-110>"},"side":{"type":"string","description":"Order side, for example BUY or SELL.","x-parser-schema-id":"\u003canonymous-schema-111>"},"type":{"type":"string","description":"Order type, for example LIMIT or MARKET.","x-parser-schema-id":"\u003canonymous-schema-112>"},"timeInForce":{"type":"string","description":"Time in force, for example DAY.","x-parser-schema-id":"\u003canonymous-schema-113>"},"qty":{"type":"string","description":"Order quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-114>"},"price":{"type":"string","description":"Limit price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-115>"},"stopPrice":{"type":"string","description":"Stop price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-116>"},"ordStatus":{"type":"string","enum":["NEW","PARTIALLY_FILLED","FILLED","DONE_FOR_DAY","CANCELED","REPLACED","PENDING_CANCEL","STOPPED","REJECTED","SUSPENDED","PENDING_NEW","CALCULATED","EXPIRED","ACCEPTED_FOR_BID","PENDING_REPLACE"],"description":"Order status.","x-parser-schema-id":"\u003canonymous-schema-117>"},"cumQty":{"type":"string","description":"Cumulative filled quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-118>"},"leavesQty":{"type":"string","description":"Remaining open quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-119>"},"avgPrice":{"type":"string","description":"Average execution price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-120>"},"currency":{"type":"string","description":"Currency code.","x-parser-schema-id":"\u003canonymous-schema-121>"},"exDestination":{"type":"string","description":"Execution destination, for example MNGDFTE or MNGD.","x-parser-schema-id":"\u003canonymous-schema-122>"},"text":{"type":"string","description":"Broker or venue message.","x-parser-schema-id":"\u003canonymous-schema-123>"},"ordRejReason":{"type":"string","description":"Order reject reason when present.","x-parser-schema-id":"\u003canonymous-schema-124>"},"securityType":{"type":"string","description":"Security type, for example EQUITY or OPTION.","x-parser-schema-id":"\u003canonymous-schema-125>"},"category":{"type":"string","description":"Order category, for example EQUITY, SINGLE_LEG, or MULTI_LEG.","x-parser-schema-id":"\u003canonymous-schema-126>"},"legs":{"type":"array","items":{"type":"object","description":"One option leg in an order update.","properties":{"symbol":{"type":"string","description":"Underlying or option symbol.","x-parser-schema-id":"\u003canonymous-schema-128>"},"side":{"type":"string","description":"Order side, for example BUY or SELL.","x-parser-schema-id":"\u003canonymous-schema-129>"},"ratioQty":{"type":"string","description":"Leg ratio quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-130>"},"securityType":{"type":"string","description":"Security type, for example OPTION.","x-parser-schema-id":"\u003canonymous-schema-131>"},"maturity":{"type":"string","description":"Option maturity date in YYYY-MM-DD format.","x-parser-schema-id":"\u003canonymous-schema-132>"},"strikePrice":{"type":"string","description":"Option strike price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-133>"},"positionEffect":{"type":"string","description":"Position effect, for example OPEN or CLOSE.","x-parser-schema-id":"\u003canonymous-schema-134>"},"putCall":{"type":"string","description":"Option side, CALL or PUT.","x-parser-schema-id":"\u003canonymous-schema-135>"},"avgPrice":{"type":"string","description":"Average fill price for the leg, serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-136>"}},"x-parser-schema-id":"AccountOrderLeg"},"x-parser-schema-id":"\u003canonymous-schema-127>"},"execId":{"type":"string","description":"Execution ID for fill events.","x-parser-schema-id":"\u003canonymous-schema-137>"},"execType":{"type":"string","description":"Execution type, for example NEW, FILL, PARTIAL_FILL, or REJECTED.","x-parser-schema-id":"\u003canonymous-schema-138>"},"lastPx":{"type":"string","description":"Last execution price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-139>"},"lastQty":{"type":"string","description":"Last execution quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-140>"},"maturity":{"type":"string","description":"Flat option maturity when sent on single-leg option orders.","x-parser-schema-id":"\u003canonymous-schema-141>"},"putCall":{"type":"string","description":"Flat option side, CALL or PUT.","x-parser-schema-id":"\u003canonymous-schema-142>"},"strikePrice":{"type":"string","description":"Flat option strike price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-143>"},"positionEffect":{"type":"string","description":"Flat option position effect.","x-parser-schema-id":"\u003canonymous-schema-144>"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp.","x-parser-schema-id":"\u003canonymous-schema-145>"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp.","x-parser-schema-id":"\u003canonymous-schema-146>"}},"x-parser-schema-id":"OrderData"},{"type":"object","description":"Position update from the server. Decimal numbers are sent as strings.","properties":{"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-86>"},"symbol":{"type":"string","description":"Equity or OCC option symbol.","x-parser-schema-id":"\u003canonymous-schema-87>"},"securityType":{"type":"string","description":"Security type, for example EQUITY or OPTION.","x-parser-schema-id":"\u003canonymous-schema-88>"},"qty":{"type":"string","description":"Position quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-89>"},"avgPrice":{"type":"string","description":"Average position price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-90>"},"avgCost":{"type":"string","description":"Backward-compatible alias of avgPrice.","x-parser-schema-id":"\u003canonymous-schema-91>"},"unRealizedPL":{"type":"string","description":"Unrealized P\u0026L serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-92>"},"todayRealizedPnL":{"type":"string","description":"Today realized P\u0026L serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-93>"},"mtmRealizedPnL":{"type":"string","description":"Mark-to-market realized P\u0026L measured against the previous close, serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-94>"},"realizedPL":{"type":"string","description":"Backward-compatible alias of todayRealizedPnL.","x-parser-schema-id":"\u003canonymous-schema-95>"},"todayPL":{"type":"string","description":"Today total P\u0026L serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-96>"},"instrument":{"type":"string","description":"Backward-compatible alias of securityType.","x-parser-schema-id":"\u003canonymous-schema-97>"},"putCall":{"type":"string","description":"CALL or PUT for options.","x-parser-schema-id":"\u003canonymous-schema-98>"},"strikePrice":{"type":"string","description":"Option strike price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-99>"},"maturity":{"type":"string","description":"Option maturity date in YYYY-MM-DD format.","x-parser-schema-id":"\u003canonymous-schema-100>"},"flags":{"type":"integer","description":"Position flags.","x-parser-schema-id":"\u003canonymous-schema-101>"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp.","x-parser-schema-id":"\u003canonymous-schema-102>"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp.","x-parser-schema-id":"\u003canonymous-schema-103>"}},"x-parser-schema-id":"PositionData"},{"type":"object","description":"Balance update from the server. Decimal numbers are sent as strings.","properties":{"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-190>"},"sodPositionsMarketValue":{"type":"string","description":"Start-of-day positions market value.","x-parser-schema-id":"\u003canonymous-schema-191>"},"netBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-192>"},"stockBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-193>"},"dayTradeBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-194>"},"optionBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-195>"},"dayTradeOvernightRegTBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-196>"},"totalEquity":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-197>"},"settledFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-198>"},"unsettledFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-199>"},"heldBackFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-200>"},"grossMargin":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-201>"},"pendingOrdersMarginRequirements":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-202>"},"maintReq":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-203>"},"creditMultiplier":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-204>"},"pendingOrdersCount":{"type":"integer","description":"Number of pending orders.","x-parser-schema-id":"\u003canonymous-schema-205>"},"credit":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-206>"},"creditRemaining":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-207>"},"realizedPL":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-208>"},"unRealizedPL":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-209>"},"SMA":{"type":"string","description":"Special memorandum account value.","x-parser-schema-id":"\u003canonymous-schema-210>"},"smaCreditRemaining":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-211>"},"PDT":{"type":"string","description":"Pattern day trader value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-212>"},"pdtCreditRemaining":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-213>"},"startOfDayCash":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-214>"},"valueBought":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-215>"},"valueSold":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-216>"},"sodTtlEquity":{"type":"string","description":"Optional start-of-day total equity.","x-parser-schema-id":"\u003canonymous-schema-217>"},"sodTtlEquityUpdatedAt":{"type":"string","format":"date-time","description":"Optional timestamp for sodTtlEquity.","x-parser-schema-id":"\u003canonymous-schema-218>"}},"x-parser-schema-id":"BalanceData"},{"type":"object","description":"Smaller balance update. Merge these fields into the latest balance data you already have.","properties":{"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-219>"},"fullyPaidUnsettledFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-220>"},"amountAvailableToWithdraw":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-221>"},"updatedAt":{"type":"string","format":"date-time","description":"Timestamp for the Apex update.","x-parser-schema-id":"\u003canonymous-schema-222>"}},"x-parser-schema-id":"ApexBalanceData"},{"type":"object","description":"Account info update from the server. Decimal numbers are sent as strings.","properties":{"id":{"type":"string","description":"Sterling account ID used for subscription routing.","x-parser-schema-id":"\u003canonymous-schema-223>"},"sterlingAccountId":{"type":"string","description":"Raw Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-224>"},"apexAccountId":{"type":"string","description":"Apex account ID when available.","x-parser-schema-id":"\u003canonymous-schema-225>"},"fdid":{"type":"string","description":"FDID when available.","x-parser-schema-id":"\u003canonymous-schema-226>"},"description":{"type":"string","description":"Account description.","x-parser-schema-id":"\u003canonymous-schema-227>"},"accountType":{"type":"string","description":"Account type.","x-parser-schema-id":"\u003canonymous-schema-228>"},"accountClass":{"type":"string","description":"Account class.","x-parser-schema-id":"\u003canonymous-schema-229>"},"optionsLevel":{"type":"string","description":"Options level.","x-parser-schema-id":"\u003canonymous-schema-230>"},"maintenanceExcess":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-231>"},"cashAvailable":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-232>"},"exchangeSurplus":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-233>"},"accruedCash":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-234>"},"netLiquidity":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-235>"},"marginEquity":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-236>"},"sma":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-237>"},"maintReq":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-238>"},"email":{"type":"string","description":"Account email.","x-parser-schema-id":"\u003canonymous-schema-239>"},"cell":{"type":"string","description":"Account phone number.","x-parser-schema-id":"\u003canonymous-schema-240>"},"groupId":{"type":"string","description":"Sterling group ID.","x-parser-schema-id":"\u003canonymous-schema-241>"}},"x-parser-schema-id":"AccountInfoData"}],"x-parser-schema-id":"AccountEventData"}},"x-parser-schema-id":"\u003canonymous-schema-186>"}},"x-parser-schema-id":"AccountEventPayload"},"title":"Order Update","description":"Real-time order update","example":"{\n \"type\": \"event\",\n \"timestamp\": \"2024-01-15T10:30:05Z\",\n \"payload\": {\n \"topic\": \"account\",\n \"name\": \"account.order\",\n \"target\": \"account:ACC123456\",\n \"data\": {\n \"ordId\": \"ORD-12345\",\n \"clOrdId\": \"CLIENT-001\",\n \"accountId\": \"ACC123456\",\n \"clientId\": \"CLIENT-USER-001\",\n \"symbol\": \"AAPL\",\n \"side\": \"BUY\",\n \"type\": \"LIMIT\",\n \"timeInForce\": \"DAY\",\n \"qty\": \"100\",\n \"price\": \"150.50\",\n \"stopPrice\": \"0\",\n \"ordStatus\": \"FILLED\",\n \"cumQty\": \"100\",\n \"leavesQty\": \"0\",\n \"avgPrice\": \"150.45\",\n \"currency\": \"USD\",\n \"exDestination\": \"MNGDFTE\",\n \"securityType\": \"EQUITY\",\n \"category\": \"EQUITY\",\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"updatedAt\": \"2024-01-15T10:30:05Z\"\n }\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"orderUpdate"}]}],"bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"accountUpdatesStream"}]},{"id":"receivePositionUpdate","title":"Position Update","description":"Receive real-time position updates","type":"send","messages":[{"id":"positionUpdate","contentType":"application/json","payload":[{"name":"Position Update","description":"Real-time position update","type":"object","properties":[{"name":"type","type":"string","description":"Top-level message type. Always `event` for streaming updates.","enumValues":["event"],"required":false},{"name":"timestamp","type":"string","description":"Time when the server sent this event, in RFC3339 format.","required":false},{"name":"payload","type":"object","description":"Routing: `topic`, `name`, and `data` for the event.","required":false,"properties":[{"name":"topic","type":"string","description":"Topic identifier. Always `account` for these events.","enumValues":["account"],"required":false},{"name":"name","type":"string","description":"Event name","enumValues":["account.order","account.position","account.balance","account.balance.apex","account.info"],"required":false},{"name":"target","type":"string","description":"Target identifier (e.g. account:ACC123456)","required":false},{"name":"data","type":"object","required":false,"properties":[{"name":"clOrdId","type":"string","description":"Client order ID.","required":false},{"name":"ordId","type":"string","description":"Broker/order ID.","required":false},{"name":"origClOrdId","type":"string","description":"Original client order ID for replaces/cancels.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"clientId","type":"string","description":"Client/user ID.","required":false},{"name":"symbol","type":"string","description":"Trading symbol.","required":false},{"name":"side","type":"string","description":"Order side, for example BUY or SELL.","required":false},{"name":"type","type":"string","description":"Order type, for example LIMIT or MARKET.","required":false},{"name":"timeInForce","type":"string","description":"Time in force, for example DAY.","required":false},{"name":"qty","type":"string","description":"Order quantity serialized as a string.","required":false},{"name":"price","type":"string","description":"Limit price serialized as a string.","required":false},{"name":"stopPrice","type":"string","description":"Stop price serialized as a string.","required":false},{"name":"ordStatus","type":"string","description":"Order status.","enumValues":["NEW","PARTIALLY_FILLED","FILLED","DONE_FOR_DAY","CANCELED","REPLACED","PENDING_CANCEL","STOPPED","REJECTED","SUSPENDED","PENDING_NEW","CALCULATED","EXPIRED","ACCEPTED_FOR_BID","PENDING_REPLACE"],"required":false},{"name":"cumQty","type":"string","description":"Cumulative filled quantity serialized as a string.","required":false},{"name":"leavesQty","type":"string","description":"Remaining open quantity serialized as a string.","required":false},{"name":"avgPrice","type":"string","description":"Average execution price serialized as a string.","required":false},{"name":"currency","type":"string","description":"Currency code.","required":false},{"name":"exDestination","type":"string","description":"Execution destination, for example MNGDFTE or MNGD.","required":false},{"name":"text","type":"string","description":"Broker or venue message.","required":false},{"name":"ordRejReason","type":"string","description":"Order reject reason when present.","required":false},{"name":"securityType","type":"string","description":"Security type, for example EQUITY or OPTION.","required":false},{"name":"category","type":"string","description":"Order category, for example EQUITY, SINGLE_LEG, or MULTI_LEG.","required":false},{"name":"legs","type":"array","required":false,"properties":[{"name":"symbol","type":"string","description":"Underlying or option symbol.","required":false},{"name":"side","type":"string","description":"Order side, for example BUY or SELL.","required":false},{"name":"ratioQty","type":"string","description":"Leg ratio quantity serialized as a string.","required":false},{"name":"securityType","type":"string","description":"Security type, for example OPTION.","required":false},{"name":"maturity","type":"string","description":"Option maturity date in YYYY-MM-DD format.","required":false},{"name":"strikePrice","type":"string","description":"Option strike price serialized as a string.","required":false},{"name":"positionEffect","type":"string","description":"Position effect, for example OPEN or CLOSE.","required":false},{"name":"putCall","type":"string","description":"Option side, CALL or PUT.","required":false},{"name":"avgPrice","type":"string","description":"Average fill price for the leg, serialized as a string.","required":false}]},{"name":"execId","type":"string","description":"Execution ID for fill events.","required":false},{"name":"execType","type":"string","description":"Execution type, for example NEW, FILL, PARTIAL_FILL, or REJECTED.","required":false},{"name":"lastPx","type":"string","description":"Last execution price serialized as a string.","required":false},{"name":"lastQty","type":"string","description":"Last execution quantity serialized as a string.","required":false},{"name":"maturity","type":"string","description":"Flat option maturity when sent on single-leg option orders.","required":false},{"name":"putCall","type":"string","description":"Flat option side, CALL or PUT.","required":false},{"name":"strikePrice","type":"string","description":"Flat option strike price serialized as a string.","required":false},{"name":"positionEffect","type":"string","description":"Flat option position effect.","required":false},{"name":"createdAt","type":"string","description":"Creation timestamp.","required":false},{"name":"updatedAt","type":"string","description":"Last update timestamp.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"symbol","type":"string","description":"Equity or OCC option symbol.","required":false},{"name":"securityType","type":"string","description":"Security type, for example EQUITY or OPTION.","required":false},{"name":"qty","type":"string","description":"Position quantity serialized as a string.","required":false},{"name":"avgPrice","type":"string","description":"Average position price serialized as a string.","required":false},{"name":"avgCost","type":"string","description":"Backward-compatible alias of avgPrice.","required":false},{"name":"unRealizedPL","type":"string","description":"Unrealized P\u0026L serialized as a string.","required":false},{"name":"todayRealizedPnL","type":"string","description":"Today realized P\u0026L serialized as a string.","required":false},{"name":"mtmRealizedPnL","type":"string","description":"Mark-to-market realized P\u0026L measured against the previous close, serialized as a string.","required":false},{"name":"realizedPL","type":"string","description":"Backward-compatible alias of todayRealizedPnL.","required":false},{"name":"todayPL","type":"string","description":"Today total P\u0026L serialized as a string.","required":false},{"name":"instrument","type":"string","description":"Backward-compatible alias of securityType.","required":false},{"name":"putCall","type":"string","description":"CALL or PUT for options.","required":false},{"name":"strikePrice","type":"string","description":"Option strike price serialized as a string.","required":false},{"name":"maturity","type":"string","description":"Option maturity date in YYYY-MM-DD format.","required":false},{"name":"flags","type":"integer","description":"Position flags.","required":false},{"name":"createdAt","type":"string","description":"Creation timestamp.","required":false},{"name":"updatedAt","type":"string","description":"Last update timestamp.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"sodPositionsMarketValue","type":"string","description":"Start-of-day positions market value.","required":false},{"name":"netBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"stockBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"dayTradeBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"optionBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"dayTradeOvernightRegTBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"totalEquity","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"settledFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"unsettledFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"heldBackFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"grossMargin","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"pendingOrdersMarginRequirements","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"maintReq","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"creditMultiplier","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"pendingOrdersCount","type":"integer","description":"Number of pending orders.","required":false},{"name":"credit","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"creditRemaining","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"realizedPL","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"unRealizedPL","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"SMA","type":"string","description":"Special memorandum account value.","required":false},{"name":"smaCreditRemaining","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"PDT","type":"string","description":"Pattern day trader value serialized as a string.","required":false},{"name":"pdtCreditRemaining","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"startOfDayCash","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"valueBought","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"valueSold","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"sodTtlEquity","type":"string","description":"Optional start-of-day total equity.","required":false},{"name":"sodTtlEquityUpdatedAt","type":"string","description":"Optional timestamp for sodTtlEquity.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"fullyPaidUnsettledFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"amountAvailableToWithdraw","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"updatedAt","type":"string","description":"Timestamp for the Apex update.","required":false},{"name":"id","type":"string","description":"Sterling account ID used for subscription routing.","required":false},{"name":"sterlingAccountId","type":"string","description":"Raw Sterling account ID.","required":false},{"name":"apexAccountId","type":"string","description":"Apex account ID when available.","required":false},{"name":"fdid","type":"string","description":"FDID when available.","required":false},{"name":"description","type":"string","description":"Account description.","required":false},{"name":"accountType","type":"string","description":"Account type.","required":false},{"name":"accountClass","type":"string","description":"Account class.","required":false},{"name":"optionsLevel","type":"string","description":"Options level.","required":false},{"name":"maintenanceExcess","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"cashAvailable","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"exchangeSurplus","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"accruedCash","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"netLiquidity","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"marginEquity","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"sma","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"maintReq","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"email","type":"string","description":"Account email.","required":false},{"name":"cell","type":"string","description":"Account phone number.","required":false},{"name":"groupId","type":"string","description":"Sterling group ID.","required":false}]}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","description":"Server message for the `account` topic. `name` tells you what changed.","properties":{"type":{"type":"string","enum":["event"],"description":"Top-level message type. Always `event` for streaming updates.","x-parser-schema-id":"\u003canonymous-schema-184>"},"timestamp":{"type":"string","description":"Time when the server sent this event, in RFC3339 format.","x-parser-schema-id":"\u003canonymous-schema-185>"},"payload":{"type":"object","description":"Routing: `topic`, `name`, and `data` for the event.","properties":{"topic":{"type":"string","enum":["account"],"description":"Topic identifier. Always `account` for these events.","x-parser-schema-id":"\u003canonymous-schema-187>"},"name":{"type":"string","enum":["account.order","account.position","account.balance","account.balance.apex","account.info"],"description":"Event name","x-parser-schema-id":"\u003canonymous-schema-188>"},"target":{"type":"string","description":"Target identifier (e.g. account:ACC123456)","x-parser-schema-id":"\u003canonymous-schema-189>"},"data":{"oneOf":[{"type":"object","description":"Order update from the server. This includes the order plus fill details when the order changes.","properties":{"clOrdId":{"type":"string","description":"Client order ID.","x-parser-schema-id":"\u003canonymous-schema-105>"},"ordId":{"type":"string","description":"Broker/order ID.","x-parser-schema-id":"\u003canonymous-schema-106>"},"origClOrdId":{"type":"string","description":"Original client order ID for replaces/cancels.","x-parser-schema-id":"\u003canonymous-schema-107>"},"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-108>"},"clientId":{"type":"string","description":"Client/user ID.","x-parser-schema-id":"\u003canonymous-schema-109>"},"symbol":{"type":"string","description":"Trading symbol.","x-parser-schema-id":"\u003canonymous-schema-110>"},"side":{"type":"string","description":"Order side, for example BUY or SELL.","x-parser-schema-id":"\u003canonymous-schema-111>"},"type":{"type":"string","description":"Order type, for example LIMIT or MARKET.","x-parser-schema-id":"\u003canonymous-schema-112>"},"timeInForce":{"type":"string","description":"Time in force, for example DAY.","x-parser-schema-id":"\u003canonymous-schema-113>"},"qty":{"type":"string","description":"Order quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-114>"},"price":{"type":"string","description":"Limit price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-115>"},"stopPrice":{"type":"string","description":"Stop price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-116>"},"ordStatus":{"type":"string","enum":["NEW","PARTIALLY_FILLED","FILLED","DONE_FOR_DAY","CANCELED","REPLACED","PENDING_CANCEL","STOPPED","REJECTED","SUSPENDED","PENDING_NEW","CALCULATED","EXPIRED","ACCEPTED_FOR_BID","PENDING_REPLACE"],"description":"Order status.","x-parser-schema-id":"\u003canonymous-schema-117>"},"cumQty":{"type":"string","description":"Cumulative filled quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-118>"},"leavesQty":{"type":"string","description":"Remaining open quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-119>"},"avgPrice":{"type":"string","description":"Average execution price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-120>"},"currency":{"type":"string","description":"Currency code.","x-parser-schema-id":"\u003canonymous-schema-121>"},"exDestination":{"type":"string","description":"Execution destination, for example MNGDFTE or MNGD.","x-parser-schema-id":"\u003canonymous-schema-122>"},"text":{"type":"string","description":"Broker or venue message.","x-parser-schema-id":"\u003canonymous-schema-123>"},"ordRejReason":{"type":"string","description":"Order reject reason when present.","x-parser-schema-id":"\u003canonymous-schema-124>"},"securityType":{"type":"string","description":"Security type, for example EQUITY or OPTION.","x-parser-schema-id":"\u003canonymous-schema-125>"},"category":{"type":"string","description":"Order category, for example EQUITY, SINGLE_LEG, or MULTI_LEG.","x-parser-schema-id":"\u003canonymous-schema-126>"},"legs":{"type":"array","items":{"type":"object","description":"One option leg in an order update.","properties":{"symbol":{"type":"string","description":"Underlying or option symbol.","x-parser-schema-id":"\u003canonymous-schema-128>"},"side":{"type":"string","description":"Order side, for example BUY or SELL.","x-parser-schema-id":"\u003canonymous-schema-129>"},"ratioQty":{"type":"string","description":"Leg ratio quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-130>"},"securityType":{"type":"string","description":"Security type, for example OPTION.","x-parser-schema-id":"\u003canonymous-schema-131>"},"maturity":{"type":"string","description":"Option maturity date in YYYY-MM-DD format.","x-parser-schema-id":"\u003canonymous-schema-132>"},"strikePrice":{"type":"string","description":"Option strike price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-133>"},"positionEffect":{"type":"string","description":"Position effect, for example OPEN or CLOSE.","x-parser-schema-id":"\u003canonymous-schema-134>"},"putCall":{"type":"string","description":"Option side, CALL or PUT.","x-parser-schema-id":"\u003canonymous-schema-135>"},"avgPrice":{"type":"string","description":"Average fill price for the leg, serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-136>"}},"x-parser-schema-id":"AccountOrderLeg"},"x-parser-schema-id":"\u003canonymous-schema-127>"},"execId":{"type":"string","description":"Execution ID for fill events.","x-parser-schema-id":"\u003canonymous-schema-137>"},"execType":{"type":"string","description":"Execution type, for example NEW, FILL, PARTIAL_FILL, or REJECTED.","x-parser-schema-id":"\u003canonymous-schema-138>"},"lastPx":{"type":"string","description":"Last execution price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-139>"},"lastQty":{"type":"string","description":"Last execution quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-140>"},"maturity":{"type":"string","description":"Flat option maturity when sent on single-leg option orders.","x-parser-schema-id":"\u003canonymous-schema-141>"},"putCall":{"type":"string","description":"Flat option side, CALL or PUT.","x-parser-schema-id":"\u003canonymous-schema-142>"},"strikePrice":{"type":"string","description":"Flat option strike price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-143>"},"positionEffect":{"type":"string","description":"Flat option position effect.","x-parser-schema-id":"\u003canonymous-schema-144>"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp.","x-parser-schema-id":"\u003canonymous-schema-145>"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp.","x-parser-schema-id":"\u003canonymous-schema-146>"}},"x-parser-schema-id":"OrderData"},{"type":"object","description":"Position update from the server. Decimal numbers are sent as strings.","properties":{"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-86>"},"symbol":{"type":"string","description":"Equity or OCC option symbol.","x-parser-schema-id":"\u003canonymous-schema-87>"},"securityType":{"type":"string","description":"Security type, for example EQUITY or OPTION.","x-parser-schema-id":"\u003canonymous-schema-88>"},"qty":{"type":"string","description":"Position quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-89>"},"avgPrice":{"type":"string","description":"Average position price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-90>"},"avgCost":{"type":"string","description":"Backward-compatible alias of avgPrice.","x-parser-schema-id":"\u003canonymous-schema-91>"},"unRealizedPL":{"type":"string","description":"Unrealized P\u0026L serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-92>"},"todayRealizedPnL":{"type":"string","description":"Today realized P\u0026L serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-93>"},"mtmRealizedPnL":{"type":"string","description":"Mark-to-market realized P\u0026L measured against the previous close, serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-94>"},"realizedPL":{"type":"string","description":"Backward-compatible alias of todayRealizedPnL.","x-parser-schema-id":"\u003canonymous-schema-95>"},"todayPL":{"type":"string","description":"Today total P\u0026L serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-96>"},"instrument":{"type":"string","description":"Backward-compatible alias of securityType.","x-parser-schema-id":"\u003canonymous-schema-97>"},"putCall":{"type":"string","description":"CALL or PUT for options.","x-parser-schema-id":"\u003canonymous-schema-98>"},"strikePrice":{"type":"string","description":"Option strike price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-99>"},"maturity":{"type":"string","description":"Option maturity date in YYYY-MM-DD format.","x-parser-schema-id":"\u003canonymous-schema-100>"},"flags":{"type":"integer","description":"Position flags.","x-parser-schema-id":"\u003canonymous-schema-101>"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp.","x-parser-schema-id":"\u003canonymous-schema-102>"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp.","x-parser-schema-id":"\u003canonymous-schema-103>"}},"x-parser-schema-id":"PositionData"},{"type":"object","description":"Balance update from the server. Decimal numbers are sent as strings.","properties":{"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-190>"},"sodPositionsMarketValue":{"type":"string","description":"Start-of-day positions market value.","x-parser-schema-id":"\u003canonymous-schema-191>"},"netBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-192>"},"stockBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-193>"},"dayTradeBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-194>"},"optionBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-195>"},"dayTradeOvernightRegTBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-196>"},"totalEquity":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-197>"},"settledFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-198>"},"unsettledFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-199>"},"heldBackFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-200>"},"grossMargin":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-201>"},"pendingOrdersMarginRequirements":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-202>"},"maintReq":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-203>"},"creditMultiplier":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-204>"},"pendingOrdersCount":{"type":"integer","description":"Number of pending orders.","x-parser-schema-id":"\u003canonymous-schema-205>"},"credit":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-206>"},"creditRemaining":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-207>"},"realizedPL":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-208>"},"unRealizedPL":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-209>"},"SMA":{"type":"string","description":"Special memorandum account value.","x-parser-schema-id":"\u003canonymous-schema-210>"},"smaCreditRemaining":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-211>"},"PDT":{"type":"string","description":"Pattern day trader value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-212>"},"pdtCreditRemaining":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-213>"},"startOfDayCash":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-214>"},"valueBought":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-215>"},"valueSold":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-216>"},"sodTtlEquity":{"type":"string","description":"Optional start-of-day total equity.","x-parser-schema-id":"\u003canonymous-schema-217>"},"sodTtlEquityUpdatedAt":{"type":"string","format":"date-time","description":"Optional timestamp for sodTtlEquity.","x-parser-schema-id":"\u003canonymous-schema-218>"}},"x-parser-schema-id":"BalanceData"},{"type":"object","description":"Smaller balance update. Merge these fields into the latest balance data you already have.","properties":{"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-219>"},"fullyPaidUnsettledFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-220>"},"amountAvailableToWithdraw":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-221>"},"updatedAt":{"type":"string","format":"date-time","description":"Timestamp for the Apex update.","x-parser-schema-id":"\u003canonymous-schema-222>"}},"x-parser-schema-id":"ApexBalanceData"},{"type":"object","description":"Account info update from the server. Decimal numbers are sent as strings.","properties":{"id":{"type":"string","description":"Sterling account ID used for subscription routing.","x-parser-schema-id":"\u003canonymous-schema-223>"},"sterlingAccountId":{"type":"string","description":"Raw Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-224>"},"apexAccountId":{"type":"string","description":"Apex account ID when available.","x-parser-schema-id":"\u003canonymous-schema-225>"},"fdid":{"type":"string","description":"FDID when available.","x-parser-schema-id":"\u003canonymous-schema-226>"},"description":{"type":"string","description":"Account description.","x-parser-schema-id":"\u003canonymous-schema-227>"},"accountType":{"type":"string","description":"Account type.","x-parser-schema-id":"\u003canonymous-schema-228>"},"accountClass":{"type":"string","description":"Account class.","x-parser-schema-id":"\u003canonymous-schema-229>"},"optionsLevel":{"type":"string","description":"Options level.","x-parser-schema-id":"\u003canonymous-schema-230>"},"maintenanceExcess":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-231>"},"cashAvailable":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-232>"},"exchangeSurplus":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-233>"},"accruedCash":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-234>"},"netLiquidity":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-235>"},"marginEquity":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-236>"},"sma":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-237>"},"maintReq":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-238>"},"email":{"type":"string","description":"Account email.","x-parser-schema-id":"\u003canonymous-schema-239>"},"cell":{"type":"string","description":"Account phone number.","x-parser-schema-id":"\u003canonymous-schema-240>"},"groupId":{"type":"string","description":"Sterling group ID.","x-parser-schema-id":"\u003canonymous-schema-241>"}},"x-parser-schema-id":"AccountInfoData"}],"x-parser-schema-id":"AccountEventData"}},"x-parser-schema-id":"\u003canonymous-schema-186>"}},"x-parser-schema-id":"AccountEventPayload"},"title":"Position Update","description":"Real-time position update","example":"{\n \"type\": \"event\",\n \"timestamp\": \"2024-01-15T14:30:00Z\",\n \"payload\": {\n \"topic\": \"account\",\n \"name\": \"account.position\",\n \"target\": \"account:ACC123456\",\n \"data\": {\n \"accountId\": \"ACC123456\",\n \"symbol\": \"AAPL\",\n \"securityType\": \"EQUITY\",\n \"qty\": \"100\",\n \"avgPrice\": \"150.45\",\n \"avgCost\": \"150.45\",\n \"unRealizedPL\": \"155.00\",\n \"todayRealizedPnL\": \"0\",\n \"realizedPL\": \"0\",\n \"todayPL\": \"155.00\",\n \"instrument\": \"EQUITY\",\n \"createdAt\": \"2024-01-15T10:30:05Z\",\n \"updatedAt\": \"2024-01-15T14:30:00Z\"\n }\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"positionUpdate"}]}],"bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"accountUpdatesStream"}]},{"id":"receiveBalanceUpdate","title":"Balance Update","description":"Receive real-time balance updates","type":"send","messages":[{"id":"balanceUpdate","contentType":"application/json","payload":[{"name":"Balance Update","description":"Real-time balance update","type":"object","properties":[{"name":"type","type":"string","description":"Top-level message type. Always `event` for streaming updates.","enumValues":["event"],"required":false},{"name":"timestamp","type":"string","description":"Time when the server sent this event, in RFC3339 format.","required":false},{"name":"payload","type":"object","description":"Routing: `topic`, `name`, and `data` for the event.","required":false,"properties":[{"name":"topic","type":"string","description":"Topic identifier. Always `account` for these events.","enumValues":["account"],"required":false},{"name":"name","type":"string","description":"Event name","enumValues":["account.order","account.position","account.balance","account.balance.apex","account.info"],"required":false},{"name":"target","type":"string","description":"Target identifier (e.g. account:ACC123456)","required":false},{"name":"data","type":"object","required":false,"properties":[{"name":"clOrdId","type":"string","description":"Client order ID.","required":false},{"name":"ordId","type":"string","description":"Broker/order ID.","required":false},{"name":"origClOrdId","type":"string","description":"Original client order ID for replaces/cancels.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"clientId","type":"string","description":"Client/user ID.","required":false},{"name":"symbol","type":"string","description":"Trading symbol.","required":false},{"name":"side","type":"string","description":"Order side, for example BUY or SELL.","required":false},{"name":"type","type":"string","description":"Order type, for example LIMIT or MARKET.","required":false},{"name":"timeInForce","type":"string","description":"Time in force, for example DAY.","required":false},{"name":"qty","type":"string","description":"Order quantity serialized as a string.","required":false},{"name":"price","type":"string","description":"Limit price serialized as a string.","required":false},{"name":"stopPrice","type":"string","description":"Stop price serialized as a string.","required":false},{"name":"ordStatus","type":"string","description":"Order status.","enumValues":["NEW","PARTIALLY_FILLED","FILLED","DONE_FOR_DAY","CANCELED","REPLACED","PENDING_CANCEL","STOPPED","REJECTED","SUSPENDED","PENDING_NEW","CALCULATED","EXPIRED","ACCEPTED_FOR_BID","PENDING_REPLACE"],"required":false},{"name":"cumQty","type":"string","description":"Cumulative filled quantity serialized as a string.","required":false},{"name":"leavesQty","type":"string","description":"Remaining open quantity serialized as a string.","required":false},{"name":"avgPrice","type":"string","description":"Average execution price serialized as a string.","required":false},{"name":"currency","type":"string","description":"Currency code.","required":false},{"name":"exDestination","type":"string","description":"Execution destination, for example MNGDFTE or MNGD.","required":false},{"name":"text","type":"string","description":"Broker or venue message.","required":false},{"name":"ordRejReason","type":"string","description":"Order reject reason when present.","required":false},{"name":"securityType","type":"string","description":"Security type, for example EQUITY or OPTION.","required":false},{"name":"category","type":"string","description":"Order category, for example EQUITY, SINGLE_LEG, or MULTI_LEG.","required":false},{"name":"legs","type":"array","required":false,"properties":[{"name":"symbol","type":"string","description":"Underlying or option symbol.","required":false},{"name":"side","type":"string","description":"Order side, for example BUY or SELL.","required":false},{"name":"ratioQty","type":"string","description":"Leg ratio quantity serialized as a string.","required":false},{"name":"securityType","type":"string","description":"Security type, for example OPTION.","required":false},{"name":"maturity","type":"string","description":"Option maturity date in YYYY-MM-DD format.","required":false},{"name":"strikePrice","type":"string","description":"Option strike price serialized as a string.","required":false},{"name":"positionEffect","type":"string","description":"Position effect, for example OPEN or CLOSE.","required":false},{"name":"putCall","type":"string","description":"Option side, CALL or PUT.","required":false},{"name":"avgPrice","type":"string","description":"Average fill price for the leg, serialized as a string.","required":false}]},{"name":"execId","type":"string","description":"Execution ID for fill events.","required":false},{"name":"execType","type":"string","description":"Execution type, for example NEW, FILL, PARTIAL_FILL, or REJECTED.","required":false},{"name":"lastPx","type":"string","description":"Last execution price serialized as a string.","required":false},{"name":"lastQty","type":"string","description":"Last execution quantity serialized as a string.","required":false},{"name":"maturity","type":"string","description":"Flat option maturity when sent on single-leg option orders.","required":false},{"name":"putCall","type":"string","description":"Flat option side, CALL or PUT.","required":false},{"name":"strikePrice","type":"string","description":"Flat option strike price serialized as a string.","required":false},{"name":"positionEffect","type":"string","description":"Flat option position effect.","required":false},{"name":"createdAt","type":"string","description":"Creation timestamp.","required":false},{"name":"updatedAt","type":"string","description":"Last update timestamp.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"symbol","type":"string","description":"Equity or OCC option symbol.","required":false},{"name":"securityType","type":"string","description":"Security type, for example EQUITY or OPTION.","required":false},{"name":"qty","type":"string","description":"Position quantity serialized as a string.","required":false},{"name":"avgPrice","type":"string","description":"Average position price serialized as a string.","required":false},{"name":"avgCost","type":"string","description":"Backward-compatible alias of avgPrice.","required":false},{"name":"unRealizedPL","type":"string","description":"Unrealized P\u0026L serialized as a string.","required":false},{"name":"todayRealizedPnL","type":"string","description":"Today realized P\u0026L serialized as a string.","required":false},{"name":"mtmRealizedPnL","type":"string","description":"Mark-to-market realized P\u0026L measured against the previous close, serialized as a string.","required":false},{"name":"realizedPL","type":"string","description":"Backward-compatible alias of todayRealizedPnL.","required":false},{"name":"todayPL","type":"string","description":"Today total P\u0026L serialized as a string.","required":false},{"name":"instrument","type":"string","description":"Backward-compatible alias of securityType.","required":false},{"name":"putCall","type":"string","description":"CALL or PUT for options.","required":false},{"name":"strikePrice","type":"string","description":"Option strike price serialized as a string.","required":false},{"name":"maturity","type":"string","description":"Option maturity date in YYYY-MM-DD format.","required":false},{"name":"flags","type":"integer","description":"Position flags.","required":false},{"name":"createdAt","type":"string","description":"Creation timestamp.","required":false},{"name":"updatedAt","type":"string","description":"Last update timestamp.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"sodPositionsMarketValue","type":"string","description":"Start-of-day positions market value.","required":false},{"name":"netBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"stockBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"dayTradeBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"optionBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"dayTradeOvernightRegTBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"totalEquity","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"settledFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"unsettledFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"heldBackFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"grossMargin","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"pendingOrdersMarginRequirements","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"maintReq","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"creditMultiplier","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"pendingOrdersCount","type":"integer","description":"Number of pending orders.","required":false},{"name":"credit","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"creditRemaining","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"realizedPL","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"unRealizedPL","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"SMA","type":"string","description":"Special memorandum account value.","required":false},{"name":"smaCreditRemaining","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"PDT","type":"string","description":"Pattern day trader value serialized as a string.","required":false},{"name":"pdtCreditRemaining","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"startOfDayCash","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"valueBought","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"valueSold","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"sodTtlEquity","type":"string","description":"Optional start-of-day total equity.","required":false},{"name":"sodTtlEquityUpdatedAt","type":"string","description":"Optional timestamp for sodTtlEquity.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"fullyPaidUnsettledFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"amountAvailableToWithdraw","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"updatedAt","type":"string","description":"Timestamp for the Apex update.","required":false},{"name":"id","type":"string","description":"Sterling account ID used for subscription routing.","required":false},{"name":"sterlingAccountId","type":"string","description":"Raw Sterling account ID.","required":false},{"name":"apexAccountId","type":"string","description":"Apex account ID when available.","required":false},{"name":"fdid","type":"string","description":"FDID when available.","required":false},{"name":"description","type":"string","description":"Account description.","required":false},{"name":"accountType","type":"string","description":"Account type.","required":false},{"name":"accountClass","type":"string","description":"Account class.","required":false},{"name":"optionsLevel","type":"string","description":"Options level.","required":false},{"name":"maintenanceExcess","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"cashAvailable","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"exchangeSurplus","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"accruedCash","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"netLiquidity","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"marginEquity","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"sma","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"maintReq","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"email","type":"string","description":"Account email.","required":false},{"name":"cell","type":"string","description":"Account phone number.","required":false},{"name":"groupId","type":"string","description":"Sterling group ID.","required":false}]}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","description":"Server message for the `account` topic. `name` tells you what changed.","properties":{"type":{"type":"string","enum":["event"],"description":"Top-level message type. Always `event` for streaming updates.","x-parser-schema-id":"\u003canonymous-schema-184>"},"timestamp":{"type":"string","description":"Time when the server sent this event, in RFC3339 format.","x-parser-schema-id":"\u003canonymous-schema-185>"},"payload":{"type":"object","description":"Routing: `topic`, `name`, and `data` for the event.","properties":{"topic":{"type":"string","enum":["account"],"description":"Topic identifier. Always `account` for these events.","x-parser-schema-id":"\u003canonymous-schema-187>"},"name":{"type":"string","enum":["account.order","account.position","account.balance","account.balance.apex","account.info"],"description":"Event name","x-parser-schema-id":"\u003canonymous-schema-188>"},"target":{"type":"string","description":"Target identifier (e.g. account:ACC123456)","x-parser-schema-id":"\u003canonymous-schema-189>"},"data":{"oneOf":[{"type":"object","description":"Order update from the server. This includes the order plus fill details when the order changes.","properties":{"clOrdId":{"type":"string","description":"Client order ID.","x-parser-schema-id":"\u003canonymous-schema-105>"},"ordId":{"type":"string","description":"Broker/order ID.","x-parser-schema-id":"\u003canonymous-schema-106>"},"origClOrdId":{"type":"string","description":"Original client order ID for replaces/cancels.","x-parser-schema-id":"\u003canonymous-schema-107>"},"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-108>"},"clientId":{"type":"string","description":"Client/user ID.","x-parser-schema-id":"\u003canonymous-schema-109>"},"symbol":{"type":"string","description":"Trading symbol.","x-parser-schema-id":"\u003canonymous-schema-110>"},"side":{"type":"string","description":"Order side, for example BUY or SELL.","x-parser-schema-id":"\u003canonymous-schema-111>"},"type":{"type":"string","description":"Order type, for example LIMIT or MARKET.","x-parser-schema-id":"\u003canonymous-schema-112>"},"timeInForce":{"type":"string","description":"Time in force, for example DAY.","x-parser-schema-id":"\u003canonymous-schema-113>"},"qty":{"type":"string","description":"Order quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-114>"},"price":{"type":"string","description":"Limit price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-115>"},"stopPrice":{"type":"string","description":"Stop price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-116>"},"ordStatus":{"type":"string","enum":["NEW","PARTIALLY_FILLED","FILLED","DONE_FOR_DAY","CANCELED","REPLACED","PENDING_CANCEL","STOPPED","REJECTED","SUSPENDED","PENDING_NEW","CALCULATED","EXPIRED","ACCEPTED_FOR_BID","PENDING_REPLACE"],"description":"Order status.","x-parser-schema-id":"\u003canonymous-schema-117>"},"cumQty":{"type":"string","description":"Cumulative filled quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-118>"},"leavesQty":{"type":"string","description":"Remaining open quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-119>"},"avgPrice":{"type":"string","description":"Average execution price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-120>"},"currency":{"type":"string","description":"Currency code.","x-parser-schema-id":"\u003canonymous-schema-121>"},"exDestination":{"type":"string","description":"Execution destination, for example MNGDFTE or MNGD.","x-parser-schema-id":"\u003canonymous-schema-122>"},"text":{"type":"string","description":"Broker or venue message.","x-parser-schema-id":"\u003canonymous-schema-123>"},"ordRejReason":{"type":"string","description":"Order reject reason when present.","x-parser-schema-id":"\u003canonymous-schema-124>"},"securityType":{"type":"string","description":"Security type, for example EQUITY or OPTION.","x-parser-schema-id":"\u003canonymous-schema-125>"},"category":{"type":"string","description":"Order category, for example EQUITY, SINGLE_LEG, or MULTI_LEG.","x-parser-schema-id":"\u003canonymous-schema-126>"},"legs":{"type":"array","items":{"type":"object","description":"One option leg in an order update.","properties":{"symbol":{"type":"string","description":"Underlying or option symbol.","x-parser-schema-id":"\u003canonymous-schema-128>"},"side":{"type":"string","description":"Order side, for example BUY or SELL.","x-parser-schema-id":"\u003canonymous-schema-129>"},"ratioQty":{"type":"string","description":"Leg ratio quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-130>"},"securityType":{"type":"string","description":"Security type, for example OPTION.","x-parser-schema-id":"\u003canonymous-schema-131>"},"maturity":{"type":"string","description":"Option maturity date in YYYY-MM-DD format.","x-parser-schema-id":"\u003canonymous-schema-132>"},"strikePrice":{"type":"string","description":"Option strike price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-133>"},"positionEffect":{"type":"string","description":"Position effect, for example OPEN or CLOSE.","x-parser-schema-id":"\u003canonymous-schema-134>"},"putCall":{"type":"string","description":"Option side, CALL or PUT.","x-parser-schema-id":"\u003canonymous-schema-135>"},"avgPrice":{"type":"string","description":"Average fill price for the leg, serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-136>"}},"x-parser-schema-id":"AccountOrderLeg"},"x-parser-schema-id":"\u003canonymous-schema-127>"},"execId":{"type":"string","description":"Execution ID for fill events.","x-parser-schema-id":"\u003canonymous-schema-137>"},"execType":{"type":"string","description":"Execution type, for example NEW, FILL, PARTIAL_FILL, or REJECTED.","x-parser-schema-id":"\u003canonymous-schema-138>"},"lastPx":{"type":"string","description":"Last execution price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-139>"},"lastQty":{"type":"string","description":"Last execution quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-140>"},"maturity":{"type":"string","description":"Flat option maturity when sent on single-leg option orders.","x-parser-schema-id":"\u003canonymous-schema-141>"},"putCall":{"type":"string","description":"Flat option side, CALL or PUT.","x-parser-schema-id":"\u003canonymous-schema-142>"},"strikePrice":{"type":"string","description":"Flat option strike price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-143>"},"positionEffect":{"type":"string","description":"Flat option position effect.","x-parser-schema-id":"\u003canonymous-schema-144>"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp.","x-parser-schema-id":"\u003canonymous-schema-145>"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp.","x-parser-schema-id":"\u003canonymous-schema-146>"}},"x-parser-schema-id":"OrderData"},{"type":"object","description":"Position update from the server. Decimal numbers are sent as strings.","properties":{"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-86>"},"symbol":{"type":"string","description":"Equity or OCC option symbol.","x-parser-schema-id":"\u003canonymous-schema-87>"},"securityType":{"type":"string","description":"Security type, for example EQUITY or OPTION.","x-parser-schema-id":"\u003canonymous-schema-88>"},"qty":{"type":"string","description":"Position quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-89>"},"avgPrice":{"type":"string","description":"Average position price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-90>"},"avgCost":{"type":"string","description":"Backward-compatible alias of avgPrice.","x-parser-schema-id":"\u003canonymous-schema-91>"},"unRealizedPL":{"type":"string","description":"Unrealized P\u0026L serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-92>"},"todayRealizedPnL":{"type":"string","description":"Today realized P\u0026L serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-93>"},"mtmRealizedPnL":{"type":"string","description":"Mark-to-market realized P\u0026L measured against the previous close, serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-94>"},"realizedPL":{"type":"string","description":"Backward-compatible alias of todayRealizedPnL.","x-parser-schema-id":"\u003canonymous-schema-95>"},"todayPL":{"type":"string","description":"Today total P\u0026L serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-96>"},"instrument":{"type":"string","description":"Backward-compatible alias of securityType.","x-parser-schema-id":"\u003canonymous-schema-97>"},"putCall":{"type":"string","description":"CALL or PUT for options.","x-parser-schema-id":"\u003canonymous-schema-98>"},"strikePrice":{"type":"string","description":"Option strike price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-99>"},"maturity":{"type":"string","description":"Option maturity date in YYYY-MM-DD format.","x-parser-schema-id":"\u003canonymous-schema-100>"},"flags":{"type":"integer","description":"Position flags.","x-parser-schema-id":"\u003canonymous-schema-101>"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp.","x-parser-schema-id":"\u003canonymous-schema-102>"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp.","x-parser-schema-id":"\u003canonymous-schema-103>"}},"x-parser-schema-id":"PositionData"},{"type":"object","description":"Balance update from the server. Decimal numbers are sent as strings.","properties":{"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-190>"},"sodPositionsMarketValue":{"type":"string","description":"Start-of-day positions market value.","x-parser-schema-id":"\u003canonymous-schema-191>"},"netBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-192>"},"stockBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-193>"},"dayTradeBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-194>"},"optionBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-195>"},"dayTradeOvernightRegTBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-196>"},"totalEquity":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-197>"},"settledFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-198>"},"unsettledFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-199>"},"heldBackFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-200>"},"grossMargin":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-201>"},"pendingOrdersMarginRequirements":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-202>"},"maintReq":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-203>"},"creditMultiplier":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-204>"},"pendingOrdersCount":{"type":"integer","description":"Number of pending orders.","x-parser-schema-id":"\u003canonymous-schema-205>"},"credit":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-206>"},"creditRemaining":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-207>"},"realizedPL":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-208>"},"unRealizedPL":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-209>"},"SMA":{"type":"string","description":"Special memorandum account value.","x-parser-schema-id":"\u003canonymous-schema-210>"},"smaCreditRemaining":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-211>"},"PDT":{"type":"string","description":"Pattern day trader value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-212>"},"pdtCreditRemaining":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-213>"},"startOfDayCash":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-214>"},"valueBought":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-215>"},"valueSold":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-216>"},"sodTtlEquity":{"type":"string","description":"Optional start-of-day total equity.","x-parser-schema-id":"\u003canonymous-schema-217>"},"sodTtlEquityUpdatedAt":{"type":"string","format":"date-time","description":"Optional timestamp for sodTtlEquity.","x-parser-schema-id":"\u003canonymous-schema-218>"}},"x-parser-schema-id":"BalanceData"},{"type":"object","description":"Smaller balance update. Merge these fields into the latest balance data you already have.","properties":{"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-219>"},"fullyPaidUnsettledFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-220>"},"amountAvailableToWithdraw":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-221>"},"updatedAt":{"type":"string","format":"date-time","description":"Timestamp for the Apex update.","x-parser-schema-id":"\u003canonymous-schema-222>"}},"x-parser-schema-id":"ApexBalanceData"},{"type":"object","description":"Account info update from the server. Decimal numbers are sent as strings.","properties":{"id":{"type":"string","description":"Sterling account ID used for subscription routing.","x-parser-schema-id":"\u003canonymous-schema-223>"},"sterlingAccountId":{"type":"string","description":"Raw Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-224>"},"apexAccountId":{"type":"string","description":"Apex account ID when available.","x-parser-schema-id":"\u003canonymous-schema-225>"},"fdid":{"type":"string","description":"FDID when available.","x-parser-schema-id":"\u003canonymous-schema-226>"},"description":{"type":"string","description":"Account description.","x-parser-schema-id":"\u003canonymous-schema-227>"},"accountType":{"type":"string","description":"Account type.","x-parser-schema-id":"\u003canonymous-schema-228>"},"accountClass":{"type":"string","description":"Account class.","x-parser-schema-id":"\u003canonymous-schema-229>"},"optionsLevel":{"type":"string","description":"Options level.","x-parser-schema-id":"\u003canonymous-schema-230>"},"maintenanceExcess":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-231>"},"cashAvailable":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-232>"},"exchangeSurplus":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-233>"},"accruedCash":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-234>"},"netLiquidity":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-235>"},"marginEquity":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-236>"},"sma":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-237>"},"maintReq":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-238>"},"email":{"type":"string","description":"Account email.","x-parser-schema-id":"\u003canonymous-schema-239>"},"cell":{"type":"string","description":"Account phone number.","x-parser-schema-id":"\u003canonymous-schema-240>"},"groupId":{"type":"string","description":"Sterling group ID.","x-parser-schema-id":"\u003canonymous-schema-241>"}},"x-parser-schema-id":"AccountInfoData"}],"x-parser-schema-id":"AccountEventData"}},"x-parser-schema-id":"\u003canonymous-schema-186>"}},"x-parser-schema-id":"AccountEventPayload"},"title":"Balance Update","description":"Real-time balance update","example":"{\n \"type\": \"event\",\n \"timestamp\": \"2024-01-15T14:30:00Z\",\n \"payload\": {\n \"topic\": \"account\",\n \"name\": \"account.balance\",\n \"target\": \"account:ACC123456\",\n \"data\": {\n \"accountId\": \"ACC123456\",\n \"sodPositionsMarketValue\": \"48000.00\",\n \"netBuyingPower\": \"25155.00\",\n \"stockBuyingPower\": \"50310.00\",\n \"dayTradeBuyingPower\": \"100620.00\",\n \"optionBuyingPower\": \"25155.00\",\n \"dayTradeOvernightRegTBuyingPower\": \"50310.00\",\n \"totalEquity\": \"50155.00\",\n \"settledFunds\": \"35000.00\",\n \"unsettledFunds\": \"0\",\n \"heldBackFunds\": \"0\",\n \"grossMargin\": \"15045.00\",\n \"pendingOrdersMarginRequirements\": \"0\",\n \"maintReq\": \"7646.50\",\n \"creditMultiplier\": \"2\",\n \"pendingOrdersCount\": 0,\n \"credit\": \"50000.00\",\n \"creditRemaining\": \"25155.00\",\n \"realizedPL\": \"0\",\n \"unRealizedPL\": \"167.00\",\n \"SMA\": \"25155.00\",\n \"smaCreditRemaining\": \"25155.00\",\n \"PDT\": \"0\",\n \"pdtCreditRemaining\": \"100620.00\",\n \"startOfDayCash\": \"35000.00\",\n \"valueBought\": \"15293.00\",\n \"valueSold\": \"0\"\n }\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"balanceUpdate"}]}],"bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"accountUpdatesStream"}]},{"id":"receiveAccountUpdate","title":"Account Update","description":"Receive account information updates","type":"send","messages":[{"id":"accountUpdate","contentType":"application/json","payload":[{"name":"Account Info Update","description":"Real-time account information update","type":"object","properties":[{"name":"type","type":"string","description":"Top-level message type. Always `event` for streaming updates.","enumValues":["event"],"required":false},{"name":"timestamp","type":"string","description":"Time when the server sent this event, in RFC3339 format.","required":false},{"name":"payload","type":"object","description":"Routing: `topic`, `name`, and `data` for the event.","required":false,"properties":[{"name":"topic","type":"string","description":"Topic identifier. Always `account` for these events.","enumValues":["account"],"required":false},{"name":"name","type":"string","description":"Event name","enumValues":["account.order","account.position","account.balance","account.balance.apex","account.info"],"required":false},{"name":"target","type":"string","description":"Target identifier (e.g. account:ACC123456)","required":false},{"name":"data","type":"object","required":false,"properties":[{"name":"clOrdId","type":"string","description":"Client order ID.","required":false},{"name":"ordId","type":"string","description":"Broker/order ID.","required":false},{"name":"origClOrdId","type":"string","description":"Original client order ID for replaces/cancels.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"clientId","type":"string","description":"Client/user ID.","required":false},{"name":"symbol","type":"string","description":"Trading symbol.","required":false},{"name":"side","type":"string","description":"Order side, for example BUY or SELL.","required":false},{"name":"type","type":"string","description":"Order type, for example LIMIT or MARKET.","required":false},{"name":"timeInForce","type":"string","description":"Time in force, for example DAY.","required":false},{"name":"qty","type":"string","description":"Order quantity serialized as a string.","required":false},{"name":"price","type":"string","description":"Limit price serialized as a string.","required":false},{"name":"stopPrice","type":"string","description":"Stop price serialized as a string.","required":false},{"name":"ordStatus","type":"string","description":"Order status.","enumValues":["NEW","PARTIALLY_FILLED","FILLED","DONE_FOR_DAY","CANCELED","REPLACED","PENDING_CANCEL","STOPPED","REJECTED","SUSPENDED","PENDING_NEW","CALCULATED","EXPIRED","ACCEPTED_FOR_BID","PENDING_REPLACE"],"required":false},{"name":"cumQty","type":"string","description":"Cumulative filled quantity serialized as a string.","required":false},{"name":"leavesQty","type":"string","description":"Remaining open quantity serialized as a string.","required":false},{"name":"avgPrice","type":"string","description":"Average execution price serialized as a string.","required":false},{"name":"currency","type":"string","description":"Currency code.","required":false},{"name":"exDestination","type":"string","description":"Execution destination, for example MNGDFTE or MNGD.","required":false},{"name":"text","type":"string","description":"Broker or venue message.","required":false},{"name":"ordRejReason","type":"string","description":"Order reject reason when present.","required":false},{"name":"securityType","type":"string","description":"Security type, for example EQUITY or OPTION.","required":false},{"name":"category","type":"string","description":"Order category, for example EQUITY, SINGLE_LEG, or MULTI_LEG.","required":false},{"name":"legs","type":"array","required":false,"properties":[{"name":"symbol","type":"string","description":"Underlying or option symbol.","required":false},{"name":"side","type":"string","description":"Order side, for example BUY or SELL.","required":false},{"name":"ratioQty","type":"string","description":"Leg ratio quantity serialized as a string.","required":false},{"name":"securityType","type":"string","description":"Security type, for example OPTION.","required":false},{"name":"maturity","type":"string","description":"Option maturity date in YYYY-MM-DD format.","required":false},{"name":"strikePrice","type":"string","description":"Option strike price serialized as a string.","required":false},{"name":"positionEffect","type":"string","description":"Position effect, for example OPEN or CLOSE.","required":false},{"name":"putCall","type":"string","description":"Option side, CALL or PUT.","required":false},{"name":"avgPrice","type":"string","description":"Average fill price for the leg, serialized as a string.","required":false}]},{"name":"execId","type":"string","description":"Execution ID for fill events.","required":false},{"name":"execType","type":"string","description":"Execution type, for example NEW, FILL, PARTIAL_FILL, or REJECTED.","required":false},{"name":"lastPx","type":"string","description":"Last execution price serialized as a string.","required":false},{"name":"lastQty","type":"string","description":"Last execution quantity serialized as a string.","required":false},{"name":"maturity","type":"string","description":"Flat option maturity when sent on single-leg option orders.","required":false},{"name":"putCall","type":"string","description":"Flat option side, CALL or PUT.","required":false},{"name":"strikePrice","type":"string","description":"Flat option strike price serialized as a string.","required":false},{"name":"positionEffect","type":"string","description":"Flat option position effect.","required":false},{"name":"createdAt","type":"string","description":"Creation timestamp.","required":false},{"name":"updatedAt","type":"string","description":"Last update timestamp.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"symbol","type":"string","description":"Equity or OCC option symbol.","required":false},{"name":"securityType","type":"string","description":"Security type, for example EQUITY or OPTION.","required":false},{"name":"qty","type":"string","description":"Position quantity serialized as a string.","required":false},{"name":"avgPrice","type":"string","description":"Average position price serialized as a string.","required":false},{"name":"avgCost","type":"string","description":"Backward-compatible alias of avgPrice.","required":false},{"name":"unRealizedPL","type":"string","description":"Unrealized P\u0026L serialized as a string.","required":false},{"name":"todayRealizedPnL","type":"string","description":"Today realized P\u0026L serialized as a string.","required":false},{"name":"mtmRealizedPnL","type":"string","description":"Mark-to-market realized P\u0026L measured against the previous close, serialized as a string.","required":false},{"name":"realizedPL","type":"string","description":"Backward-compatible alias of todayRealizedPnL.","required":false},{"name":"todayPL","type":"string","description":"Today total P\u0026L serialized as a string.","required":false},{"name":"instrument","type":"string","description":"Backward-compatible alias of securityType.","required":false},{"name":"putCall","type":"string","description":"CALL or PUT for options.","required":false},{"name":"strikePrice","type":"string","description":"Option strike price serialized as a string.","required":false},{"name":"maturity","type":"string","description":"Option maturity date in YYYY-MM-DD format.","required":false},{"name":"flags","type":"integer","description":"Position flags.","required":false},{"name":"createdAt","type":"string","description":"Creation timestamp.","required":false},{"name":"updatedAt","type":"string","description":"Last update timestamp.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"sodPositionsMarketValue","type":"string","description":"Start-of-day positions market value.","required":false},{"name":"netBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"stockBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"dayTradeBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"optionBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"dayTradeOvernightRegTBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"totalEquity","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"settledFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"unsettledFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"heldBackFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"grossMargin","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"pendingOrdersMarginRequirements","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"maintReq","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"creditMultiplier","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"pendingOrdersCount","type":"integer","description":"Number of pending orders.","required":false},{"name":"credit","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"creditRemaining","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"realizedPL","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"unRealizedPL","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"SMA","type":"string","description":"Special memorandum account value.","required":false},{"name":"smaCreditRemaining","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"PDT","type":"string","description":"Pattern day trader value serialized as a string.","required":false},{"name":"pdtCreditRemaining","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"startOfDayCash","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"valueBought","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"valueSold","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"sodTtlEquity","type":"string","description":"Optional start-of-day total equity.","required":false},{"name":"sodTtlEquityUpdatedAt","type":"string","description":"Optional timestamp for sodTtlEquity.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"fullyPaidUnsettledFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"amountAvailableToWithdraw","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"updatedAt","type":"string","description":"Timestamp for the Apex update.","required":false},{"name":"id","type":"string","description":"Sterling account ID used for subscription routing.","required":false},{"name":"sterlingAccountId","type":"string","description":"Raw Sterling account ID.","required":false},{"name":"apexAccountId","type":"string","description":"Apex account ID when available.","required":false},{"name":"fdid","type":"string","description":"FDID when available.","required":false},{"name":"description","type":"string","description":"Account description.","required":false},{"name":"accountType","type":"string","description":"Account type.","required":false},{"name":"accountClass","type":"string","description":"Account class.","required":false},{"name":"optionsLevel","type":"string","description":"Options level.","required":false},{"name":"maintenanceExcess","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"cashAvailable","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"exchangeSurplus","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"accruedCash","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"netLiquidity","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"marginEquity","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"sma","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"maintReq","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"email","type":"string","description":"Account email.","required":false},{"name":"cell","type":"string","description":"Account phone number.","required":false},{"name":"groupId","type":"string","description":"Sterling group ID.","required":false}]}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","description":"Server message for the `account` topic. `name` tells you what changed.","properties":{"type":{"type":"string","enum":["event"],"description":"Top-level message type. Always `event` for streaming updates.","x-parser-schema-id":"\u003canonymous-schema-184>"},"timestamp":{"type":"string","description":"Time when the server sent this event, in RFC3339 format.","x-parser-schema-id":"\u003canonymous-schema-185>"},"payload":{"type":"object","description":"Routing: `topic`, `name`, and `data` for the event.","properties":{"topic":{"type":"string","enum":["account"],"description":"Topic identifier. Always `account` for these events.","x-parser-schema-id":"\u003canonymous-schema-187>"},"name":{"type":"string","enum":["account.order","account.position","account.balance","account.balance.apex","account.info"],"description":"Event name","x-parser-schema-id":"\u003canonymous-schema-188>"},"target":{"type":"string","description":"Target identifier (e.g. account:ACC123456)","x-parser-schema-id":"\u003canonymous-schema-189>"},"data":{"oneOf":[{"type":"object","description":"Order update from the server. This includes the order plus fill details when the order changes.","properties":{"clOrdId":{"type":"string","description":"Client order ID.","x-parser-schema-id":"\u003canonymous-schema-105>"},"ordId":{"type":"string","description":"Broker/order ID.","x-parser-schema-id":"\u003canonymous-schema-106>"},"origClOrdId":{"type":"string","description":"Original client order ID for replaces/cancels.","x-parser-schema-id":"\u003canonymous-schema-107>"},"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-108>"},"clientId":{"type":"string","description":"Client/user ID.","x-parser-schema-id":"\u003canonymous-schema-109>"},"symbol":{"type":"string","description":"Trading symbol.","x-parser-schema-id":"\u003canonymous-schema-110>"},"side":{"type":"string","description":"Order side, for example BUY or SELL.","x-parser-schema-id":"\u003canonymous-schema-111>"},"type":{"type":"string","description":"Order type, for example LIMIT or MARKET.","x-parser-schema-id":"\u003canonymous-schema-112>"},"timeInForce":{"type":"string","description":"Time in force, for example DAY.","x-parser-schema-id":"\u003canonymous-schema-113>"},"qty":{"type":"string","description":"Order quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-114>"},"price":{"type":"string","description":"Limit price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-115>"},"stopPrice":{"type":"string","description":"Stop price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-116>"},"ordStatus":{"type":"string","enum":["NEW","PARTIALLY_FILLED","FILLED","DONE_FOR_DAY","CANCELED","REPLACED","PENDING_CANCEL","STOPPED","REJECTED","SUSPENDED","PENDING_NEW","CALCULATED","EXPIRED","ACCEPTED_FOR_BID","PENDING_REPLACE"],"description":"Order status.","x-parser-schema-id":"\u003canonymous-schema-117>"},"cumQty":{"type":"string","description":"Cumulative filled quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-118>"},"leavesQty":{"type":"string","description":"Remaining open quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-119>"},"avgPrice":{"type":"string","description":"Average execution price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-120>"},"currency":{"type":"string","description":"Currency code.","x-parser-schema-id":"\u003canonymous-schema-121>"},"exDestination":{"type":"string","description":"Execution destination, for example MNGDFTE or MNGD.","x-parser-schema-id":"\u003canonymous-schema-122>"},"text":{"type":"string","description":"Broker or venue message.","x-parser-schema-id":"\u003canonymous-schema-123>"},"ordRejReason":{"type":"string","description":"Order reject reason when present.","x-parser-schema-id":"\u003canonymous-schema-124>"},"securityType":{"type":"string","description":"Security type, for example EQUITY or OPTION.","x-parser-schema-id":"\u003canonymous-schema-125>"},"category":{"type":"string","description":"Order category, for example EQUITY, SINGLE_LEG, or MULTI_LEG.","x-parser-schema-id":"\u003canonymous-schema-126>"},"legs":{"type":"array","items":{"type":"object","description":"One option leg in an order update.","properties":{"symbol":{"type":"string","description":"Underlying or option symbol.","x-parser-schema-id":"\u003canonymous-schema-128>"},"side":{"type":"string","description":"Order side, for example BUY or SELL.","x-parser-schema-id":"\u003canonymous-schema-129>"},"ratioQty":{"type":"string","description":"Leg ratio quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-130>"},"securityType":{"type":"string","description":"Security type, for example OPTION.","x-parser-schema-id":"\u003canonymous-schema-131>"},"maturity":{"type":"string","description":"Option maturity date in YYYY-MM-DD format.","x-parser-schema-id":"\u003canonymous-schema-132>"},"strikePrice":{"type":"string","description":"Option strike price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-133>"},"positionEffect":{"type":"string","description":"Position effect, for example OPEN or CLOSE.","x-parser-schema-id":"\u003canonymous-schema-134>"},"putCall":{"type":"string","description":"Option side, CALL or PUT.","x-parser-schema-id":"\u003canonymous-schema-135>"},"avgPrice":{"type":"string","description":"Average fill price for the leg, serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-136>"}},"x-parser-schema-id":"AccountOrderLeg"},"x-parser-schema-id":"\u003canonymous-schema-127>"},"execId":{"type":"string","description":"Execution ID for fill events.","x-parser-schema-id":"\u003canonymous-schema-137>"},"execType":{"type":"string","description":"Execution type, for example NEW, FILL, PARTIAL_FILL, or REJECTED.","x-parser-schema-id":"\u003canonymous-schema-138>"},"lastPx":{"type":"string","description":"Last execution price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-139>"},"lastQty":{"type":"string","description":"Last execution quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-140>"},"maturity":{"type":"string","description":"Flat option maturity when sent on single-leg option orders.","x-parser-schema-id":"\u003canonymous-schema-141>"},"putCall":{"type":"string","description":"Flat option side, CALL or PUT.","x-parser-schema-id":"\u003canonymous-schema-142>"},"strikePrice":{"type":"string","description":"Flat option strike price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-143>"},"positionEffect":{"type":"string","description":"Flat option position effect.","x-parser-schema-id":"\u003canonymous-schema-144>"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp.","x-parser-schema-id":"\u003canonymous-schema-145>"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp.","x-parser-schema-id":"\u003canonymous-schema-146>"}},"x-parser-schema-id":"OrderData"},{"type":"object","description":"Position update from the server. Decimal numbers are sent as strings.","properties":{"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-86>"},"symbol":{"type":"string","description":"Equity or OCC option symbol.","x-parser-schema-id":"\u003canonymous-schema-87>"},"securityType":{"type":"string","description":"Security type, for example EQUITY or OPTION.","x-parser-schema-id":"\u003canonymous-schema-88>"},"qty":{"type":"string","description":"Position quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-89>"},"avgPrice":{"type":"string","description":"Average position price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-90>"},"avgCost":{"type":"string","description":"Backward-compatible alias of avgPrice.","x-parser-schema-id":"\u003canonymous-schema-91>"},"unRealizedPL":{"type":"string","description":"Unrealized P\u0026L serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-92>"},"todayRealizedPnL":{"type":"string","description":"Today realized P\u0026L serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-93>"},"mtmRealizedPnL":{"type":"string","description":"Mark-to-market realized P\u0026L measured against the previous close, serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-94>"},"realizedPL":{"type":"string","description":"Backward-compatible alias of todayRealizedPnL.","x-parser-schema-id":"\u003canonymous-schema-95>"},"todayPL":{"type":"string","description":"Today total P\u0026L serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-96>"},"instrument":{"type":"string","description":"Backward-compatible alias of securityType.","x-parser-schema-id":"\u003canonymous-schema-97>"},"putCall":{"type":"string","description":"CALL or PUT for options.","x-parser-schema-id":"\u003canonymous-schema-98>"},"strikePrice":{"type":"string","description":"Option strike price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-99>"},"maturity":{"type":"string","description":"Option maturity date in YYYY-MM-DD format.","x-parser-schema-id":"\u003canonymous-schema-100>"},"flags":{"type":"integer","description":"Position flags.","x-parser-schema-id":"\u003canonymous-schema-101>"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp.","x-parser-schema-id":"\u003canonymous-schema-102>"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp.","x-parser-schema-id":"\u003canonymous-schema-103>"}},"x-parser-schema-id":"PositionData"},{"type":"object","description":"Balance update from the server. Decimal numbers are sent as strings.","properties":{"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-190>"},"sodPositionsMarketValue":{"type":"string","description":"Start-of-day positions market value.","x-parser-schema-id":"\u003canonymous-schema-191>"},"netBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-192>"},"stockBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-193>"},"dayTradeBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-194>"},"optionBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-195>"},"dayTradeOvernightRegTBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-196>"},"totalEquity":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-197>"},"settledFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-198>"},"unsettledFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-199>"},"heldBackFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-200>"},"grossMargin":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-201>"},"pendingOrdersMarginRequirements":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-202>"},"maintReq":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-203>"},"creditMultiplier":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-204>"},"pendingOrdersCount":{"type":"integer","description":"Number of pending orders.","x-parser-schema-id":"\u003canonymous-schema-205>"},"credit":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-206>"},"creditRemaining":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-207>"},"realizedPL":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-208>"},"unRealizedPL":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-209>"},"SMA":{"type":"string","description":"Special memorandum account value.","x-parser-schema-id":"\u003canonymous-schema-210>"},"smaCreditRemaining":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-211>"},"PDT":{"type":"string","description":"Pattern day trader value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-212>"},"pdtCreditRemaining":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-213>"},"startOfDayCash":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-214>"},"valueBought":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-215>"},"valueSold":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-216>"},"sodTtlEquity":{"type":"string","description":"Optional start-of-day total equity.","x-parser-schema-id":"\u003canonymous-schema-217>"},"sodTtlEquityUpdatedAt":{"type":"string","format":"date-time","description":"Optional timestamp for sodTtlEquity.","x-parser-schema-id":"\u003canonymous-schema-218>"}},"x-parser-schema-id":"BalanceData"},{"type":"object","description":"Smaller balance update. Merge these fields into the latest balance data you already have.","properties":{"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-219>"},"fullyPaidUnsettledFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-220>"},"amountAvailableToWithdraw":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-221>"},"updatedAt":{"type":"string","format":"date-time","description":"Timestamp for the Apex update.","x-parser-schema-id":"\u003canonymous-schema-222>"}},"x-parser-schema-id":"ApexBalanceData"},{"type":"object","description":"Account info update from the server. Decimal numbers are sent as strings.","properties":{"id":{"type":"string","description":"Sterling account ID used for subscription routing.","x-parser-schema-id":"\u003canonymous-schema-223>"},"sterlingAccountId":{"type":"string","description":"Raw Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-224>"},"apexAccountId":{"type":"string","description":"Apex account ID when available.","x-parser-schema-id":"\u003canonymous-schema-225>"},"fdid":{"type":"string","description":"FDID when available.","x-parser-schema-id":"\u003canonymous-schema-226>"},"description":{"type":"string","description":"Account description.","x-parser-schema-id":"\u003canonymous-schema-227>"},"accountType":{"type":"string","description":"Account type.","x-parser-schema-id":"\u003canonymous-schema-228>"},"accountClass":{"type":"string","description":"Account class.","x-parser-schema-id":"\u003canonymous-schema-229>"},"optionsLevel":{"type":"string","description":"Options level.","x-parser-schema-id":"\u003canonymous-schema-230>"},"maintenanceExcess":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-231>"},"cashAvailable":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-232>"},"exchangeSurplus":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-233>"},"accruedCash":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-234>"},"netLiquidity":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-235>"},"marginEquity":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-236>"},"sma":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-237>"},"maintReq":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-238>"},"email":{"type":"string","description":"Account email.","x-parser-schema-id":"\u003canonymous-schema-239>"},"cell":{"type":"string","description":"Account phone number.","x-parser-schema-id":"\u003canonymous-schema-240>"},"groupId":{"type":"string","description":"Sterling group ID.","x-parser-schema-id":"\u003canonymous-schema-241>"}},"x-parser-schema-id":"AccountInfoData"}],"x-parser-schema-id":"AccountEventData"}},"x-parser-schema-id":"\u003canonymous-schema-186>"}},"x-parser-schema-id":"AccountEventPayload"},"title":"Account Info Update","description":"Real-time account information update","example":"{\n \"type\": \"event\",\n \"timestamp\": \"2024-01-15T14:30:00Z\",\n \"payload\": {\n \"topic\": \"account\",\n \"name\": \"account.info\",\n \"target\": \"account:ACC123456\",\n \"data\": {\n \"id\": \"ACC123456\",\n \"sterlingAccountId\": \"STERLING-123\",\n \"apexAccountId\": \"\",\n \"fdid\": \"FDID-123456\",\n \"description\": \"John Doe Trading Account\",\n \"accountType\": \"MARGIN\",\n \"accountClass\": \"INDIVIDUAL\",\n \"optionsLevel\": \"LEVEL_3\",\n \"maintenanceExcess\": \"17508.50\",\n \"cashAvailable\": \"25155.00\",\n \"exchangeSurplus\": \"0\",\n \"accruedCash\": \"0\",\n \"netLiquidity\": \"50155.00\",\n \"marginEquity\": \"50155.00\",\n \"sma\": \"25155.00\",\n \"maintReq\": \"7646.50\",\n \"email\": \"john.doe@example.com\",\n \"cell\": \"+1234567890\",\n \"groupId\": \"TRADING\"\n }\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"accountUpdate"}]}],"bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"accountUpdatesStream"}]},{"id":"receivePnLCandleUpdate","title":"P\u0026L Candle Update","description":"Receive P\u0026L candle data","type":"send","messages":[{"id":"pnlCandleUpdate","contentType":"application/json","payload":[{"name":"P\u0026L Candle Update","description":"Live profit and loss updates","type":"object","properties":[{"name":"type","type":"string","description":"Top-level message type. Always `event` for P\u0026L updates.","enumValues":["event"],"required":false},{"name":"timestamp","type":"string","description":"Time when the server sent this event, in RFC3339 format.","required":false},{"name":"payload","type":"object","description":"The `pnl` topic name and its data.","required":false,"properties":[{"name":"topic","type":"string","description":"Topic identifier. Always `pnl`.","enumValues":["pnl"],"required":false},{"name":"data","type":"object","description":"Profit and loss chart data. This includes timestamp, close, and equity arrays.","required":false,"properties":[{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"interval","type":"string","description":"Candle interval.","required":false},{"name":"t","type":"array","description":"Unix timestamps in seconds.","required":false,"properties":[{"name":"item","type":"integer","required":false}]},{"name":"c","type":"array","description":"Close/equity values.","required":false,"properties":[{"name":"item","type":"number","required":false}]}]}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","description":"Server message for the `pnl` topic.","properties":{"type":{"type":"string","enum":["event"],"description":"Top-level message type. Always `event` for P\u0026L updates.","x-parser-schema-id":"\u003canonymous-schema-242>"},"timestamp":{"type":"string","description":"Time when the server sent this event, in RFC3339 format.","x-parser-schema-id":"\u003canonymous-schema-243>"},"payload":{"type":"object","description":"The `pnl` topic name and its data.","properties":{"topic":{"type":"string","enum":["pnl"],"description":"Topic identifier. Always `pnl`.","x-parser-schema-id":"\u003canonymous-schema-245>"},"data":{"type":"object","description":"Profit and loss chart data. This includes timestamp, close, and equity arrays.","properties":{"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-148>"},"interval":{"type":"string","description":"Candle interval.","x-parser-schema-id":"\u003canonymous-schema-149>"},"t":{"type":"array","items":{"type":"integer","x-parser-schema-id":"\u003canonymous-schema-151>"},"description":"Unix timestamps in seconds.","x-parser-schema-id":"\u003canonymous-schema-150>"},"c":{"type":"array","items":{"type":"number","x-parser-schema-id":"\u003canonymous-schema-153>"},"description":"Close/equity values.","x-parser-schema-id":"\u003canonymous-schema-152>"}},"x-parser-schema-id":"PnLCandleData"}},"x-parser-schema-id":"\u003canonymous-schema-244>"}},"x-parser-schema-id":"PnLEventPayload"},"title":"P\u0026L Candle Update","description":"Live profit and loss updates","example":"{\n \"type\": \"event\",\n \"timestamp\": \"2024-01-15T10:30:00Z\",\n \"payload\": {\n \"topic\": \"pnl\",\n \"data\": {\n \"accountId\": \"ACC123456\",\n \"interval\": \"1m\",\n \"t\": [\n 1703001000\n ],\n \"c\": [\n 50155\n ]\n }\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"pnlCandleUpdate"}]}],"bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"accountUpdatesStream"}]},{"id":"receiveWatchlistUpdate","title":"Watchlist Update","description":"Receive watchlist change notifications","type":"send","messages":[{"id":"watchlistUpdate","contentType":"application/json","payload":[{"name":"Watchlist Update","description":"Real-time watchlist updates","type":"object","properties":[{"name":"type","type":"string","description":"Top-level message type. Always `event` for watchlist/news.","enumValues":["event"],"required":false},{"name":"timestamp","type":"string","description":"Time when the server sent this event, in RFC3339 format.","required":false},{"name":"payload","type":"object","description":"The topic name and the data for that event.","required":false,"properties":[{"name":"topic","type":"string","description":"Topic identifier","enumValues":["watchlist","news"],"required":false},{"name":"data","type":"array","required":false,"properties":[{"name":"id","type":"integer","description":"Watchlist ID.","required":false},{"name":"name","type":"string","description":"User-facing watchlist name.","required":false},{"name":"symbols","type":"array","description":"Symbols currently saved in the watchlist.","required":false,"properties":[{"name":"item","type":"string","required":false}]},{"name":"id","type":"integer","description":"Unique news ID.","required":false},{"name":"title","type":"string","description":"Article title.","required":false},{"name":"news_type","type":"string","description":"News type, for example news or press_release.","required":false},{"name":"symbols","type":"array","description":"Related symbols.","required":false,"properties":[{"name":"item","type":"string","required":false}]},{"name":"authors","type":"array","description":"Article authors.","required":false,"properties":[{"name":"item","type":"string","required":false}]},{"name":"timestamp","type":"string","description":"Publication timestamp.","required":false},{"name":"body","type":"string","description":"Full article content when available.","required":false},{"name":"action","type":"string","description":"Action string when available.","required":false}]}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","description":"Server message for the `watchlist` or `news` topic.","properties":{"type":{"type":"string","enum":["event"],"description":"Top-level message type. Always `event` for watchlist/news.","x-parser-schema-id":"\u003canonymous-schema-246>"},"timestamp":{"type":"string","description":"Time when the server sent this event, in RFC3339 format.","x-parser-schema-id":"\u003canonymous-schema-247>"},"payload":{"type":"object","description":"The topic name and the data for that event.","properties":{"topic":{"type":"string","enum":["watchlist","news"],"description":"Topic identifier","x-parser-schema-id":"\u003canonymous-schema-249>"},"data":{"oneOf":[{"type":"array","description":"Current watchlists for the signed-in user. The same list shape is used in the first subscribe reply and later watchlist events.","items":{"type":"object","description":"One saved watchlist from shared/domains/watchlist.Watchlist.","properties":{"id":{"type":"integer","description":"Watchlist ID.","x-parser-schema-id":"\u003canonymous-schema-154>"},"name":{"type":"string","description":"User-facing watchlist name.","x-parser-schema-id":"\u003canonymous-schema-155>"},"symbols":{"type":"array","items":{"type":"string","x-parser-schema-id":"\u003canonymous-schema-157>"},"description":"Symbols currently saved in the watchlist.","x-parser-schema-id":"\u003canonymous-schema-156>"}},"x-parser-schema-id":"WatchlistEntry"},"x-parser-schema-id":"WatchlistSnapshotData"},{"type":"array","description":"Initial news snapshot returned after a news subscription succeeds.","items":{"type":"object","description":"One news item.","properties":{"id":{"type":"integer","description":"Unique news ID.","x-parser-schema-id":"\u003canonymous-schema-158>"},"title":{"type":"string","description":"Article title.","x-parser-schema-id":"\u003canonymous-schema-159>"},"news_type":{"type":"string","description":"News type, for example news or press_release.","x-parser-schema-id":"\u003canonymous-schema-160>"},"symbols":{"type":"array","items":{"type":"string","x-parser-schema-id":"\u003canonymous-schema-162>"},"description":"Related symbols.","x-parser-schema-id":"\u003canonymous-schema-161>"},"authors":{"type":"array","items":{"type":"string","x-parser-schema-id":"\u003canonymous-schema-164>"},"description":"Article authors.","x-parser-schema-id":"\u003canonymous-schema-163>"},"timestamp":{"type":"string","format":"date-time","description":"Publication timestamp.","x-parser-schema-id":"\u003canonymous-schema-165>"},"body":{"type":"string","description":"Full article content when available.","x-parser-schema-id":"\u003canonymous-schema-166>"},"action":{"type":"string","description":"Action string when available.","x-parser-schema-id":"\u003canonymous-schema-167>"}},"x-parser-schema-id":"NewsItem"},"x-parser-schema-id":"NewsSnapshotData"}],"x-parser-schema-id":"\u003canonymous-schema-250>"}},"x-parser-schema-id":"\u003canonymous-schema-248>"}},"x-parser-schema-id":"TopicEventPayload"},"title":"Watchlist Update","description":"Real-time watchlist updates","example":"{\n \"type\": \"event\",\n \"timestamp\": \"2024-01-15T14:30:00Z\",\n \"payload\": {\n \"topic\": \"watchlist\",\n \"data\": [\n {\n \"id\": 101,\n \"name\": \"Core holdings\",\n \"symbols\": [\n \"AAPL\",\n \"MSFT\",\n \"NVDA\",\n \"TSLA\"\n ]\n },\n {\n \"id\": 205,\n \"name\": \"Earnings radar\",\n \"symbols\": [\n \"AMD\"\n ]\n }\n ]\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"watchlistUpdate"}]}],"bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"accountUpdatesStream"}]},{"id":"receiveNewsUpdate","title":"News Update","description":"Receive news feed updates","type":"send","messages":[{"id":"newsUpdate","contentType":"application/json","payload":[{"name":"News Update","description":"Real-time news updates","type":"object","properties":[{"name":"type","type":"string","description":"Top-level message type. Always `event` for watchlist/news.","enumValues":["event"],"required":false},{"name":"timestamp","type":"string","description":"Time when the server sent this event, in RFC3339 format.","required":false},{"name":"payload","type":"object","description":"The topic name and the data for that event.","required":false,"properties":[{"name":"topic","type":"string","description":"Topic identifier","enumValues":["watchlist","news"],"required":false},{"name":"data","type":"array","required":false,"properties":[{"name":"id","type":"integer","description":"Watchlist ID.","required":false},{"name":"name","type":"string","description":"User-facing watchlist name.","required":false},{"name":"symbols","type":"array","description":"Symbols currently saved in the watchlist.","required":false,"properties":[{"name":"item","type":"string","required":false}]},{"name":"id","type":"integer","description":"Unique news ID.","required":false},{"name":"title","type":"string","description":"Article title.","required":false},{"name":"news_type","type":"string","description":"News type, for example news or press_release.","required":false},{"name":"symbols","type":"array","description":"Related symbols.","required":false,"properties":[{"name":"item","type":"string","required":false}]},{"name":"authors","type":"array","description":"Article authors.","required":false,"properties":[{"name":"item","type":"string","required":false}]},{"name":"timestamp","type":"string","description":"Publication timestamp.","required":false},{"name":"body","type":"string","description":"Full article content when available.","required":false},{"name":"action","type":"string","description":"Action string when available.","required":false}]}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","description":"Server message for the `watchlist` or `news` topic.","properties":{"type":{"type":"string","enum":["event"],"description":"Top-level message type. Always `event` for watchlist/news.","x-parser-schema-id":"\u003canonymous-schema-246>"},"timestamp":{"type":"string","description":"Time when the server sent this event, in RFC3339 format.","x-parser-schema-id":"\u003canonymous-schema-247>"},"payload":{"type":"object","description":"The topic name and the data for that event.","properties":{"topic":{"type":"string","enum":["watchlist","news"],"description":"Topic identifier","x-parser-schema-id":"\u003canonymous-schema-249>"},"data":{"oneOf":[{"type":"array","description":"Current watchlists for the signed-in user. The same list shape is used in the first subscribe reply and later watchlist events.","items":{"type":"object","description":"One saved watchlist from shared/domains/watchlist.Watchlist.","properties":{"id":{"type":"integer","description":"Watchlist ID.","x-parser-schema-id":"\u003canonymous-schema-154>"},"name":{"type":"string","description":"User-facing watchlist name.","x-parser-schema-id":"\u003canonymous-schema-155>"},"symbols":{"type":"array","items":{"type":"string","x-parser-schema-id":"\u003canonymous-schema-157>"},"description":"Symbols currently saved in the watchlist.","x-parser-schema-id":"\u003canonymous-schema-156>"}},"x-parser-schema-id":"WatchlistEntry"},"x-parser-schema-id":"WatchlistSnapshotData"},{"type":"array","description":"Initial news snapshot returned after a news subscription succeeds.","items":{"type":"object","description":"One news item.","properties":{"id":{"type":"integer","description":"Unique news ID.","x-parser-schema-id":"\u003canonymous-schema-158>"},"title":{"type":"string","description":"Article title.","x-parser-schema-id":"\u003canonymous-schema-159>"},"news_type":{"type":"string","description":"News type, for example news or press_release.","x-parser-schema-id":"\u003canonymous-schema-160>"},"symbols":{"type":"array","items":{"type":"string","x-parser-schema-id":"\u003canonymous-schema-162>"},"description":"Related symbols.","x-parser-schema-id":"\u003canonymous-schema-161>"},"authors":{"type":"array","items":{"type":"string","x-parser-schema-id":"\u003canonymous-schema-164>"},"description":"Article authors.","x-parser-schema-id":"\u003canonymous-schema-163>"},"timestamp":{"type":"string","format":"date-time","description":"Publication timestamp.","x-parser-schema-id":"\u003canonymous-schema-165>"},"body":{"type":"string","description":"Full article content when available.","x-parser-schema-id":"\u003canonymous-schema-166>"},"action":{"type":"string","description":"Action string when available.","x-parser-schema-id":"\u003canonymous-schema-167>"}},"x-parser-schema-id":"NewsItem"},"x-parser-schema-id":"NewsSnapshotData"}],"x-parser-schema-id":"\u003canonymous-schema-250>"}},"x-parser-schema-id":"\u003canonymous-schema-248>"}},"x-parser-schema-id":"TopicEventPayload"},"title":"News Update","description":"Real-time news updates","example":"{\n \"type\": \"event\",\n \"timestamp\": \"2024-01-15T14:30:00Z\",\n \"payload\": {\n \"topic\": \"news\",\n \"data\": [\n {\n \"id\": 12345,\n \"title\": \"Fed Announces Rate Decision\",\n \"news_type\": \"news\",\n \"authors\": [\n \"Reuters\"\n ],\n \"timestamp\": \"2024-01-15T14:30:00Z\",\n \"symbols\": [\n \"SPY\",\n \"QQQ\"\n ]\n }\n ]\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"newsUpdate"}]}],"bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"accountUpdatesStream"}]},{"id":"receiveError","title":"Error Response","description":"Receive error messages","type":"send","messages":[{"id":"errorResponse","contentType":"application/json","payload":[{"name":"Error","description":"Error response","type":"object","properties":[{"name":"type","type":"string","description":"Top-level message type. Always `response` for errors.","enumValues":["response"],"required":false},{"name":"id","type":"string","description":"Request ID from the message that caused this error, if there was one.","required":false},{"name":"timestamp","type":"string","description":"Time when the server sent this error, in RFC3339 format.","required":false},{"name":"payload","type":"object","description":"Error details returned by the server.","required":false,"properties":[{"name":"status","type":"integer","description":"Status code for the error, such as `400`, `401`, or `403`.","required":false},{"name":"error","type":"string","description":"Human-readable error message","required":false},{"name":"code","type":"string","description":"Machine-readable error code (e.g. MISSING_ACCOUNT_ID, INVALID_TOKEN)","required":false},{"name":"topic","type":"string","description":"Topic that caused the error (for subscription errors)","required":false}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","description":"Error response from server.","properties":{"type":{"type":"string","enum":["response"],"description":"Top-level message type. Always `response` for errors.","x-parser-schema-id":"\u003canonymous-schema-251>"},"id":{"type":"string","description":"Request ID from the message that caused this error, if there was one.","x-parser-schema-id":"\u003canonymous-schema-252>"},"timestamp":{"type":"string","description":"Time when the server sent this error, in RFC3339 format.","x-parser-schema-id":"\u003canonymous-schema-253>"},"payload":{"type":"object","description":"Error details returned by the server.","properties":{"status":{"type":"integer","description":"Status code for the error, such as `400`, `401`, or `403`.","x-parser-schema-id":"\u003canonymous-schema-255>"},"error":{"type":"string","description":"Human-readable error message","x-parser-schema-id":"\u003canonymous-schema-256>"},"code":{"type":"string","description":"Machine-readable error code (e.g. MISSING_ACCOUNT_ID, INVALID_TOKEN)","x-parser-schema-id":"\u003canonymous-schema-257>"},"topic":{"type":"string","description":"Topic that caused the error (for subscription errors)","x-parser-schema-id":"\u003canonymous-schema-258>"}},"x-parser-schema-id":"\u003canonymous-schema-254>"}},"x-parser-schema-id":"ErrorResponsePayload"},"title":"Error","description":"Error response","example":"{\n \"type\": \"response\",\n \"id\": \"req-002\",\n \"timestamp\": \"2024-01-15T10:30:00Z\",\n \"payload\": {\n \"status\": 400,\n \"error\": \"accountId is required\",\n \"code\": \"MISSING_ACCOUNT_ID\"\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"errorResponse"}]}],"bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"accountUpdatesStream"}]},{"id":"receiveAuthSuccess","title":"Auth success","description":"Successful authentication response","type":"send","messages":[{"id":"authSuccess","contentType":"application/json","payload":[{"name":"Authentication Success","description":"Authentication succeeded","type":"object","properties":[{"name":"type","type":"string","description":"The server sets this to `event` for auth status messages.","enumValues":["event"],"required":false},{"name":"payload","type":"object","required":false,"properties":[{"name":"action","type":"string","description":"Sign-in result or sign-in status. `authSuccess` means you can start subscribing. `authError` means the token was rejected. The other values are sent by the server as the connection ages.","enumValues":["authSuccess","authError","authTimeout","authExpired","refreshAuth"],"required":false},{"name":"data","type":"object","description":"Action-specific data","required":false},{"name":"id","type":"string","description":"Request ID from your client message, or `system` if this event was sent by the server on its own.","required":false},{"name":"timestamp","type":"integer","description":"Unix timestamp in milliseconds","required":false}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","description":"Server message about sign-in status.","properties":{"type":{"type":"string","enum":["event"],"description":"The server sets this to `event` for auth status messages.","x-parser-schema-id":"\u003canonymous-schema-8>"},"payload":{"type":"object","properties":{"action":{"type":"string","enum":["authSuccess","authError","authTimeout","authExpired","refreshAuth"],"description":"Sign-in result or sign-in status. `authSuccess` means you can start subscribing. `authError` means the token was rejected. The other values are sent by the server as the connection ages.","x-parser-schema-id":"\u003canonymous-schema-10>"},"data":{"type":"object","description":"Action-specific data","x-parser-schema-id":"\u003canonymous-schema-11>"},"id":{"type":"string","description":"Request ID from your client message, or `system` if this event was sent by the server on its own.","x-parser-schema-id":"\u003canonymous-schema-12>"},"timestamp":{"type":"integer","description":"Unix timestamp in milliseconds","x-parser-schema-id":"\u003canonymous-schema-13>"}},"x-parser-schema-id":"\u003canonymous-schema-9>"}},"x-parser-schema-id":"AuthEventPayload"},"title":"Authentication Success","description":"Authentication succeeded","example":"{\n \"type\": \"event\",\n \"payload\": {\n \"action\": \"authSuccess\",\n \"data\": {\n \"expiresIn\": 3900000\n },\n \"id\": \"auth-001\",\n \"timestamp\": 1703001234567\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"authSuccess"}]}],"bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"accountUpdatesStream"}]},{"id":"receiveAuthTimeout","title":"Auth timeout","description":"Authentication window expired","type":"send","messages":[{"id":"authTimeout","contentType":"application/json","payload":[{"name":"Authentication Timeout","description":"Authentication timed out","type":"object","properties":[{"name":"type","type":"string","description":"The server sets this to `event` for auth status messages.","enumValues":["event"],"required":false},{"name":"payload","type":"object","required":false,"properties":[{"name":"action","type":"string","description":"Sign-in result or sign-in status. `authSuccess` means you can start subscribing. `authError` means the token was rejected. The other values are sent by the server as the connection ages.","enumValues":["authSuccess","authError","authTimeout","authExpired","refreshAuth"],"required":false},{"name":"data","type":"object","description":"Action-specific data","required":false},{"name":"id","type":"string","description":"Request ID from your client message, or `system` if this event was sent by the server on its own.","required":false},{"name":"timestamp","type":"integer","description":"Unix timestamp in milliseconds","required":false}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","description":"Server message about sign-in status.","properties":{"type":{"type":"string","enum":["event"],"description":"The server sets this to `event` for auth status messages.","x-parser-schema-id":"\u003canonymous-schema-8>"},"payload":{"type":"object","properties":{"action":{"type":"string","enum":["authSuccess","authError","authTimeout","authExpired","refreshAuth"],"description":"Sign-in result or sign-in status. `authSuccess` means you can start subscribing. `authError` means the token was rejected. The other values are sent by the server as the connection ages.","x-parser-schema-id":"\u003canonymous-schema-10>"},"data":{"type":"object","description":"Action-specific data","x-parser-schema-id":"\u003canonymous-schema-11>"},"id":{"type":"string","description":"Request ID from your client message, or `system` if this event was sent by the server on its own.","x-parser-schema-id":"\u003canonymous-schema-12>"},"timestamp":{"type":"integer","description":"Unix timestamp in milliseconds","x-parser-schema-id":"\u003canonymous-schema-13>"}},"x-parser-schema-id":"\u003canonymous-schema-9>"}},"x-parser-schema-id":"AuthEventPayload"},"title":"Authentication Timeout","description":"Authentication timed out","example":"{\n \"type\": \"event\",\n \"payload\": {\n \"action\": \"authTimeout\",\n \"data\": {\n \"error\": \"authentication timeout\"\n },\n \"id\": \"system\",\n \"timestamp\": 1703001234567\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"authTimeout"}]}],"bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"accountUpdatesStream"}]},{"id":"receiveSubscribed","title":"Subscribed confirmation","description":"Subscription confirmed with optional snapshot","type":"send","messages":[{"id":"subscribedResponse","contentType":"application/json","payload":[{"name":"Subscribed","description":"Subscription confirmed with snapshot","type":"object","properties":[{"name":"type","type":"string","description":"Message type. Always `subscribed` (ack from server).","enumValues":["subscribed"],"required":false},{"name":"id","type":"string","description":"Request ID from your subscribe message.","required":false},{"name":"timestamp","type":"string","description":"Time when the server sent this reply, in RFC3339 format.","required":false},{"name":"payload","type":"object","required":false,"properties":[{"name":"status","type":"integer","description":"Status code for the subscribe request. `200` means success.","required":false},{"name":"topic","type":"string","description":"Subscription topic","enumValues":["account","pnl","watchlist","news"],"required":false},{"name":"params","type":"object","description":"Echo of subscription params","required":false},{"name":"data","type":"oneOf","description":"Snapshot data for the subscribed topic.","required":false,"properties":[{"name":"account","type":"object","description":"Merged account and balance snapshot delivered after you subscribe to the `account` topic.","required":true,"properties":[{"name":"accountNumber","type":"string","description":"Sterling account ID.","required":false},{"name":"accountType","type":"string","required":false},{"name":"accountClass","type":"string","required":false},{"name":"optionsLevel","type":"string","required":false},{"name":"cashAvailable","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"netLiquidity","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"marginEquity","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"maintenanceExcess","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"accruedCash","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"exchangeSurplus","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"sma","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"maintReq","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"sodPositionsMarketValue","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"netBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"stockBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"dayTradeBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"optionBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"dayTradeOvernightRegTBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"totalEquity","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"settledFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"unsettledFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"heldBackFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"grossMargin","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"pendingOrdersMarginRequirements","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"realizedPL","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"unRealizedPL","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"pendingOrdersCount","type":"integer","description":"Number of pending orders.","required":false},{"name":"credit","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"creditRemaining","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"smaCreditRemaining","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"pdtCreditRemaining","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"startOfDayCash","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"valueBought","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"valueSold","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"sodTtlEquity","type":"string","description":"Optional start-of-day total equity.","required":false},{"name":"sodTtlEquityUpdatedAt","type":"string","description":"Optional timestamp for sodTtlEquity.","required":false},{"name":"isOptionLevelEnable","type":"boolean","description":"Whether options level is enabled for the account.","required":false},{"name":"amountAvailableToWithdraw","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"fullyPaidUnsettledFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"shortSellingEnabled","type":"boolean","description":"Whether the account is approved to sell short.","required":false},{"name":"intradayMarginBalance","type":"string","description":"Current intraday margin balance. Decimal value serialized as a string.","required":false},{"name":"sodMarginTradeBalance","type":"string","description":"Start-of-day margin trade balance. Decimal value serialized as a string.","required":false},{"name":"sodGrossFundsAvailable","type":"string","description":"Start-of-day funds available before holds and requirements. Decimal value serialized as a string.","required":false},{"name":"sodNetFundsAvailable","type":"string","description":"Start-of-day funds available after holds and requirements. Decimal value serialized as a string.","required":false},{"name":"sodFundsAvailableDate","type":"string","description":"Settlement date the start-of-day funds-available values apply to, in YYYY-MM-DD format.","required":false},{"name":"freestockUnsettleBalance","type":"string","description":"Unsettled balance attributable to free-stock awards. Decimal value serialized as a string.","required":false}]},{"name":"positions","type":"array","required":true,"properties":[{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"symbol","type":"string","description":"Equity or OCC option symbol.","required":false},{"name":"securityType","type":"string","description":"Security type, for example EQUITY or OPTION.","required":false},{"name":"qty","type":"string","description":"Position quantity serialized as a string.","required":false},{"name":"avgPrice","type":"string","description":"Average position price serialized as a string.","required":false},{"name":"avgCost","type":"string","description":"Backward-compatible alias of avgPrice.","required":false},{"name":"unRealizedPL","type":"string","description":"Unrealized P\u0026L serialized as a string.","required":false},{"name":"todayRealizedPnL","type":"string","description":"Today realized P\u0026L serialized as a string.","required":false},{"name":"mtmRealizedPnL","type":"string","description":"Mark-to-market realized P\u0026L measured against the previous close, serialized as a string.","required":false},{"name":"realizedPL","type":"string","description":"Backward-compatible alias of todayRealizedPnL.","required":false},{"name":"todayPL","type":"string","description":"Today total P\u0026L serialized as a string.","required":false},{"name":"instrument","type":"string","description":"Backward-compatible alias of securityType.","required":false},{"name":"putCall","type":"string","description":"CALL or PUT for options.","required":false},{"name":"strikePrice","type":"string","description":"Option strike price serialized as a string.","required":false},{"name":"maturity","type":"string","description":"Option maturity date in YYYY-MM-DD format.","required":false},{"name":"flags","type":"integer","description":"Position flags.","required":false},{"name":"createdAt","type":"string","description":"Creation timestamp.","required":false},{"name":"updatedAt","type":"string","description":"Last update timestamp.","required":false}]},{"name":"ordersV2","type":"array","description":"Orders v2 cache snapshot. Empty array when no orders are cached.","required":true,"properties":[{"name":"clOrdId","type":"string","description":"Client order ID.","required":false},{"name":"ordId","type":"string","description":"Broker/order ID.","required":false},{"name":"origClOrdId","type":"string","description":"Original client order ID for replaces/cancels.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"clientId","type":"string","description":"Client/user ID.","required":false},{"name":"symbol","type":"string","description":"Trading symbol.","required":false},{"name":"side","type":"string","description":"Order side, for example BUY or SELL.","required":false},{"name":"type","type":"string","description":"Order type, for example LIMIT or MARKET.","required":false},{"name":"timeInForce","type":"string","description":"Time in force, for example DAY.","required":false},{"name":"qty","type":"string","description":"Order quantity serialized as a string.","required":false},{"name":"price","type":"string","description":"Limit price serialized as a string.","required":false},{"name":"stopPrice","type":"string","description":"Stop price serialized as a string.","required":false},{"name":"ordStatus","type":"string","description":"Order status.","enumValues":["NEW","PARTIALLY_FILLED","FILLED","DONE_FOR_DAY","CANCELED","REPLACED","PENDING_CANCEL","STOPPED","REJECTED","SUSPENDED","PENDING_NEW","CALCULATED","EXPIRED","ACCEPTED_FOR_BID","PENDING_REPLACE"],"required":false},{"name":"cumQty","type":"string","description":"Cumulative filled quantity serialized as a string.","required":false},{"name":"leavesQty","type":"string","description":"Remaining open quantity serialized as a string.","required":false},{"name":"avgPrice","type":"string","description":"Average execution price serialized as a string.","required":false},{"name":"currency","type":"string","description":"Currency code.","required":false},{"name":"exDestination","type":"string","description":"Execution destination, for example MNGDFTE or MNGD.","required":false},{"name":"text","type":"string","description":"Broker or venue message.","required":false},{"name":"ordRejReason","type":"string","description":"Order reject reason when present.","required":false},{"name":"securityType","type":"string","description":"Security type, for example EQUITY or OPTION.","required":false},{"name":"category","type":"string","description":"Order category, for example EQUITY, SINGLE_LEG, or MULTI_LEG.","required":false},{"name":"legs","type":"array","required":false,"properties":[{"name":"symbol","type":"string","description":"Underlying or option symbol.","required":false},{"name":"side","type":"string","description":"Order side, for example BUY or SELL.","required":false},{"name":"ratioQty","type":"string","description":"Leg ratio quantity serialized as a string.","required":false},{"name":"securityType","type":"string","description":"Security type, for example OPTION.","required":false},{"name":"maturity","type":"string","description":"Option maturity date in YYYY-MM-DD format.","required":false},{"name":"strikePrice","type":"string","description":"Option strike price serialized as a string.","required":false},{"name":"positionEffect","type":"string","description":"Position effect, for example OPEN or CLOSE.","required":false},{"name":"putCall","type":"string","description":"Option side, CALL or PUT.","required":false},{"name":"avgPrice","type":"string","description":"Average fill price for the leg, serialized as a string.","required":false}]},{"name":"execId","type":"string","description":"Execution ID for fill events.","required":false},{"name":"execType","type":"string","description":"Execution type, for example NEW, FILL, PARTIAL_FILL, or REJECTED.","required":false},{"name":"lastPx","type":"string","description":"Last execution price serialized as a string.","required":false},{"name":"lastQty","type":"string","description":"Last execution quantity serialized as a string.","required":false},{"name":"maturity","type":"string","description":"Flat option maturity when sent on single-leg option orders.","required":false},{"name":"putCall","type":"string","description":"Flat option side, CALL or PUT.","required":false},{"name":"strikePrice","type":"string","description":"Flat option strike price serialized as a string.","required":false},{"name":"positionEffect","type":"string","description":"Flat option position effect.","required":false},{"name":"createdAt","type":"string","description":"Creation timestamp.","required":false},{"name":"updatedAt","type":"string","description":"Last update timestamp.","required":false}]},{"name":"error","type":"string","description":"Optional partial snapshot error, for example failed to fetch: positions.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"interval","type":"string","description":"Candle interval.","required":false},{"name":"t","type":"array","description":"Unix timestamps in seconds.","required":false,"properties":[{"name":"item","type":"integer","required":false}]},{"name":"c","type":"array","description":"Close/equity values.","required":false,"properties":[{"name":"item","type":"number","required":false}]},{"name":"id","type":"integer","description":"Watchlist ID.","required":false},{"name":"name","type":"string","description":"User-facing watchlist name.","required":false},{"name":"symbols","type":"array","description":"Symbols currently saved in the watchlist.","required":false,"properties":[{"name":"item","type":"string","required":false}]},{"name":"id","type":"integer","description":"Unique news ID.","required":false},{"name":"title","type":"string","description":"Article title.","required":false},{"name":"news_type","type":"string","description":"News type, for example news or press_release.","required":false},{"name":"symbols","type":"array","description":"Related symbols.","required":false,"properties":[{"name":"item","type":"string","required":false}]},{"name":"authors","type":"array","description":"Article authors.","required":false,"properties":[{"name":"item","type":"string","required":false}]},{"name":"timestamp","type":"string","description":"Publication timestamp.","required":false},{"name":"body","type":"string","description":"Full article content when available.","required":false},{"name":"action","type":"string","description":"Action string when available.","required":false}]}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","description":"Subscribed confirmation message from server.","properties":{"type":{"type":"string","enum":["subscribed"],"description":"Message type. Always `subscribed` (ack from server).","x-parser-schema-id":"\u003canonymous-schema-31>"},"id":{"type":"string","description":"Request ID from your subscribe message.","x-parser-schema-id":"\u003canonymous-schema-32>"},"timestamp":{"type":"string","description":"Time when the server sent this reply, in RFC3339 format.","x-parser-schema-id":"\u003canonymous-schema-33>"},"payload":{"type":"object","properties":{"status":{"type":"integer","description":"Status code for the subscribe request. `200` means success.","x-parser-schema-id":"\u003canonymous-schema-35>"},"topic":{"type":"string","enum":["account","pnl","watchlist","news"],"description":"Subscription topic","x-parser-schema-id":"\u003canonymous-schema-36>"},"params":{"type":"object","description":"Echo of subscription params","x-parser-schema-id":"\u003canonymous-schema-37>"},"data":{"oneOf":[{"type":"object","description":"Initial account snapshot returned with account subscriptions.","required":["account","positions","ordersV2"],"properties":{"account":{"type":"object","description":"Merged account and balance snapshot delivered after you subscribe to the `account` topic.","properties":{"accountNumber":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-39>"},"accountType":{"type":"string","x-parser-schema-id":"\u003canonymous-schema-40>"},"accountClass":{"type":"string","x-parser-schema-id":"\u003canonymous-schema-41>"},"optionsLevel":{"type":"string","x-parser-schema-id":"\u003canonymous-schema-42>"},"cashAvailable":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-43>"},"netLiquidity":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-44>"},"marginEquity":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-45>"},"maintenanceExcess":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-46>"},"accruedCash":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-47>"},"exchangeSurplus":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-48>"},"sma":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-49>"},"maintReq":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-50>"},"sodPositionsMarketValue":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-51>"},"netBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-52>"},"stockBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-53>"},"dayTradeBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-54>"},"optionBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-55>"},"dayTradeOvernightRegTBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-56>"},"totalEquity":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-57>"},"settledFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-58>"},"unsettledFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-59>"},"heldBackFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-60>"},"grossMargin":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-61>"},"pendingOrdersMarginRequirements":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-62>"},"realizedPL":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-63>"},"unRealizedPL":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-64>"},"pendingOrdersCount":{"type":"integer","description":"Number of pending orders.","x-parser-schema-id":"\u003canonymous-schema-65>"},"credit":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-66>"},"creditRemaining":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-67>"},"smaCreditRemaining":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-68>"},"pdtCreditRemaining":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-69>"},"startOfDayCash":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-70>"},"valueBought":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-71>"},"valueSold":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-72>"},"sodTtlEquity":{"type":"string","description":"Optional start-of-day total equity.","x-parser-schema-id":"\u003canonymous-schema-73>"},"sodTtlEquityUpdatedAt":{"type":"string","format":"date-time","description":"Optional timestamp for sodTtlEquity.","x-parser-schema-id":"\u003canonymous-schema-74>"},"isOptionLevelEnable":{"type":"boolean","description":"Whether options level is enabled for the account.","x-parser-schema-id":"\u003canonymous-schema-75>"},"amountAvailableToWithdraw":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-76>"},"fullyPaidUnsettledFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-77>"},"shortSellingEnabled":{"type":"boolean","description":"Whether the account is approved to sell short.","x-parser-schema-id":"\u003canonymous-schema-78>"},"intradayMarginBalance":{"type":"string","description":"Current intraday margin balance. Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-79>"},"sodMarginTradeBalance":{"type":"string","description":"Start-of-day margin trade balance. Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-80>"},"sodGrossFundsAvailable":{"type":"string","description":"Start-of-day funds available before holds and requirements. Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-81>"},"sodNetFundsAvailable":{"type":"string","description":"Start-of-day funds available after holds and requirements. Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-82>"},"sodFundsAvailableDate":{"type":"string","format":"date","description":"Settlement date the start-of-day funds-available values apply to, in YYYY-MM-DD format.","x-parser-schema-id":"\u003canonymous-schema-83>"},"freestockUnsettleBalance":{"type":"string","description":"Unsettled balance attributable to free-stock awards. Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-84>"}},"x-parser-schema-id":"AccountSnapshotAccount"},"positions":{"type":"array","items":{"type":"object","description":"Position update from the server. Decimal numbers are sent as strings.","properties":{"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-86>"},"symbol":{"type":"string","description":"Equity or OCC option symbol.","x-parser-schema-id":"\u003canonymous-schema-87>"},"securityType":{"type":"string","description":"Security type, for example EQUITY or OPTION.","x-parser-schema-id":"\u003canonymous-schema-88>"},"qty":{"type":"string","description":"Position quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-89>"},"avgPrice":{"type":"string","description":"Average position price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-90>"},"avgCost":{"type":"string","description":"Backward-compatible alias of avgPrice.","x-parser-schema-id":"\u003canonymous-schema-91>"},"unRealizedPL":{"type":"string","description":"Unrealized P\u0026L serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-92>"},"todayRealizedPnL":{"type":"string","description":"Today realized P\u0026L serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-93>"},"mtmRealizedPnL":{"type":"string","description":"Mark-to-market realized P\u0026L measured against the previous close, serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-94>"},"realizedPL":{"type":"string","description":"Backward-compatible alias of todayRealizedPnL.","x-parser-schema-id":"\u003canonymous-schema-95>"},"todayPL":{"type":"string","description":"Today total P\u0026L serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-96>"},"instrument":{"type":"string","description":"Backward-compatible alias of securityType.","x-parser-schema-id":"\u003canonymous-schema-97>"},"putCall":{"type":"string","description":"CALL or PUT for options.","x-parser-schema-id":"\u003canonymous-schema-98>"},"strikePrice":{"type":"string","description":"Option strike price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-99>"},"maturity":{"type":"string","description":"Option maturity date in YYYY-MM-DD format.","x-parser-schema-id":"\u003canonymous-schema-100>"},"flags":{"type":"integer","description":"Position flags.","x-parser-schema-id":"\u003canonymous-schema-101>"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp.","x-parser-schema-id":"\u003canonymous-schema-102>"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp.","x-parser-schema-id":"\u003canonymous-schema-103>"}},"x-parser-schema-id":"PositionData"},"x-parser-schema-id":"\u003canonymous-schema-85>"},"ordersV2":{"type":"array","items":{"type":"object","description":"Order update from the server. This includes the order plus fill details when the order changes.","properties":{"clOrdId":{"type":"string","description":"Client order ID.","x-parser-schema-id":"\u003canonymous-schema-105>"},"ordId":{"type":"string","description":"Broker/order ID.","x-parser-schema-id":"\u003canonymous-schema-106>"},"origClOrdId":{"type":"string","description":"Original client order ID for replaces/cancels.","x-parser-schema-id":"\u003canonymous-schema-107>"},"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-108>"},"clientId":{"type":"string","description":"Client/user ID.","x-parser-schema-id":"\u003canonymous-schema-109>"},"symbol":{"type":"string","description":"Trading symbol.","x-parser-schema-id":"\u003canonymous-schema-110>"},"side":{"type":"string","description":"Order side, for example BUY or SELL.","x-parser-schema-id":"\u003canonymous-schema-111>"},"type":{"type":"string","description":"Order type, for example LIMIT or MARKET.","x-parser-schema-id":"\u003canonymous-schema-112>"},"timeInForce":{"type":"string","description":"Time in force, for example DAY.","x-parser-schema-id":"\u003canonymous-schema-113>"},"qty":{"type":"string","description":"Order quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-114>"},"price":{"type":"string","description":"Limit price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-115>"},"stopPrice":{"type":"string","description":"Stop price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-116>"},"ordStatus":{"type":"string","enum":["NEW","PARTIALLY_FILLED","FILLED","DONE_FOR_DAY","CANCELED","REPLACED","PENDING_CANCEL","STOPPED","REJECTED","SUSPENDED","PENDING_NEW","CALCULATED","EXPIRED","ACCEPTED_FOR_BID","PENDING_REPLACE"],"description":"Order status.","x-parser-schema-id":"\u003canonymous-schema-117>"},"cumQty":{"type":"string","description":"Cumulative filled quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-118>"},"leavesQty":{"type":"string","description":"Remaining open quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-119>"},"avgPrice":{"type":"string","description":"Average execution price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-120>"},"currency":{"type":"string","description":"Currency code.","x-parser-schema-id":"\u003canonymous-schema-121>"},"exDestination":{"type":"string","description":"Execution destination, for example MNGDFTE or MNGD.","x-parser-schema-id":"\u003canonymous-schema-122>"},"text":{"type":"string","description":"Broker or venue message.","x-parser-schema-id":"\u003canonymous-schema-123>"},"ordRejReason":{"type":"string","description":"Order reject reason when present.","x-parser-schema-id":"\u003canonymous-schema-124>"},"securityType":{"type":"string","description":"Security type, for example EQUITY or OPTION.","x-parser-schema-id":"\u003canonymous-schema-125>"},"category":{"type":"string","description":"Order category, for example EQUITY, SINGLE_LEG, or MULTI_LEG.","x-parser-schema-id":"\u003canonymous-schema-126>"},"legs":{"type":"array","items":{"type":"object","description":"One option leg in an order update.","properties":{"symbol":{"type":"string","description":"Underlying or option symbol.","x-parser-schema-id":"\u003canonymous-schema-128>"},"side":{"type":"string","description":"Order side, for example BUY or SELL.","x-parser-schema-id":"\u003canonymous-schema-129>"},"ratioQty":{"type":"string","description":"Leg ratio quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-130>"},"securityType":{"type":"string","description":"Security type, for example OPTION.","x-parser-schema-id":"\u003canonymous-schema-131>"},"maturity":{"type":"string","description":"Option maturity date in YYYY-MM-DD format.","x-parser-schema-id":"\u003canonymous-schema-132>"},"strikePrice":{"type":"string","description":"Option strike price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-133>"},"positionEffect":{"type":"string","description":"Position effect, for example OPEN or CLOSE.","x-parser-schema-id":"\u003canonymous-schema-134>"},"putCall":{"type":"string","description":"Option side, CALL or PUT.","x-parser-schema-id":"\u003canonymous-schema-135>"},"avgPrice":{"type":"string","description":"Average fill price for the leg, serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-136>"}},"x-parser-schema-id":"AccountOrderLeg"},"x-parser-schema-id":"\u003canonymous-schema-127>"},"execId":{"type":"string","description":"Execution ID for fill events.","x-parser-schema-id":"\u003canonymous-schema-137>"},"execType":{"type":"string","description":"Execution type, for example NEW, FILL, PARTIAL_FILL, or REJECTED.","x-parser-schema-id":"\u003canonymous-schema-138>"},"lastPx":{"type":"string","description":"Last execution price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-139>"},"lastQty":{"type":"string","description":"Last execution quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-140>"},"maturity":{"type":"string","description":"Flat option maturity when sent on single-leg option orders.","x-parser-schema-id":"\u003canonymous-schema-141>"},"putCall":{"type":"string","description":"Flat option side, CALL or PUT.","x-parser-schema-id":"\u003canonymous-schema-142>"},"strikePrice":{"type":"string","description":"Flat option strike price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-143>"},"positionEffect":{"type":"string","description":"Flat option position effect.","x-parser-schema-id":"\u003canonymous-schema-144>"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp.","x-parser-schema-id":"\u003canonymous-schema-145>"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp.","x-parser-schema-id":"\u003canonymous-schema-146>"}},"x-parser-schema-id":"OrderData"},"description":"Orders v2 cache snapshot. Empty array when no orders are cached.","x-parser-schema-id":"\u003canonymous-schema-104>"},"error":{"type":"string","description":"Optional partial snapshot error, for example failed to fetch: positions.","x-parser-schema-id":"\u003canonymous-schema-147>"}},"x-parser-schema-id":"AccountSnapshotData"},{"type":"object","description":"Profit and loss chart data. This includes timestamp, close, and equity arrays.","properties":{"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-148>"},"interval":{"type":"string","description":"Candle interval.","x-parser-schema-id":"\u003canonymous-schema-149>"},"t":{"type":"array","items":{"type":"integer","x-parser-schema-id":"\u003canonymous-schema-151>"},"description":"Unix timestamps in seconds.","x-parser-schema-id":"\u003canonymous-schema-150>"},"c":{"type":"array","items":{"type":"number","x-parser-schema-id":"\u003canonymous-schema-153>"},"description":"Close/equity values.","x-parser-schema-id":"\u003canonymous-schema-152>"}},"x-parser-schema-id":"PnLCandleData"},{"type":"array","description":"Current watchlists for the signed-in user. The same list shape is used in the first subscribe reply and later watchlist events.","items":{"type":"object","description":"One saved watchlist from shared/domains/watchlist.Watchlist.","properties":{"id":{"type":"integer","description":"Watchlist ID.","x-parser-schema-id":"\u003canonymous-schema-154>"},"name":{"type":"string","description":"User-facing watchlist name.","x-parser-schema-id":"\u003canonymous-schema-155>"},"symbols":{"type":"array","items":{"type":"string","x-parser-schema-id":"\u003canonymous-schema-157>"},"description":"Symbols currently saved in the watchlist.","x-parser-schema-id":"\u003canonymous-schema-156>"}},"x-parser-schema-id":"WatchlistEntry"},"x-parser-schema-id":"WatchlistSnapshotData"},{"type":"array","description":"Initial news snapshot returned after a news subscription succeeds.","items":{"type":"object","description":"One news item.","properties":{"id":{"type":"integer","description":"Unique news ID.","x-parser-schema-id":"\u003canonymous-schema-158>"},"title":{"type":"string","description":"Article title.","x-parser-schema-id":"\u003canonymous-schema-159>"},"news_type":{"type":"string","description":"News type, for example news or press_release.","x-parser-schema-id":"\u003canonymous-schema-160>"},"symbols":{"type":"array","items":{"type":"string","x-parser-schema-id":"\u003canonymous-schema-162>"},"description":"Related symbols.","x-parser-schema-id":"\u003canonymous-schema-161>"},"authors":{"type":"array","items":{"type":"string","x-parser-schema-id":"\u003canonymous-schema-164>"},"description":"Article authors.","x-parser-schema-id":"\u003canonymous-schema-163>"},"timestamp":{"type":"string","format":"date-time","description":"Publication timestamp.","x-parser-schema-id":"\u003canonymous-schema-165>"},"body":{"type":"string","description":"Full article content when available.","x-parser-schema-id":"\u003canonymous-schema-166>"},"action":{"type":"string","description":"Action string when available.","x-parser-schema-id":"\u003canonymous-schema-167>"}},"x-parser-schema-id":"NewsItem"},"x-parser-schema-id":"NewsSnapshotData"}],"description":"Snapshot data for the subscribed topic.","x-parser-schema-id":"\u003canonymous-schema-38>"}},"x-parser-schema-id":"\u003canonymous-schema-34>"}},"x-parser-schema-id":"SubscribedResponsePayload"},"title":"Subscribed","description":"Subscription confirmed with snapshot","example":"{\n \"type\": \"subscribed\",\n \"id\": \"req-002\",\n \"timestamp\": \"2024-01-15T10:30:00Z\",\n \"payload\": {\n \"status\": 200,\n \"topic\": \"account\",\n \"params\": {\n \"accountId\": \"ACC123456\"\n },\n \"data\": {\n \"account\": {\n \"accountNumber\": \"ACC123456\",\n \"accountType\": \"MARGIN\",\n \"accountClass\": \"INDIVIDUAL\",\n \"optionsLevel\": \"LEVEL_3\",\n \"cashAvailable\": \"25155.00\",\n \"netLiquidity\": \"50155.00\",\n \"marginEquity\": \"50155.00\",\n \"maintenanceExcess\": \"17508.50\",\n \"sma\": \"25155.00\",\n \"maintReq\": \"7646.50\",\n \"netBuyingPower\": \"25155.00\",\n \"stockBuyingPower\": \"50310.00\",\n \"dayTradeBuyingPower\": \"100620.00\",\n \"optionBuyingPower\": \"25155.00\",\n \"totalEquity\": \"50155.00\",\n \"pendingOrdersCount\": 0,\n \"isOptionLevelEnable\": true,\n \"shortSellingEnabled\": false,\n \"sodTtlEquity\": \"50000.00\",\n \"sodTtlEquityUpdatedAt\": \"2024-01-15T11:00:02Z\",\n \"intradayMarginBalance\": \"25155.00\",\n \"sodMarginTradeBalance\": \"-25155.00\",\n \"sodGrossFundsAvailable\": \"25155.00\",\n \"sodNetFundsAvailable\": \"25155.00\",\n \"sodFundsAvailableDate\": \"2024-01-12\",\n \"freestockUnsettleBalance\": \"0\"\n },\n \"positions\": [],\n \"ordersV2\": []\n }\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"subscribedResponse"}]}],"bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"accountUpdatesStream"}]},{"id":"receiveUnsubscribeResponse","title":"Unsubscribe confirmation","description":"Unsubscribe acknowledged","type":"send","messages":[{"id":"unsubscribeResponse","contentType":"application/json","payload":[{"name":"Unsubscription Confirmed","description":"Server confirms unsubscription","type":"object","properties":[{"name":"type","type":"string","description":"Top-level message type. Always `response` for this ack.","enumValues":["response"],"required":false},{"name":"id","type":"string","description":"Request ID from your unsubscribe message.","required":false},{"name":"timestamp","type":"string","description":"Time when the server sent this reply, in RFC3339 format.","required":false},{"name":"payload","type":"object","description":"Status and optional data for the unsubscribe result.","required":false,"properties":[{"name":"status","type":"integer","description":"Status code for the unsubscribe request. `200` means success.","required":false},{"name":"data","type":"object","required":false,"properties":[{"name":"unsubscribed","type":"boolean","required":false},{"name":"topic","type":"string","required":false},{"name":"accountId","type":"string","required":false}]}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","description":"Unsubscribe confirmation from server.","properties":{"type":{"type":"string","enum":["response"],"description":"Top-level message type. Always `response` for this ack.","x-parser-schema-id":"\u003canonymous-schema-175>"},"id":{"type":"string","description":"Request ID from your unsubscribe message.","x-parser-schema-id":"\u003canonymous-schema-176>"},"timestamp":{"type":"string","description":"Time when the server sent this reply, in RFC3339 format.","x-parser-schema-id":"\u003canonymous-schema-177>"},"payload":{"type":"object","description":"Status and optional data for the unsubscribe result.","properties":{"status":{"type":"integer","description":"Status code for the unsubscribe request. `200` means success.","x-parser-schema-id":"\u003canonymous-schema-179>"},"data":{"type":"object","properties":{"unsubscribed":{"type":"boolean","x-parser-schema-id":"\u003canonymous-schema-181>"},"topic":{"type":"string","x-parser-schema-id":"\u003canonymous-schema-182>"},"accountId":{"type":"string","x-parser-schema-id":"\u003canonymous-schema-183>"}},"x-parser-schema-id":"\u003canonymous-schema-180>"}},"x-parser-schema-id":"\u003canonymous-schema-178>"}},"x-parser-schema-id":"UnsubscribeResponsePayload"},"title":"Unsubscription Confirmed","description":"Server confirms unsubscription","example":"{\n \"type\": \"response\",\n \"id\": \"req-006\",\n \"timestamp\": \"2024-01-15T10:30:00Z\",\n \"payload\": {\n \"status\": 200,\n \"data\": {\n \"unsubscribed\": true,\n \"topic\": \"account\",\n \"accountId\": \"ACC123456\"\n }\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"unsubscribeResponse"}]}],"bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"accountUpdatesStream"}]},{"id":"receivePong","title":"Pong","description":"Ping response","type":"send","messages":[{"id":"pongResponse","contentType":"application/json","payload":[{"name":"Pong","description":"Keep-alive pong response","type":"object","properties":[{"name":"type","type":"string","description":"Message type. Always `pong` (reply to ping).","enumValues":["pong"],"required":false},{"name":"id","type":"string","description":"Request ID copied from your ping, if you sent one.","required":false},{"name":"timestamp","type":"string","description":"Time when the server sent this `pong`, in RFC3339 format.","required":false}]}],"headers":[],"jsonPayloadSchema":{"type":"object","description":"Pong response from server.","properties":{"type":{"type":"string","enum":["pong"],"description":"Message type. Always `pong` (reply to ping).","x-parser-schema-id":"\u003canonymous-schema-16>"},"id":{"type":"string","description":"Request ID copied from your ping, if you sent one.","x-parser-schema-id":"\u003canonymous-schema-17>"},"timestamp":{"type":"string","description":"Time when the server sent this `pong`, in RFC3339 format.","x-parser-schema-id":"\u003canonymous-schema-18>"}},"x-parser-schema-id":"PongPayload"},"title":"Pong","description":"Keep-alive pong response","example":"{\n \"type\": \"pong\",\n \"id\": \"ping-001\",\n \"timestamp\": \"2024-01-15T10:30:00Z\"\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"pongResponse"}]}],"bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"accountUpdatesStream"}]}],"sendMessages":[{"id":"authRequest","contentType":"application/json","payload":[{"name":"Authentication Request","description":"Sign in with an access token","type":"object","properties":[{"name":"type","type":"string","description":"Set this to `request` when you authenticate.","enumValues":["request"],"required":true},{"name":"id","type":"string","description":"Optional. Add your own request ID here if you want it returned in the auth event.","required":false},{"name":"payload","type":"object","description":"Put the auth request details here.","required":true,"properties":[{"name":"method","type":"string","description":"Use `POST` to send the token for authentication.","enumValues":["POST"],"required":true},{"name":"path","type":"string","description":"Always `/auth`.","enumValues":["/auth"],"required":true},{"name":"body","type":"object","description":"JSON body for `POST /auth`. Put the raw access token directly in `body.token`.","required":true,"properties":[{"name":"token","type":"string","description":"Access token for this WebSocket connection.","required":true}]}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","required":["type","payload"],"description":"Sign-in message. Send this first after connecting so the server can open your account-updates connection.","properties":{"type":{"type":"string","enum":["request"],"description":"Set this to `request` when you authenticate.","example":"request","x-parser-schema-id":"\u003canonymous-schema-1>"},"id":{"type":"string","description":"Optional. Add your own request ID here if you want it returned in the auth event.","example":"auth-001","x-parser-schema-id":"\u003canonymous-schema-2>"},"payload":{"type":"object","required":["method","path","body"],"description":"Put the auth request details here.","properties":{"method":{"type":"string","enum":["POST"],"description":"Use `POST` to send the token for authentication.","example":"POST","x-parser-schema-id":"\u003canonymous-schema-4>"},"path":{"type":"string","enum":["/auth"],"description":"Always `/auth`.","example":"/auth","x-parser-schema-id":"\u003canonymous-schema-5>"},"body":{"type":"object","required":["token"],"description":"JSON body for `POST /auth`. Put the raw access token directly in `body.token`.","properties":{"token":{"type":"string","description":"Access token for this WebSocket connection.","example":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...","x-parser-schema-id":"\u003canonymous-schema-7>"}},"example":{"token":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..."},"x-parser-schema-id":"\u003canonymous-schema-6>"}},"example":{"method":"POST","path":"/auth","body":{"token":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..."}},"x-parser-schema-id":"\u003canonymous-schema-3>"}},"x-parser-schema-id":"AuthRequestPayload"},"title":"Authentication Request","description":"Sign in with an access token","example":"{\n \"type\": \"request\",\n \"id\": \"auth-001\",\n \"payload\": {\n \"method\": \"post\",\n \"path\": \"/auth\",\n \"body\": {\n \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\"\n }\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"authRequest"}]},{"id":"subscribeRequest","contentType":"application/json","payload":[{"name":"Subscribe Request","description":"Subscribe to real-time updates","type":"object","properties":[{"name":"type","type":"string","description":"Set this to `subscribe` to start updates for a topic.","enumValues":["subscribe"],"required":true},{"name":"id","type":"string","description":"Optional. Add your own request ID here if you want it returned in the subscribe reply or error.","required":false},{"name":"payload","type":"object","description":"Choose the topic and add any extra values needed for that topic.","required":true,"properties":[{"name":"topic","type":"string","description":"Which updates you want: `account`, `pnl`, `watchlist`, or `news`.","enumValues":["account","pnl","watchlist","news"],"required":true},{"name":"params","type":"object","description":"Extra values for the topic you picked.","required":false,"properties":[{"name":"accountId","type":"string","description":"Trading account ID. Required for account and pnl topics. Do not send this for watchlist. News subscriptions are user-level and do not require it.","required":false},{"name":"interval","type":"string","description":"Candle interval for pnl topic. Optional; defaults to 1m when omitted. Ignored for other topics.","enumValues":["15s","1m","5m","15m","1h","1d","1mo"],"required":false},{"name":"startTime","type":"string","description":"Start time for `pnl` history. Example: `2024-01-01T00:00:00Z`.","required":false},{"name":"symbols","type":"array","description":"Optional symbol filter for news topic. Ignored for account, pnl, and watchlist.","required":false,"properties":[{"name":"item","type":"string","required":false}]},{"name":"topics","type":"array","description":"Optional news topic filter for the first news snapshot. Live pushed news is still filtered by symbol. Ignored for other topics.","required":false,"properties":[{"name":"item","type":"string","required":false}]}]}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","required":["type","payload"],"description":"Use this message to start updates for a topic.","properties":{"type":{"type":"string","enum":["subscribe"],"description":"Set this to `subscribe` to start updates for a topic.","example":"subscribe","x-parser-schema-id":"\u003canonymous-schema-19>"},"id":{"type":"string","description":"Optional. Add your own request ID here if you want it returned in the subscribe reply or error.","example":"req-002","x-parser-schema-id":"\u003canonymous-schema-20>"},"payload":{"type":"object","description":"Choose the topic and add any extra values needed for that topic.","required":["topic"],"properties":{"topic":{"type":"string","enum":["account","pnl","watchlist","news"],"description":"Which updates you want: `account`, `pnl`, `watchlist`, or `news`.","example":"account","x-parser-schema-id":"\u003canonymous-schema-22>"},"params":{"type":"object","description":"Extra values for the topic you picked.","properties":{"accountId":{"type":"string","description":"Trading account ID. Required for account and pnl topics. Do not send this for watchlist. News subscriptions are user-level and do not require it.","example":"ACC123456","x-parser-schema-id":"\u003canonymous-schema-24>"},"interval":{"type":"string","enum":["15s","1m","5m","15m","1h","1d","1mo"],"description":"Candle interval for pnl topic. Optional; defaults to 1m when omitted. Ignored for other topics.","example":"1m","x-parser-schema-id":"\u003canonymous-schema-25>"},"startTime":{"type":"string","format":"date-time","description":"Start time for `pnl` history. Example: `2024-01-01T00:00:00Z`.","example":"2024-01-01T00:00:00Z","x-parser-schema-id":"\u003canonymous-schema-26>"},"symbols":{"type":"array","items":{"type":"string","x-parser-schema-id":"\u003canonymous-schema-28>"},"description":"Optional symbol filter for news topic. Ignored for account, pnl, and watchlist.","example":["AAPL","TSLA"],"x-parser-schema-id":"\u003canonymous-schema-27>"},"topics":{"type":"array","items":{"type":"string","x-parser-schema-id":"\u003canonymous-schema-30>"},"description":"Optional news topic filter for the first news snapshot. Live pushed news is still filtered by symbol. Ignored for other topics.","example":["press_release","news"],"x-parser-schema-id":"\u003canonymous-schema-29>"}},"x-parser-schema-id":"\u003canonymous-schema-23>"}},"example":{"topic":"pnl","params":{"accountId":"ACC123456","interval":"1m","startTime":"2024-01-01T00:00:00Z"}},"x-parser-schema-id":"\u003canonymous-schema-21>"}},"x-parser-schema-id":"SubscribeRequestPayload"},"title":"Subscribe Request","description":"Subscribe to real-time updates","example":"{\n \"type\": \"subscribe\",\n \"id\": \"req-002\",\n \"payload\": {\n \"topic\": \"account\",\n \"params\": {\n \"accountId\": \"ACC123456\"\n }\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"subscribeRequest"}]},{"id":"unsubscribeRequest","contentType":"application/json","payload":[{"name":"Unsubscribe Request","description":"Unsubscribe from updates","type":"object","properties":[{"name":"type","type":"string","description":"Set this to `unsubscribe` to stop updates for a topic.","enumValues":["unsubscribe"],"required":true},{"name":"id","type":"string","description":"Optional. Add your own request ID here if you want it returned in the unsubscribe reply or error.","required":false},{"name":"payload","type":"object","description":"Choose the topic to stop and add any extra values needed for that topic.","required":true,"properties":[{"name":"topic","type":"string","description":"Topic to unsubscribe from. `account` and `pnl` unsubscribes require `params.accountId`. `watchlist` and `news` unsubscribes do not require params.","enumValues":["account","pnl","watchlist","news"],"required":true},{"name":"params","type":"object","description":"Extra values for the topic you want to stop.","required":false,"properties":[{"name":"accountId","type":"string","description":"Trading account ID. Required for account and pnl unsubscribe requests. Do not send for watchlist or news.","required":false},{"name":"interval","type":"string","description":"For `pnl`, which interval to stop. If you leave this empty, the server uses `1m`.","enumValues":["15s","1m","5m","15m","1h","1d","1mo"],"required":false}]}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","required":["type","payload"],"description":"Use this message to stop updates for one topic.","properties":{"type":{"type":"string","enum":["unsubscribe"],"description":"Set this to `unsubscribe` to stop updates for a topic.","example":"unsubscribe","x-parser-schema-id":"\u003canonymous-schema-168>"},"id":{"type":"string","description":"Optional. Add your own request ID here if you want it returned in the unsubscribe reply or error.","example":"req-006","x-parser-schema-id":"\u003canonymous-schema-169>"},"payload":{"type":"object","description":"Choose the topic to stop and add any extra values needed for that topic.","required":["topic"],"properties":{"topic":{"type":"string","enum":["account","pnl","watchlist","news"],"description":"Topic to unsubscribe from. `account` and `pnl` unsubscribes require `params.accountId`. `watchlist` and `news` unsubscribes do not require params.","example":"account","x-parser-schema-id":"\u003canonymous-schema-171>"},"params":{"type":"object","description":"Extra values for the topic you want to stop.","properties":{"accountId":{"type":"string","description":"Trading account ID. Required for account and pnl unsubscribe requests. Do not send for watchlist or news.","example":"ACC123456","x-parser-schema-id":"\u003canonymous-schema-173>"},"interval":{"type":"string","enum":["15s","1m","5m","15m","1h","1d","1mo"],"description":"For `pnl`, which interval to stop. If you leave this empty, the server uses `1m`.","example":"1m","x-parser-schema-id":"\u003canonymous-schema-174>"}},"x-parser-schema-id":"\u003canonymous-schema-172>"}},"example":{"topic":"account","params":{"accountId":"ACC123456"}},"x-parser-schema-id":"\u003canonymous-schema-170>"}},"x-parser-schema-id":"UnsubscribeRequestPayload"},"title":"Unsubscribe Request","description":"Unsubscribe from updates","example":"{\n \"type\": \"unsubscribe\",\n \"id\": \"req-006\",\n \"payload\": {\n \"topic\": \"account\",\n \"params\": {\n \"accountId\": \"ACC123456\"\n }\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"unsubscribeRequest"}]},{"id":"pingRequest","contentType":"application/json","payload":[{"name":"Ping","description":"Keep-alive ping","type":"object","properties":[{"name":"type","type":"string","description":"Set this to `ping` to check that the connection is still alive.","enumValues":["ping"],"required":true},{"name":"id","type":"string","description":"Optional. Add your own request ID here if you want it returned in the `pong` reply.","required":false}]}],"headers":[],"jsonPayloadSchema":{"type":"object","required":["type"],"description":"Use this message to check that the WebSocket connection is still alive.","properties":{"type":{"type":"string","enum":["ping"],"description":"Set this to `ping` to check that the connection is still alive.","example":"ping","x-parser-schema-id":"\u003canonymous-schema-14>"},"id":{"type":"string","description":"Optional. Add your own request ID here if you want it returned in the `pong` reply.","example":"ping-001","x-parser-schema-id":"\u003canonymous-schema-15>"}},"x-parser-schema-id":"PingPayload"},"title":"Ping","description":"Keep-alive ping","example":"{\n \"type\": \"ping\",\n \"id\": \"ping-001\"\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"pingRequest"}]}],"receiveMessages":[{"id":"authExpired","contentType":"application/json","payload":[{"name":"Authentication Expired","description":"Session has expired","type":"object","properties":[{"name":"type","type":"string","description":"The server sets this to `event` for auth status messages.","enumValues":["event"],"required":false},{"name":"payload","type":"object","required":false,"properties":[{"name":"action","type":"string","description":"Sign-in result or sign-in status. `authSuccess` means you can start subscribing. `authError` means the token was rejected. The other values are sent by the server as the connection ages.","enumValues":["authSuccess","authError","authTimeout","authExpired","refreshAuth"],"required":false},{"name":"data","type":"object","description":"Action-specific data","required":false},{"name":"id","type":"string","description":"Request ID from your client message, or `system` if this event was sent by the server on its own.","required":false},{"name":"timestamp","type":"integer","description":"Unix timestamp in milliseconds","required":false}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","description":"Server message about sign-in status.","properties":{"type":{"type":"string","enum":["event"],"description":"The server sets this to `event` for auth status messages.","x-parser-schema-id":"\u003canonymous-schema-8>"},"payload":{"type":"object","properties":{"action":{"type":"string","enum":["authSuccess","authError","authTimeout","authExpired","refreshAuth"],"description":"Sign-in result or sign-in status. `authSuccess` means you can start subscribing. `authError` means the token was rejected. The other values are sent by the server as the connection ages.","x-parser-schema-id":"\u003canonymous-schema-10>"},"data":{"type":"object","description":"Action-specific data","x-parser-schema-id":"\u003canonymous-schema-11>"},"id":{"type":"string","description":"Request ID from your client message, or `system` if this event was sent by the server on its own.","x-parser-schema-id":"\u003canonymous-schema-12>"},"timestamp":{"type":"integer","description":"Unix timestamp in milliseconds","x-parser-schema-id":"\u003canonymous-schema-13>"}},"x-parser-schema-id":"\u003canonymous-schema-9>"}},"x-parser-schema-id":"AuthEventPayload"},"title":"Authentication Expired","description":"Session has expired","example":"{\n \"type\": \"event\",\n \"payload\": {\n \"action\": \"authExpired\",\n \"data\": {\n \"error\": \"session expired\"\n },\n \"id\": \"system\",\n \"timestamp\": 1703001234567\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"authExpired"}]},{"id":"refreshAuth","contentType":"application/json","payload":[{"name":"Refresh Authentication Warning","description":"Session expires soon, re-authentication recommended","type":"object","properties":[{"name":"type","type":"string","description":"The server sets this to `event` for auth status messages.","enumValues":["event"],"required":false},{"name":"payload","type":"object","required":false,"properties":[{"name":"action","type":"string","description":"Sign-in result or sign-in status. `authSuccess` means you can start subscribing. `authError` means the token was rejected. The other values are sent by the server as the connection ages.","enumValues":["authSuccess","authError","authTimeout","authExpired","refreshAuth"],"required":false},{"name":"data","type":"object","description":"Action-specific data","required":false},{"name":"id","type":"string","description":"Request ID from your client message, or `system` if this event was sent by the server on its own.","required":false},{"name":"timestamp","type":"integer","description":"Unix timestamp in milliseconds","required":false}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","description":"Server message about sign-in status.","properties":{"type":{"type":"string","enum":["event"],"description":"The server sets this to `event` for auth status messages.","x-parser-schema-id":"\u003canonymous-schema-8>"},"payload":{"type":"object","properties":{"action":{"type":"string","enum":["authSuccess","authError","authTimeout","authExpired","refreshAuth"],"description":"Sign-in result or sign-in status. `authSuccess` means you can start subscribing. `authError` means the token was rejected. The other values are sent by the server as the connection ages.","x-parser-schema-id":"\u003canonymous-schema-10>"},"data":{"type":"object","description":"Action-specific data","x-parser-schema-id":"\u003canonymous-schema-11>"},"id":{"type":"string","description":"Request ID from your client message, or `system` if this event was sent by the server on its own.","x-parser-schema-id":"\u003canonymous-schema-12>"},"timestamp":{"type":"integer","description":"Unix timestamp in milliseconds","x-parser-schema-id":"\u003canonymous-schema-13>"}},"x-parser-schema-id":"\u003canonymous-schema-9>"}},"x-parser-schema-id":"AuthEventPayload"},"title":"Refresh Authentication Warning","description":"Session expires soon, re-authentication recommended","example":"{\n \"type\": \"event\",\n \"payload\": {\n \"action\": \"refreshAuth\",\n \"data\": {\n \"expiresIn\": 300000,\n \"expiresAt\": 1703001534567\n },\n \"id\": \"system\",\n \"timestamp\": 1703001234567\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"refreshAuth"}]},{"id":"orderUpdate","contentType":"application/json","payload":[{"name":"Order Update","description":"Real-time order update","type":"object","properties":[{"name":"type","type":"string","description":"Top-level message type. Always `event` for streaming updates.","enumValues":["event"],"required":false},{"name":"timestamp","type":"string","description":"Time when the server sent this event, in RFC3339 format.","required":false},{"name":"payload","type":"object","description":"Routing: `topic`, `name`, and `data` for the event.","required":false,"properties":[{"name":"topic","type":"string","description":"Topic identifier. Always `account` for these events.","enumValues":["account"],"required":false},{"name":"name","type":"string","description":"Event name","enumValues":["account.order","account.position","account.balance","account.balance.apex","account.info"],"required":false},{"name":"target","type":"string","description":"Target identifier (e.g. account:ACC123456)","required":false},{"name":"data","type":"object","required":false,"properties":[{"name":"clOrdId","type":"string","description":"Client order ID.","required":false},{"name":"ordId","type":"string","description":"Broker/order ID.","required":false},{"name":"origClOrdId","type":"string","description":"Original client order ID for replaces/cancels.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"clientId","type":"string","description":"Client/user ID.","required":false},{"name":"symbol","type":"string","description":"Trading symbol.","required":false},{"name":"side","type":"string","description":"Order side, for example BUY or SELL.","required":false},{"name":"type","type":"string","description":"Order type, for example LIMIT or MARKET.","required":false},{"name":"timeInForce","type":"string","description":"Time in force, for example DAY.","required":false},{"name":"qty","type":"string","description":"Order quantity serialized as a string.","required":false},{"name":"price","type":"string","description":"Limit price serialized as a string.","required":false},{"name":"stopPrice","type":"string","description":"Stop price serialized as a string.","required":false},{"name":"ordStatus","type":"string","description":"Order status.","enumValues":["NEW","PARTIALLY_FILLED","FILLED","DONE_FOR_DAY","CANCELED","REPLACED","PENDING_CANCEL","STOPPED","REJECTED","SUSPENDED","PENDING_NEW","CALCULATED","EXPIRED","ACCEPTED_FOR_BID","PENDING_REPLACE"],"required":false},{"name":"cumQty","type":"string","description":"Cumulative filled quantity serialized as a string.","required":false},{"name":"leavesQty","type":"string","description":"Remaining open quantity serialized as a string.","required":false},{"name":"avgPrice","type":"string","description":"Average execution price serialized as a string.","required":false},{"name":"currency","type":"string","description":"Currency code.","required":false},{"name":"exDestination","type":"string","description":"Execution destination, for example MNGDFTE or MNGD.","required":false},{"name":"text","type":"string","description":"Broker or venue message.","required":false},{"name":"ordRejReason","type":"string","description":"Order reject reason when present.","required":false},{"name":"securityType","type":"string","description":"Security type, for example EQUITY or OPTION.","required":false},{"name":"category","type":"string","description":"Order category, for example EQUITY, SINGLE_LEG, or MULTI_LEG.","required":false},{"name":"legs","type":"array","required":false,"properties":[{"name":"symbol","type":"string","description":"Underlying or option symbol.","required":false},{"name":"side","type":"string","description":"Order side, for example BUY or SELL.","required":false},{"name":"ratioQty","type":"string","description":"Leg ratio quantity serialized as a string.","required":false},{"name":"securityType","type":"string","description":"Security type, for example OPTION.","required":false},{"name":"maturity","type":"string","description":"Option maturity date in YYYY-MM-DD format.","required":false},{"name":"strikePrice","type":"string","description":"Option strike price serialized as a string.","required":false},{"name":"positionEffect","type":"string","description":"Position effect, for example OPEN or CLOSE.","required":false},{"name":"putCall","type":"string","description":"Option side, CALL or PUT.","required":false},{"name":"avgPrice","type":"string","description":"Average fill price for the leg, serialized as a string.","required":false}]},{"name":"execId","type":"string","description":"Execution ID for fill events.","required":false},{"name":"execType","type":"string","description":"Execution type, for example NEW, FILL, PARTIAL_FILL, or REJECTED.","required":false},{"name":"lastPx","type":"string","description":"Last execution price serialized as a string.","required":false},{"name":"lastQty","type":"string","description":"Last execution quantity serialized as a string.","required":false},{"name":"maturity","type":"string","description":"Flat option maturity when sent on single-leg option orders.","required":false},{"name":"putCall","type":"string","description":"Flat option side, CALL or PUT.","required":false},{"name":"strikePrice","type":"string","description":"Flat option strike price serialized as a string.","required":false},{"name":"positionEffect","type":"string","description":"Flat option position effect.","required":false},{"name":"createdAt","type":"string","description":"Creation timestamp.","required":false},{"name":"updatedAt","type":"string","description":"Last update timestamp.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"symbol","type":"string","description":"Equity or OCC option symbol.","required":false},{"name":"securityType","type":"string","description":"Security type, for example EQUITY or OPTION.","required":false},{"name":"qty","type":"string","description":"Position quantity serialized as a string.","required":false},{"name":"avgPrice","type":"string","description":"Average position price serialized as a string.","required":false},{"name":"avgCost","type":"string","description":"Backward-compatible alias of avgPrice.","required":false},{"name":"unRealizedPL","type":"string","description":"Unrealized P\u0026L serialized as a string.","required":false},{"name":"todayRealizedPnL","type":"string","description":"Today realized P\u0026L serialized as a string.","required":false},{"name":"mtmRealizedPnL","type":"string","description":"Mark-to-market realized P\u0026L measured against the previous close, serialized as a string.","required":false},{"name":"realizedPL","type":"string","description":"Backward-compatible alias of todayRealizedPnL.","required":false},{"name":"todayPL","type":"string","description":"Today total P\u0026L serialized as a string.","required":false},{"name":"instrument","type":"string","description":"Backward-compatible alias of securityType.","required":false},{"name":"putCall","type":"string","description":"CALL or PUT for options.","required":false},{"name":"strikePrice","type":"string","description":"Option strike price serialized as a string.","required":false},{"name":"maturity","type":"string","description":"Option maturity date in YYYY-MM-DD format.","required":false},{"name":"flags","type":"integer","description":"Position flags.","required":false},{"name":"createdAt","type":"string","description":"Creation timestamp.","required":false},{"name":"updatedAt","type":"string","description":"Last update timestamp.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"sodPositionsMarketValue","type":"string","description":"Start-of-day positions market value.","required":false},{"name":"netBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"stockBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"dayTradeBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"optionBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"dayTradeOvernightRegTBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"totalEquity","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"settledFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"unsettledFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"heldBackFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"grossMargin","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"pendingOrdersMarginRequirements","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"maintReq","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"creditMultiplier","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"pendingOrdersCount","type":"integer","description":"Number of pending orders.","required":false},{"name":"credit","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"creditRemaining","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"realizedPL","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"unRealizedPL","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"SMA","type":"string","description":"Special memorandum account value.","required":false},{"name":"smaCreditRemaining","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"PDT","type":"string","description":"Pattern day trader value serialized as a string.","required":false},{"name":"pdtCreditRemaining","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"startOfDayCash","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"valueBought","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"valueSold","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"sodTtlEquity","type":"string","description":"Optional start-of-day total equity.","required":false},{"name":"sodTtlEquityUpdatedAt","type":"string","description":"Optional timestamp for sodTtlEquity.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"fullyPaidUnsettledFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"amountAvailableToWithdraw","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"updatedAt","type":"string","description":"Timestamp for the Apex update.","required":false},{"name":"id","type":"string","description":"Sterling account ID used for subscription routing.","required":false},{"name":"sterlingAccountId","type":"string","description":"Raw Sterling account ID.","required":false},{"name":"apexAccountId","type":"string","description":"Apex account ID when available.","required":false},{"name":"fdid","type":"string","description":"FDID when available.","required":false},{"name":"description","type":"string","description":"Account description.","required":false},{"name":"accountType","type":"string","description":"Account type.","required":false},{"name":"accountClass","type":"string","description":"Account class.","required":false},{"name":"optionsLevel","type":"string","description":"Options level.","required":false},{"name":"maintenanceExcess","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"cashAvailable","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"exchangeSurplus","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"accruedCash","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"netLiquidity","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"marginEquity","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"sma","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"maintReq","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"email","type":"string","description":"Account email.","required":false},{"name":"cell","type":"string","description":"Account phone number.","required":false},{"name":"groupId","type":"string","description":"Sterling group ID.","required":false}]}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","description":"Server message for the `account` topic. `name` tells you what changed.","properties":{"type":{"type":"string","enum":["event"],"description":"Top-level message type. Always `event` for streaming updates.","x-parser-schema-id":"\u003canonymous-schema-184>"},"timestamp":{"type":"string","description":"Time when the server sent this event, in RFC3339 format.","x-parser-schema-id":"\u003canonymous-schema-185>"},"payload":{"type":"object","description":"Routing: `topic`, `name`, and `data` for the event.","properties":{"topic":{"type":"string","enum":["account"],"description":"Topic identifier. Always `account` for these events.","x-parser-schema-id":"\u003canonymous-schema-187>"},"name":{"type":"string","enum":["account.order","account.position","account.balance","account.balance.apex","account.info"],"description":"Event name","x-parser-schema-id":"\u003canonymous-schema-188>"},"target":{"type":"string","description":"Target identifier (e.g. account:ACC123456)","x-parser-schema-id":"\u003canonymous-schema-189>"},"data":{"oneOf":[{"type":"object","description":"Order update from the server. This includes the order plus fill details when the order changes.","properties":{"clOrdId":{"type":"string","description":"Client order ID.","x-parser-schema-id":"\u003canonymous-schema-105>"},"ordId":{"type":"string","description":"Broker/order ID.","x-parser-schema-id":"\u003canonymous-schema-106>"},"origClOrdId":{"type":"string","description":"Original client order ID for replaces/cancels.","x-parser-schema-id":"\u003canonymous-schema-107>"},"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-108>"},"clientId":{"type":"string","description":"Client/user ID.","x-parser-schema-id":"\u003canonymous-schema-109>"},"symbol":{"type":"string","description":"Trading symbol.","x-parser-schema-id":"\u003canonymous-schema-110>"},"side":{"type":"string","description":"Order side, for example BUY or SELL.","x-parser-schema-id":"\u003canonymous-schema-111>"},"type":{"type":"string","description":"Order type, for example LIMIT or MARKET.","x-parser-schema-id":"\u003canonymous-schema-112>"},"timeInForce":{"type":"string","description":"Time in force, for example DAY.","x-parser-schema-id":"\u003canonymous-schema-113>"},"qty":{"type":"string","description":"Order quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-114>"},"price":{"type":"string","description":"Limit price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-115>"},"stopPrice":{"type":"string","description":"Stop price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-116>"},"ordStatus":{"type":"string","enum":["NEW","PARTIALLY_FILLED","FILLED","DONE_FOR_DAY","CANCELED","REPLACED","PENDING_CANCEL","STOPPED","REJECTED","SUSPENDED","PENDING_NEW","CALCULATED","EXPIRED","ACCEPTED_FOR_BID","PENDING_REPLACE"],"description":"Order status.","x-parser-schema-id":"\u003canonymous-schema-117>"},"cumQty":{"type":"string","description":"Cumulative filled quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-118>"},"leavesQty":{"type":"string","description":"Remaining open quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-119>"},"avgPrice":{"type":"string","description":"Average execution price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-120>"},"currency":{"type":"string","description":"Currency code.","x-parser-schema-id":"\u003canonymous-schema-121>"},"exDestination":{"type":"string","description":"Execution destination, for example MNGDFTE or MNGD.","x-parser-schema-id":"\u003canonymous-schema-122>"},"text":{"type":"string","description":"Broker or venue message.","x-parser-schema-id":"\u003canonymous-schema-123>"},"ordRejReason":{"type":"string","description":"Order reject reason when present.","x-parser-schema-id":"\u003canonymous-schema-124>"},"securityType":{"type":"string","description":"Security type, for example EQUITY or OPTION.","x-parser-schema-id":"\u003canonymous-schema-125>"},"category":{"type":"string","description":"Order category, for example EQUITY, SINGLE_LEG, or MULTI_LEG.","x-parser-schema-id":"\u003canonymous-schema-126>"},"legs":{"type":"array","items":{"type":"object","description":"One option leg in an order update.","properties":{"symbol":{"type":"string","description":"Underlying or option symbol.","x-parser-schema-id":"\u003canonymous-schema-128>"},"side":{"type":"string","description":"Order side, for example BUY or SELL.","x-parser-schema-id":"\u003canonymous-schema-129>"},"ratioQty":{"type":"string","description":"Leg ratio quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-130>"},"securityType":{"type":"string","description":"Security type, for example OPTION.","x-parser-schema-id":"\u003canonymous-schema-131>"},"maturity":{"type":"string","description":"Option maturity date in YYYY-MM-DD format.","x-parser-schema-id":"\u003canonymous-schema-132>"},"strikePrice":{"type":"string","description":"Option strike price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-133>"},"positionEffect":{"type":"string","description":"Position effect, for example OPEN or CLOSE.","x-parser-schema-id":"\u003canonymous-schema-134>"},"putCall":{"type":"string","description":"Option side, CALL or PUT.","x-parser-schema-id":"\u003canonymous-schema-135>"},"avgPrice":{"type":"string","description":"Average fill price for the leg, serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-136>"}},"x-parser-schema-id":"AccountOrderLeg"},"x-parser-schema-id":"\u003canonymous-schema-127>"},"execId":{"type":"string","description":"Execution ID for fill events.","x-parser-schema-id":"\u003canonymous-schema-137>"},"execType":{"type":"string","description":"Execution type, for example NEW, FILL, PARTIAL_FILL, or REJECTED.","x-parser-schema-id":"\u003canonymous-schema-138>"},"lastPx":{"type":"string","description":"Last execution price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-139>"},"lastQty":{"type":"string","description":"Last execution quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-140>"},"maturity":{"type":"string","description":"Flat option maturity when sent on single-leg option orders.","x-parser-schema-id":"\u003canonymous-schema-141>"},"putCall":{"type":"string","description":"Flat option side, CALL or PUT.","x-parser-schema-id":"\u003canonymous-schema-142>"},"strikePrice":{"type":"string","description":"Flat option strike price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-143>"},"positionEffect":{"type":"string","description":"Flat option position effect.","x-parser-schema-id":"\u003canonymous-schema-144>"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp.","x-parser-schema-id":"\u003canonymous-schema-145>"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp.","x-parser-schema-id":"\u003canonymous-schema-146>"}},"x-parser-schema-id":"OrderData"},{"type":"object","description":"Position update from the server. Decimal numbers are sent as strings.","properties":{"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-86>"},"symbol":{"type":"string","description":"Equity or OCC option symbol.","x-parser-schema-id":"\u003canonymous-schema-87>"},"securityType":{"type":"string","description":"Security type, for example EQUITY or OPTION.","x-parser-schema-id":"\u003canonymous-schema-88>"},"qty":{"type":"string","description":"Position quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-89>"},"avgPrice":{"type":"string","description":"Average position price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-90>"},"avgCost":{"type":"string","description":"Backward-compatible alias of avgPrice.","x-parser-schema-id":"\u003canonymous-schema-91>"},"unRealizedPL":{"type":"string","description":"Unrealized P\u0026L serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-92>"},"todayRealizedPnL":{"type":"string","description":"Today realized P\u0026L serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-93>"},"mtmRealizedPnL":{"type":"string","description":"Mark-to-market realized P\u0026L measured against the previous close, serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-94>"},"realizedPL":{"type":"string","description":"Backward-compatible alias of todayRealizedPnL.","x-parser-schema-id":"\u003canonymous-schema-95>"},"todayPL":{"type":"string","description":"Today total P\u0026L serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-96>"},"instrument":{"type":"string","description":"Backward-compatible alias of securityType.","x-parser-schema-id":"\u003canonymous-schema-97>"},"putCall":{"type":"string","description":"CALL or PUT for options.","x-parser-schema-id":"\u003canonymous-schema-98>"},"strikePrice":{"type":"string","description":"Option strike price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-99>"},"maturity":{"type":"string","description":"Option maturity date in YYYY-MM-DD format.","x-parser-schema-id":"\u003canonymous-schema-100>"},"flags":{"type":"integer","description":"Position flags.","x-parser-schema-id":"\u003canonymous-schema-101>"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp.","x-parser-schema-id":"\u003canonymous-schema-102>"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp.","x-parser-schema-id":"\u003canonymous-schema-103>"}},"x-parser-schema-id":"PositionData"},{"type":"object","description":"Balance update from the server. Decimal numbers are sent as strings.","properties":{"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-190>"},"sodPositionsMarketValue":{"type":"string","description":"Start-of-day positions market value.","x-parser-schema-id":"\u003canonymous-schema-191>"},"netBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-192>"},"stockBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-193>"},"dayTradeBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-194>"},"optionBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-195>"},"dayTradeOvernightRegTBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-196>"},"totalEquity":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-197>"},"settledFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-198>"},"unsettledFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-199>"},"heldBackFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-200>"},"grossMargin":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-201>"},"pendingOrdersMarginRequirements":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-202>"},"maintReq":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-203>"},"creditMultiplier":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-204>"},"pendingOrdersCount":{"type":"integer","description":"Number of pending orders.","x-parser-schema-id":"\u003canonymous-schema-205>"},"credit":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-206>"},"creditRemaining":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-207>"},"realizedPL":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-208>"},"unRealizedPL":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-209>"},"SMA":{"type":"string","description":"Special memorandum account value.","x-parser-schema-id":"\u003canonymous-schema-210>"},"smaCreditRemaining":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-211>"},"PDT":{"type":"string","description":"Pattern day trader value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-212>"},"pdtCreditRemaining":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-213>"},"startOfDayCash":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-214>"},"valueBought":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-215>"},"valueSold":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-216>"},"sodTtlEquity":{"type":"string","description":"Optional start-of-day total equity.","x-parser-schema-id":"\u003canonymous-schema-217>"},"sodTtlEquityUpdatedAt":{"type":"string","format":"date-time","description":"Optional timestamp for sodTtlEquity.","x-parser-schema-id":"\u003canonymous-schema-218>"}},"x-parser-schema-id":"BalanceData"},{"type":"object","description":"Smaller balance update. Merge these fields into the latest balance data you already have.","properties":{"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-219>"},"fullyPaidUnsettledFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-220>"},"amountAvailableToWithdraw":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-221>"},"updatedAt":{"type":"string","format":"date-time","description":"Timestamp for the Apex update.","x-parser-schema-id":"\u003canonymous-schema-222>"}},"x-parser-schema-id":"ApexBalanceData"},{"type":"object","description":"Account info update from the server. Decimal numbers are sent as strings.","properties":{"id":{"type":"string","description":"Sterling account ID used for subscription routing.","x-parser-schema-id":"\u003canonymous-schema-223>"},"sterlingAccountId":{"type":"string","description":"Raw Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-224>"},"apexAccountId":{"type":"string","description":"Apex account ID when available.","x-parser-schema-id":"\u003canonymous-schema-225>"},"fdid":{"type":"string","description":"FDID when available.","x-parser-schema-id":"\u003canonymous-schema-226>"},"description":{"type":"string","description":"Account description.","x-parser-schema-id":"\u003canonymous-schema-227>"},"accountType":{"type":"string","description":"Account type.","x-parser-schema-id":"\u003canonymous-schema-228>"},"accountClass":{"type":"string","description":"Account class.","x-parser-schema-id":"\u003canonymous-schema-229>"},"optionsLevel":{"type":"string","description":"Options level.","x-parser-schema-id":"\u003canonymous-schema-230>"},"maintenanceExcess":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-231>"},"cashAvailable":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-232>"},"exchangeSurplus":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-233>"},"accruedCash":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-234>"},"netLiquidity":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-235>"},"marginEquity":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-236>"},"sma":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-237>"},"maintReq":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-238>"},"email":{"type":"string","description":"Account email.","x-parser-schema-id":"\u003canonymous-schema-239>"},"cell":{"type":"string","description":"Account phone number.","x-parser-schema-id":"\u003canonymous-schema-240>"},"groupId":{"type":"string","description":"Sterling group ID.","x-parser-schema-id":"\u003canonymous-schema-241>"}},"x-parser-schema-id":"AccountInfoData"}],"x-parser-schema-id":"AccountEventData"}},"x-parser-schema-id":"\u003canonymous-schema-186>"}},"x-parser-schema-id":"AccountEventPayload"},"title":"Order Update","description":"Real-time order update","example":"{\n \"type\": \"event\",\n \"timestamp\": \"2024-01-15T10:30:05Z\",\n \"payload\": {\n \"topic\": \"account\",\n \"name\": \"account.order\",\n \"target\": \"account:ACC123456\",\n \"data\": {\n \"ordId\": \"ORD-12345\",\n \"clOrdId\": \"CLIENT-001\",\n \"accountId\": \"ACC123456\",\n \"clientId\": \"CLIENT-USER-001\",\n \"symbol\": \"AAPL\",\n \"side\": \"BUY\",\n \"type\": \"LIMIT\",\n \"timeInForce\": \"DAY\",\n \"qty\": \"100\",\n \"price\": \"150.50\",\n \"stopPrice\": \"0\",\n \"ordStatus\": \"FILLED\",\n \"cumQty\": \"100\",\n \"leavesQty\": \"0\",\n \"avgPrice\": \"150.45\",\n \"currency\": \"USD\",\n \"exDestination\": \"MNGDFTE\",\n \"securityType\": \"EQUITY\",\n \"category\": \"EQUITY\",\n \"createdAt\": \"2024-01-15T10:30:00Z\",\n \"updatedAt\": \"2024-01-15T10:30:05Z\"\n }\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"orderUpdate"}]},{"id":"positionUpdate","contentType":"application/json","payload":[{"name":"Position Update","description":"Real-time position update","type":"object","properties":[{"name":"type","type":"string","description":"Top-level message type. Always `event` for streaming updates.","enumValues":["event"],"required":false},{"name":"timestamp","type":"string","description":"Time when the server sent this event, in RFC3339 format.","required":false},{"name":"payload","type":"object","description":"Routing: `topic`, `name`, and `data` for the event.","required":false,"properties":[{"name":"topic","type":"string","description":"Topic identifier. Always `account` for these events.","enumValues":["account"],"required":false},{"name":"name","type":"string","description":"Event name","enumValues":["account.order","account.position","account.balance","account.balance.apex","account.info"],"required":false},{"name":"target","type":"string","description":"Target identifier (e.g. account:ACC123456)","required":false},{"name":"data","type":"object","required":false,"properties":[{"name":"clOrdId","type":"string","description":"Client order ID.","required":false},{"name":"ordId","type":"string","description":"Broker/order ID.","required":false},{"name":"origClOrdId","type":"string","description":"Original client order ID for replaces/cancels.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"clientId","type":"string","description":"Client/user ID.","required":false},{"name":"symbol","type":"string","description":"Trading symbol.","required":false},{"name":"side","type":"string","description":"Order side, for example BUY or SELL.","required":false},{"name":"type","type":"string","description":"Order type, for example LIMIT or MARKET.","required":false},{"name":"timeInForce","type":"string","description":"Time in force, for example DAY.","required":false},{"name":"qty","type":"string","description":"Order quantity serialized as a string.","required":false},{"name":"price","type":"string","description":"Limit price serialized as a string.","required":false},{"name":"stopPrice","type":"string","description":"Stop price serialized as a string.","required":false},{"name":"ordStatus","type":"string","description":"Order status.","enumValues":["NEW","PARTIALLY_FILLED","FILLED","DONE_FOR_DAY","CANCELED","REPLACED","PENDING_CANCEL","STOPPED","REJECTED","SUSPENDED","PENDING_NEW","CALCULATED","EXPIRED","ACCEPTED_FOR_BID","PENDING_REPLACE"],"required":false},{"name":"cumQty","type":"string","description":"Cumulative filled quantity serialized as a string.","required":false},{"name":"leavesQty","type":"string","description":"Remaining open quantity serialized as a string.","required":false},{"name":"avgPrice","type":"string","description":"Average execution price serialized as a string.","required":false},{"name":"currency","type":"string","description":"Currency code.","required":false},{"name":"exDestination","type":"string","description":"Execution destination, for example MNGDFTE or MNGD.","required":false},{"name":"text","type":"string","description":"Broker or venue message.","required":false},{"name":"ordRejReason","type":"string","description":"Order reject reason when present.","required":false},{"name":"securityType","type":"string","description":"Security type, for example EQUITY or OPTION.","required":false},{"name":"category","type":"string","description":"Order category, for example EQUITY, SINGLE_LEG, or MULTI_LEG.","required":false},{"name":"legs","type":"array","required":false,"properties":[{"name":"symbol","type":"string","description":"Underlying or option symbol.","required":false},{"name":"side","type":"string","description":"Order side, for example BUY or SELL.","required":false},{"name":"ratioQty","type":"string","description":"Leg ratio quantity serialized as a string.","required":false},{"name":"securityType","type":"string","description":"Security type, for example OPTION.","required":false},{"name":"maturity","type":"string","description":"Option maturity date in YYYY-MM-DD format.","required":false},{"name":"strikePrice","type":"string","description":"Option strike price serialized as a string.","required":false},{"name":"positionEffect","type":"string","description":"Position effect, for example OPEN or CLOSE.","required":false},{"name":"putCall","type":"string","description":"Option side, CALL or PUT.","required":false},{"name":"avgPrice","type":"string","description":"Average fill price for the leg, serialized as a string.","required":false}]},{"name":"execId","type":"string","description":"Execution ID for fill events.","required":false},{"name":"execType","type":"string","description":"Execution type, for example NEW, FILL, PARTIAL_FILL, or REJECTED.","required":false},{"name":"lastPx","type":"string","description":"Last execution price serialized as a string.","required":false},{"name":"lastQty","type":"string","description":"Last execution quantity serialized as a string.","required":false},{"name":"maturity","type":"string","description":"Flat option maturity when sent on single-leg option orders.","required":false},{"name":"putCall","type":"string","description":"Flat option side, CALL or PUT.","required":false},{"name":"strikePrice","type":"string","description":"Flat option strike price serialized as a string.","required":false},{"name":"positionEffect","type":"string","description":"Flat option position effect.","required":false},{"name":"createdAt","type":"string","description":"Creation timestamp.","required":false},{"name":"updatedAt","type":"string","description":"Last update timestamp.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"symbol","type":"string","description":"Equity or OCC option symbol.","required":false},{"name":"securityType","type":"string","description":"Security type, for example EQUITY or OPTION.","required":false},{"name":"qty","type":"string","description":"Position quantity serialized as a string.","required":false},{"name":"avgPrice","type":"string","description":"Average position price serialized as a string.","required":false},{"name":"avgCost","type":"string","description":"Backward-compatible alias of avgPrice.","required":false},{"name":"unRealizedPL","type":"string","description":"Unrealized P\u0026L serialized as a string.","required":false},{"name":"todayRealizedPnL","type":"string","description":"Today realized P\u0026L serialized as a string.","required":false},{"name":"mtmRealizedPnL","type":"string","description":"Mark-to-market realized P\u0026L measured against the previous close, serialized as a string.","required":false},{"name":"realizedPL","type":"string","description":"Backward-compatible alias of todayRealizedPnL.","required":false},{"name":"todayPL","type":"string","description":"Today total P\u0026L serialized as a string.","required":false},{"name":"instrument","type":"string","description":"Backward-compatible alias of securityType.","required":false},{"name":"putCall","type":"string","description":"CALL or PUT for options.","required":false},{"name":"strikePrice","type":"string","description":"Option strike price serialized as a string.","required":false},{"name":"maturity","type":"string","description":"Option maturity date in YYYY-MM-DD format.","required":false},{"name":"flags","type":"integer","description":"Position flags.","required":false},{"name":"createdAt","type":"string","description":"Creation timestamp.","required":false},{"name":"updatedAt","type":"string","description":"Last update timestamp.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"sodPositionsMarketValue","type":"string","description":"Start-of-day positions market value.","required":false},{"name":"netBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"stockBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"dayTradeBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"optionBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"dayTradeOvernightRegTBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"totalEquity","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"settledFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"unsettledFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"heldBackFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"grossMargin","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"pendingOrdersMarginRequirements","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"maintReq","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"creditMultiplier","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"pendingOrdersCount","type":"integer","description":"Number of pending orders.","required":false},{"name":"credit","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"creditRemaining","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"realizedPL","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"unRealizedPL","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"SMA","type":"string","description":"Special memorandum account value.","required":false},{"name":"smaCreditRemaining","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"PDT","type":"string","description":"Pattern day trader value serialized as a string.","required":false},{"name":"pdtCreditRemaining","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"startOfDayCash","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"valueBought","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"valueSold","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"sodTtlEquity","type":"string","description":"Optional start-of-day total equity.","required":false},{"name":"sodTtlEquityUpdatedAt","type":"string","description":"Optional timestamp for sodTtlEquity.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"fullyPaidUnsettledFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"amountAvailableToWithdraw","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"updatedAt","type":"string","description":"Timestamp for the Apex update.","required":false},{"name":"id","type":"string","description":"Sterling account ID used for subscription routing.","required":false},{"name":"sterlingAccountId","type":"string","description":"Raw Sterling account ID.","required":false},{"name":"apexAccountId","type":"string","description":"Apex account ID when available.","required":false},{"name":"fdid","type":"string","description":"FDID when available.","required":false},{"name":"description","type":"string","description":"Account description.","required":false},{"name":"accountType","type":"string","description":"Account type.","required":false},{"name":"accountClass","type":"string","description":"Account class.","required":false},{"name":"optionsLevel","type":"string","description":"Options level.","required":false},{"name":"maintenanceExcess","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"cashAvailable","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"exchangeSurplus","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"accruedCash","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"netLiquidity","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"marginEquity","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"sma","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"maintReq","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"email","type":"string","description":"Account email.","required":false},{"name":"cell","type":"string","description":"Account phone number.","required":false},{"name":"groupId","type":"string","description":"Sterling group ID.","required":false}]}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","description":"Server message for the `account` topic. `name` tells you what changed.","properties":{"type":{"type":"string","enum":["event"],"description":"Top-level message type. Always `event` for streaming updates.","x-parser-schema-id":"\u003canonymous-schema-184>"},"timestamp":{"type":"string","description":"Time when the server sent this event, in RFC3339 format.","x-parser-schema-id":"\u003canonymous-schema-185>"},"payload":{"type":"object","description":"Routing: `topic`, `name`, and `data` for the event.","properties":{"topic":{"type":"string","enum":["account"],"description":"Topic identifier. Always `account` for these events.","x-parser-schema-id":"\u003canonymous-schema-187>"},"name":{"type":"string","enum":["account.order","account.position","account.balance","account.balance.apex","account.info"],"description":"Event name","x-parser-schema-id":"\u003canonymous-schema-188>"},"target":{"type":"string","description":"Target identifier (e.g. account:ACC123456)","x-parser-schema-id":"\u003canonymous-schema-189>"},"data":{"oneOf":[{"type":"object","description":"Order update from the server. This includes the order plus fill details when the order changes.","properties":{"clOrdId":{"type":"string","description":"Client order ID.","x-parser-schema-id":"\u003canonymous-schema-105>"},"ordId":{"type":"string","description":"Broker/order ID.","x-parser-schema-id":"\u003canonymous-schema-106>"},"origClOrdId":{"type":"string","description":"Original client order ID for replaces/cancels.","x-parser-schema-id":"\u003canonymous-schema-107>"},"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-108>"},"clientId":{"type":"string","description":"Client/user ID.","x-parser-schema-id":"\u003canonymous-schema-109>"},"symbol":{"type":"string","description":"Trading symbol.","x-parser-schema-id":"\u003canonymous-schema-110>"},"side":{"type":"string","description":"Order side, for example BUY or SELL.","x-parser-schema-id":"\u003canonymous-schema-111>"},"type":{"type":"string","description":"Order type, for example LIMIT or MARKET.","x-parser-schema-id":"\u003canonymous-schema-112>"},"timeInForce":{"type":"string","description":"Time in force, for example DAY.","x-parser-schema-id":"\u003canonymous-schema-113>"},"qty":{"type":"string","description":"Order quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-114>"},"price":{"type":"string","description":"Limit price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-115>"},"stopPrice":{"type":"string","description":"Stop price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-116>"},"ordStatus":{"type":"string","enum":["NEW","PARTIALLY_FILLED","FILLED","DONE_FOR_DAY","CANCELED","REPLACED","PENDING_CANCEL","STOPPED","REJECTED","SUSPENDED","PENDING_NEW","CALCULATED","EXPIRED","ACCEPTED_FOR_BID","PENDING_REPLACE"],"description":"Order status.","x-parser-schema-id":"\u003canonymous-schema-117>"},"cumQty":{"type":"string","description":"Cumulative filled quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-118>"},"leavesQty":{"type":"string","description":"Remaining open quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-119>"},"avgPrice":{"type":"string","description":"Average execution price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-120>"},"currency":{"type":"string","description":"Currency code.","x-parser-schema-id":"\u003canonymous-schema-121>"},"exDestination":{"type":"string","description":"Execution destination, for example MNGDFTE or MNGD.","x-parser-schema-id":"\u003canonymous-schema-122>"},"text":{"type":"string","description":"Broker or venue message.","x-parser-schema-id":"\u003canonymous-schema-123>"},"ordRejReason":{"type":"string","description":"Order reject reason when present.","x-parser-schema-id":"\u003canonymous-schema-124>"},"securityType":{"type":"string","description":"Security type, for example EQUITY or OPTION.","x-parser-schema-id":"\u003canonymous-schema-125>"},"category":{"type":"string","description":"Order category, for example EQUITY, SINGLE_LEG, or MULTI_LEG.","x-parser-schema-id":"\u003canonymous-schema-126>"},"legs":{"type":"array","items":{"type":"object","description":"One option leg in an order update.","properties":{"symbol":{"type":"string","description":"Underlying or option symbol.","x-parser-schema-id":"\u003canonymous-schema-128>"},"side":{"type":"string","description":"Order side, for example BUY or SELL.","x-parser-schema-id":"\u003canonymous-schema-129>"},"ratioQty":{"type":"string","description":"Leg ratio quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-130>"},"securityType":{"type":"string","description":"Security type, for example OPTION.","x-parser-schema-id":"\u003canonymous-schema-131>"},"maturity":{"type":"string","description":"Option maturity date in YYYY-MM-DD format.","x-parser-schema-id":"\u003canonymous-schema-132>"},"strikePrice":{"type":"string","description":"Option strike price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-133>"},"positionEffect":{"type":"string","description":"Position effect, for example OPEN or CLOSE.","x-parser-schema-id":"\u003canonymous-schema-134>"},"putCall":{"type":"string","description":"Option side, CALL or PUT.","x-parser-schema-id":"\u003canonymous-schema-135>"},"avgPrice":{"type":"string","description":"Average fill price for the leg, serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-136>"}},"x-parser-schema-id":"AccountOrderLeg"},"x-parser-schema-id":"\u003canonymous-schema-127>"},"execId":{"type":"string","description":"Execution ID for fill events.","x-parser-schema-id":"\u003canonymous-schema-137>"},"execType":{"type":"string","description":"Execution type, for example NEW, FILL, PARTIAL_FILL, or REJECTED.","x-parser-schema-id":"\u003canonymous-schema-138>"},"lastPx":{"type":"string","description":"Last execution price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-139>"},"lastQty":{"type":"string","description":"Last execution quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-140>"},"maturity":{"type":"string","description":"Flat option maturity when sent on single-leg option orders.","x-parser-schema-id":"\u003canonymous-schema-141>"},"putCall":{"type":"string","description":"Flat option side, CALL or PUT.","x-parser-schema-id":"\u003canonymous-schema-142>"},"strikePrice":{"type":"string","description":"Flat option strike price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-143>"},"positionEffect":{"type":"string","description":"Flat option position effect.","x-parser-schema-id":"\u003canonymous-schema-144>"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp.","x-parser-schema-id":"\u003canonymous-schema-145>"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp.","x-parser-schema-id":"\u003canonymous-schema-146>"}},"x-parser-schema-id":"OrderData"},{"type":"object","description":"Position update from the server. Decimal numbers are sent as strings.","properties":{"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-86>"},"symbol":{"type":"string","description":"Equity or OCC option symbol.","x-parser-schema-id":"\u003canonymous-schema-87>"},"securityType":{"type":"string","description":"Security type, for example EQUITY or OPTION.","x-parser-schema-id":"\u003canonymous-schema-88>"},"qty":{"type":"string","description":"Position quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-89>"},"avgPrice":{"type":"string","description":"Average position price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-90>"},"avgCost":{"type":"string","description":"Backward-compatible alias of avgPrice.","x-parser-schema-id":"\u003canonymous-schema-91>"},"unRealizedPL":{"type":"string","description":"Unrealized P\u0026L serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-92>"},"todayRealizedPnL":{"type":"string","description":"Today realized P\u0026L serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-93>"},"mtmRealizedPnL":{"type":"string","description":"Mark-to-market realized P\u0026L measured against the previous close, serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-94>"},"realizedPL":{"type":"string","description":"Backward-compatible alias of todayRealizedPnL.","x-parser-schema-id":"\u003canonymous-schema-95>"},"todayPL":{"type":"string","description":"Today total P\u0026L serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-96>"},"instrument":{"type":"string","description":"Backward-compatible alias of securityType.","x-parser-schema-id":"\u003canonymous-schema-97>"},"putCall":{"type":"string","description":"CALL or PUT for options.","x-parser-schema-id":"\u003canonymous-schema-98>"},"strikePrice":{"type":"string","description":"Option strike price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-99>"},"maturity":{"type":"string","description":"Option maturity date in YYYY-MM-DD format.","x-parser-schema-id":"\u003canonymous-schema-100>"},"flags":{"type":"integer","description":"Position flags.","x-parser-schema-id":"\u003canonymous-schema-101>"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp.","x-parser-schema-id":"\u003canonymous-schema-102>"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp.","x-parser-schema-id":"\u003canonymous-schema-103>"}},"x-parser-schema-id":"PositionData"},{"type":"object","description":"Balance update from the server. Decimal numbers are sent as strings.","properties":{"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-190>"},"sodPositionsMarketValue":{"type":"string","description":"Start-of-day positions market value.","x-parser-schema-id":"\u003canonymous-schema-191>"},"netBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-192>"},"stockBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-193>"},"dayTradeBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-194>"},"optionBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-195>"},"dayTradeOvernightRegTBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-196>"},"totalEquity":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-197>"},"settledFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-198>"},"unsettledFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-199>"},"heldBackFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-200>"},"grossMargin":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-201>"},"pendingOrdersMarginRequirements":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-202>"},"maintReq":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-203>"},"creditMultiplier":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-204>"},"pendingOrdersCount":{"type":"integer","description":"Number of pending orders.","x-parser-schema-id":"\u003canonymous-schema-205>"},"credit":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-206>"},"creditRemaining":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-207>"},"realizedPL":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-208>"},"unRealizedPL":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-209>"},"SMA":{"type":"string","description":"Special memorandum account value.","x-parser-schema-id":"\u003canonymous-schema-210>"},"smaCreditRemaining":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-211>"},"PDT":{"type":"string","description":"Pattern day trader value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-212>"},"pdtCreditRemaining":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-213>"},"startOfDayCash":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-214>"},"valueBought":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-215>"},"valueSold":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-216>"},"sodTtlEquity":{"type":"string","description":"Optional start-of-day total equity.","x-parser-schema-id":"\u003canonymous-schema-217>"},"sodTtlEquityUpdatedAt":{"type":"string","format":"date-time","description":"Optional timestamp for sodTtlEquity.","x-parser-schema-id":"\u003canonymous-schema-218>"}},"x-parser-schema-id":"BalanceData"},{"type":"object","description":"Smaller balance update. Merge these fields into the latest balance data you already have.","properties":{"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-219>"},"fullyPaidUnsettledFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-220>"},"amountAvailableToWithdraw":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-221>"},"updatedAt":{"type":"string","format":"date-time","description":"Timestamp for the Apex update.","x-parser-schema-id":"\u003canonymous-schema-222>"}},"x-parser-schema-id":"ApexBalanceData"},{"type":"object","description":"Account info update from the server. Decimal numbers are sent as strings.","properties":{"id":{"type":"string","description":"Sterling account ID used for subscription routing.","x-parser-schema-id":"\u003canonymous-schema-223>"},"sterlingAccountId":{"type":"string","description":"Raw Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-224>"},"apexAccountId":{"type":"string","description":"Apex account ID when available.","x-parser-schema-id":"\u003canonymous-schema-225>"},"fdid":{"type":"string","description":"FDID when available.","x-parser-schema-id":"\u003canonymous-schema-226>"},"description":{"type":"string","description":"Account description.","x-parser-schema-id":"\u003canonymous-schema-227>"},"accountType":{"type":"string","description":"Account type.","x-parser-schema-id":"\u003canonymous-schema-228>"},"accountClass":{"type":"string","description":"Account class.","x-parser-schema-id":"\u003canonymous-schema-229>"},"optionsLevel":{"type":"string","description":"Options level.","x-parser-schema-id":"\u003canonymous-schema-230>"},"maintenanceExcess":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-231>"},"cashAvailable":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-232>"},"exchangeSurplus":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-233>"},"accruedCash":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-234>"},"netLiquidity":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-235>"},"marginEquity":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-236>"},"sma":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-237>"},"maintReq":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-238>"},"email":{"type":"string","description":"Account email.","x-parser-schema-id":"\u003canonymous-schema-239>"},"cell":{"type":"string","description":"Account phone number.","x-parser-schema-id":"\u003canonymous-schema-240>"},"groupId":{"type":"string","description":"Sterling group ID.","x-parser-schema-id":"\u003canonymous-schema-241>"}},"x-parser-schema-id":"AccountInfoData"}],"x-parser-schema-id":"AccountEventData"}},"x-parser-schema-id":"\u003canonymous-schema-186>"}},"x-parser-schema-id":"AccountEventPayload"},"title":"Position Update","description":"Real-time position update","example":"{\n \"type\": \"event\",\n \"timestamp\": \"2024-01-15T14:30:00Z\",\n \"payload\": {\n \"topic\": \"account\",\n \"name\": \"account.position\",\n \"target\": \"account:ACC123456\",\n \"data\": {\n \"accountId\": \"ACC123456\",\n \"symbol\": \"AAPL\",\n \"securityType\": \"EQUITY\",\n \"qty\": \"100\",\n \"avgPrice\": \"150.45\",\n \"avgCost\": \"150.45\",\n \"unRealizedPL\": \"155.00\",\n \"todayRealizedPnL\": \"0\",\n \"realizedPL\": \"0\",\n \"todayPL\": \"155.00\",\n \"instrument\": \"EQUITY\",\n \"createdAt\": \"2024-01-15T10:30:05Z\",\n \"updatedAt\": \"2024-01-15T14:30:00Z\"\n }\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"positionUpdate"}]},{"id":"balanceUpdate","contentType":"application/json","payload":[{"name":"Balance Update","description":"Real-time balance update","type":"object","properties":[{"name":"type","type":"string","description":"Top-level message type. Always `event` for streaming updates.","enumValues":["event"],"required":false},{"name":"timestamp","type":"string","description":"Time when the server sent this event, in RFC3339 format.","required":false},{"name":"payload","type":"object","description":"Routing: `topic`, `name`, and `data` for the event.","required":false,"properties":[{"name":"topic","type":"string","description":"Topic identifier. Always `account` for these events.","enumValues":["account"],"required":false},{"name":"name","type":"string","description":"Event name","enumValues":["account.order","account.position","account.balance","account.balance.apex","account.info"],"required":false},{"name":"target","type":"string","description":"Target identifier (e.g. account:ACC123456)","required":false},{"name":"data","type":"object","required":false,"properties":[{"name":"clOrdId","type":"string","description":"Client order ID.","required":false},{"name":"ordId","type":"string","description":"Broker/order ID.","required":false},{"name":"origClOrdId","type":"string","description":"Original client order ID for replaces/cancels.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"clientId","type":"string","description":"Client/user ID.","required":false},{"name":"symbol","type":"string","description":"Trading symbol.","required":false},{"name":"side","type":"string","description":"Order side, for example BUY or SELL.","required":false},{"name":"type","type":"string","description":"Order type, for example LIMIT or MARKET.","required":false},{"name":"timeInForce","type":"string","description":"Time in force, for example DAY.","required":false},{"name":"qty","type":"string","description":"Order quantity serialized as a string.","required":false},{"name":"price","type":"string","description":"Limit price serialized as a string.","required":false},{"name":"stopPrice","type":"string","description":"Stop price serialized as a string.","required":false},{"name":"ordStatus","type":"string","description":"Order status.","enumValues":["NEW","PARTIALLY_FILLED","FILLED","DONE_FOR_DAY","CANCELED","REPLACED","PENDING_CANCEL","STOPPED","REJECTED","SUSPENDED","PENDING_NEW","CALCULATED","EXPIRED","ACCEPTED_FOR_BID","PENDING_REPLACE"],"required":false},{"name":"cumQty","type":"string","description":"Cumulative filled quantity serialized as a string.","required":false},{"name":"leavesQty","type":"string","description":"Remaining open quantity serialized as a string.","required":false},{"name":"avgPrice","type":"string","description":"Average execution price serialized as a string.","required":false},{"name":"currency","type":"string","description":"Currency code.","required":false},{"name":"exDestination","type":"string","description":"Execution destination, for example MNGDFTE or MNGD.","required":false},{"name":"text","type":"string","description":"Broker or venue message.","required":false},{"name":"ordRejReason","type":"string","description":"Order reject reason when present.","required":false},{"name":"securityType","type":"string","description":"Security type, for example EQUITY or OPTION.","required":false},{"name":"category","type":"string","description":"Order category, for example EQUITY, SINGLE_LEG, or MULTI_LEG.","required":false},{"name":"legs","type":"array","required":false,"properties":[{"name":"symbol","type":"string","description":"Underlying or option symbol.","required":false},{"name":"side","type":"string","description":"Order side, for example BUY or SELL.","required":false},{"name":"ratioQty","type":"string","description":"Leg ratio quantity serialized as a string.","required":false},{"name":"securityType","type":"string","description":"Security type, for example OPTION.","required":false},{"name":"maturity","type":"string","description":"Option maturity date in YYYY-MM-DD format.","required":false},{"name":"strikePrice","type":"string","description":"Option strike price serialized as a string.","required":false},{"name":"positionEffect","type":"string","description":"Position effect, for example OPEN or CLOSE.","required":false},{"name":"putCall","type":"string","description":"Option side, CALL or PUT.","required":false},{"name":"avgPrice","type":"string","description":"Average fill price for the leg, serialized as a string.","required":false}]},{"name":"execId","type":"string","description":"Execution ID for fill events.","required":false},{"name":"execType","type":"string","description":"Execution type, for example NEW, FILL, PARTIAL_FILL, or REJECTED.","required":false},{"name":"lastPx","type":"string","description":"Last execution price serialized as a string.","required":false},{"name":"lastQty","type":"string","description":"Last execution quantity serialized as a string.","required":false},{"name":"maturity","type":"string","description":"Flat option maturity when sent on single-leg option orders.","required":false},{"name":"putCall","type":"string","description":"Flat option side, CALL or PUT.","required":false},{"name":"strikePrice","type":"string","description":"Flat option strike price serialized as a string.","required":false},{"name":"positionEffect","type":"string","description":"Flat option position effect.","required":false},{"name":"createdAt","type":"string","description":"Creation timestamp.","required":false},{"name":"updatedAt","type":"string","description":"Last update timestamp.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"symbol","type":"string","description":"Equity or OCC option symbol.","required":false},{"name":"securityType","type":"string","description":"Security type, for example EQUITY or OPTION.","required":false},{"name":"qty","type":"string","description":"Position quantity serialized as a string.","required":false},{"name":"avgPrice","type":"string","description":"Average position price serialized as a string.","required":false},{"name":"avgCost","type":"string","description":"Backward-compatible alias of avgPrice.","required":false},{"name":"unRealizedPL","type":"string","description":"Unrealized P\u0026L serialized as a string.","required":false},{"name":"todayRealizedPnL","type":"string","description":"Today realized P\u0026L serialized as a string.","required":false},{"name":"mtmRealizedPnL","type":"string","description":"Mark-to-market realized P\u0026L measured against the previous close, serialized as a string.","required":false},{"name":"realizedPL","type":"string","description":"Backward-compatible alias of todayRealizedPnL.","required":false},{"name":"todayPL","type":"string","description":"Today total P\u0026L serialized as a string.","required":false},{"name":"instrument","type":"string","description":"Backward-compatible alias of securityType.","required":false},{"name":"putCall","type":"string","description":"CALL or PUT for options.","required":false},{"name":"strikePrice","type":"string","description":"Option strike price serialized as a string.","required":false},{"name":"maturity","type":"string","description":"Option maturity date in YYYY-MM-DD format.","required":false},{"name":"flags","type":"integer","description":"Position flags.","required":false},{"name":"createdAt","type":"string","description":"Creation timestamp.","required":false},{"name":"updatedAt","type":"string","description":"Last update timestamp.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"sodPositionsMarketValue","type":"string","description":"Start-of-day positions market value.","required":false},{"name":"netBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"stockBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"dayTradeBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"optionBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"dayTradeOvernightRegTBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"totalEquity","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"settledFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"unsettledFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"heldBackFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"grossMargin","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"pendingOrdersMarginRequirements","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"maintReq","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"creditMultiplier","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"pendingOrdersCount","type":"integer","description":"Number of pending orders.","required":false},{"name":"credit","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"creditRemaining","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"realizedPL","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"unRealizedPL","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"SMA","type":"string","description":"Special memorandum account value.","required":false},{"name":"smaCreditRemaining","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"PDT","type":"string","description":"Pattern day trader value serialized as a string.","required":false},{"name":"pdtCreditRemaining","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"startOfDayCash","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"valueBought","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"valueSold","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"sodTtlEquity","type":"string","description":"Optional start-of-day total equity.","required":false},{"name":"sodTtlEquityUpdatedAt","type":"string","description":"Optional timestamp for sodTtlEquity.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"fullyPaidUnsettledFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"amountAvailableToWithdraw","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"updatedAt","type":"string","description":"Timestamp for the Apex update.","required":false},{"name":"id","type":"string","description":"Sterling account ID used for subscription routing.","required":false},{"name":"sterlingAccountId","type":"string","description":"Raw Sterling account ID.","required":false},{"name":"apexAccountId","type":"string","description":"Apex account ID when available.","required":false},{"name":"fdid","type":"string","description":"FDID when available.","required":false},{"name":"description","type":"string","description":"Account description.","required":false},{"name":"accountType","type":"string","description":"Account type.","required":false},{"name":"accountClass","type":"string","description":"Account class.","required":false},{"name":"optionsLevel","type":"string","description":"Options level.","required":false},{"name":"maintenanceExcess","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"cashAvailable","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"exchangeSurplus","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"accruedCash","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"netLiquidity","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"marginEquity","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"sma","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"maintReq","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"email","type":"string","description":"Account email.","required":false},{"name":"cell","type":"string","description":"Account phone number.","required":false},{"name":"groupId","type":"string","description":"Sterling group ID.","required":false}]}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","description":"Server message for the `account` topic. `name` tells you what changed.","properties":{"type":{"type":"string","enum":["event"],"description":"Top-level message type. Always `event` for streaming updates.","x-parser-schema-id":"\u003canonymous-schema-184>"},"timestamp":{"type":"string","description":"Time when the server sent this event, in RFC3339 format.","x-parser-schema-id":"\u003canonymous-schema-185>"},"payload":{"type":"object","description":"Routing: `topic`, `name`, and `data` for the event.","properties":{"topic":{"type":"string","enum":["account"],"description":"Topic identifier. Always `account` for these events.","x-parser-schema-id":"\u003canonymous-schema-187>"},"name":{"type":"string","enum":["account.order","account.position","account.balance","account.balance.apex","account.info"],"description":"Event name","x-parser-schema-id":"\u003canonymous-schema-188>"},"target":{"type":"string","description":"Target identifier (e.g. account:ACC123456)","x-parser-schema-id":"\u003canonymous-schema-189>"},"data":{"oneOf":[{"type":"object","description":"Order update from the server. This includes the order plus fill details when the order changes.","properties":{"clOrdId":{"type":"string","description":"Client order ID.","x-parser-schema-id":"\u003canonymous-schema-105>"},"ordId":{"type":"string","description":"Broker/order ID.","x-parser-schema-id":"\u003canonymous-schema-106>"},"origClOrdId":{"type":"string","description":"Original client order ID for replaces/cancels.","x-parser-schema-id":"\u003canonymous-schema-107>"},"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-108>"},"clientId":{"type":"string","description":"Client/user ID.","x-parser-schema-id":"\u003canonymous-schema-109>"},"symbol":{"type":"string","description":"Trading symbol.","x-parser-schema-id":"\u003canonymous-schema-110>"},"side":{"type":"string","description":"Order side, for example BUY or SELL.","x-parser-schema-id":"\u003canonymous-schema-111>"},"type":{"type":"string","description":"Order type, for example LIMIT or MARKET.","x-parser-schema-id":"\u003canonymous-schema-112>"},"timeInForce":{"type":"string","description":"Time in force, for example DAY.","x-parser-schema-id":"\u003canonymous-schema-113>"},"qty":{"type":"string","description":"Order quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-114>"},"price":{"type":"string","description":"Limit price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-115>"},"stopPrice":{"type":"string","description":"Stop price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-116>"},"ordStatus":{"type":"string","enum":["NEW","PARTIALLY_FILLED","FILLED","DONE_FOR_DAY","CANCELED","REPLACED","PENDING_CANCEL","STOPPED","REJECTED","SUSPENDED","PENDING_NEW","CALCULATED","EXPIRED","ACCEPTED_FOR_BID","PENDING_REPLACE"],"description":"Order status.","x-parser-schema-id":"\u003canonymous-schema-117>"},"cumQty":{"type":"string","description":"Cumulative filled quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-118>"},"leavesQty":{"type":"string","description":"Remaining open quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-119>"},"avgPrice":{"type":"string","description":"Average execution price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-120>"},"currency":{"type":"string","description":"Currency code.","x-parser-schema-id":"\u003canonymous-schema-121>"},"exDestination":{"type":"string","description":"Execution destination, for example MNGDFTE or MNGD.","x-parser-schema-id":"\u003canonymous-schema-122>"},"text":{"type":"string","description":"Broker or venue message.","x-parser-schema-id":"\u003canonymous-schema-123>"},"ordRejReason":{"type":"string","description":"Order reject reason when present.","x-parser-schema-id":"\u003canonymous-schema-124>"},"securityType":{"type":"string","description":"Security type, for example EQUITY or OPTION.","x-parser-schema-id":"\u003canonymous-schema-125>"},"category":{"type":"string","description":"Order category, for example EQUITY, SINGLE_LEG, or MULTI_LEG.","x-parser-schema-id":"\u003canonymous-schema-126>"},"legs":{"type":"array","items":{"type":"object","description":"One option leg in an order update.","properties":{"symbol":{"type":"string","description":"Underlying or option symbol.","x-parser-schema-id":"\u003canonymous-schema-128>"},"side":{"type":"string","description":"Order side, for example BUY or SELL.","x-parser-schema-id":"\u003canonymous-schema-129>"},"ratioQty":{"type":"string","description":"Leg ratio quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-130>"},"securityType":{"type":"string","description":"Security type, for example OPTION.","x-parser-schema-id":"\u003canonymous-schema-131>"},"maturity":{"type":"string","description":"Option maturity date in YYYY-MM-DD format.","x-parser-schema-id":"\u003canonymous-schema-132>"},"strikePrice":{"type":"string","description":"Option strike price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-133>"},"positionEffect":{"type":"string","description":"Position effect, for example OPEN or CLOSE.","x-parser-schema-id":"\u003canonymous-schema-134>"},"putCall":{"type":"string","description":"Option side, CALL or PUT.","x-parser-schema-id":"\u003canonymous-schema-135>"},"avgPrice":{"type":"string","description":"Average fill price for the leg, serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-136>"}},"x-parser-schema-id":"AccountOrderLeg"},"x-parser-schema-id":"\u003canonymous-schema-127>"},"execId":{"type":"string","description":"Execution ID for fill events.","x-parser-schema-id":"\u003canonymous-schema-137>"},"execType":{"type":"string","description":"Execution type, for example NEW, FILL, PARTIAL_FILL, or REJECTED.","x-parser-schema-id":"\u003canonymous-schema-138>"},"lastPx":{"type":"string","description":"Last execution price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-139>"},"lastQty":{"type":"string","description":"Last execution quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-140>"},"maturity":{"type":"string","description":"Flat option maturity when sent on single-leg option orders.","x-parser-schema-id":"\u003canonymous-schema-141>"},"putCall":{"type":"string","description":"Flat option side, CALL or PUT.","x-parser-schema-id":"\u003canonymous-schema-142>"},"strikePrice":{"type":"string","description":"Flat option strike price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-143>"},"positionEffect":{"type":"string","description":"Flat option position effect.","x-parser-schema-id":"\u003canonymous-schema-144>"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp.","x-parser-schema-id":"\u003canonymous-schema-145>"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp.","x-parser-schema-id":"\u003canonymous-schema-146>"}},"x-parser-schema-id":"OrderData"},{"type":"object","description":"Position update from the server. Decimal numbers are sent as strings.","properties":{"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-86>"},"symbol":{"type":"string","description":"Equity or OCC option symbol.","x-parser-schema-id":"\u003canonymous-schema-87>"},"securityType":{"type":"string","description":"Security type, for example EQUITY or OPTION.","x-parser-schema-id":"\u003canonymous-schema-88>"},"qty":{"type":"string","description":"Position quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-89>"},"avgPrice":{"type":"string","description":"Average position price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-90>"},"avgCost":{"type":"string","description":"Backward-compatible alias of avgPrice.","x-parser-schema-id":"\u003canonymous-schema-91>"},"unRealizedPL":{"type":"string","description":"Unrealized P\u0026L serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-92>"},"todayRealizedPnL":{"type":"string","description":"Today realized P\u0026L serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-93>"},"mtmRealizedPnL":{"type":"string","description":"Mark-to-market realized P\u0026L measured against the previous close, serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-94>"},"realizedPL":{"type":"string","description":"Backward-compatible alias of todayRealizedPnL.","x-parser-schema-id":"\u003canonymous-schema-95>"},"todayPL":{"type":"string","description":"Today total P\u0026L serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-96>"},"instrument":{"type":"string","description":"Backward-compatible alias of securityType.","x-parser-schema-id":"\u003canonymous-schema-97>"},"putCall":{"type":"string","description":"CALL or PUT for options.","x-parser-schema-id":"\u003canonymous-schema-98>"},"strikePrice":{"type":"string","description":"Option strike price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-99>"},"maturity":{"type":"string","description":"Option maturity date in YYYY-MM-DD format.","x-parser-schema-id":"\u003canonymous-schema-100>"},"flags":{"type":"integer","description":"Position flags.","x-parser-schema-id":"\u003canonymous-schema-101>"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp.","x-parser-schema-id":"\u003canonymous-schema-102>"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp.","x-parser-schema-id":"\u003canonymous-schema-103>"}},"x-parser-schema-id":"PositionData"},{"type":"object","description":"Balance update from the server. Decimal numbers are sent as strings.","properties":{"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-190>"},"sodPositionsMarketValue":{"type":"string","description":"Start-of-day positions market value.","x-parser-schema-id":"\u003canonymous-schema-191>"},"netBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-192>"},"stockBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-193>"},"dayTradeBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-194>"},"optionBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-195>"},"dayTradeOvernightRegTBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-196>"},"totalEquity":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-197>"},"settledFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-198>"},"unsettledFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-199>"},"heldBackFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-200>"},"grossMargin":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-201>"},"pendingOrdersMarginRequirements":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-202>"},"maintReq":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-203>"},"creditMultiplier":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-204>"},"pendingOrdersCount":{"type":"integer","description":"Number of pending orders.","x-parser-schema-id":"\u003canonymous-schema-205>"},"credit":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-206>"},"creditRemaining":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-207>"},"realizedPL":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-208>"},"unRealizedPL":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-209>"},"SMA":{"type":"string","description":"Special memorandum account value.","x-parser-schema-id":"\u003canonymous-schema-210>"},"smaCreditRemaining":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-211>"},"PDT":{"type":"string","description":"Pattern day trader value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-212>"},"pdtCreditRemaining":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-213>"},"startOfDayCash":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-214>"},"valueBought":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-215>"},"valueSold":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-216>"},"sodTtlEquity":{"type":"string","description":"Optional start-of-day total equity.","x-parser-schema-id":"\u003canonymous-schema-217>"},"sodTtlEquityUpdatedAt":{"type":"string","format":"date-time","description":"Optional timestamp for sodTtlEquity.","x-parser-schema-id":"\u003canonymous-schema-218>"}},"x-parser-schema-id":"BalanceData"},{"type":"object","description":"Smaller balance update. Merge these fields into the latest balance data you already have.","properties":{"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-219>"},"fullyPaidUnsettledFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-220>"},"amountAvailableToWithdraw":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-221>"},"updatedAt":{"type":"string","format":"date-time","description":"Timestamp for the Apex update.","x-parser-schema-id":"\u003canonymous-schema-222>"}},"x-parser-schema-id":"ApexBalanceData"},{"type":"object","description":"Account info update from the server. Decimal numbers are sent as strings.","properties":{"id":{"type":"string","description":"Sterling account ID used for subscription routing.","x-parser-schema-id":"\u003canonymous-schema-223>"},"sterlingAccountId":{"type":"string","description":"Raw Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-224>"},"apexAccountId":{"type":"string","description":"Apex account ID when available.","x-parser-schema-id":"\u003canonymous-schema-225>"},"fdid":{"type":"string","description":"FDID when available.","x-parser-schema-id":"\u003canonymous-schema-226>"},"description":{"type":"string","description":"Account description.","x-parser-schema-id":"\u003canonymous-schema-227>"},"accountType":{"type":"string","description":"Account type.","x-parser-schema-id":"\u003canonymous-schema-228>"},"accountClass":{"type":"string","description":"Account class.","x-parser-schema-id":"\u003canonymous-schema-229>"},"optionsLevel":{"type":"string","description":"Options level.","x-parser-schema-id":"\u003canonymous-schema-230>"},"maintenanceExcess":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-231>"},"cashAvailable":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-232>"},"exchangeSurplus":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-233>"},"accruedCash":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-234>"},"netLiquidity":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-235>"},"marginEquity":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-236>"},"sma":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-237>"},"maintReq":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-238>"},"email":{"type":"string","description":"Account email.","x-parser-schema-id":"\u003canonymous-schema-239>"},"cell":{"type":"string","description":"Account phone number.","x-parser-schema-id":"\u003canonymous-schema-240>"},"groupId":{"type":"string","description":"Sterling group ID.","x-parser-schema-id":"\u003canonymous-schema-241>"}},"x-parser-schema-id":"AccountInfoData"}],"x-parser-schema-id":"AccountEventData"}},"x-parser-schema-id":"\u003canonymous-schema-186>"}},"x-parser-schema-id":"AccountEventPayload"},"title":"Balance Update","description":"Real-time balance update","example":"{\n \"type\": \"event\",\n \"timestamp\": \"2024-01-15T14:30:00Z\",\n \"payload\": {\n \"topic\": \"account\",\n \"name\": \"account.balance\",\n \"target\": \"account:ACC123456\",\n \"data\": {\n \"accountId\": \"ACC123456\",\n \"sodPositionsMarketValue\": \"48000.00\",\n \"netBuyingPower\": \"25155.00\",\n \"stockBuyingPower\": \"50310.00\",\n \"dayTradeBuyingPower\": \"100620.00\",\n \"optionBuyingPower\": \"25155.00\",\n \"dayTradeOvernightRegTBuyingPower\": \"50310.00\",\n \"totalEquity\": \"50155.00\",\n \"settledFunds\": \"35000.00\",\n \"unsettledFunds\": \"0\",\n \"heldBackFunds\": \"0\",\n \"grossMargin\": \"15045.00\",\n \"pendingOrdersMarginRequirements\": \"0\",\n \"maintReq\": \"7646.50\",\n \"creditMultiplier\": \"2\",\n \"pendingOrdersCount\": 0,\n \"credit\": \"50000.00\",\n \"creditRemaining\": \"25155.00\",\n \"realizedPL\": \"0\",\n \"unRealizedPL\": \"167.00\",\n \"SMA\": \"25155.00\",\n \"smaCreditRemaining\": \"25155.00\",\n \"PDT\": \"0\",\n \"pdtCreditRemaining\": \"100620.00\",\n \"startOfDayCash\": \"35000.00\",\n \"valueBought\": \"15293.00\",\n \"valueSold\": \"0\"\n }\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"balanceUpdate"}]},{"id":"accountUpdate","contentType":"application/json","payload":[{"name":"Account Info Update","description":"Real-time account information update","type":"object","properties":[{"name":"type","type":"string","description":"Top-level message type. Always `event` for streaming updates.","enumValues":["event"],"required":false},{"name":"timestamp","type":"string","description":"Time when the server sent this event, in RFC3339 format.","required":false},{"name":"payload","type":"object","description":"Routing: `topic`, `name`, and `data` for the event.","required":false,"properties":[{"name":"topic","type":"string","description":"Topic identifier. Always `account` for these events.","enumValues":["account"],"required":false},{"name":"name","type":"string","description":"Event name","enumValues":["account.order","account.position","account.balance","account.balance.apex","account.info"],"required":false},{"name":"target","type":"string","description":"Target identifier (e.g. account:ACC123456)","required":false},{"name":"data","type":"object","required":false,"properties":[{"name":"clOrdId","type":"string","description":"Client order ID.","required":false},{"name":"ordId","type":"string","description":"Broker/order ID.","required":false},{"name":"origClOrdId","type":"string","description":"Original client order ID for replaces/cancels.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"clientId","type":"string","description":"Client/user ID.","required":false},{"name":"symbol","type":"string","description":"Trading symbol.","required":false},{"name":"side","type":"string","description":"Order side, for example BUY or SELL.","required":false},{"name":"type","type":"string","description":"Order type, for example LIMIT or MARKET.","required":false},{"name":"timeInForce","type":"string","description":"Time in force, for example DAY.","required":false},{"name":"qty","type":"string","description":"Order quantity serialized as a string.","required":false},{"name":"price","type":"string","description":"Limit price serialized as a string.","required":false},{"name":"stopPrice","type":"string","description":"Stop price serialized as a string.","required":false},{"name":"ordStatus","type":"string","description":"Order status.","enumValues":["NEW","PARTIALLY_FILLED","FILLED","DONE_FOR_DAY","CANCELED","REPLACED","PENDING_CANCEL","STOPPED","REJECTED","SUSPENDED","PENDING_NEW","CALCULATED","EXPIRED","ACCEPTED_FOR_BID","PENDING_REPLACE"],"required":false},{"name":"cumQty","type":"string","description":"Cumulative filled quantity serialized as a string.","required":false},{"name":"leavesQty","type":"string","description":"Remaining open quantity serialized as a string.","required":false},{"name":"avgPrice","type":"string","description":"Average execution price serialized as a string.","required":false},{"name":"currency","type":"string","description":"Currency code.","required":false},{"name":"exDestination","type":"string","description":"Execution destination, for example MNGDFTE or MNGD.","required":false},{"name":"text","type":"string","description":"Broker or venue message.","required":false},{"name":"ordRejReason","type":"string","description":"Order reject reason when present.","required":false},{"name":"securityType","type":"string","description":"Security type, for example EQUITY or OPTION.","required":false},{"name":"category","type":"string","description":"Order category, for example EQUITY, SINGLE_LEG, or MULTI_LEG.","required":false},{"name":"legs","type":"array","required":false,"properties":[{"name":"symbol","type":"string","description":"Underlying or option symbol.","required":false},{"name":"side","type":"string","description":"Order side, for example BUY or SELL.","required":false},{"name":"ratioQty","type":"string","description":"Leg ratio quantity serialized as a string.","required":false},{"name":"securityType","type":"string","description":"Security type, for example OPTION.","required":false},{"name":"maturity","type":"string","description":"Option maturity date in YYYY-MM-DD format.","required":false},{"name":"strikePrice","type":"string","description":"Option strike price serialized as a string.","required":false},{"name":"positionEffect","type":"string","description":"Position effect, for example OPEN or CLOSE.","required":false},{"name":"putCall","type":"string","description":"Option side, CALL or PUT.","required":false},{"name":"avgPrice","type":"string","description":"Average fill price for the leg, serialized as a string.","required":false}]},{"name":"execId","type":"string","description":"Execution ID for fill events.","required":false},{"name":"execType","type":"string","description":"Execution type, for example NEW, FILL, PARTIAL_FILL, or REJECTED.","required":false},{"name":"lastPx","type":"string","description":"Last execution price serialized as a string.","required":false},{"name":"lastQty","type":"string","description":"Last execution quantity serialized as a string.","required":false},{"name":"maturity","type":"string","description":"Flat option maturity when sent on single-leg option orders.","required":false},{"name":"putCall","type":"string","description":"Flat option side, CALL or PUT.","required":false},{"name":"strikePrice","type":"string","description":"Flat option strike price serialized as a string.","required":false},{"name":"positionEffect","type":"string","description":"Flat option position effect.","required":false},{"name":"createdAt","type":"string","description":"Creation timestamp.","required":false},{"name":"updatedAt","type":"string","description":"Last update timestamp.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"symbol","type":"string","description":"Equity or OCC option symbol.","required":false},{"name":"securityType","type":"string","description":"Security type, for example EQUITY or OPTION.","required":false},{"name":"qty","type":"string","description":"Position quantity serialized as a string.","required":false},{"name":"avgPrice","type":"string","description":"Average position price serialized as a string.","required":false},{"name":"avgCost","type":"string","description":"Backward-compatible alias of avgPrice.","required":false},{"name":"unRealizedPL","type":"string","description":"Unrealized P\u0026L serialized as a string.","required":false},{"name":"todayRealizedPnL","type":"string","description":"Today realized P\u0026L serialized as a string.","required":false},{"name":"mtmRealizedPnL","type":"string","description":"Mark-to-market realized P\u0026L measured against the previous close, serialized as a string.","required":false},{"name":"realizedPL","type":"string","description":"Backward-compatible alias of todayRealizedPnL.","required":false},{"name":"todayPL","type":"string","description":"Today total P\u0026L serialized as a string.","required":false},{"name":"instrument","type":"string","description":"Backward-compatible alias of securityType.","required":false},{"name":"putCall","type":"string","description":"CALL or PUT for options.","required":false},{"name":"strikePrice","type":"string","description":"Option strike price serialized as a string.","required":false},{"name":"maturity","type":"string","description":"Option maturity date in YYYY-MM-DD format.","required":false},{"name":"flags","type":"integer","description":"Position flags.","required":false},{"name":"createdAt","type":"string","description":"Creation timestamp.","required":false},{"name":"updatedAt","type":"string","description":"Last update timestamp.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"sodPositionsMarketValue","type":"string","description":"Start-of-day positions market value.","required":false},{"name":"netBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"stockBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"dayTradeBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"optionBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"dayTradeOvernightRegTBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"totalEquity","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"settledFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"unsettledFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"heldBackFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"grossMargin","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"pendingOrdersMarginRequirements","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"maintReq","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"creditMultiplier","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"pendingOrdersCount","type":"integer","description":"Number of pending orders.","required":false},{"name":"credit","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"creditRemaining","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"realizedPL","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"unRealizedPL","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"SMA","type":"string","description":"Special memorandum account value.","required":false},{"name":"smaCreditRemaining","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"PDT","type":"string","description":"Pattern day trader value serialized as a string.","required":false},{"name":"pdtCreditRemaining","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"startOfDayCash","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"valueBought","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"valueSold","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"sodTtlEquity","type":"string","description":"Optional start-of-day total equity.","required":false},{"name":"sodTtlEquityUpdatedAt","type":"string","description":"Optional timestamp for sodTtlEquity.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"fullyPaidUnsettledFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"amountAvailableToWithdraw","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"updatedAt","type":"string","description":"Timestamp for the Apex update.","required":false},{"name":"id","type":"string","description":"Sterling account ID used for subscription routing.","required":false},{"name":"sterlingAccountId","type":"string","description":"Raw Sterling account ID.","required":false},{"name":"apexAccountId","type":"string","description":"Apex account ID when available.","required":false},{"name":"fdid","type":"string","description":"FDID when available.","required":false},{"name":"description","type":"string","description":"Account description.","required":false},{"name":"accountType","type":"string","description":"Account type.","required":false},{"name":"accountClass","type":"string","description":"Account class.","required":false},{"name":"optionsLevel","type":"string","description":"Options level.","required":false},{"name":"maintenanceExcess","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"cashAvailable","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"exchangeSurplus","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"accruedCash","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"netLiquidity","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"marginEquity","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"sma","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"maintReq","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"email","type":"string","description":"Account email.","required":false},{"name":"cell","type":"string","description":"Account phone number.","required":false},{"name":"groupId","type":"string","description":"Sterling group ID.","required":false}]}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","description":"Server message for the `account` topic. `name` tells you what changed.","properties":{"type":{"type":"string","enum":["event"],"description":"Top-level message type. Always `event` for streaming updates.","x-parser-schema-id":"\u003canonymous-schema-184>"},"timestamp":{"type":"string","description":"Time when the server sent this event, in RFC3339 format.","x-parser-schema-id":"\u003canonymous-schema-185>"},"payload":{"type":"object","description":"Routing: `topic`, `name`, and `data` for the event.","properties":{"topic":{"type":"string","enum":["account"],"description":"Topic identifier. Always `account` for these events.","x-parser-schema-id":"\u003canonymous-schema-187>"},"name":{"type":"string","enum":["account.order","account.position","account.balance","account.balance.apex","account.info"],"description":"Event name","x-parser-schema-id":"\u003canonymous-schema-188>"},"target":{"type":"string","description":"Target identifier (e.g. account:ACC123456)","x-parser-schema-id":"\u003canonymous-schema-189>"},"data":{"oneOf":[{"type":"object","description":"Order update from the server. This includes the order plus fill details when the order changes.","properties":{"clOrdId":{"type":"string","description":"Client order ID.","x-parser-schema-id":"\u003canonymous-schema-105>"},"ordId":{"type":"string","description":"Broker/order ID.","x-parser-schema-id":"\u003canonymous-schema-106>"},"origClOrdId":{"type":"string","description":"Original client order ID for replaces/cancels.","x-parser-schema-id":"\u003canonymous-schema-107>"},"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-108>"},"clientId":{"type":"string","description":"Client/user ID.","x-parser-schema-id":"\u003canonymous-schema-109>"},"symbol":{"type":"string","description":"Trading symbol.","x-parser-schema-id":"\u003canonymous-schema-110>"},"side":{"type":"string","description":"Order side, for example BUY or SELL.","x-parser-schema-id":"\u003canonymous-schema-111>"},"type":{"type":"string","description":"Order type, for example LIMIT or MARKET.","x-parser-schema-id":"\u003canonymous-schema-112>"},"timeInForce":{"type":"string","description":"Time in force, for example DAY.","x-parser-schema-id":"\u003canonymous-schema-113>"},"qty":{"type":"string","description":"Order quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-114>"},"price":{"type":"string","description":"Limit price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-115>"},"stopPrice":{"type":"string","description":"Stop price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-116>"},"ordStatus":{"type":"string","enum":["NEW","PARTIALLY_FILLED","FILLED","DONE_FOR_DAY","CANCELED","REPLACED","PENDING_CANCEL","STOPPED","REJECTED","SUSPENDED","PENDING_NEW","CALCULATED","EXPIRED","ACCEPTED_FOR_BID","PENDING_REPLACE"],"description":"Order status.","x-parser-schema-id":"\u003canonymous-schema-117>"},"cumQty":{"type":"string","description":"Cumulative filled quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-118>"},"leavesQty":{"type":"string","description":"Remaining open quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-119>"},"avgPrice":{"type":"string","description":"Average execution price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-120>"},"currency":{"type":"string","description":"Currency code.","x-parser-schema-id":"\u003canonymous-schema-121>"},"exDestination":{"type":"string","description":"Execution destination, for example MNGDFTE or MNGD.","x-parser-schema-id":"\u003canonymous-schema-122>"},"text":{"type":"string","description":"Broker or venue message.","x-parser-schema-id":"\u003canonymous-schema-123>"},"ordRejReason":{"type":"string","description":"Order reject reason when present.","x-parser-schema-id":"\u003canonymous-schema-124>"},"securityType":{"type":"string","description":"Security type, for example EQUITY or OPTION.","x-parser-schema-id":"\u003canonymous-schema-125>"},"category":{"type":"string","description":"Order category, for example EQUITY, SINGLE_LEG, or MULTI_LEG.","x-parser-schema-id":"\u003canonymous-schema-126>"},"legs":{"type":"array","items":{"type":"object","description":"One option leg in an order update.","properties":{"symbol":{"type":"string","description":"Underlying or option symbol.","x-parser-schema-id":"\u003canonymous-schema-128>"},"side":{"type":"string","description":"Order side, for example BUY or SELL.","x-parser-schema-id":"\u003canonymous-schema-129>"},"ratioQty":{"type":"string","description":"Leg ratio quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-130>"},"securityType":{"type":"string","description":"Security type, for example OPTION.","x-parser-schema-id":"\u003canonymous-schema-131>"},"maturity":{"type":"string","description":"Option maturity date in YYYY-MM-DD format.","x-parser-schema-id":"\u003canonymous-schema-132>"},"strikePrice":{"type":"string","description":"Option strike price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-133>"},"positionEffect":{"type":"string","description":"Position effect, for example OPEN or CLOSE.","x-parser-schema-id":"\u003canonymous-schema-134>"},"putCall":{"type":"string","description":"Option side, CALL or PUT.","x-parser-schema-id":"\u003canonymous-schema-135>"},"avgPrice":{"type":"string","description":"Average fill price for the leg, serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-136>"}},"x-parser-schema-id":"AccountOrderLeg"},"x-parser-schema-id":"\u003canonymous-schema-127>"},"execId":{"type":"string","description":"Execution ID for fill events.","x-parser-schema-id":"\u003canonymous-schema-137>"},"execType":{"type":"string","description":"Execution type, for example NEW, FILL, PARTIAL_FILL, or REJECTED.","x-parser-schema-id":"\u003canonymous-schema-138>"},"lastPx":{"type":"string","description":"Last execution price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-139>"},"lastQty":{"type":"string","description":"Last execution quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-140>"},"maturity":{"type":"string","description":"Flat option maturity when sent on single-leg option orders.","x-parser-schema-id":"\u003canonymous-schema-141>"},"putCall":{"type":"string","description":"Flat option side, CALL or PUT.","x-parser-schema-id":"\u003canonymous-schema-142>"},"strikePrice":{"type":"string","description":"Flat option strike price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-143>"},"positionEffect":{"type":"string","description":"Flat option position effect.","x-parser-schema-id":"\u003canonymous-schema-144>"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp.","x-parser-schema-id":"\u003canonymous-schema-145>"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp.","x-parser-schema-id":"\u003canonymous-schema-146>"}},"x-parser-schema-id":"OrderData"},{"type":"object","description":"Position update from the server. Decimal numbers are sent as strings.","properties":{"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-86>"},"symbol":{"type":"string","description":"Equity or OCC option symbol.","x-parser-schema-id":"\u003canonymous-schema-87>"},"securityType":{"type":"string","description":"Security type, for example EQUITY or OPTION.","x-parser-schema-id":"\u003canonymous-schema-88>"},"qty":{"type":"string","description":"Position quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-89>"},"avgPrice":{"type":"string","description":"Average position price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-90>"},"avgCost":{"type":"string","description":"Backward-compatible alias of avgPrice.","x-parser-schema-id":"\u003canonymous-schema-91>"},"unRealizedPL":{"type":"string","description":"Unrealized P\u0026L serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-92>"},"todayRealizedPnL":{"type":"string","description":"Today realized P\u0026L serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-93>"},"mtmRealizedPnL":{"type":"string","description":"Mark-to-market realized P\u0026L measured against the previous close, serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-94>"},"realizedPL":{"type":"string","description":"Backward-compatible alias of todayRealizedPnL.","x-parser-schema-id":"\u003canonymous-schema-95>"},"todayPL":{"type":"string","description":"Today total P\u0026L serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-96>"},"instrument":{"type":"string","description":"Backward-compatible alias of securityType.","x-parser-schema-id":"\u003canonymous-schema-97>"},"putCall":{"type":"string","description":"CALL or PUT for options.","x-parser-schema-id":"\u003canonymous-schema-98>"},"strikePrice":{"type":"string","description":"Option strike price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-99>"},"maturity":{"type":"string","description":"Option maturity date in YYYY-MM-DD format.","x-parser-schema-id":"\u003canonymous-schema-100>"},"flags":{"type":"integer","description":"Position flags.","x-parser-schema-id":"\u003canonymous-schema-101>"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp.","x-parser-schema-id":"\u003canonymous-schema-102>"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp.","x-parser-schema-id":"\u003canonymous-schema-103>"}},"x-parser-schema-id":"PositionData"},{"type":"object","description":"Balance update from the server. Decimal numbers are sent as strings.","properties":{"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-190>"},"sodPositionsMarketValue":{"type":"string","description":"Start-of-day positions market value.","x-parser-schema-id":"\u003canonymous-schema-191>"},"netBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-192>"},"stockBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-193>"},"dayTradeBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-194>"},"optionBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-195>"},"dayTradeOvernightRegTBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-196>"},"totalEquity":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-197>"},"settledFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-198>"},"unsettledFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-199>"},"heldBackFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-200>"},"grossMargin":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-201>"},"pendingOrdersMarginRequirements":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-202>"},"maintReq":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-203>"},"creditMultiplier":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-204>"},"pendingOrdersCount":{"type":"integer","description":"Number of pending orders.","x-parser-schema-id":"\u003canonymous-schema-205>"},"credit":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-206>"},"creditRemaining":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-207>"},"realizedPL":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-208>"},"unRealizedPL":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-209>"},"SMA":{"type":"string","description":"Special memorandum account value.","x-parser-schema-id":"\u003canonymous-schema-210>"},"smaCreditRemaining":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-211>"},"PDT":{"type":"string","description":"Pattern day trader value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-212>"},"pdtCreditRemaining":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-213>"},"startOfDayCash":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-214>"},"valueBought":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-215>"},"valueSold":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-216>"},"sodTtlEquity":{"type":"string","description":"Optional start-of-day total equity.","x-parser-schema-id":"\u003canonymous-schema-217>"},"sodTtlEquityUpdatedAt":{"type":"string","format":"date-time","description":"Optional timestamp for sodTtlEquity.","x-parser-schema-id":"\u003canonymous-schema-218>"}},"x-parser-schema-id":"BalanceData"},{"type":"object","description":"Smaller balance update. Merge these fields into the latest balance data you already have.","properties":{"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-219>"},"fullyPaidUnsettledFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-220>"},"amountAvailableToWithdraw":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-221>"},"updatedAt":{"type":"string","format":"date-time","description":"Timestamp for the Apex update.","x-parser-schema-id":"\u003canonymous-schema-222>"}},"x-parser-schema-id":"ApexBalanceData"},{"type":"object","description":"Account info update from the server. Decimal numbers are sent as strings.","properties":{"id":{"type":"string","description":"Sterling account ID used for subscription routing.","x-parser-schema-id":"\u003canonymous-schema-223>"},"sterlingAccountId":{"type":"string","description":"Raw Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-224>"},"apexAccountId":{"type":"string","description":"Apex account ID when available.","x-parser-schema-id":"\u003canonymous-schema-225>"},"fdid":{"type":"string","description":"FDID when available.","x-parser-schema-id":"\u003canonymous-schema-226>"},"description":{"type":"string","description":"Account description.","x-parser-schema-id":"\u003canonymous-schema-227>"},"accountType":{"type":"string","description":"Account type.","x-parser-schema-id":"\u003canonymous-schema-228>"},"accountClass":{"type":"string","description":"Account class.","x-parser-schema-id":"\u003canonymous-schema-229>"},"optionsLevel":{"type":"string","description":"Options level.","x-parser-schema-id":"\u003canonymous-schema-230>"},"maintenanceExcess":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-231>"},"cashAvailable":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-232>"},"exchangeSurplus":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-233>"},"accruedCash":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-234>"},"netLiquidity":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-235>"},"marginEquity":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-236>"},"sma":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-237>"},"maintReq":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-238>"},"email":{"type":"string","description":"Account email.","x-parser-schema-id":"\u003canonymous-schema-239>"},"cell":{"type":"string","description":"Account phone number.","x-parser-schema-id":"\u003canonymous-schema-240>"},"groupId":{"type":"string","description":"Sterling group ID.","x-parser-schema-id":"\u003canonymous-schema-241>"}},"x-parser-schema-id":"AccountInfoData"}],"x-parser-schema-id":"AccountEventData"}},"x-parser-schema-id":"\u003canonymous-schema-186>"}},"x-parser-schema-id":"AccountEventPayload"},"title":"Account Info Update","description":"Real-time account information update","example":"{\n \"type\": \"event\",\n \"timestamp\": \"2024-01-15T14:30:00Z\",\n \"payload\": {\n \"topic\": \"account\",\n \"name\": \"account.info\",\n \"target\": \"account:ACC123456\",\n \"data\": {\n \"id\": \"ACC123456\",\n \"sterlingAccountId\": \"STERLING-123\",\n \"apexAccountId\": \"\",\n \"fdid\": \"FDID-123456\",\n \"description\": \"John Doe Trading Account\",\n \"accountType\": \"MARGIN\",\n \"accountClass\": \"INDIVIDUAL\",\n \"optionsLevel\": \"LEVEL_3\",\n \"maintenanceExcess\": \"17508.50\",\n \"cashAvailable\": \"25155.00\",\n \"exchangeSurplus\": \"0\",\n \"accruedCash\": \"0\",\n \"netLiquidity\": \"50155.00\",\n \"marginEquity\": \"50155.00\",\n \"sma\": \"25155.00\",\n \"maintReq\": \"7646.50\",\n \"email\": \"john.doe@example.com\",\n \"cell\": \"+1234567890\",\n \"groupId\": \"TRADING\"\n }\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"accountUpdate"}]},{"id":"pnlCandleUpdate","contentType":"application/json","payload":[{"name":"P\u0026L Candle Update","description":"Live profit and loss updates","type":"object","properties":[{"name":"type","type":"string","description":"Top-level message type. Always `event` for P\u0026L updates.","enumValues":["event"],"required":false},{"name":"timestamp","type":"string","description":"Time when the server sent this event, in RFC3339 format.","required":false},{"name":"payload","type":"object","description":"The `pnl` topic name and its data.","required":false,"properties":[{"name":"topic","type":"string","description":"Topic identifier. Always `pnl`.","enumValues":["pnl"],"required":false},{"name":"data","type":"object","description":"Profit and loss chart data. This includes timestamp, close, and equity arrays.","required":false,"properties":[{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"interval","type":"string","description":"Candle interval.","required":false},{"name":"t","type":"array","description":"Unix timestamps in seconds.","required":false,"properties":[{"name":"item","type":"integer","required":false}]},{"name":"c","type":"array","description":"Close/equity values.","required":false,"properties":[{"name":"item","type":"number","required":false}]}]}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","description":"Server message for the `pnl` topic.","properties":{"type":{"type":"string","enum":["event"],"description":"Top-level message type. Always `event` for P\u0026L updates.","x-parser-schema-id":"\u003canonymous-schema-242>"},"timestamp":{"type":"string","description":"Time when the server sent this event, in RFC3339 format.","x-parser-schema-id":"\u003canonymous-schema-243>"},"payload":{"type":"object","description":"The `pnl` topic name and its data.","properties":{"topic":{"type":"string","enum":["pnl"],"description":"Topic identifier. Always `pnl`.","x-parser-schema-id":"\u003canonymous-schema-245>"},"data":{"type":"object","description":"Profit and loss chart data. This includes timestamp, close, and equity arrays.","properties":{"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-148>"},"interval":{"type":"string","description":"Candle interval.","x-parser-schema-id":"\u003canonymous-schema-149>"},"t":{"type":"array","items":{"type":"integer","x-parser-schema-id":"\u003canonymous-schema-151>"},"description":"Unix timestamps in seconds.","x-parser-schema-id":"\u003canonymous-schema-150>"},"c":{"type":"array","items":{"type":"number","x-parser-schema-id":"\u003canonymous-schema-153>"},"description":"Close/equity values.","x-parser-schema-id":"\u003canonymous-schema-152>"}},"x-parser-schema-id":"PnLCandleData"}},"x-parser-schema-id":"\u003canonymous-schema-244>"}},"x-parser-schema-id":"PnLEventPayload"},"title":"P\u0026L Candle Update","description":"Live profit and loss updates","example":"{\n \"type\": \"event\",\n \"timestamp\": \"2024-01-15T10:30:00Z\",\n \"payload\": {\n \"topic\": \"pnl\",\n \"data\": {\n \"accountId\": \"ACC123456\",\n \"interval\": \"1m\",\n \"t\": [\n 1703001000\n ],\n \"c\": [\n 50155\n ]\n }\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"pnlCandleUpdate"}]},{"id":"watchlistUpdate","contentType":"application/json","payload":[{"name":"Watchlist Update","description":"Real-time watchlist updates","type":"object","properties":[{"name":"type","type":"string","description":"Top-level message type. Always `event` for watchlist/news.","enumValues":["event"],"required":false},{"name":"timestamp","type":"string","description":"Time when the server sent this event, in RFC3339 format.","required":false},{"name":"payload","type":"object","description":"The topic name and the data for that event.","required":false,"properties":[{"name":"topic","type":"string","description":"Topic identifier","enumValues":["watchlist","news"],"required":false},{"name":"data","type":"array","required":false,"properties":[{"name":"id","type":"integer","description":"Watchlist ID.","required":false},{"name":"name","type":"string","description":"User-facing watchlist name.","required":false},{"name":"symbols","type":"array","description":"Symbols currently saved in the watchlist.","required":false,"properties":[{"name":"item","type":"string","required":false}]},{"name":"id","type":"integer","description":"Unique news ID.","required":false},{"name":"title","type":"string","description":"Article title.","required":false},{"name":"news_type","type":"string","description":"News type, for example news or press_release.","required":false},{"name":"symbols","type":"array","description":"Related symbols.","required":false,"properties":[{"name":"item","type":"string","required":false}]},{"name":"authors","type":"array","description":"Article authors.","required":false,"properties":[{"name":"item","type":"string","required":false}]},{"name":"timestamp","type":"string","description":"Publication timestamp.","required":false},{"name":"body","type":"string","description":"Full article content when available.","required":false},{"name":"action","type":"string","description":"Action string when available.","required":false}]}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","description":"Server message for the `watchlist` or `news` topic.","properties":{"type":{"type":"string","enum":["event"],"description":"Top-level message type. Always `event` for watchlist/news.","x-parser-schema-id":"\u003canonymous-schema-246>"},"timestamp":{"type":"string","description":"Time when the server sent this event, in RFC3339 format.","x-parser-schema-id":"\u003canonymous-schema-247>"},"payload":{"type":"object","description":"The topic name and the data for that event.","properties":{"topic":{"type":"string","enum":["watchlist","news"],"description":"Topic identifier","x-parser-schema-id":"\u003canonymous-schema-249>"},"data":{"oneOf":[{"type":"array","description":"Current watchlists for the signed-in user. The same list shape is used in the first subscribe reply and later watchlist events.","items":{"type":"object","description":"One saved watchlist from shared/domains/watchlist.Watchlist.","properties":{"id":{"type":"integer","description":"Watchlist ID.","x-parser-schema-id":"\u003canonymous-schema-154>"},"name":{"type":"string","description":"User-facing watchlist name.","x-parser-schema-id":"\u003canonymous-schema-155>"},"symbols":{"type":"array","items":{"type":"string","x-parser-schema-id":"\u003canonymous-schema-157>"},"description":"Symbols currently saved in the watchlist.","x-parser-schema-id":"\u003canonymous-schema-156>"}},"x-parser-schema-id":"WatchlistEntry"},"x-parser-schema-id":"WatchlistSnapshotData"},{"type":"array","description":"Initial news snapshot returned after a news subscription succeeds.","items":{"type":"object","description":"One news item.","properties":{"id":{"type":"integer","description":"Unique news ID.","x-parser-schema-id":"\u003canonymous-schema-158>"},"title":{"type":"string","description":"Article title.","x-parser-schema-id":"\u003canonymous-schema-159>"},"news_type":{"type":"string","description":"News type, for example news or press_release.","x-parser-schema-id":"\u003canonymous-schema-160>"},"symbols":{"type":"array","items":{"type":"string","x-parser-schema-id":"\u003canonymous-schema-162>"},"description":"Related symbols.","x-parser-schema-id":"\u003canonymous-schema-161>"},"authors":{"type":"array","items":{"type":"string","x-parser-schema-id":"\u003canonymous-schema-164>"},"description":"Article authors.","x-parser-schema-id":"\u003canonymous-schema-163>"},"timestamp":{"type":"string","format":"date-time","description":"Publication timestamp.","x-parser-schema-id":"\u003canonymous-schema-165>"},"body":{"type":"string","description":"Full article content when available.","x-parser-schema-id":"\u003canonymous-schema-166>"},"action":{"type":"string","description":"Action string when available.","x-parser-schema-id":"\u003canonymous-schema-167>"}},"x-parser-schema-id":"NewsItem"},"x-parser-schema-id":"NewsSnapshotData"}],"x-parser-schema-id":"\u003canonymous-schema-250>"}},"x-parser-schema-id":"\u003canonymous-schema-248>"}},"x-parser-schema-id":"TopicEventPayload"},"title":"Watchlist Update","description":"Real-time watchlist updates","example":"{\n \"type\": \"event\",\n \"timestamp\": \"2024-01-15T14:30:00Z\",\n \"payload\": {\n \"topic\": \"watchlist\",\n \"data\": [\n {\n \"id\": 101,\n \"name\": \"Core holdings\",\n \"symbols\": [\n \"AAPL\",\n \"MSFT\",\n \"NVDA\",\n \"TSLA\"\n ]\n },\n {\n \"id\": 205,\n \"name\": \"Earnings radar\",\n \"symbols\": [\n \"AMD\"\n ]\n }\n ]\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"watchlistUpdate"}]},{"id":"newsUpdate","contentType":"application/json","payload":[{"name":"News Update","description":"Real-time news updates","type":"object","properties":[{"name":"type","type":"string","description":"Top-level message type. Always `event` for watchlist/news.","enumValues":["event"],"required":false},{"name":"timestamp","type":"string","description":"Time when the server sent this event, in RFC3339 format.","required":false},{"name":"payload","type":"object","description":"The topic name and the data for that event.","required":false,"properties":[{"name":"topic","type":"string","description":"Topic identifier","enumValues":["watchlist","news"],"required":false},{"name":"data","type":"array","required":false,"properties":[{"name":"id","type":"integer","description":"Watchlist ID.","required":false},{"name":"name","type":"string","description":"User-facing watchlist name.","required":false},{"name":"symbols","type":"array","description":"Symbols currently saved in the watchlist.","required":false,"properties":[{"name":"item","type":"string","required":false}]},{"name":"id","type":"integer","description":"Unique news ID.","required":false},{"name":"title","type":"string","description":"Article title.","required":false},{"name":"news_type","type":"string","description":"News type, for example news or press_release.","required":false},{"name":"symbols","type":"array","description":"Related symbols.","required":false,"properties":[{"name":"item","type":"string","required":false}]},{"name":"authors","type":"array","description":"Article authors.","required":false,"properties":[{"name":"item","type":"string","required":false}]},{"name":"timestamp","type":"string","description":"Publication timestamp.","required":false},{"name":"body","type":"string","description":"Full article content when available.","required":false},{"name":"action","type":"string","description":"Action string when available.","required":false}]}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","description":"Server message for the `watchlist` or `news` topic.","properties":{"type":{"type":"string","enum":["event"],"description":"Top-level message type. Always `event` for watchlist/news.","x-parser-schema-id":"\u003canonymous-schema-246>"},"timestamp":{"type":"string","description":"Time when the server sent this event, in RFC3339 format.","x-parser-schema-id":"\u003canonymous-schema-247>"},"payload":{"type":"object","description":"The topic name and the data for that event.","properties":{"topic":{"type":"string","enum":["watchlist","news"],"description":"Topic identifier","x-parser-schema-id":"\u003canonymous-schema-249>"},"data":{"oneOf":[{"type":"array","description":"Current watchlists for the signed-in user. The same list shape is used in the first subscribe reply and later watchlist events.","items":{"type":"object","description":"One saved watchlist from shared/domains/watchlist.Watchlist.","properties":{"id":{"type":"integer","description":"Watchlist ID.","x-parser-schema-id":"\u003canonymous-schema-154>"},"name":{"type":"string","description":"User-facing watchlist name.","x-parser-schema-id":"\u003canonymous-schema-155>"},"symbols":{"type":"array","items":{"type":"string","x-parser-schema-id":"\u003canonymous-schema-157>"},"description":"Symbols currently saved in the watchlist.","x-parser-schema-id":"\u003canonymous-schema-156>"}},"x-parser-schema-id":"WatchlistEntry"},"x-parser-schema-id":"WatchlistSnapshotData"},{"type":"array","description":"Initial news snapshot returned after a news subscription succeeds.","items":{"type":"object","description":"One news item.","properties":{"id":{"type":"integer","description":"Unique news ID.","x-parser-schema-id":"\u003canonymous-schema-158>"},"title":{"type":"string","description":"Article title.","x-parser-schema-id":"\u003canonymous-schema-159>"},"news_type":{"type":"string","description":"News type, for example news or press_release.","x-parser-schema-id":"\u003canonymous-schema-160>"},"symbols":{"type":"array","items":{"type":"string","x-parser-schema-id":"\u003canonymous-schema-162>"},"description":"Related symbols.","x-parser-schema-id":"\u003canonymous-schema-161>"},"authors":{"type":"array","items":{"type":"string","x-parser-schema-id":"\u003canonymous-schema-164>"},"description":"Article authors.","x-parser-schema-id":"\u003canonymous-schema-163>"},"timestamp":{"type":"string","format":"date-time","description":"Publication timestamp.","x-parser-schema-id":"\u003canonymous-schema-165>"},"body":{"type":"string","description":"Full article content when available.","x-parser-schema-id":"\u003canonymous-schema-166>"},"action":{"type":"string","description":"Action string when available.","x-parser-schema-id":"\u003canonymous-schema-167>"}},"x-parser-schema-id":"NewsItem"},"x-parser-schema-id":"NewsSnapshotData"}],"x-parser-schema-id":"\u003canonymous-schema-250>"}},"x-parser-schema-id":"\u003canonymous-schema-248>"}},"x-parser-schema-id":"TopicEventPayload"},"title":"News Update","description":"Real-time news updates","example":"{\n \"type\": \"event\",\n \"timestamp\": \"2024-01-15T14:30:00Z\",\n \"payload\": {\n \"topic\": \"news\",\n \"data\": [\n {\n \"id\": 12345,\n \"title\": \"Fed Announces Rate Decision\",\n \"news_type\": \"news\",\n \"authors\": [\n \"Reuters\"\n ],\n \"timestamp\": \"2024-01-15T14:30:00Z\",\n \"symbols\": [\n \"SPY\",\n \"QQQ\"\n ]\n }\n ]\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"newsUpdate"}]},{"id":"errorResponse","contentType":"application/json","payload":[{"name":"Error","description":"Error response","type":"object","properties":[{"name":"type","type":"string","description":"Top-level message type. Always `response` for errors.","enumValues":["response"],"required":false},{"name":"id","type":"string","description":"Request ID from the message that caused this error, if there was one.","required":false},{"name":"timestamp","type":"string","description":"Time when the server sent this error, in RFC3339 format.","required":false},{"name":"payload","type":"object","description":"Error details returned by the server.","required":false,"properties":[{"name":"status","type":"integer","description":"Status code for the error, such as `400`, `401`, or `403`.","required":false},{"name":"error","type":"string","description":"Human-readable error message","required":false},{"name":"code","type":"string","description":"Machine-readable error code (e.g. MISSING_ACCOUNT_ID, INVALID_TOKEN)","required":false},{"name":"topic","type":"string","description":"Topic that caused the error (for subscription errors)","required":false}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","description":"Error response from server.","properties":{"type":{"type":"string","enum":["response"],"description":"Top-level message type. Always `response` for errors.","x-parser-schema-id":"\u003canonymous-schema-251>"},"id":{"type":"string","description":"Request ID from the message that caused this error, if there was one.","x-parser-schema-id":"\u003canonymous-schema-252>"},"timestamp":{"type":"string","description":"Time when the server sent this error, in RFC3339 format.","x-parser-schema-id":"\u003canonymous-schema-253>"},"payload":{"type":"object","description":"Error details returned by the server.","properties":{"status":{"type":"integer","description":"Status code for the error, such as `400`, `401`, or `403`.","x-parser-schema-id":"\u003canonymous-schema-255>"},"error":{"type":"string","description":"Human-readable error message","x-parser-schema-id":"\u003canonymous-schema-256>"},"code":{"type":"string","description":"Machine-readable error code (e.g. MISSING_ACCOUNT_ID, INVALID_TOKEN)","x-parser-schema-id":"\u003canonymous-schema-257>"},"topic":{"type":"string","description":"Topic that caused the error (for subscription errors)","x-parser-schema-id":"\u003canonymous-schema-258>"}},"x-parser-schema-id":"\u003canonymous-schema-254>"}},"x-parser-schema-id":"ErrorResponsePayload"},"title":"Error","description":"Error response","example":"{\n \"type\": \"response\",\n \"id\": \"req-002\",\n \"timestamp\": \"2024-01-15T10:30:00Z\",\n \"payload\": {\n \"status\": 400,\n \"error\": \"accountId is required\",\n \"code\": \"MISSING_ACCOUNT_ID\"\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"errorResponse"}]},{"id":"authSuccess","contentType":"application/json","payload":[{"name":"Authentication Success","description":"Authentication succeeded","type":"object","properties":[{"name":"type","type":"string","description":"The server sets this to `event` for auth status messages.","enumValues":["event"],"required":false},{"name":"payload","type":"object","required":false,"properties":[{"name":"action","type":"string","description":"Sign-in result or sign-in status. `authSuccess` means you can start subscribing. `authError` means the token was rejected. The other values are sent by the server as the connection ages.","enumValues":["authSuccess","authError","authTimeout","authExpired","refreshAuth"],"required":false},{"name":"data","type":"object","description":"Action-specific data","required":false},{"name":"id","type":"string","description":"Request ID from your client message, or `system` if this event was sent by the server on its own.","required":false},{"name":"timestamp","type":"integer","description":"Unix timestamp in milliseconds","required":false}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","description":"Server message about sign-in status.","properties":{"type":{"type":"string","enum":["event"],"description":"The server sets this to `event` for auth status messages.","x-parser-schema-id":"\u003canonymous-schema-8>"},"payload":{"type":"object","properties":{"action":{"type":"string","enum":["authSuccess","authError","authTimeout","authExpired","refreshAuth"],"description":"Sign-in result or sign-in status. `authSuccess` means you can start subscribing. `authError` means the token was rejected. The other values are sent by the server as the connection ages.","x-parser-schema-id":"\u003canonymous-schema-10>"},"data":{"type":"object","description":"Action-specific data","x-parser-schema-id":"\u003canonymous-schema-11>"},"id":{"type":"string","description":"Request ID from your client message, or `system` if this event was sent by the server on its own.","x-parser-schema-id":"\u003canonymous-schema-12>"},"timestamp":{"type":"integer","description":"Unix timestamp in milliseconds","x-parser-schema-id":"\u003canonymous-schema-13>"}},"x-parser-schema-id":"\u003canonymous-schema-9>"}},"x-parser-schema-id":"AuthEventPayload"},"title":"Authentication Success","description":"Authentication succeeded","example":"{\n \"type\": \"event\",\n \"payload\": {\n \"action\": \"authSuccess\",\n \"data\": {\n \"expiresIn\": 3900000\n },\n \"id\": \"auth-001\",\n \"timestamp\": 1703001234567\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"authSuccess"}]},{"id":"authTimeout","contentType":"application/json","payload":[{"name":"Authentication Timeout","description":"Authentication timed out","type":"object","properties":[{"name":"type","type":"string","description":"The server sets this to `event` for auth status messages.","enumValues":["event"],"required":false},{"name":"payload","type":"object","required":false,"properties":[{"name":"action","type":"string","description":"Sign-in result or sign-in status. `authSuccess` means you can start subscribing. `authError` means the token was rejected. The other values are sent by the server as the connection ages.","enumValues":["authSuccess","authError","authTimeout","authExpired","refreshAuth"],"required":false},{"name":"data","type":"object","description":"Action-specific data","required":false},{"name":"id","type":"string","description":"Request ID from your client message, or `system` if this event was sent by the server on its own.","required":false},{"name":"timestamp","type":"integer","description":"Unix timestamp in milliseconds","required":false}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","description":"Server message about sign-in status.","properties":{"type":{"type":"string","enum":["event"],"description":"The server sets this to `event` for auth status messages.","x-parser-schema-id":"\u003canonymous-schema-8>"},"payload":{"type":"object","properties":{"action":{"type":"string","enum":["authSuccess","authError","authTimeout","authExpired","refreshAuth"],"description":"Sign-in result or sign-in status. `authSuccess` means you can start subscribing. `authError` means the token was rejected. The other values are sent by the server as the connection ages.","x-parser-schema-id":"\u003canonymous-schema-10>"},"data":{"type":"object","description":"Action-specific data","x-parser-schema-id":"\u003canonymous-schema-11>"},"id":{"type":"string","description":"Request ID from your client message, or `system` if this event was sent by the server on its own.","x-parser-schema-id":"\u003canonymous-schema-12>"},"timestamp":{"type":"integer","description":"Unix timestamp in milliseconds","x-parser-schema-id":"\u003canonymous-schema-13>"}},"x-parser-schema-id":"\u003canonymous-schema-9>"}},"x-parser-schema-id":"AuthEventPayload"},"title":"Authentication Timeout","description":"Authentication timed out","example":"{\n \"type\": \"event\",\n \"payload\": {\n \"action\": \"authTimeout\",\n \"data\": {\n \"error\": \"authentication timeout\"\n },\n \"id\": \"system\",\n \"timestamp\": 1703001234567\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"authTimeout"}]},{"id":"subscribedResponse","contentType":"application/json","payload":[{"name":"Subscribed","description":"Subscription confirmed with snapshot","type":"object","properties":[{"name":"type","type":"string","description":"Message type. Always `subscribed` (ack from server).","enumValues":["subscribed"],"required":false},{"name":"id","type":"string","description":"Request ID from your subscribe message.","required":false},{"name":"timestamp","type":"string","description":"Time when the server sent this reply, in RFC3339 format.","required":false},{"name":"payload","type":"object","required":false,"properties":[{"name":"status","type":"integer","description":"Status code for the subscribe request. `200` means success.","required":false},{"name":"topic","type":"string","description":"Subscription topic","enumValues":["account","pnl","watchlist","news"],"required":false},{"name":"params","type":"object","description":"Echo of subscription params","required":false},{"name":"data","type":"oneOf","description":"Snapshot data for the subscribed topic.","required":false,"properties":[{"name":"account","type":"object","description":"Merged account and balance snapshot delivered after you subscribe to the `account` topic.","required":true,"properties":[{"name":"accountNumber","type":"string","description":"Sterling account ID.","required":false},{"name":"accountType","type":"string","required":false},{"name":"accountClass","type":"string","required":false},{"name":"optionsLevel","type":"string","required":false},{"name":"cashAvailable","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"netLiquidity","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"marginEquity","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"maintenanceExcess","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"accruedCash","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"exchangeSurplus","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"sma","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"maintReq","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"sodPositionsMarketValue","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"netBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"stockBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"dayTradeBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"optionBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"dayTradeOvernightRegTBuyingPower","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"totalEquity","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"settledFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"unsettledFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"heldBackFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"grossMargin","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"pendingOrdersMarginRequirements","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"realizedPL","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"unRealizedPL","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"pendingOrdersCount","type":"integer","description":"Number of pending orders.","required":false},{"name":"credit","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"creditRemaining","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"smaCreditRemaining","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"pdtCreditRemaining","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"startOfDayCash","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"valueBought","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"valueSold","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"sodTtlEquity","type":"string","description":"Optional start-of-day total equity.","required":false},{"name":"sodTtlEquityUpdatedAt","type":"string","description":"Optional timestamp for sodTtlEquity.","required":false},{"name":"isOptionLevelEnable","type":"boolean","description":"Whether options level is enabled for the account.","required":false},{"name":"amountAvailableToWithdraw","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"fullyPaidUnsettledFunds","type":"string","description":"Decimal value serialized as a string.","required":false},{"name":"shortSellingEnabled","type":"boolean","description":"Whether the account is approved to sell short.","required":false},{"name":"intradayMarginBalance","type":"string","description":"Current intraday margin balance. Decimal value serialized as a string.","required":false},{"name":"sodMarginTradeBalance","type":"string","description":"Start-of-day margin trade balance. Decimal value serialized as a string.","required":false},{"name":"sodGrossFundsAvailable","type":"string","description":"Start-of-day funds available before holds and requirements. Decimal value serialized as a string.","required":false},{"name":"sodNetFundsAvailable","type":"string","description":"Start-of-day funds available after holds and requirements. Decimal value serialized as a string.","required":false},{"name":"sodFundsAvailableDate","type":"string","description":"Settlement date the start-of-day funds-available values apply to, in YYYY-MM-DD format.","required":false},{"name":"freestockUnsettleBalance","type":"string","description":"Unsettled balance attributable to free-stock awards. Decimal value serialized as a string.","required":false}]},{"name":"positions","type":"array","required":true,"properties":[{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"symbol","type":"string","description":"Equity or OCC option symbol.","required":false},{"name":"securityType","type":"string","description":"Security type, for example EQUITY or OPTION.","required":false},{"name":"qty","type":"string","description":"Position quantity serialized as a string.","required":false},{"name":"avgPrice","type":"string","description":"Average position price serialized as a string.","required":false},{"name":"avgCost","type":"string","description":"Backward-compatible alias of avgPrice.","required":false},{"name":"unRealizedPL","type":"string","description":"Unrealized P\u0026L serialized as a string.","required":false},{"name":"todayRealizedPnL","type":"string","description":"Today realized P\u0026L serialized as a string.","required":false},{"name":"mtmRealizedPnL","type":"string","description":"Mark-to-market realized P\u0026L measured against the previous close, serialized as a string.","required":false},{"name":"realizedPL","type":"string","description":"Backward-compatible alias of todayRealizedPnL.","required":false},{"name":"todayPL","type":"string","description":"Today total P\u0026L serialized as a string.","required":false},{"name":"instrument","type":"string","description":"Backward-compatible alias of securityType.","required":false},{"name":"putCall","type":"string","description":"CALL or PUT for options.","required":false},{"name":"strikePrice","type":"string","description":"Option strike price serialized as a string.","required":false},{"name":"maturity","type":"string","description":"Option maturity date in YYYY-MM-DD format.","required":false},{"name":"flags","type":"integer","description":"Position flags.","required":false},{"name":"createdAt","type":"string","description":"Creation timestamp.","required":false},{"name":"updatedAt","type":"string","description":"Last update timestamp.","required":false}]},{"name":"ordersV2","type":"array","description":"Orders v2 cache snapshot. Empty array when no orders are cached.","required":true,"properties":[{"name":"clOrdId","type":"string","description":"Client order ID.","required":false},{"name":"ordId","type":"string","description":"Broker/order ID.","required":false},{"name":"origClOrdId","type":"string","description":"Original client order ID for replaces/cancels.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"clientId","type":"string","description":"Client/user ID.","required":false},{"name":"symbol","type":"string","description":"Trading symbol.","required":false},{"name":"side","type":"string","description":"Order side, for example BUY or SELL.","required":false},{"name":"type","type":"string","description":"Order type, for example LIMIT or MARKET.","required":false},{"name":"timeInForce","type":"string","description":"Time in force, for example DAY.","required":false},{"name":"qty","type":"string","description":"Order quantity serialized as a string.","required":false},{"name":"price","type":"string","description":"Limit price serialized as a string.","required":false},{"name":"stopPrice","type":"string","description":"Stop price serialized as a string.","required":false},{"name":"ordStatus","type":"string","description":"Order status.","enumValues":["NEW","PARTIALLY_FILLED","FILLED","DONE_FOR_DAY","CANCELED","REPLACED","PENDING_CANCEL","STOPPED","REJECTED","SUSPENDED","PENDING_NEW","CALCULATED","EXPIRED","ACCEPTED_FOR_BID","PENDING_REPLACE"],"required":false},{"name":"cumQty","type":"string","description":"Cumulative filled quantity serialized as a string.","required":false},{"name":"leavesQty","type":"string","description":"Remaining open quantity serialized as a string.","required":false},{"name":"avgPrice","type":"string","description":"Average execution price serialized as a string.","required":false},{"name":"currency","type":"string","description":"Currency code.","required":false},{"name":"exDestination","type":"string","description":"Execution destination, for example MNGDFTE or MNGD.","required":false},{"name":"text","type":"string","description":"Broker or venue message.","required":false},{"name":"ordRejReason","type":"string","description":"Order reject reason when present.","required":false},{"name":"securityType","type":"string","description":"Security type, for example EQUITY or OPTION.","required":false},{"name":"category","type":"string","description":"Order category, for example EQUITY, SINGLE_LEG, or MULTI_LEG.","required":false},{"name":"legs","type":"array","required":false,"properties":[{"name":"symbol","type":"string","description":"Underlying or option symbol.","required":false},{"name":"side","type":"string","description":"Order side, for example BUY or SELL.","required":false},{"name":"ratioQty","type":"string","description":"Leg ratio quantity serialized as a string.","required":false},{"name":"securityType","type":"string","description":"Security type, for example OPTION.","required":false},{"name":"maturity","type":"string","description":"Option maturity date in YYYY-MM-DD format.","required":false},{"name":"strikePrice","type":"string","description":"Option strike price serialized as a string.","required":false},{"name":"positionEffect","type":"string","description":"Position effect, for example OPEN or CLOSE.","required":false},{"name":"putCall","type":"string","description":"Option side, CALL or PUT.","required":false},{"name":"avgPrice","type":"string","description":"Average fill price for the leg, serialized as a string.","required":false}]},{"name":"execId","type":"string","description":"Execution ID for fill events.","required":false},{"name":"execType","type":"string","description":"Execution type, for example NEW, FILL, PARTIAL_FILL, or REJECTED.","required":false},{"name":"lastPx","type":"string","description":"Last execution price serialized as a string.","required":false},{"name":"lastQty","type":"string","description":"Last execution quantity serialized as a string.","required":false},{"name":"maturity","type":"string","description":"Flat option maturity when sent on single-leg option orders.","required":false},{"name":"putCall","type":"string","description":"Flat option side, CALL or PUT.","required":false},{"name":"strikePrice","type":"string","description":"Flat option strike price serialized as a string.","required":false},{"name":"positionEffect","type":"string","description":"Flat option position effect.","required":false},{"name":"createdAt","type":"string","description":"Creation timestamp.","required":false},{"name":"updatedAt","type":"string","description":"Last update timestamp.","required":false}]},{"name":"error","type":"string","description":"Optional partial snapshot error, for example failed to fetch: positions.","required":false},{"name":"accountId","type":"string","description":"Sterling account ID.","required":false},{"name":"interval","type":"string","description":"Candle interval.","required":false},{"name":"t","type":"array","description":"Unix timestamps in seconds.","required":false,"properties":[{"name":"item","type":"integer","required":false}]},{"name":"c","type":"array","description":"Close/equity values.","required":false,"properties":[{"name":"item","type":"number","required":false}]},{"name":"id","type":"integer","description":"Watchlist ID.","required":false},{"name":"name","type":"string","description":"User-facing watchlist name.","required":false},{"name":"symbols","type":"array","description":"Symbols currently saved in the watchlist.","required":false,"properties":[{"name":"item","type":"string","required":false}]},{"name":"id","type":"integer","description":"Unique news ID.","required":false},{"name":"title","type":"string","description":"Article title.","required":false},{"name":"news_type","type":"string","description":"News type, for example news or press_release.","required":false},{"name":"symbols","type":"array","description":"Related symbols.","required":false,"properties":[{"name":"item","type":"string","required":false}]},{"name":"authors","type":"array","description":"Article authors.","required":false,"properties":[{"name":"item","type":"string","required":false}]},{"name":"timestamp","type":"string","description":"Publication timestamp.","required":false},{"name":"body","type":"string","description":"Full article content when available.","required":false},{"name":"action","type":"string","description":"Action string when available.","required":false}]}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","description":"Subscribed confirmation message from server.","properties":{"type":{"type":"string","enum":["subscribed"],"description":"Message type. Always `subscribed` (ack from server).","x-parser-schema-id":"\u003canonymous-schema-31>"},"id":{"type":"string","description":"Request ID from your subscribe message.","x-parser-schema-id":"\u003canonymous-schema-32>"},"timestamp":{"type":"string","description":"Time when the server sent this reply, in RFC3339 format.","x-parser-schema-id":"\u003canonymous-schema-33>"},"payload":{"type":"object","properties":{"status":{"type":"integer","description":"Status code for the subscribe request. `200` means success.","x-parser-schema-id":"\u003canonymous-schema-35>"},"topic":{"type":"string","enum":["account","pnl","watchlist","news"],"description":"Subscription topic","x-parser-schema-id":"\u003canonymous-schema-36>"},"params":{"type":"object","description":"Echo of subscription params","x-parser-schema-id":"\u003canonymous-schema-37>"},"data":{"oneOf":[{"type":"object","description":"Initial account snapshot returned with account subscriptions.","required":["account","positions","ordersV2"],"properties":{"account":{"type":"object","description":"Merged account and balance snapshot delivered after you subscribe to the `account` topic.","properties":{"accountNumber":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-39>"},"accountType":{"type":"string","x-parser-schema-id":"\u003canonymous-schema-40>"},"accountClass":{"type":"string","x-parser-schema-id":"\u003canonymous-schema-41>"},"optionsLevel":{"type":"string","x-parser-schema-id":"\u003canonymous-schema-42>"},"cashAvailable":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-43>"},"netLiquidity":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-44>"},"marginEquity":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-45>"},"maintenanceExcess":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-46>"},"accruedCash":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-47>"},"exchangeSurplus":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-48>"},"sma":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-49>"},"maintReq":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-50>"},"sodPositionsMarketValue":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-51>"},"netBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-52>"},"stockBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-53>"},"dayTradeBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-54>"},"optionBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-55>"},"dayTradeOvernightRegTBuyingPower":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-56>"},"totalEquity":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-57>"},"settledFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-58>"},"unsettledFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-59>"},"heldBackFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-60>"},"grossMargin":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-61>"},"pendingOrdersMarginRequirements":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-62>"},"realizedPL":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-63>"},"unRealizedPL":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-64>"},"pendingOrdersCount":{"type":"integer","description":"Number of pending orders.","x-parser-schema-id":"\u003canonymous-schema-65>"},"credit":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-66>"},"creditRemaining":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-67>"},"smaCreditRemaining":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-68>"},"pdtCreditRemaining":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-69>"},"startOfDayCash":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-70>"},"valueBought":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-71>"},"valueSold":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-72>"},"sodTtlEquity":{"type":"string","description":"Optional start-of-day total equity.","x-parser-schema-id":"\u003canonymous-schema-73>"},"sodTtlEquityUpdatedAt":{"type":"string","format":"date-time","description":"Optional timestamp for sodTtlEquity.","x-parser-schema-id":"\u003canonymous-schema-74>"},"isOptionLevelEnable":{"type":"boolean","description":"Whether options level is enabled for the account.","x-parser-schema-id":"\u003canonymous-schema-75>"},"amountAvailableToWithdraw":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-76>"},"fullyPaidUnsettledFunds":{"type":"string","description":"Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-77>"},"shortSellingEnabled":{"type":"boolean","description":"Whether the account is approved to sell short.","x-parser-schema-id":"\u003canonymous-schema-78>"},"intradayMarginBalance":{"type":"string","description":"Current intraday margin balance. Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-79>"},"sodMarginTradeBalance":{"type":"string","description":"Start-of-day margin trade balance. Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-80>"},"sodGrossFundsAvailable":{"type":"string","description":"Start-of-day funds available before holds and requirements. Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-81>"},"sodNetFundsAvailable":{"type":"string","description":"Start-of-day funds available after holds and requirements. Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-82>"},"sodFundsAvailableDate":{"type":"string","format":"date","description":"Settlement date the start-of-day funds-available values apply to, in YYYY-MM-DD format.","x-parser-schema-id":"\u003canonymous-schema-83>"},"freestockUnsettleBalance":{"type":"string","description":"Unsettled balance attributable to free-stock awards. Decimal value serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-84>"}},"x-parser-schema-id":"AccountSnapshotAccount"},"positions":{"type":"array","items":{"type":"object","description":"Position update from the server. Decimal numbers are sent as strings.","properties":{"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-86>"},"symbol":{"type":"string","description":"Equity or OCC option symbol.","x-parser-schema-id":"\u003canonymous-schema-87>"},"securityType":{"type":"string","description":"Security type, for example EQUITY or OPTION.","x-parser-schema-id":"\u003canonymous-schema-88>"},"qty":{"type":"string","description":"Position quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-89>"},"avgPrice":{"type":"string","description":"Average position price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-90>"},"avgCost":{"type":"string","description":"Backward-compatible alias of avgPrice.","x-parser-schema-id":"\u003canonymous-schema-91>"},"unRealizedPL":{"type":"string","description":"Unrealized P\u0026L serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-92>"},"todayRealizedPnL":{"type":"string","description":"Today realized P\u0026L serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-93>"},"mtmRealizedPnL":{"type":"string","description":"Mark-to-market realized P\u0026L measured against the previous close, serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-94>"},"realizedPL":{"type":"string","description":"Backward-compatible alias of todayRealizedPnL.","x-parser-schema-id":"\u003canonymous-schema-95>"},"todayPL":{"type":"string","description":"Today total P\u0026L serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-96>"},"instrument":{"type":"string","description":"Backward-compatible alias of securityType.","x-parser-schema-id":"\u003canonymous-schema-97>"},"putCall":{"type":"string","description":"CALL or PUT for options.","x-parser-schema-id":"\u003canonymous-schema-98>"},"strikePrice":{"type":"string","description":"Option strike price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-99>"},"maturity":{"type":"string","description":"Option maturity date in YYYY-MM-DD format.","x-parser-schema-id":"\u003canonymous-schema-100>"},"flags":{"type":"integer","description":"Position flags.","x-parser-schema-id":"\u003canonymous-schema-101>"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp.","x-parser-schema-id":"\u003canonymous-schema-102>"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp.","x-parser-schema-id":"\u003canonymous-schema-103>"}},"x-parser-schema-id":"PositionData"},"x-parser-schema-id":"\u003canonymous-schema-85>"},"ordersV2":{"type":"array","items":{"type":"object","description":"Order update from the server. This includes the order plus fill details when the order changes.","properties":{"clOrdId":{"type":"string","description":"Client order ID.","x-parser-schema-id":"\u003canonymous-schema-105>"},"ordId":{"type":"string","description":"Broker/order ID.","x-parser-schema-id":"\u003canonymous-schema-106>"},"origClOrdId":{"type":"string","description":"Original client order ID for replaces/cancels.","x-parser-schema-id":"\u003canonymous-schema-107>"},"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-108>"},"clientId":{"type":"string","description":"Client/user ID.","x-parser-schema-id":"\u003canonymous-schema-109>"},"symbol":{"type":"string","description":"Trading symbol.","x-parser-schema-id":"\u003canonymous-schema-110>"},"side":{"type":"string","description":"Order side, for example BUY or SELL.","x-parser-schema-id":"\u003canonymous-schema-111>"},"type":{"type":"string","description":"Order type, for example LIMIT or MARKET.","x-parser-schema-id":"\u003canonymous-schema-112>"},"timeInForce":{"type":"string","description":"Time in force, for example DAY.","x-parser-schema-id":"\u003canonymous-schema-113>"},"qty":{"type":"string","description":"Order quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-114>"},"price":{"type":"string","description":"Limit price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-115>"},"stopPrice":{"type":"string","description":"Stop price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-116>"},"ordStatus":{"type":"string","enum":["NEW","PARTIALLY_FILLED","FILLED","DONE_FOR_DAY","CANCELED","REPLACED","PENDING_CANCEL","STOPPED","REJECTED","SUSPENDED","PENDING_NEW","CALCULATED","EXPIRED","ACCEPTED_FOR_BID","PENDING_REPLACE"],"description":"Order status.","x-parser-schema-id":"\u003canonymous-schema-117>"},"cumQty":{"type":"string","description":"Cumulative filled quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-118>"},"leavesQty":{"type":"string","description":"Remaining open quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-119>"},"avgPrice":{"type":"string","description":"Average execution price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-120>"},"currency":{"type":"string","description":"Currency code.","x-parser-schema-id":"\u003canonymous-schema-121>"},"exDestination":{"type":"string","description":"Execution destination, for example MNGDFTE or MNGD.","x-parser-schema-id":"\u003canonymous-schema-122>"},"text":{"type":"string","description":"Broker or venue message.","x-parser-schema-id":"\u003canonymous-schema-123>"},"ordRejReason":{"type":"string","description":"Order reject reason when present.","x-parser-schema-id":"\u003canonymous-schema-124>"},"securityType":{"type":"string","description":"Security type, for example EQUITY or OPTION.","x-parser-schema-id":"\u003canonymous-schema-125>"},"category":{"type":"string","description":"Order category, for example EQUITY, SINGLE_LEG, or MULTI_LEG.","x-parser-schema-id":"\u003canonymous-schema-126>"},"legs":{"type":"array","items":{"type":"object","description":"One option leg in an order update.","properties":{"symbol":{"type":"string","description":"Underlying or option symbol.","x-parser-schema-id":"\u003canonymous-schema-128>"},"side":{"type":"string","description":"Order side, for example BUY or SELL.","x-parser-schema-id":"\u003canonymous-schema-129>"},"ratioQty":{"type":"string","description":"Leg ratio quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-130>"},"securityType":{"type":"string","description":"Security type, for example OPTION.","x-parser-schema-id":"\u003canonymous-schema-131>"},"maturity":{"type":"string","description":"Option maturity date in YYYY-MM-DD format.","x-parser-schema-id":"\u003canonymous-schema-132>"},"strikePrice":{"type":"string","description":"Option strike price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-133>"},"positionEffect":{"type":"string","description":"Position effect, for example OPEN or CLOSE.","x-parser-schema-id":"\u003canonymous-schema-134>"},"putCall":{"type":"string","description":"Option side, CALL or PUT.","x-parser-schema-id":"\u003canonymous-schema-135>"},"avgPrice":{"type":"string","description":"Average fill price for the leg, serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-136>"}},"x-parser-schema-id":"AccountOrderLeg"},"x-parser-schema-id":"\u003canonymous-schema-127>"},"execId":{"type":"string","description":"Execution ID for fill events.","x-parser-schema-id":"\u003canonymous-schema-137>"},"execType":{"type":"string","description":"Execution type, for example NEW, FILL, PARTIAL_FILL, or REJECTED.","x-parser-schema-id":"\u003canonymous-schema-138>"},"lastPx":{"type":"string","description":"Last execution price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-139>"},"lastQty":{"type":"string","description":"Last execution quantity serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-140>"},"maturity":{"type":"string","description":"Flat option maturity when sent on single-leg option orders.","x-parser-schema-id":"\u003canonymous-schema-141>"},"putCall":{"type":"string","description":"Flat option side, CALL or PUT.","x-parser-schema-id":"\u003canonymous-schema-142>"},"strikePrice":{"type":"string","description":"Flat option strike price serialized as a string.","x-parser-schema-id":"\u003canonymous-schema-143>"},"positionEffect":{"type":"string","description":"Flat option position effect.","x-parser-schema-id":"\u003canonymous-schema-144>"},"createdAt":{"type":"string","format":"date-time","description":"Creation timestamp.","x-parser-schema-id":"\u003canonymous-schema-145>"},"updatedAt":{"type":"string","format":"date-time","description":"Last update timestamp.","x-parser-schema-id":"\u003canonymous-schema-146>"}},"x-parser-schema-id":"OrderData"},"description":"Orders v2 cache snapshot. Empty array when no orders are cached.","x-parser-schema-id":"\u003canonymous-schema-104>"},"error":{"type":"string","description":"Optional partial snapshot error, for example failed to fetch: positions.","x-parser-schema-id":"\u003canonymous-schema-147>"}},"x-parser-schema-id":"AccountSnapshotData"},{"type":"object","description":"Profit and loss chart data. This includes timestamp, close, and equity arrays.","properties":{"accountId":{"type":"string","description":"Sterling account ID.","x-parser-schema-id":"\u003canonymous-schema-148>"},"interval":{"type":"string","description":"Candle interval.","x-parser-schema-id":"\u003canonymous-schema-149>"},"t":{"type":"array","items":{"type":"integer","x-parser-schema-id":"\u003canonymous-schema-151>"},"description":"Unix timestamps in seconds.","x-parser-schema-id":"\u003canonymous-schema-150>"},"c":{"type":"array","items":{"type":"number","x-parser-schema-id":"\u003canonymous-schema-153>"},"description":"Close/equity values.","x-parser-schema-id":"\u003canonymous-schema-152>"}},"x-parser-schema-id":"PnLCandleData"},{"type":"array","description":"Current watchlists for the signed-in user. The same list shape is used in the first subscribe reply and later watchlist events.","items":{"type":"object","description":"One saved watchlist from shared/domains/watchlist.Watchlist.","properties":{"id":{"type":"integer","description":"Watchlist ID.","x-parser-schema-id":"\u003canonymous-schema-154>"},"name":{"type":"string","description":"User-facing watchlist name.","x-parser-schema-id":"\u003canonymous-schema-155>"},"symbols":{"type":"array","items":{"type":"string","x-parser-schema-id":"\u003canonymous-schema-157>"},"description":"Symbols currently saved in the watchlist.","x-parser-schema-id":"\u003canonymous-schema-156>"}},"x-parser-schema-id":"WatchlistEntry"},"x-parser-schema-id":"WatchlistSnapshotData"},{"type":"array","description":"Initial news snapshot returned after a news subscription succeeds.","items":{"type":"object","description":"One news item.","properties":{"id":{"type":"integer","description":"Unique news ID.","x-parser-schema-id":"\u003canonymous-schema-158>"},"title":{"type":"string","description":"Article title.","x-parser-schema-id":"\u003canonymous-schema-159>"},"news_type":{"type":"string","description":"News type, for example news or press_release.","x-parser-schema-id":"\u003canonymous-schema-160>"},"symbols":{"type":"array","items":{"type":"string","x-parser-schema-id":"\u003canonymous-schema-162>"},"description":"Related symbols.","x-parser-schema-id":"\u003canonymous-schema-161>"},"authors":{"type":"array","items":{"type":"string","x-parser-schema-id":"\u003canonymous-schema-164>"},"description":"Article authors.","x-parser-schema-id":"\u003canonymous-schema-163>"},"timestamp":{"type":"string","format":"date-time","description":"Publication timestamp.","x-parser-schema-id":"\u003canonymous-schema-165>"},"body":{"type":"string","description":"Full article content when available.","x-parser-schema-id":"\u003canonymous-schema-166>"},"action":{"type":"string","description":"Action string when available.","x-parser-schema-id":"\u003canonymous-schema-167>"}},"x-parser-schema-id":"NewsItem"},"x-parser-schema-id":"NewsSnapshotData"}],"description":"Snapshot data for the subscribed topic.","x-parser-schema-id":"\u003canonymous-schema-38>"}},"x-parser-schema-id":"\u003canonymous-schema-34>"}},"x-parser-schema-id":"SubscribedResponsePayload"},"title":"Subscribed","description":"Subscription confirmed with snapshot","example":"{\n \"type\": \"subscribed\",\n \"id\": \"req-002\",\n \"timestamp\": \"2024-01-15T10:30:00Z\",\n \"payload\": {\n \"status\": 200,\n \"topic\": \"account\",\n \"params\": {\n \"accountId\": \"ACC123456\"\n },\n \"data\": {\n \"account\": {\n \"accountNumber\": \"ACC123456\",\n \"accountType\": \"MARGIN\",\n \"accountClass\": \"INDIVIDUAL\",\n \"optionsLevel\": \"LEVEL_3\",\n \"cashAvailable\": \"25155.00\",\n \"netLiquidity\": \"50155.00\",\n \"marginEquity\": \"50155.00\",\n \"maintenanceExcess\": \"17508.50\",\n \"sma\": \"25155.00\",\n \"maintReq\": \"7646.50\",\n \"netBuyingPower\": \"25155.00\",\n \"stockBuyingPower\": \"50310.00\",\n \"dayTradeBuyingPower\": \"100620.00\",\n \"optionBuyingPower\": \"25155.00\",\n \"totalEquity\": \"50155.00\",\n \"pendingOrdersCount\": 0,\n \"isOptionLevelEnable\": true,\n \"shortSellingEnabled\": false,\n \"sodTtlEquity\": \"50000.00\",\n \"sodTtlEquityUpdatedAt\": \"2024-01-15T11:00:02Z\",\n \"intradayMarginBalance\": \"25155.00\",\n \"sodMarginTradeBalance\": \"-25155.00\",\n \"sodGrossFundsAvailable\": \"25155.00\",\n \"sodNetFundsAvailable\": \"25155.00\",\n \"sodFundsAvailableDate\": \"2024-01-12\",\n \"freestockUnsettleBalance\": \"0\"\n },\n \"positions\": [],\n \"ordersV2\": []\n }\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"subscribedResponse"}]},{"id":"unsubscribeResponse","contentType":"application/json","payload":[{"name":"Unsubscription Confirmed","description":"Server confirms unsubscription","type":"object","properties":[{"name":"type","type":"string","description":"Top-level message type. Always `response` for this ack.","enumValues":["response"],"required":false},{"name":"id","type":"string","description":"Request ID from your unsubscribe message.","required":false},{"name":"timestamp","type":"string","description":"Time when the server sent this reply, in RFC3339 format.","required":false},{"name":"payload","type":"object","description":"Status and optional data for the unsubscribe result.","required":false,"properties":[{"name":"status","type":"integer","description":"Status code for the unsubscribe request. `200` means success.","required":false},{"name":"data","type":"object","required":false,"properties":[{"name":"unsubscribed","type":"boolean","required":false},{"name":"topic","type":"string","required":false},{"name":"accountId","type":"string","required":false}]}]}]}],"headers":[],"jsonPayloadSchema":{"type":"object","description":"Unsubscribe confirmation from server.","properties":{"type":{"type":"string","enum":["response"],"description":"Top-level message type. Always `response` for this ack.","x-parser-schema-id":"\u003canonymous-schema-175>"},"id":{"type":"string","description":"Request ID from your unsubscribe message.","x-parser-schema-id":"\u003canonymous-schema-176>"},"timestamp":{"type":"string","description":"Time when the server sent this reply, in RFC3339 format.","x-parser-schema-id":"\u003canonymous-schema-177>"},"payload":{"type":"object","description":"Status and optional data for the unsubscribe result.","properties":{"status":{"type":"integer","description":"Status code for the unsubscribe request. `200` means success.","x-parser-schema-id":"\u003canonymous-schema-179>"},"data":{"type":"object","properties":{"unsubscribed":{"type":"boolean","x-parser-schema-id":"\u003canonymous-schema-181>"},"topic":{"type":"string","x-parser-schema-id":"\u003canonymous-schema-182>"},"accountId":{"type":"string","x-parser-schema-id":"\u003canonymous-schema-183>"}},"x-parser-schema-id":"\u003canonymous-schema-180>"}},"x-parser-schema-id":"\u003canonymous-schema-178>"}},"x-parser-schema-id":"UnsubscribeResponsePayload"},"title":"Unsubscription Confirmed","description":"Server confirms unsubscription","example":"{\n \"type\": \"response\",\n \"id\": \"req-006\",\n \"timestamp\": \"2024-01-15T10:30:00Z\",\n \"payload\": {\n \"status\": 200,\n \"data\": {\n \"unsubscribed\": true,\n \"topic\": \"account\",\n \"accountId\": \"ACC123456\"\n }\n }\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"unsubscribeResponse"}]},{"id":"pongResponse","contentType":"application/json","payload":[{"name":"Pong","description":"Keep-alive pong response","type":"object","properties":[{"name":"type","type":"string","description":"Message type. Always `pong` (reply to ping).","enumValues":["pong"],"required":false},{"name":"id","type":"string","description":"Request ID copied from your ping, if you sent one.","required":false},{"name":"timestamp","type":"string","description":"Time when the server sent this `pong`, in RFC3339 format.","required":false}]}],"headers":[],"jsonPayloadSchema":{"type":"object","description":"Pong response from server.","properties":{"type":{"type":"string","enum":["pong"],"description":"Message type. Always `pong` (reply to ping).","x-parser-schema-id":"\u003canonymous-schema-16>"},"id":{"type":"string","description":"Request ID copied from your ping, if you sent one.","x-parser-schema-id":"\u003canonymous-schema-17>"},"timestamp":{"type":"string","description":"Time when the server sent this `pong`, in RFC3339 format.","x-parser-schema-id":"\u003canonymous-schema-18>"}},"x-parser-schema-id":"PongPayload"},"title":"Pong","description":"Keep-alive pong response","example":"{\n \"type\": \"pong\",\n \"id\": \"ping-001\",\n \"timestamp\": \"2024-01-15T10:30:00Z\"\n}","bindings":[],"extensions":[{"id":"x-parser-unique-object-id","value":"pongResponse"}]}],"extensions":[{"id":"x-parser-unique-object-id","value":"accountUpdatesStream"}],"securitySchemes":[]},"channelId":"accountUpdatesStream","metadata":{"id":2353,"subdomain":"ariesfinancialinc","eTag":"\"0bf6afe94eccf7844e0edb7c4f7a07a4\"","originalFileLocation":"asyncapi-specs/account-updates.json","uuid":"d6b0db03-3c65-41b0-a53e-582942dba184","source":"LOCAL_FILE","createdAt":"2025-12-25T13:29:29.179Z","updatedAt":"2026-10-14T10:13:15.108Z","deletedAt":null,"retiredAt":null,"retiredByDeploymentHistoryId":null}},"subdomain":"ariesfinancialinc","siteName":"Finance.dev by Aries","title":"Account Updates WebSocket - Finance.dev by Aries","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-16T11:06:28.768Z","originalFileLocation":"websockets/account-updates.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Real-time WebSocket API for account updates, P\u0026amp;L candles, watchlists, and news on a single authenticated connection.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Finance.dev by Aries\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/ariesfinancialinc/ylnD03T0GOb_wvQC/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/ariesfinancialinc/ylnD03T0GOb_wvQC/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/ariesfinancialinc/ylnD03T0GOb_wvQC/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/ariesfinancialinc/ylnD03T0GOb_wvQC/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/ariesfinancialinc/ylnD03T0GOb_wvQC/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/ariesfinancialinc/ylnD03T0GOb_wvQC/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/ariesfinancialinc/ylnD03T0GOb_wvQC/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/ariesfinancialinc/ylnD03T0GOb_wvQC/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/ariesfinancialinc/ylnD03T0GOb_wvQC/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Account Updates WebSocket - Finance.dev by Aries\">\u003cmeta data-mint-head property=\"og:description\" content=\"Real-time WebSocket API for account updates, P\u0026amp;L candles, watchlists, and news on a single authenticated connection.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Finance.dev by Aries\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://finance.dev/websockets/account-updates\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://ariesfinancialinc.mintlify.site/_mintlify/api/og/v2?division=WebSockets\u0026amp;title=Account+Updates+WebSocket\u0026amp;description=Real-time+WebSocket+API+for+account+updates%2C+P%26L+candles%2C+watchlists%2C+and+news+on+a+single+authenticated+connection.\u0026amp;theme=ee60a00d22459cbc9960cbdc\u0026amp;signature=d045694888bd7e46d7d4dc0c457374f3e5b1120719d6d4143f3035de0718d287\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Account Updates WebSocket - Finance.dev by Aries\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Real-time WebSocket API for account updates, P\u0026amp;L candles, watchlists, and news on a single authenticated connection.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://ariesfinancialinc.mintlify.site/_mintlify/api/og/v2?division=WebSockets\u0026amp;title=Account+Updates+WebSocket\u0026amp;description=Real-time+WebSocket+API+for+account+updates%2C+P%26L+candles%2C+watchlists%2C+and+news+on+a+single+authenticated+connection.\u0026amp;theme=ee60a00d22459cbc9960cbdc\u0026amp;signature=d045694888bd7e46d7d4dc0c457374f3e5b1120719d6d4143f3035de0718d287\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/ariesfinancialinc/ylnD03T0GOb_wvQC/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Finance.dev by Aries\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0BAA5E\">\u003clink data-mint-head rel=\"canonical\" href=\"https://finance.dev/websockets/account-updates\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/websockets/account-updates.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://aries.com/#organization\",\"name\":\"Aries\",\"legalName\":\"Aries Financial Inc.\",\"url\":\"https://aries.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/ariesfinancialinc/RAN-JEltzDnib-_A/logo/light.svg?fit=max\u0026auto=format\u0026n=RAN-JEltzDnib-_A\u0026q=85\u0026s=4eae127cdf55bb09159d2b5a625690e3\"}},{\"@type\":\"WebSite\",\"@id\":\"https://finance.dev#website\",\"name\":\"Finance.dev by Aries\",\"url\":\"https://finance.dev\",\"publisher\":{\"@id\":\"https://aries.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://finance.dev/websockets/account-updates#webpage\",\"url\":\"https://finance.dev/websockets/account-updates\",\"name\":\"Account Updates WebSocket\",\"description\":\"Real-time WebSocket API for account updates, P\u0026L candles, watchlists, and news on a single authenticated connection.\",\"dateModified\":\"2026-11-16T11:06:28.768Z\",\"isPartOf\":{\"@id\":\"https://finance.dev#website\"},\"breadcrumb\":{\"@id\":\"https://finance.dev/websockets/account-updates#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://finance.dev/websockets/account-updates#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"WebSockets\",\"item\":\"https://finance.dev/websockets/market-data\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Account Updates WebSocket\",\"item\":\"https://finance.dev/websockets/account-updates\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://finance.dev/websockets/account-updates#apireference\",\"headline\":\"Account Updates WebSocket\",\"name\":\"Account Updates WebSocket\",\"description\":\"Real-time WebSocket API for account updates, P\u0026L candles, watchlists, and news on a single authenticated connection.\",\"url\":\"https://finance.dev/websockets/account-updates\",\"mainEntityOfPage\":{\"@id\":\"https://finance.dev/websockets/account-updates#webpage\"},\"dateModified\":\"2026-11-16T11:06:28.768Z\",\"publisher\":{\"@id\":\"https://aries.com/#organization\"},\"isPartOf\":{\"@id\":\"https://finance.dev#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Finance.dev by Aries\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Aries\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/websockets/account-updates.md","siteName":"Finance.dev by Aries","nav":{"global":null,"tabs":[{"tab":"Welcome","icon":"house","pages":[{"title":"Welcome","href":"/welcome"}]},{"tab":"Quick Start","icon":"rocket","pages":[{"title":"Quick Start","href":"/api-reference/quickstart"}]},{"tab":"Auth","icon":"shield-halved","pages":[{"title":"Auth","href":"/api-reference/oauth2/overview"}]},{"tab":"Core API","icon":"bolt","pages":[{"title":"Core API","href":"/api-reference"}]},{"tab":"Supplemental API","icon":"chart-mixed","pages":[{"title":"Supplemental API","href":"/supplemental-api/overview"}]},{"tab":"Prediction API","icon":"landmark","pages":[{"title":"Prediction API","href":"/prediction-api/overview"}]},{"tab":"Streaming API","icon":"satellite-dish","pages":[{"group":"Overview","pages":[{"title":"WebSockets","href":"/websockets/overview"}]},{"group":"WebSockets","pages":[{"title":"Market Data WebSocket","asyncapi":"asyncapi-specs/market-data.json marketDataStream","href":"/websockets/market-data"},{"title":"Charting WebSocket","description":"Real-time WebSocket API for TradingView chart data. Stream live quotes and trades for equities and options. Connect, authenticate, then subscribe to symbols.","asyncapi":"asyncapi-specs/tradingview-chart.json chartDataStream","href":"/websockets/tradingview-chart"},{"title":"Account Updates WebSocket","asyncapi":"asyncapi-specs/account-updates.json accountUpdatesStream","href":"/websockets/account-updates"}]}]},{"tab":"AI Agents","icon":"robot","pages":[{"title":"AI Agents","href":"/ai-agents/add-skill"}]},{"tab":"MCP Server","icon":"https://mintlify.s3.us-west-1.amazonaws.com/ariesfinancialinc/logo/mcp.svg","pages":[{"title":"MCP Server","href":"/mcp-server"}]},{"tab":"Guides","icon":"book-open","pages":[{"title":"Guides","href":"/guides/ai-trading-agent"}]},{"tab":"SDKs","icon":"code","pages":[{"title":"SDKs","href":"/sdks/overview"}]},{"tab":"Changelog","icon":"newspaper","pages":[{"title":"Changelog","href":"/changelog"}]}]},"basePath":"","title":"Account Updates WebSocket - Finance.dev by Aries","deploymentId":"dpl_9bQLTw9nc2h9csDGYcKwWenPcQWn","buildId":"dpl_9bQLTw9nc2h9csDGYcKwWenPcQWn","dynamics":["3b021dca80","a4b48b4bee","a9bb46feb3"],"chunks":["MessageExamples-Dub26bu_.js","CodeSnippet-C1QlaNYl.js","Page-5Sd8Go2Y.js","use-playground-group-access-DyQ_1IIe.js","utils-XnMGX2lF.js","getPastedJson-buPTdYs_.js","api-description-markdown-BpDftTKT.js","DynamicMarkdown-CZT_WAnN.js","MethodPill-Dx3JIwHJ.js","Check2Icon-DmMrzBYX.js","cloneDeep-DYtgUc7n.js","_Uint8Array-D8z7zjjJ.js","isObject-FP1Yky1u.js","Markdown-erv2ryQz.js","AssistantPageLink-DJ01X1Sn.js","dist-D9mz3EIS.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}