rleonard21 / pytradier Goto Github PK
View Code? Open in Web Editor NEWA Python library for interfacing with Tradier.com's trading API.
Home Page: pytradier.readthedocs.io
License: GNU General Public License v3.0
A Python library for interfacing with Tradier.com's trading API.
Home Page: pytradier.readthedocs.io
License: GNU General Public License v3.0
Hey,
We at Gamestonk Terminal were wondering if your project allowed to get the greeks from the option-chain?
https://documentation.tradier.com/brokerage-api/markets/get-options-chains
A few pieces of the documentation broke during the PEP8 reformatting commit. Likely due to misused whitespace or newlines.
I don't see it anywhere in examples or the docs, and can't seem to figure out how to do it myself.
I'm having trouble debugging the tradier.stock method. It seems that init is not executing in the Quote class to add the correct self._path from quote.py. the request tradier.stock('V', 'VZ') is being made without a complete URL path. I'm probably using it wrong but this was the examples I saw.
from pytradier.tradier import Tradier
tradier = Tradier(token, account_id, endpoint)
stocks = tradier.stock('V', 'VZ') # create instance of the Stock class
print(stocks.volume())
Generates the following error------------------
Traceback (most recent call last):
File "D:\code\roberto\rsi_calculator.py", line 15, in
print(stocks.volume())
^^^^^^^^^^^^^^^
File "D:\code\roberto\pytradier\securities\quote.py", line 115, in volume
return self._parse_response(attribute='volume', **config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\code\roberto\pytradier\securities\quote.py", line 34, in _parse_response
self.update_data() # updates by default, user must specify to not update from the API
^^^^^^^^^^^^^^^^^^
File "D:\code\roberto\pytradier\base.py", line 59, in update_data
self._data = self._api_response(self._endpoint, self._path, self._payload)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\code\roberto\pytradier\base.py", line 45, in api_response
j = json.loads(r.content)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\json_init.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
I noticed that the documentation declares that all option contracts expire on Fridays. While this is typically the case, there are some exceptions (SPY and QQQ for example have Monday and Wednesday expiries). I would like to retrieve quotes for these contracts, but there is no response when using their symbols.
Could you please clarify whether this "rule" is enforced on the broker end or via PyTradier? I suspect that it is the broker from what I can make sense of in the code, but wanted to be sure.
Thanks
-O
examples/options_data.py fails with
"Failed to convert value of type 'java.lang.String' to required type 'boolean'; nested exception is java.lang.IllegalArgumentException: Invalid boolean value [<class 'bool'>]"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.