Compare commits
2 Commits
e77bec203d
...
a15a4ec8cd
| Author | SHA1 | Date |
|---|---|---|
|
|
a15a4ec8cd | |
|
|
ff502b62bf |
|
|
@ -689,13 +689,14 @@ class Client:
|
||||||
ContFuture(symbol, exchange=exchange)
|
ContFuture(symbol, exchange=exchange)
|
||||||
))[0]
|
))[0]
|
||||||
else:
|
else:
|
||||||
con = (await self.ib.qualifyContractsAsync(
|
cons = (await self.ib.qualifyContractsAsync(
|
||||||
Future(
|
Future(
|
||||||
symbol,
|
symbol,
|
||||||
exchange=exchange,
|
exchange=exchange,
|
||||||
lastTradeDateOrContractMonth=expiry,
|
lastTradeDateOrContractMonth=expiry,
|
||||||
)
|
)
|
||||||
))[0]
|
))
|
||||||
|
con = cons[0]
|
||||||
|
|
||||||
return con
|
return con
|
||||||
|
|
||||||
|
|
@ -895,7 +896,6 @@ class Client:
|
||||||
async def get_sym_details(
|
async def get_sym_details(
|
||||||
self,
|
self,
|
||||||
fqme: str,
|
fqme: str,
|
||||||
|
|
||||||
) -> tuple[
|
) -> tuple[
|
||||||
Contract,
|
Contract,
|
||||||
ContractDetails,
|
ContractDetails,
|
||||||
|
|
@ -1534,6 +1534,7 @@ async def open_aio_client_method_relay(
|
||||||
|
|
||||||
) -> None:
|
) -> None:
|
||||||
|
|
||||||
|
# with tractor.devx.maybe_open_crash_handler() as _bxerr:
|
||||||
# sync with `open_client_proxy()` caller
|
# sync with `open_client_proxy()` caller
|
||||||
chan.started_nowait(client)
|
chan.started_nowait(client)
|
||||||
|
|
||||||
|
|
@ -1543,7 +1544,11 @@ async def open_aio_client_method_relay(
|
||||||
# relay all method requests to ``asyncio``-side client and deliver
|
# relay all method requests to ``asyncio``-side client and deliver
|
||||||
# back results
|
# back results
|
||||||
while not chan._to_trio._closed: # <- TODO, better check like `._web_bs`?
|
while not chan._to_trio._closed: # <- TODO, better check like `._web_bs`?
|
||||||
msg: tuple[str, dict]|dict|None = await chan.get()
|
msg: (
|
||||||
|
None
|
||||||
|
|tuple[str, dict]
|
||||||
|
|dict
|
||||||
|
) = await chan.get()
|
||||||
match msg:
|
match msg:
|
||||||
case None: # termination sentinel
|
case None: # termination sentinel
|
||||||
log.info('asyncio `Client` method-proxy SHUTDOWN!')
|
log.info('asyncio `Client` method-proxy SHUTDOWN!')
|
||||||
|
|
|
||||||
|
|
@ -522,7 +522,11 @@ async def get_mkt_info(
|
||||||
if atype == 'commodity':
|
if atype == 'commodity':
|
||||||
venue: str = 'cmdty'
|
venue: str = 'cmdty'
|
||||||
else:
|
else:
|
||||||
venue = con.primaryExchange or con.exchange
|
venue: str = (
|
||||||
|
con.primaryExchange
|
||||||
|
or
|
||||||
|
con.exchange
|
||||||
|
)
|
||||||
|
|
||||||
price_tick: Decimal = Decimal(str(details.minTick))
|
price_tick: Decimal = Decimal(str(details.minTick))
|
||||||
ib_min_tick_gt_2: Decimal = Decimal('0.01')
|
ib_min_tick_gt_2: Decimal = Decimal('0.01')
|
||||||
|
|
|
||||||
|
|
@ -59,8 +59,14 @@ from piker.data import (
|
||||||
from piker.types import Struct
|
from piker.types import Struct
|
||||||
from piker.log import get_logger
|
from piker.log import get_logger
|
||||||
from piker.ui.qt import Qt
|
from piker.ui.qt import Qt
|
||||||
from ._editors import LineEditor, ArrowEditor
|
from ._editors import (
|
||||||
from ._lines import order_line, LevelLine
|
LineEditor,
|
||||||
|
ArrowEditor,
|
||||||
|
)
|
||||||
|
from ._lines import (
|
||||||
|
order_line,
|
||||||
|
LevelLine,
|
||||||
|
)
|
||||||
from ._position import (
|
from ._position import (
|
||||||
PositionTracker,
|
PositionTracker,
|
||||||
SettingsPane,
|
SettingsPane,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue