Skip to content

[PRO-444] Add support for missing websocket fields - #588

Open
justinpolygon wants to merge 1 commit into
masterfrom
jw-pro-444-websocket-fractional-fields
Open

[PRO-444] Add support for missing websocket fields#588
justinpolygon wants to merge 1 commit into
masterfrom
jw-pro-444-websocket-fractional-fields

Conversation

@justinpolygon

Copy link
Copy Markdown
Collaborator

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.

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
justinpolygon marked this pull request as ready for review August 18, 2026 17:16
@justinpolygon
justinpolygon requested a review from a team as a code owner August 18, 2026 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant