polygon-io/client-python

Doucmenting class LastTrade

jbonilla-tao opened this issue ยท 4 comments

Confused about what these fields represent. Can someone please clarify? Thanks!

class LastTrade:
"Contains data for the most recent trade for a given ticker symbol."
ticker: Optional[str] = None
trf_timestamp: Optional[int] = None
sequence_number: Optional[float] = None
sip_timestamp: Optional[int] = None
participant_timestamp: Optional[int] = None
conditions: Optional[List[int]] = None
correction: Optional[int] = None
id: Optional[str] = None
price: Optional[float] = None
trf_id: Optional[int] = None
size: Optional[float] = None
exchange: Optional[int] = None
tape: Optional[int] = None

Thank you @justinpolygon! BTW, where can I find all supported tickers? it isn't clear how to get SPX price right now.

You can use the tickers endpoint without entering a ticker. It will return a massive list of all supported tickers.

https://polygon.io/docs/stocks/get_v3_reference_tickers

Also, there's a ton of examples in here if you haven't seen then yet with code and links to all the docs https://github.com/polygon-io/client-python/tree/master/examples/rest