dev progress

This commit is contained in:
Oleg Sheynin 2026-01-01 22:18:02 +00:00
parent 002f797751
commit 6dd0f97d74
2 changed files with 4 additions and 4 deletions

View File

@ -133,7 +133,7 @@ class PairsTrader(NamedObject):
await self.live_strategy_.on_mkt_data_hist_snapshot(hist_aggr=history)
async def _on_api_request(self, request: web.Request) -> web.Response:
return web.Response() # TODO add API request handler implementation
return web.Response() # TODO API request handler implementation
async def run(self) -> None:
Log.info(f"{self.fname()} ...")

View File

@ -118,7 +118,6 @@ class PtLiveStrategy(NamedObject):
async def on_mkt_data_hist_snapshot(
self, hist_aggr: List[MdTradesAggregate]
) -> None:
# Log.info(f"on_mkt_data_hist_snapshot: {aggr}")
if not self._is_md_actual(hist_aggr=hist_aggr):
return
@ -160,7 +159,7 @@ class PtLiveStrategy(NamedObject):
self, trading_instructions: TradingInstructions
) -> None:
await self.pairs_trader_.ti_sender_.send_trading_instructions(trading_instructions)
pass # URGENT implement _send_trading_instructions
pass # URGENT _send_trading_instructions
def _create_trading_instructions(
self, prediction: Prediction, last_row: pd.Series
@ -193,6 +192,7 @@ class PtLiveStrategy(NamedObject):
) -> Optional[TradingInstructions]:
ti: Optional[TradingInstructions] = None
scaled_disequilibrium = prediction.scaled_disequilibrium_
# URGENT _create_open_trade_instructions
# if scaled_disequilibrium > 0:
# side_a = "SELL"
@ -258,7 +258,7 @@ class PtLiveStrategy(NamedObject):
self, pair: TradingPair, row: pd.Series # , prediction: Prediction
) -> Optional[TradingInstructions]:
ti: Optional[TradingInstructions] = None
# URGENT implement _create_close_trade_instructions
# URGENT _create_close_trade_instructions
return ti
def _handle_outstanding_positions(self) -> Optional[pd.DataFrame]: