|
71 | 71 | ) |
72 | 72 | from app.services.quick_trade.external_closes import sync_exchange_close_fills as _sync_exchange_close_fills |
73 | 73 | 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 |
75 | 74 | from app.utils.request_guard import RequestGuardError, cache_key, guarded_cached |
76 | 75 |
|
77 | 76 | logger = get_logger(__name__) |
@@ -425,11 +424,6 @@ def place_order(body): |
425 | 424 | except Exception as pe: |
426 | 425 | logger.warning("swap margin pre-check skipped: %s", pe) |
427 | 426 |
|
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 | | - |
433 | 427 | timestamp_suffix = str(int(time.time()))[-6:] # Last 6 digits of timestamp |
434 | 428 | uuid_suffix = uuid.uuid4().hex[:8] # 8 hex chars |
435 | 429 | client_order_id = f"qt{timestamp_suffix}{uuid_suffix}" # Total: 2 + 6 + 8 = 16 chars |
@@ -1971,24 +1965,5 @@ def set_position_protection(body): |
1971 | 1965 | return jsonify({"code": 0, "msg": "quickTrade.workflow.protectionFailed"}), 400 |
1972 | 1966 |
|
1973 | 1967 |
|
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 | | - |
1993 | 1968 | # openapi-compat: legacy import name |
1994 | 1969 | quick_trade_bp = quick_trade_blp |
0 commit comments