Commit Graph

14 Commits

Author SHA1 Message Date
dekun 5d161b4220 Add HEDGE_PO_MODE instance modes with shared sim/live path.
Lock one mode per instance/subaccount, cross-asset BTC option/ETH perp sizing, combo-U exit, and ship docs/tests/audit.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-14 20:05:25 +08:00
dekun 1d71414c56 Align header title and ETH/BTC quotes with crypto_okx.
Match fullwidth title separator, page spacing, and move live tickers into the nav right column using the same spot-ticker UI/API.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-14 19:27:33 +08:00
dekun 22de1fd40c Match options branding: title prefix and ETH/BTC header quotes.
Use 「加密货币 | OKX 对冲」 and show live top-right ETHUSDT/BTCUSDT quotes like the options instance.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-14 19:17:00 +08:00
dekun d40a0d25be Make hedge the default home and drop unused product-surface entries.
Put永期/期期对冲 first in nav, default embed tab to hedge_plan, and remove risk-policy/options-account UI instead of only hiding them.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-14 18:51:57 +08:00
dekun 16bba2eb1a Enable hedge review with dual-timeframe K-line charts.
Always install the review module in hedge-only mode, expose 对冲复盘 in nav, and allow auto charts for closed hedge plans.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-14 18:43:02 +08:00
dekun 6607d09526 Make this repo hedge-only: skip standalone options UI by default.
Nav/env only expose 永期/期期; set STANDALONE_OPTIONS_UI=true for emergency opt-in.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-14 18:37:46 +08:00
dekun d54bbdfcb3 Fix close-path SQLite lock by releasing write lock before exchange/sim ops.
Also enable WAL and busy_timeout on get_db so concurrent sim writes wait instead of failing immediately.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-14 16:54:56 +08:00
dekun 4c48c95562 Tune CoinOX env: drop auto-transfer; map leverage to hedge perp opens.
BTC_LEVERAGE/ALT_LEVERAGE now drive永期永续 default leverage in UI and start fallback.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-14 12:46:14 +08:00
dekun 5608173784 Slim CoinOX UI to okx对冲: drop records/stats nav and trim env.
Redirect removed pages, disable trade-records API, and keep only options/hedge-related env groups.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-14 11:38:50 +08:00
dekun a845da8d08 Fix CoinOX static JS path so hedge_plan.js is served.
dirname(BASE_DIR) pointed at /opt/lib and returned 404, leaving the hedge page stuck on loading.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-14 11:28:05 +08:00
dekun 135cdc13ba Fix hedge market quotes via public HTTP and default cloud-server deploy settings.
Avoid load_markets hangs on weak networks; enable login-required sim defaults and document Baota Nginx reverse proxy.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-14 10:13:39 +08:00
dekun b4d62ea0a6 Enable options by default and allow full sim trading without OKX API keys.
Relax hedge start gates in sim, route perp open/close through sim broker, and mount strategy templates for records pages.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-14 09:26:38 +08:00
dekun 369114ee1b Fix IndentationError in init_db that prevented coinox from starting.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-14 09:09:53 +08:00
dekun 88b7fb7a0a Initial CoinOX instance: coin-margined options + USDT hedge.
Forked from crypto_monitor OKX instance (copy-only). Keeps standalone options, perp-options and options-options hedge; drops standalone perp entrypoints; forces coin margin; adds sim wallets; default port 5010.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-14 00:18:40 +08:00