Getting started with 4H
Four Hearts (4H) is a spec-driven Java FIX engine. This tutorial assumes you downloaded the 90-day evaluation package (4h-eval).
Package layout
After unzip you will find:
4h-license.properties— your company-bound evaluation licence (90 days, non-production)examplebank-demo/— TCP initiator/acceptor scripts for the fictional ExampleBank ESP profileexamples/— ROE documents, Lucid sample, and reference materiallib/— 4H engine JARs and dependencies
Keep 4h-license.properties at the package root; the demo scripts pass -D4h.license.required=true automatically.
Prerequisites
- Java 21+
- Evaluation licence file
4h-license.propertiesin the package root
Quick check
cd 4h-eval-*/examplebank-demo
./build.sh
./run-server.sh
In a second terminal:
cd 4h-eval-*/examplebank-demo
./run-client.sh
You should see Logon, heartbeats, then quote and trade messages in both logs.
Troubleshooting
| Symptom | Likely cause |
|---|---|
| Licence error on startup | 4h-license.properties missing or not readable from the working directory |
| Connection refused | Server not running, or wrong host/port in client config |
| Sequence reset loops | A previous run left seqnums out of sync — restart server and client cleanly |
Next steps
- Introduction to FIX — protocol basics before diving deeper
- ExampleBank TCP tutorial — walk through the demo flow
- 4H Academy — FIX fundamentals — short lessons and quizzes