1
|
|
|
# ================================================================================== # |
2
|
|
|
# cashflow_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 = 'Cashflow Statements' |
29
|
|
|
description = 'Returns the cashflow 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
|
|
|
'cashflow_yearly': [ |
47
|
|
|
{ |
48
|
|
|
'maxAge': int, |
49
|
|
|
'endDate': { |
50
|
|
|
'raw': int, |
51
|
|
|
'fmt': str |
52
|
|
|
}, |
53
|
|
|
'netIncome': { |
54
|
|
|
'raw': int, |
55
|
|
|
'fmt': str, |
56
|
|
|
'longFmt': str |
57
|
|
|
}, |
58
|
|
|
'depreciation': { |
59
|
|
|
'raw': int, |
60
|
|
|
'fmt': str, |
61
|
|
|
'longFmt': str |
62
|
|
|
}, |
63
|
|
|
'changeToNetincome': { |
64
|
|
|
'raw': int, |
65
|
|
|
'fmt': str, |
66
|
|
|
'longFmt': str |
67
|
|
|
}, |
68
|
|
|
'changeToAccountReceivables': { |
69
|
|
|
'raw': int, |
70
|
|
|
'fmt': str, |
71
|
|
|
'longFmt': str |
72
|
|
|
}, |
73
|
|
|
'changeToLiabilities': { |
74
|
|
|
'raw': int, |
75
|
|
|
'fmt': str, |
76
|
|
|
'longFmt': str |
77
|
|
|
}, |
78
|
|
|
'changeToInventory': { |
79
|
|
|
'raw': int, |
80
|
|
|
'fmt': str, |
81
|
|
|
'longFmt': str |
82
|
|
|
}, |
83
|
|
|
'changeToOperatingActivities': { |
84
|
|
|
'raw': int, |
85
|
|
|
'fmt': str, |
86
|
|
|
'longFmt': str |
87
|
|
|
}, |
88
|
|
|
'totalCashFromOperatingActivities': { |
89
|
|
|
'raw': int, |
90
|
|
|
'fmt': str, |
91
|
|
|
'longFmt': str |
92
|
|
|
}, |
93
|
|
|
'capitalExpenditures': { |
94
|
|
|
'raw': int, |
95
|
|
|
'fmt': str, |
96
|
|
|
'longFmt': str |
97
|
|
|
}, |
98
|
|
|
'investments': { |
99
|
|
|
'raw': int, |
100
|
|
|
'fmt': str, |
101
|
|
|
'longFmt': str |
102
|
|
|
}, |
103
|
|
|
'otherCashflowsFromInvestingActivities': { |
104
|
|
|
'raw': int, |
105
|
|
|
'fmt': str, |
106
|
|
|
'longFmt': str |
107
|
|
|
}, |
108
|
|
|
'totalCashflowsFromInvestingActivities': { |
109
|
|
|
'raw': int, |
110
|
|
|
'fmt': str, |
111
|
|
|
'longFmt': str |
112
|
|
|
}, |
113
|
|
|
'dividendsPaid': { |
114
|
|
|
'raw': int, |
115
|
|
|
'fmt': str, |
116
|
|
|
'longFmt': str |
117
|
|
|
}, |
118
|
|
|
'netBorrowings': { |
119
|
|
|
'raw': int, |
120
|
|
|
'fmt': str, |
121
|
|
|
'longFmt': str |
122
|
|
|
}, |
123
|
|
|
'otherCashflowsFromFinancingActivities': { |
124
|
|
|
'raw': int, |
125
|
|
|
'fmt': str, |
126
|
|
|
'longFmt': str |
127
|
|
|
}, |
128
|
|
|
'totalCashFromFinancingActivities': { |
129
|
|
|
'raw': int, |
130
|
|
|
'fmt': str, |
131
|
|
|
'longFmt': str |
132
|
|
|
}, |
133
|
|
|
'effectOfExchangeRate': { |
134
|
|
|
'raw': int, |
135
|
|
|
'fmt': str, |
136
|
|
|
'longFmt': str |
137
|
|
|
}, |
138
|
|
|
'changeInCash': { |
139
|
|
|
'raw': int, |
140
|
|
|
'fmt': str, |
141
|
|
|
'longFmt': str |
142
|
|
|
}, |
143
|
|
|
'repurchaseOfStock': { |
144
|
|
|
'raw': int, |
145
|
|
|
'fmt': str, |
146
|
|
|
'longFmt': str |
147
|
|
|
}, |
148
|
|
|
'issuanceOfStock': { |
149
|
|
|
'raw': int, |
150
|
|
|
'fmt': str, |
151
|
|
|
'longFmt': str |
152
|
|
|
} |
153
|
|
|
} |
154
|
|
|
], |
155
|
|
|
'cashflow_quarterly': [ |
156
|
|
|
{ |
157
|
|
|
'maxAge': int, |
158
|
|
|
'endDate': { |
159
|
|
|
'raw': int, |
160
|
|
|
'fmt': str |
161
|
|
|
}, |
162
|
|
|
'netIncome': { |
163
|
|
|
'raw': int, |
164
|
|
|
'fmt': str, |
165
|
|
|
'longFmt': str |
166
|
|
|
}, |
167
|
|
|
'depreciation': { |
168
|
|
|
'raw': int, |
169
|
|
|
'fmt': str, |
170
|
|
|
'longFmt': str |
171
|
|
|
}, |
172
|
|
|
'changeToNetincome': { |
173
|
|
|
'raw': int, |
174
|
|
|
'fmt': str, |
175
|
|
|
'longFmt': str |
176
|
|
|
}, |
177
|
|
|
'changeToAccountReceivables': { |
178
|
|
|
'raw': int, |
179
|
|
|
'fmt': str, |
180
|
|
|
'longFmt': str |
181
|
|
|
}, |
182
|
|
|
'changeToLiabilities': { |
183
|
|
|
'raw': int, |
184
|
|
|
'fmt': str, |
185
|
|
|
'longFmt': str |
186
|
|
|
}, |
187
|
|
|
'changeToInventory': { |
188
|
|
|
'raw': int, |
189
|
|
|
'fmt': str, |
190
|
|
|
'longFmt': str |
191
|
|
|
}, |
192
|
|
|
'changeToOperatingActivities': { |
193
|
|
|
'raw': int, |
194
|
|
|
'fmt': str, |
195
|
|
|
'longFmt': str |
196
|
|
|
}, |
197
|
|
|
'totalCashFromOperatingActivities': { |
198
|
|
|
'raw': int, |
199
|
|
|
'fmt': str, |
200
|
|
|
'longFmt': str |
201
|
|
|
}, |
202
|
|
|
'capitalExpenditures': { |
203
|
|
|
'raw': int, |
204
|
|
|
'fmt': str, |
205
|
|
|
'longFmt': str |
206
|
|
|
}, |
207
|
|
|
'investments': { |
208
|
|
|
'raw': int, |
209
|
|
|
'fmt': str, |
210
|
|
|
'longFmt': str |
211
|
|
|
}, |
212
|
|
|
'otherCashflowsFromInvestingActivities': { |
213
|
|
|
'raw': int, |
214
|
|
|
'fmt': str, |
215
|
|
|
'longFmt': str |
216
|
|
|
}, |
217
|
|
|
'totalCashflowsFromInvestingActivities': { |
218
|
|
|
'raw': int, |
219
|
|
|
'fmt': str, |
220
|
|
|
'longFmt': str |
221
|
|
|
}, |
222
|
|
|
'dividendsPaid': { |
223
|
|
|
'raw': int, |
224
|
|
|
'fmt': str, |
225
|
|
|
'longFmt': str |
226
|
|
|
}, |
227
|
|
|
'otherCashflowsFromFinancingActivities': { |
228
|
|
|
'raw': int, |
229
|
|
|
'fmt': str, |
230
|
|
|
'longFmt': str |
231
|
|
|
}, |
232
|
|
|
'totalCashFromFinancingActivities': { |
233
|
|
|
'raw': int, |
234
|
|
|
'fmt': str, |
235
|
|
|
'longFmt': str |
236
|
|
|
}, |
237
|
|
|
'effectOfExchangeRate': { |
238
|
|
|
'raw': int, |
239
|
|
|
'fmt': str, |
240
|
|
|
'longFmt': str |
241
|
|
|
}, |
242
|
|
|
'changeInCash': { |
243
|
|
|
'raw': int, |
244
|
|
|
'fmt': str, |
245
|
|
|
'longFmt': str |
246
|
|
|
}, |
247
|
|
|
'repurchaseOfStock': { |
248
|
|
|
'raw': int, |
249
|
|
|
'fmt': str, |
250
|
|
|
'longFmt': str |
251
|
|
|
}, |
252
|
|
|
'issuanceOfStock': { |
253
|
|
|
'raw': int, |
254
|
|
|
'fmt': str, |
255
|
|
|
'longFmt': str |
256
|
|
|
} |
257
|
|
|
} |
258
|
|
|
] |
259
|
|
|
} |
260
|
|
|
|