Skip to content

How do I get a Quote Price #119

Answered by Petersoj
Sneepex2 asked this question in Q&A
Mar 14, 2022 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

The messageType passed in the MarketDataListener onMessage method tells you which sub-type to cast the message parameter to. message (which is a MarketDataMessage object) has several sub-types that you must cast to in order to get the desired getters/setters of the market data object. You can see all of MarketDataMessage sub-types here. As shown in the Direct Known Subclasses section in that Javadoc, there are several sub-types including SymbolMessage, which is the super type to the BarMessage, QuoteMessage, and TradeMessage classes. These are the classes should be cast to in order to acquire the relevant getters/setters for the messageType. Additionally, here is a list of all the possible

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Sneepex2
Comment options

Answer selected by Petersoj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants