├── .github
└── workflows
│ ├── dotnet.yml
│ └── release.yml
├── .gitignore
├── CHANGELOG.md
├── Directory.Build.props
├── Examples
└── Fix.Dictionary.Api
│ ├── Fix.Dictionary.Api.csproj
│ └── Program.cs
├── FIXClient.png
├── Fix.Common.Tests
├── Fix.Common.Tests.csproj
└── ReportTests.cs
├── Fix.Common
├── DirtyTimer.cs
├── Fix.Common.csproj
└── Report.cs
├── Fix.Dictionary.Tests
├── DataTypeTests.cs
├── FieldTests.cs
├── Fix.Dictionary.Tests.csproj
├── MessageTests.cs
└── VersionTests.cs
├── Fix.Dictionary
├── ApplVerIdTypeConverter.cs
├── BeginStringTypeConverter.cs
├── DataType.cs
├── FieldValue.cs
├── Fix.Dictionary.csproj
├── Message.cs
├── MessageField.cs
├── MessageFieldCollection.cs
├── Pedigree.cs
├── README.md
├── Version.cs
├── VersionCollection.cs
├── VersionDataTypeCollection.cs
├── VersionField.cs
├── VersionFieldCollection.cs
└── VersionMessageCollection.cs
├── Fix.Lexicographer
├── lexicographer.py
├── orchestration_data_types_generator.py
├── orchestration_fields_generator.py
├── orchestration_generator.py
├── orchestration_messages_generator.py
├── pedigree.py
└── sanitise.py
├── Fix.Tests
├── FieldCollectionTests.cs
├── FieldTests.cs
├── Fix.Tests.csproj
├── GlobalSuppressions.cs
├── Logs
│ ├── t_amend_cancel.log
│ ├── t_atlas.log
│ ├── t_cancel_leavesqty.log
│ ├── t_fill_while_amend_pending.log
│ ├── t_fill_while_cancel_pending.log
│ ├── t_fix_4_0_amend.log
│ ├── t_gate_ci.log
│ ├── t_gate_driver.log
│ ├── t_gate_raw_ci.log
│ ├── t_gate_raw_driver.log
│ ├── t_kls.log
│ ├── t_new_amend.log
│ ├── t_qj.log
│ ├── t_upward_amend_filled.log
│ └── t_upward_amend_filled_to_partial.log
├── MessageTests.cs
├── OrderBookTests.cs
├── OrderTests.cs
├── ParserTests.cs
├── PersistentSessionTests.cs
├── ReaderTests.cs
├── SessionTests.cs
├── SessionTestsBase.cs
├── SessionTransportTests.cs
└── WriterTests.cs
├── Fix.sln
├── Fix
├── Field.cs
├── FieldCollection.cs
├── FieldDescription.cs
├── Fix.csproj
├── Json.cs
├── Message.Fields.cs
├── Message.cs
├── MessageCollection.cs
├── MessageDescription.cs
├── Network.cs
├── NetworkStream.cs
├── NonClosingStreamDecorator.cs
├── Order.cs
├── OrderBook.cs
├── OrderCollection.cs
├── OrderReport.cs
├── Parsers
│ ├── FormattedLogParser.cs
│ ├── GenericLogParser.cs
│ ├── KlsLogParser.cs
│ ├── LogParser.cs
│ └── Parser.cs
├── PersistentSession.cs
├── Reader.cs
├── Session.Transport.cs
├── Session.cs
└── Writer.cs
├── FixClient.Tests
├── FixClient.Tests.csproj
└── SessionTests.cs
├── FixClient
├── AboutForm.cs
├── AboutForm.designer.cs
├── AboutForm.resx
├── BorderHidingPanel.Designer.cs
├── BorderHidingPanel.cs
├── CHANGELOG.TXT
├── CheckGroupBox
│ ├── CheckGroupBox.Designer.cs
│ ├── CheckGroupBox.bmp
│ └── CheckGroupBox.cs
├── ConnectForm.Designer.cs
├── ConnectForm.cs
├── ConnectForm.resx
├── CustomFields.xml
├── Customise
│ ├── CustomField.cs
│ ├── CustomFieldCategory.cs
│ ├── CustomFieldCollection.cs
│ ├── CustomFieldDataRow.cs
│ ├── CustomFieldDataTable.cs
│ ├── CustomFieldForm.Designer.cs
│ ├── CustomFieldForm.cs
│ ├── CustomFieldForm.resx
│ ├── CustomPropertyGrid.cs
│ ├── CustomiseFieldDataGridView.Designer.cs
│ ├── CustomiseFieldDataGridView.cs
│ ├── CustomisePanel.Designer.cs
│ └── CustomisePanel.cs
├── DataGridViewControls
│ ├── DataGridViewIndentCell.cs
│ └── DataGridViewIndentColumn.cs
├── DataGridViewImageColumnHeaderCell.cs
├── DataSet
│ ├── FieldDataRow.cs
│ ├── FieldDataTable.cs
│ ├── MessageDataRow.cs
│ ├── MessageDataTable.cs
│ ├── MessageTypeDataRow.cs
│ ├── MessageTypeDataTable.cs
│ ├── OrderDataRow.cs
│ └── OrderDataTable.cs
├── DictionaryPanel.Designer.cs
├── DictionaryPanel.cs
├── EditableMessageFieldDataGridView.Designer.cs
├── EditableMessageFieldDataGridView.cs
├── EnumDescription.cs
├── FieldDataGridView.Designer.cs
├── FieldDataGridView.cs
├── Filters
│ ├── FilterFieldDataGridView.Designer.cs
│ ├── FilterFieldDataGridView.cs
│ ├── FilterFieldDataTable.cs
│ ├── FilterMessageDataGridView.Designer.cs
│ ├── FilterMessageDataGridView.cs
│ ├── FilterMessageDataRow.cs
│ ├── FilterMessageDataTable.cs
│ ├── FiltersPanel.Designer.cs
│ └── FiltersPanel.cs
├── FixClient.csproj
├── FixClient.ico
├── FixClientPanel.Designer.cs
├── FixClientPanel.cs
├── GeneratorPanel.Designer.cs
├── GeneratorPanel.cs
├── GlobalSuppressions.cs
├── GoaEditor.Designer.cs
├── GoaEditor.cs
├── GoaEditor.resx
├── History
│ ├── HistoryMessageDataGridView.Designer.cs
│ ├── HistoryMessageDataGridView.cs
│ ├── HistoryPanel.Designer.cs
│ └── HistoryPanel.cs
├── InspectorPanel.Designer.cs
├── InspectorPanel.cs
├── Log
│ ├── LogMessageDataGridView.cs
│ ├── LogMessageDataGridView.designer.cs
│ ├── LogMessageDataTable.cs
│ ├── LogPanel.Designer.cs
│ └── LogPanel.cs
├── LookAndFeel.cs
├── MainForm.Designer.cs
├── MainForm.cs
├── MainForm.resx
├── MessageFieldDataGridView.Designer.cs
├── MessageFieldDataGridView.cs
├── MessageOptionsPanel.Designer.cs
├── MessageOptionsPanel.cs
├── MessageTypeDataGridView.Designer.cs
├── MessageTypeDataGridView.cs
├── MessagesPanel.Designer.cs
├── MessagesPanel.cs
├── NativeTabControl.cs
├── Orders
│ ├── OrderDataGridView.Designer.cs
│ ├── OrderDataGridView.cs
│ ├── OrdersPanel.Designer.cs
│ └── OrdersPanel.cs
├── Parser
│ ├── ParserPanel.Designer.cs
│ └── ParserPanel.cs
├── PasteMessageForm.Designer.cs
├── PasteMessageForm.cs
├── PasteMessageForm.resx
├── Program.cs
├── Properties
│ ├── PublishProfiles
│ │ └── FolderProfile.pubxml
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── Settings.Designer.cs
│ ├── Settings.cs
│ └── Settings.settings
├── ResetForm.Designer.cs
├── ResetForm.cs
├── ResetForm.resx
├── Resources
│ ├── AddCategoryFields.bmp
│ ├── Back.png
│ ├── CheckAll.bmp
│ ├── Clear.bmp
│ ├── Customise.bmp
│ ├── DeleteCustomField.bmp
│ ├── Dictionary.bmp
│ ├── EditCustomField.bmp
│ ├── Export.bmp
│ ├── Filter.bmp
│ ├── Filters.bmp
│ ├── FixClient.ico
│ ├── Forward.png
│ ├── Function.bmp
│ ├── GOA.bmp
│ ├── History.bmp
│ ├── Log.bmp
│ ├── MessageStatusError.png
│ ├── MessageStatusInfo.png
│ ├── MessageStatusNone.png
│ ├── MessageStatusWarn.png
│ ├── Messages.bmp
│ ├── Minimise.bmp
│ ├── New.bmp
│ ├── NewCustomField.bmp
│ ├── Open.bmp
│ ├── Options.bmp
│ ├── Orders.bmp
│ ├── Parser.bmp
│ ├── Paste.bmp
│ ├── Pause.bmp
│ ├── RemoveFields.bmp
│ ├── RemoveFilter.bmp
│ ├── RepeatFields.bmp
│ ├── Reset.bmp
│ ├── ResetFields.bmp
│ ├── Restore.bmp
│ ├── Send.png
│ ├── Spy.bmp
│ ├── Start.bmp
│ ├── Stop.bmp
│ ├── Test.bmp
│ ├── Trades.bmp
│ └── UnCheckAll.bmp
├── SearchTextBox
│ ├── ButtonTextBox.cs
│ ├── CueTextBox.cs
│ └── SearchTextBox.cs
├── Session.Net.cs
├── Session.cs
├── SessionForm.Designer.cs
├── SessionForm.cs
├── SessionForm.resx
├── StringExtensions.cs
├── TcpSocketListener.cs
├── ToolStripCheckBox.cs
├── ToolStripCheckBox.designer.cs
└── ToolStripRenderer.cs
├── FixPerformanceTest
├── FixPerformanceTest.csproj
└── Program.cs
├── FixPersistentSessionPerformanceTest
├── FixPersistentSessionPerformanceTest.csproj
└── Program.cs
├── LICENSE
├── README.md
├── fixorchestra
├── .gitignore
├── LICENSE
├── README.md
├── fixaudit
│ ├── __init__.py
│ └── fixaudit.py
├── fixorchestra
│ ├── __init__.py
│ └── orchestration.py
├── fixrepository
│ ├── __init__.py
│ └── repository.py
└── fixreptorc
│ ├── __init__.py
│ └── fixreptorc.py
├── nuget.config
└── orchestrations
├── fix_repository_4_0.xml
├── fix_repository_4_2.xml
├── fix_repository_4_4.xml
└── fix_repository_5_0SP2_EP258.xml
/.github/workflows/dotnet.yml:
--------------------------------------------------------------------------------
1 | name: FIX Client
2 |
3 | on:
4 | push:
5 | branches: [ master ]
6 | pull_request:
7 | branches: [ master ]
8 | workflow_dispatch:
9 |
10 | jobs:
11 | build:
12 | runs-on: windows-latest
13 | steps:
14 | - uses: actions/checkout@v4
15 | - name: Setup .NET
16 | uses: actions/setup-dotnet@v4
17 | with:
18 | dotnet-version: 9.0.x
19 | - name: Restore dependencies
20 | run: dotnet restore
21 | - name: Build
22 | run: dotnet build --no-restore
23 | - name: Test
24 | run: dotnet test --no-build --verbosity normal
25 | - name: Publish
26 | run: dotnet publish -c Release
27 | - name: Upload Artifacts
28 | uses: actions/upload-artifact@v4
29 | with:
30 | name: FixClient
31 | path: FixClient/bin/Release/net9.0-windows/win-x64/publish/FixClient.exe
32 | overwrite: true
33 |
34 |
--------------------------------------------------------------------------------
/.github/workflows/release.yml:
--------------------------------------------------------------------------------
1 | name: release
2 |
3 | on:
4 | push:
5 | tags:
6 | - '*'
7 |
8 | jobs:
9 | build_release:
10 | runs-on: windows-latest
11 | steps:
12 | - uses: actions/checkout@v4
13 | - name: Setup .NET
14 | uses: actions/setup-dotnet@v4
15 | with:
16 | dotnet-version: 9.0.x
17 | - name: Restore dependencies
18 | run: dotnet restore
19 | - name: Build
20 | run: dotnet build --no-restore
21 | - name: Test
22 | run: dotnet test --no-build --verbosity normal
23 | - name: Publish
24 | run: dotnet publish -c Release
25 | - name: version
26 | id: version
27 | run: echo ::set-output name=version::${GITHUB_REF/refs\/tags\//}
28 | shell: bash
29 | - name: release
30 | uses: actions/create-release@v1
31 | id: create_release
32 | with:
33 | draft: false
34 | prerelease: false
35 | release_name: ${{ steps.version.outputs.version }}
36 | tag_name: ${{ github.ref }}
37 | body_path: CHANGELOG.md
38 | env:
39 | GITHUB_TOKEN: ${{ github.token }}
40 | - name: Upload Artifacts
41 | uses: actions/upload-release-asset@v1
42 | env:
43 | GITHUB_TOKEN: ${{ github.token }}
44 | with:
45 | upload_url: ${{ steps.create_release.outputs.upload_url }}
46 | asset_path: FixClient/bin/Release/net9.0-windows/win-x64/publish/FixClient.exe
47 | asset_name: FixClient.exe
48 | asset_content_type: application/exe
49 | - name: Publish Fix.Common
50 | uses: tedd/publish-nuget-neo@v1
51 | with:
52 | PROJECT_FILE_PATH: Fix.Common/Fix.Common.csproj
53 | NUGET_KEY: ${{ secrets.NUGET_KEY }}
54 | TAG_COMMIT: false
55 | VERSION_FILE_PATH: Directory.Build.props
56 | - name: Publish Fix.Dictionary
57 | uses: tedd/publish-nuget-neo@v1
58 | with:
59 | PROJECT_FILE_PATH: Fix.Dictionary/Fix.Dictionary.csproj
60 | NUGET_KEY: ${{ secrets.NUGET_KEY }}
61 | TAG_COMMIT: false
62 | VERSION_FILE_PATH: Directory.Build.props
63 | - name: Publish Fix
64 | uses: tedd/publish-nuget-neo@v1
65 | with:
66 | PROJECT_FILE_PATH: Fix/Fix.csproj
67 | NUGET_KEY: ${{ secrets.NUGET_KEY }}
68 | TAG_COMMIT: false
69 | VERSION_FILE_PATH: Directory.Build.props
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | Fix.Dictionary/Generated
2 | bin
3 | obj
4 | packages
5 | .vs
6 | *.user
7 | **/__pycache__
8 | *.pyc
9 | dist
10 | build
11 | *.egg-info
12 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | * Fixed an exception when adding custom fields.
2 | * The format of outgoing timestamp fields can now be customised in the session properties dialog.
3 | * Upgrade to .NET 9
4 |
--------------------------------------------------------------------------------
/Directory.Build.props:
--------------------------------------------------------------------------------
1 |
2 |
3 | net9.0
4 | enable
5 | latest
6 | 5.3.0
7 | Gary Hughes
8 | Copyright © 2021 Gary Hughes
9 | https://github.com/GaryHughes/FixClient
10 | https://github.com/GaryHughes/FixClient
11 | Apache-2.0
12 | win-x64
13 | True
14 | true
15 |
16 |
--------------------------------------------------------------------------------
/Examples/Fix.Dictionary.Api/Fix.Dictionary.Api.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/FIXClient.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GaryHughes/FixClient/f10fb81b9f22326b1373d1d70bea0ace5ba8bcaa/FIXClient.png
--------------------------------------------------------------------------------
/Fix.Common.Tests/Fix.Common.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | false
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | all
13 | runtime; build; native; contentfiles; analyzers; buildtransitive
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Fix.Common/DirtyTimer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading;
3 |
4 | namespace Fix.Common;
5 |
6 | public class DirtyTimer : IDisposable
7 | {
8 | public delegate void DirtyHandler(object sender);
9 | public event DirtyHandler? Dirty;
10 |
11 | void OnDirty()
12 | {
13 | Dirty?.Invoke(this);
14 | }
15 |
16 | Timer? _timer;
17 | int _dirty;
18 | const int CLEAN = 0;
19 | const int DIRTY = 1;
20 |
21 | public void SetDirty()
22 | {
23 | Interlocked.CompareExchange(ref _dirty, DIRTY, CLEAN);
24 | }
25 |
26 | public void Start(int dueTime, int period)
27 | {
28 | _timer = new Timer(TimerFired, null, dueTime, period);
29 | }
30 |
31 | public void Stop()
32 | {
33 | _timer?.Dispose();
34 | _timer = null;
35 | }
36 |
37 | void TimerFired(object? context)
38 | {
39 | if (Interlocked.CompareExchange(ref _dirty, CLEAN, DIRTY) == DIRTY)
40 | {
41 | OnDirty();
42 | }
43 | }
44 |
45 | #region IDisposable Members
46 |
47 | public void Dispose()
48 | {
49 | Dispose(true);
50 | GC.SuppressFinalize(this);
51 | }
52 |
53 | protected virtual void Dispose(bool disposing)
54 | {
55 | if (!_disposed && disposing)
56 | {
57 | Stop();
58 | _disposed = true;
59 | }
60 | }
61 |
62 | bool _disposed;
63 |
64 | #endregion
65 | }
66 |
67 |
--------------------------------------------------------------------------------
/Fix.Common/Fix.Common.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Fix.Common contains common components used by Fix and Fix.Dictionary.
5 | Geh.Fix.Common
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Fix.Dictionary.Tests/DataTypeTests.cs:
--------------------------------------------------------------------------------
1 | using Fix;
2 | using Microsoft.VisualStudio.TestTools.UnitTesting;
3 |
4 | namespace FixDictionary.Tests;
5 |
6 | [TestClass]
7 | public class DataTypeTests
8 | {
9 | [TestMethod]
10 | public void TestIntDefinition()
11 | {
12 | Assert.AreEqual("Int", Dictionary.FIX_4_4.DataTypes.Int.Name);
13 | // TODO
14 | // Assert.IsNull(Dictionary.FIX_4_4.DataTypes.Int.BaseType);
15 | }
16 |
17 | [TestMethod]
18 | public void TestLengthDefinition()
19 | {
20 | Assert.AreEqual("Length", Dictionary.FIX_4_4.DataTypes.Length.Name);
21 | // TODO
22 | // Assert.IsNotNull(Dictionary.FIX_4_4.DataTypes.Length.BaseType);
23 | Assert.AreEqual(Dictionary.FIX_4_4.DataTypes.Int, Dictionary.FIX_4_4.DataTypes.Int);
24 | }
25 |
26 | [TestMethod]
27 | public void TestDataTypeCollections()
28 | {
29 | Assert.AreEqual(20, Dictionary.FIX_4_2.DataTypes.Count);
30 | Assert.AreEqual(38, Dictionary.FIX_5_0SP2.DataTypes.Count);
31 | }
32 | }
33 |
34 |
--------------------------------------------------------------------------------
/Fix.Dictionary.Tests/Fix.Dictionary.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | false
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | all
13 | runtime; build; native; contentfiles; analyzers; buildtransitive
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Fix.Dictionary.Tests/MessageTests.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.VisualStudio.TestTools.UnitTesting;
2 | using System.Linq;
3 |
4 | namespace FixDictionary.Tests;
5 |
6 | [TestClass]
7 | public class MessageTests
8 | {
9 | [TestMethod]
10 | public void TestMessageCollections()
11 | {
12 | Assert.AreEqual(46, Fix.Dictionary.FIX_4_2.Messages.Length);
13 | Assert.AreEqual(93, Fix.Dictionary.FIX_4_4.Messages.Length);
14 | Assert.AreEqual(164, Fix.Dictionary.FIX_5_0SP2.Messages.Length);
15 | }
16 |
17 | [TestMethod]
18 | public void TestMessageMsgType()
19 | {
20 | Assert.AreEqual("H", Fix.Dictionary.FIX_4_4.Messages.OrderStatusRequest.MsgType);
21 | }
22 |
23 | [TestMethod]
24 | public void TestMessageName()
25 | {
26 | Assert.AreEqual("OrderStatusRequest", Fix.Dictionary.FIX_4_4.Messages.OrderStatusRequest.Name);
27 | }
28 |
29 | [TestMethod]
30 | public void TestMessageDescription()
31 | {
32 | Assert.AreEqual("The order status request message is used by the institution to generate an order status message back from the broker.", Fix.Dictionary.FIX_4_4.Messages.OrderStatusRequest.Description);
33 | }
34 |
35 | [TestMethod]
36 | public void TestMessageAdded()
37 | {
38 | // TODO
39 | // Assert.AreEqual("FIX.2.7", Fix.Dictionary.FIX_4_4.Messages.OrderStatusRequest.Added);
40 | }
41 |
42 | [TestMethod]
43 | public void TestMessageFieldsLength()
44 | {
45 | Assert.AreEqual(104, Fix.Dictionary.FIX_4_2.Messages.OrderSingle.Fields.Count);
46 | }
47 |
48 | [TestMethod]
49 | public void TestVersionMessageFieldsDefinition()
50 | {
51 | Assert.AreEqual("BeginString", Fix.Dictionary.FIX_4_2.Messages.OrderSingle.Fields[0].Name);
52 | // TODO
53 | // Assert.AreEqual(true, Fix.Dictionary.FIX_4_2.Messages.OrderSingle.Fields[0].Required);
54 | // Assert.AreEqual(0, Fix.Dictionary.FIX_4_2.Messages.OrderSingle.Fields[0].Indent);
55 | // Assert.AreEqual("FIX.4.2", Fix.Dictionary.FIX_4_2.Messages.OrderSingle.Fields[0].Added);
56 | }
57 |
58 | [TestMethod]
59 | public void TestMessageFieldNotDefined()
60 | {
61 | Assert.IsNull(Fix.Dictionary.FIX_4_4.Messages.NewOrderSingle.Fields.Where(f => f.Tag == 6000).FirstOrDefault());
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/Fix.Dictionary.Tests/VersionTests.cs:
--------------------------------------------------------------------------------
1 | using Fix;
2 | using Microsoft.VisualStudio.TestTools.UnitTesting;
3 |
4 | namespace FixDictionary.Tests;
5 |
6 | [TestClass]
7 | public class VersionTests
8 | {
9 | [TestMethod]
10 | public void TestCount()
11 | {
12 | Assert.AreEqual(5, Dictionary.Versions.Count);
13 | }
14 |
15 | [TestMethod]
16 | public void TestIndexer()
17 | {
18 | Assert.AreEqual("FIX.4.0", Dictionary.Versions.FIX_4_0.BeginString);
19 | Assert.AreEqual("FIX.4.2", Dictionary.Versions.FIX_4_2.BeginString);
20 | Assert.AreEqual("FIX.4.4", Dictionary.Versions.FIX_4_4.BeginString);
21 | Assert.AreEqual("FIXT.1.1", Dictionary.Versions.FIXT_1_1.BeginString);
22 | Assert.AreEqual("FIX.5.0SP2", Dictionary.Versions.FIX_5_0SP2.BeginString);
23 | }
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/Fix.Dictionary/ApplVerIdTypeConverter.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: ApplVerIdTypeConverter.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 | using System.Collections.Generic;
13 | using System.ComponentModel;
14 |
15 | namespace Fix;
16 |
17 | public partial class Dictionary
18 | {
19 | public class ApplVerIdTypeConverter : TypeConverter
20 | {
21 | readonly List _versions = new();
22 |
23 | public ApplVerIdTypeConverter()
24 | {
25 | foreach (var version in Versions)
26 | {
27 | if (version.BeginString.StartsWith("FIXT."))
28 | continue;
29 | _versions.Add(version);
30 | }
31 | }
32 |
33 | public override bool GetStandardValuesSupported(ITypeDescriptorContext? context)
34 | {
35 | return true;
36 | }
37 |
38 | public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext? context)
39 | {
40 | return new StandardValuesCollection(_versions);
41 | }
42 |
43 | public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType)
44 | {
45 | if (sourceType == typeof(string))
46 | return true;
47 | return base.CanConvertFrom(context, sourceType);
48 | }
49 |
50 | public override object? ConvertFrom(ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object value)
51 | {
52 | if (value as string != null)
53 | {
54 | foreach (var version in _versions)
55 | {
56 | if (version.BeginString == value as string)
57 | return version;
58 | }
59 | }
60 |
61 | return base.ConvertFrom(context, culture, value);
62 | }
63 | }
64 | }
65 |
66 |
--------------------------------------------------------------------------------
/Fix.Dictionary/BeginStringTypeConverter.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: BeginStringTypeConverter.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 | using System.Collections.Generic;
13 | using System.ComponentModel;
14 |
15 | namespace Fix;
16 |
17 | public partial class Dictionary
18 | {
19 | public class BeginStringTypeConverter : TypeConverter
20 | {
21 | readonly List _versions = new();
22 |
23 | public BeginStringTypeConverter()
24 | {
25 | foreach (var version in Versions)
26 | {
27 | if (version.BeginString.StartsWith("FIX.5.0"))
28 | continue;
29 | _versions.Add(version);
30 | }
31 | }
32 |
33 | public override bool GetStandardValuesSupported(ITypeDescriptorContext? context)
34 | {
35 | return true;
36 | }
37 |
38 | public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext? context)
39 | {
40 | return new StandardValuesCollection(_versions);
41 | }
42 |
43 | public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType)
44 | {
45 | if (sourceType == typeof(string))
46 | return true;
47 | return base.CanConvertFrom(context, sourceType);
48 | }
49 |
50 | public override object? ConvertFrom(ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object value)
51 | {
52 | if (value is string key)
53 | {
54 | foreach (var version in _versions)
55 | {
56 | if (version.BeginString == key)
57 | return version;
58 | }
59 | }
60 |
61 | return base.ConvertFrom(context, culture, value);
62 | }
63 | }
64 | }
65 |
66 |
--------------------------------------------------------------------------------
/Fix.Dictionary/DataType.cs:
--------------------------------------------------------------------------------
1 |
2 | namespace Fix;
3 |
4 | public static partial class Dictionary
5 | {
6 | public class DataType
7 | {
8 | // We can't reference the base type here directly or we get initialisation exceptions.
9 | // eg. new DataType("Length", DataTypes.Int, "" ...)
10 | // To work around that we initialist BaseType in the VersionDataTypeCollection constructor.
11 | // Length.BaseType = Int;
12 | public DataType(string name, string description, Pedigree pedigree)
13 | {
14 | Name = name;
15 | Description = description;
16 | Pedigree = pedigree;
17 | }
18 |
19 | public string Name { get; }
20 | //public DataType? BaseType { get; internal set; }
21 | public string Description { get; }
22 |
23 | public Pedigree Pedigree { get; }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Fix.Dictionary/FieldValue.cs:
--------------------------------------------------------------------------------
1 | namespace Fix;
2 |
3 | public partial class Dictionary
4 | {
5 | public sealed record FieldValue(int Tag, string Name, string Value, string Description, Fix.Dictionary.Pedigree Pedigree)
6 | {
7 | public string Name { get; private set; } = Name;
8 |
9 | public override int GetHashCode()
10 | {
11 | return HashCode.Combine(Tag, Value);
12 | }
13 |
14 | public bool Equals(FieldValue? other)
15 | {
16 | if (other is FieldValue right)
17 | {
18 | return Tag == right.Tag && Value == right.Value;
19 | }
20 |
21 | return false;
22 | }
23 |
24 | public override string ToString()
25 | {
26 | if (string.IsNullOrEmpty(Name))
27 | {
28 | if (FIX_5_0SP2.Fields.TryGetValue(Tag, out var fieldDfinition) &&
29 | fieldDfinition.Values.TryGetValue(Value, out var valueDefinition))
30 | {
31 | Name = valueDefinition.Name;
32 | }
33 | }
34 |
35 | return Name;
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/Fix.Dictionary/Fix.Dictionary.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | false
5 | false
6 | false
7 | false
8 | Fix.Dictionary is a FIX protocol data dictionary generated from the FIX Orchestra standard.
9 | Geh.Fix.Dictionary
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/Fix.Dictionary/Message.cs:
--------------------------------------------------------------------------------
1 | namespace Fix;
2 |
3 | public partial class Dictionary
4 | {
5 | public abstract class Message
6 | {
7 | protected Message(string msgType, string name, string description, Pedigree pedigree, MessageFieldCollection fields)
8 | {
9 | MsgType = msgType;
10 | Name = name;
11 | Description = description;
12 | Pedigree = pedigree;
13 | Fields = fields;
14 | }
15 |
16 | public string MsgType { get; }
17 | public string Name { get; }
18 | public string Description { get; }
19 | public Pedigree Pedigree { get; }
20 | public MessageFieldCollection Fields { get; }
21 | }
22 | }
23 |
24 |
--------------------------------------------------------------------------------
/Fix.Dictionary/MessageField.cs:
--------------------------------------------------------------------------------
1 | namespace Fix;
2 |
3 | public static partial class Dictionary
4 | {
5 | public class MessageField
6 | {
7 | VersionField field;
8 |
9 | public MessageField(VersionField field, bool required, int depth)
10 | {
11 | this.field = field;
12 | Required = required;
13 | Depth = depth;
14 | }
15 |
16 | public int Tag => field.Tag;
17 | public string Name => field.Name;
18 | public string Description => field.Description;
19 | public bool Required { get; }
20 | public int Depth { get; }
21 |
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Fix.Dictionary/MessageFieldCollection.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Diagnostics.CodeAnalysis;
3 |
4 | namespace Fix;
5 |
6 | public static partial class Dictionary
7 | {
8 | public class MessageFieldCollection : IEnumerable
9 | {
10 | internal MessageFieldCollection(params MessageField[] fields)
11 | {
12 | foreach (var field in fields)
13 | {
14 | _fields.Add(field.Tag, field);
15 | }
16 | }
17 |
18 | public bool TryGetValue(int tag, [MaybeNullWhen(false)] out MessageField result)
19 | {
20 | return _fields.TryGetValue(tag, out result);
21 | }
22 |
23 | public int Count => _fields.Count;
24 | public MessageField this[int index] => _fields.GetAt(index).Value;
25 |
26 | public virtual IEnumerator GetEnumerator() => _fields.Values.GetEnumerator();
27 |
28 | System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => GetEnumerator();
29 |
30 | readonly OrderedDictionary _fields = new OrderedDictionary();
31 |
32 | public override string ToString() => Count.ToString();
33 |
34 | }
35 | }
36 |
37 |
--------------------------------------------------------------------------------
/Fix.Dictionary/Pedigree.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace Fix;
4 |
5 | public static partial class Dictionary
6 | {
7 |
8 | public record Pedigree
9 | {
10 | public string? Added { get; init; }
11 | public string? AddedEP { get; init; }
12 | public string? Updated { get; init; }
13 | public string? UpdatedEP { get; init; }
14 | public string? Deprecated { get; init; }
15 | public string? DeprecatedEP { get; init; }
16 |
17 | public static Pedigree Empty { get; } = new Pedigree();
18 |
19 | public override string ToString()
20 | {
21 | var items = new List();
22 |
23 | if (Added is string added)
24 | {
25 | items.Add($"Added = {added}");
26 | }
27 |
28 | if (AddedEP is string addedEP)
29 | {
30 | items.Add($"AddedEP = {addedEP}");
31 | }
32 |
33 | if (Updated is string updated)
34 | {
35 | items.Add($"Updated = {updated}");
36 | }
37 |
38 | if (UpdatedEP is string updatedEP)
39 | {
40 | items.Add($"UpdatedEP = {updatedEP}");
41 | }
42 |
43 | if (Deprecated is string deprecated)
44 | {
45 | items.Add($"Deprecated = {deprecated}");
46 | }
47 |
48 | if (DeprecatedEP is string deprecatedEP)
49 | {
50 | items.Add($"DeprecatedEP = {deprecatedEP}");
51 | }
52 |
53 | if (items.Count == 0)
54 | {
55 | return string.Empty;
56 | }
57 |
58 | return string.Join(", ", items);
59 | }
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/Fix.Dictionary/Version.cs:
--------------------------------------------------------------------------------
1 | global using System;
2 |
3 | namespace Fix;
4 |
5 | public static partial class Dictionary
6 | {
7 | public class Version
8 | {
9 | public Version(string beginString,
10 | VersionDataTypeCollection dataTypes,
11 | VersionFieldCollection fields,
12 | VersionMessageCollection messages)
13 | {
14 | BeginString = beginString;
15 | DataTypes = dataTypes;
16 | Fields = fields;
17 | Messages = messages;
18 | }
19 |
20 | public string BeginString { get; }
21 | public VersionDataTypeCollection DataTypes { get; }
22 | public VersionFieldCollection Fields { get; }
23 | public VersionMessageCollection Messages { get; }
24 |
25 | public string ApplVerID
26 | {
27 | get
28 | {
29 | return "";
30 | }
31 | }
32 |
33 | public override string ToString() => BeginString;
34 |
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/Fix.Dictionary/VersionCollection.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 |
4 | namespace Fix;
5 |
6 | public static partial class Dictionary
7 | {
8 | public class VersionCollection : IEnumerable
9 | {
10 | public readonly Version FIX_4_0 = new Version("FIX.4.0", Fix.Dictionary.FIX_4_0.DataTypes, Fix.Dictionary.FIX_4_0.Fields, Fix.Dictionary.FIX_4_0.Messages);
11 | public readonly Version FIX_4_2 = new Version("FIX.4.2", Fix.Dictionary.FIX_4_2.DataTypes, Fix.Dictionary.FIX_4_2.Fields, Fix.Dictionary.FIX_4_2.Messages);
12 | public readonly Version FIX_4_4 = new Version("FIX.4.4", Fix.Dictionary.FIX_4_4.DataTypes, Fix.Dictionary.FIX_4_4.Fields, Fix.Dictionary.FIX_4_4.Messages);
13 | public readonly Version FIX_5_0SP2 = new Version("FIX.5.0SP2", Fix.Dictionary.FIX_5_0SP2.DataTypes, Fix.Dictionary.FIX_5_0SP2.Fields, Fix.Dictionary.FIX_5_0SP2.Messages);
14 | // There isn't a separate transport orchestra and generating one from the repository doesn't work
15 | // due to errors in the repository so just cheat. It's only the session messages so this gives us
16 | // what we need.
17 | public readonly Version FIXT_1_1 = new Version("FIXT.1.1", Fix.Dictionary.FIX_5_0SP2.DataTypes, Fix.Dictionary.FIX_5_0SP2.Fields, Fix.Dictionary.FIX_5_0SP2.Messages);
18 |
19 | public VersionCollection()
20 | {
21 | Default = FIX_5_0SP2;
22 |
23 | _versions = new[] {
24 | FIX_4_0,
25 | FIX_4_2,
26 | FIX_4_4,
27 | FIX_5_0SP2,
28 | FIXT_1_1
29 | };
30 | }
31 |
32 |
33 | public Version? this[string beginString]
34 | {
35 | get
36 | {
37 | return (from version in _versions
38 | where version.BeginString == beginString
39 | select version).FirstOrDefault();
40 | }
41 | }
42 |
43 | public Version Default { get; }
44 |
45 | public int Count => _versions.Length;
46 |
47 | public virtual IEnumerator GetEnumerator()
48 | {
49 | foreach (var version in _versions)
50 | {
51 | yield return version;
52 | }
53 | }
54 |
55 | System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => GetEnumerator();
56 |
57 | Version[] _versions;
58 | }
59 |
60 | public static VersionCollection Versions { get; } = new VersionCollection();
61 | }
62 |
--------------------------------------------------------------------------------
/Fix.Dictionary/VersionDataTypeCollection.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 |
4 | namespace Fix;
5 |
6 | public static partial class Dictionary
7 | {
8 | public class VersionDataTypeCollection : IEnumerable
9 | {
10 | public VersionDataTypeCollection(params DataType[] dataTypes)
11 | {
12 | _dataTypes = dataTypes;
13 | }
14 |
15 | public bool TryGetValue(string name, out DataType? type)
16 | {
17 | type = (from item in DataTypes where item.Name == name select item).FirstOrDefault();
18 | return type != null;
19 | }
20 |
21 | // Call this Count because there is FIX data type called Length that will live in the same scope
22 | // in derived classes.
23 | public virtual int Count => DataTypes.Length;
24 |
25 | public virtual IEnumerator GetEnumerator()
26 | {
27 | foreach (var dataType in DataTypes)
28 | {
29 | yield return dataType;
30 | }
31 | }
32 |
33 | System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => GetEnumerator();
34 |
35 | public DataType[] DataTypes
36 | {
37 | get
38 | {
39 | return _dataTypes;
40 | }
41 | protected set
42 | {
43 | _dataTypes = value;
44 | }
45 | }
46 |
47 | protected DataType[] _dataTypes = new DataType[] { };
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/Fix.Dictionary/VersionField.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace Fix;
4 |
5 | public static partial class Dictionary
6 | {
7 | public static bool IsValid(VersionField? field) =>
8 | field switch
9 | {
10 | VersionField valid => valid.IsValid,
11 | null => false
12 | };
13 |
14 | public class VersionField
15 | {
16 | public VersionField(int tag, string name, string dataType, string description, Pedigree pedigree, params FieldValue[] values)
17 | {
18 | Tag = tag;
19 | Name = name;
20 | Description = description;
21 | DataType = dataType;
22 | Pedigree = pedigree;
23 | foreach (var value in values)
24 | {
25 | Values.Add(value.Value, value);
26 | }
27 | }
28 | public static VersionField Dummy = new VersionField(0, string.Empty, string.Empty, string.Empty, new Pedigree { });
29 | public int Tag { get; }
30 | public string Name { get; }
31 | public string Description { get; }
32 |
33 | public bool IsValid => Tag != 0;
34 |
35 | // TODO - make this reference the actual type in the dictionary directly
36 | public string DataType { get; }
37 |
38 | public Pedigree Pedigree { get; }
39 | public OrderedDictionary Values { get; } = new OrderedDictionary();
40 | }
41 | }
42 |
43 |
--------------------------------------------------------------------------------
/Fix.Dictionary/VersionFieldCollection.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 |
4 | namespace Fix;
5 |
6 | public static partial class Dictionary
7 | {
8 | // This indices of this collection are 0 based, FIX field tags are 1 based. The code
9 | // generator inserts a null at index 0 so we can efficently do Field.Tag based lookups.
10 | // There are also gaps in the sequence, particularly in more recent versions of the FIX
11 | // standard so there may be large sequences of nulls in the collection. This has little
12 | // effect on memory usage but lets us use natural FIX tag based indexing into the collection.
13 | //
14 | // eg. var OrderQty = Fix.Dictionary.FIX_4_0.Fields[38];
15 | //
16 | public abstract class VersionFieldCollection : IEnumerable
17 | {
18 | // There are gaps in the sequence of tags and we populate those with dummy values so
19 | // don't call this property Count or Length as that is misleading.
20 | public int MaxTag => Fields.Length - 1;
21 |
22 | public VersionField this[int tag]
23 | {
24 | get
25 | {
26 | if (tag < 1 || tag > Fields.Length - 1)
27 | {
28 | throw new ArgumentOutOfRangeException(nameof(tag), tag, $"Tag value {tag} must be between 1 and {Fields.Length}");
29 | }
30 | return Fields[tag];
31 | }
32 | }
33 |
34 | public bool TryGetValue(int tag, out VersionField field)
35 | {
36 | if (tag < 1 || tag > Fields.Length - 1)
37 | {
38 | field = VersionField.Dummy;
39 | return false;
40 | }
41 |
42 | field = Fields[tag];
43 |
44 | return IsValid(field);
45 | }
46 |
47 | public bool Contains(int tag)
48 | {
49 | return TryGetValue(tag, out var _);
50 | }
51 |
52 | public VersionField this[string name]
53 | {
54 | get
55 | {
56 | if (!TryGetValue(name, out var field))
57 | {
58 | throw new ArgumentOutOfRangeException(nameof(name), name, $"{name} is not a valid field name");
59 | }
60 | return field;
61 | }
62 | }
63 |
64 |
65 | public bool TryGetValue(string name, out VersionField field)
66 | {
67 | var value = (from candidate in Fields
68 | where candidate?.Name.ToLower() == name.ToLower()
69 | select candidate).FirstOrDefault();
70 |
71 | if (value is null)
72 | {
73 | field = VersionField.Dummy;
74 | return false;
75 | }
76 |
77 | field = value;
78 |
79 | return true;
80 | }
81 |
82 | public IEnumerator GetEnumerator()
83 | {
84 | foreach (var field in Fields)
85 | {
86 | yield return field;
87 | }
88 | }
89 |
90 | System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => GetEnumerator();
91 |
92 | public VersionField[] Fields
93 | {
94 | get
95 | {
96 | if (_fields is null)
97 | {
98 | throw new NullReferenceException("VersionFieldCollection._fields is unexpectedly null");
99 | }
100 | return _fields;
101 | }
102 | protected set
103 | {
104 | _fields = value;
105 | }
106 | }
107 |
108 | protected VersionField[] _fields = new VersionField[] { };
109 | }
110 | }
111 |
112 |
--------------------------------------------------------------------------------
/Fix.Dictionary/VersionMessageCollection.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 |
4 | namespace Fix;
5 |
6 | public partial class Dictionary
7 | {
8 | public class VersionMessageCollection : IEnumerable
9 | {
10 | public int Length => Messages.Length;
11 |
12 | public Message? this[string msgType]
13 | {
14 | get
15 | {
16 | return (from message in Messages
17 | where message.MsgType == msgType
18 | select message).FirstOrDefault();
19 | }
20 | }
21 |
22 | public IEnumerator GetEnumerator()
23 | {
24 | foreach (var message in Messages)
25 | {
26 | yield return message;
27 | }
28 | }
29 |
30 | System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => GetEnumerator();
31 |
32 | public Message[] Messages
33 | {
34 | get
35 | {
36 | if (_messages is null)
37 | {
38 | throw new NullReferenceException("VersionMessageCollection._messages is unexpectedly null");
39 | }
40 | return _messages;
41 | }
42 | protected set
43 | {
44 | _messages = value;
45 | }
46 | }
47 |
48 | private Message[] _messages = new Message[] { };
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/Fix.Lexicographer/lexicographer.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python3
2 |
3 | import os
4 | import sys
5 | import argparse
6 |
7 | # This package is subtree merged
8 | sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'fixorchestra'))
9 | from fixorchestra.orchestration import *
10 |
11 | from orchestration_data_types_generator import *
12 | from orchestration_fields_generator import *
13 | from orchestration_messages_generator import *
14 | from orchestration_generator import *
15 |
16 |
17 | def inject_message_copy(orchestration, sourceMsgType, destinationMsgType, destinationName):
18 | source = orchestration.messages_by_msg_type[sourceMsgType]
19 | ids = [int(x) for x in list(orchestration.messages.keys())]
20 | ids.sort()
21 | next_id = max(ids) + 1
22 | destination = Message(next_id, destinationName, destinationMsgType, source.category, source.synopsis, source.pedigree, source.references)
23 | orchestration.messages[next_id] = destination
24 |
25 | def inject_kodiak_messages(orchestration):
26 | if orchestration.version != "FIX.4.0":
27 | print("Skipping Kodiak for non applicable FIX version {}".format(orchestration.version))
28 | return
29 | print('Injecting Kodiak messages into {} orchestration'.format(orchestration.version))
30 | inject_message_copy(orchestration, "E", "UWO", "KodiakWaveOrder")
31 | inject_message_copy(orchestration, "G", "UWOCorrR", "KodiakWaveOrderCorrectionRequest")
32 | inject_message_copy(orchestration, "F", "UWOCanR", "KodiakWaveOrderCancelRequest")
33 | inject_message_copy(orchestration, "H", "UWOSR", "KodiakWaveOrderStatusRequest")
34 | inject_message_copy(orchestration, "J", "UWALLOC", "KodiakWaveAllocation")
35 |
36 |
37 | if __name__ == '__main__':
38 |
39 | parser = argparse.ArgumentParser()
40 | parser.add_argument('--namespace', required=True, help='The namespace to generate code in')
41 | parser.add_argument('--prefix', required=True, help='The prefix for the generated filenames')
42 | parser.add_argument('--orchestration', required=True, help='The orchestration filename to generate code for')
43 |
44 | args = parser.parse_args()
45 |
46 | orchestration = Orchestration(args.orchestration)
47 |
48 | inject_kodiak_messages(orchestration)
49 |
50 | generate_orchestration_data_types(args.namespace, args.prefix, orchestration)
51 | generate_orchestration_fields(args.namespace, args.prefix, orchestration)
52 | generate_orchestration_messages(args.namespace, args.prefix, orchestration)
53 | generate_orchestration(args.namespace, args.prefix, orchestration)
54 |
55 |
--------------------------------------------------------------------------------
/Fix.Lexicographer/orchestration_data_types_generator.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python3
2 |
3 | from sanitise import *
4 | from pedigree import *
5 |
6 | def generate_orchestration_data_types(namespace, prefix, orchestration):
7 | sane_prefix = sanitise_for_include_guard(prefix)
8 | filename = '{}DataTypes.cs'.format(prefix)
9 | with open(filename, 'w') as file:
10 | file.write('namespace Fix;\n\n')
11 | file.write('public partial class Dictionary\n{\n')
12 | file.write(' public partial class {}\n {{\n'.format(namespace))
13 | file.write(' public class DataTypeCollection : VersionDataTypeCollection\n')
14 | file.write(' {\n')
15 |
16 | data_types = []
17 | for data_type in orchestration.data_types.values():
18 | name = data_type.name
19 | if name in ('char', 'int', 'float', 'double'):
20 | name = name[0].upper() + name[1:]
21 | data_types.append((name, sanitise(data_type.synopsis), data_type.pedigree))
22 |
23 | file.write(' public DataTypeCollection()\n')
24 | file.write(' {\n')
25 | file.write(' DataTypes = new Dictionary.DataType[] {{{}}};\n'.format(', '.join([name for (name, _, _) in data_types])))
26 | file.write(' }\n\n')
27 |
28 | for (name, synopsis, pedigree) in data_types:
29 | file.write(' public readonly DataType {} = new DataType("{}", "{}", {});\n'.format(name, name, synopsis, format_pedigree(pedigree)))
30 |
31 | file.write(' }\n')
32 |
33 | file.write('\n')
34 | file.write(' public static DataTypeCollection DataTypes { get; } = new DataTypeCollection();\n')
35 |
36 | file.write(' }\n')
37 | file.write('}\n')
38 |
--------------------------------------------------------------------------------
/Fix.Lexicographer/orchestration_generator.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python3
2 |
3 | from sanitise import *
4 |
5 | def generate_orchestration(namespace, prefix, orchestration):
6 | sane_prefix = sanitise_for_include_guard(prefix)
7 | filename = '{}Orchestration.cs'.format(prefix)
8 | with open(filename, 'w') as file:
9 | pass
10 |
--------------------------------------------------------------------------------
/Fix.Lexicographer/orchestration_messages_generator.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python3
2 |
3 | from sanitise import *
4 | from pedigree import *
5 |
6 | def generate_orchestration_messages(namespace, prefix, orchestration):
7 | sane_prefix = sanitise_for_include_guard(prefix)
8 | filename = '{}Messages.cs'.format(prefix)
9 | with open(filename, 'w') as file:
10 | file.write('namespace Fix;\n\n')
11 | file.write('public partial class Dictionary\n{\n')
12 | file.write(' public partial class {}\n'.format(namespace))
13 | file.write(' {\n')
14 | file.write(' public partial class Message\n')
15 | file.write(' {\n')
16 | for message in orchestration.messages.values():
17 | file.write('\n')
18 | file.write(' public class {} : Dictionary.Message\n'.format(message.name))
19 | file.write(' {\n')
20 | file.write(' internal {}()\n'.format(message.name))
21 | file.write(' : base(\n')
22 | file.write(' "{}",\n'.format(message.msg_type))
23 | file.write(' "{}",\n'.format(message.name))
24 | file.write(' "{}",\n'.format(sanitise(message.synopsis)))
25 | file.write(' {},\n'.format(format_pedigree(message.pedigree)))
26 |
27 | file.write(' new MessageFieldCollection(\n')
28 |
29 | initialisers = []
30 | for field in orchestration.message_fields(message):
31 | required = 'false'
32 | if field.presence and field.presence.lower() == 'required':
33 | required = 'true'
34 | initialiser = ' new MessageField(new {}.{}(), {}, {}),\n'.format(namespace, field.field.name, required, field.depth)
35 | initialisers.append(initialiser)
36 | last = initialisers[len(initialisers) - 1]
37 | initialisers = initialisers[:-1]
38 | initialisers.append(last[:-2] + '\n')
39 |
40 | for initialiser in initialisers:
41 | file.write(initialiser)
42 |
43 | file.write(' )\n')
44 | file.write(' )\n')
45 | file.write(' {\n')
46 | file.write(' }\n')
47 | file.write(' }\n')
48 | file.write(' }\n')
49 |
50 |
51 | file.write('\n')
52 | file.write(' public class MessageCollection : VersionMessageCollection\n')
53 | file.write(' {\n')
54 | file.write(' public MessageCollection()\n')
55 | file.write(' {\n')
56 |
57 | file.write(' Messages = new Dictionary.Message[] {{{}}};\n'.format(', '.join([message.name for message in orchestration.messages.values()])))
58 |
59 | file.write(' }\n\n')
60 |
61 | for message in orchestration.messages.values():
62 | file.write(' public readonly Dictionary.Message {} = new {}.Message.{}();\n'.format(message.name, namespace, message.name))
63 |
64 | file.write(' }\n')
65 |
66 | file.write('\n')
67 | file.write(' public static MessageCollection Messages { get; } = new MessageCollection();\n')
68 |
69 |
70 | file.write(' }\n')
71 | file.write('}\n')
72 |
--------------------------------------------------------------------------------
/Fix.Lexicographer/pedigree.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python3
2 |
3 | def format_pedigree(pedigree):
4 | initialisers = []
5 | if pedigree.added:
6 | initialisers.append('Added = "{}"'.format(pedigree.added))
7 | if pedigree.addedEP:
8 | initialisers.append('AddedEP = "{}"'.format(pedigree.addedEP))
9 | if pedigree.updated:
10 | initialisers.append('Updated = "{}"'.format(pedigree.updated))
11 | if pedigree.updatedEP:
12 | initialisers.append('UpdatedEP = "{}"'.format(pedigree.updatedEP))
13 | if pedigree.deprecated:
14 | initialisers.append('Deprecated = "{}"'.format(pedigree.deprecated))
15 | if pedigree.deprecatedEP:
16 | initialisers.append('DeprecatedEP = "{}"'.format(pedigree.deprecatedEP))
17 | return 'new Pedigree {{{}}}'.format(', '.join(initialisers))
--------------------------------------------------------------------------------
/Fix.Lexicographer/sanitise.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python3
2 |
3 | def sanitise(string):
4 | if string is None:
5 | return None
6 | return string.replace('\n', '').replace('"', '\'').encode("ascii", errors="ignore").decode()
7 |
8 | def sanitise_for_include_guard(string):
9 | return string.replace('.', '_').replace('-', '_')
--------------------------------------------------------------------------------
/Fix.Tests/Fix.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | false
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | all
13 | runtime; build; native; contentfiles; analyzers; buildtransitive
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 | Always
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Fix.Tests/GlobalSuppressions.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: GlobalSuppressions.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 |
13 |
14 | // This file is used by Code Analysis to maintain SuppressMessage
15 | // attributes that are applied to this project.
16 | // Project-level suppressions either have no target or are given
17 | // a specific target and scoped to a namespace, type, member, etc.
18 |
19 | [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Redundancies in Code", "RECS0070:Redundant explicit argument name specification", Justification = "")]
20 |
21 |
--------------------------------------------------------------------------------
/Fix.Tests/Logs/t_kls.log:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GaryHughes/FixClient/f10fb81b9f22326b1373d1d70bea0ace5ba8bcaa/Fix.Tests/Logs/t_kls.log
--------------------------------------------------------------------------------
/Fix.Tests/MessageTests.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: MessageTests.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 | using Microsoft.VisualStudio.TestTools.UnitTesting;
13 | using System.Text;
14 | using static Fix.Dictionary;
15 |
16 | namespace FixTests;
17 |
18 | [TestClass]
19 | public class MessageTests
20 | {
21 | [TestMethod]
22 | [ExpectedException(typeof(Fix.MissingFieldException))]
23 | public void TestNoMsgType()
24 | {
25 | byte[] data = Encoding.ASCII.GetBytes("8=FIX.4.09=12749=ITGHK56=KODIAK_KGEHVWAP34=452=20090630-23:37:1294=033=158=RemotedHost#Name=gateQA-p01,Ip=10.132.3.125,Port=7081#10=128");
26 | var message = new Fix.Message(data);
27 | _ = message.MsgType;
28 | }
29 |
30 | [TestMethod]
31 | public void TestCheckSum()
32 | {
33 | byte[] data = Encoding.ASCII.GetBytes("8=FIX.4.09=006234=5835=A49=GLUE52=20040323-23:08:4856=KODIAK98=0108=6010=178");
34 | var message = new Fix.Message(data);
35 | Assert.AreEqual("178", message.ComputeCheckSum());
36 | Assert.AreEqual(message.CheckSum, message.ComputeCheckSum());
37 | }
38 |
39 | [TestMethod]
40 | public void TestCheckSumIsPaddedToThreeCharacters()
41 | {
42 | byte[] data = Encoding.ASCII.GetBytes("8=FIX.4.09=23635=UWO49=KODIAK56=server34=56650=kgehvwap97=N52=20090723-04:27:2066=068=111=kgehvwap.52.5215=AUD21=238=5640=244=39.59000047=A54=155=RIO.AX59=363=0100=ASX203=16000=6001=test6002=6005=ALT=41.587050=kgehvwap_test10=077");
43 | var message = new Fix.Message(data);
44 | Assert.AreEqual("077", message.ComputeCheckSum());
45 | Assert.AreEqual(message.CheckSum, message.ComputeCheckSum());
46 | }
47 |
48 | [TestMethod]
49 | public void TestBodyLength()
50 | {
51 | byte[] data = Encoding.ASCII.GetBytes("8=FIX.4.09=006234=5835=A49=GLUE52=20040323-23:08:4856=KODIAK98=0108=6010=178");
52 | var message = new Fix.Message(data);
53 | Assert.AreEqual("62", message.ComputeBodyLength());
54 | }
55 |
56 | [TestMethod]
57 | public void TestNameValuePairConstructor()
58 | {
59 | string[,] fields =
60 | {
61 | { "8", "FIX.4.0" },
62 | { "9", "127" },
63 | { "35", "C" },
64 | { "49", "ITGHK" },
65 | { "56", "KODIAK_KGEHVWAP" },
66 | { "34", "4" },
67 | { "52", "20090630-23:37:12" },
68 | { "94", "0" },
69 | { "33", "1" },
70 | { "58", "RemotedHost#Name=gateQA-p01,Ip=10.132.3.125,Port=7081#" },
71 | { "10", "128" }
72 | };
73 | var message = new Fix.Message(fields);
74 | Assert.AreEqual("ITGHK", message.Fields.Find(49)?.Value);
75 | }
76 |
77 | [TestMethod]
78 | public void TestMsgTypeIsSetFromDefinition()
79 | {
80 | var message = new Fix.Message(FIX_5_0SP2.Messages.NewOrderSingle);
81 | Assert.AreEqual("D", message.MsgType);
82 | }
83 | }
84 |
85 |
--------------------------------------------------------------------------------
/Fix.Tests/OrderTests.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: OrderTests.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 | using Microsoft.VisualStudio.TestTools.UnitTesting;
13 | using System;
14 | using static Fix.Dictionary;
15 |
16 | namespace FixTests;
17 |
18 | [TestClass]
19 | public class OrderTests
20 | {
21 | [TestMethod]
22 | [ExpectedException(typeof(ArgumentException))]
23 | public void TestConstructorWrongMsgType()
24 | {
25 | var message = new Fix.Message { MsgType = FIX_5_0SP2.Messages.ExecutionReport.MsgType };
26 | var order = new Fix.Order(message);
27 | Assert.IsNotNull(order);
28 | }
29 |
30 | [TestMethod]
31 | [ExpectedException(typeof(ArgumentException))]
32 | public void TestConstructorNoSenderCompId()
33 | {
34 | var message = new Fix.Message { MsgType = FIX_5_0SP2.Messages.NewOrderSingle.MsgType };
35 | var order = new Fix.Order(message);
36 | Assert.IsNotNull(order);
37 | }
38 |
39 | [TestMethod]
40 | [ExpectedException(typeof(ArgumentException))]
41 | public void TestConstructorNoTargetCompId()
42 | {
43 | var message = new Fix.Message { MsgType = FIX_5_0SP2.Messages.NewOrderSingle.MsgType };
44 | message.Fields.Set(FIX_5_0SP2.Fields.SenderCompID, "SENDER");
45 | var order = new Fix.Order(message);
46 | Assert.IsNotNull(order);
47 | }
48 |
49 | [TestMethod]
50 | [ExpectedException(typeof(ArgumentException))]
51 | public void TestConstructorNoSymbol()
52 | {
53 | var message = new Fix.Message { MsgType = FIX_5_0SP2.Messages.NewOrderSingle.MsgType };
54 | message.Fields.Set(FIX_5_0SP2.Fields.SenderCompID, "SENDER");
55 | message.Fields.Set(FIX_5_0SP2.Fields.TargetCompID, "TARGET");
56 | var order = new Fix.Order(message);
57 | Assert.IsNotNull(order);
58 | }
59 |
60 | [TestMethod]
61 | [ExpectedException(typeof(ArgumentException))]
62 | public void TestConstructorNoClOrdId()
63 | {
64 | var message = new Fix.Message { MsgType = FIX_5_0SP2.Messages.NewOrderSingle.MsgType };
65 | message.Fields.Set(FIX_5_0SP2.Fields.SenderCompID, "SENDER");
66 | message.Fields.Set(FIX_5_0SP2.Fields.TargetCompID, "TARGET");
67 | message.Fields.Set(FIX_5_0SP2.Fields.Symbol, "BHP");
68 | var order = new Fix.Order(message);
69 | Assert.IsNotNull(order);
70 | }
71 |
72 | [TestMethod]
73 | public void TestConstructorAllMinimumRequirementsMet()
74 | {
75 | var message = new Fix.Message { MsgType = FIX_5_0SP2.Messages.NewOrderSingle.MsgType };
76 | message.Fields.Set(FIX_5_0SP2.Fields.SenderCompID, "SENDER");
77 | message.Fields.Set(FIX_5_0SP2.Fields.TargetCompID, "TARGET");
78 | message.Fields.Set(FIX_5_0SP2.Fields.Symbol, "BHP");
79 | message.Fields.Set(FIX_5_0SP2.Fields.ClOrdID, "1.2.3");
80 | message.Fields.Set(FIX_5_0SP2.Fields.OrderQty, 5000);
81 | var order = new Fix.Order(message);
82 | Assert.IsNotNull(order);
83 | Assert.AreEqual("SENDER", order.SenderCompID);
84 | Assert.AreEqual("TARGET", order.TargetCompID);
85 | Assert.AreEqual("BHP", order.Symbol);
86 | Assert.AreEqual("1.2.3", order.ClOrdID);
87 | Assert.AreEqual(5000, order.OrderQty);
88 | Assert.AreEqual(1, order.Messages.Count);
89 | }
90 | }
91 |
92 |
--------------------------------------------------------------------------------
/Fix.Tests/SessionTransportTests.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: SessionTransportTests.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 | using Microsoft.VisualStudio.TestTools.UnitTesting;
13 |
14 | namespace FixTests;
15 |
16 | [TestClass]
17 | public class SessionTransportTests : SessionTestsBase
18 | {
19 | #region Setup
20 | [TestInitialize]
21 | public void TestInitialize()
22 | {
23 | Initialize();
24 | }
25 |
26 | [TestCleanup]
27 | public void TestCleanup()
28 | {
29 | Cleanup();
30 | }
31 | #endregion
32 |
33 |
34 | }
35 |
36 |
--------------------------------------------------------------------------------
/Fix/FieldDescription.cs:
--------------------------------------------------------------------------------
1 | namespace Fix;
2 |
3 | public record FieldDescription(int Tag,
4 | string Value,
5 | string Name,
6 | string Description,
7 | bool Required,
8 | int Depth,
9 | string DataType,
10 | Dictionary.Pedigree Pedigree,
11 | Dictionary.FieldValue? ValueDefinition);
12 |
--------------------------------------------------------------------------------
/Fix/Fix.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Fix is a FIX protocol implementation.
5 | Geh.Fix
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Fix/Json.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: Json.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 | using Newtonsoft.Json;
13 | using System.Collections.Generic;
14 | using System.Linq;
15 |
16 | namespace Fix;
17 |
18 | public class Json
19 | {
20 | public class FixVersionConverter : JsonConverter
21 | {
22 | readonly List _versions = new();
23 |
24 | public FixVersionConverter()
25 | {
26 | foreach (var version in Dictionary.Versions)
27 | {
28 | if (version.BeginString.StartsWith("FIX.5.0"))
29 | continue;
30 | _versions.Add(version);
31 | }
32 | }
33 |
34 | public override bool CanConvert(Type objectType)
35 | {
36 | return objectType == typeof(Fix.Dictionary.Version);
37 | }
38 |
39 | public override object? ReadJson(JsonReader reader, Type objectType, object? existingValue, JsonSerializer serializer)
40 | {
41 | if (reader.TokenType != JsonToken.String)
42 | {
43 | throw new JsonSerializationException($"Unexpected token {reader.TokenType} when parsing Fix.Dictionary.Version.");
44 | }
45 |
46 | if (reader.Value?.ToString() is string value)
47 | {
48 | return (from version in _versions where version.BeginString == value select version).FirstOrDefault();
49 | }
50 |
51 | return null;
52 | }
53 |
54 | public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer)
55 | {
56 | if (value == null)
57 | {
58 | writer.WriteNull();
59 | return;
60 | }
61 |
62 | var version = (Dictionary.Version)value;
63 | writer.WriteValue(version.BeginString);
64 | }
65 | }
66 | }
67 |
68 |
--------------------------------------------------------------------------------
/Fix/MessageCollection.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.IO;
3 | using System.Threading.Tasks;
4 |
5 | namespace Fix;
6 |
7 | public class MessageCollection : IEnumerable, ICloneable
8 | {
9 | readonly List _messages = new();
10 |
11 | #region Events
12 |
13 | public class MessageEvent : EventArgs
14 | {
15 | public MessageEvent(Message message)
16 | {
17 | Message = message;
18 | }
19 |
20 | public Message Message { get; }
21 | }
22 |
23 | public delegate void MessageDelegate(object sender, MessageEvent e);
24 | public delegate void ResetDelegate(object sender);
25 |
26 | public event MessageDelegate? MessageAdded;
27 | public event ResetDelegate? Reset;
28 |
29 | protected void OnMessageAdded(Message message)
30 | {
31 | MessageAdded?.Invoke(this, new MessageEvent(message));
32 | }
33 |
34 | protected void OnReset()
35 | {
36 | Reset?.Invoke(this);
37 | }
38 |
39 | #endregion
40 |
41 | public void Add(Message message)
42 | {
43 | _messages.Add(message);
44 | OnMessageAdded(message);
45 | }
46 |
47 | public int Count => _messages.Count;
48 |
49 | public Message this[int index] => _messages[index];
50 |
51 | public void Clear()
52 | {
53 | _messages.Clear();
54 | OnReset();
55 | }
56 |
57 | public static async Task Parse(string path)
58 | {
59 | var result = new MessageCollection();
60 | var url = new Uri($"file://{Path.GetFullPath(path)}");
61 | await foreach (var message in Parser.Parse(url))
62 | {
63 | if (message is null)
64 | {
65 | break;
66 | }
67 | result.Add(message);
68 | }
69 | return result;
70 | }
71 |
72 | #region IEnumerable
73 |
74 | public IEnumerator GetEnumerator()
75 | {
76 | return _messages.GetEnumerator();
77 | }
78 |
79 | System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
80 | {
81 | return GetEnumerator();
82 | }
83 |
84 | #endregion
85 |
86 | public object Clone()
87 | {
88 | var clone = new MessageCollection();
89 | foreach (Message message in _messages)
90 | clone.Add(message);
91 | return clone;
92 | }
93 | }
94 |
95 |
--------------------------------------------------------------------------------
/Fix/MessageDescription.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace Fix;
4 |
5 | public struct MessageDescription
6 | {
7 | public Dictionary.Version Version { get; set; }
8 | public Dictionary.Message? Definition { get; set; }
9 | public DateTime? SendingTime { get; set; }
10 | public string MsgType { get; set; }
11 | public string? MsgTypeDescription { get; set; }
12 | public IEnumerable Fields { get; set; }
13 | }
14 |
--------------------------------------------------------------------------------
/Fix/Network.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: Network.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 | using System.Linq;
13 | using System.Net;
14 | using System.Net.Sockets;
15 |
16 | namespace Fix;
17 |
18 | public static class Network
19 | {
20 | public static IPAddress GetAddress(string name)
21 | {
22 | if (string.IsNullOrEmpty(name))
23 | throw new Exception("Host has not been specified");
24 |
25 | IPAddress[] hostAddresses = Dns.GetHostAddresses(name);
26 |
27 | foreach (IPAddress address in hostAddresses)
28 | {
29 | if (address.AddressFamily != AddressFamily.InterNetwork)
30 | {
31 | continue;
32 | }
33 |
34 | return address;
35 | }
36 |
37 | throw new Exception($"Unable to retrieve address for the host {name}");
38 | }
39 |
40 | public static IPAddress? GetLocalAddress(string name)
41 | {
42 | name = name.Trim();
43 |
44 | if (string.IsNullOrEmpty(name))
45 | {
46 | return null;
47 | }
48 |
49 | try
50 | {
51 | IPAddress[] hostAddresses = Dns.GetHostAddresses(name);
52 | IPAddress[] localAddresses = Dns.GetHostAddresses(Dns.GetHostName());
53 |
54 | foreach (IPAddress address in hostAddresses)
55 | {
56 | if (address.AddressFamily != AddressFamily.InterNetwork)
57 | {
58 | continue;
59 | }
60 |
61 | if (IPAddress.IsLoopback(address))
62 | {
63 | return address;
64 | }
65 |
66 | if (localAddresses.Contains(address))
67 | {
68 | return address;
69 | }
70 | }
71 | }
72 | catch (Exception)
73 | {
74 | }
75 |
76 | throw new Exception($"{name} is not a valid name or address for the local machine");
77 | }
78 | }
79 |
80 |
--------------------------------------------------------------------------------
/Fix/NetworkStream.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: NetworkStream.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 | namespace Fix;
13 |
14 | public class NetworkStream : System.Net.Sockets.NetworkStream
15 | {
16 | public NetworkStream(System.Net.Sockets.Socket socket, bool ownsSocket)
17 | : base(socket, ownsSocket)
18 | {
19 | }
20 |
21 | public new System.Net.Sockets.Socket Socket { get { return base.Socket; } }
22 | }
23 |
24 |
--------------------------------------------------------------------------------
/Fix/NonClosingStreamDecorator.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: NonClosingStreamDecorator.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 | using System.IO;
13 |
14 | namespace Fix;
15 |
16 | public class NonClosingStreamDecorator : Stream
17 | {
18 | readonly Stream _innerStream;
19 |
20 | public NonClosingStreamDecorator(Stream stream)
21 | {
22 | _innerStream = stream ?? throw new ArgumentNullException(nameof(stream));
23 | }
24 |
25 | public override void Close()
26 | {
27 | // NOP
28 | }
29 |
30 | protected override void Dispose(bool disposing)
31 | {
32 | // NOP
33 | }
34 |
35 | public override bool CanRead => _innerStream.CanRead;
36 |
37 | public override bool CanSeek => _innerStream.CanSeek;
38 |
39 | public override bool CanWrite => _innerStream.CanWrite;
40 |
41 | public override void Flush() => _innerStream.Flush();
42 |
43 | public override long Length => _innerStream.Length;
44 |
45 | public override long Position
46 | {
47 | get
48 | {
49 | return _innerStream.Position;
50 | }
51 | set
52 | {
53 | _innerStream.Position = value;
54 | }
55 | }
56 |
57 | public override int Read(byte[] buffer, int offset, int count)
58 | {
59 | return _innerStream.Read(buffer, offset, count);
60 | }
61 |
62 | public override long Seek(long offset, SeekOrigin origin)
63 | {
64 | return _innerStream.Seek(offset, origin);
65 | }
66 |
67 | public override void SetLength(long value)
68 | {
69 | _innerStream.SetLength(value);
70 | }
71 |
72 | public override void Write(byte[] buffer, int offset, int count)
73 | {
74 | _innerStream.Write(buffer, offset, count);
75 | }
76 | }
77 |
78 |
--------------------------------------------------------------------------------
/Fix/OrderReport.cs:
--------------------------------------------------------------------------------
1 | using System.IO;
2 | using System.Text;
3 |
4 | namespace Fix;
5 |
6 | public class OrderReport
7 | {
8 | public OrderReport(OrderBook orderBook)
9 | {
10 | OrderBook = orderBook;
11 | }
12 |
13 | public OrderBook OrderBook { get; }
14 |
15 | public char SeparatorCharacter { get; set; } = '-';
16 |
17 | public void Print(Stream stream)
18 | {
19 | var report = new Common.Report
20 | {
21 | SeparatorCharacter = SeparatorCharacter
22 | };
23 |
24 | report.AddColumn("Sender");
25 | report.AddColumn("Target");
26 | report.AddColumn("ClOrdID");
27 | report.AddColumn("Symbol");
28 | report.AddColumn("OrdStatus");
29 | report.AddColumn("Side");
30 | report.AddColumn("OrderQty", Common.Report.ColumnJustification.Right);
31 | report.AddColumn("Price", Common.Report.ColumnJustification.Right);
32 | report.AddColumn("CumQty", Common.Report.ColumnJustification.Right);
33 | report.AddColumn("AvgPx", Common.Report.ColumnJustification.Right);
34 | report.AddColumn("SendingTime", Common.Report.ColumnJustification.Right);
35 |
36 | foreach (var order in OrderBook.Orders)
37 | {
38 | report.AddRow(order.SenderCompID,
39 | order.TargetCompID,
40 | order.ClOrdID,
41 | order.Symbol,
42 | order.OrdStatus,
43 | order.Side,
44 | order.OrderQty,
45 | order.Price,
46 | order.CumQty,
47 | order.AvgPx,
48 | order.SendingTime.ToString(Field.TimestampFormatLong));
49 | }
50 |
51 | var bytes = Encoding.UTF8.GetBytes("\n" + report.ToString() + "\n\n");
52 | stream.Write(bytes, 0, bytes.Length);
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/Fix/Parsers/GenericLogParser.cs:
--------------------------------------------------------------------------------
1 | using System.IO;
2 | using System.Threading.Tasks;
3 |
4 | namespace Fix.Parsers;
5 |
6 | public class GenericLogParser : LogParser
7 | {
8 | protected override async Task ParseMessage(TextReader reader)
9 | {
10 | bool incoming = false;
11 | string body = string.Empty;
12 |
13 | for (; ; )
14 | {
15 | var line = await reader.ReadLineAsync().ConfigureAwait(false);
16 |
17 | if (line is null)
18 | {
19 | return null;
20 | }
21 |
22 | var position = line.IndexOf("8=FIX");
23 |
24 | if (position < 0)
25 | {
26 | if (body.Length == 0)
27 | {
28 | continue;
29 | }
30 |
31 | // This is a hack to support Atlas logs that can be broken over multiple lines.
32 | position = line.IndexOf(" IN ");
33 |
34 | if (position < 0)
35 | {
36 | position = line.IndexOf(" OUT ");
37 | }
38 |
39 | if (position < 0)
40 | {
41 | continue;
42 | }
43 | }
44 |
45 | var direction = line.Substring(0, position);
46 |
47 | if (direction.Contains("IN") || direction.Contains("Incoming") || direction.Contains("Receiving"))
48 | {
49 | incoming = true;
50 | }
51 |
52 | body += line.Substring(position);
53 |
54 | if (body.Contains("10="))
55 | {
56 | return new Message(body)
57 | {
58 | Incoming = incoming
59 | };
60 | }
61 | }
62 | }
63 | }
64 |
65 |
--------------------------------------------------------------------------------
/Fix/Parsers/KlsLogParser.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: KlsLogParser.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 |
13 | using System.IO;
14 | using System.Threading.Tasks;
15 |
16 | namespace Fix.Parsers;
17 |
18 | public class KlsLogParser : LogParser
19 | {
20 | //
21 | // A KLS log looks like this
22 | //
23 | // 12/24/09 00:26:38 log _TP1_STRATGEHASF ITG 12/24/09 11:26:38
24 | // CLoggingMessageHandler::notifyOutgoing() message=
25 | // 8=FIX.4.09=7135=149=KODIAK56=server34=8852=20091224-00:26:38112=2009122411263810=046
26 | //
27 | // 12/24/09 00:27:10 log _TP1_STRATGEHASF ITG 12/24/09 11:27:10
28 | // CLoggingMessageHandler::notifyOutgoing() message=
29 | // 8=FIX.4.09=7135=149=KODIAK56=server34=9052=20091224-00:27:10112=2009122411271010=021
30 | //
31 | // 12/24/09 00:04:31 log _TP1_STRATGEHASF ITG 12/24/09 11:04:30
32 | // CLoggingMessageHandler::processIncoming() message=
33 | // 8=FIX.4.09=6335=A49=server56=KODIAK34=152=20091224-00:04:3098=0108=3010=114
34 | //
35 | protected override async Task ParseMessage(TextReader reader)
36 | {
37 | Message message;
38 |
39 | for (; ; )
40 | {
41 | var line = await reader.ReadLineAsync();
42 |
43 | if (line == null)
44 | return null;
45 |
46 | bool incoming;
47 |
48 | if (line.Contains("CLoggingMessageHandler::notifyOutgoing() message="))
49 | {
50 | incoming = false;
51 | }
52 | else if (line.Contains("CLoggingMessageHandler::processIncoming() message="))
53 | {
54 | incoming = true;
55 | }
56 | else
57 | {
58 | continue;
59 | }
60 |
61 | line = reader.ReadLine();
62 |
63 | if (string.IsNullOrEmpty(line))
64 | continue;
65 |
66 | try
67 | {
68 | message = new Message(line)
69 | {
70 | Incoming = incoming
71 | };
72 | }
73 | catch (Exception)
74 | {
75 | continue;
76 | }
77 |
78 | break;
79 | }
80 |
81 | return message;
82 | }
83 | }
84 |
85 |
--------------------------------------------------------------------------------
/Fix/Parsers/LogParser.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.IO;
3 | using System.Threading.Tasks;
4 |
5 | namespace Fix;
6 |
7 | public abstract class LogParser
8 | {
9 | public async IAsyncEnumerable Parse(Stream stream)
10 | {
11 | using var reader = new StreamReader(stream);
12 |
13 | while (true)
14 | {
15 | var message = await ParseMessage(reader).ConfigureAwait(false);
16 |
17 | if (message is null)
18 | {
19 | yield break;
20 | }
21 |
22 | yield return message;
23 | }
24 | }
25 |
26 | protected abstract Task ParseMessage(TextReader reader);
27 |
28 | }
29 |
30 |
--------------------------------------------------------------------------------
/Fix/Parsers/Parser.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.IO;
3 | using System.Threading.Tasks;
4 |
5 | namespace Fix;
6 |
7 | public static class Parser
8 | {
9 | static IEnumerable parsers = new LogParser[]
10 | {
11 | new Parsers.GenericLogParser(),
12 | new Parsers.FormattedLogParser(),
13 | new Parsers.KlsLogParser()
14 | };
15 |
16 | public static async IAsyncEnumerable Parse(Stream stream)
17 | {
18 | long position = stream.Position;
19 |
20 | using var decorator = new NonClosingStreamDecorator(stream);
21 |
22 | foreach (var parser in parsers)
23 | {
24 | bool foundMessages = false;
25 |
26 | await foreach (var message in parser.Parse(decorator).ConfigureAwait(false))
27 | {
28 | if (message is null)
29 | {
30 | yield break;
31 | }
32 |
33 | foundMessages = true;
34 |
35 | yield return message;
36 | }
37 |
38 | if (foundMessages)
39 | {
40 | yield break;
41 | }
42 |
43 | stream.Seek(position, SeekOrigin.Begin);
44 | }
45 | }
46 |
47 | public static async IAsyncEnumerable Parse(Uri uri)
48 | {
49 | if (uri.Scheme != "file")
50 | {
51 | throw new ArgumentException("Exepected a URI with a 'file' scheme and got '{0}'", uri.Scheme);
52 | }
53 |
54 | using FileStream stream = new(uri.LocalPath, FileMode.Open);
55 |
56 | await foreach (var message in Parse(stream).ConfigureAwait(false))
57 | {
58 | yield return message;
59 | }
60 | }
61 | }
62 |
63 |
--------------------------------------------------------------------------------
/FixClient.Tests/FixClient.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net9.0-windows
5 | false
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | all
14 | runtime; build; native; contentfiles; analyzers; buildtransitive
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/FixClient/BorderHidingPanel.Designer.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: BorderHidingPanel.Designer.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 |
13 | namespace FixClient
14 | {
15 | partial class BorderHidingPanel
16 | {
17 | ///
18 | /// Required designer variable.
19 | ///
20 | private System.ComponentModel.IContainer components = null;
21 |
22 | ///
23 | /// Clean up any resources being used.
24 | ///
25 | /// true if managed resources should be disposed; otherwise, false.
26 | protected override void Dispose(bool disposing)
27 | {
28 | if (disposing && (components != null))
29 | {
30 | components.Dispose();
31 | }
32 | base.Dispose(disposing);
33 | }
34 |
35 | #region Component Designer generated code
36 |
37 | ///
38 | /// Required method for Designer support - do not modify
39 | /// the contents of this method with the code editor.
40 | ///
41 | private void InitializeComponent()
42 | {
43 | components = new System.ComponentModel.Container();
44 | }
45 |
46 | #endregion
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/FixClient/BorderHidingPanel.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: BorderHidingPanel.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 | using System.Drawing;
13 |
14 | namespace FixClient;
15 |
16 | public partial class BorderHidingPanel : Panel
17 | {
18 | readonly Control _control;
19 |
20 | public BorderHidingPanel(Control control)
21 | {
22 | InitializeComponent();
23 | _control = control;
24 | _control.Dock = DockStyle.None;
25 | Controls.Add(control);
26 | BorderStyle = BorderStyle.None;
27 | SizeChanged += BorderHidingPanelSizeChanged;
28 | }
29 |
30 | void BorderHidingPanelSizeChanged(object? sender, EventArgs e)
31 | {
32 | if (_control != null)
33 | {
34 | _control.Location = new Point(-1, -1);
35 | _control.Size = new Size(Size.Width + 2, Size.Height + 2);
36 | }
37 | }
38 | }
39 |
40 |
--------------------------------------------------------------------------------
/FixClient/CheckGroupBox/CheckGroupBox.Designer.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: CheckGroupBox.Designer.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 |
13 | namespace FixClient
14 | {
15 | partial class CheckGroupBox
16 | {
17 | ///
18 | /// Required designer variable.
19 | ///
20 | private System.ComponentModel.IContainer components = null;
21 |
22 | ///
23 | /// Clean up any resources being used.
24 | ///
25 | /// true if managed resources should be disposed; otherwise, false.
26 | protected override void Dispose(bool disposing)
27 | {
28 | if(disposing && (components != null))
29 | {
30 | components.Dispose();
31 | }
32 | base.Dispose(disposing);
33 | }
34 |
35 | #region Component Designer generated code
36 | ///
37 | /// Required method for Designer support - do not modify
38 | /// the contents of this method with the code editor.
39 | ///
40 | private void InitializeComponent()
41 | {
42 | this.m_checkBox = new System.Windows.Forms.CheckBox();
43 | this.SuspendLayout();
44 | //
45 | // m_checkBox
46 | //
47 | this.m_checkBox.AutoSize = true;
48 | this.m_checkBox.Checked = true;
49 | this.m_checkBox.CheckState = System.Windows.Forms.CheckState.Checked;
50 | this.m_checkBox.Location = new System.Drawing.Point(0, 0);
51 | this.m_checkBox.Name = "m_checkBox";
52 | this.m_checkBox.Size = new System.Drawing.Size(104, 24);
53 | this.m_checkBox.TabIndex = 0;
54 | this.m_checkBox.Text = "checkBox";
55 | this.m_checkBox.UseVisualStyleBackColor = true;
56 | this.m_checkBox.CheckStateChanged += new System.EventHandler(this.CheckBox_CheckStateChanged);
57 | this.m_checkBox.CheckedChanged += new System.EventHandler(this.CheckBox_CheckedChanged);
58 | //
59 | // CheckGroupBox
60 | //
61 | this.ControlAdded += new System.Windows.Forms.ControlEventHandler(this.CheckGroupBox_ControlAdded);
62 | this.ResumeLayout(false);
63 |
64 | }
65 | #endregion
66 |
67 | private System.Windows.Forms.CheckBox m_checkBox;
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/FixClient/CheckGroupBox/CheckGroupBox.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GaryHughes/FixClient/f10fb81b9f22326b1373d1d70bea0ace5ba8bcaa/FixClient/CheckGroupBox/CheckGroupBox.bmp
--------------------------------------------------------------------------------
/FixClient/ConnectForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 | text/microsoft-resx
50 |
51 |
52 | 2.0
53 |
54 |
55 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
56 |
57 |
58 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
59 |
60 |
--------------------------------------------------------------------------------
/FixClient/CustomFields.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/FixClient/Customise/CustomField.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: CustomField.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 | namespace FixClient;
13 |
14 | public class CustomField
15 | {
16 | public int Tag { get; set; }
17 |
18 | public string Name { get; set; } = string.Empty;
19 |
20 | public static bool operator ==(CustomField lhs, CustomField rhs)
21 | {
22 | if (lhs is null && rhs is null)
23 | {
24 | return true;
25 | }
26 |
27 | if (rhs is null)
28 | {
29 | return false;
30 | }
31 |
32 | if (lhs is null)
33 | {
34 | return false;
35 | }
36 |
37 | return lhs.Tag == rhs.Tag;
38 | }
39 |
40 | public static bool operator !=(CustomField lhs, CustomField rhs)
41 | {
42 | return !(lhs == rhs);
43 | }
44 |
45 | public override bool Equals(object? rhs)
46 | {
47 | if (rhs is CustomField field)
48 | {
49 | return this == field;
50 | }
51 | return false;
52 | }
53 |
54 | public override int GetHashCode()
55 | {
56 | return Tag;
57 | }
58 |
59 | public override string ToString()
60 | {
61 | return string.Format("{0} = {1}", Tag, Name);
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/FixClient/Customise/CustomFieldCategory.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: CustomFieldCategory.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 | using System.Collections.Generic;
13 |
14 | namespace FixClient;
15 |
16 | class CustomFieldCategory
17 | {
18 | readonly string _name;
19 | readonly List _fields = new();
20 |
21 | public CustomFieldCategory(string name)
22 | {
23 | _name = name;
24 | }
25 |
26 | public string Name
27 | {
28 | get { return _name; }
29 | }
30 |
31 | public List Fields
32 | {
33 | get { return _fields; }
34 | }
35 |
36 | public bool Add(CustomField field)
37 | {
38 | if (_fields.Contains(field))
39 | return false;
40 |
41 | _fields.Add(field);
42 | return true;
43 | }
44 |
45 | public override string ToString()
46 | {
47 | return Name;
48 | }
49 | }
50 |
51 |
--------------------------------------------------------------------------------
/FixClient/Customise/CustomFieldCollection.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: CustomFieldCollection.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 | using System.Collections.Generic;
13 | using System.IO;
14 | using System.Text;
15 | using System.Xml;
16 |
17 | namespace FixClient;
18 |
19 | class CustomFieldCollection
20 | {
21 | readonly Dictionary _fields = new();
22 |
23 | public CustomFieldCollection(string xml)
24 | {
25 | Load(xml);
26 | }
27 |
28 | public void Load(string xml)
29 | {
30 | using var stream = new MemoryStream(Encoding.UTF8.GetBytes(xml));
31 | using var reader = new XmlTextReader(stream);
32 |
33 | while (!reader.EOF)
34 | {
35 | reader.MoveToContent();
36 |
37 | if (reader.Name != "Field")
38 | {
39 | reader.Read();
40 | continue;
41 | }
42 |
43 | if (reader.GetAttribute("name") is not string name)
44 | {
45 | continue;
46 | }
47 |
48 | int id = Convert.ToInt32(reader.GetAttribute("id"));
49 |
50 | if (reader.GetAttribute("categories") is not string categoryAttribute)
51 | {
52 | continue;
53 | }
54 |
55 | string[] categories = categoryAttribute.Split(',');
56 |
57 | foreach (string c in categories)
58 | {
59 | string category = c.Trim();
60 |
61 | if (category == string.Empty)
62 | {
63 | continue;
64 | }
65 |
66 | if (!_fields.ContainsKey(category))
67 | {
68 | _fields[category] = new CustomFieldCategory(category);
69 | }
70 |
71 | _fields[category].Add(new CustomField { Tag = id, Name = name });
72 | }
73 |
74 | reader.Read();
75 | }
76 | }
77 |
78 | public Dictionary Fields => _fields;
79 |
80 | }
81 |
82 |
--------------------------------------------------------------------------------
/FixClient/Customise/CustomFieldDataRow.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: CustomFieldDataRow.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 | using System.Data;
13 |
14 | namespace FixClient;
15 |
16 | class CustomFieldDataRow : DataRow
17 | {
18 | public CustomFieldDataRow(DataRowBuilder builder)
19 | : base(builder)
20 | {
21 | }
22 |
23 | public CustomField? Field { get; set; }
24 | }
25 |
--------------------------------------------------------------------------------
/FixClient/Customise/CustomFieldDataTable.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: CustomFieldDataTable.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 | using System.Data;
13 |
14 | namespace FixClient;
15 |
16 | class CustomFieldDataTable : DataTable
17 | {
18 | public const string ColumnNameName = "Name";
19 | public const string ColumnNameTag = "Tag";
20 |
21 | public CustomFieldDataTable(string name)
22 | : base(name)
23 | {
24 | DataColumn columnTag = Columns.Add(ColumnNameTag);
25 | Columns.Add(ColumnNameName);
26 | PrimaryKey = new[] { columnTag };
27 | }
28 |
29 | protected override System.Type GetRowType()
30 | {
31 | return typeof(CustomFieldDataRow);
32 | }
33 |
34 | protected override DataRow NewRowFromBuilder(DataRowBuilder builder)
35 | {
36 | return new CustomFieldDataRow(builder);
37 | }
38 | }
39 |
40 |
--------------------------------------------------------------------------------
/FixClient/Customise/CustomiseFieldDataGridView.Designer.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: CustomiseFieldDataGridView.Designer.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 |
13 | namespace FixClient
14 | {
15 | partial class CustomiseFieldDataGridView
16 | {
17 | ///
18 | /// Required designer variable.
19 | ///
20 | private System.ComponentModel.IContainer components = null;
21 |
22 | ///
23 | /// Clean up any resources being used.
24 | ///
25 | /// true if managed resources should be disposed; otherwise, false.
26 | protected override void Dispose(bool disposing)
27 | {
28 | if (disposing && (components != null))
29 | {
30 | components.Dispose();
31 | }
32 | base.Dispose(disposing);
33 | }
34 |
35 | #region Windows Form Designer generated code
36 |
37 | ///
38 | /// Required method for Designer support - do not modify
39 | /// the contents of this method with the code editor.
40 | ///
41 | private void InitializeComponent()
42 | {
43 | this.components = new System.ComponentModel.Container();
44 | this.Text = "CustomiseFieldDataGridView";
45 | }
46 |
47 | #endregion
48 | }
49 | }
--------------------------------------------------------------------------------
/FixClient/Customise/CustomiseFieldDataGridView.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: CustomiseFieldDataGridView.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 | using System.Drawing;
13 |
14 | namespace FixClient;
15 |
16 | public partial class CustomiseFieldDataGridView : DataGridView
17 | {
18 | public const string ColumnFieldId = "Id";
19 | public const string ColumnFieldName = "Name";
20 |
21 | public CustomiseFieldDataGridView()
22 | {
23 | InitializeComponent();
24 |
25 | BackgroundColor = LookAndFeel.Color.GridCellBackground;
26 | BorderStyle = BorderStyle.None;
27 | SelectionMode = DataGridViewSelectionMode.FullRowSelect;
28 | MultiSelect = false;
29 | RowHeadersVisible = false;
30 | ColumnHeadersVisible = false;
31 | DefaultCellStyle.WrapMode = DataGridViewTriState.False;
32 | RowTemplate.Resizable = DataGridViewTriState.False;
33 | AutoGenerateColumns = false;
34 | CellBorderStyle = DataGridViewCellBorderStyle.SingleHorizontal;
35 | AllowUserToAddRows = false;
36 | BackgroundColor = LookAndFeel.Color.GridCellBackground;
37 | DefaultCellStyle.Padding = new Padding(3, 0, 3, 0);
38 | DefaultCellStyle.Font = new Font("Arial", 8);
39 | RowTemplate.Height -= 3;
40 | BackgroundColor = LookAndFeel.Color.GridCellBackground;
41 | GridColor = LookAndFeel.Color.Grid;
42 | DefaultCellStyle.BackColor = LookAndFeel.Color.GridCellBackground;
43 | DefaultCellStyle.ForeColor = LookAndFeel.Color.GridCellForeground;
44 | DefaultCellStyle.SelectionBackColor = LookAndFeel.Color.GridCellSelectedBackground;
45 | DefaultCellStyle.SelectionForeColor = LookAndFeel.Color.GridCellSelectedForeground;
46 | DoubleBuffered = true;
47 | ReadOnly = true;
48 | AutoGenerateColumns = true;
49 | }
50 |
51 | protected override void OnColumnAdded(DataGridViewColumnEventArgs e)
52 | {
53 | DataGridViewColumn column = e.Column;
54 |
55 | switch (column.Name)
56 | {
57 | case CustomFieldDataTable.ColumnNameTag:
58 | e.Column.AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
59 | break;
60 |
61 | case CustomFieldDataTable.ColumnNameName:
62 | e.Column.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
63 | break;
64 | }
65 |
66 | base.OnColumnAdded(e);
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/FixClient/Customise/CustomisePanel.Designer.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: CustomisePanel.Designer.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 |
13 | namespace FixClient
14 | {
15 | partial class CustomisePanel
16 | {
17 | ///
18 | /// Required designer variable.
19 | ///
20 | private System.ComponentModel.IContainer components = null;
21 |
22 |
23 |
24 | ///
25 | /// Clean up any resources being used.
26 | ///
27 | /// true if managed resources should be disposed; otherwise, false.
28 | protected override void Dispose(bool disposing)
29 | {
30 | if (disposing && (components != null))
31 | {
32 | components.Dispose();
33 | }
34 | base.Dispose(disposing);
35 | }
36 |
37 | #region Windows Form Designer generated code
38 |
39 | ///
40 | /// Required method for Designer support - do not modify
41 | /// the contents of this method with the code editor.
42 | ///
43 | private void InitializeComponent()
44 | {
45 | this.components = new System.ComponentModel.Container();
46 | this.Text = "CustomFieldsPanel";
47 | }
48 |
49 | #endregion
50 | }
51 | }
--------------------------------------------------------------------------------
/FixClient/DataGridViewControls/DataGridViewIndentCell.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: DataGridViewIndentCell.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 | using System.Drawing;
13 |
14 | namespace FixClient;
15 |
16 | public class DataGridViewIndentCell : DataGridViewCell
17 | {
18 | static readonly Brush DefaultBrush = new SolidBrush(LookAndFeel.Color.GridCellBackground);
19 |
20 | static readonly Brush[] Brushes =
21 | [
22 | new SolidBrush(LookAndFeel.Color.GridCellBackground),
23 | new SolidBrush(Color.FromArgb(226, 226, 226)),
24 | new SolidBrush(Color.FromArgb(204, 204, 204)),
25 | new SolidBrush(Color.FromArgb(152, 152, 152)),
26 | new SolidBrush(Color.FromArgb(120, 120, 120)),
27 | new SolidBrush(Color.Black)
28 | ];
29 |
30 | protected override void Paint(Graphics graphics, Rectangle clipBounds, Rectangle cellBounds, int rowIndex,
31 | DataGridViewElementStates cellState, object? value, object? formattedValue, string? errorText,
32 | DataGridViewCellStyle cellStyle, DataGridViewAdvancedBorderStyle advancedBorderStyle,
33 | DataGridViewPaintParts paintParts)
34 | {
35 | if (value is not int)
36 | {
37 | throw new ArgumentException("Value is not an Int");
38 | }
39 |
40 | var indent = (int)value;
41 |
42 | if (indent > Brushes.Length - 1 || indent < 0)
43 | {
44 | indent = 0;
45 | }
46 |
47 | Rectangle rect = cellBounds;
48 | graphics.FillRectangle(DefaultBrush, rect);
49 | Brush brush = Brushes[indent];
50 | rect.Inflate(-(rect.Width / 3) + 1, 0);
51 | graphics.FillRectangle(brush, rect);
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/FixClient/DataGridViewControls/DataGridViewIndentColumn.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: DataGridViewIndentColumn.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 | using System.ComponentModel;
13 |
14 | namespace FixClient.DataGridViewControls;
15 |
16 | public class DataGridViewIndentColumn : DataGridViewColumn
17 | {
18 | public DataGridViewIndentColumn()
19 | : base(new DataGridViewIndentCell())
20 | {
21 | }
22 |
23 | [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
24 | public override DataGridViewCell? CellTemplate
25 | {
26 | get
27 | {
28 | return base.CellTemplate;
29 | }
30 | set
31 | {
32 | if (value != null && !value.GetType().IsAssignableFrom(typeof(DataGridViewIndentCell)))
33 | {
34 | throw new InvalidCastException("Must be a DataGridViewIndentCell");
35 | }
36 | base.CellTemplate = value;
37 | }
38 | }
39 | }
40 |
41 |
--------------------------------------------------------------------------------
/FixClient/DataSet/FieldDataRow.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: FieldDataRow.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 | using System.Data;
13 |
14 | namespace FixClient;
15 |
16 | public class FieldDataRow : DataRow
17 | {
18 | public FieldDataRow(DataRowBuilder builder)
19 | : base(builder)
20 | {
21 | }
22 |
23 | public Fix.Field? Field { get; set; }
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/FixClient/DataSet/FieldDataTable.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: FieldDataTable.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 | using System.Data;
13 |
14 | namespace FixClient;
15 |
16 | class FieldDataTable : DataTable
17 | {
18 | public const string ColumnIndent = "Indent";
19 | public const string ColumnTag = "Tag";
20 | public const string ColumnName = "Name";
21 | public const string ColumnValue = "Value";
22 | public const string ColumnDescription = "Description";
23 | public const string ColumnRequired = "Required";
24 | public const string ColumnCustom = "Custom";
25 |
26 | public FieldDataTable(string name)
27 | : base(name)
28 | {
29 | Columns.Add(ColumnIndent, typeof(Int32)).ColumnMapping = MappingType.Hidden;
30 | Columns.Add(ColumnTag, typeof(Int32));
31 | Columns.Add(ColumnName);
32 | Columns.Add(ColumnValue);
33 | Columns.Add(ColumnDescription);
34 | Columns.Add(ColumnRequired, typeof(bool)).ColumnMapping = MappingType.Hidden;
35 | Columns.Add(ColumnCustom, typeof(bool)).ColumnMapping = MappingType.Hidden;
36 | }
37 |
38 | protected override Type GetRowType()
39 | {
40 | return typeof(FieldDataRow);
41 | }
42 |
43 | protected override DataRow NewRowFromBuilder(DataRowBuilder builder)
44 | {
45 | return new FieldDataRow(builder);
46 | }
47 | }
48 |
49 |
--------------------------------------------------------------------------------
/FixClient/DataSet/MessageDataRow.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: MessageDataRow.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 | using System.Data;
13 |
14 | namespace FixClient;
15 |
16 | class MessageDataRow : DataRow
17 | {
18 | public MessageDataRow(DataRowBuilder builder)
19 | : base(builder)
20 | {
21 | }
22 |
23 | public Fix.Message? Message { get; set; }
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/FixClient/DataSet/MessageDataTable.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: MessageDataTable.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 | using System.Data;
13 | using System.Drawing;
14 |
15 | namespace FixClient;
16 |
17 | class MessageDataTable : DataTable
18 | {
19 | public const string ColumnSendingTime = "Sent";
20 | public const string ColumnMsgType = "Type";
21 | public const string ColumnStatus = "Status";
22 | public const string ColumnStatusImage = "StatusImage";
23 | public const string ColumnStatusMessage = "StatusMessage";
24 | public const string ColumnMsgTypeDescription = "Message";
25 | public const string ColumnMsgSeqNum = "Seq";
26 | public const string ColumnAdministrative = "Administrative";
27 |
28 | public MessageDataTable(string name)
29 | : base(name)
30 | {
31 | // In the history view we use virtual mode so it is important to position the visible columns first because
32 | // they are the only ones the grid knows about and will ask for them with 0 based indexes.
33 | Columns.Add(ColumnSendingTime);
34 | Columns.Add(ColumnMsgSeqNum);
35 | Columns.Add(ColumnStatusImage, typeof(Image));
36 | Columns.Add(ColumnMsgTypeDescription);
37 | Columns.Add(ColumnMsgType).ColumnMapping = MappingType.Hidden;
38 | Columns.Add(ColumnStatus, typeof(Fix.MessageStatus)).ColumnMapping = MappingType.Hidden;
39 | Columns.Add(ColumnStatusMessage).ColumnMapping = MappingType.Hidden;
40 | Columns.Add(ColumnAdministrative, typeof(bool)).ColumnMapping = MappingType.Hidden;
41 | }
42 |
43 | protected override Type GetRowType()
44 | {
45 | return typeof(MessageDataRow);
46 | }
47 |
48 | protected override DataRow NewRowFromBuilder(DataRowBuilder builder)
49 | {
50 | return new MessageDataRow(builder);
51 | }
52 | }
53 |
54 |
--------------------------------------------------------------------------------
/FixClient/DataSet/MessageTypeDataRow.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: MessageTypeDataRow.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 | using System.Data;
13 |
14 | namespace FixClient;
15 |
16 | class MessageTypeDataRow : DataRow
17 | {
18 | public MessageTypeDataRow(DataRowBuilder builder)
19 | : base(builder)
20 | {
21 | }
22 |
23 | public Fix.Dictionary.Message? Message { get; set; }
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/FixClient/DataSet/MessageTypeDataTable.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: MessageTypeDataTable.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 | using System.Data;
13 |
14 | namespace FixClient;
15 |
16 | class MessageTypeDataTable : DataTable
17 | {
18 | public const string ColumnMsgType = "Type";
19 | public const string ColumnMsgTypeDescription = "Message";
20 | public const string ColumnSearchMsgType = "SearchType";
21 | public const string ColumnSearchMsgTypeDescription = "SearchMessage";
22 |
23 | public MessageTypeDataTable(string name)
24 | : base(name)
25 | {
26 | //
27 | // We can have both j and J as valid messages types.
28 | //
29 | CaseSensitive = true;
30 |
31 | DataColumn column = Columns.Add(ColumnMsgType);
32 | Columns.Add(ColumnMsgTypeDescription);
33 | Columns.Add(ColumnSearchMsgType).ColumnMapping = MappingType.Hidden;
34 | Columns.Add(ColumnSearchMsgTypeDescription).ColumnMapping = MappingType.Hidden;
35 | PrimaryKey = new[] { column };
36 | }
37 |
38 | protected override Type GetRowType()
39 | {
40 | return typeof(MessageTypeDataRow);
41 | }
42 |
43 | protected override DataRow NewRowFromBuilder(DataRowBuilder builder)
44 | {
45 | return new MessageTypeDataRow(builder);
46 | }
47 | }
48 |
49 |
--------------------------------------------------------------------------------
/FixClient/DataSet/OrderDataRow.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: OrderDataRow.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 | using Fix;
13 | using System.Data;
14 |
15 | namespace FixClient;
16 |
17 | class OrderDataRow : DataRow
18 | {
19 | public OrderDataRow(DataRowBuilder builder)
20 | : base(builder)
21 | {
22 | }
23 |
24 | public Order? Order { get; set; }
25 | }
26 |
27 |
--------------------------------------------------------------------------------
/FixClient/DataSet/OrderDataTable.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: OrderDataTable.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 | using System.Collections.Generic;
13 | using System.Data;
14 | using static Fix.Dictionary;
15 |
16 | namespace FixClient;
17 |
18 | class OrderDataTable : DataTable
19 | {
20 | public const string ColumnClOrdId = "ClOrdID";
21 | public const string ColumnOrigClOrdId = "OrigClOrdID";
22 | public const string ColumnSide = "Side";
23 | public const string ColumnSideString = "SideString";
24 | public const string ColumnQuantity = "Quantity";
25 | public const string ColumnSymbol = "Symbol";
26 | public const string ColumnLimit = "Limit";
27 | public const string ColumnExDestination = "ExDestination";
28 | public const string ColumnTimeInForce = "TIF";
29 | public const string ColumnTimeInForceString = "TIFString";
30 | public const string ColumnOrdStatus = "Status";
31 | public const string ColumnOrdStatusString = "StatusString";
32 | public const string ColumnDone = "Done";
33 | public const string ColumnLeaves = "Leaves";
34 | public const string ColumnAvgPrice = "AvgPrice";
35 | public const string ColumnListId = "ListID";
36 | public const string ColumnText = "Text";
37 | public const string ColumnPendingQuantity = "PendingQuantity";
38 | public const string ColumnPendingLimit = "PendingLimit";
39 |
40 | public OrderDataTable(string name)
41 | : base(name)
42 | {
43 | var primaryKey = new List();
44 |
45 | Columns.Add(ColumnSide, typeof(FieldValue));
46 | Columns.Add(ColumnSideString).ColumnMapping = MappingType.Hidden;
47 | Columns.Add(ColumnSymbol);
48 | Columns.Add(ColumnQuantity);
49 | Columns.Add(ColumnLimit);
50 | Columns.Add(ColumnExDestination);
51 | Columns.Add(ColumnTimeInForce, typeof(FieldValue));
52 | Columns.Add(ColumnTimeInForceString).ColumnMapping = MappingType.Hidden;
53 | Columns.Add(ColumnOrdStatus, typeof(FieldValue));
54 | Columns.Add(ColumnOrdStatusString).ColumnMapping = MappingType.Hidden;
55 | Columns.Add(ColumnDone);
56 | Columns.Add(ColumnLeaves);
57 | Columns.Add(ColumnAvgPrice);
58 | primaryKey.Add(Columns.Add(ColumnClOrdId));
59 | Columns.Add(ColumnOrigClOrdId);
60 | Columns.Add(ColumnListId);
61 | Columns.Add(ColumnText);
62 | Columns.Add(ColumnPendingQuantity).ColumnMapping = MappingType.Hidden;
63 | Columns.Add(ColumnPendingLimit).ColumnMapping = MappingType.Hidden;
64 |
65 | PrimaryKey = primaryKey.ToArray();
66 | }
67 |
68 | protected override Type GetRowType()
69 | {
70 | return typeof(OrderDataRow);
71 | }
72 |
73 | protected override DataRow NewRowFromBuilder(DataRowBuilder builder)
74 | {
75 | return new OrderDataRow(builder);
76 | }
77 | }
78 |
79 |
--------------------------------------------------------------------------------
/FixClient/DictionaryPanel.Designer.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: DictionaryPanel.Designer.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 |
13 | namespace FixClient
14 | {
15 | partial class DictionaryPanel
16 | {
17 | ///
18 | /// Required designer variable.
19 | ///
20 | private System.ComponentModel.IContainer components = null;
21 |
22 | ///
23 | /// Clean up any resources being used.
24 | ///
25 | /// true if managed resources should be disposed; otherwise, false.
26 | protected override void Dispose(bool disposing)
27 | {
28 | if (disposing && (components != null))
29 | {
30 | components.Dispose();
31 | }
32 | base.Dispose(disposing);
33 | }
34 |
35 | #region Windows Form Designer generated code
36 |
37 | ///
38 | /// Required method for Designer support - do not modify
39 | /// the contents of this method with the code editor.
40 | ///
41 | private void InitializeComponent()
42 | {
43 | this.components = new System.ComponentModel.Container();
44 | this.Text = "DictionaryPanel";
45 | }
46 |
47 | #endregion
48 | }
49 | }
--------------------------------------------------------------------------------
/FixClient/EditableMessageFieldDataGridView.Designer.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: EditableMessageFieldDataGridView.Designer.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 |
13 | namespace FixClient
14 | {
15 | partial class EditableMessageFieldDataGridView
16 | {
17 | ///
18 | /// Required designer variable.
19 | ///
20 | private System.ComponentModel.IContainer components = null;
21 |
22 | ///
23 | /// Clean up any resources being used.
24 | ///
25 | /// true if managed resources should be disposed; otherwise, false.
26 | protected override void Dispose(bool disposing)
27 | {
28 | if (disposing && (components != null))
29 | {
30 | components.Dispose();
31 | }
32 | base.Dispose(disposing);
33 | }
34 |
35 | #region Component Designer generated code
36 |
37 | ///
38 | /// Required method for Designer support - do not modify
39 | /// the contents of this method with the code editor.
40 | ///
41 | private void InitializeComponent()
42 | {
43 | components = new System.ComponentModel.Container();
44 | }
45 |
46 | #endregion
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/FixClient/EnumDescription.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: EnumDescription.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 | using System.Collections.Generic;
13 | using static Fix.Dictionary;
14 |
15 | namespace FixClient;
16 |
17 | public record EnumDescription(string Name, string Value, string Description)
18 | {
19 | public override string ToString() => Name;
20 | }
21 |
22 | public class EnumDescriptionCollection : List
23 | {
24 | public EnumDescriptionCollection(VersionField field)
25 | {
26 | if (field.Values.Count == 0)
27 | {
28 | throw new ArgumentException(string.Format("Field type must be enumerated! you passed {0}", field.Name));
29 | }
30 |
31 | foreach (var item in field.Values)
32 | {
33 | Add(new EnumDescription(item.Value.Name, item.Value.Value, item.Value.Description));
34 | }
35 | }
36 | }
37 |
38 |
--------------------------------------------------------------------------------
/FixClient/FieldDataGridView.Designer.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: FieldDataGridView.Designer.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 |
13 | namespace FixClient
14 | {
15 | partial class FieldDataGridView
16 | {
17 | ///
18 | /// Required designer variable.
19 | ///
20 | private System.ComponentModel.IContainer components = null;
21 |
22 | ///
23 | /// Clean up any resources being used.
24 | ///
25 | /// true if managed resources should be disposed; otherwise, false.
26 | protected override void Dispose(bool disposing)
27 | {
28 | if (disposing && (components != null))
29 | {
30 | components.Dispose();
31 | }
32 | base.Dispose(disposing);
33 | }
34 |
35 | #region Windows Form Designer generated code
36 |
37 | ///
38 | /// Required method for Designer support - do not modify
39 | /// the contents of this method with the code editor.
40 | ///
41 | private void InitializeComponent()
42 | {
43 | this.components = new System.ComponentModel.Container();
44 | this.Text = "SessionFieldDataGridView";
45 | }
46 |
47 | #endregion
48 | }
49 | }
--------------------------------------------------------------------------------
/FixClient/Filters/FilterFieldDataGridView.Designer.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: FilterFieldDataGridView.Designer.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 |
13 | namespace FixClient
14 | {
15 | partial class FilterFieldDataGridView
16 | {
17 | ///
18 | /// Required designer variable.
19 | ///
20 | private System.ComponentModel.IContainer components = null;
21 |
22 | ///
23 | /// Clean up any resources being used.
24 | ///
25 | /// true if managed resources should be disposed; otherwise, false.
26 | protected override void Dispose(bool disposing)
27 | {
28 | if (disposing && (components != null))
29 | {
30 | components.Dispose();
31 | }
32 | base.Dispose(disposing);
33 | }
34 |
35 | #region Windows Form Designer generated code
36 |
37 | ///
38 | /// Required method for Designer support - do not modify
39 | /// the contents of this method with the code editor.
40 | ///
41 | private void InitializeComponent()
42 | {
43 | this.components = new System.ComponentModel.Container();
44 | this.Text = "FilterFieldDataGridView";
45 | }
46 |
47 | #endregion
48 | }
49 | }
--------------------------------------------------------------------------------
/FixClient/Filters/FilterFieldDataGridView.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: FilterFieldDataGridView.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 | using System.Drawing;
13 |
14 | namespace FixClient;
15 |
16 | public partial class FilterFieldDataGridView : DataGridView
17 | {
18 | public FilterFieldDataGridView()
19 | {
20 | InitializeComponent();
21 |
22 | EnableHeadersVisualStyles = false;
23 | ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
24 | ColumnHeadersDefaultCellStyle.Font = new Font("Arial", 8, FontStyle.Bold);
25 | ColumnHeadersDefaultCellStyle.BackColor = LookAndFeel.Color.GridColumnHeader;
26 | ColumnHeadersDefaultCellStyle.ForeColor = Color.WhiteSmoke;
27 | ColumnHeadersBorderStyle = DataGridViewHeaderBorderStyle.Single;
28 | ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
29 | ColumnHeadersHeight -= 3;
30 | BackgroundColor = LookAndFeel.Color.GridCellBackground;
31 | BorderStyle = BorderStyle.None;
32 | SelectionMode = DataGridViewSelectionMode.FullRowSelect;
33 | MultiSelect = false;
34 | RowHeadersVisible = false;
35 | DefaultCellStyle.WrapMode = DataGridViewTriState.False;
36 | RowTemplate.Resizable = DataGridViewTriState.False;
37 | AutoGenerateColumns = false;
38 | CellBorderStyle = DataGridViewCellBorderStyle.SingleHorizontal;
39 | AllowUserToAddRows = false;
40 | AllowUserToDeleteRows = false;
41 | DefaultCellStyle.Padding = new Padding(3, 0, 3, 0);
42 | DefaultCellStyle.Font = new Font("Arial", 8);
43 | RowTemplate.Height -= 3;
44 | BackgroundColor = LookAndFeel.Color.GridCellBackground;
45 | GridColor = LookAndFeel.Color.Grid;
46 | DefaultCellStyle.BackColor = LookAndFeel.Color.GridCellBackground;
47 | DefaultCellStyle.ForeColor = LookAndFeel.Color.GridCellForeground;
48 | DefaultCellStyle.SelectionBackColor = LookAndFeel.Color.GridCellSelectedBackground;
49 | DefaultCellStyle.SelectionForeColor = LookAndFeel.Color.GridCellSelectedForeground;
50 | DoubleBuffered = true;
51 |
52 | DataGridViewColumn column = new DataGridViewCheckBoxColumn
53 | {
54 | Name = FilterFieldDataTable.ColumnVisible,
55 | AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells
56 | };
57 | Columns.Add(column);
58 |
59 | column = new DataGridViewTextBoxColumn
60 | {
61 | Name = FilterFieldDataTable.ColumnTag,
62 | ReadOnly = true,
63 | AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells
64 | };
65 | Columns.Add(column);
66 |
67 | column = new DataGridViewTextBoxColumn
68 | {
69 | Name = FilterFieldDataTable.ColumnName,
70 | ReadOnly = true,
71 | AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
72 | };
73 | Columns.Add(column);
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/FixClient/Filters/FilterFieldDataTable.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: FilterFieldDataTable.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 | using System.Data;
13 |
14 | namespace FixClient;
15 |
16 | class FilterFieldDataTable : DataTable
17 | {
18 | public const string ColumnVisible = "Visible";
19 | public const string ColumnTag = "Tag";
20 | public const string ColumnName = "Name";
21 |
22 | public FilterFieldDataTable(string name)
23 | : base(name)
24 | {
25 | Columns.Add(ColumnVisible, typeof(bool));
26 | Columns.Add(ColumnTag, typeof(int));
27 | Columns.Add(ColumnName);
28 | }
29 | }
30 |
31 |
--------------------------------------------------------------------------------
/FixClient/Filters/FilterMessageDataGridView.Designer.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: FilterMessageDataGridView.Designer.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 |
13 | namespace FixClient
14 | {
15 | sealed partial class FilterMessageDataGridView
16 | {
17 | ///
18 | /// Required designer variable.
19 | ///
20 | private System.ComponentModel.IContainer components = null;
21 |
22 | ///
23 | /// Clean up any resources being used.
24 | ///
25 | /// true if managed resources should be disposed; otherwise, false.
26 | protected override void Dispose(bool disposing)
27 | {
28 | if (disposing && (components != null))
29 | {
30 | components.Dispose();
31 | }
32 | base.Dispose(disposing);
33 | }
34 |
35 | #region Windows Form Designer generated code
36 |
37 | ///
38 | /// Required method for Designer support - do not modify
39 | /// the contents of this method with the code editor.
40 | ///
41 | private void InitializeComponent()
42 | {
43 | this.components = new System.ComponentModel.Container();
44 | this.Text = "FilterMessageDataGridView";
45 | }
46 |
47 | #endregion
48 | }
49 | }
--------------------------------------------------------------------------------
/FixClient/Filters/FilterMessageDataGridView.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: FilterMessageDataGridView.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 | using System.Drawing;
13 |
14 | namespace FixClient;
15 |
16 | public sealed partial class FilterMessageDataGridView : DataGridView
17 | {
18 | public FilterMessageDataGridView()
19 | {
20 | EnableHeadersVisualStyles = false;
21 | ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
22 | ColumnHeadersDefaultCellStyle.Font = new Font("Arial", 8, FontStyle.Bold);
23 | ColumnHeadersDefaultCellStyle.BackColor = LookAndFeel.Color.GridColumnHeader;
24 | ColumnHeadersDefaultCellStyle.ForeColor = Color.WhiteSmoke;
25 | ColumnHeadersBorderStyle = DataGridViewHeaderBorderStyle.Single;
26 | ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
27 | ColumnHeadersHeight -= 3;
28 | Dock = DockStyle.Fill;
29 | BackgroundColor = Color.WhiteSmoke;
30 | BorderStyle = BorderStyle.None;
31 | SelectionMode = DataGridViewSelectionMode.FullRowSelect;
32 | MultiSelect = false;
33 | RowHeadersVisible = false;
34 | DefaultCellStyle.WrapMode = DataGridViewTriState.False;
35 | RowTemplate.Resizable = DataGridViewTriState.False;
36 | AutoGenerateColumns = false;
37 | CellBorderStyle = DataGridViewCellBorderStyle.SingleHorizontal;
38 | AllowUserToAddRows = false;
39 | AllowUserToDeleteRows = false;
40 | DefaultCellStyle.Font = new Font("Arial", 8);
41 | DefaultCellStyle.Padding = new Padding(3, 0, 3, 0);
42 | RowTemplate.Height -= 3;
43 | GridColor = LookAndFeel.Color.Grid;
44 | DefaultCellStyle.BackColor = LookAndFeel.Color.GridCellBackground;
45 | DefaultCellStyle.ForeColor = LookAndFeel.Color.GridCellForeground;
46 | DefaultCellStyle.SelectionBackColor = LookAndFeel.Color.GridCellSelectedBackground;
47 | DefaultCellStyle.SelectionForeColor = LookAndFeel.Color.GridCellSelectedForeground;
48 | DoubleBuffered = true;
49 |
50 | DataGridViewColumn column = new DataGridViewCheckBoxColumn
51 | {
52 | AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells,
53 | Name = "Visible"
54 | };
55 | Columns.Add(column);
56 |
57 | column = new DataGridViewTextBoxColumn
58 | {
59 | ReadOnly = true,
60 | AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells,
61 | Name = "Type",
62 | DefaultCellStyle = { Alignment = DataGridViewContentAlignment.MiddleCenter }
63 | };
64 | Columns.Add(column);
65 |
66 | column = new DataGridViewTextBoxColumn
67 | {
68 | ReadOnly = true,
69 | AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill,
70 | Name = "Name"
71 | };
72 | Columns.Add(column);
73 |
74 | InitializeComponent();
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/FixClient/Filters/FilterMessageDataRow.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: FilterMessageDataRow.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 | using Fix;
13 | using System.Data;
14 |
15 | namespace FixClient;
16 |
17 | class FilterMessageDataRow : DataRow
18 | {
19 | public FilterMessageDataRow(DataRowBuilder builder)
20 | : base(builder)
21 | {
22 | }
23 |
24 | public Dictionary.Message? Message { get; set; }
25 | }
26 |
27 |
--------------------------------------------------------------------------------
/FixClient/Filters/FilterMessageDataTable.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: FilterMessageDataTable.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 | using System.Data;
13 |
14 | namespace FixClient;
15 |
16 | class FilterMessageDataTable : DataTable
17 | {
18 | public const string ColumnVisible = "Visible";
19 | public const string ColumnMsgType = "Type";
20 | public const string ColumnName = "Name";
21 |
22 | public FilterMessageDataTable(string name)
23 | : base(name)
24 | {
25 | Columns.Add(ColumnVisible, typeof(bool));
26 | Columns.Add(ColumnMsgType);
27 | Columns.Add(ColumnName);
28 | }
29 |
30 | protected override System.Type GetRowType()
31 | {
32 | return typeof(FilterMessageDataRow);
33 | }
34 |
35 | protected override DataRow NewRowFromBuilder(DataRowBuilder builder)
36 | {
37 | return new FilterMessageDataRow(builder);
38 | }
39 | }
40 |
41 |
--------------------------------------------------------------------------------
/FixClient/Filters/FiltersPanel.Designer.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: FiltersPanel.Designer.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 |
13 | namespace FixClient
14 | {
15 | partial class FiltersPanel
16 | {
17 | ///
18 | /// Required designer variable.
19 | ///
20 | private System.ComponentModel.IContainer components = null;
21 |
22 | ///
23 | /// Clean up any resources being used.
24 | ///
25 | protected override void Dispose(bool disposing)
26 | {
27 | if (disposing && (components != null))
28 | {
29 | components.Dispose();
30 | }
31 | base.Dispose(disposing);
32 | }
33 |
34 | #region Windows Form Designer generated code
35 |
36 | ///
37 | /// Required method for Designer support - do not modify
38 | /// the contents of this method with the code editor.
39 | ///
40 | private void InitializeComponent()
41 | {
42 | this.components = new System.ComponentModel.Container();
43 | this.Text = "FiltersPanel";
44 | }
45 |
46 | #endregion
47 | }
48 | }
--------------------------------------------------------------------------------
/FixClient/FixClient.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | WinExe
5 | net9.0-windows
6 | true
7 | true
8 | true
9 | true
10 | true
11 | latest
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 | True
21 | True
22 | Resources.resx
23 |
24 |
25 |
26 |
27 |
28 | PublicResXFileCodeGenerator
29 | Resources.Designer.cs
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/FixClient/FixClient.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GaryHughes/FixClient/f10fb81b9f22326b1373d1d70bea0ace5ba8bcaa/FixClient/FixClient.ico
--------------------------------------------------------------------------------
/FixClient/FixClientPanel.Designer.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: FixClientPanel.Designer.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 |
13 | namespace FixClient
14 | {
15 | partial class FixClientPanel
16 | {
17 | ///
18 | /// Required designer variable.
19 | ///
20 | private System.ComponentModel.IContainer components = null;
21 |
22 | ///
23 | /// Clean up any resources being used.
24 | ///
25 | /// true if managed resources should be disposed; otherwise, false.
26 | protected override void Dispose(bool disposing)
27 | {
28 | if (disposing && (components != null))
29 | {
30 | components.Dispose();
31 | }
32 | base.Dispose(disposing);
33 | }
34 |
35 | #region Component Designer generated code
36 |
37 | ///
38 | /// Required method for Designer support - do not modify
39 | /// the contents of this method with the code editor.
40 | ///
41 | private void InitializeComponent()
42 | {
43 | components = new System.ComponentModel.Container();
44 | }
45 |
46 | #endregion
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/FixClient/FixClientPanel.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: FixClientPanel.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 | namespace FixClient;
13 |
14 | public partial class FixClientPanel : ToolStripContainer
15 | {
16 | ToolStripMenuItem? _menuStrip;
17 |
18 | public FixClientPanel()
19 | {
20 | InitializeComponent();
21 | TopToolStripPanel.BackColor = LookAndFeel.Color.ToolStrip;
22 | }
23 |
24 | public ToolStripMenuItem? ToolStripMenuItem
25 | {
26 | get
27 | {
28 | return _menuStrip;
29 | }
30 | }
31 |
32 | /*
33 | protected void SetToolStrip(ToolStrip value)
34 | {
35 | TopToolStripPanel.Join(value);
36 | }
37 | */
38 |
39 | protected void SetMenuStrip(ToolStripMenuItem value)
40 | {
41 | _menuStrip = value;
42 | }
43 |
44 | }
45 |
46 |
--------------------------------------------------------------------------------
/FixClient/GeneratorPanel.Designer.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: GeneratorPanel.Designer.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 |
13 | namespace FixClient
14 | {
15 | partial class GeneratorPanel
16 | {
17 | ///
18 | /// Required designer variable.
19 | ///
20 | private System.ComponentModel.IContainer components = null;
21 |
22 | ///
23 | /// Clean up any resources being used.
24 | ///
25 | /// true if managed resources should be disposed; otherwise, false.
26 | protected override void Dispose(bool disposing)
27 | {
28 | if (disposing && (components != null))
29 | {
30 | components.Dispose();
31 | }
32 | base.Dispose(disposing);
33 | }
34 |
35 | #region Component Designer generated code
36 |
37 | ///
38 | /// Required method for Designer support - do not modify
39 | /// the contents of this method with the code editor.
40 | ///
41 | private void InitializeComponent()
42 | {
43 | components = new System.ComponentModel.Container();
44 | }
45 |
46 | #endregion
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/FixClient/GlobalSuppressions.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: GlobalSuppressions.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 |
13 |
14 | // This file is used by Code Analysis to maintain SuppressMessage
15 | // attributes that are applied to this project.
16 | // Project-level suppressions either have no target or are given
17 | // a specific target and scoped to a namespace, type, member, etc.
18 |
19 | [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Redundancies in Code", "RECS0070:Redundant explicit argument name specification", Justification = "")]
20 | [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Common Practices and Code Improvements", "RECS0063:Warns when a culture-aware 'StartsWith' call is used by default.", Justification = "")]
21 | [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Potential Code Quality Issues", "RECS0133:Parameter name differs in base declaration", Justification = "")]
22 |
23 |
--------------------------------------------------------------------------------
/FixClient/GoaEditor.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: GoaEditor.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 | using System.ComponentModel;
13 |
14 | namespace FixClient;
15 |
16 | public partial class GoaEditor : Form
17 | {
18 | public GoaEditor()
19 | {
20 | InitializeComponent();
21 | goaTextBox.KeyPress += GoaTextBoxKeyPress;
22 | }
23 |
24 | void GoaTextBoxKeyPress(object? sender, KeyPressEventArgs e)
25 | {
26 | if (e.KeyChar == '\x02')
27 | {
28 | goaTextBox.Paste("\x02");
29 | e.Handled = true;
30 | }
31 | }
32 |
33 | [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
34 | public string Goa
35 | {
36 | get
37 | {
38 | string goa_value = goaTextBox.Text;
39 | if (ctrlBcheckbox.Checked)
40 | {
41 | goa_value = goa_value.Replace("^B", "\x02");
42 | }
43 | return goa_value;
44 | }
45 | set
46 | {
47 | goaTextBox.Text = value;
48 | }
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/FixClient/History/HistoryMessageDataGridView.Designer.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: HistoryMessageDataGridView.Designer.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 |
13 | namespace FixClient
14 | {
15 | sealed partial class HistoryMessageDataGridView
16 | {
17 | ///
18 | /// Required designer variable.
19 | ///
20 | private System.ComponentModel.IContainer components = null;
21 |
22 | ///
23 | /// Clean up any resources being used.
24 | ///
25 | /// true if managed resources should be disposed; otherwise, false.
26 | protected override void Dispose(bool disposing)
27 | {
28 | if (disposing && (components != null))
29 | {
30 | components.Dispose();
31 | }
32 | base.Dispose(disposing);
33 | }
34 |
35 | #region Windows Form Designer generated code
36 |
37 | ///
38 | /// Required method for Designer support - do not modify
39 | /// the contents of this method with the code editor.
40 | ///
41 | private void InitializeComponent()
42 | {
43 | this.components = new System.ComponentModel.Container();
44 | this.Text = "SessionMessageDataGridView";
45 | }
46 |
47 | #endregion
48 | }
49 | }
--------------------------------------------------------------------------------
/FixClient/History/HistoryMessageDataGridView.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: HistoryMessageDataGridView.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 | using System.Drawing;
13 |
14 | namespace FixClient;
15 |
16 | public sealed partial class HistoryMessageDataGridView : DataGridView
17 | {
18 | public HistoryMessageDataGridView()
19 | {
20 | InitializeComponent();
21 |
22 | EnableHeadersVisualStyles = false;
23 | ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
24 | ColumnHeadersDefaultCellStyle.Font = new Font("Arial", 8, FontStyle.Bold);
25 | ColumnHeadersDefaultCellStyle.BackColor = LookAndFeel.Color.GridColumnHeader;
26 | ColumnHeadersDefaultCellStyle.ForeColor = Color.WhiteSmoke;
27 | ColumnHeadersBorderStyle = DataGridViewHeaderBorderStyle.Single;
28 | ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
29 | ColumnHeadersHeight -= 3;
30 | BackgroundColor = LookAndFeel.Color.GridCellBackground;
31 | BorderStyle = BorderStyle.None;
32 | SelectionMode = DataGridViewSelectionMode.FullRowSelect;
33 | MultiSelect = false;
34 | RowHeadersVisible = false;
35 | DefaultCellStyle.WrapMode = DataGridViewTriState.False;
36 | RowTemplate.Resizable = DataGridViewTriState.False;
37 | GridColor = LookAndFeel.Color.Grid;
38 | AllowUserToAddRows = false;
39 | AllowUserToDeleteRows = false;
40 | DefaultCellStyle.Font = new Font("Arial", 8);
41 | ReadOnly = true;
42 | CellBorderStyle = DataGridViewCellBorderStyle.SingleHorizontal;
43 | DefaultCellStyle.BackColor = LookAndFeel.Color.GridCellBackground;
44 | DefaultCellStyle.Padding = new Padding(3, 0, 3, 0);
45 | DefaultCellStyle.SelectionBackColor = LookAndFeel.Color.GridCellSelectedBackground;
46 | DefaultCellStyle.SelectionForeColor = LookAndFeel.Color.GridCellSelectedForeground;
47 | DoubleBuffered = true;
48 | RowTemplate.Height -= 3;
49 | ShowCellToolTips = false;
50 | AutoGenerateColumns = false;
51 |
52 | DataGridViewColumn column = new DataGridViewTextBoxColumn
53 | {
54 | Name = MessageDataTable.ColumnSendingTime,
55 | AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells
56 | };
57 |
58 | Columns.Add(column);
59 |
60 | column = new DataGridViewTextBoxColumn
61 | {
62 | Name = MessageDataTable.ColumnMsgSeqNum,
63 | AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells,
64 | DefaultCellStyle = { Alignment = DataGridViewContentAlignment.MiddleRight }
65 | };
66 |
67 | Columns.Add(column);
68 |
69 | column = new DataGridViewImageColumn
70 | {
71 | Name = MessageDataTable.ColumnStatusImage,
72 | AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells,
73 | DefaultCellStyle = { NullValue = null },
74 | HeaderCell = new DataGridViewImageColumnHeaderCell
75 | {
76 | Image = Properties.Resources.MessageStatusInfo,
77 | Value = null
78 | },
79 | //DefaultHeaderCellType = { HeaderCell.GetType() }
80 | };
81 |
82 | Columns.Add(column);
83 |
84 | column = new DataGridViewTextBoxColumn
85 | {
86 | Name = MessageDataTable.ColumnMsgTypeDescription,
87 | AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
88 | };
89 |
90 | Columns.Add(column);
91 | }
92 | }
93 |
--------------------------------------------------------------------------------
/FixClient/History/HistoryPanel.Designer.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: HistoryPanel.Designer.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 |
13 | namespace FixClient
14 | {
15 | partial class HistoryPanel
16 | {
17 | ///
18 | /// Required designer variable.
19 | ///
20 | private System.ComponentModel.IContainer components = null;
21 |
22 | ///
23 | /// Clean up any resources being used.
24 | ///
25 | protected override void Dispose(bool disposing)
26 | {
27 | if (disposing && (components != null))
28 | {
29 | components.Dispose();
30 | }
31 | base.Dispose(disposing);
32 | }
33 |
34 | #region Windows Form Designer generated code
35 |
36 | ///
37 | /// Required method for Designer support - do not modify
38 | /// the contents of this method with the code editor.
39 | ///
40 | private void InitializeComponent()
41 | {
42 | this.components = new System.ComponentModel.Container();
43 | this.Text = "SessionMessagesPanel";
44 | }
45 |
46 | #endregion
47 | }
48 | }
--------------------------------------------------------------------------------
/FixClient/InspectorPanel.Designer.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: InspectorPanel.Designer.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 |
13 | namespace FixClient
14 | {
15 | partial class InspectorPanel
16 | {
17 | ///
18 | /// Required designer variable.
19 | ///
20 | private System.ComponentModel.IContainer components = null;
21 |
22 | ///
23 | /// Clean up any resources being used.
24 | ///
25 | /// true if managed resources should be disposed; otherwise, false.
26 | protected override void Dispose(bool disposing)
27 | {
28 | if (disposing && (components != null))
29 | {
30 | components.Dispose();
31 | }
32 | base.Dispose(disposing);
33 | }
34 |
35 | #region Component Designer generated code
36 |
37 | ///
38 | /// Required method for Designer support - do not modify
39 | /// the contents of this method with the code editor.
40 | ///
41 | private void InitializeComponent()
42 | {
43 | components = new System.ComponentModel.Container();
44 | }
45 |
46 | #endregion
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/FixClient/Log/LogMessageDataGridView.designer.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: LogMessageDataGridView.designer.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 |
13 | namespace FixClient
14 | {
15 | sealed partial class LogMessageDataGridView
16 | {
17 | ///
18 | /// Required designer variable.
19 | ///
20 | System.ComponentModel.IContainer components = null;
21 |
22 | ///
23 | /// Clean up any resources being used.
24 | ///
25 | /// true if managed resources should be disposed; otherwise, false.
26 | protected override void Dispose(bool disposing)
27 | {
28 | if (disposing && (components != null))
29 | {
30 | components.Dispose();
31 | }
32 | base.Dispose(disposing);
33 | }
34 |
35 | #region Component Designer generated code
36 |
37 | ///
38 | /// Required method for Designer support - do not modify
39 | /// the contents of this method with the code editor.
40 | ///
41 | void InitializeComponent()
42 | {
43 | components = new System.ComponentModel.Container();
44 | }
45 |
46 | #endregion
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/FixClient/Log/LogMessageDataTable.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: LogMessageDataTable.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 | using System.Data;
13 |
14 | namespace FixClient;
15 |
16 | enum LogLevel
17 | {
18 | Info,
19 | Warn,
20 | Error
21 | }
22 |
23 | class LogMessageDataTable : DataTable
24 | {
25 | public const string ColumnTimestamp = "Timestamp";
26 | public const string ColumnMessage = "Message";
27 | public const string ColumnLevel = "Level";
28 |
29 | public LogMessageDataTable(string name)
30 | : base(name)
31 | {
32 | Columns.Add(ColumnTimestamp, typeof(DateTime));
33 | Columns.Add(ColumnMessage);
34 | Columns.Add(ColumnLevel, typeof(LogLevel)).ColumnMapping = MappingType.Hidden;
35 | }
36 | }
37 |
38 |
--------------------------------------------------------------------------------
/FixClient/Log/LogPanel.Designer.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: LogPanel.Designer.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 |
13 | namespace FixClient
14 | {
15 | partial class LogPanel
16 | {
17 | ///
18 | /// Required designer variable.
19 | ///
20 | System.ComponentModel.IContainer components = null;
21 |
22 | ///
23 | /// Clean up any resources being used.
24 | ///
25 | /// true if managed resources should be disposed; otherwise, false.
26 | protected override void Dispose(bool disposing)
27 | {
28 | if (disposing && (components != null))
29 | {
30 | components.Dispose();
31 | }
32 | base.Dispose(disposing);
33 | }
34 |
35 | #region Component Designer generated code
36 |
37 | ///
38 | /// Required method for Designer support - do not modify
39 | /// the contents of this method with the code editor.
40 | ///
41 | void InitializeComponent()
42 | {
43 | components = new System.ComponentModel.Container();
44 | }
45 |
46 | #endregion
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/FixClient/LookAndFeel.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: LookAndFeel.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 | namespace FixClient;
13 |
14 | static class LookAndFeel
15 | {
16 | public static class Color
17 | {
18 | public static readonly System.Drawing.Color ToolStrip = System.Drawing.Color.FromArgb(255, 232, 232, 236);
19 |
20 | public static readonly System.Drawing.Color FormBackLight = System.Drawing.Color.FromArgb(255, 218, 224, 231);
21 | public static readonly System.Drawing.Color FormBackDark = System.Drawing.Color.FromArgb(255, 193, 210, 231);
22 |
23 | public static readonly System.Drawing.Color Bid = System.Drawing.Color.FromArgb(255, 0, 70, 204);
24 | public static readonly System.Drawing.Color Ask = System.Drawing.Color.FromArgb(255, 250, 50, 50);
25 | public static readonly System.Drawing.Color Unknown = System.Drawing.Color.SaddleBrown;
26 |
27 | public static readonly System.Drawing.Color New = System.Drawing.Color.FromArgb(255, 0, 128, 0);
28 | public static readonly System.Drawing.Color Rejected = System.Drawing.Color.FromArgb(255, 250, 50, 50);
29 | public static readonly System.Drawing.Color Pending = System.Drawing.Color.FromArgb(255, 254, 90, 27);
30 |
31 | public static readonly System.Drawing.Color GridColumnHeader = System.Drawing.Color.FromArgb(255, 0, 122, 204);
32 | public static readonly System.Drawing.Color GridCellBackground = System.Drawing.Color.FromArgb(255, 250, 250, 250);
33 | public static readonly System.Drawing.Color GridCellForeground = System.Drawing.Color.FromArgb(255, 37, 37, 37);
34 | public static readonly System.Drawing.Color Grid = System.Drawing.Color.FromArgb(255, 239, 239, 242);
35 | public static readonly System.Drawing.Color GridCellSelectedBackground = System.Drawing.Color.FromArgb(255, 0, 122, 204);
36 | public static readonly System.Drawing.Color GridCellSelectedForeground = System.Drawing.Color.WhiteSmoke;
37 |
38 | public static readonly System.Drawing.Color Custom = System.Drawing.Color.Brown;
39 | public static readonly System.Drawing.Color Incoming = System.Drawing.Color.FromArgb(255, 0, 128, 0);
40 | public static readonly System.Drawing.Color Outgoing = System.Drawing.Color.FromArgb(255, 0, 70, 204);
41 |
42 | public static readonly System.Drawing.Color LogWarningBackColor = System.Drawing.Color.FromArgb(255, 254, 90, 27);
43 | public static readonly System.Drawing.Color LogWarningForeColor = System.Drawing.Color.White;
44 |
45 | public static readonly System.Drawing.Color LogErrorBackColor = System.Drawing.Color.Red;
46 | public static readonly System.Drawing.Color LogErrorForeColor = System.Drawing.Color.White;
47 | }
48 | }
49 |
50 |
--------------------------------------------------------------------------------
/FixClient/MainForm.Designer.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: MainForm.Designer.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 |
13 | namespace FixClient
14 | {
15 | partial class MainForm
16 | {
17 | ///
18 | /// Required designer variable.
19 | ///
20 | private System.ComponentModel.IContainer components = null;
21 |
22 | ///
23 | /// Clean up any resources being used.
24 | ///
25 | protected override void Dispose(bool disposing)
26 | {
27 | if (disposing && (components != null))
28 | {
29 | components.Dispose();
30 | }
31 | base.Dispose(disposing);
32 | }
33 |
34 | #region Windows Form Designer generated code
35 |
36 | ///
37 | /// Required method for Designer support - do not modify
38 | /// the contents of this method with the code editor.
39 | ///
40 | private void InitializeComponent()
41 | {
42 | this.SuspendLayout();
43 | //
44 | // MainForm
45 | //
46 | this.Name = "MainForm";
47 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
48 | this.ResumeLayout(false);
49 |
50 | }
51 |
52 | #endregion
53 | }
54 | }
55 |
56 |
--------------------------------------------------------------------------------
/FixClient/MessageFieldDataGridView.Designer.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: MessageFieldDataGridView.Designer.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 |
13 | namespace FixClient
14 | {
15 | partial class MessageFieldDataGridView
16 | {
17 | ///
18 | /// Required designer variable.
19 | ///
20 | private System.ComponentModel.IContainer components = null;
21 |
22 | ///
23 | /// Clean up any resources being used.
24 | ///
25 | /// true if managed resources should be disposed; otherwise, false.
26 | protected override void Dispose(bool disposing)
27 | {
28 | if (disposing && (components != null))
29 | {
30 | components.Dispose();
31 | }
32 | base.Dispose(disposing);
33 | }
34 |
35 | #region Component Designer generated code
36 |
37 | ///
38 | /// Required method for Designer support - do not modify
39 | /// the contents of this method with the code editor.
40 | ///
41 | private void InitializeComponent()
42 | {
43 | components = new System.ComponentModel.Container();
44 | }
45 |
46 | #endregion
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/FixClient/MessageOptionsPanel.Designer.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: MessageOptionsPanel.Designer.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 |
13 | namespace FixClient
14 | {
15 | partial class MessageOptionsPanel
16 | {
17 | ///
18 | /// Required designer variable.
19 | ///
20 | private System.ComponentModel.IContainer components = null;
21 |
22 | ///
23 | /// Clean up any resources being used.
24 | ///
25 | /// true if managed resources should be disposed; otherwise, false.
26 | protected override void Dispose(bool disposing)
27 | {
28 | if (disposing && (components != null))
29 | {
30 | components.Dispose();
31 | }
32 | base.Dispose(disposing);
33 | }
34 |
35 | #region Component Designer generated code
36 |
37 | ///
38 | /// Required method for Designer support - do not modify
39 | /// the contents of this method with the code editor.
40 | ///
41 | private void InitializeComponent()
42 | {
43 | components = new System.ComponentModel.Container();
44 | }
45 |
46 | #endregion
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/FixClient/MessageTypeDataGridView.Designer.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: MessageTypeDataGridView.Designer.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 |
13 | namespace FixClient
14 | {
15 | partial class MessageTypeDataGridView
16 | {
17 | ///
18 | /// Required designer variable.
19 | ///
20 | private System.ComponentModel.IContainer components = null;
21 |
22 | ///
23 | /// Clean up any resources being used.
24 | ///
25 | /// true if managed resources should be disposed; otherwise, false.
26 | protected override void Dispose(bool disposing)
27 | {
28 | if (disposing && (components != null))
29 | {
30 | components.Dispose();
31 | }
32 | base.Dispose(disposing);
33 | }
34 |
35 | #region Component Designer generated code
36 |
37 | ///
38 | /// Required method for Designer support - do not modify
39 | /// the contents of this method with the code editor.
40 | ///
41 | private void InitializeComponent()
42 | {
43 | components = new System.ComponentModel.Container();
44 | }
45 |
46 | #endregion
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/FixClient/MessageTypeDataGridView.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: MessageTypeDataGridView.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 | using System.Drawing;
13 |
14 | namespace FixClient;
15 |
16 | public partial class MessageTypeDataGridView : DataGridView
17 | {
18 | public MessageTypeDataGridView()
19 | {
20 | InitializeComponent();
21 |
22 | EnableHeadersVisualStyles = false;
23 | ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
24 | ColumnHeadersDefaultCellStyle.Font = new Font("Arial", 8, FontStyle.Bold);
25 | ColumnHeadersDefaultCellStyle.BackColor = LookAndFeel.Color.GridColumnHeader;
26 | ColumnHeadersDefaultCellStyle.ForeColor = Color.WhiteSmoke;
27 | ColumnHeadersBorderStyle = DataGridViewHeaderBorderStyle.Single;
28 | ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
29 | ColumnHeadersHeight -= 3;
30 | BackgroundColor = LookAndFeel.Color.GridCellBackground;
31 | BorderStyle = BorderStyle.None;
32 | CellBorderStyle = DataGridViewCellBorderStyle.SingleHorizontal;
33 | SelectionMode = DataGridViewSelectionMode.FullRowSelect;
34 | MultiSelect = false;
35 | RowHeadersVisible = false;
36 | DefaultCellStyle.WrapMode = DataGridViewTriState.False;
37 | GridColor = LookAndFeel.Color.Grid;
38 | RowTemplate.Resizable = DataGridViewTriState.False;
39 | AllowUserToAddRows = false;
40 | AllowUserToDeleteRows = false;
41 | RowTemplate.Height -= 3;
42 | DefaultCellStyle.BackColor = LookAndFeel.Color.GridCellBackground;
43 | DefaultCellStyle.ForeColor = LookAndFeel.Color.GridCellForeground;
44 | DefaultCellStyle.Padding = new Padding(3, 0, 3, 0);
45 | DefaultCellStyle.SelectionBackColor = LookAndFeel.Color.GridCellSelectedBackground;
46 | DefaultCellStyle.SelectionForeColor = LookAndFeel.Color.GridCellSelectedForeground;
47 | ReadOnly = true;
48 | ShowCellToolTips = false;
49 | }
50 |
51 | protected override void OnColumnHeaderMouseClick(DataGridViewCellMouseEventArgs e)
52 | {
53 | if (ModifierKeys == Keys.Control)
54 | {
55 | if (DataSource is BindingSource source)
56 | {
57 | source.Sort = string.Empty;
58 | Refresh();
59 | return;
60 | }
61 | }
62 |
63 | base.OnColumnHeaderMouseClick(e);
64 | }
65 |
66 | protected override void OnColumnAdded(DataGridViewColumnEventArgs e)
67 | {
68 | base.OnColumnAdded(e);
69 |
70 | DataGridViewColumn column = e.Column;
71 |
72 | switch (column.Name)
73 | {
74 | case MessageTypeDataTable.ColumnMsgType:
75 | column.AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells;
76 | break;
77 |
78 | case MessageTypeDataTable.ColumnMsgTypeDescription:
79 | column.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
80 | break;
81 | }
82 | }
83 | }
84 |
85 |
--------------------------------------------------------------------------------
/FixClient/MessagesPanel.Designer.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: MessagesPanel.Designer.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 |
13 | namespace FixClient
14 | {
15 | partial class MessagesPanel
16 | {
17 | ///
18 | /// Required designer variable.
19 | ///
20 | private System.ComponentModel.IContainer components = null;
21 |
22 | ///
23 | /// Clean up any resources being used.
24 | ///
25 | protected override void Dispose(bool disposing)
26 | {
27 | if (disposing && (components != null))
28 | {
29 | components.Dispose();
30 | }
31 | base.Dispose(disposing);
32 | }
33 |
34 | #region Windows Form Designer generated code
35 |
36 | ///
37 | /// Required method for Designer support - do not modify
38 | /// the contents of this method with the code editor.
39 | ///
40 | private void InitializeComponent()
41 | {
42 | this.components = new System.ComponentModel.Container();
43 | this.Text = "MessageDefaultsPanel";
44 | }
45 |
46 | #endregion
47 | }
48 | }
--------------------------------------------------------------------------------
/FixClient/NativeTabControl.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: NativeTabControl.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 | using System.Runtime.InteropServices;
13 |
14 | namespace FixClient;
15 |
16 | class NativeTabControl : NativeWindow
17 | {
18 | public NativeTabControl(Padding adjustPadding)
19 | {
20 | AdjustPadding = adjustPadding;
21 | }
22 |
23 | protected override void WndProc(ref Message m)
24 | {
25 | if ((m.Msg == TCM_ADJUSTRECT))
26 | {
27 | if (m.GetLParam(typeof(RECT)) is RECT rc)
28 | {
29 | //Adjust these values to suit, dependant upon Appearance
30 | rc.Left += AdjustPadding.Left;
31 | rc.Right += AdjustPadding.Right;
32 | rc.Top += AdjustPadding.Top;
33 | rc.Bottom += AdjustPadding.Bottom;
34 | Marshal.StructureToPtr(rc, m.LParam, true);
35 | }
36 | }
37 | base.WndProc(ref m);
38 | }
39 |
40 | Padding AdjustPadding { get; set; }
41 | const int TCM_FIRST = 0x1300;
42 | const int TCM_ADJUSTRECT = (TCM_FIRST + 40);
43 | struct RECT
44 | {
45 | public int Left;
46 | public int Top;
47 | public int Right;
48 | public int Bottom;
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/FixClient/Orders/OrderDataGridView.Designer.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: OrderDataGridView.Designer.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 |
13 | namespace FixClient
14 | {
15 | sealed partial class OrderDataGridView
16 | {
17 | ///
18 | /// Required designer variable.
19 | ///
20 | private System.ComponentModel.IContainer components = null;
21 |
22 | ///
23 | /// Clean up any resources being used.
24 | ///
25 | /// true if managed resources should be disposed; otherwise, false.
26 | protected override void Dispose(bool disposing)
27 | {
28 | if (disposing && (components != null))
29 | {
30 | components.Dispose();
31 | }
32 | base.Dispose(disposing);
33 | }
34 |
35 | #region Windows Form Designer generated code
36 |
37 | ///
38 | /// Required method for Designer support - do not modify
39 | /// the contents of this method with the code editor.
40 | ///
41 | private void InitializeComponent()
42 | {
43 | this.components = new System.ComponentModel.Container();
44 | this.Text = "OrderDataGridView";
45 | }
46 |
47 | #endregion
48 | }
49 | }
--------------------------------------------------------------------------------
/FixClient/Orders/OrdersPanel.Designer.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: OrdersPanel.Designer.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 |
13 | namespace FixClient
14 | {
15 | partial class OrdersPanel
16 | {
17 | ///
18 | /// Required designer variable.
19 | ///
20 | private System.ComponentModel.IContainer components = null;
21 |
22 | ///
23 | /// Clean up any resources being used.
24 | ///
25 | protected override void Dispose(bool disposing)
26 | {
27 | if (disposing && (components != null))
28 | {
29 | components.Dispose();
30 | }
31 | base.Dispose(disposing);
32 | }
33 |
34 | #region Windows Form Designer generated code
35 |
36 | ///
37 | /// Required method for Designer support - do not modify
38 | /// the contents of this method with the code editor.
39 | ///
40 | private void InitializeComponent()
41 | {
42 | this.components = new System.ComponentModel.Container();
43 | this.Text = "OrderPanel";
44 | }
45 |
46 | #endregion
47 | }
48 | }
--------------------------------------------------------------------------------
/FixClient/Parser/ParserPanel.Designer.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: ParserPanel.Designer.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 |
13 | namespace FixClient
14 | {
15 | partial class ParserPanel
16 | {
17 | ///
18 | /// Required designer variable.
19 | ///
20 | private System.ComponentModel.IContainer components = null;
21 |
22 | ///
23 | /// Clean up any resources being used.
24 | ///
25 | /// true if managed resources should be disposed; otherwise, false.
26 | protected override void Dispose(bool disposing)
27 | {
28 | if (disposing && (components != null))
29 | {
30 | components.Dispose();
31 | }
32 | base.Dispose(disposing);
33 | }
34 |
35 | #region Windows Form Designer generated code
36 |
37 | ///
38 | /// Required method for Designer support - do not modify
39 | /// the contents of this method with the code editor.
40 | ///
41 | private void InitializeComponent()
42 | {
43 | this.components = new System.ComponentModel.Container();
44 | this.Text = "TestPanel";
45 | }
46 |
47 | #endregion
48 | }
49 | }
--------------------------------------------------------------------------------
/FixClient/PasteMessageForm.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: PasteMessageForm.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 | using System.ComponentModel;
13 |
14 | namespace FixClient;
15 |
16 | public partial class PasteMessageForm : Form
17 | {
18 | public PasteMessageForm()
19 | {
20 | InitializeComponent();
21 | }
22 |
23 | [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
24 | public bool FilterEmptyFields
25 | {
26 | get { return filterEmptyFieldsCheckBox.Checked; }
27 | set { filterEmptyFieldsCheckBox.Checked = value; }
28 | }
29 |
30 | [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
31 | public bool DefineUnknownAsCustom
32 | {
33 | get { return defineUnknownAsCustomCheckBox.Checked; }
34 | set { defineUnknownAsCustomCheckBox.Checked = value; }
35 | }
36 |
37 | [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
38 | public bool ResetExistingMessage
39 | {
40 | get { return resetMessageCheckBox.Checked; }
41 | set { resetMessageCheckBox.Checked = value; }
42 | }
43 | }
44 |
45 |
--------------------------------------------------------------------------------
/FixClient/PasteMessageForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 | text/microsoft-resx
50 |
51 |
52 | 2.0
53 |
54 |
55 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
56 |
57 |
58 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
59 |
60 |
--------------------------------------------------------------------------------
/FixClient/Program.cs:
--------------------------------------------------------------------------------
1 | global using System;
2 | global using System.Windows.Forms;
3 |
4 | namespace FixClient;
5 |
6 | static class Program
7 | {
8 | [STAThread]
9 | static void Main()
10 | {
11 | try
12 | {
13 | ApplicationConfiguration.Initialize();
14 | Application.Run(new MainForm());
15 | }
16 | catch (Exception ex)
17 | {
18 | MessageBox.Show(ex.Message);
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/FixClient/Properties/PublishProfiles/FolderProfile.pubxml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 | Release
8 | Any CPU
9 | bin\Release\net5.0-windows\win-x64\publish\
10 | FileSystem
11 | net6.0-windows
12 | win-x64
13 | true
14 | False
15 |
16 |
--------------------------------------------------------------------------------
/FixClient/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace FixClient.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.0.3.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/FixClient/Properties/Settings.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: Settings.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 |
13 | //------------------------------------------------------------------------------
14 | //
15 | // This code was generated by a tool.
16 | // Runtime Version:2.0.40607.42
17 | //
18 | // Changes to this file may cause incorrect behavior and will be lost if
19 | // the code is regenerated.
20 | //
21 | //------------------------------------------------------------------------------
22 |
23 | namespace FixClient.Properties
24 | {
25 | partial class Settings : System.Configuration.ApplicationSettingsBase
26 | {
27 | private static Settings m_Value;
28 |
29 | private static object m_SyncObject = new object();
30 |
31 | public static Settings Value
32 | {
33 | get
34 | {
35 | if ((Settings.m_Value == null))
36 | {
37 | System.Threading.Monitor.Enter(Settings.m_SyncObject);
38 | if ((Settings.m_Value == null))
39 | {
40 | try
41 | {
42 | Settings.m_Value = new Settings();
43 | }
44 | finally
45 | {
46 | System.Threading.Monitor.Exit(Settings.m_SyncObject);
47 | }
48 | }
49 | }
50 | return Settings.m_Value;
51 | }
52 | }
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/FixClient/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/FixClient/ResetForm.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: ResetForm.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 | using System.Drawing;
13 |
14 | namespace FixClient;
15 |
16 | public partial class ResetForm : Form
17 | {
18 | public ResetForm()
19 | {
20 | InitializeComponent();
21 | iconPictureBox.Image = SystemIcons.Question.ToBitmap();
22 | }
23 |
24 | public Fix.OrderBook.Retain Retain
25 | {
26 | get
27 | {
28 | Fix.OrderBook.Retain retain = Fix.OrderBook.Retain.None;
29 |
30 | if (retainActiveGtcOrdersCheckBox.Checked)
31 | {
32 | retain |= Fix.OrderBook.Retain.ActiveGTC;
33 | }
34 |
35 | if (retainActiveGtdOrdersCheckBox.Checked)
36 | {
37 | retain |= Fix.OrderBook.Retain.ActiveGTD;
38 | }
39 |
40 | return retain;
41 | }
42 | }
43 |
44 | public bool ResetGeneratedIds
45 | {
46 | get { return resetGeneratedIdsCheckBox.Checked; }
47 | }
48 | }
49 |
50 |
--------------------------------------------------------------------------------
/FixClient/Resources/AddCategoryFields.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GaryHughes/FixClient/f10fb81b9f22326b1373d1d70bea0ace5ba8bcaa/FixClient/Resources/AddCategoryFields.bmp
--------------------------------------------------------------------------------
/FixClient/Resources/Back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GaryHughes/FixClient/f10fb81b9f22326b1373d1d70bea0ace5ba8bcaa/FixClient/Resources/Back.png
--------------------------------------------------------------------------------
/FixClient/Resources/CheckAll.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GaryHughes/FixClient/f10fb81b9f22326b1373d1d70bea0ace5ba8bcaa/FixClient/Resources/CheckAll.bmp
--------------------------------------------------------------------------------
/FixClient/Resources/Clear.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GaryHughes/FixClient/f10fb81b9f22326b1373d1d70bea0ace5ba8bcaa/FixClient/Resources/Clear.bmp
--------------------------------------------------------------------------------
/FixClient/Resources/Customise.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GaryHughes/FixClient/f10fb81b9f22326b1373d1d70bea0ace5ba8bcaa/FixClient/Resources/Customise.bmp
--------------------------------------------------------------------------------
/FixClient/Resources/DeleteCustomField.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GaryHughes/FixClient/f10fb81b9f22326b1373d1d70bea0ace5ba8bcaa/FixClient/Resources/DeleteCustomField.bmp
--------------------------------------------------------------------------------
/FixClient/Resources/Dictionary.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GaryHughes/FixClient/f10fb81b9f22326b1373d1d70bea0ace5ba8bcaa/FixClient/Resources/Dictionary.bmp
--------------------------------------------------------------------------------
/FixClient/Resources/EditCustomField.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GaryHughes/FixClient/f10fb81b9f22326b1373d1d70bea0ace5ba8bcaa/FixClient/Resources/EditCustomField.bmp
--------------------------------------------------------------------------------
/FixClient/Resources/Export.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GaryHughes/FixClient/f10fb81b9f22326b1373d1d70bea0ace5ba8bcaa/FixClient/Resources/Export.bmp
--------------------------------------------------------------------------------
/FixClient/Resources/Filter.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GaryHughes/FixClient/f10fb81b9f22326b1373d1d70bea0ace5ba8bcaa/FixClient/Resources/Filter.bmp
--------------------------------------------------------------------------------
/FixClient/Resources/Filters.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GaryHughes/FixClient/f10fb81b9f22326b1373d1d70bea0ace5ba8bcaa/FixClient/Resources/Filters.bmp
--------------------------------------------------------------------------------
/FixClient/Resources/FixClient.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GaryHughes/FixClient/f10fb81b9f22326b1373d1d70bea0ace5ba8bcaa/FixClient/Resources/FixClient.ico
--------------------------------------------------------------------------------
/FixClient/Resources/Forward.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GaryHughes/FixClient/f10fb81b9f22326b1373d1d70bea0ace5ba8bcaa/FixClient/Resources/Forward.png
--------------------------------------------------------------------------------
/FixClient/Resources/Function.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GaryHughes/FixClient/f10fb81b9f22326b1373d1d70bea0ace5ba8bcaa/FixClient/Resources/Function.bmp
--------------------------------------------------------------------------------
/FixClient/Resources/GOA.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GaryHughes/FixClient/f10fb81b9f22326b1373d1d70bea0ace5ba8bcaa/FixClient/Resources/GOA.bmp
--------------------------------------------------------------------------------
/FixClient/Resources/History.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GaryHughes/FixClient/f10fb81b9f22326b1373d1d70bea0ace5ba8bcaa/FixClient/Resources/History.bmp
--------------------------------------------------------------------------------
/FixClient/Resources/Log.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GaryHughes/FixClient/f10fb81b9f22326b1373d1d70bea0ace5ba8bcaa/FixClient/Resources/Log.bmp
--------------------------------------------------------------------------------
/FixClient/Resources/MessageStatusError.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GaryHughes/FixClient/f10fb81b9f22326b1373d1d70bea0ace5ba8bcaa/FixClient/Resources/MessageStatusError.png
--------------------------------------------------------------------------------
/FixClient/Resources/MessageStatusInfo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GaryHughes/FixClient/f10fb81b9f22326b1373d1d70bea0ace5ba8bcaa/FixClient/Resources/MessageStatusInfo.png
--------------------------------------------------------------------------------
/FixClient/Resources/MessageStatusNone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GaryHughes/FixClient/f10fb81b9f22326b1373d1d70bea0ace5ba8bcaa/FixClient/Resources/MessageStatusNone.png
--------------------------------------------------------------------------------
/FixClient/Resources/MessageStatusWarn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GaryHughes/FixClient/f10fb81b9f22326b1373d1d70bea0ace5ba8bcaa/FixClient/Resources/MessageStatusWarn.png
--------------------------------------------------------------------------------
/FixClient/Resources/Messages.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GaryHughes/FixClient/f10fb81b9f22326b1373d1d70bea0ace5ba8bcaa/FixClient/Resources/Messages.bmp
--------------------------------------------------------------------------------
/FixClient/Resources/Minimise.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GaryHughes/FixClient/f10fb81b9f22326b1373d1d70bea0ace5ba8bcaa/FixClient/Resources/Minimise.bmp
--------------------------------------------------------------------------------
/FixClient/Resources/New.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GaryHughes/FixClient/f10fb81b9f22326b1373d1d70bea0ace5ba8bcaa/FixClient/Resources/New.bmp
--------------------------------------------------------------------------------
/FixClient/Resources/NewCustomField.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GaryHughes/FixClient/f10fb81b9f22326b1373d1d70bea0ace5ba8bcaa/FixClient/Resources/NewCustomField.bmp
--------------------------------------------------------------------------------
/FixClient/Resources/Open.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GaryHughes/FixClient/f10fb81b9f22326b1373d1d70bea0ace5ba8bcaa/FixClient/Resources/Open.bmp
--------------------------------------------------------------------------------
/FixClient/Resources/Options.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GaryHughes/FixClient/f10fb81b9f22326b1373d1d70bea0ace5ba8bcaa/FixClient/Resources/Options.bmp
--------------------------------------------------------------------------------
/FixClient/Resources/Orders.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GaryHughes/FixClient/f10fb81b9f22326b1373d1d70bea0ace5ba8bcaa/FixClient/Resources/Orders.bmp
--------------------------------------------------------------------------------
/FixClient/Resources/Parser.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GaryHughes/FixClient/f10fb81b9f22326b1373d1d70bea0ace5ba8bcaa/FixClient/Resources/Parser.bmp
--------------------------------------------------------------------------------
/FixClient/Resources/Paste.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GaryHughes/FixClient/f10fb81b9f22326b1373d1d70bea0ace5ba8bcaa/FixClient/Resources/Paste.bmp
--------------------------------------------------------------------------------
/FixClient/Resources/Pause.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GaryHughes/FixClient/f10fb81b9f22326b1373d1d70bea0ace5ba8bcaa/FixClient/Resources/Pause.bmp
--------------------------------------------------------------------------------
/FixClient/Resources/RemoveFields.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GaryHughes/FixClient/f10fb81b9f22326b1373d1d70bea0ace5ba8bcaa/FixClient/Resources/RemoveFields.bmp
--------------------------------------------------------------------------------
/FixClient/Resources/RemoveFilter.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GaryHughes/FixClient/f10fb81b9f22326b1373d1d70bea0ace5ba8bcaa/FixClient/Resources/RemoveFilter.bmp
--------------------------------------------------------------------------------
/FixClient/Resources/RepeatFields.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GaryHughes/FixClient/f10fb81b9f22326b1373d1d70bea0ace5ba8bcaa/FixClient/Resources/RepeatFields.bmp
--------------------------------------------------------------------------------
/FixClient/Resources/Reset.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GaryHughes/FixClient/f10fb81b9f22326b1373d1d70bea0ace5ba8bcaa/FixClient/Resources/Reset.bmp
--------------------------------------------------------------------------------
/FixClient/Resources/ResetFields.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GaryHughes/FixClient/f10fb81b9f22326b1373d1d70bea0ace5ba8bcaa/FixClient/Resources/ResetFields.bmp
--------------------------------------------------------------------------------
/FixClient/Resources/Restore.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GaryHughes/FixClient/f10fb81b9f22326b1373d1d70bea0ace5ba8bcaa/FixClient/Resources/Restore.bmp
--------------------------------------------------------------------------------
/FixClient/Resources/Send.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GaryHughes/FixClient/f10fb81b9f22326b1373d1d70bea0ace5ba8bcaa/FixClient/Resources/Send.png
--------------------------------------------------------------------------------
/FixClient/Resources/Spy.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GaryHughes/FixClient/f10fb81b9f22326b1373d1d70bea0ace5ba8bcaa/FixClient/Resources/Spy.bmp
--------------------------------------------------------------------------------
/FixClient/Resources/Start.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GaryHughes/FixClient/f10fb81b9f22326b1373d1d70bea0ace5ba8bcaa/FixClient/Resources/Start.bmp
--------------------------------------------------------------------------------
/FixClient/Resources/Stop.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GaryHughes/FixClient/f10fb81b9f22326b1373d1d70bea0ace5ba8bcaa/FixClient/Resources/Stop.bmp
--------------------------------------------------------------------------------
/FixClient/Resources/Test.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GaryHughes/FixClient/f10fb81b9f22326b1373d1d70bea0ace5ba8bcaa/FixClient/Resources/Test.bmp
--------------------------------------------------------------------------------
/FixClient/Resources/Trades.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GaryHughes/FixClient/f10fb81b9f22326b1373d1d70bea0ace5ba8bcaa/FixClient/Resources/Trades.bmp
--------------------------------------------------------------------------------
/FixClient/Resources/UnCheckAll.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GaryHughes/FixClient/f10fb81b9f22326b1373d1d70bea0ace5ba8bcaa/FixClient/Resources/UnCheckAll.bmp
--------------------------------------------------------------------------------
/FixClient/SearchTextBox/ButtonTextBox.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: ButtonTextBox.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 | using System.Drawing;
13 |
14 | namespace FixClient;
15 |
16 | public class ButtonTextBox : TextBox
17 | {
18 | readonly Button _button;
19 |
20 | public event EventHandler ButtonClick { add { _button.Click += value; } remove { _button.Click -= value; } }
21 |
22 | public ButtonTextBox()
23 | {
24 | _button = new Button
25 | {
26 | Cursor = Cursors.Default
27 | };
28 | _button.SizeChanged += (o, e) => OnResize(e);
29 | Controls.Add(_button);
30 | }
31 |
32 | public Button Button
33 | {
34 | get { return _button; }
35 | }
36 |
37 | protected override void OnResize(EventArgs e)
38 | {
39 | base.OnResize(e);
40 | _button.Size = new Size(_button.Width, ClientSize.Height + 2);
41 | _button.Location = new Point(ClientSize.Width - _button.Width, -1);
42 | // Send EM_SETMARGINS to prevent text from disappearing underneath the button
43 | SendMessage(Handle, 0xd3, (IntPtr)2, (IntPtr)(_button.Width << 16));
44 | }
45 |
46 | [System.Runtime.InteropServices.DllImport("user32.dll")]
47 | static extern IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr wp, IntPtr lp);
48 | }
49 |
50 |
--------------------------------------------------------------------------------
/FixClient/SearchTextBox/CueTextBox.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: CueTextBox.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 | using System.ComponentModel;
13 | using System.Runtime.InteropServices;
14 |
15 | namespace FixClient;
16 |
17 | class CueTextBox : ButtonTextBox
18 | {
19 | static class NativeMethods
20 | {
21 | const uint ECM_FIRST = 0x1500;
22 | internal const uint EM_SETCUEBANNER = ECM_FIRST + 1;
23 |
24 | [DllImport("user32.dll", EntryPoint = "SendMessageW")]
25 | public static extern IntPtr SendMessageW(IntPtr hWnd, UInt32 Msg, IntPtr wParam, [MarshalAs(UnmanagedType.LPWStr)] string lParam);
26 | }
27 |
28 | string? _cue;
29 |
30 | [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
31 | public string? Cue
32 | {
33 | get
34 | {
35 | return _cue;
36 | }
37 | set
38 | {
39 | _cue = value;
40 | UpdateCue();
41 | }
42 | }
43 |
44 | void UpdateCue()
45 | {
46 | if (IsHandleCreated && _cue != null)
47 | {
48 | NativeMethods.SendMessageW(Handle, NativeMethods.EM_SETCUEBANNER, (IntPtr)1, _cue);
49 | }
50 | }
51 |
52 | protected override void OnHandleCreated(EventArgs e)
53 | {
54 | base.OnHandleCreated(e);
55 | UpdateCue();
56 | }
57 | }
58 |
59 |
--------------------------------------------------------------------------------
/FixClient/SearchTextBox/SearchTextBox.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: SearchTextBox.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 | namespace FixClient;
13 |
14 | class SearchTextBox : CueTextBox
15 | {
16 | public SearchTextBox()
17 | {
18 | Cue = "Search...";
19 | BackColor = LookAndFeel.Color.GridCellBackground;
20 | Button.FlatStyle = FlatStyle.Flat;
21 | Button.FlatAppearance.MouseOverBackColor = BackColor;
22 | Button.FlatAppearance.MouseDownBackColor = BackColor;
23 | Button.FlatAppearance.BorderSize = 0;
24 | Button.ForeColor = System.Drawing.Color.Gray;
25 | Button.Text = "X";
26 | Button.Size = new System.Drawing.Size(16, 16);
27 | Button.Click += (sender, ev) =>
28 | {
29 | if (string.IsNullOrEmpty(Text))
30 | {
31 | OnTextChanged(new EventArgs());
32 | }
33 | else
34 | {
35 | Text = null;
36 | }
37 | };
38 | }
39 | }
40 |
41 |
--------------------------------------------------------------------------------
/FixClient/Session.Net.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: Session.Net.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 | using System.Net;
13 |
14 | namespace FixClient;
15 |
16 | public partial class Session
17 | {
18 | public IPEndPoint EndPoint()
19 | {
20 | if (Behaviour == Fix.Behaviour.Initiator)
21 | {
22 | return new IPEndPoint(Fix.Network.GetAddress(Host), Port);
23 | }
24 |
25 | return new IPEndPoint(0, Port);
26 | }
27 |
28 | public IPEndPoint BindEndPoint()
29 | {
30 | IPAddress? address = Fix.Network.GetLocalAddress(BindHost);
31 | IPEndPoint endPoint = address != null ? new IPEndPoint(address, BindPort) : new IPEndPoint(0, BindPort);
32 | return endPoint;
33 | }
34 | }
35 |
36 |
--------------------------------------------------------------------------------
/FixClient/SessionForm.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: SessionForm.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 | using System.ComponentModel;
13 |
14 | namespace FixClient;
15 |
16 | partial class SessionForm : Form
17 | {
18 | readonly CustomPropertyGrid _propertyGrid;
19 | Session? _session;
20 |
21 | public SessionForm()
22 | {
23 | InitializeComponent();
24 | _propertyGrid = new CustomPropertyGrid
25 | {
26 | Dock = DockStyle.Fill,
27 | ToolbarVisible = false,
28 | HelpVisible = false,
29 | PropertySort = PropertySort.Categorized
30 | };
31 | _propertyGrid.PropertyValueChanged += (o, args) =>
32 | {
33 | Session?.UpdateReadonlyAttributes();
34 | _propertyGrid.Refresh();
35 | };
36 | _gridPlaceHolder.Controls.Add(_propertyGrid);
37 | }
38 |
39 | [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
40 | public bool Readonly
41 | {
42 | get { return _propertyGrid.Enabled; }
43 | set
44 | {
45 | _propertyGrid.Enabled = !value;
46 | OK.Enabled = !value;
47 | }
48 | }
49 |
50 | [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
51 | public Session? Session
52 | {
53 | get { return _session; }
54 | set
55 | {
56 | _session = value;
57 | _propertyGrid.SelectedObject = value;
58 | }
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/FixClient/StringExtensions.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: StringExtensions.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 | using System.Text.RegularExpressions;
13 |
14 | namespace FixClient;
15 |
16 | static class StringExtensions
17 | {
18 | public static string SplitInParts(this string stringToSplit, int maximumLineLength)
19 | {
20 | return Regex.Replace(stringToSplit, @"(.{1," + maximumLineLength + @"})(?:\s|$)", "$1\n");
21 | }
22 | }
23 |
24 |
--------------------------------------------------------------------------------
/FixClient/TcpSocketListener.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: TcpSocketListener.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 | using System.Net;
13 | using System.Net.Sockets;
14 |
15 | namespace FixClient;
16 |
17 | class TcpSocketListener : TcpListener
18 | {
19 | public TcpSocketListener(IPEndPoint endPoint)
20 | : base(endPoint)
21 | {
22 | }
23 |
24 | public new bool Active
25 | {
26 | get { return base.Active; }
27 | }
28 | }
29 |
30 |
--------------------------------------------------------------------------------
/FixClient/ToolStripCheckBox.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: ToolStripCheckBox.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 | using System.ComponentModel;
13 | using System.Drawing;
14 |
15 | namespace FixClient;
16 |
17 | public partial class ToolStripCheckBox : ToolStripControlHost
18 | {
19 | readonly FlowLayoutPanel _controlPanel;
20 | readonly CheckBox _checkBox = new();
21 |
22 | public ToolStripCheckBox() : base(new FlowLayoutPanel())
23 | {
24 | _controlPanel = (FlowLayoutPanel)Control;
25 | _controlPanel.BackColor = Color.Transparent;
26 | //
27 | // up the top padding a touch to make the alignment look better.
28 | //
29 | _checkBox.AutoSize = true;
30 | _checkBox.Padding = new Padding(_checkBox.Padding.Left,
31 | _checkBox.Padding.Top + 2,
32 | _checkBox.Padding.Right,
33 | _checkBox.Padding.Bottom);
34 | _checkBox.CheckedChanged += CheckBoxCheckedChanged;
35 | _controlPanel.Controls.Add(_checkBox);
36 | }
37 |
38 | void CheckBoxCheckedChanged(object? sender, EventArgs e)
39 | {
40 | CheckChanged?.Invoke(sender, e);
41 | }
42 |
43 | public event EventHandler? CheckChanged;
44 |
45 | [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
46 | public bool Checked
47 | {
48 | get { return _checkBox.Checked; }
49 | set { _checkBox.Checked = value; }
50 | }
51 |
52 | [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
53 | public new string Text
54 | {
55 | get { return _checkBox.Text; }
56 | set { _checkBox.Text = value; }
57 | }
58 | }
59 |
60 |
--------------------------------------------------------------------------------
/FixClient/ToolStripCheckBox.designer.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: ToolStripCheckBox.designer.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 |
13 | namespace FixClient
14 | {
15 | partial class ToolStripCheckBox
16 | {
17 | ///
18 | /// Required designer variable.
19 | ///
20 | private System.ComponentModel.IContainer components = null;
21 |
22 | ///
23 | /// Clean up any resources being used.
24 | ///
25 | /// true if managed resources should be disposed; otherwise, false.
26 | protected override void Dispose(bool disposing)
27 | {
28 | if (disposing && (components != null))
29 | {
30 | components.Dispose();
31 | }
32 | base.Dispose(disposing);
33 | }
34 |
35 | #region Component Designer generated code
36 |
37 | ///
38 | /// Required method for Designer support - do not modify
39 | /// the contents of this method with the code editor.
40 | ///
41 | private void InitializeComponent()
42 | {
43 | components = new System.ComponentModel.Container();
44 | }
45 |
46 | #endregion
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/FixClient/ToolStripRenderer.cs:
--------------------------------------------------------------------------------
1 | /////////////////////////////////////////////////
2 | //
3 | // FIX Client
4 | //
5 | // Copyright @ 2021 VIRTU Financial Inc.
6 | // All rights reserved.
7 | //
8 | // Filename: ToolStripRenderer.cs
9 | // Author: Gary Hughes
10 | //
11 | /////////////////////////////////////////////////
12 | namespace FixClient;
13 |
14 | class ToolStripRenderer : ToolStripProfessionalRenderer
15 | {
16 | protected override void OnRenderToolStripBorder(ToolStripRenderEventArgs e)
17 | {
18 | //base.OnRenderToolStripBorder(e);
19 | }
20 |
21 | protected override void OnRenderSeparator(ToolStripSeparatorRenderEventArgs e)
22 | {
23 | //base.OnRenderSeparator(e);
24 | }
25 | }
26 |
27 |
--------------------------------------------------------------------------------
/FixPerformanceTest/FixPerformanceTest.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/FixPersistentSessionPerformanceTest/FixPersistentSessionPerformanceTest.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright 2020 VIRTU Financial Inc.
2 |
3 | Licensed under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License.
5 | You may obtain a copy of the License at
6 |
7 | http://www.apache.org/licenses/LICENSE-2.0
8 |
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # FIX Client
2 |
3 | [](https://github.com/GaryHughes/FixClient/actions/workflows/dotnet.yml)
4 |
5 | ## Synopsis
6 |
7 | FIX Client is a Windows desktop program designed for manually testing [FIX protocol](https://www.fixtrading.org/online-specification/) end points. It can simulate both initiator and acceptor behaviour. FIX Client is written in C# using Winforms and is built on a C# FIX library that can be used standalone to build other programs.
8 |
9 | 
10 |
11 | ***
12 | ## Releases
13 |
14 | If this is the first time you've run FIX Client follow the installation instructions below.
15 |
16 | ### Stable
17 | This branch is actively developed. The main difference between this and the legacy 4.x branch is that the data dictionary is now built on the FIX Orchestra standard.
18 | * Download the latest release [5.3.0](https://github.com/GaryHughes/FixClient/releases/tag/v5.3.0)
19 | * The libraries FIX Client is built upon are available via nuget [here](https://www.nuget.org/packages?q=Geh.Fix).
20 | * Documentation for Fix.Dictionary can be found [here](Fix.Dictionary/README.md).
21 | * Sample code can be found in the [Examples.](https://github.com/GaryHughes/FixClient/tree/master/Examples)
22 |
23 | ### Legacy
24 | This branch maintains historic functionality and is built on a FIX Repository based data dictionary.
25 | * This branch is not actively maintained but bug fixes will be considered.
26 | * Download the latest stable release [4.0.0](https://github.com/GaryHughes/FixClient/releases/tag/v4.0.0)
27 |
28 | ***
29 | ## Installation
30 |
31 | * FIX Client is distributed as .NET single file application, just download FixClient.exe from a [release](https://github.com/GaryHughes/FixClient/releases) and run it.
32 | * For releases prior to 5.1.0 Install the [.NET 5.0 Desktop Runtime](https://dotnet.microsoft.com/download/dotnet/thank-you/runtime-desktop-5.0.5-windows-x64-installer)
33 | * **NB** FIX Client is not compatible with **.NET 5.0.4** Please see [here](https://github.com/GaryHughes/FixClient/issues/2) for details.
34 |
35 | ***
36 | ## Building
37 | ### Command Line
38 |
39 | * Install the [.NET 9.0 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/sdk-9.0.100-windows-x64-installer)
40 | * Clone this repository and change into the repository root directory.
41 | * On the command line type `dotnet publish -c Release`
42 | * The resulting executable can be retrieved from `FixClient/bin/Release/net9.0-windows/win-x64/publish/FixClient.exe`
43 |
44 | ### Visual Studio
45 | * Install [Visual Studio Community Edition 2022](https://visualstudio.microsoft.com/vs/community/)
46 | * Open `Fix.sln` in the repository root directory.
47 | * Select `Build` -> `Publish FIX Client` from the menu.
48 | * Click the `Publish` button.
49 | * The resulting executable can be retrieved from `FixClient/bin/Release/net9.0-windows/win-x64/publish/FixClient.exe`
50 |
51 | ***
52 | ## Acknowledgements
53 |
54 | This repository includes parts of the www.fixtrading.org XML Repository Copyright (c) FIX Protocol Ltd. All Rights Reserved.
55 |
--------------------------------------------------------------------------------
/fixorchestra/.gitignore:
--------------------------------------------------------------------------------
1 | *.pyc
2 |
--------------------------------------------------------------------------------
/fixorchestra/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 Gary Hughes
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/fixorchestra/fixaudit/__init__.py:
--------------------------------------------------------------------------------
1 | __all__ = [ 'fixaudit' ]
2 |
--------------------------------------------------------------------------------
/fixorchestra/fixorchestra/__init__.py:
--------------------------------------------------------------------------------
1 | __all__ = [ 'orchestration' ]
2 |
--------------------------------------------------------------------------------
/fixorchestra/fixrepository/__init__.py:
--------------------------------------------------------------------------------
1 | __all__ = [ 'fixrepository' ]
2 |
--------------------------------------------------------------------------------
/fixorchestra/fixreptorc/__init__.py:
--------------------------------------------------------------------------------
1 | __all__ = [ 'fixreptorc' ]
2 |
--------------------------------------------------------------------------------
/nuget.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------