Giter VIP home page Giter VIP logo

pytradier's People

Contributors

akbar-amin avatar chrisatcodedmarkets avatar cremaluca avatar froig avatar itsjafer avatar jtisaac avatar megamanics avatar pedler7 avatar rleonard21 avatar stenri avatar wmiller256 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

pytradier's Issues

Does the Stock Method work?

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)

How can I place a trade?

I don't see it anywhere in examples or the docs, and can't seem to figure out how to do it myself.

Non-Friday Options Expiry

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.