Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

ticker() on inactive market: ValueError: could not convert string to float: #1622

Closed
bitphage opened this issue Feb 25, 2019 · 2 comments
Closed

Comments

@bitphage
Copy link

On the testnet:

base = Asset('TEST', bitshares_instance=bitshares)
quote = Asset('GOLODRANETS', bitshares_instance=bitshares)

market = Market(base=base, quote=quote, bitshares_instance=bitshares)
market.ticker()

Traceback:

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-37-cf5449bd85de> in <module>
      3 
      4 market = Market(base=base, quote=quote, bitshares_instance=bitshares)
----> 5 market.ticker()

~/devel/golos/python-bitshares/bitshares/market.py in ticker(self)
    172             base=self["base"],
    173             blockchain_instance=self.blockchain,
--> 174         )
    175         data["percentChange"] = float(ticker["percent_change"])
    176 

ValueError: could not convert string to float: 

Direct RPC call:

bitshares.rpc.get_ticker(base['id'], quote['id'])

out:

{'time': '2019-02-25T14:05:39',
 'base': 'TEST',
 'quote': 'GOLODRANETS',
 'latest': '1.58581280832079962246',
 'lowest_ask': '1.58745',
 'highest_bid': '1.2',
 'percent_change': '',
 'base_volume': '0',
 'quote_volume': '0'}
@abitmore abitmore transferred this issue from bitshares/python-bitshares Feb 27, 2019
@abitmore
Copy link
Member

Duplicate of #1620

@abitmore abitmore marked this as a duplicate of #1620 Feb 27, 2019
@abitmore abitmore added this to the Hotfix-201903-1 milestone Mar 13, 2019
@MarkoPaasila
Copy link

Looking at the core bug issue, this should be solved by using the latest node release (if you have a personal node).

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants