Adjust type annots in binance and IB symbol mods
Namely, again switching `|`-union syntax to rm adjacent white space. Also, flip to multiline style for threshold comparison in `.binance.feed` and change gap-check threshold to `timeframe` (vs a hardcoded `60`s) in the `get_ohlc()` closure. (this commit msg was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-codefix_tractor_logging
parent
ce1f038b53
commit
7ff1fa5369
|
|
@ -277,7 +277,11 @@ async def open_history_client(
|
||||||
|
|
||||||
if end_dt is None:
|
if end_dt is None:
|
||||||
inow: int = round(time.time())
|
inow: int = round(time.time())
|
||||||
if (inow - times[-1]) > 60:
|
if (
|
||||||
|
(inow - times[-1])
|
||||||
|
>
|
||||||
|
timeframe
|
||||||
|
):
|
||||||
await tractor.pause()
|
await tractor.pause()
|
||||||
|
|
||||||
start_dt = from_timestamp(times[0])
|
start_dt = from_timestamp(times[0])
|
||||||
|
|
|
||||||
|
|
@ -488,7 +488,6 @@ def con2fqme(
|
||||||
@async_lifo_cache()
|
@async_lifo_cache()
|
||||||
async def get_mkt_info(
|
async def get_mkt_info(
|
||||||
fqme: str,
|
fqme: str,
|
||||||
|
|
||||||
proxy: MethodProxy|None = None,
|
proxy: MethodProxy|None = None,
|
||||||
|
|
||||||
) -> tuple[MktPair, ibis.ContractDetails]:
|
) -> tuple[MktPair, ibis.ContractDetails]:
|
||||||
|
|
@ -550,7 +549,7 @@ async def get_mkt_info(
|
||||||
size_tick: Decimal = Decimal(
|
size_tick: Decimal = Decimal(
|
||||||
str(details.minSize).rstrip('0')
|
str(details.minSize).rstrip('0')
|
||||||
)
|
)
|
||||||
# |-> TODO: there is also the Contract.sizeIncrement, bt wtf is it?
|
# ?TODO, there is also the Contract.sizeIncrement, bt wtf is it?
|
||||||
|
|
||||||
# NOTE: this is duplicate from the .broker.norm_trade_records()
|
# NOTE: this is duplicate from the .broker.norm_trade_records()
|
||||||
# routine, we should factor all this parsing somewhere..
|
# routine, we should factor all this parsing somewhere..
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue