Marketfeed

The bundled file adapters are ideal for learning and small fixtures. Marketfeed is the normal bridge to the larger local historical archive. It is a companion Go project, not a package inside this repository:

  • Marketfeed owns acquisition, canonical names, archive layout, coverage manifests and faithful reads across data-source eras.
  • marketfeed-adapter exposes that archive to Algolang over the data wire.
  • Algolang decides how a strategy run is assembled, including continuous-contract stitching on the feed’s served roll schedule, price adjustment and execution.

The viewers and the engine roll on one rule. Marketfeed’s :cont composite, its viewers, and every engine continuous run follow the feed’s served roll schedule, compiled from the root’s roll: rule: ES’s C:EXP-12:VOL:1 becomes a backstop 12 calendar days before expiry. The engine elects nothing and reads no roll knob of its own; it fetches the schedule over the protobuf wire and executes it. That is decision D1 of the feed-owned continuous futures proposal, implemented by GLE-270.

Building and selecting the adapter

make marketfeed-adapter builds the adapter into bin/ from the marketfeed commit pinned in marketfeed.ref, compiled against this checkout (Pinned checkouts). An installed marketfeed (make install there) puts the same binary at /usr/local/bin/marketfeed-adapter. Pass either one to algo run:

make marketfeed-adapter
export MF_ADAPTER=$PWD/bin/marketfeed-adapter

bin/algo run \
  --adapter "$MF_ADAPTER" \
  --adapter-inputs Dir=/usr/local/marketfeed \
  --strategy bin/hello \
  --symbols fut:XCME:ES:M26 \
  --interval 1h \
  --start 2026-01-01T00:00:00Z \
  --end 2026-04-01T00:00:00Z

Dir is the adapter’s only input. If it is omitted, the adapter uses $MARKETFEED_DIR, then /usr/local/marketfeed. A particular installation may not contain the symbol or range in this example; empty or partial archive coverage is data state, not something the adapter invents around.

The adapter is historical in this build. It advertises time bars, the event-driven bar kinds when a trade tape is present, raw trades, instrument metadata, granularity-aware coverage, and optional intra-bar paths. A marketfeed built against this SDK also serves intraday grids and answers the engine’s capability probe with the calendar revision of the requested boundary; the marketfeed commit pinned in marketfeed.ref does. The engine negotiates the wire automatically. Force --data-protocol pb when a feature requires per-record symbol identity or nested path data.

Marketfeed also stores irregular COT, FX and macro series, served by release time; see the next section.