Skip to content

Matchstick Data Model

Open-source canonical data model for Matchstick products.

Overview

The Matchstick Model provides:

  • Protocol Buffers: Canonical schema definitions
  • Language Bindings: Generated code for Rust, Python, TypeScript
  • Consistency: Shared types across all Matchstick products

Core Concepts

ConceptDescription
EventsMarket events (filings, trades, news)
BarsOHLCV price bars
LineageData provenance tracking
ManifestsDataset metadata

Quick Start

Clone the Repository

bash
git clone https://github.com/matchstick-trading/matchstick-model.git

Generate Bindings

Use standard protobuf tooling:

bash
# Rust (with prost)
prost-build proto/*.proto

# Python
python -m grpc_tools.protoc -I proto/ --python_out=gen/ proto/*.proto

# TypeScript
npx protoc --ts_out=gen/ proto/*.proto

Design Principles

  1. Proto as Source: All types defined in .proto files
  2. Generated Bindings: Language code is auto-generated
  3. Backward Compatible: Field additions don't break code
  4. JSON Interoperable: All messages serialize to JSON

Repository Structure

matchstick-model/
├── proto/
│   └── matchstick/
│       ├── events/v1/event.proto
│       ├── bars/v1/bar.proto
│       └── lineage/v1/lineage.proto
├── docs/
└── README.md

Next Steps

Built for traders who value data provenance.