From 421cc4731fe980233b13ee73db7f3b7bf5b7312e Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Wed, 22 Aug 2018 22:49:42 -0400 Subject: [PATCH] Face palm - fix mktcap sorting Yuh think maybe the default "null" value shouldn't be a string...? Fixes #46 --- piker/brokers/questrade.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/piker/brokers/questrade.py b/piker/brokers/questrade.py index 64aff382..746f23df 100644 --- a/piker/brokers/questrade.py +++ b/piker/brokers/questrade.py @@ -403,7 +403,7 @@ def format_quote( previous = symbol_data[symbol]['prevDayClosePrice'] change = percent_change(previous, last) share_count = symbol_data[symbol].get('outstandingShares', None) - mktcap = share_count * last if (last and share_count) else 'NA' + mktcap = share_count * last if (last and share_count) else 0 computed = { 'symbol': quote['symbol'], '%': round(change, 3),