0

I cannot generate the prices data. I thought the Interval = 60 maybe can be 1 hour interval. But the main problem is I cannot generate any data at all

from pybit import spot
import pandas as pd

session = spot.HTTP(
    endpoint='https://api.bybit.com', 
    api_key = 'YOUR_API',
    api_secret = 'YOUR_SECRET'
)
ws = spot.WebSocket(
    test=False,
    api_key = 'YOUR_API',
    api_secret = 'YOUR_SECRET'
)

# Get prices.
data = session.query_kline(symbol = ['BTCUSD'], interval = 60)

df = pd.DataFrame(data)

print(df)
JECT
  • 1

1 Answers1

0

I'm not very qualifed with pybit module but you're suppose to provide start and end timestamps at the query_kline function