Skip to content

Getting Started

Set up the Matchstick data model in your project.

Clone the Repository

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

Generate Bindings

The model uses standard protobuf tooling. Choose your target language:

Rust

Using prost:

bash
# Add to Cargo.toml
[dependencies]
prost = "0.12"

[build-dependencies]
prost-build = "0.12"
rust
// build.rs
fn main() {
    prost_build::compile_protos(
        &["proto/matchstick/events/v1/event.proto"],
        &["proto/"]
    ).unwrap();
}

Python

Using grpcio-tools:

bash
pip install grpcio-tools

python -m grpc_tools.protoc \
    -I proto/ \
    --python_out=./gen/python \
    proto/matchstick/events/v1/event.proto

TypeScript

Using protobuf-ts:

bash
npm install @protobuf-ts/plugin

npx protoc \
    --plugin=./node_modules/.bin/protoc-gen-ts \
    --ts_out=./gen/ts \
    -I proto/ \
    proto/matchstick/events/v1/event.proto

Using Pre-Built Packages

If available, install the pre-built packages:

Rust:

toml
[dependencies]
matchstick-model = "0.1"

Python:

bash
pip install matchstick-model

TypeScript:

bash
npm install @matchstick/model

Directory Structure

matchstick-model/
├── proto/
│   └── matchstick/
│       ├── events/
│       │   └── v1/
│       │       └── event.proto
│       ├── bars/
│       │   └── v1/
│       │       └── bar.proto
│       ├── lineage/
│       │   └── v1/
│       │       └── lineage.proto
│       └── manifests/
│           └── v1/
│               └── manifest.proto
├── gen/
│   ├── rust/
│   ├── python/
│   └── typescript/
└── README.md

Next Steps

Built for traders who value data provenance.