bitcoin-arbitrage
bitcoin-arbitrage copied to clipboard
Major updates, breaks backwards compatibility
It might be necessary to change some of what I've done, especially the parts that break backwards compatibility. Or this version could be considered a new major revision. In short, I have:
- Replaced the tuples getting tossed around in Arbitrer with Trade objects.
- Broke out most of the functionality formerly in Arbitrer into the Market, MarketChain, and TradeChain classes.
- Changed all the private_market classes so they now take and execute Trade objects.
- Removed the dependence on USD as a pivot currency, allowing users to choose an arbitrary pivot via config.py.
- Added the option of defining a config.json file that overrides config.py and automatically gets reloaded when changed.
- Added dependencies on Watchdog and Blinker (for the line item directly above).
- Split tests into unit_tests and integration_tests.
- Added a BTC-e private market class for automated trading.
- Added some unit tests, integration tests, and documentation.
Hi thanks a lot for the patch. It breaks a lot of things but add some cool features ;) - I'll probably create an unstable branch for it
Awesome. Thanks, and I'm glad you like it. :-)
The feature list is impressive, but with the new dependencies to blinker/watchdog I could not get it running on ubuntu 12.04. :-(
Ah, that's too bad. I'll see if I can at least make those dependencies optional. They're really only used for the websocket observer and the config.json auto-reloading. Not exactly core functionality! :-)
Do you have an idea, how to make the dependencies optional? I could help, but I have no idea.
Blinker, watchdog, and tornado are now all optional, though you'll need to install them if you want to take advantage of dynamic config reloading and the WebSocket observer.
Thanks! There are some typos in the fix, see https://github.com/ryepdx/bitcoin-arbitrage/pull/1 Still, if tornado or blinker is not there, the program starts up but does not reach "Starting arbitrage. Ctrl-C at any time to exit." The good thing is, that tornado and blinker can be easily installed by downloading from their webpage, so for me there no problem any longer.
Thanks for the input, weidenrinde. I'll take another look at what happens when tornado or blinker are not installed, since I do want the user experience to be minimally impacted in that event.
By the way, I found a way to install pip for python3 in ubuntu 12.04. In case anyone is interested: http://stackoverflow.com/a/19035050
Not sure where to write my comments. But trying out the get-balance from ryepdx fork doesn't work.
python3 arbitrage/arbitrage.py -m BitstampUSD get-balance
2013-12-26 17:16:53,293 [INFO] Starting arbitrage. Ctrl-C at any time to exit.
2013-12-26 17:16:53,293 [INFO] Could not load config.json.
Traceback (most recent call last):
File "arbitrage/arbitrage.py", line 100, in <module>
main()
File "arbitrage/arbitrage.py", line 87, in main
cli.main()
File "arbitrage/arbitrage.py", line 81, in main
self.create_arbitrer(args)
File "arbitrage/arbitrage.py", line 52, in create_arbitrer
self.arbitrer.init_markets(args.markets.split(","))
File "/ryepdx/bitcoin-arbitrage/arbitrage/arbitrer.py", line 63, in init_markets
for market_name, currency_pairs in markets.items():
AttributeError: 'list' object has no attribute 'items'
@davols I fixed this problem, see https://github.com/ryepdx/bitcoin-arbitrage/pull/5 "-m mtgox get-balance" now works. For bitstamp possibly further changes have to be done.
@ryepdx The status of your branch is unclear to me. I thought it would be consistent, but now it seems to me that basic functionality is not working (get-balance, email). So I wonder whether it makes more sense to work on your branch or on the base branch. Could you give me some hints about the status of your branch?
- "It might be necessary to change some of what I've done, especially the parts that break backwards compatibility. " What do you mean with this? Do you have some examples? Which "backwards compatibility" did you break?
- You are using this code already? It seems that some functionality (email, get-balance) is not fully functional. Could you say, which elements are tested/used by you and which are not?
- Do you have plans to work further on your branch?
- I submitted some bugfixes. Do you agree on them? Will you merge them?
- Do you have any arguments/feelings/suggestions, concerning the question if I should contribute to your branch or to the base branch?
If you still plan to improve your branch, perhaps even have a common branch with me, I would prefer using your branch, as it has some valuable features and ideas!
Could you give me some hints about the status of your branch?
Sure thing. Most of my changes were made to support work requested by a freelance client of mine. As a result, I didn't pay as much attention as I should have to functionality that wasn't related to my objectives. I did make sure all tests passed, but I didn't do as much manual testing as I should have before issuing this pull request.
Since it does seem that this project is becoming pretty popular, I'm going to spend some time during the next week on it. Hopefully that'll be enough time to plug any of the other holes I've missed.
@weidenrinde, thanks for the work you've been putting into this. I've been pretty swamped with freelance work, so I haven't taken a look at all your pull requests, but I've started tonight and will continue doing so tomorrow.
Thanks for your answers and activity.
"Most of my changes were made to support work requested by a freelance client of mine."
Could you say, which are these stable and tested parts exactly? This could give me an impression of the status...
BTW: If anyone knows an easier way to contribute to this branch, I would be happy to try it. I am quite new to git and making a feature branch for each small bugfix, rebase it to upstream etc. takes much more time than the actual fixing.
can anyone hint me how to make the script to treat 0 difference (sell price somehwere=buy price somewhere else) also as opportunity?
@ryepdx could you help maybe?