Let TerminalLink submit orders on index securities - #9755
Merged
Martin-Molinero merged 1 commit intoAug 26, 2026
Merged
Conversation
TerminalLinkBrokerageModel.CanSubmitOrder rejected every SecurityType.Index order, which blocked a supported EMSX workflow: booking a custom basket whose market data arrives through B-Pipe as an index by typing the index ticker into the EMSX security field and routing the ticket as a CFD/swap. PlaceOrder already sends EMSX_CFD_FLAG and the symbol mapper already resolves index tickers, so the pre-flight check was the only thing in the way. EMSX accepts an index ticker in the security field, so Index joins the supported security types rather than being gated on the CFD flag, which is an order-level booking type independent of the security by design. Closes QuantConnect#9747 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Martin-Molinero
approved these changes
Aug 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
TerminalLinkBrokerageModel.CanSubmitOrderrejected everySecurityType.Indexorder, which blocked a supported Bloomberg EMSX workflow: booking a custom basket (e.g. a Morgan Stanley basket swap) whose market data arrives through B-Pipe as an index, by typing the index ticker into the EMSX security field and routing the ticket as a CFD/swap.TerminalLinkBrokerage.PlaceOrderalready sendsEMSX_CFD_FLAG(fromTerminalLinkOrderProperties.IsCfdTrade) andTerminalLinkSymbolMapperalready resolves index tickers, so the engine-level pre-flight check was the only thing in the way.EMSX accepts an index ticker in the security field, so
Indexjoins_supportedSecurityTypesrather than being gated on the CFD flag — that flag is an order-level booking type that is independent of the security type by design, as its documentation states. The existingSecurity.IsTradableopt-in for indices still applies upstream of the brokerage model, so a data-only index is still rejected before it reaches here.Closes #9747
Related Issue
Closes #9747
Motivation and Context
Reported by a live Institution user whose order was invalidated with
BrokerageModel declared unable to submit order: ... The TerminalLinkBrokerageModel does not support Index security type.even though the order was explicitly flaggedIsCfdTrade = true. In a standard (non-LEAN) EMSX ticket this booking flow is normal and supported.Requires Documentation Change
No.
How Has This Been Tested?
TerminalLinkBrokerageModelTests: theSPX/SecurityType.Indexcase moved fromCannotSubmitOrder_ForUnsupportedSecurityTypestoCanSubmitOrder_ForSupportedSecurityTypes, plus a newCanSubmitOrder_ForIndex_BookedAsCfdTradecovering the reported workflow — an index order carryingTerminalLinkOrderProperties { IsCfdTrade = true }.Types of changes
Checklist:
🤖 Generated with Claude Code