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 = PydanticUndefined
development: float = PydanticUndefined
dividends: float = PydanticUndefined
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 = PydanticUndefined
development: float = PydanticUndefined
balanceDevelopments: List[Any] = PydanticUndefined
totalDevelopmentInPercent: Union[float, Literal['-']] = PydanticUndefined
stake: float = PydanticUndefined
totalTurnover: float = PydanticUndefined
transactions: List[Any] = PydanticUndefined
transactionTotals: List[Any] = PydanticUndefined
totalBuyAmount: float = PydanticUndefined
totalSellAmount: float = PydanticUndefined
totalOtherAmount: float = PydanticUndefined
developmentPartOfTotalDevelopmentInPercent: Union[float, Literal['-']] = PydanticUndefined
dividendsPartOfTotalDevelopmentInPercent: Union[float, Literal['-']] = PydanticUndefined
dividends: float = PydanticUndefined
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 = PydanticUndefined
shortName: str = PydanticUndefined
outcome: PositionListItemOutcome = PydanticUndefined
currentPosition: float = PydanticUndefined
startValue: float = PydanticUndefined
endValue: float = PydanticUndefined
class PositionSummaryOutcome(pydantic.main.BaseModel):
52class PositionSummaryOutcome(BaseModel):
53    total: float
54    development: float
55    balanceDevelopments: List[Any]
56    dividends: float
total: float = PydanticUndefined
development: float = PydanticUndefined
balanceDevelopments: List[Any] = PydanticUndefined
dividends: float = PydanticUndefined
class PositionSummary(pydantic.main.BaseModel):
59class PositionSummary(BaseModel):
60    instrumentType: str
61    outcome: PositionSummaryOutcome
62    positions: List[PositionSummaryListItem]
instrumentType: str = PydanticUndefined
outcome: PositionSummaryOutcome = PydanticUndefined
positions: List[PositionSummaryListItem] = PydanticUndefined
class BestAndWorst(pydantic.main.BaseModel):
65class BestAndWorst(BaseModel):
66    bestPositions: List[PositionSummary]
67    worstPositions: List[PositionSummary]
bestPositions: List[PositionSummary] = PydanticUndefined
worstPositions: List[PositionSummary] = PydanticUndefined
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 = PydanticUndefined
unknownPositionDevelopments: List[Any] = PydanticUndefined
totalOutcomeForUnknownDevelopments: TotalOutcome = PydanticUndefined
hasUnlistedInstrument: bool = PydanticUndefined
bestAndWorst: BestAndWorst = PydanticUndefined
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 = PydanticUndefined
year: int = PydanticUndefined
allTransactions: float = PydanticUndefined
deposit: float = PydanticUndefined
withdrawal: float = PydanticUndefined
autogiro: float = PydanticUndefined
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] = PydanticUndefined
allTransactions: List[Any] = PydanticUndefined
totalAutogiro: float = PydanticUndefined
totalAll: float = PydanticUndefined
totalDeposits: float = PydanticUndefined
totalWithdraws: float = PydanticUndefined
class TotalDevelopment(pydantic.main.BaseModel):
96class TotalDevelopment(BaseModel):
97    startValue: float
98    totalChange: float
99    currentValue: float
startValue: float = PydanticUndefined
totalChange: float = PydanticUndefined
currentValue: float = PydanticUndefined
class OtherTransactions(pydantic.main.BaseModel):
102class OtherTransactions(BaseModel):
103    otherTransactionsGroups: List[Any]
104    total: float
otherTransactionsGroups: List[Any] = PydanticUndefined
total: float = PydanticUndefined
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 = PydanticUndefined
transactionsResponse: TransactionsResponse = PydanticUndefined
totalDevelopment: TotalDevelopment = PydanticUndefined
otherTransactions: OtherTransactions = PydanticUndefined
fromDate: str = PydanticUndefined

YYYY-MM-DD

toDate: str = PydanticUndefined

YYYY-MM-DD

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