A-Share Claw
Execute this workflow for A-share paper trading with MX APIs.
Steps
-
Ensure environment:
MX_APIKEYis set.MX_API_URLdefaults tohttps://mkapi2.dfcfs.com/finskillshub.
-
Ensure runtime files under workspace:
mx_autotrade/config.jsonmx_autotrade/run_autotrade.pymx_autotrade/daily_review.py
-
Ensure schedules (trading days):
09:24run strategy10:30run strategy14:30run strategy (risk-first)15:10run daily review
-
Enforce risk rules:
- Single symbol position cap (
maxPositionPerStock, default 15%) - Total exposure cap (
maxTotalPosition, default 60%) - Auto-cancel stale pending orders (>20 min)
- Single symbol position cap (
-
Daily output:
- Produce review JSON (
mx_autotrade/reviews/review-YYYY-MM-DD.json) - Update README day table with:
Day | Balance | Daily Return(no Day0)
- Produce review JSON (
Quick run commands
python3 mx_autotrade/run_autotrade.py
python3 mx_autotrade/daily_review.py
Notes
- Fail safely: if account is not bound, stop and report clearly.
- Prefer discipline over trade frequency.
