Compare commits

..

No commits in common. "a15a4ec8cd6ed0c97cb9fdc16a809249c938375e" and "e77bec203df81e4c3ad4c944564a4679d4f43ce0" have entirely different histories.

3 changed files with 7 additions and 22 deletions

View File

@ -689,14 +689,13 @@ class Client:
ContFuture(symbol, exchange=exchange)
))[0]
else:
cons = (await self.ib.qualifyContractsAsync(
con = (await self.ib.qualifyContractsAsync(
Future(
symbol,
exchange=exchange,
lastTradeDateOrContractMonth=expiry,
)
))
con = cons[0]
))[0]
return con
@ -896,6 +895,7 @@ class Client:
async def get_sym_details(
self,
fqme: str,
) -> tuple[
Contract,
ContractDetails,
@ -1534,7 +1534,6 @@ async def open_aio_client_method_relay(
) -> None:
# with tractor.devx.maybe_open_crash_handler() as _bxerr:
# sync with `open_client_proxy()` caller
chan.started_nowait(client)
@ -1544,11 +1543,7 @@ async def open_aio_client_method_relay(
# relay all method requests to ``asyncio``-side client and deliver
# back results
while not chan._to_trio._closed: # <- TODO, better check like `._web_bs`?
msg: (
None
|tuple[str, dict]
|dict
) = await chan.get()
msg: tuple[str, dict]|dict|None = await chan.get()
match msg:
case None: # termination sentinel
log.info('asyncio `Client` method-proxy SHUTDOWN!')

View File

@ -522,11 +522,7 @@ async def get_mkt_info(
if atype == 'commodity':
venue: str = 'cmdty'
else:
venue: str = (
con.primaryExchange
or
con.exchange
)
venue = con.primaryExchange or con.exchange
price_tick: Decimal = Decimal(str(details.minTick))
ib_min_tick_gt_2: Decimal = Decimal('0.01')

View File

@ -59,14 +59,8 @@ from piker.data import (
from piker.types import Struct
from piker.log import get_logger
from piker.ui.qt import Qt
from ._editors import (
LineEditor,
ArrowEditor,
)
from ._lines import (
order_line,
LevelLine,
)
from ._editors import LineEditor, ArrowEditor
from ._lines import order_line, LevelLine
from ._position import (
PositionTracker,
SettingsPane,