Pages:
Author

Topic: ncurses based MtGox live monitor and trading-bot-framework - page 9. (Read 33839 times)

legendary
Activity: 1666
Merit: 1000
Toffoo,

Had no idea what you were speaking of until I visited the site just now  Shocked
sr. member
Activity: 408
Merit: 261
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 ;-)

Appreciate the reply.  If I had the skills I would have tried to write it myself...

No point now!

Think of it like you just saved yourself the trouble of doing lots of extra work for nothing!
hero member
Activity: 560
Merit: 500
I am the one who knocks
I was wondering what someone would charge to calculate arbitrary EMAs in the strategy file.

I am no python expert, nor a GOX api specialist.
legendary
Activity: 1666
Merit: 1000
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 ;-)

Appreciate the reply.  If I had the skills I would have tried to write it myself...
hero member
Activity: 667
Merit: 500
wow this looks awesome,  checking it out!
hero member
Activity: 938
Merit: 500
https://youengine.io/
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 ;-)
legendary
Activity: 1666
Merit: 1000
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.
hero member
Activity: 560
Merit: 500
I am the one who knocks
I just sent a donation your way!  Thanks for this it's exactly what I needed.   Grin
As did I.... 

I was able to make some money, nothing huge, but sent it your way for all your hard work.
newbie
Activity: 20
Merit: 0
I just sent a donation your way!  Thanks for this it's exactly what I needed.   Grin
hero member
Activity: 560
Merit: 500
I am the one who knocks
hero member
Activity: 938
Merit: 500
https://youengine.io/
Great! I even managed to set it up. But what about strategy.py - any examples?

Here is an example: https://gist.github.com/prof7bit/5395900

Read 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.
member
Activity: 135
Merit: 10
prof7bit, the people demand bitfloor support Grin
newbie
Activity: 38
Merit: 0
Great! I even managed to set it up. But what about strategy.py - any examples?
newbie
Activity: 56
Merit: 0
This is rad thanks prof7bit. Now if Mtgox will just handle their business.
legendary
Activity: 1666
Merit: 1000
Seriously think I didn't do that first  Grin

The issues all related to the API being down for the first bit after the re-start last night.

Using

Code:
./goxtool.py --protocol socketio --use-http

got it working as it fetched account data via HTTP instead of the API.
hero member
Activity: 560
Merit: 500
I am the one who knocks
I keep getting

Code:
Account: No info (yet)

EDIT - Seems using
Code:
--protocol socketio
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.

legendary
Activity: 1666
Merit: 1000
I keep getting

Code:
Account: No info (yet)

EDIT - Seems using
Code:
--protocol socketio
didn't work to ever get account info.
newbie
Activity: 25
Merit: 0
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
full member
Activity: 213
Merit: 100
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!
Pages:
Jump to: