Skip to content

Commit bee10fc

Browse files
authored
Merge pull request mhallsmoore#157 from Afe95/master
Prices appended to csv without PriceParser method
2 parents e44f6a2 + a756b3e commit bee10fc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

qstrader/compliance/example.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import datetime
22
import os
33
import csv
4+
from qstrader.price_parser import PriceParser
45

56
from .base import AbstractCompliance
67

@@ -53,6 +54,6 @@ def record_trade(self, fill):
5354
writer.writerow([
5455
fill.timestamp, fill.ticker,
5556
fill.action, fill.quantity,
56-
fill.exchange, fill.price,
57-
fill.commission
57+
fill.exchange, PriceParser.display(fill.price, 4),
58+
PriceParser.display(fill.commission, 4)
5859
])

0 commit comments

Comments
 (0)