Client get_ticket_types() errors out on "options" asset class

オープン
#907 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python
領域
api

調査の方向性

RESTClient.get_ticker_types(asset_class="options", locale="us") から始め、レスポンスの処理を、issue に示されている /v3/reference/tickers/types リクエストの処理と比較します。None のレスポンスを再現し、それが TickerTypes にどのように渡されるかを追跡します。options のケースが TypeError なしで処理され、期待される ticker types を返し、空のレスポンスまたは有効なレスポンスをカバーできれば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug

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 はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

massive-com/client-python のほかの issue

massive-com/client-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。