Skip to content

Commit 401464c

Browse files
committed
refactor: retire unused quick trade AI and event radar
1 parent f9abc24 commit 401464c

20 files changed

Lines changed: 6 additions & 1905 deletions

‎backend_api_python/app/data_providers/event_sources.py‎

Lines changed: 0 additions & 194 deletions
This file was deleted.

‎backend_api_python/app/openapi/register.py‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ def register_human_blueprints(api: Api) -> None:
8383
from app.routes.fast_analysis import fast_analysis_blp
8484
from app.routes.billing import billing_blp
8585
from app.routes.quick_trade import quick_trade_blp
86-
from app.routes.quick_trade_event_radar import quick_trade_event_radar_blp
8786

8887
registrations: list[tuple] = [
8988
(health_blp, ""),
@@ -112,7 +111,6 @@ def register_human_blueprints(api: Api) -> None:
112111
(fast_analysis_blp, "/api/fast-analysis"),
113112
(billing_blp, "/api/billing"),
114113
(quick_trade_blp, "/api/quick-trade"),
115-
(quick_trade_event_radar_blp, "/api/quick-trade"),
116114
]
117115

118116
for blp, prefix in registrations:

‎backend_api_python/app/routes/quick_trade.py‎

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@
7171
)
7272
from app.services.quick_trade.external_closes import sync_exchange_close_fills as _sync_exchange_close_fills
7373
from app.services.quick_trade.transport import close_quick_trade_transport, open_quick_trade_transport
74-
from app.services.ai_decision_filter import list_ai_decisions
7574
from app.utils.request_guard import RequestGuardError, cache_key, guarded_cached
7675

7776
logger = get_logger(__name__)
@@ -425,11 +424,6 @@ def place_order(body):
425424
except Exception as pe:
426425
logger.warning("swap margin pre-check skipped: %s", pe)
427426

428-
from app.routes.quick_trade_ai import maybe_reject_quick_trade
429-
ai_rejection = maybe_reject_quick_trade(locals(), _record_quick_trade)
430-
if ai_rejection is not None:
431-
return ai_rejection
432-
433427
timestamp_suffix = str(int(time.time()))[-6:] # Last 6 digits of timestamp
434428
uuid_suffix = uuid.uuid4().hex[:8] # 8 hex chars
435429
client_order_id = f"qt{timestamp_suffix}{uuid_suffix}" # Total: 2 + 6 + 8 = 16 chars
@@ -1971,24 +1965,5 @@ def set_position_protection(body):
19711965
return jsonify({"code": 0, "msg": "quickTrade.workflow.protectionFailed"}), 400
19721966

19731967

1974-
@quick_trade_blp.route('/ai-decisions', methods=['GET'])
1975-
@login_required
1976-
def get_ai_decisions():
1977-
"""Return account-scoped AI decision audit rows for Quick Trade."""
1978-
credential_id = request.args.get("credential_id", type=int) or 0
1979-
symbol = str(request.args.get("symbol") or "").strip()
1980-
market_type = str(request.args.get("market_type") or "").strip()
1981-
limit = request.args.get("limit", type=int) or 100
1982-
rows = list_ai_decisions(
1983-
user_id=int(g.user_id),
1984-
source_type="quick_trade",
1985-
source_id=credential_id,
1986-
symbol=symbol,
1987-
market_type=market_type,
1988-
limit=limit,
1989-
)
1990-
return jsonify({"code": 1, "msg": "common.success", "data": rows})
1991-
1992-
19931968
# openapi-compat: legacy import name
19941969
quick_trade_bp = quick_trade_blp

‎backend_api_python/app/routes/quick_trade_ai.py‎

Lines changed: 0 additions & 96 deletions
This file was deleted.

‎backend_api_python/app/routes/quick_trade_event_radar.py‎

Lines changed: 0 additions & 41 deletions
This file was deleted.

0 commit comments

Comments
 (0)