API Support Forum
User Profile

Viewing User Profile for: ARomano8351


About

Jun 04, 2024 02:21 PM

Jun 26, 2024 09:57 PM

Jun 26, 2024 10:08 PM




Post Statistics
ARomano8351 has contributed to 5 posts out of 5645 total posts (0.09%) in 52 days (0.00 posts per day).

20 most recent posts:

FIX Support » Margin request Jun 26, 2024 @ 09:57 PM (Total replies: 9)

Hi,

Hi,

Hi,
thanks, but setgroup works differently in quickfix.
1)in quickfix (which is the fix implementation suggested in the gain fix docuementation), setgroup is not available with 2 arguments, but requires 6 arguments(https://github.com/quickfix/quickfix/blob/master/src/C%2B%2B/Message.h#L246)
void setGroup( const std::string& msg, const FieldBase& field,
const std::string& string, std::string::size_type& pos,
FieldMap& map, const DataDictionary& dataDictionary );
, which I cannot figure out what they are and if it is the same method.

2)This codes give an error:
group= fix.NoPositions()
group.setField(fix.Symbol("ES"))
as documente here as well https://stackoverflow.com/questions/77494204/im-trying-to-set-the-partyid-field-in-quickfix-python-api-and-i-face-an-argumen.

but it works for groups defined in the xml dictionary.

3)Can you provide a xml of the fix dialect used by gain? That would make it easy to create UR messages.
4)Alternatively, can you show to create the message without the xml, with the quickfix python implementation?
I also tried to create the fix message from a string, but the order is lost, and the repeating group is not recognized.

5)In any case when I send a message with the 35=UR field gives an erro. not recognized message type, which is to related to the group ordering.
Edited by ARomano8351 on Jun 26, 2024 10:08 PM

FIX Support » Margin request Jun 25, 2024 @ 04:41 PM (Total replies: 9)

Are you referring to NoPositions, 702?
I do not see any of NoPositions fields (703,704, .. see below) in the sample message and I cannot set other fields such as 55 in the group, I get an error, because 55 for example is not a filed of NoPositions group (see below).
Can you post an example of how to construct the UR message with quickfix , (c++ is fine) ? You have a custom xml for UR/UM messages? They are not included in the standard xml dictionary for fix44, so I suppose they are custom.
Thanks

Below is the quick fix code for NoPositions
class NoPositions(fix.Group):
def __init__(self):
order = fix.IntArray(6)
order[0] = 703
order[1] = 704
order[2] = 705
order[3] = 706
order[4] = 539
order[5] = 0
fix.Group.__init__(self, 702, 703, order
Edited by ARomano8351 on Jun 26, 2024 12:25 AM

FIX Support » Margin request Jun 25, 2024 @ 10:55 AM (Total replies: 9)

When I submit the sample message I get : Unknown request message type:
2024-06-25 15:51:31,626 - INFO - MainThread - FixClient is sending: 949533789=UR
2024-06-25 15:51:31,628 - INFO - MainThread - Sending Application message to server. Session: FIX.4.4:xxxxxx->OEC. Message: 8=FIX.4.49=25235=UR34=8649=xxxxxx52=20240625-15:51:31.62856=OEC1=xxxxxx55=ES55=ES55=OES110=4110=1110=-5200=201403200=201403200=201403202=1600461=FXXXXS461=FXXXXS461=OCXFXS702=312064=63530616069275902512066=-412066=512066=110=089


2024-06-25 15:51:31,629 - ERROR - MainThread - Unknown request message type 8=FIX.4.49=25235=UR34=8649=xxxxxx52=20240625-15:51:31.62856=OEC1=xxxxxx55=ES55=ES55=OES110=4110=1110=-5200=201403200=201403200=201403202=1600461=FXXXXS461=FXXXXS461=OCXFXS702=312064=63530616069275902512066=-412066=512066=110=089
2024-06-25 15:51:31,634 - INFO - Dummy-5 - Received Admin message from server. Session: FIX.4.4:xxxxxx->OEC. Message: 8=FIX.4.49=12435=334=8549=OEC52=20240625-15:51:3156=xxxxxx45=8658=Tag appears more than once371=55372=UR373=1310=125

FIX Support » Margin request Jun 24, 2024 @ 04:07 PM (Total replies: 9)

Thanks. I found that indeed, but that message type seems to be a custom one, i.e. is not included in the standard fix implementation. Do I need to create a custom message type https://quickfixn.org/tutorial/custom-fields-groups-and-messages.html? You have an example?

I tried this , but I get "Unknown request message type"
Edited by ARomano8351 on Jun 24, 2024 06:24 PM

FIX Support » Margin request Jun 23, 2024 @ 01:43 PM (Total replies: 9)

Hi,

If found that the fix example https://bitbucket.org/GainFuturesDev/oecfixsample/src/master/ has a MARGINCALC Command in foxscript.
1)How is this script language used?
How to run commands, from the console? I installed in LINUX but nothing seems to work,
I am already using fix for trading from python in linux, with quickfix, but I it is not clear how to use foxscript.

I want to write a function to compute the margins of a given portfolio, and run it from python, if possible.

2)Is there any working example of margin calculation for a portfolio of 3 different futures in foxscript? In case this will not work, anybody has an example of calling com object from python to compute the margins of multiple legs portfolios ?

Thanks
BW
Edited by ARomano8351 on Jun 23, 2024 01:47 PM
Edited by ARomano8351 on Jun 23, 2024 06:21 PM