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

怎么获取秒级k线 #10

Open
QGB opened this issue Mar 9, 2024 · 3 comments
Open

怎么获取秒级k线 #10

QGB opened this issue Mar 9, 2024 · 3 comments

Comments

@QGB
Copy link

QGB commented Mar 9, 2024

隔壁可以用 https://api.binance.com/api/v3/klines?interval=1s&symbol=BTCUSDT

@pyted
Copy link
Owner

pyted commented Mar 12, 2024

参数中,bar='1s'就可以,对于实盘数据,需要注意:官方更新的最新产品的秒级K线与当前时间延迟较大,相差几十秒是常事。
建议:实盘交易自己维护秒级K线,通过循环,快速获取并记录产品的瞬时价格。

@QGB
Copy link
Author

QGB commented Mar 13, 2024

@QGB
Copy link
Author

QGB commented Mar 13, 2024

参数中,bar='1s'就可以,对于实盘数据,需要注意:官方更新的最新产品的秒级K线与当前时间延迟较大,相差几十秒是常事。 建议:实盘交易自己维护秒级K线,通过循环,快速获取并记录产品的瞬时价格。

你的库中可以实现吗, 维持一个最新实时的 多周期 k线副本,最好可以计算各种指标

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

2 participants