Author

Topic: Building own trading bot (Read 1117 times)

newbie
Activity: 55
Merit: 0
March 28, 2014, 06:42:10 AM
#20
There are Websocket-Libraries for LISP, however you would have to write the listener-implementation yourself, I doubt that any exchange would offer that for lisp Wink
newbie
Activity: 27
Merit: 0
March 28, 2014, 05:11:05 AM
#19
When writing your bot in LISP or Scheme, can you connect to the websockets?
newbie
Activity: 27
Merit: 0
March 28, 2014, 04:53:27 AM
#18
Hi there...

I am running a platform where you can code your rule engine in JavaScript then test it and use it for real trading on BTC-e.

There are some strategies already implemented and you can get a hang of how things work pretty fast. You can then use this knowledge to build your own bot Wink

You can find the platform here: http://www.cointelligence.net

Have fun coding your own strategies and rules!

Thnx!
newbie
Activity: 21
Merit: 0
March 26, 2014, 03:05:23 PM
#17
Hi there...

I am running a platform where you can code your rule engine in JavaScript then test it and use it for real trading on BTC-e.

There are some strategies already implemented and you can get a hang of how things work pretty fast. You can then use this knowledge to build your own bot Wink

You can find the platform here: http://www.cointelligence.net

Have fun coding your own strategies and rules!
legendary
Activity: 965
Merit: 1000
March 26, 2014, 11:35:35 AM
#16
I reading  ...

Professional Automated Trading: Theory and Practice
http://eu.wiley.com/WileyCDA/WileyTitle/productCd-1118129857.html

man ... in LISP ... and some java too ...

I think that's actually a good combination, although I prefer Scheme these days. I thought about using scheme to implement my own rule-engine, but since drools is available these days, I went the easier route.
newbie
Activity: 55
Merit: 0
March 26, 2014, 04:09:00 AM
#15
On Bitstamp you can request more than once a second, just don't exceed 600 per 10minutes -> so averaging 1/s in 10 minutes.
For querying realtime-prices you should use their websocket API: https://www.bitstamp.net/websocket/
full member
Activity: 238
Merit: 100
Stand on the shoulders of giants
March 26, 2014, 01:17:41 AM
#14
I reading  ...

Professional Automated Trading: Theory and Practice
http://eu.wiley.com/WileyCDA/WileyTitle/productCd-1118129857.html

man ... in LISP ... and some java too ...
member
Activity: 110
Merit: 10
March 25, 2014, 05:12:14 PM
#13
It is not cumulative... if you hit more than one time a second, you can be banned at any point. Exchanges have to limit traffic or they will get DOSed out of business.
legendary
Activity: 965
Merit: 1000
March 25, 2014, 04:42:38 PM
#12
I guess you are banned then. I wrote some code to fetch prices via proxies, but it's hard to get a list of reliable free proxies.
newbie
Activity: 27
Merit: 0
March 25, 2014, 04:30:38 PM
#11
One more question Smiley 
What are the rules for hitting an API. So basically if i hit an API for 1 minutes 200 times and then don't do it for 3.5 hours. Averaging once a second. Is that even allowed? Ím just trying to come up with ways to work around it.
legendary
Activity: 965
Merit: 1000
March 25, 2014, 04:24:09 PM
#10
That might be too slow already. Better hold funds in all the traded currencies and fire all the orders at once.
newbie
Activity: 27
Merit: 0
March 25, 2014, 04:23:57 PM
#9
Ok nice.  Do traders sometimes end up with excess inventories/balances :p How big would that risk be? Smiley
member
Activity: 110
Merit: 10
March 25, 2014, 04:12:37 PM
#8
Something like that.
newbie
Activity: 27
Merit: 0
March 25, 2014, 03:36:54 PM
#7
Some exchanges have methods to check the status of an order. The most simple way is usually to check your funds. If you bought 1 btc and your btc funds are 1 btc higher than before => order filled.

Like you said, you cant hit the api continuously?, so how to work around this.

For example: You usually check for the opportunity and one round trip (buy USD to BTC and immediately sell BTC to XXX) would look like this:

Make one side of the trade
Wait one sec

Check balance if trade went through
Wait one sec

Make other side of the trade
Wait one sec

Check balance if trade went through
Wait one sec
legendary
Activity: 965
Merit: 1000
March 25, 2014, 03:19:31 PM
#6
Some exchanges have methods to check the status of an order. The most simple way is usually to check your funds. If you bought 1 btc and your btc funds are 1 btc higher than before => order filled.
newbie
Activity: 27
Merit: 0
March 25, 2014, 01:27:46 PM
#5
No need to reinvent the wheel. Take an existing bot and modify for your needs. I wasted several months on my own code until I dug deeper into what is out there. My code was usable,but still just the basics. With existing, you get the basics for free and you get to build something advanced more quickly.

For nodejs I run Gekko.   Search for it here or Github.


Yess thats a good idea.  Thanks for the pointer, I will take a first look at Gekko.
So I was wondering.. What happens when you see a trading opportunity? Do you place a limit order at one of the open bid-ask prices or do you come in with a market order?  How do you check if the trade was really executed? 
member
Activity: 110
Merit: 10
March 25, 2014, 11:04:09 AM
#4
Quote
I guess most exchanges will ban you, if you fetch prices every second?

Bitstamp will ban you if hit their server more than once a second, unless you can convince them to whitelist your IP.
legendary
Activity: 965
Merit: 1000
March 24, 2014, 06:58:49 AM
#3
I guess most exchanges will ban you, if you fetch prices every second?

I work on java trading code btw and released a lib to fetch prices from some exchanges btw.
newbie
Activity: 30
Merit: 0
March 24, 2014, 04:13:19 AM
#2
No need to reinvent the wheel. Take an existing bot and modify for your needs. I wasted several months on my own code until I dug deeper into what is out there. My code was usable,but still just the basics. With existing, you get the basics for free and you get to build something advanced more quickly.

For nodejs I run Gekko.   Search for it here or Github.
newbie
Activity: 27
Merit: 0
March 24, 2014, 03:33:42 AM
#1
Hi,


I got kind of inspired by all the trading bots offered on this site and now I want to build my own bot. Most of the bots that I have seen here are more user friendly, with a nice interface ect. I think the best way to build my own bot is just some plain script that does the trading and nothing more. I just want to do it myself to get to know the inside outs of trading bots and that I am not reliable to someone else for further improvements. I need some pointers in the right direction and am willing to learn some new skills to do this. At the moment it needs to update and search for trading opportunities every 1 to 5 seconds, but maybe in 1 year time this needs to be considerably faster. So im looking to build something that is scalable on speed, as it becomes harder and harder to beat other players.

At the moment I was thinking to write the code in Node js and javascript. How does this sound?
I am collecting trading data in a mysql database and can do the computations for trading opportunities there. The reason for this is, that I think that this method is less prone to errors. For example, exchange sites api lag sometimes and I need to collect data for when a trade is confirmed ect. Is it better?

Are there any other languages that I could best write my code in?

Thanks and help will be appreciated.
Jump to: