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

py sdk: 使用 QuoteContext.history_candlesticks_by_date 函数设置周期为 Period.Min_x 报错: longport.OpenApiException: OpenApiException: (code=301600, trace_id=) out of minute kline begin date #48

Closed
ddingning opened this issue Jul 21, 2024 · 4 comments

Comments

@ddingning
Copy link

问题描述

history_candlesticks_by_date 函数设置周期为 Period.Min_1/5/30/60 报错: longport.OpenApiException: OpenApiException: (code=301600, trace_id=) out of minute kline begin date. Period.Day/Week/Year..等正常
请问是我用错了了嘛还是不支持这种查询... 希望大佬支持下..

代码例子

    candlesticks = ctx.history_candlesticks_by_date("AAPL.US", Period.Min_5, AdjustType.NoAdjust,
                                                    datetime.date(2022, 5, 5), datetime.date(2022, 6, 23))
    for candlestick in candlesticks:
        print(candlestick)

错误信息或结果截图
candlesticks = qtx.history_candlesticks_by_date("AAPL.US", Period.Min_5, AdjustType.NoAdjust,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
longport.OpenApiException: OpenApiException: (code=301600, trace_id=) out of minute kline begin date
2024-07-21 164715

你的环境信息

  • 操作系统: Windows 10
  • 开发语言: Python 3.12.2
  • SDK 版本号: longport 1.0.27
@QFCG
Copy link

QFCG commented Jul 22, 2024

目前分钟 k 线只提供了最近两年的数据。

@ddingning ddingning reopened this Jul 22, 2024
@ddingning
Copy link
Author

目前分钟 k 线只提供了最近两年的数据。
会开放久一点的数据吗? 我觉得历史分钟k线挺有用的, 你们就返回限定时间长度的嘛.这样应该压力也不会太大.

@QFCG
Copy link

QFCG commented Jul 22, 2024

了解,这个会反馈给产品评估。

@ddingning
Copy link
Author

了解,这个会反馈给产品评估。

好的, 先谢谢你们哈

@sunli829 sunli829 closed this as completed Oct 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants