[PRO-444] Add support for missing websocket fields - #588
Open
justinpolygon wants to merge 1 commit into
Open
Conversation
I added support for the ds, dv, dav, and pt fields, which the server sends but our websocket models were missing. The main one is ds. It holds the trade size when someone buys part of a share. Our Size field only holds whole numbers, so a trade of 0.85 shares came through as 0.
justinpolygon
marked this pull request as ready for review
August 18, 2026 17:16
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.
I added support for the ds, dv, dav, and pt fields, which the server sends
but our websocket models were missing. Go ignores JSON fields it does not
know about, so we were quietly throwing this data away.
The main one is ds. It holds the trade size when someone buys part of a
share. Our Size field only holds whole numbers, so a trade of 0.85 shares
came through as 0, which looks the same as a trade of nothing.
I checked this against the live feed for 30 seconds. Out of 79,479 stock
trades, 3,045 were smaller than one share and every one of them read as 0
before this change. Options does not send these fields, and 18,574 options
messages still decoded correctly with them left empty.
All four fields are new, so nothing breaks. REST already had this data
because it is generated from the API spec, but the websocket code is written
by hand so it was missed.