Exemple #1
0
 def iter_investments(self):
     for support in self.path(self.investments_path):
         inv = Investment()
         inv.code = inv.id = support['securityCode']
         inv.quantity = support['quantityOwned']
         inv.unitvalue = support['currentQuote']
         inv.unitprice = support['averagePrice']
         inv.label = support['securityName']
         inv.valuation = support['valorizationValuation']
         inv.diff = support['profitLossValorisation']
         inv.set_empty_fields(NotAvailable)
         yield inv
Exemple #2
0
    def iter_investments(self):
        for support in self.path(self.investments_path):
            inv = Investment()
            if 'codeIsin' in support:
                inv.code = inv.id = support['codeIsin']
                inv.quantity = support['nbUC']
                inv.unitvalue = support['valUC']

            inv.label = support['libelle']
            inv.valuation = support['montant']
            inv.set_empty_fields(NotAvailable)
            yield inv
Exemple #3
0
 def iter_investments(self):
     for support in self.path(self.investments_path):
         inv = Investment()
         inv.code = inv.id = support['securityCode']
         inv.quantity = support['quantityOwned']
         inv.unitvalue = support['currentQuote']
         inv.unitprice = support['averagePrice']
         inv.label = support['securityName']
         inv.valuation = support['valorizationValuation']
         inv.diff = support['profitLossValorisation']
         inv.set_empty_fields(NotAvailable)
         yield inv
Exemple #4
0
    def iter_investments(self):
        for support in self.path(self.investments_path):
            inv = Investment()
            if 'codeIsin' in support:
                inv.code = inv.id = support['codeIsin']
                inv.quantity = support['nbUC']
                inv.unitvalue = support['valUC']

            inv.label = support['libelle']
            inv.valuation = support['montant']
            inv.set_empty_fields(NotAvailable)
            yield inv
Exemple #5
0
    def iter_history(self):
        for op in self.get('contentList') or []:

            tr = Transaction.from_dict({
                'type': Transaction.TYPE_BANK,
                'amount': op.get('movementAmount'),
                'date': datetime.fromtimestamp(op.get('movementDate') / 1000),
                'label': op.get('operationName'),
                })

            tr.investments = []
            inv = Investment()
            inv.code = op.get('securityCode')
            inv.quantity = op.get('movementQuantity')
            inv.label = op.get('securityName')
            inv.set_empty_fields(NotAvailable)
            tr.investments.append(inv)
            yield tr
Exemple #6
0
    def iter_history(self):
        for op in self.get('contentList') or []:

            tr = Transaction.from_dict({
                'type': Transaction.TYPE_BANK,
                'amount': op.get('movementAmount'),
                'date': datetime.fromtimestamp(op.get('movementDate') / 1000),
                'label': op.get('operationName'),
                })

            tr.investments = []
            inv = Investment()
            inv.code = op.get('securityCode')
            inv.quantity = op.get('movementQuantity')
            inv.label = op.get('securityName')
            inv.set_empty_fields(NotAvailable)
            tr.investments.append(inv)
            yield tr
Exemple #7
0
    def iter_investments(self):
        for tr in self.document.xpath('//table[@id="support"]/tbody/tr'):
            tds = tr.findall('td')

            inv = Investment()
            inv.label = self.parser.tocleanstring(tds[0])
            inv.code = NotAvailable

            try:
                inv.quantity = Decimal(Transaction.clean_amount(self.parser.tocleanstring(tds[1])))
            except InvalidOperation:
                pass

            try:
                inv.unitvalue = Decimal(Transaction.clean_amount(self.parser.tocleanstring(tds[2])))
            except InvalidOperation:
                pass

            inv.valuation = Decimal(Transaction.clean_amount(self.parser.tocleanstring(tds[3])))
            inv.set_empty_fields(NotAvailable)
            yield inv