CryptoPatrick / agents
Portrait of minifix, The Broker #2 of 26

Agents/Trading

FIX protocol Available v0.3.0

minifix

The Broker

Bare-essentials FIX: parse and build trading messages.

54Downloads, all time
54Last 90 days
5Releases since Oct 2026

Downloads per day

Last 90 days · 54 total · peak 45

Dossier

What minifix does.

Parses, manipulates and generates FIX protocol messages (FIX 4.0 to 4.4), with codegen, derive, dictionary and SOFH crates in its squad.

From the crate: “A bare essentials library for Financial Information Exchange (FIX)”

Codename
The Broker
Role
FIX protocol
Character
Talks fast in tag=value pairs and counts in microseconds. Treats every message like money, because it is.
Domain
Trading
Enlisted
8 October 2026
Last release
v0.3.0, 8 October 2026
Keywords
fix

Use cases

Put it to work.

Getting started

Call it in.

Add it to a Rust project, then follow the example. The full API is on docs.rs (the docs.rs build for this version hasn't finished or failed; the README below covers the basics).

Install

cargo add minifix

Example

use minifix::prelude::*;

// Parse a FIX message
let message = b"8=FIX.4.2|9=49|35=D|49=SENDER|56=TARGET|34=1|52=20230101-12:00:00|55=AAPL|54=1|38=100|10=123|";
let mut decoder = Decoder::new(Dictionary::fix42());
decoder.config_mut().separator = b'|'; // For display (normally SOH)

let msg = decoder.decode(message)?;
println!("Symbol: {:?}", msg.get::<&[u8]>(fix42::SYMBOL)?); // "AAPL"

// Type-safe field access
let seq_num: u32 = msg.get(fix42::MSG_SEQ_NUM)?;           // Integer field
let symbol: &[u8] = msg.get(fix42::SYMBOL)?;               // String field  
let side: fix42::Side = msg.get(fix42::SIDE)?;             // Enumeration field

// Encode a new message
let mut encoder = Encoder::new();
let mut buffer = Vec::new();
let mut new_msg = encoder.start_message(b"FIX.4.3", &mut buffer, b"D");

new_msg.set(fix43::CL_ORD_ID, "ORDER-12345");
new_msg.set(fix43::SYMBOL, "AAPL");
new_msg.set(fix43::SIDE, fix43::Side::Buy);
new_msg.set(fix43::ORDER_QTY, 100);

let (encoded, _) = new_msg.done();
println!("Encoded: {}", String::from_utf8_lossy(encoded));

More

use minifix::prelude::*;
use minifix::tagvalue::{Decoder, Encoder};

fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Parse a FIX message
    let message = b"8=FIX.4.2|9=73|35=D|49=SENDER|56=TARGET|34=1|52=20230101-12:00:00|11=ORDER1|55=AAPL|54=1|38=100|40=2|44=150.50|59=0|10=123|";
    
    let mut decoder = Decoder::new(Dictionary::fix42());
    decoder.config_mut().separator = b'|';
    
    let msg = decoder.decode(message)?;
    
    // Access fields with type safety
    println!("Order ID: {:?}", msg.get::<&[u8]>(fix42::CL_ORD_ID)?);
    println!("Symbol: {:?}", msg.get::<&[u8]>(fix42::SYMBOL)?);  
    println!("Side: {:?}", msg.get::<fix42::Side>(fix42::SIDE)?);
    
    // Encode a new message
    let mut encoder = Encoder::new();
    let mut buffer = Vec::new();
    let mut new_msg = encoder.start_message(b"FIX.4.2", &mut buffer, b"8");
    
    new_msg.set(fix42::ORDER_ID, "EXEC-001");
    new_msg.set(fix42::SYMBOL, "AAPL");
    new_msg.set(fix42::SIDE, fix42::Side::Buy);
    
    let (encoded, _) = new_msg.done();
    println!("Encoded: {}", String::from_utf8_lossy(encoded));
    
    Ok(())
}

Build with a prompt

Add the Rust crate `minifix` (version 0.3.0) to this project with `cargo add minifix`. I want to use it for this: Parses, manipulates and generates FIX protocol messages (FIX 4.0 to 4.4), with codegen, derive, dictionary and SOFH crates in its squad. Before writing code, read its README at https://crates.io/crates/minifix and the API docs at https://docs.rs/minifix. Use only the functions, types and signatures that appear there; do not invent API names. Write a minimal working example and one test that runs it.

Paste this into Claude Code or another coding agent.

Specs

Version
0.3.0
License
MIT
Edition
Rust 2021
Size
8,407 lines of code, 355 of comments
Package
2,830.7 KB compressed
Dependencies
bytes, chrono, decimal, futures, futures-timer, memchr, minifix-codegen, minifix-derive, minifix-dictionary, nohash-hasher, rust_decimal, serde, serde_json, slog, thiserror, tokio, tokio-util, uuid
Used by
4 crates on crates.io
Features
codegen, derive, fix40, fix41, fix42, fix43, fixt11, full, json-encoding, utils-bytes, utils-chrono, utils-decimal, utils-rust-decimal, utils-slog, utils-tokio
Docs
docs.rs
Repository
cryptopatrick/minifix · 0★ · 0 forks · 0 open issues · pushed 11 Oct 2026

Release history

VersionCrateDateDownloads
0.3.0minifix8 Oct 20268
0.3.0minifix-codegen8 Oct 202612
0.3.0minifix-derive8 Oct 202612
0.3.0minifix-dictionary8 Oct 202614
0.3.0minisofh8 Oct 20268

The squad

5 crates, one agent.

CrateVersionWhat it isDownloads
minifix0.3.0A bare essentials library for Financial Information Exchange (FIX)8
minifix-codegen0.3.0A bare essentials library for Financial Information Exchange (FIX)12
minifix-derive0.3.0A bare essentials library for Financial Information Exchange (FIX)12
minifix-dictionary0.3.0A bare essentials library for Financial Information Exchange (FIX)14
minisofh0.3.0A bare essentials library for Financial Information Exchange (FIX)8

Documentation

The manual.

The crate's README as published on crates.io. The full API reference is on docs.rs.

Read the README


miniFIX
miniFIX

A bare essentials library for Financial Information Exchange (FIX)

What is miniFIX • Features • How To Use • Documentation • License

📌 Table of Contents

Table of Contents
  1. What is miniFIX
  2. Features
  3. How to Use
  4. Documentation
  5. License

🤔 What is miniFIX

minifix is a high-performance, memory-safe Rust library for parsing, manipulating, and generating FIX (Financial Information Exchange) protocol messages. Designed for speed, safety, and ease of use in financial trading systems, it provides zero-copy parsing, type-safe field access, and comprehensive support for FIX protocol versions 4.0 through 4.4. miniFIX is a derivation of the FerrumFIX crate. Our goal is to create a slimmed-down-bare-essentials version of the original crate.

Please note that a lot of the code in miniFIX is drawn from FerrumFIX, and published in accordance with the MIT license (see LICENSE).

Use Cases

  • Trading Systems: Parse and generate order messages, execution reports, and market data
  • Market Data Processing: Handle real-time market data feeds with minimal latency
  • FIX Gateway Development: Build protocol bridges and message routing systems
  • Financial Analytics: Process historical trade data and market information
  • Risk Management: Monitor and analyze trading activity in real-time

Architecture

miniFIX is organized into several focused crates:

  1. minifix: Main library with parsing, encoding, and field type handling
  2. minifix-dictionary: FIX protocol specifications and field definitions
  3. minifix-codegen: Code generation for FIX message structures
  4. minisofh: Simple Open Framing Header (SOFH) support

📷 Features

Core Parsing

  • Zero-copy parsing - Process messages without unnecessary allocations
  • Type safety - Compile-time guarantees for field types and message structure
  • High performance - Optimized for low-latency trading applications
  • Memory safety - No buffer overflows or undefined behavior

FIX Protocol Support

  • Multiple FIX versions - Support for FIX 4.0, 4.1, 4.2, 4.3, and 4.4
  • Message validation - Comprehensive message structure and field validation
  • Repeating groups - Full support for FIX repeating group structures
  • Field type handling - Type-safe field value handling with validation

Integration & Performance

  • Async support - Built-in Tokio integration for async applications
  • Session management - Session handling and heartbeat management
  • JSON encoding - JSON representation of FIX messages
  • SIMD optimizations - Vectorized operations where possible

Example Usage

use minifix::prelude::*;

// Parse a FIX message
let message = b"8=FIX.4.2|9=49|35=D|49=SENDER|56=TARGET|34=1|52=20230101-12:00:00|55=AAPL|54=1|38=100|10=123|";
let mut decoder = Decoder::new(Dictionary::fix42());
decoder.config_mut().separator = b'|'; // For display (normally SOH)

let msg = decoder.decode(message)?;
println!("Symbol: {:?}", msg.get::<&[u8]>(fix42::SYMBOL)?); // "AAPL"

// Type-safe field access
let seq_num: u32 = msg.get(fix42::MSG_SEQ_NUM)?;           // Integer field
let symbol: &[u8] = msg.get(fix42::SYMBOL)?;               // String field  
let side: fix42::Side = msg.get(fix42::SIDE)?;             // Enumeration field

// Encode a new message
let mut encoder = Encoder::new();
let mut buffer = Vec::new();
let mut new_msg = encoder.start_message(b"FIX.4.3", &mut buffer, b"D");

new_msg.set(fix43::CL_ORD_ID, "ORDER-12345");
new_msg.set(fix43::SYMBOL, "AAPL");
new_msg.set(fix43::SIDE, fix43::Side::Buy);
new_msg.set(fix43::ORDER_QTY, 100);

let (encoded, _) = new_msg.done();
println!("Encoded: {}", String::from_utf8_lossy(encoded));

🚙 How to Use

Installation

Add to your Cargo.toml:

[dependencies]
minifix = "0.1"

Or install with cargo:

cargo add minifix

Optional Features

Enable optional features as needed:

minifix = { version = "0.1", features = [
    "fix44",          # FIX 4.4 support (includes 4.0-4.3)
    "utils-chrono",   # chrono integration for date/time fields
    "utils-tokio",    # async/Tokio support
    "json-encoding"   # JSON encoding support
]}

Example

use minifix::prelude::*;
use minifix::tagvalue::{Decoder, Encoder};

fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Parse a FIX message
    let message = b"8=FIX.4.2|9=73|35=D|49=SENDER|56=TARGET|34=1|52=20230101-12:00:00|11=ORDER1|55=AAPL|54=1|38=100|40=2|44=150.50|59=0|10=123|";
    
    let mut decoder = Decoder::new(Dictionary::fix42());
    decoder.config_mut().separator = b'|';
    
    let msg = decoder.decode(message)?;
    
    // Access fields with type safety
    println!("Order ID: {:?}", msg.get::<&[u8]>(fix42::CL_ORD_ID)?);
    println!("Symbol: {:?}", msg.get::<&[u8]>(fix42::SYMBOL)?);  
    println!("Side: {:?}", msg.get::<fix42::Side>(fix42::SIDE)?);
    
    // Encode a new message
    let mut encoder = Encoder::new();
    let mut buffer = Vec::new();
    let mut new_msg = encoder.start_message(b"FIX.4.2", &mut buffer, b"8");
    
    new_msg.set(fix42::ORDER_ID, "EXEC-001");
    new_msg.set(fix42::SYMBOL, "AAPL");
    new_msg.set(fix42::SIDE, fix42::Side::Buy);
    
    let (encoded, _) = new_msg.done();
    println!("Encoded: {}", String::from_utf8_lossy(encoded));
    
    Ok(())
}

📚 Documentation

Comprehensive documentation is available at docs.rs/minifix, including:

  • API reference for all public types and functions
  • Tutorial on FIX message parsing and encoding
  • Examples of different message patterns and use cases
  • Best practices for financial application development

🖊 Author

CryptoPatrick

Keybase Verification:
https://keybase.io/cryptopatrick/sigs/8epNh5h2FtIX1UNNmf8YQ-k33M8J-Md4LnAN

🐣 Support

Leave a ⭐ if you think this project is cool.

🗄 License

This project is licensed under MIT. See LICENSE for details.

Resources

Same unit

Other agents.