forked from xeroc/stakemachine
-
Notifications
You must be signed in to change notification settings - Fork 131
Closed
Description
Method appears to be missing in latest devel branch merge from base.py
def write_order_log(self, worker_name, order):
""" Write order log to csv file
:param string | worker_name: Name of the worker
:param object | order: Order that was fulfilled
"""
operation_type = 'TRADE'
if order['base']['symbol'] == self.market['base']['symbol']:
base_symbol = order['base']['symbol']
base_amount = -order['base']['amount']
quote_symbol = order['quote']['symbol']
quote_amount = order['quote']['amount']
else:
base_symbol = order['quote']['symbol']
base_amount = order['quote']['amount']
quote_symbol = order['base']['symbol']
quote_amount = -order['base']['amount']
message = '{};{};{};{};{};{};{};{}'.format(
worker_name,
order['id'],
operation_type,
base_symbol,
base_amount,
quote_symbol,
quote_amount,
datetime.datetime.now().isoformat()
)
self.orders_log.info(message)
Steps to Reproduce the Problem
Affects Relative orders initialization, check_orders when not using custom expiration