Use exchange fees, UPL, funding for LIVE PnL; USDC 1:1 to USDT.

Option open P&L stays local (option net); exit target ignores estimated close fees.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-26 21:49:20 +08:00
parent b7e055e37b
commit ca66c494e7
12 changed files with 685 additions and 25 deletions
+4 -1
View File
@@ -41,7 +41,8 @@ CREATE TABLE IF NOT EXISTS groups (
fees REAL DEFAULT 0,
slip_cost REAL DEFAULT 0,
note TEXT,
exec_mode TEXT
exec_mode TEXT,
funding_usdt REAL
);
CREATE TABLE IF NOT EXISTS fills (
@@ -150,7 +151,9 @@ class Database:
with self._lock:
for table, col, decl in (
("groups", "exec_mode", "TEXT"),
("groups", "funding_usdt", "REAL"),
("fills", "exec_mode", "TEXT"),
("fills", "fee_ccy", "TEXT"),
):
cols = {
str(r[1])