Bitcoin Forum
July 29, 2024, 12:28:58 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: JohnDorien's Python arbitrage Trader - coding help please?  (Read 874 times)
becva (OP)
Newbie
*
Offline Offline

Activity: 5
Merit: 0


View Profile
December 01, 2013, 05:07:39 PM
 #1

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://bitcointalk.org/index.php?topic=263815.0

..but of course I am a noob.

Thanks for any help, it looks pretty cool. Smiley
Becva
selavy59
Newbie
*
Offline Offline

Activity: 44
Merit: 0


View Profile
December 06, 2013, 02:35:56 PM
 #2

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.
Pages: [1]
  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!