Hrithik.Fix.Protocol 1.0.0

dotnet add package Hrithik.Fix.Protocol --version 1.0.0
                    
NuGet\Install-Package Hrithik.Fix.Protocol -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Hrithik.Fix.Protocol" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Hrithik.Fix.Protocol" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Hrithik.Fix.Protocol" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Hrithik.Fix.Protocol --version 1.0.0
                    
#r "nuget: Hrithik.Fix.Protocol, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Hrithik.Fix.Protocol@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Hrithik.Fix.Protocol&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Hrithik.Fix.Protocol&version=1.0.0
                    
Install as a Cake Tool

Hrithik.Fix.Protocol

Hrithik.Fix.Protocol is a production-grade FIX message construction and outbound protocol library for .NET.

It allows clients to send JSON-based requests that are dynamically converted into valid FIX messages, validated against official FIX dictionaries, and sent via a pluggable transport (e.g. QuickFIX).

This package focuses strictly on FIX message creation and outbound sending. It does NOT manage FIX sessions or inbound FIX business messages.

✨ Key Features

✅ JSON → FIX message conversion (dynamic fields)

✅ Supports NEW / CANCEL / MODIFY orders

✅ FIX 4.4 / FIX 5.0 dictionary validation

✅ Required field & type validation

✅ Automatic FIX fields (e.g. TransactTime)

✅ Protocol-level security hooks (replay protection, signing)

✅ Transport-agnostic design via interfaces

✅ Clean separation of protocol vs session lifecycle

❌ What This Package Does NOT Do

To keep the library reusable and production-safe, the following are intentionally out of scope:

❌ FIX session lifecycle (logon, logout, heartbeats)

❌ TCP / socket management

❌ Host / port configuration

❌ Inbound FIX message handling (ExecutionReports, Rejects)

❌ Trading / order state management

❌ Venue-specific business rules

These responsibilities belong in the application layer (e.g. a FIX Gateway or API).

🧠 Architecture Overview Client JSON ↓ Hrithik.Fix.Protocol

  • Mapping
  • Validation
  • Security
  • FIX message creation ↓ IFixSender (abstraction) ↓ Application Layer (e.g. QuickFIX) ↓ FIX Session / Venue (FiX, Exchange, Broker)

📦 Installation dotnet add package Hrithik.Fix.Protocol

🚀 Quick Start 1️⃣ Register FIX Protocol Services services.AddFixProtocol(options ⇒ { options.FixVersion = FixVersion.Fix44; options.EnableReplayProtection = false; });

2️⃣ Provide a Transport (Sender)

The package requires an implementation of IFixSender.

Example using QuickFIX (managed in your application, not this package):

services.AddSingleton<IFixSender>( sp ⇒ new QuickFixSender(sessionId));

The transport implementation is responsible for:

Knowing whether the FIX session is logged on

Knowing host/port

Sending messages over the wire

3️⃣ Send an Order var request = new FixOrderRequest { OrderType = "NEW", Fields = new Dictionary<string, object> { ["ClOrdID"] = "order-123", ["Symbol"] = "AAPL", ["Side"] = "1", ["OrderQty"] = 10, ["OrdType"] = "1", ["TimeInForce"] = "0" } };

await fixProtocolClient.SendAsync(request);

📄 Example JSON Request { "orderType": "NEW", "fields": { "ClOrdID": "order-123", "Symbol": "AAPL", "Side": "1", "OrderQty": 10, "OrdType": "1", "TimeInForce": "0" } }

🧪 Validation Behavior

The library validates:

✔ MsgType exists in FIX dictionary

✔ Required FIX fields are present

✔ All fields exist in the FIX dictionary

✔ Field types are valid

It does not enforce:

Message-component placement

Venue-specific rules

This mirrors how real FIX engines behave in production.

🔌 Transport Abstraction public interface IFixSender { Task<FixSendResult> SendAsync(FixMessage message); }

This allows:

QuickFIX

Custom FIX engines

Mock senders for testing

🔐 Security & Observability

Optional protocol-level features:

Replay protection

Request signing

Correlation IDs

Logging hooks

These are orthogonal to FIX session handling.

🏗 Recommended Usage Pattern

Library (Hrithik.Fix.Protocol)

Message creation

Validation

Outbound send abstraction

Gateway / API Project

QuickFIX configuration

Session lifecycle

Inbound FIX message handling

Persistence, webhooks, APIs

📌 Design Principles

Clean Architecture

Dependency Inversion

FIX-standard aligned

Venue-agnostic

Production-first

📄 License

MIT License

👤 Author

Hrithik Kalra

📧 Email: hrithikkalra11@gmail.com

If you find this package useful, consider supporting its development:

Support is entirely optional and helps sustain ongoing development and maintenance.


This package is part of the Hrithik.Security ecosystem:

  • Hrithik.Security.ApiKeyManagement
    API key generation, storage, and scope-based authorization

  • Hrithik.Security.RequestSigning
    HMAC-based request signing for tamper-proof APIs

  • Hrithik.Security.ReplayProtection
    Short-window replay attack prevention

  • Hrithik.Security.RateLimiting
    Flexible, API-key–aware rate limiting for ASP.NET Core APIs

  • Hrithik.Security.Idempotency Exactly-once request processing using client-supplied or server-generated keys

  • Hrithik.Security.Jose JOSE (JWS/JWE) utilities for signing, verification, and optional encryption of JSON payloads

These packages are independent and can be used together or individually.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 128 2/3/2026