Pages:
Author

Topic: [PHP| BTC-E arbitrage bot (Read 22047 times)

sr. member
Activity: 686
Merit: 253
March 01, 2017, 04:45:47 PM
#48
Thanks for sharing, I will try to run it tomorrow and PM you if I have any problems thanks.
newbie
Activity: 1
Merit: 0
March 01, 2017, 03:46:23 PM
#47
Hi
This is such a great thread. Thank you all for contributing! Smiley
 :)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? Huh

What is my first or next step, please?
member
Activity: 70
Merit: 10
December 30, 2016, 12:58:15 PM
#46
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.
full member
Activity: 238
Merit: 100
November 01, 2016, 11:49:01 AM
#45
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 Grin

Just hang around and chat with people.
newbie
Activity: 1
Merit: 0
November 01, 2016, 10:20:19 AM
#44
hi
full member
Activity: 182
Merit: 100
January 16, 2014, 10:26:28 PM
#43
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
 in /home/myname/script/btc-e.php on line 118

I am trying it with sudo now
hero member
Activity: 938
Merit: 1001
January 16, 2014, 10:07:58 PM
#42
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.
full member
Activity: 182
Merit: 100
January 16, 2014, 02:13:55 AM
#41
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

hero member
Activity: 938
Merit: 1001
January 16, 2014, 02:02:42 AM
#40
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:
HTTP request failed! HTTP/1.1 520 Origin Error

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?
full member
Activity: 182
Merit: 100
January 15, 2014, 08:41:09 PM
#39
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:
HTTP request failed! HTTP/1.1 520 Origin Error

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?
newbie
Activity: 8
Merit: 0
January 13, 2014, 11:47:46 PM
#38
does anyone have a made a good result for this bot?
newbie
Activity: 37
Merit: 0
January 13, 2014, 01:04:15 AM
#37
Could anyone explain me the proper settings for either XAMP or WAMP?

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

# Time Memory Function Location
1 0.0007 307720 {main}( ) ..\bot_mad_livekey.php:0
2 0.0007 310592 main_loop( ) ..\bot_mad_livekey.php:283
3 29.8922 822544 order_book( ) ..\bot_mad_livekey.php:199


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);
sr. member
Activity: 262
Merit: 250
January 07, 2014, 02:19:03 AM
#35
where is the new code?
sr. member
Activity: 266
Merit: 250
December 29, 2013, 01:25:05 PM
#34
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!
hero member
Activity: 938
Merit: 1001
December 29, 2013, 01:17:23 PM
#33
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.
member
Activity: 116
Merit: 11
December 25, 2013, 03:23:33 PM
#32
Ok, I managed to make it work but (at least with the current settings) the algorithm seems to lose money Smiley.

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 Smiley

What am I mising?


member
Activity: 116
Merit: 11
December 24, 2013, 04:47:20 AM
#31
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
sr. member
Activity: 266
Merit: 250
December 23, 2013, 10:16:06 PM
#30
Hey btc-mike

Are you still running this bot?

Has it worked for you?
full member
Activity: 194
Merit: 100
December 23, 2013, 06:52:50 AM
#29
Could anyone explain me the proper settings for either XAMP or WAMP?

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

# Time Memory Function Location
1 0.0007 307720 {main}( ) ..\bot_mad_livekey.php:0
2 0.0007 310592 main_loop( ) ..\bot_mad_livekey.php:283
3 29.8922 822544 order_book( ) ..\bot_mad_livekey.php:199


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
Pages:
Jump to: