feature: map exchange string to primary exchange on level one ticks#9488
Merged
Martin-Molinero merged 1 commit intoMay 15, 2026
Merged
Conversation
- add saleCondition/exchange overload to UpdateQuote - normalize exchange via GetPrimaryExchange in UpdateQuote/UpdateLastTrade - cover exchange mapping with combined test
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
Adds
saleConditionandexchangeparameters toLevelOneMarketData.UpdateQuoteand normalizes the exchange string throughGetPrimaryExchangeon bothUpdateQuoteandUpdateLastTrade. Resulting ticks now carry the canonical primary exchange name (e.g."T"→"NASDAQ","Z"→"BATS") instead of the raw broker-provided code.Related Issue
N/A
Motivation and Context
Brokerage providers send exchange identifiers as short codes (
T,Z,N,P, ...). Without normalization, downstream consumers see the raw code and have to map it themselves. Centralizing the mapping at tick-construction time gives a consistentTick.Exchangevalue across the engine and matches the behavior already used byUpdateLastTrade's sibling code paths.Requires Documentation Change
No.
How Has This Been Tested?
Added a combined NUnit test in
Tests/Brokerages/LevelOneOrderBook/LevelOneMarketDataTests.cs:LevelOneMarketDataShouldMapExchangeStringOnPublishedTickssubscribes toBaseDataReceivedand asserts the resultingTick.Exchangefor both the quote tick (UpdateQuote) and the trade tick (UpdateLastTrade)."T"→"NASDAQ","Z"→"BATS","N"→"NYSE","P"→"ARCA",""→"",null→"".Types of changes
Checklist:
bug-<issue#>-<description>orfeature-<issue#>-<description>