Bitcoin Forum

Other => Beginners & Help => Topic started by: becva on December 01, 2013, 05:07:39 PM



Title: JohnDorien's Python arbitrage Trader - coding help please?
Post by: becva on December 01, 2013, 05:07:39 PM
Hi there

I came across JohnDorien's post about his Crypto Arbitrage Trader, and have been trying to get it to work for me.
It works to the point where it tries to trade & then I get this:

Unhandled exception in thread started by
Traceback (most recent call last):
File "C:\Program Files\CryptoArbitrageTrader-master\arbitrage_trader.py", line 193, in run1
compare() #The main Arbitrage function
File "C:\Program Files\CryptoArbitrageTrader-master\arbitrage_trader.py", line 166, in compare
print "executing trade at a win per 1" + curr[n] + " of " + str(round(((str(sprice) * FEE)-(str(bprice) * Diff * FEE)),8)) + "BTC"
TypeError: can't multiply sequence by non-int of type 'float'

 ???
I think this means one of the values it is trying to multiply by is not numerical. Has anyone come across this & Debugged it?
I would reply direct on his thread, here: https://bitcointalk.org/index.php?topic=263815.0

..but of course I am a noob.

Thanks for any help, it looks pretty cool. :)
Becva


Title: Re: JohnDorien's Python arbitrage Trader - coding help please?
Post by: selavy59 on December 06, 2013, 02:35:56 PM
in the formula str(round(((str(sprice) * FEE)-(str(bprice) * Diff * FEE)),8)) you have a string value 'str(sprice)' and try to multiply by a number. The same mistake is repeated further along. Try the following:

str(round(((sprice * FEE)-(bprice * Diff * FEE)),8))

Simon.