DobZombie
|
|
March 20, 2013, 11:54:46 PM |
|
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/ArbitrageI told you it was a stupid question Also, I'm getting this A LOT Traceback (most recent call last): File "arbitrage.py", line 186, in <module> main() File "arbitrage.py", line 183, in main arbitrer.loop() File "arbitrage.py", line 157, in loop self.depths = self.update_depths() File "arbitrage.py", line 118, in update_depths depths[market.name] = market.get_depth() File "E:\botEUR\src\public_markets\market.py", line 20, in get_depth self.ask_update_depth() File "E:\botEUR\src\public_markets\market.py", line 31, in ask_update_depth except HTTPError: NameError: global name 'HTTPError' is not defined
what am I doin wrong? Is it possible for this error to come up if the network is congested? Also, It takes about an hour or more for this to come up
|
Tip Me if believe BTC1 will hit $1 Million by 2030 1DobZomBiE2gngvy6zDFKY5b76yvDbqRra
|
|
|
maxme (OP)
Newbie
Offline
Activity: 48
Merit: 0
|
|
March 21, 2013, 07:14:36 AM |
|
Also, I'm getting this A LOT Traceback (most recent call last): File "arbitrage.py", line 186, in <module> main() File "arbitrage.py", line 183, in main arbitrer.loop() File "arbitrage.py", line 157, in loop self.depths = self.update_depths() File "arbitrage.py", line 118, in update_depths depths[market.name] = market.get_depth() File "E:\botEUR\src\public_markets\market.py", line 20, in get_depth self.ask_update_depth() File "E:\botEUR\src\public_markets\market.py", line 31, in ask_update_depth except HTTPError: NameError: global name 'HTTPError' is not defined
what am I doin wrong? Is it possible for this error to come up if the network is congested? Also, It takes about an hour or more for this to come up You're doing nothing, wrong. That was my bad, update the code. And yes it come from no-responding websites
|
|
|
|
Khertan
|
|
March 21, 2013, 10:56:18 AM Last edit: March 21, 2013, 02:08:16 PM by Khertan |
|
Thx for explanations, i understand it after reading a bit more the code.
Also i was thinking of withdraw btc between exchanges place. Example : buy one btc from bitcoin-central, sell at mtgox, withdraw one btc from bitcoincentral to mtgox 1 btc.
Did you think that a bad idea ?
It ll be more interesting if we can also transfer fund in euros between market, but that s not possible from api.
|
|
|
|
w1R903
|
|
March 22, 2013, 03:48:01 AM |
|
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/ArbitrageNo, it certainly doesn't require 2 exchanges. There are thousands of people doing cross-currency arbitrage as we write this. See: http://en.wikipedia.org/wiki/Triangular_arbitrage This can be done in a single exchange. And cross-currency arbitrage is getting quite popular in exchanges with several virtual and fiat currencies, like vircurex and btc-e. A market is not synonymous with "an exchange". Each exchange has multiple markets (usually): USD-BTC, EUR-BTC, LTC-BTC, etc.
|
4096R/F5EA0017
|
|
|
Fireball
|
|
March 22, 2013, 09:53:55 AM |
|
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/ArbitrageNo, it certainly doesn't require 2 exchanges. There are thousands of people doing cross-currency arbitrage as we write this. See: http://en.wikipedia.org/wiki/Triangular_arbitrage This can be done in a single exchange. And cross-currency arbitrage is getting quite popular in exchanges with several virtual and fiat currencies, like vircurex and btc-e. A market is not synonymous with "an exchange". Each exchange has multiple markets (usually): USD-BTC, EUR-BTC, LTC-BTC, etc. And of course, spot/futures arbitrage
|
|
|
|
DobZombie
|
|
March 25, 2013, 11:38:56 AM |
|
okay, So I was getting this Traceback (most recent call last): File "arbitrage.py", line 186, in <module> main() File "arbitrage.py", line 183, in main arbitrer.loop() File "arbitrage.py", line 159, in loop self.tick() File "arbitrage.py", line 150, in tick self.arbitrage_opportunity(kmarket1, market1["asks"][0], kmarket2, market2["bids"][0]) File "arbitrage.py", line 113, in arbitrage_opportunity perc2, weighted_buyprice, weighted_sellprice) File "E:\BotEUR\src\observers\traderbot.py", line 63, in opportunity if volume < config.min_tx_volume: AttributeError: 'module' object has no attribute 'min_tx_volume'
So I added this to the config.py min_tx_volume = 0 # in BTC But now it does this 2013-03-25 21:36:54,994 [DEBUG] ticker: MtGoxEUR - {'ask': {'price': 56.29, 'amount': 10.0}, 'bid': {'price': 56.09712, 'amount': 0.16727}} 2013-03-25 21:36:54,996 [DEBUG] ticker: BitcoinCentralEUR - {'ask': {'price': 59.255, 'amount': 10.0}, 'bid': {'price': 57.70004, 'amount': 1.21748}} 2013-03-25 21:37:08,430 [WARNING] Can't automate this trade, last trade occured 116.200000048 seconds ago 2013-03-25 21:37:40,948 [DEBUG] ticker: MtGoxEUR - {'ask': {'price': 56.29, 'amount': 10.0}, 'bid': {'price': 56.09712, 'amount': 0.16727}} 2013-03-25 21:37:40,950 [DEBUG] ticker: BitcoinCentralEUR - {'ask': {'price': 59.255, 'amount': 10.0}, 'bid': {'price': 57.70004, 'amount': 1.21748}} None 2013-03-25 21:38:28,839 [DEBUG] ticker: MtGoxEUR - {'ask': {'price': 56.29, 'amount': 10.0}, 'bid': {'price': 56.09712, 'amount': 0.16727}} 2013-03-25 21:38:28,841 [DEBUG] ticker: BitcoinCentralEUR - {'ask': {'price': 59.255, 'amount': 10.0}, 'bid': {'price': 57.70004, 'amount': 1.21748}} 2013-03-25 21:38:36,418 [WARNING] Can't automate this trade, last trade occured 44.8589999676 seconds ago 2013-03-25 21:39:08,789 [DEBUG] ticker: MtGoxEUR - {'ask': {'price': 56.29, 'amount': 10.0}, 'bid': {'price': 56.09712, 'amount': 0.16727}} 2013-03-25 21:39:08,790 [DEBUG] ticker: BitcoinCentralEUR - {'ask': {'price': 59.255, 'amount': 10.0}, 'bid': {'price': 57.70004, 'amount': 1.21748}} 2013-03-25 21:39:16,447 [WARNING] Can't automate this trade, last trade occured 84.8870000839 seconds ago I make for a good beta tester
|
Tip Me if believe BTC1 will hit $1 Million by 2030 1DobZomBiE2gngvy6zDFKY5b76yvDbqRra
|
|
|
Khertan
|
|
March 25, 2013, 10:27:51 PM |
|
Just to be sure, you use the TraderBotSim or you are ready to lose money and btc ?
|
|
|
|
DobZombie
|
|
March 26, 2013, 02:39:08 PM Last edit: March 26, 2013, 03:47:51 PM by DobZombie |
|
I tried the traderbotsim in an older build and it didn't work. But I works for me in the recent revision. I've tried using the traderbot and all I get it this 2013-03-27 00:34:53,190 [DEBUG] ticker: MtGoxEUR - {'ask': {'price': 62.47, 'amount': 4.0}, 'bid': {'price': 61.9, 'amount': 32.50906816}} 2013-03-27 00:34:53,190 [DEBUG] ticker: BitcoinCentralEUR - {'ask': {'price': 64.92, 'amount': 49.16}, 'bid': {'price': 64.41004, 'amount': 1.279645}} None 2013-03-27 00:35:37,321 [DEBUG] ticker: MtGoxEUR - {'ask': {'price': 62.47, 'amount': 4.0}, 'bid': {'price': 61.9, 'amount': 32.50906816}} 2013-03-27 00:35:37,321 [DEBUG] ticker: BitcoinCentralEUR - {'ask': {'price': 64.9, 'amount': 5.0}, 'bid': {'price': 64.41004, 'amount': 1.279645}} 2013-03-27 00:35:44,546 [WARNING] Can't automate this trade, last trade occured 43.9949998856 seconds ago 2013-03-27 00:36:17,240 [DEBUG] ticker: MtGoxEUR - {'ask': {'price': 62.47, 'amount': 4.0}, 'bid': {'price': 61.9, 'amount': 32.50906816}} 2013-03-27 00:36:17,242 [DEBUG] ticker: BitcoinCentralEUR - {'ask': {'price': 64.9, 'amount': 5.0}, 'bid': {'price': 64.41004, 'amount': 1.279645}} 2013-03-27 00:36:26,641 [WARNING] Can't automate this trade, last trade occured 86.0899999142 seconds ago 2013-03-27 00:37:00,523 [DEBUG] ticker: MtGoxEUR - {'ask': {'price': 62.485, 'amount': 4.0}, 'bid': {'price': 61.9, 'amount': 41.07126816}} 2013-03-27 00:37:00,525 [DEBUG] ticker: BitcoinCentralEUR - {'ask': {'price': 64.9, 'amount': 1.329572}, 'bid': {'price': 64.41004, 'amount': 1.279645}} None Whats going on? Also, I'm okay losing money. If this works out it could mean profit!! I'd definitely owe ya
|
Tip Me if believe BTC1 will hit $1 Million by 2030 1DobZomBiE2gngvy6zDFKY5b76yvDbqRra
|
|
|
maxme (OP)
Newbie
Offline
Activity: 48
Merit: 0
|
|
March 26, 2013, 06:00:46 PM |
|
I tried the traderbotsim in an older build and it didn't work. But I works for me in the recent revision. I've tried using the traderbot and all I get it this 2013-03-27 00:34:53,190 [DEBUG] ticker: MtGoxEUR - {'ask': {'price': 62.47, 'amount': 4.0}, 'bid': {'price': 61.9, 'amount': 32.50906816}} 2013-03-27 00:34:53,190 [DEBUG] ticker: BitcoinCentralEUR - {'ask': {'price': 64.92, 'amount': 49.16}, 'bid': {'price': 64.41004, 'amount': 1.279645}} None 2013-03-27 00:35:37,321 [DEBUG] ticker: MtGoxEUR - {'ask': {'price': 62.47, 'amount': 4.0}, 'bid': {'price': 61.9, 'amount': 32.50906816}} 2013-03-27 00:35:37,321 [DEBUG] ticker: BitcoinCentralEUR - {'ask': {'price': 64.9, 'amount': 5.0}, 'bid': {'price': 64.41004, 'amount': 1.279645}} 2013-03-27 00:35:44,546 [WARNING] Can't automate this trade, last trade occured 43.9949998856 seconds ago 2013-03-27 00:36:17,240 [DEBUG] ticker: MtGoxEUR - {'ask': {'price': 62.47, 'amount': 4.0}, 'bid': {'price': 61.9, 'amount': 32.50906816}} 2013-03-27 00:36:17,242 [DEBUG] ticker: BitcoinCentralEUR - {'ask': {'price': 64.9, 'amount': 5.0}, 'bid': {'price': 64.41004, 'amount': 1.279645}} 2013-03-27 00:36:26,641 [WARNING] Can't automate this trade, last trade occured 86.0899999142 seconds ago 2013-03-27 00:37:00,523 [DEBUG] ticker: MtGoxEUR - {'ask': {'price': 62.485, 'amount': 4.0}, 'bid': {'price': 61.9, 'amount': 41.07126816}} 2013-03-27 00:37:00,525 [DEBUG] ticker: BitcoinCentralEUR - {'ask': {'price': 64.9, 'amount': 1.329572}, 'bid': {'price': 64.41004, 'amount': 1.279645}} None Whats going on? Also, I'm okay losing money. If this works out it could mean profit!! I'd definitely owe ya It seems you made your first automated transaction. 2013-03-27 00:35:44,546 [WARNING] Can't automate this trade, last trade occured 43.9949998856 seconds ago
The line above is a safeguard, it waits for TraderBot.trade_wait before executing the next trade (this will be removed when websocket order book sync is implemented)
|
|
|
|
DobZombie
|
|
March 26, 2013, 06:10:51 PM |
|
I'm using the SpecializedTradingBot and it's outputting this... 2013-03-27 04:01:19,473 [INFO][b] profit: 2.354073 EUR with volume: 1.000000 BTC - buy at 62.7999 (MtGoxEUR) sell at 62.8000 (BitcoinCentralEUR) ~3.75%[/b] 2013-03-27 04:01:52,920 [DEBUG] ticker: MtGoxEUR - {'ask': {'price': 61.0, 'amount': 10.0}, 'bid': {'price': 60.5, 'amount': 6.0}} 2013-03-27 04:01:52,921 [DEBUG] ticker: BitcoinCentralEUR - {'ask': {'price': 64.0, 'amount': 0.35183044}, 'bid': {'price': 63.0, 'amount': 0.27}} 2013-03-27 04:01:52,982 [WARNING] Can't automate this trade, profit=2.952351 is lower than defined threshold 3.500000 2013-03-27 04:01:52,982 [INFO][b] profit: 1.854073 EUR with volume: 1.000000 BTC - buy at 62.7999 (MtGoxEUR) sell at 62.8000 (BitcoinCentralEUR) ~2.95%[/b] 2013-03-27 04:02:22,983 [DEBUG] ticker: MtGoxEUR - {'ask': {'price': 61.0, 'amount': 10.0}, 'bid': {'price': 60.5, 'amount': 6.0}} 2013-03-27 04:02:22,983 [DEBUG] ticker: BitcoinCentralEUR - {'ask': {'price': 64.0, 'amount': 0.35183044}, 'bid': {'price': 63.0, 'amount': 0.27}} 2013-03-27 04:02:23,036 [WARNING] Can't automate this trade, profit=2.952351 is lower than defined threshold 3.500000 What confuses me is ... profit: 2.354073 EUR with volume: 1.000000 BTC - buy at 62.7999 (MtGoxEUR) sell at 62.8000 (BitcoinCentralEUR) ~3.75% Some of those numbers don't add up. Am I missing something?
|
Tip Me if believe BTC1 will hit $1 Million by 2030 1DobZomBiE2gngvy6zDFKY5b76yvDbqRra
|
|
|
maxme (OP)
Newbie
Offline
Activity: 48
Merit: 0
|
|
March 26, 2013, 06:37:19 PM |
|
I'm using the SpecializedTradingBot and it's outputting this...
What confuses me is ... profit: 2.354073 EUR with volume: 1.000000 BTC - buy at 62.7999 (MtGoxEUR) sell at 62.8000 (BitcoinCentralEUR) ~3.75%
Some of those numbers don't add up. Am I missing something?
See my previous message here https://bitcointalk.org/index.php?topic=153661.msg1647793#msg1647793But I should change logging messages...
|
|
|
|
arsenische
Legendary
Offline
Activity: 1199
Merit: 1012
|
|
March 26, 2013, 08:19:11 PM |
|
DobZombie, great work!
But why did you share the code? I think more competitors => less arbitraging possibilities. Or am I wrong?
|
|
|
|
Sukrim
Legendary
Offline
Activity: 2618
Merit: 1007
|
|
March 26, 2013, 08:36:52 PM |
|
More arbitrage --> more volume for trading bots! Also the "algorithm" behind arbitrage bots is not really a secret at all, it might be better to get people to code up plugins for various APIs than to keep it a guarded secret. Also moving big amounts of money between exchanges is not trivial and not cheap too... Thanks for actually open sourcing and releasing a useful and potentially profitable bot.
|
|
|
|
DobZombie
|
|
March 27, 2013, 01:48:49 PM |
|
DobZombie, great work!
But why did you share the code? I think more competitors => less arbitraging possibilities. Or am I wrong?
lol, I'm not sharing any code! I'm just testing it maxme is the genius behind this code
|
Tip Me if believe BTC1 will hit $1 Million by 2030 1DobZomBiE2gngvy6zDFKY5b76yvDbqRra
|
|
|
NF414
Newbie
Offline
Activity: 28
Merit: 0
|
|
March 30, 2013, 12:49:44 PM |
|
Thanks for sharing!
Anyone had any real-life profit from this automation yet?
Regards, NF414
|
|
|
|
maxme (OP)
Newbie
Offline
Activity: 48
Merit: 0
|
|
March 30, 2013, 12:52:58 PM |
|
Yes I made some profits. But I had to stop the bot since some markets are sometimes not responding or replying with erroneous data. So I'm currently working at checking exchanges status/responsiveness and verifying trades.
And I need to write more automated tests for this part (like mocking erroneous response, ...)
|
|
|
|
NF414
Newbie
Offline
Activity: 28
Merit: 0
|
|
March 30, 2013, 01:05:34 PM |
|
Yes I made some profits. But I had to stop the bot since some markets are sometimes not responding or replying with erroneous data. So I'm currently working at checking exchanges status/responsiveness and verifying trades.
And I need to write more automated tests for this part (like mocking erroneous response, ...)
If you need help of any kind (not a programmer); please feel free to ask. Regards, NF414
|
|
|
|
hiima
Member
Offline
Activity: 112
Merit: 10
|
|
April 02, 2013, 02:32:40 AM |
|
Can this be used to arbitrage on the same exchange, ie mtgox USD/BTC-> BTC/EUR->EUR/USD?
|
Whiskey Fund BTC 1K2SG4amzNrB7gUwf5braHuExqnQ5nEKZp LTC Lgoz9gb7q39FMAmBz8odfkx4YFhLeofCpc
|
|
|
Caesar V
|
|
April 13, 2013, 03:54:00 AM |
|
Oh man, this is one of those times I wish I was more tech savy
|
|
|
|
DobZombie
|
|
April 13, 2013, 02:08:06 PM Last edit: April 14, 2013, 01:58:24 PM by DobZombie |
|
When there is a potential trade I keep getting this... 2013-04-13 01:09:02,568 [DEBUG] ticker: BitcoinCentralEUR - {'ask': {'amount': 0.133669, 'price': 58.0}, 'bid': {'amount': 110.72, 'price': 57.0}} 2013-04-13 01:09:02,570 [DEBUG] ticker: MtGoxEUR - {'ask': {'amount': 0.697, 'price': 54.44384}, 'bid': {'amount': 18.8041, 'price': 53.18}} 2013-04-13 01:09:02,600 [INFO] profit: 11.798033 EUR with volume: 5.000000 BTC - buy at 56.9956 (MtGoxEUR) sell at 57.0000 (BitcoinCentralEUR) ~4.14% Traceback (most recent call last): File "arbitrage.py", line 202, in <module> main() File "arbitrage.py", line 199, in main arbitrer.loop() File "arbitrage.py", line 172, in loop self.tick() File "arbitrage.py", line 163, in tick "asks"][0], kmarket2, market2["bids"][0]) File "arbitrage.py", line 123, in arbitrage_opportunity perc2, weighted_buyprice, weighted_sellprice) File "E:\Bot\src\observers\traderbot.py", line 63, in opportunity self.clients[kbid].btc_balance) AttributeError: 'PrivateBitcoinCentral' object has no attribute 'btc_balance'
EDIT : Nevermind, I downloaded the latest Commit and it's all good
|
Tip Me if believe BTC1 will hit $1 Million by 2030 1DobZomBiE2gngvy6zDFKY5b76yvDbqRra
|
|
|
|