yfrake.openapi.modules.income_statements   A
last analyzed

Complexity

Total Complexity 0

Size/Duplication

Total Lines 225
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 155
dl 0
loc 225
rs 10
c 0
b 0
f 0
wmc 0
1
# ================================================================================== #
2
#   income_statements.py - This file is part of the yfrake package.                  #
3
# ================================================================================== #
4
#                                                                                    #
5
#   MIT License                                                                      #
6
#                                                                                    #
7
#   Copyright (c) 2022 Mattias Aabmets                                               #
8
#                                                                                    #
9
#   Permission is hereby granted, free of charge, to any person obtaining a copy     #
10
#   of this software and associated documentation files (the "Software"), to deal    #
11
#   in the Software without restriction, including without limitation the rights     #
12
#   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell        #
13
#   copies of the Software, and to permit persons to whom the Software is            #
14
#   furnished to do so, subject to the following conditions:                         #
15
#                                                                                    #
16
#   The above copyright notice and this permission notice shall be included in all   #
17
#   copies or substantial portions of the Software.                                  #
18
#                                                                                    #
19
#   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR       #
20
#   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,         #
21
#   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE      #
22
#   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER           #
23
#   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,    #
24
#   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE    #
25
#   SOFTWARE.                                                                        #
26
#                                                                                    #
27
# ================================================================================== #
28
summary = 'Income Statements'
29
description = 'Returns the income statements of a security identifier.'
30
31
# ---------------------------------------------------------------------------------- #
32
parameters = [
33
    {
34
        'name': 'symbol',
35
        'description': 'Any valid equity security identifier.',
36
        'required': True,
37
        'in': 'query',
38
        'schema': {
39
            'type': str
40
        }
41
    }
42
]
43
44
# ---------------------------------------------------------------------------------- #
45
response = {
46
    'income_yearly': [
47
        {
48
            'maxAge': int,
49
            'endDate': {
50
                'raw': int,
51
                'fmt': str
52
            },
53
            'totalRevenue': {
54
                'raw': int,
55
                'fmt': str,
56
                'longFmt': str
57
            },
58
            'costOfRevenue': {
59
                'raw': int,
60
                'fmt': str,
61
                'longFmt': str
62
            },
63
            'grossProfit': {
64
                'raw': int,
65
                'fmt': str,
66
                'longFmt': str
67
            },
68
            'researchDevelopment': {
69
                'raw': int,
70
                'fmt': str,
71
                'longFmt': str
72
            },
73
            'sellingGeneralAdministrative': {
74
                'raw': int,
75
                'fmt': str,
76
                'longFmt': str
77
            },
78
            'nonRecurring': dict,
79
            'otherOperatingExpenses': dict,
80
            'totalOperatingExpenses': {
81
                'raw': int,
82
                'fmt': str,
83
                'longFmt': str
84
            },
85
            'operatingIncome': {
86
                'raw': int,
87
                'fmt': str,
88
                'longFmt': str
89
            },
90
            'totalOtherIncomeExpenseNet': {
91
                'raw': int,
92
                'fmt': str,
93
                'longFmt': str
94
            },
95
            'ebit': {
96
                'raw': int,
97
                'fmt': str,
98
                'longFmt': str
99
            },
100
            'interestExpense': {
101
                'raw': int,
102
                'fmt': str,
103
                'longFmt': str
104
            },
105
            'incomeBeforeTax': {
106
                'raw': int,
107
                'fmt': str,
108
                'longFmt': str
109
            },
110
            'incomeTaxExpense': {
111
                'raw': int,
112
                'fmt': str,
113
                'longFmt': str
114
            },
115
            'minorityInterest': dict,
116
            'netIncomeFromContinuingOps': {
117
                'raw': int,
118
                'fmt': str,
119
                'longFmt': str
120
            },
121
            'discontinuedOperations': dict,
122
            'extraordinaryItems': dict,
123
            'effectOfAccountingCharges': dict,
124
            'otherItems': dict,
125
            'netIncome': {
126
                'raw': int,
127
                'fmt': str,
128
                'longFmt': str
129
            },
130
            'netIncomeApplicableToCommonShares': {
131
                'raw': int,
132
                'fmt': str,
133
                'longFmt': str
134
            }
135
        }
136
    ],
137
    'income_quarterly': [
138
        {
139
            'maxAge': int,
140
            'endDate': {
141
                'raw': int,
142
                'fmt': str
143
            },
144
            'totalRevenue': {
145
                'raw': int,
146
                'fmt': str,
147
                'longFmt': str
148
            },
149
            'costOfRevenue': {
150
                'raw': int,
151
                'fmt': str,
152
                'longFmt': str
153
            },
154
            'grossProfit': {
155
                'raw': int,
156
                'fmt': str,
157
                'longFmt': str
158
            },
159
            'researchDevelopment': {
160
                'raw': int,
161
                'fmt': str,
162
                'longFmt': str
163
            },
164
            'sellingGeneralAdministrative': {
165
                'raw': int,
166
                'fmt': str,
167
                'longFmt': str
168
            },
169
            'nonRecurring': dict,
170
            'otherOperatingExpenses': dict,
171
            'totalOperatingExpenses': {
172
                'raw': int,
173
                'fmt': str,
174
                'longFmt': str
175
            },
176
            'operatingIncome': {
177
                'raw': int,
178
                'fmt': str,
179
                'longFmt': str
180
            },
181
            'totalOtherIncomeExpenseNet': {
182
                'raw': int,
183
                'fmt': str,
184
                'longFmt': str
185
            },
186
            'ebit': {
187
                'raw': int,
188
                'fmt': str,
189
                'longFmt': str
190
            },
191
            'interestExpense': {
192
                'raw': int,
193
                'fmt': str,
194
                'longFmt': str
195
            },
196
            'incomeBeforeTax': {
197
                'raw': int,
198
                'fmt': str,
199
                'longFmt': str
200
            },
201
            'incomeTaxExpense': {
202
                'raw': int,
203
                'fmt': str,
204
                'longFmt': str
205
            },
206
            'minorityInterest': dict,
207
            'netIncomeFromContinuingOps': {
208
                'raw': int,
209
                'fmt': str,
210
                'longFmt': str
211
            },
212
            'discontinuedOperations': dict,
213
            'extraordinaryItems': dict,
214
            'effectOfAccountingCharges': dict,
215
            'otherItems': dict,
216
            'netIncome': {
217
                'raw': int,
218
                'fmt': str,
219
                'longFmt': str
220
            },
221
            'netIncomeApplicableToCommonShares': {
222
                'raw': int,
223
                'fmt': str,
224
                'longFmt': str
225
            }
226
        }
227
    ]
228
}
229