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_properties - Dictionary<string, string>Dict[str, str] + BaseExtendedDictionary<string, string>BaseExtendedDictionary[str, str] The custom FIX tags to send with the order. The key is the FIX tag number and the value is the tag value. - + An empty dictionary @@ -61,3 +61,5 @@ order_properties.additional_properties["9301"] = "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 tags at once, call the update method with a dictionary. To remove all the tags, call the clear method.

diff --git a/Resources/brokerages/terminal-link/orders.php b/Resources/brokerages/terminal-link/orders.php index 499a7cad05..5750b0f736 100644 --- a/Resources/brokerages/terminal-link/orders.php +++ b/Resources/brokerages/terminal-link/orders.php @@ -154,6 +154,17 @@ The EMSX locate confirmation/ticket Id that the lending broker returns. Maps to the LocId field on the EMSX trading ticket. + + IsCfdTradeis_cfd_trade + bool + + A flag that books the order as a contract for differences (CFD) instead of a regular trade. + Maps to the CFD 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. + + falseFalse + Strategystrategy StrategyParameters @@ -189,6 +200,16 @@ Defines the exchange name for sending the order to. + + AdditionalPropertiesadditional_properties + BaseExtendedDictionary<string, string>BaseExtendedDictionary[str, str] + + The custom EMSX elements to send with the order. The key is the EMSX element name and the value is the element value. + The other order properties take precedence, so an entry that targets an element they already set has no effect. + The brokerage skips entries that the EMSX schema doesn't define instead of rejecting the order. + + An empty dictionary + @@ -262,6 +283,28 @@ +

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.

Get Open Orders