def BombPrice(self): if self.loan_ltc_display and self.total: bombprice = float_format( (float(self.total) * 100 / 110) / float(self.loan_ltc_display)) return bombprice if self.loan_cny_display and self.total: bombprice = float_format( ((float_format(float(self.total)) - float_format(float(self.loan_cny_display))) * 100 / 110) / float_format(float(self.ltc_total))) return bombprice return
def liquidation_price(self, db): try: net_asset = ( HuobiService.getAccountInfo(ACCOUNT_INFO))['net_asset'] except BaseException as e: print u'method_collection:暂时无法获取总量', e #判断是否能获取到net_asset if 'net_asset' in dir(): coefficient = db.select('SETTING', UID=self.uid)[0][6] try: db.insert('SETTING', TESTMONEY=(float_format(net_asset) * float_format(coefficient))) except BaseException as e: print u'liquidation price wrong,', e return
def freightSpace1(self): parameter = pa.parameter() parameter.__init__() result = float_format( (parameter.buyone_price * self.ltc_total) / self.net_asset) return result