This commit is contained in:
parent
a0b1ee9ae1
commit
dd9a4c3d5d
|
@ -68,7 +68,8 @@ most mature on the danish market, and does support KuCoin.
|
||||||
* Show errors to log.
|
* Show errors to log.
|
||||||
* Stop loop and exit with results, and error indicator.
|
* Stop loop and exit with results, and error indicator.
|
||||||
- [ ] Document configuration
|
- [ ] Document configuration
|
||||||
- [ ] Document auditing
|
- [ ] Document code auditing
|
||||||
|
- [X] Ensure sell time is included in order details
|
||||||
- [X] Log all trades to CSV file.
|
- [X] Log all trades to CSV file.
|
||||||
- [X] Collect information during the run and output after run
|
- [X] Collect information during the run and output after run
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@ class CsvFileLogger:
|
||||||
|
|
||||||
def __call__(self, trade_order: fin_depo.data.TradeOrderDetails):
|
def __call__(self, trade_order: fin_depo.data.TradeOrderDetails):
|
||||||
fieldnames: list[str] = [
|
fieldnames: list[str] = [
|
||||||
|
'executed_time',
|
||||||
'input_asset',
|
'input_asset',
|
||||||
'input_amount',
|
'input_amount',
|
||||||
'output_asset',
|
'output_asset',
|
||||||
|
|
|
@ -30,7 +30,10 @@ class SellerMock(fin_depo.data.DepoFetcher):
|
||||||
assert input_amount <= self.amount_left, 'Attempt to sell too much'
|
assert input_amount <= self.amount_left, 'Attempt to sell too much'
|
||||||
self.amount_left -= input_amount
|
self.amount_left -= input_amount
|
||||||
|
|
||||||
|
executed_time = datetime.datetime.now(tz=datetime.UTC)
|
||||||
|
|
||||||
return fin_depo.data.TradeOrderDetails(
|
return fin_depo.data.TradeOrderDetails(
|
||||||
|
executed_time = executed_time,
|
||||||
input_asset=input_asset,
|
input_asset=input_asset,
|
||||||
input_amount=input_amount,
|
input_amount=input_amount,
|
||||||
output_asset=output_asset,
|
output_asset=output_asset,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user