def load_commodities(self):
        """
        Load the commodities for Amounts in this object.
        """
        base, quote = self.market.split("_")
        if isinstance(self.bid, Amount):
            self.bid = Amount("{0:.8f} {1}".format(self.bid.to_double(), quote))
        else:
            self.bid = Amount("{0:.8f} {1}".format(self.bid, quote))
        if isinstance(self.ask, Amount):
            self.ask = Amount("{0:.8f} {1}".format(self.ask.to_double(), quote))
        else:
            self.ask = Amount("{0:.8f} {1}".format(self.ask, quote))
        if isinstance(self.high, Amount):
            self.high = Amount("{0:.8f} {1}".format(self.high.to_double(), quote))
        else:
            self.high = Amount("{0:.8f} {1}".format(self.high, quote))
        if isinstance(self.low, Amount):
            self.low = Amount("{0:.8f} {1}".format(self.low.to_double(), quote))
        else:
            self.low = Amount("{0:.8f} {1}".format(self.low, quote))
        if isinstance(self.volume, Amount):
            self.volume = Amount("{0:.8f} {1}".format(self.volume.to_double(), base))
        else:
            self.volume = Amount("{0:.8f} {1}".format(self.volume, base))
        if isinstance(self.last, Amount):
            self.last = Amount("{0:.8f} {1}".format(self.last.to_double(), quote))
        else:
            self.last = Amount("{0:.8f} {1}".format(self.last, quote))
def load_commodities ( self ) : base , quote = self . market . split ( "_" ) if isinstance ( self . bid , Amount ) : self . bid = Amount ( "{0:.8f} {1}" . format ( self . bid . to_double ( ) , quote ) ) else : self . bid = Amount ( "{0:.8f} {1}" . format ( self . bid , quote ) ) if isinstance ( self . ask , Amount ) : self . ask = Amount ( "{0:.8f} {1}" . format ( self . ask . to_double ( ) , quote ) ) else : self . ask = Amount ( "{0:.8f} {1}" . format ( self . ask , quote ) ) if isinstance ( self . high , Amount ) : self . high = Amount ( "{0:.8f} {1}" . format ( self . high . to_double ( ) , quote ) ) else : self . high = Amount ( "{0:.8f} {1}" . format ( self . high , quote ) ) if isinstance ( self . low , Amount ) : self . low = Amount ( "{0:.8f} {1}" . format ( self . low . to_double ( ) , quote ) ) else : self . low = Amount ( "{0:.8f} {1}" . format ( self . low , quote ) ) if isinstance ( self . volume , Amount ) : self . volume = Amount ( "{0:.8f} {1}" . format ( self . volume . to_double ( ) , base ) ) else : self . volume = Amount ( "{0:.8f} {1}" . format ( self . volume , base ) ) if isinstance ( self . last , Amount ) : self . last = Amount ( "{0:.8f} {1}" . format ( self . last . to_double ( ) , quote ) ) else : self . last = Amount ( "{0:.8f} {1}" . format ( self . last , quote ) )
Load the commodities for Amounts in this object.