avanza.models.insights_report

  1from typing import Any, List, Literal, Union
  2from pydantic import BaseModel
  3
  4
  5class TotalOutcome(BaseModel):
  6    total: float
  7    development: float
  8    dividends: float
  9
 10
 11class Link(BaseModel):
 12    type: str
 13    flagCode: str
 14    """ ISO 3166-1 alpha-2 """
 15    orderbookId: str
 16    urlDisplayName: str
 17    linkDisplay: str
 18    shortLinkDisplay: str
 19    tradeable: bool
 20    sellable: bool
 21    buyable: bool
 22
 23
 24class PositionListItemOutcome(BaseModel):
 25    total: float
 26    development: float
 27    balanceDevelopments: List[Any]
 28    totalDevelopmentInPercent: Union[float, Literal["-"]]
 29    stake: float
 30    totalTurnover: float
 31    transactions: List[Any]
 32    transactionTotals: List[Any]
 33    totalBuyAmount: float
 34    totalSellAmount: float
 35    totalOtherAmount: float
 36    developmentPartOfTotalDevelopmentInPercent: Union[float, Literal["-"]]
 37    dividendsPartOfTotalDevelopmentInPercent: Union[float, Literal["-"]]
 38    dividends: float
 39
 40
 41class PositionSummaryListItem(BaseModel):
 42    isin: str
 43    shortName: str
 44    link: Link
 45    outcome: PositionListItemOutcome
 46    currentPosition: float
 47    startValue: float
 48    endValue: float
 49
 50
 51class PositionSummaryOutcome(BaseModel):
 52    total: float
 53    development: float
 54    balanceDevelopments: List[Any]
 55    dividends: float
 56
 57
 58class PositionSummary(BaseModel):
 59    instrumentType: str
 60    outcome: PositionSummaryOutcome
 61    positions: List[PositionSummaryListItem]
 62
 63
 64class BestAndWorst(BaseModel):
 65    bestPositions: List[PositionSummary]
 66    worstPositions: List[PositionSummary]
 67
 68
 69class DevelopmentResponse(BaseModel):
 70    totalOutcome: TotalOutcome
 71    unknownPositionDevelopments: List[Any]
 72    totalOutcomeForUnknownDevelopments: TotalOutcome
 73    hasUnlistedInstrument: bool
 74    bestAndWorst: BestAndWorst
 75
 76
 77class ChartData(BaseModel):
 78    month: int
 79    year: int
 80    allTransactions: float
 81    deposit: float
 82    withdrawal: float
 83    autogiro: float
 84
 85
 86class TransactionsResponse(BaseModel):
 87    chartData: List[ChartData]
 88    allTransactions: List[Any]
 89    totalAutogiro: float
 90    totalAll: float
 91    totalDeposits: float
 92    totalWithdraws: float
 93
 94
 95class TotalDevelopment(BaseModel):
 96    startValue: float
 97    totalChange: float
 98    currentValue: float
 99
100
101class OtherTransactions(BaseModel):
102    otherTransactionsGroups: List[Any]
103    total: float
104
105
106class InsightsReport(BaseModel):
107    developmentResponse: DevelopmentResponse
108    transactionsResponse: TransactionsResponse
109    totalDevelopment: TotalDevelopment
110    otherTransactions: OtherTransactions
111    fromDate: str
112    """ YYYY-MM-DD """
113    toDate: str
114    """ YYYY-MM-DD """
115    aggregatedPerformance: Union[float, Literal["-"]]
class TotalOutcome(pydantic.main.BaseModel):
6class TotalOutcome(BaseModel):
7    total: float
8    development: float
9    dividends: float
total: float
development: float
dividends: float
class PositionListItemOutcome(pydantic.main.BaseModel):
25class PositionListItemOutcome(BaseModel):
26    total: float
27    development: float
28    balanceDevelopments: List[Any]
29    totalDevelopmentInPercent: Union[float, Literal["-"]]
30    stake: float
31    totalTurnover: float
32    transactions: List[Any]
33    transactionTotals: List[Any]
34    totalBuyAmount: float
35    totalSellAmount: float
36    totalOtherAmount: float
37    developmentPartOfTotalDevelopmentInPercent: Union[float, Literal["-"]]
38    dividendsPartOfTotalDevelopmentInPercent: Union[float, Literal["-"]]
39    dividends: float
total: float
development: float
balanceDevelopments: List[Any]
totalDevelopmentInPercent: Union[float, Literal['-']]
stake: float
totalTurnover: float
transactions: List[Any]
transactionTotals: List[Any]
totalBuyAmount: float
totalSellAmount: float
totalOtherAmount: float
developmentPartOfTotalDevelopmentInPercent: Union[float, Literal['-']]
dividendsPartOfTotalDevelopmentInPercent: Union[float, Literal['-']]
dividends: float
class PositionSummaryListItem(pydantic.main.BaseModel):
42class PositionSummaryListItem(BaseModel):
43    isin: str
44    shortName: str
45    link: Link
46    outcome: PositionListItemOutcome
47    currentPosition: float
48    startValue: float
49    endValue: float
isin: str
shortName: str
currentPosition: float
startValue: float
endValue: float
class PositionSummaryOutcome(pydantic.main.BaseModel):
52class PositionSummaryOutcome(BaseModel):
53    total: float
54    development: float
55    balanceDevelopments: List[Any]
56    dividends: float
total: float
development: float
balanceDevelopments: List[Any]
dividends: float
class PositionSummary(pydantic.main.BaseModel):
59class PositionSummary(BaseModel):
60    instrumentType: str
61    outcome: PositionSummaryOutcome
62    positions: List[PositionSummaryListItem]
instrumentType: str
positions: List[PositionSummaryListItem]
class BestAndWorst(pydantic.main.BaseModel):
65class BestAndWorst(BaseModel):
66    bestPositions: List[PositionSummary]
67    worstPositions: List[PositionSummary]
bestPositions: List[PositionSummary]
worstPositions: List[PositionSummary]
class DevelopmentResponse(pydantic.main.BaseModel):
70class DevelopmentResponse(BaseModel):
71    totalOutcome: TotalOutcome
72    unknownPositionDevelopments: List[Any]
73    totalOutcomeForUnknownDevelopments: TotalOutcome
74    hasUnlistedInstrument: bool
75    bestAndWorst: BestAndWorst
totalOutcome: TotalOutcome
unknownPositionDevelopments: List[Any]
totalOutcomeForUnknownDevelopments: TotalOutcome
hasUnlistedInstrument: bool
bestAndWorst: BestAndWorst
class ChartData(pydantic.main.BaseModel):
78class ChartData(BaseModel):
79    month: int
80    year: int
81    allTransactions: float
82    deposit: float
83    withdrawal: float
84    autogiro: float
month: int
year: int
allTransactions: float
deposit: float
withdrawal: float
autogiro: float
class TransactionsResponse(pydantic.main.BaseModel):
87class TransactionsResponse(BaseModel):
88    chartData: List[ChartData]
89    allTransactions: List[Any]
90    totalAutogiro: float
91    totalAll: float
92    totalDeposits: float
93    totalWithdraws: float
chartData: List[ChartData]
allTransactions: List[Any]
totalAutogiro: float
totalAll: float
totalDeposits: float
totalWithdraws: float
class TotalDevelopment(pydantic.main.BaseModel):
96class TotalDevelopment(BaseModel):
97    startValue: float
98    totalChange: float
99    currentValue: float
startValue: float
totalChange: float
currentValue: float
class OtherTransactions(pydantic.main.BaseModel):
102class OtherTransactions(BaseModel):
103    otherTransactionsGroups: List[Any]
104    total: float
otherTransactionsGroups: List[Any]
total: float
class InsightsReport(pydantic.main.BaseModel):
107class InsightsReport(BaseModel):
108    developmentResponse: DevelopmentResponse
109    transactionsResponse: TransactionsResponse
110    totalDevelopment: TotalDevelopment
111    otherTransactions: OtherTransactions
112    fromDate: str
113    """ YYYY-MM-DD """
114    toDate: str
115    """ YYYY-MM-DD """
116    aggregatedPerformance: Union[float, Literal["-"]]
developmentResponse: DevelopmentResponse
transactionsResponse: TransactionsResponse
totalDevelopment: TotalDevelopment
otherTransactions: OtherTransactions
fromDate: str

YYYY-MM-DD

toDate: str

YYYY-MM-DD

aggregatedPerformance: Union[float, Literal['-']]