maxme/bitcoin-arbitrage — pull request #34 by sscarduzio (2014-01-15 09:23:56+00:00)
Title: sometime fiat conversion rate is parsed as int from JSON

Fixes this error by forcing conversion to float
```
pydev debugger: starting
Traceback (most recent call last):
File "/Applications/eclipse/plugins/org.python.pydev_2.8.2.2013090511/pysrc/pydevd.py", line 1446, in
debugger.run(setup['file'], None, None)
File "/Applications/eclipse/plugins/org.python.pydev_2.8.2.2013090511/pysrc/pydevd.py", line 1092, in run
pydev_imports.execfile(file, globals, locals) #execute the script
File "/Applications/eclipse/plugins/org.python.pydev_2.8.2.2013090511/pysrc/_pydev_execfile.py", line 38, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc) #execute the script
File "/Users/sscarduzio/git/bitcoin-arbitrage/arbitrage/arbitrage.py", line 72, in
main()
File "/Users/sscarduzio/git/bitcoin-arbitrage/arbitrage/arbitrage.py", line 69, in main
cli.main()
File "/Users/sscarduzio/git/bitcoin-arbitrage/arbitrage/arbitrage.py", line 64, in main
self.create_arbitrer(args)
File "/Users/sscarduzio/git/bitcoin-arbitrage/arbitrage/arbitrage.py", line 38, in create_arbitrer
self.arbitrer = Arbitrer()
File "/Users/sscarduzio/git/bitcoin-arbitrage/arbitrage/arbitrer.py", line 17, in __init__
self.init_markets(config.markets)
File "/Users/sscarduzio/git/bitcoin-arbitrage/arbitrage/arbitrer.py", line 26, in init_markets
market_name + '()')
File "", line 1, in
File "/Users/sscarduzio/git/bitcoin-arbitrage/arbitrage/public_markets/btceeur.py", line 10, in __init__
super(BtceEUR, self).__init__("EUR")
File "/Users/sscarduzio/git/bitcoin-arbitrage/arbitrage/public_markets/market.py", line 18, in __init__
self.fc.update()
File "/Users/sscarduzio/git/bitcoin-arbitrage/arbitrage/fiatconverter.py", line 64, in update
self.update_currency_pair(currency)
File "/Users/sscarduzio/git/bitcoin-arbitrage/arbitrage/fiatconverter.py", line 52, in update_currency_pair
rate = self.get_currency_pair(code_from, code_to)
File "/Users/sscarduzio/git/bitcoin-arbitrage/arbitrage/fiatconverter.py", line 35, in get_currency_pair
rate = data["rate"] * (1.0 - self.bank_fee)
TypeError: can't multiply sequence by non-int of type 'float'
```