Hey I’m new here,
I tried to create a code to get as fast as possible 1 min bars, and I get some but there can be 5 min delay…
Is it normal? I suppose there is no bars because there is no price movement right?
Here is my code :
# Create a data stream client
client = CryptoDataStream(api_key=API_KEY, secret_key=SECRET_KEY)
async def on_bar(bar):
"""Callback function to handle new bars."""
print(bar)
print(f"Symbol: {bar.symbol}, Time: {bar.timestamp}, Open: {bar.open}, High: {bar.high}, Low: {bar.low}, Close: {bar.close}, Volume: {bar.volume}")
client.subscribe_bars(on_bar, "BTC/USD")
client.run()