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, # end
]:
if timeframe != 60:
raise DataUnavailable('Only 1m bars are supported')
array = await client.bars(
instrument,
start_dt=start_dt,
end_dt=end_dt,
)
if len(array) == 0:
raise DataUnavailable