Author

Topic: Making a real time automated trading system (Read 1698 times)

legendary
Activity: 1498
Merit: 1000
April 25, 2013, 01:52:29 PM
#15
Thanks, had an initital peak into Goxtool, looks like I should be able to configure it in a the right way. Was it hard for you to make a program that works on multiple exchanges? Are you also able to adjust your price based on real time data of multiple exchanges?

No I just created my own abstract layer and I can switch between exchanges in seconds. I use a different trade logic, but I am sure you can do that. It doesn't sound too hard.
legendary
Activity: 965
Merit: 1000
Look for cryptocoin-tradelib in java. I will release more code soon and I always look for contributors.
newbie
Activity: 33
Merit: 0
What's a more reliable way to insert/cancel/update orders, through HTTP or through the websocket?
newbie
Activity: 44
Merit: 0
I would rather point you into the direction of using java or python. I would recommend to make it dependent on the language you are comfortable with and which libraries you want to use.

I love PHP for web-applications but for a trading bot I think you would have to take care of lots of workarounds.

For example in Java you might use XChange (http://xeiam.com/xchange_examplecode.jsp) which connects to many major tradeplaces in just a few lines of code.


I am currently starting a bot project myself (most likely in java) and set up a german forum on that topic.
newbie
Activity: 33
Merit: 0
What about using AJAX, could that do the trick?
newbie
Activity: 33
Merit: 0
Thanks, had an initital peak into Goxtool, looks like I should be able to configure it in a the right way. Was it hard for you to make a program that works on multiple exchanges? Are you also able to adjust your price based on real time data of multiple exchanges?
newbie
Activity: 33
Merit: 0
Basically, what I'd like, is to be able to calculate a fair value of the bitcoin price based on

a.) real-time order book data
b.) recent time and sales data
c.) manual adjustments or additional algorithms based on historic data or future projections

Then, I would like to be able to put orders into the system in an efficient manner.

Preferably I also would like to have a graphical representation of the order book as well a graphical way to show which orders are mine. I'd also like to put orders in or cancel orders just by clicking on the graphical user interface.

If there is open source software available that does exactly that, or that I can relatively easily adjust to do just that, that would be best of course.
newbie
Activity: 33
Merit: 0
Java or python are the best for this project. I have built a trading bot. It is a great experience and a lot of hard work.

How long did it take you? Did you publish the software?
newbie
Activity: 33
Merit: 0
Not done this myself but would like to take a peek and a programmer myself too.  I think you need to look at NodeJS, C/Java server or something else that handles websockets well for the live connection.  You can do it in PHP with a websocket library if necessary I believe but may have sociability issues if you're going to make this a service for others to use too.  

These would be the three steps I'd do...
First step -  get a websocket system that follows share price via mtgox or other API that supports this websocket system.
Second - Test your algorithm on buy/sell requests based on test data
Third - Call into the buy/sell API such as Mtgox, Bitstamp, bitcoin24 etc..

Probably not that difficult but will take a lot of time and a lot of testing especially for scenarios when DOS attacks causing panic selling happens.  At the end of the day it's still gambling on random odds, you'll probably find you'll lose money via an automated system unless you have options for short selling, market influencing, using someone else's money or other tricks the bigboys use in the city's trades.

You may find it's easier however to just use something like bitcoin-bot.com that's already out there for safer and smaller scale automated trading though Wink


Thanks, yes, I have been looking into already available trading software, but so far they don't offer the functionality that I'd like to have.
s2
full member
Activity: 198
Merit: 123
Not done this myself but would like to take a peek and a programmer myself too.  I think you need to look at NodeJS, C/Java server or something else that handles websockets well for the live connection.  You can do it in PHP with a websocket library if necessary I believe but may have sociability issues if you're going to make this a service for others to use too.  

These would be the three steps I'd do...
First step -  get a websocket system that follows share price via mtgox or other API that supports this websocket system.
Second - Test your algorithm on buy/sell requests based on test data
Third - Call into the buy/sell API such as Mtgox, Bitstamp, bitcoin24 etc..

Probably not that difficult but will take a lot of time and a lot of testing especially for scenarios when DOS attacks causing panic selling happens.  At the end of the day it's still gambling on random odds, you'll probably find you'll lose money via an automated system unless you have options for short selling, market influencing, using someone else's money or other tricks the bigboys use in the city's trades.

You may find it's easier however to just use something like bitcoin-bot.com that's already out there for safer and smaller scale automated trading though Wink
newbie
Activity: 33
Merit: 0
Get a job with some real algo-traders to get some ideas.

I have such a background btw, only IT and trading were separated in the firm I worked for, so I am a bit stuck on the IT side, though I do have programming experience and I should be able to do that part myself. And yes, I know it´s hard and you need to know really well what you are doing.
newbie
Activity: 33
Merit: 0
Get a job with some real algo-traders to get some ideas. Learn a language other than PHP.   What you are describing sounds cool but you will discover just how hard it is pretty soon.

In what environment can I do what I described? That is, make calculations based on a real time order book data feed and possibly time and sales data and then have the ability to do order management on a real-time connection as well?
newbie
Activity: 17
Merit: 0
Get a job with some real algo-traders to get some ideas. Learn a language other than PHP.   What you are describing sounds cool but you will discover just how hard it is pretty soon.
newbie
Activity: 33
Merit: 0
Hi,

I want to make a real time automated trading system that makes trading decisions based on the real-time data-feed (on the order book and possibly on the time and sales data coming through). In what environment is it best to do this? The problem with PHP is that it is a one time request where the connections don't stay open to process real-time data; but the other problem is that when I want to make a trading decision (update, insert, cancel) I need to send a static HTTP request.

Any ideas?

Thanks, Dirk
Jump to: