NeoeMarketDataFeedClient

From Spire Trading Inc.
Revision as of 20:18, 27 May 2026 by Kamal (talk | contribs) (Created page with "The NeoeMarketDataFeedClient disseminates real-time market data for the Aequitas NEO Exchange. It connects to the Service Locator for authentication and provides order boo...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The NeoeMarketDataFeedClient disseminates real-time market data for the Aequitas NEO Exchange. It connects to the Service Locator for authentication and provides order book data, time and sales, and the consolidated best bid offer (CBBO) for the NEO Exchange.

The feed is split into multiple channels for disseminating the CBBO, book, and trade data. Each channel resides in its own subdirectory whose name starts with the neoe prefix: neoe_cbbo, neoe_cls, and neoe_book for the CBBO, time and sales, and book feeds respectively.

Configuration

Each channel is configured via a YAML file (config.yml) with the following structure:

service_locator:
  # The address of the Service Locator (host:port).
  address: "127.0.0.1:20000"
  # The account username used to authenticate with the Service Locator.
  username: market_data_feed
  # The password for the Service Locator account.
  password: [REQUIRED]

# Rate at which market data snapshots are sampled and forwarded to the
# Market Data Server.
sampling: 100ms

# Multicast group address and port for the feed.
host: "239.0.0.1:30501"

# Network interface to join the multicast group on.
interface: "0.0.0.0:0"

# UDP socket receive buffer size in bytes (default: 128 MB).
receive_buffer: 134217728

# Maximum datagram size (MTU) in bytes (optional; defaults to system MTU).
mtu: 1500

# Retransmission endpoints for recovering dropped packets.
retransmission_request_address: "142.201.149.44:61030"
retransmission_response_address: "142.201.149.44:61031"

# Whether retransmission requests are enabled (default: false).
enable_retransmission: false

# Maximum number of retransmission requests before giving up (default: 10).
max_retransmissions: 10

# Maximum number of messages requested in a single retransmission block (default: 20000).
retransmission_block_size: 20000

# Time zone used to compute the feed's time offset (default: "America/Toronto").
time_zone: "America/Toronto"

# Enable logging of every received message (off by default; verbose when enabled).
enable_logging: false

# Whether this channel carries time and sales data.
is_time_and_sale: false

# Optional MPID rewriting: maps source IDs to canonical MPID names.
mpid_mappings:
  - source: 1
    name: ANON

# Path to the security master list (symbols.yml).
symbol_list: "symbols.yml"

The sampling, host, interface, retransmission_request_address, retransmission_response_address, and symbol_list fields are required. All other fields have defaults.

Security Master

A security master list of traded securities is typically stored in the symbols.yml file with the following format:

- symbol: AAPL                  # The ticker symbol.
  name: APPLE CDR (CAD HEDGED)  # The name of the security.
  board_lot: 100                # The security's board lot.

Changes can be made in this security master list and reloaded by restarting the NEOE CBBO feed.

Setup

The setup.py Python script configures all of the channels at once and can be called as follows:

  --local 192.168.0.100          # Local interface (default: auto-detected IP)
  --address 127.0.0.1:20000      # Service Locator address
  --username market_data_feed    # Service Locator username (default: market_data_feed)
  --password [REQUIRED]          # Service Locator password

Management

Each channel is managed through three core scripts:

  • start.sh - Starts the channel. Does nothing if the channel is already running.
  • stop.sh - Stops the channel and waits for the channel to terminate.
  • check.sh - Verifies that the channel is running.

Logging

Log files are generated as srv_[YYYY][MM][DD]_[HH]_[MM]_[SS].log in the runtime directory. Upon termination, non-empty log files are moved into the log/ subfolder, while empty log files are deleted.