Make `ib` client's `.get_head_time()` (only) expect an fqsn
parent
dc1edeecda
commit
2f7b272d8c
|
@ -778,11 +778,14 @@ class Client:
|
||||||
|
|
||||||
async def get_head_time(
|
async def get_head_time(
|
||||||
self,
|
self,
|
||||||
contract: Contract,
|
fqsn: str,
|
||||||
) -> datetime:
|
|
||||||
"""Return the first datetime stamp for ``contract``.
|
|
||||||
|
|
||||||
"""
|
) -> datetime:
|
||||||
|
'''
|
||||||
|
Return the first datetime stamp for ``contract``.
|
||||||
|
|
||||||
|
'''
|
||||||
|
contract = (await self.find_contracts(fqsn))[0]
|
||||||
return await self.ib.reqHeadTimeStampAsync(
|
return await self.ib.reqHeadTimeStampAsync(
|
||||||
contract,
|
contract,
|
||||||
whatToShow='TRADES',
|
whatToShow='TRADES',
|
||||||
|
|
Loading…
Reference in New Issue