Block hist queries for non-60s

deribit_updates
Tyler Goodlet 2023-03-03 12:27:03 -05:00
parent 2ea850eed0
commit 1bd421a0f3
1 changed files with 3 additions and 0 deletions

View File

@ -81,12 +81,15 @@ async def open_history_client(
datetime, # start datetime, # start
datetime, # end datetime, # end
]: ]:
if timeframe != 60:
raise DataUnavailable('Only 1m bars are supported')
array = await client.bars( array = await client.bars(
instrument, instrument,
start_dt=start_dt, start_dt=start_dt,
end_dt=end_dt, end_dt=end_dt,
) )
if len(array) == 0: if len(array) == 0:
raise DataUnavailable raise DataUnavailable