Bitcoin Forum
April 25, 2024, 09:53:04 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 [3]  All
  Print  
Author Topic: BTC-E + GOX Rolling bot, Rocking bot, Trading bot, Full-Code  (Read 22487 times)
bavoogd
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
April 22, 2014, 03:20:35 PM
 #41

Actually the bot works really fine on linux, it makes some profit,

but do you have any idea then how to change the php settings?
and eventually which settings?

Thanks
1714038784
Hero Member
*
Offline Offline

Posts: 1714038784

View Profile Personal Message (Offline)

Ignore
1714038784
Reply with quote  #2

1714038784
Report to moderator
No Gods or Kings. Only Bitcoin
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714038784
Hero Member
*
Offline Offline

Posts: 1714038784

View Profile Personal Message (Offline)

Ignore
1714038784
Reply with quote  #2

1714038784
Report to moderator
1714038784
Hero Member
*
Offline Offline

Posts: 1714038784

View Profile Personal Message (Offline)

Ignore
1714038784
Reply with quote  #2

1714038784
Report to moderator
Pikespeak_Marol
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
April 30, 2014, 09:34:49 AM
 #42

Ive Removed MTGox from the Bot.

Code is available on Github:

https://github.com/pikespeak/bitcoin-rolling-bot-php
SirGeekalot
Full Member
***
Offline Offline

Activity: 156
Merit: 100


View Profile
May 06, 2014, 02:34:37 PM
 #43

Hi,

I'm getting this error:

Code:
Array
(
    [success] => 0
    [error] => invalid nonce parameter; on key:1399375681, you sent:5
)

Error pulling data.  Error #: 2

can you point me in the direction of fixing it?

i have looked at the code and the nonce should be updating from the Nonce file, but i dont get where its getting the key from.

btc-mike
Hero Member
*****
Offline Offline

Activity: 938
Merit: 1001



View Profile
May 06, 2014, 03:21:26 PM
 #44

Hi,

I'm getting this error:

Code:
Array
(
    [success] => 0
    [error] => invalid nonce parameter; on key:1399375681, you sent:5
)

Error pulling data.  Error #: 2

can you point me in the direction of fixing it?

i have looked at the code and the nonce should be updating from the Nonce file, but i dont get where its getting the key from.

I didn't use this version much but had nonce problems on other code form miaviator.

I did this and it worked

Code:
//Create nonce
$mt = explode(' ', microtime());
$nonce = $mt[1];
SirGeekalot
Full Member
***
Offline Offline

Activity: 156
Merit: 100


View Profile
May 07, 2014, 07:04:12 AM
 #45

Cheers,

That worked a charm.

bavoogd
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
May 07, 2014, 10:22:55 AM
 #46

Hi there,

I changed the microamount for the micro roll engine,
but it keeps trading only 0.1 LTC
Any suggestions?
SirGeekalot
Full Member
***
Offline Offline

Activity: 156
Merit: 100


View Profile
May 07, 2014, 01:29:24 PM
 #47

What are the references to the Programs at the top of the Bot for?

i cant find anything to do with them in the Configuration.

btc-mike
Hero Member
*****
Offline Offline

Activity: 938
Merit: 1001



View Profile
May 07, 2014, 01:56:55 PM
 #48

Hi there,

I changed the microamount for the micro roll engine,
but it keeps trading only 0.1 LTC
Any suggestions?

keep trying

What are the references to the Programs at the top of the Bot for?

i cant find anything to do with them in the Configuration.

The code was miaviator's personal project and he was nice enough to share. Comments may be missing or just plain wrong.
cpgeek
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
May 07, 2014, 04:48:04 PM
Last edit: May 07, 2014, 04:59:41 PM by cpgeek
 #49

When i run this bot, I keep getting the error
Code:
PHP Notice:  Undefined index: return in /root/bitcoin-rolling-bot-php-master/arbot.php on line 513
PHP Warning:  Invalid argument supplied for foreach() in /root/bitcoin-rolling-bot-php-master/arbot.php on line 513

the line of code it indicates is the second line in this block.

Code:
                if ($BALANCE) $BTCremaining = $BTC*($currentBalanceBTC-$reBalanceBTC);
                foreach ( $TradeHistory['return'] as $key => $value){
                //DEBUG use this information to calculate trades/costs/profits
                        if ( $value['type'] == $exchangeBuySell[0] && $BTCremaining >= $minBidBTC  ) {
                                $costBalance['total'] = $costBalance['total'] + $value['rate']*$value['amount'];
                                $costBalance['shares'] = $costBalance['shares'] + $value['amount'];//$amountTrade[0]; Total shares analysed not / spread
                                $BTCremaining = $BTCremaining - $value['amount'];
                                $countBuys++;
                        }
                        /*
                        {
        "success":1,
        "return":{
                "166830":{
                        "pair":"btc_usd",
                        "type":"sell",
                        "amount":1,
                        "rate":1,
                        "order_id":343148,
                        "is_your_order":1,
                        "timestamp":1342445793
                }
        }
}*/

I don't know php at all so I was hoping someone might be able to help me with this... it doesn't seem to want to make any trades and simply reiterates when it reaches this line.  can someone please help me out with debugging this?

upon asking a code ninja I know about the issue, he says that $TradeHistory doesnt have the 'return' key populated
so the foreach gets a null (or whatever php uses), and promptly goes 'wtf?' but i'm still clueless about how to repair it.
miaviator (OP)
Donator
Hero Member
*
Offline Offline

Activity: 686
Merit: 519


It's for the children!


View Profile WWW
May 07, 2014, 07:18:42 PM
 #50

What are the references to the Programs at the top of the Bot for?

i cant find anything to do with them in the Configuration.




I had developed several engines and releases of this project for different customers.   Most of the notes and comment blocks related to that.

When I released the base engine publicly I had to remove any code blocks which were sold or custom designed for buyers.

Igloro
Newbie
*
Offline Offline

Activity: 10
Merit: 0


View Profile WWW
May 12, 2014, 10:46:52 AM
 #51

Maybe someone has modified version Which Logs data into Mysql? So the bot can be turned as cronjob? lets say each minute, with 1-many iterations depends on sleep between iterations. Smiley
howardb
Hero Member
*****
Offline Offline

Activity: 574
Merit: 500


View Profile
June 21, 2014, 03:22:00 PM
 #52

Whats the theoretical basis for this bot? I'm familiar with margin bots, how does this one make it's profit?
miaviator (OP)
Donator
Hero Member
*
Offline Offline

Activity: 686
Merit: 519


It's for the children!


View Profile WWW
June 22, 2014, 04:53:57 AM
 #53

Whats the theoretical basis for this bot? I'm familiar with margin bots, how does this one make it's profit?

I almost hope it doesn't now days!

When btce first got USD/BTC/LTC there were some interesting discrepancies in the order book.  Normally in an HFT market these are handled by the exchange or a close third party.

Basically the bot was designed to exploit differences in the USD/BTC BTC/LTC LTC/USD trade books.  Using the following paths:

BULB -> Trade BTC for USD, Trade USD for LTC, Trade LTC for BTC
You would end up with more btc than you started with!

BLUB -> Trade BTC for LTC, Trade LTC for USD, Trade USD for BTC.

You could also start and end in USD with the bot.

The difference between this code and most other bot codes was the recursive order sizing.

The bot would parse the order book from B to U to L to B or any other direction, find the MAXIMUM trade size for the entire trade leg, then execute the trade leg. 

The practice of currency arbitrage especially for BTC was a lot more solid back then.  You used to be able to snail mail a money order to CampBX, exchange it for BTC, move the BTC to another exchange, trade the BTC for USD, withdraw the USD and repeat and make 2-8% profit per trade route!

howardb
Hero Member
*****
Offline Offline

Activity: 574
Merit: 500


View Profile
June 22, 2014, 07:15:14 AM
Last edit: June 23, 2014, 03:25:21 PM by howardb
 #54

Whats the theoretical basis for this bot? I'm familiar with margin bots, how does this one make it's profit?

I almost hope it doesn't now days!

When btce first got USD/BTC/LTC there were some interesting discrepancies in the order book.  Normally in an HFT market these are handled by the exchange or a close third party.

Basically the bot was designed to exploit differences in the USD/BTC BTC/LTC LTC/USD trade books.  Using the following paths:

BULB -> Trade BTC for USD, Trade USD for LTC, Trade LTC for BTC
You would end up with more btc than you started with!

BLUB -> Trade BTC for LTC, Trade LTC for USD, Trade USD for BTC.

You could also start and end in USD with the bot.

The difference between this code and most other bot codes was the recursive order sizing.

The bot would parse the order book from B to U to L to B or any other direction, find the MAXIMUM trade size for the entire trade leg, then execute the trade leg.  

The practice of currency arbitrage especially for BTC was a lot more solid back then.  You used to be able to snail mail a money order to CampBX, exchange it for BTC, move the BTC to another exchange, trade the BTC for USD, withdraw the USD and repeat and make 2-8% profit per trade route!
Oh, so it's really just an ordinary triangular trade bot with optimised trade size? Whats all the micro trading then?
I gave it BTC0.5 to play with for 48 hours and can certainly confirm it doesn't do much of anything now! down $5

Worth adding I have a very fast c++ triangular arb bot running on btc-e and it never see's an opportunity. This leads me to believe BTC-e have internalised the arbitrage opportunity (ie are running their own or a partners bot internally with much faster access).

Need a ratio of better than 1.006 to be worth trading, these are typical values at btc-e:
no profit 0.995522
ltc/usd+btc/ltc+usd/btc
no profit 1.001279
nmc/usd+btc/nmc+usd/btc
no profit 0.995022
nvc/usd+btc/nvc+usd/btc
no profit 0.980696
btc/eur+ltc/btc+eur/ltc
no profit 0.989050
ltc/eur+btc/ltc+eur/btc
no profit 0.990046
btc/cnh+ltc/btc+cnh/ltc
no profit 0.989207
ltc/cnh+btc/ltc+cnh/btc
no profit 0.986928
btc/rur+ltc/btc+rur/ltc
no profit 0.977465
ltc/rur+btc/ltc+rur/btc
no profit 0.993305
ltc/btc+usd/ltc+btc/usd
no profit 0.995522
ppc/usd+btc/ppc+usd/btc
no profit 0.997972
 
Also, the very fact that the ratio is usually just below 1 is further proof of internalisation, as only an arb bot that did not have trade costs could keep the ratio's at that level.
BlueComb
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
September 20, 2014, 06:07:49 PM
Last edit: September 20, 2014, 06:31:15 PM by BlueComb
 #55

Hi, I'm new user here and I need your help with this bot. It gives me a lot of error outputs. How can I solve that?
Code:
roko@roko-Aspire-5830TG:~/Pobrane/bitcoin_bot$ php arbot.php 
PHP Notice:  Undefined variable: EMA in /home/roko/Pobrane/bitcoin_bot/engine_ema.php on line 9
PHP Notice:  Undefined variable: BALANCE in /home/roko/Pobrane/bitcoin_bot/engine_balance.php on line 14
PHP Notice:  Undefined variable: JOSH in /home/roko/Pobrane/bitcoin_bot/engine_josh.php on line 9
PHP Notice:  Undefined variable: microSellDivisor in /home/roko/Pobrane/bitcoin_bot/arbot.php on line 145
PHP Notice:  Undefined variable: microAmount in /home/roko/Pobrane/bitcoin_bot/arbot.php on line 145
PHP Warning:  Division by zero in /home/roko/Pobrane/bitcoin_bot/arbot.php on line 145
PHP Notice:  Undefined variable: microBuyDivisor in /home/roko/Pobrane/bitcoin_bot/arbot.php on line 145
PHP Notice:  Undefined variable: microAmount in /home/roko/Pobrane/bitcoin_bot/arbot.php on line 145
PHP Warning:  Division by zero in /home/roko/Pobrane/bitcoin_bot/arbot.php on line 145
PHP Notice:  Undefined variable: microProfit in /home/roko/Pobrane/bitcoin_bot/arbot.php on line 397
PHP Notice:  Undefined variable: reBalanceBTC in /home/roko/Pobrane/bitcoin_bot/arbot.php on line 480
PHP Notice:  Undefined variable: currentBalanceBTC in /home/roko/Pobrane/bitcoin_bot/arbot.php on line 480
PHP Notice:  Undefined index: return in /home/roko/Pobrane/bitcoin_bot/arbot.php on line 481
PHP Warning:  Invalid argument supplied for foreach() in /home/roko/Pobrane/bitcoin_bot/arbot.php on line 481





**********************************************************
----------------------------------------------------------
**********************************************************
  Started:20140920 20:01:02
  Current:20140920 20:01:05
  Runtime: 0:Days 0:H 0:M 3:S
----------------------------------------------------------
Iteration: 2 Ticker:$399.05 *****StopLoss:NO INVESTMENT*****
----------------------------------------------------------
---------------- Trade Target Information ----------------
Threshold: Fees:0.02% Trades:13.3 Micro:8.15
PHP Notice:  Undefined variable: MICRO in /home/roko/Pobrane/bitcoin_bot/arbot.php on line 567
----------------------------------------------------------
------------------- Funds  Information -------------------
 Cash Out: BTC:0.01 USD:$2.71
  Balance: BTC:0.01 USD:$0
 Maximums: BTC:1 USD:$500
PHP Notice:  Undefined variable: microAmount in /home/roko/Pobrane/bitcoin_bot/arbot.php on line 579
PHP Notice:  Undefined variable: engineSellDivisor in /home/roko/Pobrane/bitcoin_bot/arbot.php on line 585
PHP Notice:  Undefined variable: engineBuyDivisor in /home/roko/Pobrane/bitcoin_bot/arbot.php on line 585
PHP Notice:  Undefined variable: engineProfit in /home/roko/Pobrane/bitcoin_bot/arbot.php on line 585
 EngineAmount:0 Sells: Buys: Profit:
  Tradable: BTC:0.01 USD:$0
----------------------------------------------------------
------------------- Order Information  -------------------
     Open: Buys:0 Sells:0
   Placed:Valid:0 Invalid:0 Cancelled:0
Completed: Buys:0 Total:0 Sells:0
 Last Run: Buys:0 Total:0 Sells:0
----------------------------------------------------------
------------------- Cost Information  -------------------
Order Costs: Not holding any BTC!
----------------------------------------------------------
------------------- Profit Information  -------------------
Initial Balance: BTC:0.01 USD:0 Rate:399.05  
Current Balance: BTC:0.01 USD:0 Rate:399.05
     Difference: BTC:0 USD:0 Rate:0
     Profit From Trading:0  
        Unrealized Gains:0  
 BTC Appreciation: Start:2.71 Current:2.71 Difference:0
  Program Value:0
----------------------------------------------------------
PHP Notice:  Undefined variable: MICRO in /home/roko/Pobrane/bitcoin_bot/arbot.php on line 717
........^C
roko@roko-Aspire-5830TG:~/Pobrane/bitcoin_bot$ cd ..
Thanks a lot! Smiley
edit: I'm running Xubuntu 14.04 with PHP 5.5.9
miaviator (OP)
Donator
Hero Member
*
Offline Offline

Activity: 686
Merit: 519


It's for the children!


View Profile WWW
September 20, 2014, 10:53:00 PM
 #56

I don't know what you did there.  It's like you activated all of the engine's running code without activating an engines variables?

BlueComb
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
September 21, 2014, 10:31:28 AM
Last edit: September 21, 2014, 05:04:23 PM by BlueComb
 #57

I don't know what you did there.  It's like you activated all of the engine's running code without activating an engines variables?
I'm sorry to say that, but I'm totally noob in programming and coding, so I'll put here as much info as I can.
-I've put to bot as many "patches" as I could. In fact - messed this thing up. So today I've downloaded fresh zip file from github and I'm working on it now.
-Config.php filled with my API data, arbot.php set to run EMA engine.
-Fixed nonce bug
Code:
Array
(
    [success] => 0
    [error] => invalid nonce parameter; on key:1399375681, you sent:5
)

Error pulling data.  Error #: 2

Code:
//Create nonce
$mt = explode(' ', microtime());
$nonce = $mt[1];
Despite of this I get still the same errors:
Code:
PHP Notice:  Undefined variable: EMA in /home/roko/Pobrane/bitcoin-rolling-bot-php-master/engine_ema.php on line 9
PHP Notice:  Undefined variable: BALANCE in /home/roko/Pobrane/bitcoin-rolling-bot-php-master/engine_balance.php on line 14
PHP Notice:  Undefined variable: JOSH in /home/roko/Pobrane/bitcoin-rolling-bot-php-master/engine_josh.php on line 9
PHP Notice:  Undefined variable: microSellDivisor in /home/roko/Pobrane/bitcoin-rolling-bot-php-master/arbot.php on line 177
PHP Notice:  Undefined variable: microAmount in /home/roko/Pobrane/bitcoin-rolling-bot-php-master/arbot.php on line 177
PHP Warning:  Division by zero in /home/roko/Pobrane/bitcoin-rolling-bot-php-master/arbot.php on line 177
PHP Notice:  Undefined variable: microBuyDivisor in /home/roko/Pobrane/bitcoin-rolling-bot-php-master/arbot.php on line 177
PHP Notice:  Undefined variable: microAmount in /home/roko/Pobrane/bitcoin-rolling-bot-php-master/arbot.php on line 177
PHP Warning:  Division by zero in /home/roko/Pobrane/bitcoin-rolling-bot-php-master/arbot.php on line 177
Building EMA1 - Waiting for 5 more tickers
 ........
Building EMA1 - Waiting for 4 more tickers
 ........
Building EMA1 - Waiting for 3 more tickers
 ...................................
Building EMA1 - Waiting for 2 more tickers
 ....
Building EMA1 - Waiting for 1 more tickers
 ....
...
Building EMA2 - Waiting for 6 more tickers
 ......
Building EMA2 - Waiting for 5 more tickers
 ....
Building EMA2 - Waiting for 4 more tickers
 ........
Building EMA2 - Waiting for 3 more tickers
 ...........
Building EMA2 - Waiting for 2 more tickers
 ..
Building EMA2 - Waiting for 1 more tickers
 ....
Building EMA3 - Waiting for 11 more tickers
 .......
Building EMA3 - Waiting for 10 more tickers
 ..............
..................
Building EMA3 - Waiting for 9 more tickers
 ........................
Building EMA3 - Waiting for 8 more tickers
 .................
.........
Building EMA3 - Waiting for 7 more tickers
 .........
Building EMA3 - Waiting for 6 more tickers
 ....
Building EMA3 - Waiting for 5 more tickers
 .....
Building EMA3 - Waiting for 4 more tickers
 ..
Building EMA3 - Waiting for 3 more tickers
 ........
Building EMA3 - Waiting for 2 more tickers
 .......
Building EMA3 - Waiting for 1 more tickers
 ..PHP Notice:  Undefined variable: microProfit in /home/roko/Pobrane/bitcoin-rolling-bot-php-master/arbot.php on line 429
PHP Notice:  Undefined index: return in /home/roko/Pobrane/bitcoin-rolling-bot-php-master/arbot.php on line 513
PHP Warning:  Invalid argument supplied for foreach() in /home/roko/Pobrane/bitcoin-rolling-bot-php-master/arbot.php on line 513

**********************************************************
----------------------------------------------------------
**********************************************************
  Started:20140921 11:32:30
  Current:20140921 11:36:01
  Runtime: 0:Days 0:H 3:M 31:S
----------------------------------------------------------
Iteration: 2 Ticker:$383 *****StopLoss:NO INVESTMENT*****
----------------------------------------------------------
---------------- Trade Target Information ----------------
Threshold: Fees:0.2% Trades:101.82 Micro:95.75
PHP Notice:  Undefined variable: MICRO in /home/roko/Pobrane/bitcoin-rolling-bot-php-master/arbot.php on line 599
----------------------------------------------------------
------------------- Funds  Information -------------------
 Cash Out: BTC:0.01 USD:$2.6
  Balance: BTC:0.01 USD:$0
 Maximums: BTC:1 USD:$500
PHP Notice:  Undefined variable: microAmount in /home/roko/Pobrane/bitcoin-rolling-bot-php-master/arbot.php on line 611
PHP Notice:  Undefined variable: engineSellDivisor in /home/roko/Pobrane/bitcoin-rolling-bot-php-master/arbot.php on line 617
PHP Notice:  Undefined variable: engineBuyDivisor in /home/roko/Pobrane/bitcoin-rolling-bot-php-master/arbot.php on line 617
PHP Notice:  Undefined variable: engineProfit in /home/roko/Pobrane/bitcoin-rolling-bot-php-master/arbot.php on line 617
 EngineAmount:0 Sells: Buys: Profit:
  Tradable: BTC:0.01 USD:$0
----------------------------------------------------------
------------------- Order Information  -------------------
     Open: Buys:0 Sells:0
   Placed:Valid:0 Invalid:0 Cancelled:0
Completed: Buys:0 Total:0 Sells:0
 Last Run: Buys:0 Total:0 Sells:0
----------------------------------------------------------
------------------- Cost Information  -------------------
Order Costs: Not holding any BTC!
----------------------------------------------------------
------------------- Profit Information  -------------------
Initial Balance: BTC:0.01 USD:0 Rate:383  
Current Balance: BTC:0.01 USD:0 Rate:383
     Difference: BTC:0 USD:0 Rate:0
     Profit From Trading:0  
        Unrealized Gains:0  
 BTC Appreciation: Start:2.6 Current:2.6 Difference:0
  Program Value:0
----------------------------------------------------------
PHP Notice:  Undefined variable: MICRO in /home/roko/Pobrane/bitcoin-rolling-bot-php-master/arbot.php on line 749
.PHP Notice:  Undefined variable: microProfit in /home/roko/Pobrane/bitcoin-rolling-bot-php-master/arbot.php on line 429
PHP Notice:  Undefined index: return in /home/roko/Pobrane/bitcoin-rolling-bot-php-master/arbot.php on line 513
PHP Warning:  Invalid argument supplied for foreach() in /home/roko/Pobrane/bitcoin-rolling-bot-php-master/arbot.php on line 513
I really don't know if something is missing or wrong in my system. I'm glad you want to help me Smiley
edit: I've decided to install another Linux distro, maybe it will help Tongue
BTC Turkiye
Sr. Member
****
Offline Offline

Activity: 472
Merit: 254


Anlik Coin Fiyatlari BTCkur.com


View Profile WWW
November 04, 2014, 06:51:16 PM
 #58

1- Does this still work?
2- Which areas we need to change to make it work? Right now If I just save the code as index.php and view it in a browser, it shows me a blank screen.
3- What is the easiest and most simple way to run this?

Thanks for your help

Farklı Borsaların Anlık Bitcoin, Litecoin, Ethereum ve Bitcoin Cash Kurunu Takip Edebilirsiniz.
BTCkur.com
ildandi
Newbie
*
Offline Offline

Activity: 19
Merit: 0


View Profile
November 11, 2014, 11:44:25 PM
 #59

I unzipped all files, edited config file for set BTC-e APIs but when I run arbor.php still loading.... I'm using MAMP

Thanks
miaviator (OP)
Donator
Hero Member
*
Offline Offline

Activity: 686
Merit: 519


It's for the children!


View Profile WWW
November 12, 2014, 05:26:41 AM
 #60

1- Does this still work?
2- Which areas we need to change to make it work? Right now If I just save the code as index.php and view it in a browser, it shows me a blank screen.
3- What is the easiest and most simple way to run this?

Thanks for your help

I still can't believe this code is still being looked at and used!

I have no idea on a simple way to run it, I'd call a PHP developer to get it running at this point.

Pages: « 1 2 [3]  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!