Pages:
Author

Topic: Automated bitcoin arbitrage - page 3. (Read 18895 times)

newbie
Activity: 48
Merit: 0
March 20, 2013, 02:12:53 PM
#19
Does this bot require 2 exchanges for trading to happen? If yes is it possible to do trades with only 1?

Yes it requires 2 exchanges. Arbitrage means "buy at X on a market and sell at X+y on another market at the same time".

http://en.wikipedia.org/wiki/Arbitrage
hero member
Activity: 896
Merit: 532
Former curator of The Bitcoin Museum
March 20, 2013, 01:12:43 PM
#18
I don't intend this to be a dumb question but I fear it will be...

Does this bot require 2 exchanges for trading to happen? If yes is it possible to do trades with only 1?
newbie
Activity: 48
Merit: 0
March 20, 2013, 11:04:06 AM
#17
Nope, it's not a rounding problem and it's not an issue.

The "buy price" given by the program is the maximum price you should buy BTC at.
The "sell price" given by the program is the minimum price you should sell BTC at.

Example with this order book:

Code:
books = {
    'MtGoxEUR':
    {'asks': [{'amount': 1, 'price': 47.0},
              {'amount': 2, 'price': 47.3},
              {'amount': 1, 'price': 48.0},
              {'amount': 3, 'price': 49.0}]},
    'BitcoinCentralEUR':
    {'bids': [{'amount': 1, 'price': 48.2},
              {'amount': 2, 'price': 48.1},
              {'amount': 1, 'price': 48.0},
              {'amount': 5, 'price': 47.9}]}}

Output will be :
Code:
volume: 3.0 BTC buy at 48.0 (MtGoxEUR) sell at 48.0 (BitcoinCentralEUR) 

Note: volume is 3.0 btc, not 4.0 btc (that includes 48.0 price)
full member
Activity: 193
Merit: 100
March 20, 2013, 10:34:49 AM
#16
There is something strange :

2013-03-20 16:31:32,985 [INFO] profit: 0.007277 EUR with volume: 0.010000 BTC - buy at 48.0000 (MtGoxEUR) sell at 48.0000 (BitcoinCentralEUR) ~1.52%

1.52 % with bought at 48 and sell at 48 ... due to rounding ?
full member
Activity: 193
Merit: 100
March 20, 2013, 08:27:50 AM
#15
Indeed but we can also write a good default one ... i'm a beginner in arbitrage domain ...
newbie
Activity: 48
Merit: 0
March 20, 2013, 07:01:13 AM
#14
Now i understand why you didn't put the perc_threshold and profit_threshold in the config file :p

Haha Wink

I would like people to write their own "TraderBot" class and not use the default. I should rename it to SampleTraderBot.
full member
Activity: 193
Merit: 100
March 20, 2013, 06:30:07 AM
#13
Now i understand why you didn't put the perc_threshold and profit_threshold in the config file :p
newbie
Activity: 48
Merit: 0
March 20, 2013, 03:43:54 AM
#12

Of course I set my gox api keys and the bitcoincentral credentials. This is my conf:

Quote
markets = ["MtGoxEUR", "BitcoinCentralEUR"]
observers = ["Logger", "TraderBot", "HistoryDumper"]
market_expiration_time = 120 # in seconds: 2 minutes

...

I think you're crazy to do that... Did you read the code first ? Are you sure that it will not just steal your coins ?

First, in TraderBot.py, you'll see some safeguards, for instance if the expected profit is lower than X and the expected profit percentage is lower than Y then it will not execute transactions. One of these safeguards should block current transaction.

But seriously, it's not a "packaged product", it's more a in-development project released for other developers. If you just run it like this, I guarantee you'll lose money.

If you really want to run it on real exchanges, then help me to write automated tests.
hero member
Activity: 588
Merit: 500
March 20, 2013, 03:33:22 AM
#11
What exactly do I have to do to make it trade? It just does this all the time but no trades are happening, the same stuff as in my first post above. I'm using the newest version from github.

Quote
2013-03-20 08:27:17,214 [INFO] profit: 0.346785 EUR with volume: 3.428300 BTC - buy at 46.4201 (MtGoxEUR) sell at 46.5000 (BitcoinCentralEUR) ~0.22%
2013-03-20 08:27:47,570 [INFO] profit: 0.346785 EUR with volume: 3.428300 BTC - buy at 46.4201 (MtGoxEUR) sell at 46.5000 (BitcoinCentralEUR) ~0.22%
2013-03-20 08:28:19,206 [INFO] profit: 0.346785 EUR with volume: 3.428300 BTC - buy at 46.4201 (MtGoxEUR) sell at 46.5000 (BitcoinCentralEUR) ~0.22%

Of course I set my gox api keys and the bitcoincentral credentials. This is my conf:

Quote
markets = ["MtGoxEUR", "BitcoinCentralEUR"]
observers = ["Logger", "TraderBot", "HistoryDumper"]
market_expiration_time = 120 # in seconds: 2 minutes

...
hero member
Activity: 674
Merit: 500
March 19, 2013, 04:24:30 PM
#10
Aw man, you mean I spent my time building my own arbi-bot (probably a whole lot crappier than yours) for nothing?
Care to explain why you are giving this away for free?  By facilitating the effort required to start arbitraging, you are diminishing your own profits... (and mine  Smiley )

Good arbitrage helps bitcoin economy and helps decentralize markets (e.g. helps other exchanges grow).
legendary
Activity: 1638
Merit: 1001
₪``Campaign Manager´´₪
March 19, 2013, 04:07:44 PM
#9
Hi guys,

I wanted to share my code. It's a bitcoin arbitrage watcher and automated trade software. Written in Python:

https://github.com/maxme/bitcoin-arbitrage

Feedback and pull-requests are welcome Wink

Aw man, you mean I spent my time building my own arbi-bot (probably a whole lot crappier than yours) for nothing?
Care to explain why you are giving this away for free?  By facilitating the effort required to start arbitraging, you are diminishing your own profits... (and mine  Smiley )
administrator
Activity: 3934
Merit: 3143
March 19, 2013, 09:46:13 AM
#8
I actually found it on github first and now came here searching for the announcement thread.

Is the current version working?
I want to start testing today

And also... would like to see btc-e support soon! Great job Smiley.
newbie
Activity: 48
Merit: 0
March 19, 2013, 09:20:03 AM
#7
If you'd like to add ICBIT support, I will be glad to help.

Do you have an HTTP API to get the market depth (order book) ?
newbie
Activity: 48
Merit: 0
March 19, 2013, 09:16:51 AM
#6
I'm running this in test-mode atm. Is it supposed to do this?

Quote
2013-03-18 20:46:12,680 [DEBUG] ticker: MtGoxEUR - {'ask': {'price': 36.97115, 'amount': 3.055}, 'bid': {'price': 36.95, 'amount': 7.68486008}}
2013-03-18 20:46:12,680 [DEBUG] ticker: BitcoinCentralEUR - {'ask': {'price': 37.05425, 'amount': 5.0}, 'bid': {'price': 37.00004, 'amount': 0.321795}}
2013-03-18 20:46:12,700 [INFO] profit: 0.138720 EUR with volume: 5.000000 BTC -buy at 37.0000 (MtGoxEUR) sell at 37.0000 (BitcoinCentralEUR) ~0.07%

Yes, but the verbose mode, is too verbose Wink
hero member
Activity: 896
Merit: 532
Former curator of The Bitcoin Museum
March 19, 2013, 08:10:14 AM
#5
oops, just realised.

"MtGox API url changed"

Redownloaded package from github and boom, back in business!

I wonder why they changed it?
hero member
Activity: 896
Merit: 532
Former curator of The Bitcoin Museum
March 19, 2013, 06:42:09 AM
#4
been getting this non stop all day

Code:
2013-03-19 21:19:57,178 [ERROR] HTTPError, can't update market: MtGoxUSD
2013-03-19 21:19:57,178 [WARNING] Market: MtGoxUSD order book is expired
2013-03-19 21:19:58,427 [ERROR] HTTPError, can't update market: MtGoxUSD
2013-03-19 21:19:58,428 [WARNING] Market: MtGoxUSD order book is expired
hero member
Activity: 588
Merit: 500
March 18, 2013, 02:55:38 PM
#3
I'm running this in test-mode atm. Is it supposed to do this?

Quote
2013-03-18 20:46:12,680 [DEBUG] ticker: MtGoxEUR - {'ask': {'price': 36.97115, 'amount': 3.055}, 'bid': {'price': 36.95, 'amount': 7.68486008}}
2013-03-18 20:46:12,680 [DEBUG] ticker: BitcoinCentralEUR - {'ask': {'price': 37.05425, 'amount': 5.0}, 'bid': {'price': 37.00004, 'amount': 0.321795}}
2013-03-18 20:46:12,700 [INFO] profit: 0.138720 EUR with volume: 5.000000 BTC -buy at 37.0000 (MtGoxEUR) sell at 37.0000 (BitcoinCentralEUR) ~0.07%
2013-03-18 20:46:42,700 [DEBUG] ticker: MtGoxEUR - {'ask': {'price': 36.97115, 'amount': 3.055}, 'bid': {'price': 36.95, 'amount': 7.68486008}}
2013-03-18 20:46:42,700 [DEBUG] ticker: BitcoinCentralEUR - {'ask': {'price': 37.05425, 'amount': 5.0}, 'bid': {'price': 37.00004, 'amount': 0.321795}}
2013-03-18 20:46:42,720 [INFO] profit: 0.138720 EUR with volume: 5.000000 BTC -buy at 37.0000 (MtGoxEUR) sell at 37.0000 (BitcoinCentralEUR) ~0.07%
2013-03-18 20:47:15,361 [DEBUG] ticker: MtGoxEUR - {'ask': {'price': 36.97115, 'amount': 3.055}, 'bid': {'price': 36.95, 'amount': 7.68486008}}
2013-03-18 20:47:15,361 [DEBUG] ticker: BitcoinCentralEUR - {'ask': {'price': 37.05425, 'amount': 5.0}, 'bid': {'price': 37.00004, 'amount': 0.321795}}
2013-03-18 20:47:15,381 [INFO] profit: 0.138720 EUR with volume: 5.000000 BTC -buy at 37.0000 (MtGoxEUR) sell at 37.0000 (BitcoinCentralEUR) ~0.07%
2013-03-18 20:47:45,381 [DEBUG] ticker: MtGoxEUR - {'ask': {'price': 36.97115, 'amount': 3.055}, 'bid': {'price': 36.95, 'amount': 7.68486008}}
2013-03-18 20:47:45,381 [DEBUG] ticker: BitcoinCentralEUR - {'ask': {'price': 37.05425, 'amount': 5.0}, 'bid': {'price': 37.00004, 'amount': 0.321795}}
2013-03-18 20:47:45,401 [INFO] profit: 0.138720 EUR with volume: 5.000000 BTC -buy at 37.0000 (MtGoxEUR) sell at 37.0000 (BitcoinCentralEUR) ~0.07%
2013-03-18 20:48:17,581 [DEBUG] ticker: MtGoxEUR - {'ask': {'price': 36.97115, 'amount': 3.055}, 'bid': {'price': 36.95, 'amount': 7.58486008}}
2013-03-18 20:48:17,581 [DEBUG] ticker: BitcoinCentralEUR - {'ask': {'price': 37.05425, 'amount': 5.0}, 'bid': {'price': 37.00004, 'amount': 0.29454495}}
2013-03-18 20:48:17,601 [INFO] profit: 0.138719 EUR with volume: 5.000000 BTC -buy at 37.0000 (MtGoxEUR) sell at 37.0000 (BitcoinCentralEUR) ~0.07%
2013-03-18 20:48:47,601 [DEBUG] ticker: MtGoxEUR - {'ask': {'price': 36.97115, 'amount': 3.055}, 'bid': {'price': 36.95, 'amount': 7.58486008}}
2013-03-18 20:48:47,601 [DEBUG] ticker: BitcoinCentralEUR - {'ask': {'price': 37.05425, 'amount': 5.0}, 'bid': {'price': 37.00004, 'amount': 0.29454495}}
2013-03-18 20:48:47,621 [INFO] profit: 0.138719 EUR with volume: 5.000000 BTC -buy at 37.0000 (MtGoxEUR) sell at 37.0000 (BitcoinCentralEUR) ~0.07%
2013-03-18 20:49:19,020 [DEBUG] ticker: MtGoxEUR - {'ask': {'price': 36.97115, 'amount': 3.055}, 'bid': {'price': 36.95, 'amount': 7.58486008}}
2013-03-18 20:49:19,020 [DEBUG] ticker: BitcoinCentralEUR - {'ask': {'price': 37.05425, 'amount': 5.0}, 'bid': {'price': 37.00004, 'amount': 0.29454495}}
2013-03-18 20:49:19,040 [INFO] profit: 0.138719 EUR with volume: 5.000000 BTC -buy at 37.0000 (MtGoxEUR) sell at 37.0000 (BitcoinCentralEUR) ~0.07%
2013-03-18 20:49:49,051 [DEBUG] ticker: MtGoxEUR - {'ask': {'price': 36.97115, 'amount': 3.055}, 'bid': {'price': 36.95, 'amount': 7.58486008}}
2013-03-18 20:49:49,051 [DEBUG] ticker: BitcoinCentralEUR - {'ask': {'price': 37.05425, 'amount': 5.0}, 'bid': {'price': 37.00004, 'amount': 0.29454495}}
2013-03-18 20:49:49,061 [INFO] profit: 0.138719 EUR with volume: 5.000000 BTC -buy at 37.0000 (MtGoxEUR) sell at 37.0000 (BitcoinCentralEUR) ~0.07%
2013-03-18 20:50:20,631 [DEBUG] ticker: MtGoxEUR - {'ask': {'price': 36.974, 'amount': 2.0}, 'bid': {'price': 36.97115, 'amount': 15.8547}}
2013-03-18 20:50:20,631 [DEBUG] ticker: BitcoinCentralEUR - {'ask': {'price': 37.05425, 'amount': 5.0}, 'bid': {'price': 37.00004, 'amount': 0.29454495}}
2013-03-18 20:50:20,651 [INFO] profit: 0.126012 EUR with volume: 5.000000 BTC -buy at 37.0000 (MtGoxEUR) sell at 37.0000 (BitcoinCentralEUR) ~0.07%
2013-03-18 20:50:50,651 [DEBUG] ticker: MtGoxEUR - {'ask': {'price': 36.974, 'amount': 2.0}, 'bid': {'price': 36.97115, 'amount': 15.8547}}
2013-03-18 20:50:50,651 [DEBUG] ticker: BitcoinCentralEUR - {'ask': {'price': 37.05425, 'amount': 5.0}, 'bid': {'price': 37.00004, 'amount': 0.29454495}}
2013-03-18 20:50:50,671 [INFO] profit: 0.126012 EUR with volume: 5.000000 BTC -buy at 37.0000 (MtGoxEUR) sell at 37.0000 (BitcoinCentralEUR) ~0.07%
2013-03-18 20:51:22,151 [DEBUG] ticker: MtGoxEUR - {'ask': {'price': 36.974, 'amount': 2.0}, 'bid': {'price': 36.97115, 'amount': 15.8547}}
2013-03-18 20:51:22,151 [DEBUG] ticker: BitcoinCentralEUR - {'ask': {'price': 37.05425, 'amount': 5.0}, 'bid': {'price': 37.00004, 'amount': 0.29454495}}
2013-03-18 20:51:22,161 [INFO] profit: 0.126012 EUR with volume: 5.000000 BTC -buy at 37.0000 (MtGoxEUR) sell at 37.0000 (BitcoinCentralEUR) ~0.07%
2013-03-18 20:51:52,161 [DEBUG] ticker: MtGoxEUR - {'ask': {'price': 36.974, 'amount': 2.0}, 'bid': {'price': 36.97115, 'amount': 15.8547}}
2013-03-18 20:51:52,161 [DEBUG] ticker: BitcoinCentralEUR - {'ask': {'price': 37.05425, 'amount': 5.0}, 'bid': {'price': 37.00004, 'amount': 0.29454495}}
2013-03-18 20:51:52,171 [INFO] profit: 0.126012 EUR with volume: 5.000000 BTC -buy at 37.0000 (MtGoxEUR) sell at 37.0000 (BitcoinCentralEUR) ~0.07%
2013-03-18 20:52:23,512 [DEBUG] ticker: MtGoxEUR - {'ask': {'price': 36.974, 'amount': 2.0}, 'bid': {'price': 36.97115, 'amount': 15.8547}}
2013-03-18 20:52:23,512 [DEBUG] ticker: BitcoinCentralEUR - {'ask': {'price': 37.05425, 'amount': 5.0}, 'bid': {'price': 37.00004, 'amount': 0.29454495}}
2013-03-18 20:52:23,532 [INFO] profit: 0.126012 EUR with volume: 5.000000 BTC -buy at 37.0000 (MtGoxEUR) sell at 37.0000 (BitcoinCentralEUR) ~0.07%
hero member
Activity: 674
Merit: 500
March 16, 2013, 09:25:39 AM
#2
If you'd like to add ICBIT support, I will be glad to help.
newbie
Activity: 48
Merit: 0
March 16, 2013, 08:26:18 AM
#1
Hi guys,

I wanted to share my code. It's a bitcoin arbitrage watcher and automated trade software. Written in Python:

https://github.com/maxme/bitcoin-arbitrage

Feedback and pull-requests are welcome Wink
Pages:
Jump to: