Quincy News API & Wire Format
Realtime access via multicast, WebSocket, or physical cross-connect. Designed for ease, simplicity, and extensibility.
Delivery Options
Quincy News supports multiple delivery mechanisms to meet customer requirements:
- Private cross-connect — direct physical connections in key colocations
- Multicast over Layer 3 — the preferred method for deterministic feeds
- WebSocket delivery — cloud-native and globally accessible
Our backbone spans data centers and clouds worldwide.
Common Message Header
All Quincy News messages begin with a header:
struct MessageHeader { uint8_t schema_version; // high nibble = major, low nibble = minor (0x01 => v0.1) uint8_t flags; // bit flags (see table below) uint16_t message_type; // registry-defined enum value (see registry below) uint16_t message_length; // bytes of header + body uint16_t wire_id; // daily-rotating unique wire codes for sources uint16_t publisher_id; // publisher instance uint16_t reserved; // future use uint32_t sequence_number; // per-publisher, modulo 2^32 uint64_t content_id; // wire_id-specific unique source content identifier; 0 if unavailable uint32_t source_timestamp_s; // seconds since epoch, UTC };
message_type (registry)
// Wire enum for MessageHeader.message_type enum class MessageType : uint16_t { Heartbeat = 0, Headline = 2, StoryBodyFragment = 3, Disclosure = 4, SomeoneSaidSomething = 5, SomeoneSaidX = 6, EventIndicators = 8 };
- schema_version: Upfront for fast conditional parsing.
- flags: 8-bit field with bitwise semantics:
bit 0
(0b00000001
): Message may be a restatement or modification of past content.bit 1
(0b00000010
): Ignore message entirely (testing only); compliant receivers MUST drop.bit 2
(0b00000100
): Premature sequence reset; indicates publisher restarted andsequence_number
reset unexpectedly.bits 3–7
: Reserved for future use; emitters SHOULD send as 0; receivers MUST ignore unknown bits.
- message_type: Required to decode the message body. Unknown values MUST be ignored. See registry above.
- message_length: Total message size in bytes, including this header and the body.
- wire_id: Daily-rotating unique wire codes for sources.
- publisher_id: Unique ID of the publisher sending to this multicast group.
- publisher_id + sequence_number + multicast group: Sequenced per publisher, per multicast group.
- reserved: Reserved for future. Ignore.
- content_id: Independent content identity per wire_id. If not available, set to 0.
- wire_id + content_id: Uniquely identifying a source document.
- source_timestamp_s: Where possible, timestamp from the source document to assist in staleness checks.
Wire Semantics & Conventions
- Byte order & packing: All integers are unsigned and encoded in little-endian. Fields are packed exactly as listed; there is no implicit struct padding on the wire.
- Strings (fixed-width): UTF-8. By default, emitters use only single-byte characters (ASCII subset; one byte per character). If shorter than the field width, strings are NUL-terminated and remaining bytes are padding and MUST be ignored. If the field is fully occupied, it is not NUL-terminated.
- Strings (variable-length): UTF-8 with an explicit
uint16_t
byte length prefix; not NUL-terminated. - Symbols: All tickers are fixed-width
char[12]
, uppercase ASCII (A–Z, 0–9, ".", "-") under current convention. Encoded as UTF-8; presently single-byte characters only. - Counts & lengths: All counts and lengths are measured in bytes, not Unicode code points.
- Sequence rollover:
sequence_number
increments by 1 per message and wraps modulo 232. - Deduplication:
wire_id + content_id
collisions MAY occur across updates (see: flag bit 0). Receivers should deduplicate. Certain Message Bodies will require different de-duplication handling (e.g., where fragment_index exists)
Message Bodies
Heartbeat v0.1
// Body may be zero bytes; presence indicates liveness from a publisher. // MessageHeader.message_type = Heartbeat (0)
Lightweight liveness indicator. No payload parsing required.
Headline Message v0.1
struct HeadlineMessage { uint8_t schema_version; // 0x01 => v0.1 uint8_t language_id; // uint8 -> registry mapping to ISO 639-1 uint8_t ticker_count; // number of 12B, UTF-8 NUL-terminated tickers uint16_t headline_length; // number of UTF-8 bytes }; /* trailing data follows: char tickers[ticker_count][12]; // "MIC:TICKER" char headline_text[headline_length]; // UTF-8, not NUL-terminated */
Ticker-tagged headline with UTF-8 text.
Story Body Fragment v0.1
struct StoryBodyFragmentMessage { uint8_t schema_version; // 0x01 => v0.1 uint16_t fragment_index; // 0-based uint16_t fragment_count; // > 0 uint16_t fragment_length; // number of UTF-8 bytes }; /* trailing data follows: char fragment_text[fragment_length]; // UTF-8, not NUL-terminated */
Multipart UTF-8 content tied to a headline. Reassembly by content_id + (fragment_index, fragment_count).
Someone Said Something v0.1
struct SomeoneSaidSomethingMessage { uint8_t schema_version; // 0x01 => v0.1 uint16_t someone_id; // registry of tracked figures (https://quincy.news/someone_registry.json) uint8_t speech_type; // 0 == speaking, 1 == spoke };
Alert of statements by key public figures. Signal only; no inline content.
Someone Said X v0.1
struct SomeoneSaidXMessage { uint8_t schema_version; // 0x01 => v0.1 uint16_t someone_id; // registry of tracked figures (https://quincy.news/someone_registry.json) uint8_t speech_type; // 0 == speaking, 1 == spoke uint8_t ticker_count; // max 4 uint8_t country_code_count; uint16_t statement_length; // number of UTF-8 bytes }; /* trailing data follows: char tickers[ticker_count][12]; // "MIC:TICKER" char country_codes[country_code_count][2]; // ISO 3166-1 alpha-2 char statement[statement_length]; // UTF-8, not NUL-terminated */
Real-time alerts including the (maybe partial) statement. Ticker- and country-tagged where applicable. Tagging is contextless & extremely simplistic with false positive matching likely.
Raw News v0.1
struct RawMessage { uint8_t schema_version; // 0x01 => v0.1 uint8_t source_wire; // registry of third party sources // (e.g., machine readable news licensed // by third-party providers) }; /* trailing data follows: char* vendor_message; // third-party specific message format, // in its native multicast format */
This structure shows how we deliver third-party licensed news contentacross our global platform. The message preserves the provider’soriginal wire format, so clients can consume it exactly as intended by the vendor, while still benefiting from our distribution and transport advantages.
Event Indicators v0.1
struct EventMessage { uint8_t schema_version; uint8_t event_count; }; /* trailing data follows: Event events[event_count]; */ struct Event { uint32_t event_id; // event registry uint8_t indicator_count; }; /* trailing data follows: EventIndicator indicators[indicator_count]; */ struct EventIndicator { uint8_t indicator_id; // event-specific indicator registry void* value; // event-specific indicator registry mapped types occupying 1-8 bytes total // ... one of bool u/int8 u/int16 u/int32 u/int64 float32 float64 };
Each Event references an event-specific registry that defines its indicator_id values and the concrete wire type for each indicator.
Messages may carry multiple events, particularly when originating from the same primary source.
Congressional Trading Disclosure v0.1
struct DisclosureMessage { uint8_t schema_version; uint16_t someone_id; // registry of tracked figures (https://quincy.news/someone_registry.json) uint8_t trade_count; }; /* trailing data follows: DisclosureTradeMessage disclosure_trades[trade_count]; */ struct DisclosureTradeMessage { uint8_t asset_type; // enum registry char underlying_ticker[12]; // "MIC:TICKER" uint32_t trade_date; // Unix time, UTC seconds uint8_t transact_type; // enum registry uint8_t value_range; // enum registry uint8_t asset_name_length; // <= 255 uint8_t description_length; // <= 255 }; /* trailing data follows: char asset_name[asset_name_length]; // UTF-8, not NUL-terminated char description[description_length]; // UTF-8, not NUL-terminated */
Structured disclosures including asset details and transaction types. trade_date uses Unix epoch seconds (UTC).
DisclosureMessage Registry
asset_type
// code -> symbol -> description 0 -> "UK" -> "Unknown" 1 -> "4K" -> "401K and Other Non-Federal Retirement Accounts" 2 -> "5C" -> "529 College Savings Plan" 3 -> "5F" -> "529 Portfolio" 4 -> "5P" -> "529 Prepaid Tuition Plan" 5 -> "AB" -> "Asset-Backed Securities" 6 -> "BA" -> "Bank Accounts, Money Market Accounts and CDs" 7 -> "BK" -> "Brokerage Accounts" 8 -> "CO" -> "Collectibles" 9 -> "CS" -> "Corporate Securities (Bonds and Notes)" 10 -> "CT" -> "Cryptocurrency" 11 -> "DB" -> "Defined Benefit Pension" 12 -> "DO" -> "Debts Owed to the Filer" 13 -> "DS" -> "Delaware Statutory Trust" 14 -> "EF" -> "Exchange Traded Funds (ETF)" 15 -> "EQ" -> "Excepted/Qualified Blind Trust" 16 -> "ET" -> "Exchange Traded Notes" 17 -> "FA" -> "Farms" 18 -> "FE" -> "Foreign Exchange Position (Currency)" 19 -> "FN" -> "Fixed Annuity" 20 -> "FU" -> "Futures" 21 -> "GS" -> "Government Securities and Agency Debt" 22 -> "HE" -> "Hedge Funds & Private Equity Funds (EIF)" 23 -> "HN" -> "Hedge Funds & Private Equity Funds (non-EIF)" 24 -> "IC" -> "Investment Club" 25 -> "IH" -> "IRA (Held in Cash)" 26 -> "IP" -> "Intellectual Property & Royalties" 27 -> "IR" -> "IRA" 28 -> "MA" -> "Managed Accounts (e.g., SMA and UMA)" 29 -> "MF" -> "Mutual Funds" 30 -> "MO" -> "Mineral/Oil/Solar Energy Rights" 31 -> "OI" -> "Ownership Interest (Holding Investments)" 32 -> "OL" -> "Ownership Interest (Engaged in a Trade or Business)" 33 -> "OP" -> "Options" 34 -> "OT" -> "Other" 35 -> "PE" -> "Pensions" 36 -> "PM" -> "Precious Metals" 37 -> "PS" -> "Stock (Not Publicly Traded)" 38 -> "RE" -> "Real Estate Invest. Trust (REIT)" 39 -> "RF" -> "REIT (EIF)" 40 -> "RN" -> "REIT (non-EIF)" 41 -> "RP" -> "Real Property" 42 -> "RS" -> "Restricted Stock Units (RSUs)" 43 -> "SA" -> "Stock Appreciation Right" 44 -> "ST" -> "Stocks (including ADRs)" 45 -> "TR" -> "Trust" 46 -> "VA" -> "Variable Annuity" 47 -> "VI" -> "Variable Insurance" 48 -> "WU" -> "Whole/Universal Insurance"
transact_type
// code -> symbol/meaning 0 -> "unknown" 1 -> "P" // Purchase 2 -> "S" // Sale 3 -> "S (Partial)" // Partial Sale
value_range
// code -> dollar range (USD) 0 -> "unknown" 1 -> "1,001 - 15,000" 2 -> "15,001 - 50,000" 3 -> "50,001 - 100,000" 4 -> "100,001 - 250,000" 5 -> "250,001 - 500,000" 6 -> "500,001 - 1,000,000" 7 -> "1,000,001 - 5,000,000" 8 -> "5,000,001 - 25,000,000" 9 -> "25,000,001 - 50,000,000" 10 -> "50,000,001 +"
Schema Versioning
- Envelope vs. body: The common header
schema_version
governs the envelope and transport semantics. Each message body begins with its ownschema_version
. - Encoding:
schema_version
packs major in the high nibble and minor in the low nibble (e.g.,0x01
→ v0.1,0x21
→ v2.1). - Compatibility: Minor bumps are additive only (append optional fields at the end).
- Receiver guidance: If a body’s
schema_version
is newer than supported, parse known leading fields and ignore unknown tail bytes usingmessage_length
.
Registries & Enums
Unknown enum values MUST be ignored by receivers. Detailed registries for language ids, someone ids, speech types, asset types, transaction types, and value ranges are provided separately.
Under Development
Additional formats may be introduced behind new message_type
values.