Open mazurok opened 6 years ago
We need to establish:
a) time requirements for logging (how often data needs to be collected? is it important to have asynchronous requests? is it enought to work with REST API or we need websockets to obtain streaming data?)
b) format specification for logs (personal file for each exchange? one file for all? formating inside the file?)
c) will logging be run from Heroku, ONU server or local machine?
d) which possible extensions will logging module have? (will log file be regularly read by web application? or it will only be used for exploratory offline analysis? which additional data might be required later?)
e) which programming language should be used for implementing logging system?
1) How to cope with limits? (to obtain top best orders instead of all orders where it's possible) 2) Structure of log directory: separate file for each pair? 3) Structure of log files: timestamp, number of orders, optimal volume, optimal profit, percentage, top bid, top ask 4) How will PHP use this files? (read from end up line by line until current section is finished?) 5) When and how will configuration file be updated?
DONE: 1) Command line arguments parsing implemented 2) Help and usage examples added 3) Basic configuration file structure defined and tested 4) Code for getting symbol, url and json-path from configuration file written 5) Error handling added: wrong config file, timeout for responses, wrong json in config file or response 6) Implement asynchronous requests via aiohttp 7) Fill configuration file for 6 current exchanges 8) Translate PHP script into Python (computation of orders list / profit / volume / optimal profit and volume) 9) Generate orders which must be performed on each exchange 10) Return JSON as used by front end 11) Create some testing and monitoring utilities:
Logs with date-time stamps
Specification of format / usage:
Example for CEX and Exmo: