Block hist queries for non-60s
parent
2ea850eed0
commit
1bd421a0f3
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue