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-modelGenerate 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.protoTypeScript
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.protoUsing Pre-Built Packages
If available, install the pre-built packages:
Rust:
toml
[dependencies]
matchstick-model = "0.1"Python:
bash
pip install matchstick-modelTypeScript:
bash
npm install @matchstick/modelDirectory 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.mdNext Steps
- Events - Understand the Event message
- Bars - Price bar data model
- Proto Schema - Full schema reference