{{Quickfixn}} Getting tag number from name for a custom field/group

Mike Gatny mgatny at connamara.com
Tue May 31 11:50:43 PDT 2022


On Mon, May 30, 2022 at 2:16 AM <raymond.stone at tindecofs.com> wrote:

> I saw that method while I was looking but I don't see any method to get
> hold
> of the data dictionary object when I have an instance of quickfixn


You can look up the Session instance by SessionID (which is passed to you
in the OnCreate, FromApp, FromAdmin, and OnMessage callbacks):

Session session = Session.LookupSession(sessionID);


And then you can access the DataDictionary properties of the Session:

DataDictionary.DataDictionary sessionDataDict =
session.SessionDataDictionary;
DataDictionary.DataDictionary appDataDict =
session.ApplicationDataDictionary;


If you are using FIX.4.4 or earlier, there's only one DataDictionary, so
SessionDataDictionary and ApplicationDataDictionary point to the same
instance.  Separate DataDictionaries are only used with FIXT sessions (i.e.
FIX.5.0 and later).

--
*Mike Gatny*
*CONNAMARA SYSTEMS*


On Fri, May 27, 2022 at 2:18 PM Mike Gatny <mgatny at connamara.com> wrote:

> Something like this?
>
>
> https://github.com/connamara/quickfixn/blob/master/UnitTests/DataDictionaryTests.cs#L32
>
>
> e.g.:
>
> dataDictionary.FieldsByName["customfield"].Tag
>
>
> --
> *Mike Gatny*
> *CONNAMARA SYSTEMS*
>
>
> On Fri, May 27, 2022 at 6:00 AM <raymond.stone at tindecofs.com> wrote:
>
>> Is there a method provided by default to look up a custom data dictionary
>> to get the tag for a named item?
>>
>>
>>
>> Basically I am using two providers, both give groups of quotes but both
>> use non standard tags and they differ by provider, so I ideally want to be
>> able to get the field number by name in the dictionary, ie tagno =
>> GetTagForName(“customfield”)
>>
>>
>>
>> Is this at all possible?
>>
>>
>> _______________________________________________
>> Quickfixn mailing list
>> Quickfixn at lists.quickfixn.com
>> http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com
>>
>

-- 
This email, along with any attachments, is confidential. If you believe you 
received this message in error, please contact the sender immediately and 
delete all copies of the message. Thank you from Connamara Systems, LLC.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20220531/cf98febe/attachment.htm>


More information about the Quickfixn mailing list