plugins/trading-operations/skills/exchange-connectivity/SKILL.md
Guide the design and management of trading venue connectivity and market data infrastructure. Owns the FIX session layer (logon, heartbeats, sequence number gaps, resend and gap recovery, disconnects). Use when building or troubleshooting FIX sessions for order routing or drop copy, integrating exchange protocols like OUCH, ITCH, PITCH, or Pillar, designing market data feed architecture (consolidated SIP vs direct feeds), handling trading halts or circuit breakers or LULD bands, planning co-location or failover and disaster recovery for exchange connectivity, implementing Rule 15c3-5 market access controls, or mapping symbology across venues and data sources. For order state machines and execution-report handling see order-lifecycle.
npx skillsauth add joellewis/finance_skills exchange-connectivityInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Trading venues expose electronic interfaces through which broker-dealers, market makers, and institutional participants submit orders and receive execution reports. The connectivity architecture between a firm and its execution venues is a foundational component of trading infrastructure.
Direct Market Access (DMA): DMA allows a firm to send orders directly to an exchange's matching engine without intermediation by another broker's order management system. The firm maintains its own FIX session (or proprietary protocol connection) with the exchange and is responsible for pre-trade risk controls. DMA is used by broker-dealers with exchange memberships and by proprietary trading firms.
Sponsored Access: In a sponsored access arrangement, a non-member firm routes orders to an exchange through a sponsoring broker-dealer's market participant identifier (MPID). The sponsoring broker is responsible for pre-trade risk controls under SEC Rule 15c3-5 (the Market Access Rule). Sponsored access may be "filtered" (orders pass through the sponsor's risk checks before reaching the exchange) or "unfiltered" (orders bypass the sponsor's systems and go directly to the exchange, with the sponsor relying on exchange-level risk controls). The SEC effectively prohibited unfiltered sponsored access through Rule 15c3-5, which requires the broker-dealer providing market access to implement risk management controls and supervisory procedures that are reasonably designed to prevent the entry of erroneous orders.
FIX Protocol Connectivity: The Financial Information eXchange (FIX) protocol is the dominant standard for order routing and execution reporting in equities, options, fixed income, and foreign exchange markets. FIX is a tag-value message format (e.g., Tag 35=D for a New Order Single, Tag 35=8 for an Execution Report). Most U.S. equity exchanges accept FIX for order entry, and FIX is the standard interface for broker-to-broker and broker-to-buy-side connectivity. FIX versions in common use include FIX 4.2 (widely supported, still in use at many venues), FIX 4.4 (added support for multi-leg instruments, allocation instructions), and FIX 5.0/FIXT 1.1 (separated transport and application layers).
Proprietary Exchange Protocols: Several exchanges offer proprietary binary protocols that provide lower latency than FIX due to more compact message encoding and reduced parsing overhead:
Co-location and Proximity Hosting: Exchanges offer co-location services that allow firms to place their trading servers in the same data center as the exchange's matching engine. Co-location minimizes network latency (measured in microseconds) by reducing the physical distance between the firm's server and the exchange. Proximity hosting refers to placing servers in a data center near (but not inside) the exchange's facility, offering somewhat higher latency than co-location but often at lower cost. Major U.S. exchange data centers include the NYSE data center in Mahwah, New Jersey and the Nasdaq data center in Carteret, New Jersey.
Connectivity Providers and Extranets: Financial extranets are private networks that connect market participants to multiple exchanges and trading venues through a single physical connection. Major extranets include:
Redundancy and Failover: Production exchange connectivity must include redundant paths. Standard practice includes: primary and backup FIX sessions to each venue (typically on separate physical network paths), primary and secondary network connections through different extranets or carriers, cross-connect redundancy within co-location facilities, and geographic redundancy where the firm maintains a disaster recovery site capable of resuming trading.
The FIX protocol defines a session layer that handles connection establishment, message sequencing, heartbeating, and recovery. Correct session management is essential for reliable order flow.
Session-Level Messages:
Session Configuration:
Sequence Number Management: Each side of a FIX session maintains two sequence number counters: the outgoing sequence number (incremented with each message sent) and the expected incoming sequence number (incremented with each message received). If the incoming message's sequence number exceeds the expected value, a gap has been detected and a ResendRequest must be issued. If the incoming sequence number is below the expected value (and the message is not flagged as PossDup), the session is in an unrecoverable state and should be disconnected. Sequence numbers are typically persisted to disk so that sessions can recover after restarts without resetting.
Gap Detection and Recovery: When a sequence gap is detected, the receiver sends a ResendRequest specifying the range of missing sequence numbers (BeginSeqNo to EndSeqNo, where EndSeqNo=0 means "infinity" or "to the latest"). The sender retransmits the missing messages with PossDupFlag=Y, indicating they are possible duplicates. The receiver must handle PossDup messages idempotently — for example, an execution report received as a PossDup should not trigger a second fill in the OMS if the original was already processed.
Session Scheduling: Exchange FIX sessions operate on defined schedules aligned with market hours:
Market data feeds deliver price, volume, and order book information from trading venues to market participants. The architecture of market data infrastructure directly impacts a firm's ability to price securities, make trading decisions, and meet best execution obligations.
Data depth tiers: Level 1 (top of book — NBBO and last sale) suffices for most portfolio and compliance workflows; Level 2 (per-venue depth of book) supports market impact estimation and book-imbalance strategies; Level 3 (order-by-order feeds such as Nasdaq ITCH and Cboe PITCH) enables full book reconstruction for market makers and latency-sensitive strategies. The architectural decision is which tier each consuming application actually needs — feed costs, bandwidth, and feed-handler complexity scale steeply with depth.
Consolidated Feeds (SIP): The Securities Information Processor (SIP) is the regulatory mechanism that produces a consolidated view of quotations and trades across all U.S. equity exchanges. Two SIP plans operate:
Direct Feeds (Exchange Proprietary): Each exchange disseminates its own market data directly to subscribers. Direct feeds provide data only for activity on that specific exchange but arrive faster than the consolidated SIP because they do not go through the consolidation step. Firms that require the lowest latency (market makers, statistical arbitrage, latency-sensitive algorithms) typically subscribe to direct feeds from each exchange and build their own internal NBBO from the individual exchange feeds. This is sometimes called a "synthetic NBBO" or "direct NBBO."
Market Data Normalization: Firms receiving data from multiple sources (SIP, multiple direct feeds, vendor feeds) must normalize the data into a unified internal format. Normalization involves: mapping exchange-specific symbology to the firm's internal security master, converting exchange-specific message formats to a common schema, sequencing messages from different sources by exchange timestamp, handling different price formats (decimal, fractional for fixed income), and deduplicating events that appear on both consolidated and direct feeds.
Data Vendor Integration: Major data vendors provide aggregated and enriched market data:
Trading halts and circuit breakers are mechanisms that suspend trading to protect market integrity during periods of extreme volatility or when material information is pending. Systems that interact with exchange order flow must detect, respect, and respond to halts correctly.
Market-Wide Circuit Breakers (MWCB): Market-wide circuit breakers halt trading across all U.S. equity exchanges based on declines in the S&P 500 index. The thresholds are calculated daily based on the prior day's closing value of the S&P 500:
Limit Up-Limit Down (LULD): LULD prevents trades in individual NMS securities from occurring outside specified price bands. The mechanism operates as follows:
Regulatory Halts:
Exchange-Specific Halts: Individual exchanges may implement their own halt mechanisms (e.g., volatility interruptions, matching engine issues). These are communicated through exchange-specific market data messages and administrative notices.
System Handling of Halted Securities: When a trading halt is detected, systems should: (1) immediately stop sending new orders for the halted security to the affected venue(s), (2) determine the disposition of open orders — some halt types cause exchanges to cancel all resting orders; others leave them on the book, (3) alert traders and portfolio managers, (4) decide whether to queue new order requests for submission when trading resumes or to reject them, (5) monitor for the resumption message and re-opening auction, and (6) log the halt event for regulatory reporting (CAT reporting includes halt-related order events).
Trading systems must correctly identify securities across venues, data sources, and internal systems. Multiple identification schemes exist, and a single security typically has different identifiers in different contexts.
Identifier landscape: Ticker symbols are exchange-assigned, change with corporate actions, and are not globally unique. CUSIP (US/Canada) is proprietary and requires a license from CUSIP Global Services; ISIN wraps the CUSIP for US securities and is required for cross-border settlement and regulatory reporting; SEDOL covers UK and Irish listings; FIGI is Bloomberg's open-license identifier with composite (global) and share-class (venue-level) granularity. The operational problems are licensing, change management, and mapping — not the identifier formats themselves.
Symbology Mapping: A security master or symbology mapping service is required to translate between identifier types. For example, Apple Inc. common stock has ticker AAPL (on Nasdaq), CUSIP 037833100, ISIN US0378331005, and FIGI BBG000B9XRY4. When an order is routed to an exchange, the system must use the exchange's expected symbology. When market data arrives from a vendor, the system must map the vendor's identifier to the firm's internal identifier. Symbology mapping must handle: one-to-many relationships (a single corporate entity may have multiple listed securities — common stock, preferred stock, warrants, rights), changes over time (ticker changes, CUSIP changes due to corporate actions), and venue-specific suffixes or extensions.
Corporate Action Impacts on Symbology: Corporate actions frequently change identifiers. A ticker change (rebranding) replaces the trading symbol. A CUSIP change occurs when a security's fundamental terms change (stock split resulting in new shares, merger creating a new entity, conversion of a class of shares). Systems must consume reference data updates (typically distributed by exchanges and data vendors overnight and sometimes intraday) to keep symbology current.
Special Symbols: Certain suffixes and identifiers denote special trading conditions: "WI" (when-issued — trading before the security is formally issued), "RT" (rights), "WS" (warrants), "U" (units), and exchange-specific suffixes for different share classes (e.g., "A" and "B" for dual-class structures).
U.S. equity markets operate on a defined schedule with distinct trading sessions. Trading systems must enforce session-specific rules for order types, pricing, and routing.
Pre-Market Session (4:00 AM - 9:30 AM ET): Some exchanges and ECNs accept orders as early as 4:00 AM ET. Pre-market trading typically has lower liquidity, wider spreads, and may restrict certain order types (e.g., only limit orders permitted, no market orders). Not all securities are available for pre-market trading.
Regular Trading Session (9:30 AM - 4:00 PM ET): The primary trading session during which all NMS protections apply (Reg NMS trade-through rules, LULD bands, market-wide circuit breakers). The session begins with an opening auction and ends with a closing auction.
Post-Market Session (4:00 PM - 8:00 PM ET): Extended-hours trading after the regular session close. Similar restrictions to pre-market: lower liquidity, limit orders only on many venues, wider spreads.
Opening Auction (Opening Cross): Exchanges conduct an opening auction to establish the opening price. During the pre-open period, orders accumulate and the exchange publishes indicative match price and volume. At 9:30 AM ET, the exchange matches accumulated orders at a single clearing price that maximizes executable volume. Nasdaq calls this the "Opening Cross"; NYSE uses its Designated Market Maker (DMM) system to facilitate the open.
Closing Auction (Closing Cross): The closing auction determines the official closing price, which is used for NAV calculations, index rebalancing, and benchmarking. On Nasdaq, the Closing Cross accepts Market-On-Close (MOC) and Limit-On-Close (LOC) orders. On NYSE, the DMM facilitates the close. Closing auction volume has grown significantly — on many days, 5-10% or more of total daily volume executes in the closing auction.
Half-Day Sessions: U.S. markets close early (1:00 PM ET) on the day before Independence Day (July 3, or July 2 if July 3 is a weekend), the day after Thanksgiving (Black Friday), and Christmas Eve (December 24, or December 23 if December 24 is a weekend). Systems must have a holiday calendar that adjusts session times and early close handling.
Holiday Calendar Management: Trading systems must maintain a calendar of market holidays (New Year's Day, MLK Day, Presidents Day, Good Friday, Memorial Day, Juneteenth, Independence Day, Labor Day, Thanksgiving, Christmas) and half-day sessions. The calendar must be updated annually as the exchanges publish their schedules. Holiday calendar errors can result in orders being sent to closed markets (rejected) or orders not being sent when markets are open.
Exchange connectivity must be designed for high availability. Failures in connectivity can prevent order submission, cause missed fills, and create compliance and financial risk.
Primary/Backup Connections: Every production FIX session or data feed should have a backup. The primary and backup connections should use different physical network paths (different switches, different extranets, different ISPs) to avoid common-mode failures. Some firms maintain primary connectivity through one extranet (e.g., TNS) and backup through another (e.g., IPC) to ensure that a single provider outage does not take down all venue connectivity.
Failover Testing: Failover from primary to backup connections must be tested regularly — not only in annual DR (disaster recovery) exercises but through periodic controlled failovers during production trading. Untested failover procedures frequently fail when needed in a real outage.
Heartbeat Monitoring: At the FIX session level, heartbeats detect broken connections. At the infrastructure level, firms typically implement additional monitoring: network-level health checks (ping, TCP connect), application-level health checks (periodic test messages or timing checks on data feed throughput), and latency monitoring that alerts on degradation (e.g., round-trip time exceeding a threshold). Monitoring systems should alert both technologists and trading desks when connectivity degrades or fails.
Session Recovery Procedures: When a FIX session disconnects unexpectedly, the recovery procedure involves: (1) detecting the disconnection (heartbeat timeout or TCP reset), (2) attempting reconnection with exponential backoff to avoid overwhelming the exchange gateway, (3) re-establishing the session with the persisted sequence numbers, (4) performing gap recovery via ResendRequest/SequenceReset to synchronize state, and (5) reconciling open order state — orders that were submitted before the disconnect may have been filled, partially filled, or canceled during the outage, and the firm must determine the current state of each order upon reconnection.
Disaster Recovery and Cross-Region Connectivity: Firms must maintain the ability to resume trading from a secondary site in the event of a primary site failure. DR sites typically have their own exchange connectivity (FIX sessions, market data feeds, network infrastructure) that are kept in standby or warm-standby mode. Critical design decisions include: RTO (Recovery Time Objective) — how quickly must trading resume after a primary site failure, RPO (Recovery Point Objective) — how much order/position state can be lost, and whether the DR site uses the same or different SenderCompIDs (same CompIDs allow seamless continuation; different CompIDs require exchange coordination).
Performance Monitoring: Ongoing monitoring of connectivity performance includes: network latency (one-way and round-trip, measured at the application layer), message throughput (messages per second during peak periods), packet loss rates, order acknowledgment latency (time from order submission to exchange acknowledgment), and market data timeliness (gap between exchange timestamp and firm receipt timestamp). Latency spikes or throughput degradation may indicate network congestion, hardware issues, or exchange gateway problems.
Firms that connect to exchanges and trading venues are subject to specific regulatory requirements governing their systems, controls, and reporting.
Regulation SCI (Systems Compliance and Integrity): SEC Regulation SCI (adopted in 2014, effective November 2015) applies to "SCI entities" — exchanges, certain ATSs that meet volume thresholds (approximately 5% of NMS volume), clearing agencies, the SIP processors, and certain exempt clearing agencies. SCI entities must: establish policies and procedures reasonably designed to ensure that their systems have adequate capacity, integrity, resiliency, availability, and security; conduct periodic reviews and testing of these systems (including business continuity testing); promptly notify the SEC of "SCI events" (system disruptions, system intrusions, and significant system compliance issues); and provide the SEC with annual SCI reviews. While Reg SCI directly applies to exchanges and large ATSs (not to broker-dealers connecting to them), broker-dealers should understand Reg SCI because exchange system failures affect their connectivity and because broker-dealers operating large ATSs may themselves become SCI entities.
Consolidated Audit Trail (CAT): The CAT is a comprehensive order tracking system operated by FINRA on behalf of the SROs. CAT requires broker-dealers and exchanges to report the full lifecycle of every order in NMS securities and OTC equity securities — from order origination through routing, modification, cancellation, and execution. CAT reporting includes: customer identification (via the FDID — Firm Designated Identifier), order receipt and origination timestamps, order routing events (including the destination venue), order modifications and cancellations, and execution details (price, quantity, venue). Firms must assign CAT Reporter IDs, map customer accounts to FDIDs, and submit daily reports to the CAT processor. Exchange connectivity infrastructure must capture the timestamps and routing details required for CAT compliance.
Market Access Controls (SEC Rule 15c3-5): Rule 15c3-5 requires every broker-dealer that provides market access (including access to an exchange or ATS) to establish, document, and maintain a system of risk management controls and supervisory procedures reasonably designed to manage the financial, regulatory, and other risks of market access. Required controls include: pre-trade controls that prevent the entry of orders that exceed pre-set credit or capital thresholds, prevent the entry of erroneous orders (e.g., price reasonability checks, order size limits, duplicate order detection), restrict access to trading systems to authorized persons, and comply with all applicable regulatory requirements (e.g., short sale restrictions, trading halts). The controls must be under the direct and exclusive control of the broker-dealer — they cannot be delegated to the customer or another party. The broker-dealer must conduct regular reviews (at least annually) of the effectiveness of its market access controls.
Pre-Trade Risk Controls for Market Access: Specific controls required or expected under Rule 15c3-5 and exchange rules include: order price collars (rejecting orders with prices far from the current market), maximum order size limits, position limits and capital exposure limits per symbol and aggregate, duplicative order detection, kill switches that can halt all order flow from a firm if a risk threshold is breached, restricted securities lists (preventing trading in halted, delisted, or restricted securities), and short sale compliance checks. These controls must operate in real time with minimal latency impact.
Three worked examples are in references/examples.md — load for an end-to-end scenario: (1) designing FIX connectivity to five equity venues with Rule 15c3-5 controls, (2) building market data infrastructure with consolidated and direct feeds, (3) implementing trading halt handling across OMS, SOR, and market data systems.
tools
Design, build, and optimize dashboards for RIA practice management with AUM tracking, revenue analytics, and KPI frameworks. Use when the user asks about tracking firm-level metrics, monitoring advisor productivity, measuring organic growth rate, analyzing client retention and attrition, building executive or branch manager views, setting up exception alerts for NIGO and operational items, benchmarking against industry peers, or designing role-based dashboard access. Also trigger when users mention 'how is the practice doing', 'revenue per advisor', 'client attrition', 'net new assets', 'effective fee rate', 'practice benchmarking', 'AUM growth decomposition', or 'advisor capacity'.
testing
Model, forecast, and interpret volatility using time-series models and options-implied measures. Use when the user asks about EWMA, GARCH models, implied volatility, volatility surfaces, volatility term structure, or the VIX. Also trigger when users mention 'volatility smile', 'volatility skew', 'realized vs implied vol', 'volatility risk premium', 'vol clustering', 'mean-reverting volatility', 'options pricing inputs', 'RiskMetrics', 'decay factor', or ask how to forecast future volatility for risk management.
testing
Execute a complete tax-loss harvesting workflow from candidate identification through post-harvest monitoring. Use when the user asks about finding TLH candidates, gain/loss budgeting, replacement security selection, wash-sale compliance, or harvest execution planning. Also trigger when users mention 'unrealized losses in my portfolio', 'swap ETFs for tax purposes', 'harvest losses before year-end', 'substantially identical security', 'wash-sale window', 'NIIT offset', 'loss carryforward', or ask how much tax they can save by harvesting.
testing
Maximizes after-tax returns through strategic asset location, gain/loss management, and withdrawal sequencing. Use when the user asks about asset location, Roth conversions, tax-efficient withdrawals, tax lot selection, or charitable giving with appreciated securities. Also trigger when users mention 'which account should I hold bonds in', 'tax drag', 'Roth vs Traditional', 'RMD planning', 'bracket stuffing', 'HIFO vs FIFO', or ask how to minimize taxes on investments. For tax-loss harvesting execution and wash-sale mechanics, see the tax-loss-harvesting skill.