chore: remove edge from RPC modules

This commit is contained in:
Matthias
2025-06-10 07:09:30 +02:00
parent 5d8a3cdb31
commit 971dfef0ee
4 changed files with 0 additions and 33 deletions

View File

@@ -263,12 +263,6 @@ def list_custom_data(trade_id: int, key: str | None = Query(None), rpc: RPC = De
raise HTTPException(status_code=404, detail=str(e)) raise HTTPException(status_code=404, detail=str(e))
# TODO: Missing response model
@router.get("/edge", tags=["info"])
def edge(rpc: RPC = Depends(get_rpc)):
return rpc._rpc_edge()
@router.get("/show_config", response_model=ShowConfig, tags=["info"]) @router.get("/show_config", response_model=ShowConfig, tags=["info"])
def show_config(rpc: RPC | None = Depends(get_rpc_optional), config=Depends(get_config)): def show_config(rpc: RPC | None = Depends(get_rpc_optional), config=Depends(get_config)):
state: State | str = "" state: State | str = ""

View File

@@ -1345,12 +1345,6 @@ class RPC:
return {"log_count": len(records), "logs": records} return {"log_count": len(records), "logs": records}
def _rpc_edge(self) -> list[dict[str, Any]]:
"""Returns information related to Edge"""
if not self._freqtrade.edge:
raise RPCException("Edge is not enabled.")
return self._freqtrade.edge.accepted_pairs()
@staticmethod @staticmethod
def _convert_dataframe_to_dict( def _convert_dataframe_to_dict(
strategy: str, strategy: str,

View File

@@ -215,7 +215,6 @@ class Telegram(RPCHandler):
r"/forceshort$", r"/forceshort$",
r"/forcesell$", r"/forcesell$",
r"/forceexit$", r"/forceexit$",
r"/edge$",
r"/health$", r"/health$",
r"/help$", r"/help$",
r"/version$", r"/version$",
@@ -299,7 +298,6 @@ class Telegram(RPCHandler):
CommandHandler("blacklist", self._blacklist), CommandHandler("blacklist", self._blacklist),
CommandHandler(["blacklist_delete", "bl_delete"], self._blacklist_delete), CommandHandler(["blacklist_delete", "bl_delete"], self._blacklist_delete),
CommandHandler("logs", self._logs), CommandHandler("logs", self._logs),
CommandHandler("edge", self._edge),
CommandHandler("health", self._health), CommandHandler("health", self._health),
CommandHandler("help", self._help), CommandHandler("help", self._help),
CommandHandler("version", self._version), CommandHandler("version", self._version),
@@ -1792,23 +1790,6 @@ class Telegram(RPCHandler):
if msgs: if msgs:
await self._send_msg(msgs, parse_mode=ParseMode.MARKDOWN_V2) await self._send_msg(msgs, parse_mode=ParseMode.MARKDOWN_V2)
@authorized_only
async def _edge(self, update: Update, context: CallbackContext) -> None:
"""
Handler for /edge
Shows information related to Edge
"""
edge_pairs = self._rpc._rpc_edge()
if not edge_pairs:
message = "<b>Edge only validated following pairs:</b>"
await self._send_msg(message, parse_mode=ParseMode.HTML)
for chunk in chunks(edge_pairs, 25):
edge_pairs_tab = tabulate(chunk, headers="keys", tablefmt="simple")
message = f"<b>Edge only validated following pairs:</b>\n<pre>{edge_pairs_tab}</pre>"
await self._send_msg(message, parse_mode=ParseMode.HTML)
@authorized_only @authorized_only
async def _help(self, update: Update, context: CallbackContext) -> None: async def _help(self, update: Update, context: CallbackContext) -> None:
""" """
@@ -1861,7 +1842,6 @@ class Telegram(RPCHandler):
"*/balance total:* `Show account balance per currency`\n" "*/balance total:* `Show account balance per currency`\n"
"*/logs [limit]:* `Show latest logs - defaults to 10` \n" "*/logs [limit]:* `Show latest logs - defaults to 10` \n"
"*/count:* `Show number of active trades compared to allowed number of trades`\n" "*/count:* `Show number of active trades compared to allowed number of trades`\n"
"*/edge:* `Shows validated pairs by Edge if it is enabled` \n"
"*/health* `Show latest process timestamp - defaults to 1970-01-01 00:00:00` \n" "*/health* `Show latest process timestamp - defaults to 1970-01-01 00:00:00` \n"
"*/marketdir [long | short | even | none]:* `Updates the user managed variable " "*/marketdir [long | short | even | none]:* `Updates the user managed variable "
"that represents the current market direction. If no direction is provided `" "that represents the current market direction. If no direction is provided `"

View File

@@ -72,7 +72,6 @@ def test_FtRestClient_call_invalid(caplog):
("weekly", [15], {}), ("weekly", [15], {}),
("monthly", [], {}), ("monthly", [], {}),
("monthly", [12], {}), ("monthly", [12], {}),
("edge", [], {}),
("profit", [], {}), ("profit", [], {}),
("stats", [], {}), ("stats", [], {}),
("performance", [], {}), ("performance", [], {}),