コード例 #1
0
 def bid_price(self):
     """Get bid price as a Decimal"""
     return try_(Decimal, self.bid_price_, default_=Decimal(0))
コード例 #2
0
 def ask_price(self):
     """Get ask price as a Decimal"""
     return try_(Decimal, self.ask_price_, default_=Decimal("9" * 32))
コード例 #3
0
 def created_at(self):
     """Get creation time timestamp as naive DateTime"""
     return try_(epoch_msecs_to_local_time_str, self.created_at_msecs_)
コード例 #4
0
 def expiration_time(self):
     """Get expiration as naive datetime"""
     return try_(epoch_secs_to_local_time_str,
                 self.expiration_time_seconds_)
コード例 #5
0
 def hash(self):
     """Get hash of the order with lazy evaluation"""
     if self.hash_ is None:
         try_(self.update_hash)
     return self.hash_
コード例 #6
0
 def fill_amount(self):
     """Get taker fill amount as Decimal in base units"""
     return try_(int, self.fill_amount_, _default=0)
コード例 #7
0
 def last_updated_at(self):
     """Get last update time timestamp as naive datetime"""
     return try_(epoch_msecs_to_local_time_str, self.last_updated_at_msecs_)