コード例 #1
0
ファイル: operation.py プロジェクト: tmscheiber/finalproject
 def __init__(self, operation_json):
     Operation.__init__(self, operation_json)
     self.seller = operation_json['_source']['operation_history']['op'][1][
         'seller']
     self.amount_to_sell = Amount(
         operation_json['_source']['operation_history']['op'][1]
         ['amount_to_sell'])
     self.min_to_receive = Amount(
         operation_json['_source']['operation_history']['op'][1]
         ['min_to_receive'])
     self.expiration = datetime.strptime(
         operation_json['_source']['operation_history']['op'][1]
         ['expiration'], '%Y-%m-%dT%H:%M:%S')
     self.expiration_in_seconds = (datetime.strptime(
         operation_json['_source']['operation_history']['op'][1]
         ['expiration'], '%Y-%m-%dT%H:%M:%S') -
                                   self.block_time).total_seconds()
     if self.expiration_in_seconds < 0:
         self.expiration_in_seconds = -1
     self.fill_or_kill = operation_json['_source']['operation_history'][
         'op'][1]['fill_or_kill']
     self.market = self.min_to_receive.asset_id + '/' + self.amount_to_sell.asset_id
     self.min_rate = self.min_to_receive.amount / self.amount_to_sell.amount
     self.limit_id = operation_json['_source']['operation_history'][
         'operation_result'][1]
コード例 #2
0
ファイル: operation.py プロジェクト: tmscheiber/finalproject
 def __init__(self, operation_json):
     Operation.__init__(self, operation_json)
     self.account = operation_json['_source']['operation_history']['op'][1][
         'account_id']
     self.receives = Amount(operation_json['_source']['operation_history']
                            ['op'][1]['receives'])
     self.pays = Amount(
         operation_json['_source']['operation_history']['op'][1]['pays'])
     self.fill_base = Amount(operation_json['_source']['operation_history']
                             ['op'][1]['fill_price']['base'])
     self.fill_quote = Amount(operation_json['_source']['operation_history']
                              ['op'][1]['fill_price']['quote'])
     self.limit_id = operation_json['_source']['operation_history']['op'][
         1]['order_id']
コード例 #3
0
ファイル: operation.py プロジェクト: tmscheiber/finalproject
 def __init__(self, operation_json):
     Operation.__init__(self, operation_json)
     self.issuer = \
         operation_json['_source']['operation_history']['op'][1]['issuer']
     self.amount_to_claim = \
         Amount(operation_json['_source']
                ['operation_history']['op'][1]['amount_to_claim'])
コード例 #4
0
ファイル: operation.py プロジェクト: tmscheiber/finalproject
 def __init__(self, operation_json):
     Operation.__init__(self, operation_json)
     self.vesting_balance = \
         operation_json['_source']['operation_history']['op'][1]['vesting_balance']
     self.owner = \
         operation_json['_source']['operation_history']['op'][1]['owner']
     self.amount = Amount(
         operation_json['_source']['operation_history']['op'][1]['amount'])
コード例 #5
0
ファイル: operation.py プロジェクト: tmscheiber/finalproject
 def __init__(self, operation_json):
     Operation.__init__(self, operation_json)
     self.creator = operation_json['_source']['operation_history']['op'][1][
         'creator']
     self.owner = operation_json['_source']['operation_history']['op'][1][
         'owner']
     self.amount = Amount(
         operation_json['_source']['operation_history']['op'][1]['amount'])
コード例 #6
0
ファイル: operation.py プロジェクト: tmscheiber/finalproject
 def __init__(self, operation_json):
     Operation.__init__(self, operation_json)
     self.from_account = operation_json['_source']['operation_history'][
         'op'][1]['from']
     self.to_account = operation_json['_source']['operation_history']['op'][
         1]['to']
     self.amount = Amount(
         operation_json['_source']['operation_history']['op'][1]['amount'])
コード例 #7
0
ファイル: operation.py プロジェクト: tmscheiber/finalproject
 def __init__(self, operation_json):
     Operation.__init__(self, operation_json)
     self.account = \
         operation_json['_source']['operation_history']['op'][1]['account']
     self.amount = Amount(
         operation_json['_source']['operation_history']['op'][1]['amount'])