如何配置QuickFIX的.cfg文件以在FIX4.4版本35=A(登录消息)中添加58/Text标签?
Got you covered! Let's break down exactly how to configure your QuickFIX .cfg file so it automatically includes that custom 58 tag in your FIX4.4 Logon messages.
First, let's make sure we're on the same page: QuickFIX lets you define default fields for specific message types right in the config file, which is perfect for your use case. Here's the step-by-step:
Lock in the FIX4.4 protocol version
Make sure your .cfg has this line set to confirm you're targeting the correct protocol:DefaultApplVerID=FIX.4.4This ensures all message-specific settings we add apply to FIX4.4 messages.
Add the custom 58 tag to Logon message defaults
You'll need to add a[MessageSettings]section (if it doesn't already exist) to define default fields for the Logon message (message typeA). Drop this into your config:[MessageSettings] ; Define default fields for FIX4.4 Logon (35=A) FIX.4.4.A=58=YourCustomContentGoesHereJust replace
YourCustomContentGoesHerewith the exact text you want to send in the 58 tag.Test and verify
Save the updated .cfg file, restart your QuickFIX session, and check the outgoing Logon message. The58tag with your custom value should now be included automatically.
A couple quick caveats to keep in mind:
- If you have any custom application code that constructs the Logon message manually, it might overwrite the default fields set in the .cfg. Double-check that your code isn't explicitly omitting or replacing the 58 tag.
- Always confirm with your counterparty that accepting the 58 tag in Logon messages is allowed per their FIX specifications—most don't mind, but it's better to avoid session rejections upfront.
内容的提问来源于stack exchange,提问作者ivanova_tata

