Skip to content

Commit eae7778

Browse files
add new trf fields to EquityTrade and EquityQuote websocket models (#334)
1 parent b363833 commit eae7778

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

.polygon/websocket.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,14 @@
185185
"q": {
186186
"type": "integer",
187187
"description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).\n"
188+
},
189+
"trfi": {
190+
"type": "integer",
191+
"description": "The ID for the Trade Reporting Facility where the trade took place."
192+
},
193+
"trft": {
194+
"type": "integer",
195+
"description": "The TRF (Trade Reporting Facility) Timestamp in Unix MS. \nThis is the timestamp of when the trade reporting facility received this trade.\n"
188196
}
189197
}
190198
},
@@ -2247,6 +2255,14 @@
22472255
"q": {
22482256
"type": "integer",
22492257
"description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).\n"
2258+
},
2259+
"trfi": {
2260+
"type": "integer",
2261+
"description": "The ID for the Trade Reporting Facility where the trade took place."
2262+
},
2263+
"trft": {
2264+
"type": "integer",
2265+
"description": "The TRF (Trade Reporting Facility) Timestamp in Unix MS. \nThis is the timestamp of when the trade reporting facility received this trade.\n"
22502266
}
22512267
}
22522268
},

polygon/websocket/models/models.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ class EquityTrade:
8888
conditions: Optional[List[int]] = None
8989
timestamp: Optional[int] = None
9090
sequence_number: Optional[int] = None
91+
trf_id: Optional[int] = None
92+
trf_timestamp: Optional[int] = None
9193

9294
@staticmethod
9395
def from_dict(d):
@@ -102,6 +104,8 @@ def from_dict(d):
102104
d.get("c", None),
103105
d.get("t", None),
104106
d.get("q", None),
107+
d.get("trfi", None),
108+
d.get("trft", None),
105109
)
106110

107111

@@ -149,6 +153,8 @@ class EquityQuote:
149153
timestamp: Optional[int] = None
150154
tape: Optional[int] = None
151155
sequence_number: Optional[int] = None
156+
trf_id: Optional[int] = None
157+
trf_timestamp: Optional[int] = None
152158

153159
@staticmethod
154160
def from_dict(d):
@@ -166,6 +172,8 @@ def from_dict(d):
166172
d.get("t", None),
167173
d.get("z", None),
168174
d.get("q", None),
175+
d.get("trfi", None),
176+
d.get("trft", None),
169177
)
170178

171179

0 commit comments

Comments
 (0)