Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

self.write_order_log missing from base.py, breaks RO #593

Closed
thehapax opened this issue May 17, 2019 · 4 comments
Closed

self.write_order_log missing from base.py, breaks RO #593

thehapax opened this issue May 17, 2019 · 4 comments

Comments

@thehapax
Copy link
Collaborator

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

@joelvai

@thehapax
Copy link
Collaborator Author

thehapax commented May 17, 2019

also from the init, missing the below. It should be moved out from bitshares_engine and into base.py, where it should be.

       self.orders_log = logging.LoggerAdapter(
            logging.getLogger('dexbot.orders_log'), {}
        )

@thehapax thehapax changed the title self.write_order_log missing from base.py self.write_order_log missing from base.py, breaks RO May 17, 2019
@bitphage
Copy link
Collaborator

bitphage commented May 17, 2019

I'd rather remove this order log because it's not accurate anyway. Reliable data can be obtained from account history / elasticsearch wrapper (see #204)

@thehapax
Copy link
Collaborator Author

@bitfag has #204 already been implementated? If not lets open a task for it.

making a pull request to eliminate self.write_order_log from base and RO

@bitphage
Copy link
Collaborator

write_order_log() is current implementation of #204. A new implementation has not been done (I was assigned to another task), so only plugin infrastructure has been implemented (#500 and #502).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants