If there is interest, I'll continue to build on these code examples and perhaps eventually create a full featured library for Tradier.
This is a basic example of connecting to Tradier's stream API and following one ticker and all associated options.
https://github.com/pushshift/tradier/blob/master/stream.py
There is no error correction or reconnection logic, but the purpose is to show how to connect to their API using Python. This will print activity to STDOUT when the market is open (running it outside market hours will get all the most recent quotes).
What this script does:
1) Uses a ticker symbol and gets all expiration dates for all available options.
2) Queries for all option symbols using expiration dates.
3) Initiates a stream connection passing the ticker and all option symbols associated with the ticker during stream init.
(I've programmed in C, GoLang, Perl and Python and have ~ 25 years of programming experience.)
This is a basic example of connecting to Tradier's stream API and following one ticker and all associated options.
https://github.com/pushshift/tradier/blob/master/stream.py
There is no error correction or reconnection logic, but the purpose is to show how to connect to their API using Python. This will print activity to STDOUT when the market is open (running it outside market hours will get all the most recent quotes).
What this script does:
1) Uses a ticker symbol and gets all expiration dates for all available options.
2) Queries for all option symbols using expiration dates.
3) Initiates a stream connection passing the ticker and all option symbols associated with the ticker during stream init.
(I've programmed in C, GoLang, Perl and Python and have ~ 25 years of programming experience.)