diff --git a/01 Cloud Platform/10 Live Trading/02 Brokerages/97 FIX Connections/03 Order Properties.html b/01 Cloud Platform/10 Live Trading/02 Brokerages/97 FIX Connections/03 Order Properties.html index 58e184bc73..101fa4eadf 100644 --- a/01 Cloud Platform/10 Live Trading/02 Brokerages/97 FIX Connections/03 Order Properties.html +++ b/01 Cloud Platform/10 Live Trading/02 Brokerages/97 FIX Connections/03 Order Properties.html @@ -36,9 +36,9 @@
AdditionalPropertiesadditional_propertiesDictionary<string, string>Dict[str, str]BaseExtendedDictionary<string, string>BaseExtendedDictionary[str, str]The dictionary starts empty and you can't replace it with a plain Python dictionary. To add several tags at once, call the update method with a dictionary. To remove all the tags, call the clear method.
LocId field on the EMSX trading ticket.IsCfdTradeis_cfd_tradeboolCFD option of the Booking Type drop-down on the EMSX trading ticket and sets the EMSX_CFD_FLAG element.
+ EMSX applies this flag at the order level, not per security.
+ A regular trade is the EMSX default, so the brokerage only sends the element when you set this property to trueTrue.
+ falseFalseStrategystrategyStrategyParametersAdditionalPropertiesadditional_propertiesBaseExtendedDictionary<string, string>BaseExtendedDictionary[str, str]The AdditionalPropertiesadditional_properties dictionary lets you set EMSX elements that the preceding properties don't cover, without waiting for a new LEAN release. IsCfdTradeis_cfd_trade reads and writes the EMSX_CFD_FLAG entry of this dictionary, so setting either of them is equivalent. The following example books the orders as CFD trades and adds the odd lot element, which no dedicated property covers:
public override void Initialize()
+{
+ // Set the default order properties to book the orders as CFD trades and to flag them as odd lots
+ var orderProperties = new TerminalLinkOrderProperties { IsCfdTrade = true };
+ orderProperties.AdditionalProperties["EMSX_ODD_LOT"] = "1";
+ DefaultOrderProperties = orderProperties;
+}
+ def initialize(self) -> None: + # Set the default order properties to book the orders as CFD trades and to flag them as odd lots + order_properties = TerminalLinkOrderProperties() + order_properties.is_cfd_trade = True + order_properties.additional_properties["EMSX_ODD_LOT"] = "1" + self.default_order_properties = order_properties+
The dictionary starts empty and you can't replace it with a plain Python dictionary. To add several elements at once, call the update method with a dictionary. To remove all the elements, call the clear method.
For more information about the format that the Bloomberg EMSX API expects, see Create Order and Route Extended Request in the EMSX API documentation and the createOrderAndRouteWithStrat documentation on the MathWorks website.