summaryrefslogtreecommitdiff
path: root/trade.py
diff options
context:
space:
mode:
authoruvok2025-04-18 19:27:01 +0200
committeruvok2025-04-18 19:27:01 +0200
commit063609de19a6f7e97c68f7da1e5ca422449349e9 (patch)
tree46478e7061dd1f1827ebbebe288a79d8fc9bcebb /trade.py
parentf486114d6e029e1ecb4130351d7792e0925b8bcd (diff)
Add timestamp prop and fix queue to use it
Diffstat (limited to 'trade.py')
-rw-r--r--trade.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/trade.py b/trade.py
index 30a0030..7c2ecc7 100644
--- a/trade.py
+++ b/trade.py
@@ -106,6 +106,16 @@ class Trade:
return self.__timestamp.split(" ")[0]
@property
+ def timestamp(self) -> str:
+ """
+ Get the timestamp of the trade.
+
+ Returns:
+ str: The trade timestamp as a string.
+ """
+ return self.__timestamp
+
+ @property
def price_per_coin(self) -> Decimal:
"""
Calculate the price per coin based on the total cost and current amount.