fix(ledger): preserve exact decimal amount in manual and unified responses

Co-authored-by: genichin <4282227+genichin@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-09-09 12:41:36 +00:00
committed by GitHub
co-authored by genichin
parent 7fc3386f3a
commit fde5b33f05
5 changed files with 32 additions and 8 deletions
+2 -1
View File
@@ -4,6 +4,7 @@ from __future__ import annotations
from dataclasses import dataclass, field
from datetime import datetime
from decimal import Decimal
from enum import Enum
from typing import Any, Protocol, runtime_checkable
@@ -136,6 +137,7 @@ class LedgerEntry:
portfolio_id: str
quantity: float
price: float
price_decimal: Decimal | None = None
ledger_entry_id: int = 0
order_id: str | None = None
execution_id: str | None = None
@@ -195,4 +197,3 @@ class BrokerCredential:
credential_version: int = 1
last_rotated_at: datetime | None = None
daemon_id: str | None = None