如何获取从 00:00UTC 到现在的所有可用股票的币安当前 K 线?

发布于 2025-01-13 19:05:38 字数 520 浏览 3 评论 0原文

有没有一种方法可以通过一个请求获取“1 天”时间范围内的币安当日 K 线,而不是过去 24 小时,而是从 00:00UTC 开始的当日 K 线(无需循环每个股票代码)。就像 python 中的 get_ticker() 一样,但它返回 24 小时变化,我需要整个可用股票的 K 线。

以防止重复。 websockets 是不可接受的,因为数据未正确传输,我丢失了一些数据。根据我的测试(我的问题 - 我有大约 900 个股票代码需要检查,如果我将它们全部传递给 websockets 并开始监听,一些股票代码的更新速度比其他代码更快,我认为那是因为某些数据没有被接收和处理,而不是因为当时它们还没有被交易,

或者如果有一个很好的例子来说明如何使用 websocket 来实现这一点,那就太好了。 这是我期望得到的回应: 例子,

{
    'BTCUSDT': [43000,45000,40000,41000], # [open, high, low, close]
    'ADAUSDT': ...,
    ...
}

谢谢

Is there a way to get binance current day kline for '1day' timeframe, not for past 24h, but for current day started at 00:00UTC, with one request (without looping every ticker). Like get_ticker() in python, but it returns 24h change, I need klines for whole available tickers.

to prevent duplicates. websockets is not acceptable, because, data is not comming properly, I am losing some data. according to my tests (my problem - I have around 900 tickers to check, if I pass all of them to websockets and start to listen, some tickers are updating faster than others, i think thats because some data is not recieved and handled, not because they are not traded at that time.

or if there is a good example of how to achieve this with websockets, would be great.
here is what i expect to get as response:
example,

{
    'BTCUSDT': [43000,45000,40000,41000], # [open, high, low, close]
    'ADAUSDT': ...,
    ...
}

thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文