Client get_ticket_types() errors out on "options" asset class
まだ誰も着手していません。
評価
調査の方向性
RESTClient.get_ticker_types(asset_class="options", locale="us") から始め、レスポンスの処理を、issue に示されている /v3/reference/tickers/types リクエストの処理と比較します。None のレスポンスを再現し、それが TickerTypes にどのように渡されるかを追跡します。options のケースが TypeError なしで処理され、期待される ticker types を返し、空のレスポンスまたは有効なレスポンスをカバーできれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
The get_ticker_types() and/or the /v3/reference/tickers/types behaves unexpectedly when "options" is used as a the asset class.
If I run the query in the documentation page, I get a 200 response with no results.
To Reproduce
With the client:
client = RESTClient(polygon_key)
types = client.get_ticker_types(asset_class="options", locale="us")
or with requests:
resp = requests.get(
url="https://api.polygon.io/v3/reference/tickers/types",
params={
"apiKey": polygon_key,
"asset_class": "options",
"locale": "us",
}
)
print(resp.status_code)
print(resp.json())
Expected behavior
I expected to receive the list of ticker types for options, analogously with how the endpoint works for stocks.
Observed behavior
Using the client I get:
TypeError: polygon.rest.models.tickers.TickerTypes() argument after ** must be a mapping, not NoneType
and with requests:
200
{'results': None, 'count': 0, 'status': 'OK', 'request_id': '14e8456dd17092c22d5d062f0c99434d'}
- 主要言語
- Python
- スター
- 1.5k
- フォーク
- 362
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
massive-com/client-python のほかの issue
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
massive-com/client-python#876 · コメント 1 件 ·
-
enhancement
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
massive-com/client-python#1031 ·
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
massive-com/client-python#1029 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
massive-com/client-python#1028 ·
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
massive-com/client-python#1022 ·
massive-com/client-python の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
qgis/QGIS-Documentation#11275 ·
-
bug priority:normal ready-for-dev
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
OpenHands/extensions#626 · コメント 1 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
CSCfi/sd-search-api#39 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
StevenBlack/hosts#3255 ·