toffoo
|
|
March 25, 2013, 01:04:09 AM |
|
Congratulations and thank you to prof7bit (I've tried many CLI-type tools posted here and this is probably the best) and also to MagicalTux because the new beta streaming socket.io feed is FINALLY the first real improvement in reliability since pretty much ever. You can get it with something like this: goxtool.py --protocol=socketio-beta I am on Mac and can confirm it is working really good. I believe new Mac OS X versions ship with python v2.7 installed. Along with prof7bit's code you need to install this pycrypto package from here: https://pypi.python.org/pypi/pycryptowhich of course will not install unless you have XCode installed, because it needs to compile something. If you don't want to install or don't have XCode you can also download a Command Line Only Tools package which can also compile/install this if you register as an Apple Developer. If you can post us some boilerplate examples on how to use strategy.py I will certainly tip your donation address if I manage to make any money autotrading with this thing.
|
|
|
|
wumpus
|
|
April 01, 2013, 10:49:13 AM |
|
Ha, bravo. Looks great.
|
Bitcoin Core developer [PGP] Warning: For most, coin loss is a larger risk than coin theft. A disk can die any time. Regularly back up your wallet through File → Backup Wallet to an external storage or the (encrypted!) cloud. Use a separate offline wallet for storing larger amounts.
|
|
|
01BTC10
VIP
Hero Member
Offline
Activity: 756
Merit: 503
|
|
April 01, 2013, 04:23:42 PM |
|
What is missing? ~/goxtool$ ./goxtool.py Traceback (most recent call last): File "./goxtool.py", line 30, in <module> import goxapi File "/home/r2d2/goxtool/goxapi.py", line 34, in <module> from Crypto.Cipher import AES ImportError: No module named Crypto.Cipher
~/goxtool$ ./goxtool.py --add-secret Traceback (most recent call last): File "./goxtool.py", line 30, in <module> import goxapi File "/home/r2d2/goxtool/goxapi.py", line 34, in <module> from Crypto.Cipher import AES ImportError: No module named Crypto.Cipher
~/goxtool$ python --version Python 2.7.3
|
|
|
|
toffoo
|
|
April 01, 2013, 04:30:32 PM |
|
|
|
|
|
01BTC10
VIP
Hero Member
Offline
Activity: 756
Merit: 503
|
|
April 01, 2013, 04:36:05 PM |
|
Working thanks very much!
|
|
|
|
refer_2_me
|
|
April 02, 2013, 03:50:02 AM |
|
Hi, this looks great. I am trying to get started writing some custom trading strategies, but I am having some trouble figuring out the API. Could you post some sample strategy files for me to work off of? I'm not looking for your secret strategy, but rather a more in depth framework, i.e. where does the code for deciding to buy/sell go etc.
Thanks again for this great looking tool!
|
BTC: 1reFerkRnftob5YvbB112bbuwepC9XYLj XPM: APQpPZCfEz3kejrYTfyACY1J9HrjnRf34Y
|
|
|
ScarecrowMagick
Newbie
Offline
Activity: 25
Merit: 0
|
|
April 05, 2013, 01:24:13 AM Last edit: April 05, 2013, 03:01:40 AM by ScarecrowMagick |
|
So far this looks awesome. How long does it take for Account: No Info (yet) to update, or am I doing something wrong?
Nevermind, I had a dificulty with my key entry. All is awesome now.
Scarecrowmagick
|
|
|
|
JWU42
Legendary
Offline
Activity: 1666
Merit: 1000
|
|
April 12, 2013, 01:28:14 AM Last edit: April 12, 2013, 01:49:25 AM by JWU42 |
|
I keep getting EDIT - Seems using didn't work to ever get account info.
|
|
|
|
ErebusBat
|
|
April 12, 2013, 12:32:30 PM |
|
I keep getting EDIT - Seems using didn't work to ever get account info. You need to create a GOX API Key if you want to see your account info. If you just want to display market conditions you don't need to do this: To use the trading features do the following:
./goxtool.py --add-secret
This will ask you for your MtGox API key and secret, you get them at the mtgox website, copy and paste key and secret, supply a passphrase which will be used to encrypt the secret. Then it will write the encrypted secret to goxtool.ini and exit. The next time you start ./goxtool.py it will ask for the passphrase to access the API secret and then all trading functions will be enabled, you will see your own orders in the orderbook and in the chart and your account balance at the top of the terminal.
|
|
|
|
JWU42
Legendary
Offline
Activity: 1666
Merit: 1000
|
|
April 12, 2013, 12:36:47 PM |
|
Seriously think I didn't do that first The issues all related to the API being down for the first bit after the re-start last night. Using ./goxtool.py --protocol socketio --use-http got it working as it fetched account data via HTTP instead of the API.
|
|
|
|
fnordfnordfnord
Newbie
Offline
Activity: 56
Merit: 0
|
|
April 13, 2013, 03:01:18 AM |
|
This is rad thanks prof7bit. Now if Mtgox will just handle their business.
|
|
|
|
fnordfnordfnord
Newbie
Offline
Activity: 56
Merit: 0
|
|
April 14, 2013, 03:37:16 AM Last edit: April 14, 2013, 03:50:43 AM by fnordfnordfnord |
|
|
|
|
|
fujiwara
Newbie
Offline
Activity: 38
Merit: 0
|
|
April 15, 2013, 08:27:23 AM |
|
Great! I even managed to set it up. But what about strategy.py - any examples?
|
|
|
|
dutt
|
|
April 15, 2013, 07:19:54 PM |
|
prof7bit, the people demand bitfloor support
|
|
|
|
prof7bit (OP)
|
|
April 16, 2013, 03:03:42 PM |
|
Great! I even managed to set it up. But what about strategy.py - any examples?
Here is an example: https://gist.github.com/prof7bit/5395900Read everything below carefully and don't run it if you not 100% understand what it does and what its implications are, including temporary loss when BTC price goes down! I'm not giving any support or guarantee for this, its only example code, I'm using it myself but I'm not going to give support for any trading bot code, you can only run a trading bot if you 100% understand what it does!* Save the above file in _balancer.py (I'm using underscores because these filenames are in .gitignore) * Update goxtool to the very latest version (important because there is a new slot in strategy.py!) * Then start goxtool: ./goxtool.py --strategy=_balancer.py --protocol=socketio --use-http * bring your account into 50/50 balance manually (exactly half of the money in USD, other half in BTC at current price, use a pocket calculator to have really exact numbers, then cancel all open orders) * Then press p (this will place 2 orders above and below price. If they seem wrong press c to cancel them again and find the error. if anything is wrong press c to cancel orders and effectively stop the bot) The bot will trade if one of the orders has been filled, it will then cancel the other one and place two fresh orders above and below last trade price. The bot will maintain a 50/50 ratio of your USD and BTC account balances. Please read about portfolio rebalancing to understand the implications and why you would want (or not want) to do this. This should only be regarded as exemplary code, study it to learn how to use the trading API, don't just run it blindly. I repeat: I will not be responsible for any damage you do to your money! If you look closely you will see that it is working around some limitations of the gox streaming API. Trade messages and user_order messages will not arrive in the order we would ideally like to have, I cannot trigger any action from within slot_trade() because at this time the number of open orders will not yet have been updated (fortunately the wallet *will* be updated already), so I need to jump through one additional hoop. If you design a bot yourself then print debug output until you understand the exact order in which the messages arrive and which information is available at which time.
|
|
|
|
ErebusBat
|
|
April 16, 2013, 03:59:07 PM |
|
Thanks for this prof7bit. Taking a look now.
|
|
|
|
infebious
Newbie
Offline
Activity: 20
Merit: 0
|
|
April 17, 2013, 02:24:39 AM |
|
I just sent a donation your way! Thanks for this it's exactly what I needed.
|
|
|
|
ErebusBat
|
|
April 17, 2013, 06:23:34 PM |
|
I just sent a donation your way! Thanks for this it's exactly what I needed. As did I.... I was able to make some money, nothing huge, but sent it your way for all your hard work.
|
|
|
|
JWU42
Legendary
Offline
Activity: 1666
Merit: 1000
|
|
April 17, 2013, 06:45:12 PM |
|
Just another friendly mention that a Bitfloor "version" would be of interest. If there needs to be a minimum pledged let us know as I am fairly sure it can be accomplished.
|
|
|
|
prof7bit (OP)
|
|
April 17, 2013, 07:34:42 PM |
|
Just another friendly mention that a Bitfloor "version" would be of interest. If there needs to be a minimum pledged let us know as I am fairly sure it can be accomplished.
I have thought about this too already. Its just a matter of time. But since its GPL maybe someone else who is faster than me can fork it and make a bitfloor version, maybe with some refactoring it might even be possible later to combine both into one tool again. Its not imposible its just some work that needs to be done and time to put into it and I also have so many other unfinished things that occasionally need my attention, I wish I could fork myself into many parallel processes to get more stuff done ;-)
|
|
|
|
|