Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option Support, Function not working #314

Open
2 tasks done
leoi137 opened this issue Jan 22, 2024 · 0 comments
Open
2 tasks done

Option Support, Function not working #314

leoi137 opened this issue Jan 22, 2024 · 0 comments
Labels

Comments

@leoi137
Copy link

leoi137 commented Jan 22, 2024

Checklist

  • I am on the latest pyrh version.
  • I have searched the issues of this repo and believe that this is not a duplicate.

Description

Getting the option chain is broken when calling rh.get_options() and rh.get_option_marketdata(). It also doesn't seem the Option Support branch was merged.

Steps/Code to Reproduce

rh.get_options("AAPL", expiration_dates=["2024-02-02"], option_type="call")

and

chain_id = rh.get_option_chainid("AAPL")
rh.get_option_marketdata(chain_id)

Results

File /Library/Mobile Documents/comapple~CloudDocs/Documents/trading/py_research/py_research/lib/python3.11/site-packages/pyrh/urls.py:174, in build_chain(instrument_id)
160 def build_chain(instrument_id: str) -> URL:
161 """Build the query for a particular options chain.
162
163 # TODO: this isn't best practice
(...)
171
172 """
173 return (
...
726 )
727 seg = seg if encoded else self._PATH_QUOTER(seg)
728 if "/" in seg:

ValueError: Appending path '/' starting from slash is forbidden

Versions

macOS-14.1.2-arm64-arm-64bit
Python 3.11.4 (v3.11.4:d2340ef257, Jun 6 2023, 19:15:51) [Clang 13.0.0 (clang-1300.0.29.30)]
pyrh 2.1.2

@leoi137 leoi137 added the bug label Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant