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 profile
  • examples/ — ROE documents, Lucid sample, and reference material
  • lib/ — 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.properties in 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