From 2f7b272d8c8471bdba88ba6d2a2d09d4437e2a13 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Wed, 26 Oct 2022 10:22:37 -0400 Subject: [PATCH] Make `ib` client's `.get_head_time()` (only) expect an fqsn --- piker/brokers/ib/api.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/piker/brokers/ib/api.py b/piker/brokers/ib/api.py index 34477591..b285ff44 100644 --- a/piker/brokers/ib/api.py +++ b/piker/brokers/ib/api.py @@ -778,11 +778,14 @@ class Client: async def get_head_time( self, - contract: Contract, - ) -> datetime: - """Return the first datetime stamp for ``contract``. + fqsn: str, - """ + ) -> datetime: + ''' + Return the first datetime stamp for ``contract``. + + ''' + contract = (await self.find_contracts(fqsn))[0] return await self.ib.reqHeadTimeStampAsync( contract, whatToShow='TRADES',