Specification: This document reflects a work-in-progress wire format and API. It is subject to change without notice.

Quincy News API & Wire Format

Realtime access via multicast, WebSocket, or physical cross-connect. Designed for ease, simplicity, and extensibility.

DRAFTSpec v0.1

Delivery Options

Quincy News supports multiple delivery mechanisms to meet customer requirements:

  • Private cross-connect — direct physical connections in key colocations
  • WebSocket delivery — cloud-native and globally accessible

Our backbone spans data centers and clouds worldwide.

Common Message Header

Every message begins with this 28-byte header.

MessageHeader

FieldOffsetSizeTypeDescription
schema_version01uint8_tSee Schema Versioning.
flags11uint8_tSee Flags.
message_type22uint16_tRegistry below.
message_length42uint16_tHeader and body.
wire_id62uint16_tSource wire.
publisher_id82uint16_tPublisher sending to this channel.
reserved102uint16_tIgnore.
sequence_number124uint32_t+1 per message, per publisher, per channel; wraps at 2³².
content_id168uint64_tSource document within wire_id; 0 if unavailable.
source_timestamp_s244uint32_tSource document time where available; seconds since epoch, UTC.
message_type (registry)
ValueMessage type
0Heartbeat
2Headline
3StoryBodyFragment
4Disclosure
8EventIndicators
9Catalyst

Flags

  • bit 0 (0x01): restatement or modification of earlier content.
  • bit 1 (0x02): test message; receivers MUST drop it.
  • bit 2 (0x04): publisher restarted and sequence_number reset.
  • bits 3–7: defined per message type or channel. Receivers MUST ignore bits they do not recognize.

Wire Semantics & Conventions

  • Channel: one stream of messages, delivered as a multicast group or over a TCP connection.
  • Byte order & packing: Integers are unsigned little-endian. Fields are packed as listed, with no padding.
  • Strings (fixed-width): UTF-8, NUL-terminated unless the field is full. Bytes after the NUL are padding.
  • Strings (variable-length): UTF-8, not NUL-terminated; the byte length is in a length field.
  • Symbols: Fixed-width char[12] in MIC:TICKER form: uppercase ASCII (A–Z, 0–9, ".", "-") with a ":" separator.
  • Offsets: in bytes from the start of the message, shown where fixed. A field without one follows the previous field.
  • Lengths: in bytes, not code points.
  • Enums: receivers MUST ignore unknown values.
  • Deduplication: the same message can arrive from more than one publisher. A message duplicates one seen recently when its header schema_version, flags, message_type, wire_id, and content_id match, plus fragment_index for Story Body Fragments.

Message Bodies

Heartbeat v0.1

Publisher liveness. No body to parse.

Headline Message v0.1

HeadlineMessage

FieldOffsetSizeTypeDescription
schema_version281uint8_t
language_id291uint8_tRegistry below.
ticker_count301uint8_t
headline_length312uint16_t
tickers33Variablechar[ticker_count][12]MIC:TICKER
headline_text—Variablechar[headline_length]

Ticker-tagged headline with UTF-8 text.

language_id (registry)
ValueLanguageTag
1Unknown—
2Englishen
3Spanish (Castilian)es
4Germande
5Frenchfr
6Hebrewhe
7Italianit
8Portuguesept
9Chinese (Mainland)zh-cn
10Chinese (Hong Kong)zh-hk

Story Body Fragment v0.1 / 2.0

StoryBodyFragmentMessage

FieldOffsetSizeTypeDescription
schema_version281uint8_tEncoding profile (below).
fragment_index292uint16_t0-based.
fragment_count312uint16_t
fragment_length332uint16_tUncompressed UTF-8 byte length of this fragment.
encoded_area35Per profileuint8_t[]Per profile.

Story text in fragments, reassembled by content_id + (fragment_index, fragment_count). Under 0x01 and 0x20 each fragment decodes on its own. schema_version selects the encoding profile.

Encoding profiles

schema_versionProfileencoded_areamessage_length
0x01Plain UTF-8fragment_text28 + 7 + fragment_length
0x10ZstandardNot yet available
0x20Reverse Zstandardreverse_bytes(zstd_frame(fragment_text) || random_padding)1450 (encoded_area 1415)
0x20 Reverse Zstandard

The fragment text is compressed into one Zstandard frame, padded with random bytes to fill the 1415-byte encoded area, and byte-reversed. The frame header therefore arrives last, so decoding begins only after the full datagram has arrived. The compressed length is not on the wire; the receiver reads it from the frame.

Example decode:

logical_area  = reverse_bytes(message[35:1450])
frame_length  = ZSTD_findFrameCompressedSize(logical_area, 1415)
fragment_text = zstd_decompress(logical_area[0:frame_length], dictionary_or_none)
Dictionaries

A Zstandard dictionary MAY be assigned to a channel and distributed before use; the frame then carries its dictionary ID. Without one, decode with a plain Zstandard context.

Validation (all profiles)

Reject a fragment when the length is wrong for the profile, the schema version is unsupported, fragment_count is 0, fragment_index ≥ fragment_count, the Zstandard frame is invalid, incomplete, or names a dictionary you do not hold, decompression exceeds your fragment-size limit, the decoded length differs from fragment_length, or the text is not valid UTF-8.

Catalyst Message v0.0

CatalystMessage

FieldOffsetSizeTypeDescription
schema_version281uint8_t
document_type292uint16_tWithin wire_id, e.g. 13D for EDGAR.
entry_count311uint8_t
induction_window_bucket321uint8_tExpected delay before market reaction; registry below.
reserved332uint16_tIgnore.
entities35VariableQuincyEntityID[entry_count]

QuincyEntityID

FieldOffsetSizeTypeDescription
quincy_entity_id—8uint64_tCompany.

Flags entities with elevated event intensity that may see abnormal price movement.

induction_window_bucket (registry)
ValueBucket
0Unknown
1Subsecond
2Seconds
3More

Raw News v0.1

RawMessage

FieldOffsetSizeTypeDescription
schema_version281uint8_t
source_wire291uint8_tThird-party source (registry).
vendor_message30Rest of messageuint8_t[]The source's native message.

Event Indicators v0.1

EventMessage

FieldOffsetSizeTypeDescription
schema_version281uint8_t
event_count291uint8_t
events30VariableEvent[event_count]

Event

FieldOffsetSizeTypeDescription
event_id—4uint32_tRegistry: https://quincy.news/event_indicator_registry.json
indicator_count—1uint8_t
indicators—VariableEventIndicator[indicator_count]

EventIndicator

FieldOffsetSizeTypeDescription
indicator_id—1uint8_tEvent-specific indicator registry.
value—1–8Per registryOne of bool, (u)int8/16/32/64, float32, float64.

A message may carry several events, typically from the same primary source.

Congressional Trading Disclosure v0.1

DisclosureMessage

FieldOffsetSizeTypeDescription
schema_version281uint8_t
someone_id292uint16_tTracked figure. Registry: https://quincy.news/someone_registry.json
trade_count311uint8_t
disclosure_trades32VariableDisclosureTradeMessage[trade_count]

DisclosureTradeMessage

FieldOffsetSizeTypeDescription
asset_type—1uint8_tRegistry below.
underlying_ticker—12char[12]MIC:TICKER
trade_date—4uint32_tSeconds since epoch, UTC.
transact_type—1uint8_tRegistry below.
value_range—1uint8_tRegistry below.
asset_name_length—1uint8_t
description_length—1uint8_t
asset_name—Variablechar[asset_name_length]
description—Variablechar[description_length]

DisclosureMessage Registry

asset_type
ValueCodeDescription
0UKUnknown
14K401K and Other Non-Federal Retirement Accounts
25C529 College Savings Plan
35F529 Portfolio
45P529 Prepaid Tuition Plan
5ABAsset-Backed Securities
6BABank Accounts, Money Market Accounts and CDs
7BKBrokerage Accounts
8COCollectibles
9CSCorporate Securities (Bonds and Notes)
10CTCryptocurrency
11DBDefined Benefit Pension
12DODebts Owed to the Filer
13DSDelaware Statutory Trust
14EFExchange Traded Funds (ETF)
15EQExcepted/Qualified Blind Trust
16ETExchange Traded Notes
17FAFarms
18FEForeign Exchange Position (Currency)
19FNFixed Annuity
20FUFutures
21GSGovernment Securities and Agency Debt
22HEHedge Funds & Private Equity Funds (EIF)
23HNHedge Funds & Private Equity Funds (non-EIF)
24ICInvestment Club
25IHIRA (Held in Cash)
26IPIntellectual Property & Royalties
27IRIRA
28MAManaged Accounts (e.g., SMA and UMA)
29MFMutual Funds
30MOMineral/Oil/Solar Energy Rights
31OIOwnership Interest (Holding Investments)
32OLOwnership Interest (Engaged in a Trade or Business)
33OPOptions
34OTOther
35PEPensions
36PMPrecious Metals
37PSStock (Not Publicly Traded)
38REReal Estate Invest. Trust (REIT)
39RFREIT (EIF)
40RNREIT (non-EIF)
41RPReal Property
42RSRestricted Stock Units (RSUs)
43SAStock Appreciation Right
44STStocks (including ADRs)
45TRTrust
46VAVariable Annuity
47VIVariable Insurance
48WUWhole/Universal Insurance
transact_type
ValueCodeMeaning
0unknown—
1PPurchase
2SSale
3S (Partial)Partial sale
value_range
ValueRange (USD)
0unknown
11,001 – 15,000
215,001 – 50,000
350,001 – 100,000
4100,001 – 250,000
5250,001 – 500,000
6500,001 – 1,000,000
71,000,001 – 5,000,000
85,000,001 – 25,000,000
925,000,001 – 50,000,000
1050,000,001 +

Schema Versioning

  • The header and each message body carry their own schema_version.
  • Major version in the high nibble, minor in the low: 0x01 is v0.1, 0x21 is v2.1.
  • Minor versions only append fields at the end. For a newer minor version, parse the known fields and skip the rest using message_length.
  • Major versions may change the layout. Reject a major version you do not support.

Under Development

Additional formats may be introduced behind new message_type values.