Client get_ticket_types() errors out on "options" asset class
还没有人认领这个 Issue。
评估
调研方向
从 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 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 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 ·