prof7bit / goxtool

display Mt.Gox live market data (in the console) and experiment with trading bots
185 stars 53 forks source link

Some refactoring suggestions #18

Open nfx8 opened 11 years ago

nfx8 commented 11 years ago

The goxapi.py has 1696 LOC. I'm going to use parts of goxapi and refactor a module, so that it is independent of the UI and the exchange. I would split up the goxapi.py in orders.py (Order and Orderbook classes), exc_cllients.py (BaseClient and SocketIO / Websocket classes), config.py (Secret, Goxconfig classes), util.py (number conversions and pretty_format).

The Gox object is an active streaming object (start method), as well as a passive broker to the exchange. A request sometimes can not only be a streaming request, but a one time request.

I can do a pull request if there is interest. It makes sense to have one great MtGox API out there, where then everyone can add their own stuff ontop. goxtool this is certainly the best existing code for interfacing with MtGox and I would like to contribute to a common base.

prof7bit commented 11 years ago

maybe its best to create a fork and develop that as a separete project. I didn't intend to make the one and ultimate complete reference API that implements everything, its just a small subset of things needed for goxtool and inspiration for bigger projects that move into different directions.

nfx8 commented 11 years ago

sure. will do. thanks again.