Install
$ agentstack add skill-joellewis-finance-skills-exchange-connectivity ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Exchange Connectivity
Core Concepts
Venue Connectivity Architecture
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:
- OUCH — Nasdaq's order entry protocol. Binary format, supports order submission, cancellation, and replacement. Commonly used by high-frequency and low-latency participants on Nasdaq and its affiliated venues.
- ITCH — Nasdaq's market data dissemination protocol. Provides a full order-by-order (Level 3) view of the Nasdaq order book, including every order add, modify, cancel, and execute event. ITCH is the basis for Nasdaq's TotalView data product.
- PITCH — Cboe's market data protocol for the BZX, BYX, EDGX, and EDGA exchanges. Like ITCH, PITCH provides order-by-order depth-of-book data.
- Pillar — NYSE's integrated trading technology platform, supporting both order entry and market data across NYSE, NYSE Arca, NYSE American, and NYSE National. Pillar uses binary protocols for gateway connectivity.
- BOE (Binary Order Entry) — Cboe's proprietary order entry protocol, offering lower-latency order submission than FIX on Cboe equity exchanges.
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:
- TNS (Transaction Network Services) — Provides managed connectivity to global exchanges and trading venues.
- IPC (now part of Atos) — Operates the Connexus Cloud financial extranet connecting trading firms to exchanges, market data providers, and service bureaus.
- BSO (Boldon Smart Operations) — Offers low-latency network infrastructure for financial markets.
- Options Technology — Provides connectivity and managed infrastructure for trading firms.
Extranets reduce the operational burden of maintaining individual point-to-point connections to each venue but introduce a shared network dependency.
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.
FIX Session Management
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:
- Logon (MsgType=A): Initiates a FIX session. Contains the SenderCompID, TargetCompID, and agreed heartbeat interval. The exchange or counterparty responds with its own Logon message to confirm the session. Some venues require encryption or authentication tokens in the Logon message.
- Logout (MsgType=5): Gracefully terminates a FIX session. Either side may initiate. A well-behaved implementation sends Logout and waits for the counterparty's Logout response before closing the TCP connection.
- Heartbeat (MsgType=0): Sent at the agreed interval (typically 30 seconds) when no other messages are being exchanged. Confirms the session is alive. If no Heartbeat is received within the expected interval (plus a tolerance), the counterparty should send a TestRequest.
- TestRequest (MsgType=1): Sent when a Heartbeat is overdue. The receiving side must respond with a Heartbeat containing the TestReqID from the TestRequest. Failure to respond indicates a broken connection.
- ResendRequest (MsgType=2): Requests retransmission of messages within a sequence number range. Used when a sequence number gap is detected — for example, the receiving side expects sequence number 100 but receives 105, indicating messages 100-104 were missed.
- SequenceReset (MsgType=4): Used in two modes. Gap-fill mode (GapFillFlag=Y) advances the expected sequence number past administrative messages that do not need to be retransmitted. Reset mode (GapFillFlag=N) forces the sequence number to a new value, typically used only during session initialization or error recovery. Reset mode is dangerous because it can cause message loss if used improperly.
- Reject (MsgType=3): Sent when a message fails session-level validation (malformed tags, invalid data type, required field missing). A Reject does not indicate a business-level rejection — it means the message could not be parsed.
Session Configuration:
- SenderCompID / TargetCompID: Unique identifiers for each side of the FIX session. Assigned by the exchange or agreed between counterparties. A firm typically has a distinct SenderCompID for each FIX session it maintains.
- Heartbeat interval: Agreed during Logon. Common values are 30 seconds for order sessions and 10-30 seconds for market data sessions.
- ResetOnLogon: Some implementations reset sequence numbers to 1 on each Logon. Others persist sequence numbers across sessions and rely on ResendRequest/SequenceReset for gap recovery. Exchange-specific documentation governs which approach is required.
- Message encoding: Standard FIX uses ASCII tag=value pairs separated by SOH (0x01) delimiters. Some venues support FAST (FIX Adapted for Streaming) encoding for market data, which uses binary compression to reduce bandwidth.
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:
- Pre-market session: Many exchanges accept orders starting at 7:00 or 8:00 ET (some as early as 4:00 ET for extended hours). The FIX session may need to be established before order entry begins to allow for Logon, sequence synchronization, and any pre-open messaging.
- Market hours: 9:30-16:00 ET for U.S. equities. FIX sessions must be fully operational before the opening auction.
- Post-market session: Order entry may continue until 17:00 or 20:00 ET depending on the venue. Some venues require separate session parameters for extended hours.
- End-of-day: Sessions may be logged out and sequence numbers reset (or persisted) at the end of the trading day. The specific end-of-day procedure varies by exchange.
Market Data Feeds
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:
- CTA/CQS (Consolidated Tape Association / Consolidated Quotation System): Consolidates trades and quotes for securities listed on NYSE, NYSE Arca, NYSE American, and other exchanges. CTA produces the consolidated tape (last sale data) and CQS produces consolidated quotations (NBBO).
- UTP (Unlisted Trading Privileges Plan): Consolidates trades and quotes for Nasdaq-listed securities across all venues.
The SIP feeds represent the "official" NBBO and are used as the reference for Regulation NMS trade-through protection. SIP data has historically been slower than direct exchange feeds due to the consolidation process, introducing latency differences that have been the subject of regulatory debate.
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:
- Bloomberg — The Bloomberg Terminal and Bloomberg B-PIPE provide real-time and historical market data, reference data, and analytics. Bloomberg uses its own symbology (Bloomberg tickers, FIGIs) and data delivery APIs (BLPAPI).
- Refinitiv (LSEG) — Refinitiv Elektron provides real-time market data and the Refinitiv Eikon terminal provides analytics. Refinitiv uses RIC (Reuters Instrument Code) symbology.
- ICE Data Services — Provides real-time data, reference data, and evaluated pricing across asset classes.
Vendor feeds simplify connectivity by providing a single interface to data from hundreds of venues, but introduce vendor-specific latency, symbology layers, and contractual obligations (exchange data redistribution agreements, per-user licensing).
Trading Halts and Circuit Breakers
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:
- Level 1 (7% decline): If triggered before 3:25 PM ET, trading halts for 15 minutes. If triggered at or after 3:25 PM ET, trading continues.
- Level 2 (13% decline): If triggered before 3:25 PM ET, trading halts for 15 minutes. If triggered at or after 3:25 PM ET, trading continues.
- Level 3 (20% decline): Trading halts for the remainder of the trading day, regardless of when triggered.
Each level can only be triggered once per day. A Level 1 halt does not prevent a subsequent Level 2 or Level 3 halt if the market continues to decline after trading resumes.
Limit Up-Limit Down (LULD): LULD prevents trades in individual NMS securities from occurring outside specified price bands. The mechanism operates as follows:
- Reference price: The arithmetic mean of the reported transaction prices over the preceding five-minute window, updated every 30 seconds during regular trading hours.
- Price bands: Calculated as a percentage above and below the reference price. The percentage varies by security tier: 5% for Tier 1 securities (S&P 500, Russell 1000, and certain ETPs) and 10% for Tier 2 securities (all other NMS securities). Wider bands (20%) apply d
…
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: JoelLewis
- Source: JoelLewis/finance_skills
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.