Title: [PHP| BTC-E arbitrage bot Post by: 01BTC10 on June 17, 2013, 06:36:01 AM I paid for this bot but I'm giving it to the community for free.
You need to have some amount of currency in all 3 currencies (USD/LTC/BTC) to use it. Then as you run it, your USD/LTC balance will decrement and your BTC balance will increment. Code: <?php If you enjoy this post you can send me a donation. BTC: 1DB5BC85mqwdQbJaed47tWFpmn96i1YyWn LTC: LahP2YUhSiJQaupn2AYB2iUgRSFg3n57uZ Title: Re: [PHP| BTC-E arbitrage bot Post by: keatonatron on June 17, 2013, 06:46:31 AM Thanks for sharing!
Title: Re: [PHP| BTC-E arbitrage bot Post by: 01BTC10 on June 17, 2013, 06:52:13 AM Some fine tuning need to be done like min/max amount. If you run it on a VPS with low latency then 100ms delay will get the bot a temp ban from BTC-E. Still a very nice code for those who want to learn.
Title: Re: [PHP| BTC-E arbitrage bot Post by: snowcrashed on June 18, 2013, 03:09:22 AM Thank you for sharing. What has your experience been with this bot? Was it successful, did you see a profit? How long have you had this code? Also, I assume it does not output anything until something happens?
Title: Re: [PHP| BTC-E arbitrage bot Post by: 01BTC10 on June 18, 2013, 03:13:05 AM It does log every trade on the screen and return error message.
I did not run it for a very long time. I can't tell if it's profitable. Title: Re: [PHP| BTC-E arbitrage bot Post by: Factory on June 21, 2013, 06:16:22 AM It does log every trade on the screen and return error message. I did not run it for a very long time. I can't tell if it's profitable. Unfortunately, as with any automated system , you would need an extremely large sample size to determine the relative profitability (or lack there of.) Running it in short bursts will likely give you very skewed results based on variance. Unless you have an excellent idea of what you are doing and are willing to risk a large amount of currency to tune it (as well as deal with extended drawdowns), I would recommend staying away from such things. Title: Re: [PHP| BTC-E arbitrage bot Post by: btc-mike on September 04, 2013, 07:33:21 PM Anyone play with this?
I am running on my shared hosting with about 0.1BTC. It seems to make a little bit. Title: Re: [PHP| BTC-E arbitrage bot Post by: imrer on September 04, 2013, 11:44:20 PM Thanks for sharing this bot. ;)
Title: Re: [PHP| BTC-E arbitrage bot Post by: btc-mike on September 13, 2013, 05:11:58 PM I have made another bot that checks multiple paths (based on this ->https://bitcointalk.org/index.php?topic=196313.0 (https://bitcointalk.org/index.php?topic=196313.0)) but I still use this one. This one found a profitable trade path yesterday.
Title: Re: [PHP| BTC-E arbitrage bot Post by: smitelrh on September 14, 2013, 01:19:43 PM Thanks for share :D
Title: Re: [PHP| BTC-E arbitrage bot Post by: mangox on September 17, 2013, 02:49:03 PM Thanks for sharing :)
Title: Re: [PHP| BTC-E arbitrage bot Post by: Jumpy on September 17, 2013, 03:59:53 PM Would anyone be interested in posting the results of running this script for some amount of time? (I'm thinking minimum 3 days).
Notes on what kind of balancing is necessary will be helpful as well. Title: Re: [PHP| BTC-E arbitrage bot Post by: btc-mike on September 17, 2013, 07:48:52 PM Would anyone be interested in posting the results of running this script for some amount of time? (I'm thinking minimum 3 days). Notes on what kind of balancing is necessary will be helpful as well. You want me to test for 3 days and share my settings and results? NO I will share this. 1. As is, the program will time out long before 3 days. The code that pulls the books will error out. I have run it on few hosted systems and they both timed out (one lasted a lot longer). 2. You will end up blacklisted at btc-e if you hit them too hard. Open a support ticket and they can whitelist your IP. Title: Re: [PHP| BTC-E arbitrage bot Post by: 01BTC10 on September 17, 2013, 07:52:21 PM It's easy to fix so it will never time-out on an error but it might give unwanted results. Like I said in my second post you need to adjust the timing so BTC-E won't ban your IP. Mine got banned temporarily a couple time before I got the settings right. It will vary depending on your connection, it wasn't the same on my home connection vs a VPS. Officialy they say once every 10 minutes but if I remember right I was able to use 300ms on my VPS and 100ms on my home connection.
Title: Re: [PHP| BTC-E arbitrage bot Post by: btc-mike on September 17, 2013, 10:05:19 PM Agreed - not too hard to fix.
After I was white-listed, I hit them harder with no issues. You just need to ask to be white-listed. Title: Re: [PHP| BTC-E arbitrage bot Post by: daybyter on September 18, 2013, 08:59:43 AM 100ms? That is crazy ... I never used intervals < 15s in my bots.
It might work for you now, but if all those hundreds of bots switch to such a scheme, the website is blocked ... Title: Re: [PHP| BTC-E arbitrage bot Post by: 01BTC10 on September 18, 2013, 10:48:17 AM 100ms? That is crazy ... I never used intervals < 15s in my bots. 100ms on my home connection is over 300ms in reality.It might work for you now, but if all those hundreds of bots switch to such a scheme, the website is blocked ... Title: Re: [PHP| BTC-E arbitrage bot Post by: tarui on September 19, 2013, 03:24:41 PM so how do I implement this/?
Title: Re: [PHP| BTC-E arbitrage bot Post by: 01BTC10 on September 19, 2013, 04:34:48 PM so how do I implement this/? You need PHP and curl installed then put your BTC-E API key at the appropriate place in the code. Title: Re: [PHP| BTC-E arbitrage bot Post by: Financisto on November 20, 2013, 04:30:03 AM Greetings!
Nice script. Thanks for sharing it. It's been a while since BTC-e, Vircurex and Cryptsy added some more altcoins. BTW, is it possible to add automated (triangular and 2-currency) arbitrage for altcoins pairs (LTC/BTC; NMC/BTC; PPC/BTC; XPM/BTC etc.)? Keep up the good work! Title: Re: [PHP| BTC-E arbitrage bot Post by: 01BTC10 on November 20, 2013, 04:46:37 PM It is not my work. You can contact MadAlpha (https://bitcointalk.org/index.php?action=profile;u=87098)
Title: Re: [PHP| BTC-E arbitrage bot Post by: Timmieman on November 29, 2013, 06:15:45 PM I`ve been trying to get this bot to work though it keeps spitting out the same error:
Code: Warning: file_get_contents(https://btc-e.com/api/2/btc_usd/depth): failed to open stream: Invalid argument in D:\Apps\XAMPP\bot.php on line 118 My IP is not blacklisted or anything, it still pumps out values. Does anyone know how this could be fixed? With best regards, Tim Title: Re: [PHP| BTC-E arbitrage bot Post by: btc-mike on November 29, 2013, 08:18:07 PM Did you make any changes? If so, post the code here.
Is your XAMPP setup correctly? Have you used it successfully with any other programs. Title: Re: [PHP| BTC-E arbitrage bot Post by: Timmieman on November 30, 2013, 04:04:53 PM I did not make any changes as far as i can remember:
Also, if I just enter the link in my URL it puts out the specific data I need, therefore i`m quite confused what the problem might be This is my complete code: Code: <?php Title: Re: [PHP| BTC-E arbitrage bot Post by: btc-mike on December 02, 2013, 03:04:13 AM Code looks like mine.
I think your XAMPP is screwed up. I asked you about it before. Getting the order books is the simple part of accessing BTC-e. Since the bot is tripping up on that, there is probably an issue with your configs. Title: Re: [PHP| BTC-E arbitrage bot Post by: Timmieman on December 02, 2013, 11:35:59 PM I enabled curl in php.ini of XAMPP.
Is theresomething else I should configure? Thanks in advance Title: Re: [PHP| BTC-E arbitrage bot Post by: btc-mike on December 03, 2013, 02:19:41 AM Pulling the order books doesn't require curl. Curl is used later in the program.
I don't know anything about XAMPP setup. Title: Re: [PHP| BTC-E arbitrage bot Post by: Timmieman on December 03, 2013, 10:52:40 AM Thanks in advance It seems to be working now, though it the php explorer it still states Code: Fatal error: Maximum execution time of 30 seconds exceeded in D:\Apps\Wamp\www\bot_mad_livekey.php on line 122 Which is: Code: $orders = file_get_contents('https://btc-e.com/api/2/' . $pair . '/depth'); So it probably stalls on getting the order_book as stated before Maybe this extra information helps somebody to find the solution? I`ll put up a bounty of 0.01BTC for the one that is able to fix it Title: Re: [PHP| BTC-E arbitrage bot Post by: theblazehen on December 23, 2013, 10:52:50 AM Thanks in advance It seems to be working now, though it the php explorer it still states Code: Fatal error: Maximum execution time of 30 seconds exceeded in D:\Apps\Wamp\www\bot_mad_livekey.php on line 122 Which is: Code: $orders = file_get_contents('https://btc-e.com/api/2/' . $pair . '/depth'); So it probably stalls on getting the order_book as stated before Maybe this extra information helps somebody to find the solution? I`ll put up a bounty of 0.01BTC for the one that is able to fix it Are you running it from the command line? It appears that php is limiting the execution time Title: Re: [PHP| BTC-E arbitrage bot Post by: Voodah on December 24, 2013, 02:16:06 AM Hey btc-mike
Are you still running this bot? Has it worked for you? Title: Re: [PHP| BTC-E arbitrage bot Post by: gabbello on December 24, 2013, 08:47:20 AM I'm running the bot with the following settings, but no transactions appear to happen in over 12h (there is also no other message in the console). Is this normal?
BTC-E Arbitrage Bot v0.1 (CTRL+C to exit) Trade amount (min/increment/max): 0.001 / 0.0002 / 0.006 Minimum profit: 1 % Price margin: 1.05 Delay between checks: 1000 ms Min time between trades: 10 s 10:42:03 Balance: 62.9649178 USD, 0.0463 BTC, 1.996 LTC Title: Re: [PHP| BTC-E arbitrage bot Post by: gabbello on December 25, 2013, 07:23:33 PM Ok, I managed to make it work but (at least with the current settings) the algorithm seems to lose money :).
Example of a set of transactions: LTC/BTC sell 2.0563 LTC 0.029 BTC 0.0596327 BTC 25.12.13 15:47 LTC/USD buy 2.0563 LTC 19 USD 39.0697 USD 25.12.13 15:47 BTC/USD sell 0.059 BTC 652.126 USD 38.475434 USD 25.12.13 15:47 So basically at the end of the transactions i'm: BTC: + 0.0006326 LTC: 0 USD: - 0.594266 Since 0.0006326 BTC in USD (at the rate of 652.126) is just -0.4126001202 I lost ~0.2 USD :) What am I mising? Title: Re: [PHP| BTC-E arbitrage bot Post by: btc-mike on December 29, 2013, 05:17:23 PM I haven't used it in months but it did work for me.
I have been using the new code released by miaviator. Timmieman got this one running but also moved on to the new code. Title: Re: [PHP| BTC-E arbitrage bot Post by: Voodah on December 29, 2013, 05:25:05 PM I haven't used it in months but it did work for me. I have been using the new code released by miaviator. Timmieman got this one running but also moved on to the new code. Nice. Thanks! Title: Re: [PHP| BTC-E arbitrage bot Post by: luicon on January 07, 2014, 06:19:03 AM where is the new code?
Title: Re: [PHP| BTC-E arbitrage bot Post by: btc-mike on January 07, 2014, 06:59:15 AM where is the new code? https://bitcointalk.org/index.php?topic=366546.0 Title: Re: [PHP| BTC-E arbitrage bot Post by: JasperDX7 on January 13, 2014, 05:04:15 AM Thanks in advance It seems to be working now, though it the php explorer it still states Code: Fatal error: Maximum execution time of 30 seconds exceeded in D:\Apps\Wamp\www\bot_mad_livekey.php on line 122 Which is: Code: $orders = file_get_contents('https://btc-e.com/api/2/' . $pair . '/depth'); So it probably stalls on getting the order_book as stated before Maybe this extra information helps somebody to find the solution? I`ll put up a bounty of 0.01BTC for the one that is able to fix it php has a default execution time. Try putting this at the top of the script ini_set('max_execution_time', 0); Title: Re: [PHP| BTC-E arbitrage bot Post by: ezvhee on January 14, 2014, 03:47:46 AM does anyone have a made a good result for this bot?
Title: Re: [PHP| BTC-E arbitrage bot Post by: wing_hk on January 16, 2014, 12:41:09 AM I have no idea about this error
Code: PHP Warning: file_get_contents(https://btc-e.com/api/2/ltc_usd/depth): failed to open stream: It come from this line Code: $orders = file_get_contents('https://btc-e.com/api/2/' . $pair . '/depth'); I am running it with "php xxxx.php" in a linux server. Does it mean my location is restricted for API? Title: Re: [PHP| BTC-E arbitrage bot Post by: btc-mike on January 16, 2014, 06:02:42 AM I have no idea about this error Code: PHP Warning: file_get_contents(https://btc-e.com/api/2/ltc_usd/depth): failed to open stream: It come from this line Code: $orders = file_get_contents('https://btc-e.com/api/2/' . $pair . '/depth'); I am running it with "php xxxx.php" in a linux server. Does it mean my location is restricted for API? Does PHP have access to internet? Title: Re: [PHP| BTC-E arbitrage bot Post by: wing_hk on January 16, 2014, 06:13:55 AM Does PHP have access to internet? I believe so because it can retrieve data from BTC-E in the beginning BTC-E Arbitrage Bot v0.1 (CTRL+C to exit) Trade amount (min/increment/max): 0.01 / 0.02 / 0.06 Minimum profit: 1 % Price margin: 1.05 Delay between checks: 200 ms Min time between trades: 10 s 14:11:58 Balance: X USD, X BTC, X LTC I restart it from time to time to make sure API is not banned by BTC-E Title: Re: [PHP| BTC-E arbitrage bot Post by: btc-mike on January 17, 2014, 02:07:58 AM Does the machine running the script have a web browser? If so, what happens when you go to this page?
https://btc-e.com/api/2/ltc_usd/depth You should see an array of the LTC_USD order books. Title: Re: [PHP| BTC-E arbitrage bot Post by: wing_hk on January 17, 2014, 02:26:28 AM It's a command line only server. I can get array successfully by "w3m https://btc-e.com/api/2/ltc_usd/depth".
It's so strange I get another error message last night: Code: PHP Warning: file_get_contents(https://btc-e.com/api/2/ltc_btc/depth): failed to open stream: HTTP request failed! HTTP/1.1 502 Bad Gateway I am trying it with sudo now Title: Re: [PHP| BTC-E arbitrage bot Post by: yj166 on November 01, 2016, 02:20:19 PM hi
Title: Re: [PHP| BTC-E arbitrage bot Post by: Daisy14 on November 01, 2016, 03:49:01 PM Hello there, you know anything about PHP because I don't.
There is no need digging up an old topic if you only want to introduce yourself ;D Just hang around and chat with people. Title: Re: [PHP| BTC-E arbitrage bot Post by: raja2sumi on December 30, 2016, 04:58:15 PM Thats buddy for showing it to us .it will be very helpful and bringing to us the concept of php .it was surely very helpful.
Title: Re: [PHP| BTC-E arbitrage bot Post by: jw4wellness on March 01, 2017, 07:46:23 PM Hi
This is such a great thread. Thank you all for contributing! :) :)You guys are really good with this type of thing. I only wish I knew how to install and run it, since I am new to both bitcoin and programming. I have a website and it seems like I must run this on the website, correct? ??? What is my first or next step, please? Title: Re: [PHP| BTC-E arbitrage bot Post by: szpalata on March 01, 2017, 08:45:47 PM Thanks for sharing, I will try to run it tomorrow and PM you if I have any problems thanks.
|