Author

Topic: JohnDorien's Python arbitrage Trader - coding help please? (Read 896 times)

newbie
Activity: 44
Merit: 0
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.
newbie
Activity: 5
Merit: 0
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'

 Huh
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://bitcointalksearch.org/topic/python-arbitrage-trader-for-various-exchanges-263815

..but of course I am a noob.

Thanks for any help, it looks pretty cool. Smiley
Becva
Jump to: