borsapy 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- borsapy-0.1.0/.github/workflows/publish.yml +22 -0
- borsapy-0.1.0/.gitignore +10 -0
- borsapy-0.1.0/LICENSE +190 -0
- borsapy-0.1.0/PKG-INFO +409 -0
- borsapy-0.1.0/README.md +372 -0
- borsapy-0.1.0/borsapy/__init__.py +92 -0
- borsapy-0.1.0/borsapy/_models/__init__.py +1 -0
- borsapy-0.1.0/borsapy/_providers/__init__.py +5 -0
- borsapy-0.1.0/borsapy/_providers/base.py +94 -0
- borsapy-0.1.0/borsapy/_providers/btcturk.py +230 -0
- borsapy-0.1.0/borsapy/_providers/dovizcom.py +282 -0
- borsapy-0.1.0/borsapy/_providers/hedeffiyat.py +376 -0
- borsapy-0.1.0/borsapy/_providers/isin.py +247 -0
- borsapy-0.1.0/borsapy/_providers/isyatirim.py +929 -0
- borsapy-0.1.0/borsapy/_providers/kap.py +534 -0
- borsapy-0.1.0/borsapy/_providers/paratic.py +264 -0
- borsapy-0.1.0/borsapy/_providers/tcmb.py +317 -0
- borsapy-0.1.0/borsapy/_providers/tefas.py +270 -0
- borsapy-0.1.0/borsapy/_providers/viop.py +204 -0
- borsapy-0.1.0/borsapy/cache.py +86 -0
- borsapy-0.1.0/borsapy/crypto.py +153 -0
- borsapy-0.1.0/borsapy/exceptions.py +64 -0
- borsapy-0.1.0/borsapy/fund.py +178 -0
- borsapy-0.1.0/borsapy/fx.py +128 -0
- borsapy-0.1.0/borsapy/index.py +185 -0
- borsapy-0.1.0/borsapy/inflation.py +166 -0
- borsapy-0.1.0/borsapy/market.py +53 -0
- borsapy-0.1.0/borsapy/multi.py +227 -0
- borsapy-0.1.0/borsapy/ticker.py +1192 -0
- borsapy-0.1.0/borsapy/viop.py +162 -0
- borsapy-0.1.0/pyproject.toml +73 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
publish:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
permissions:
|
|
11
|
+
id-token: write
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
|
|
15
|
+
- name: Install uv
|
|
16
|
+
uses: astral-sh/setup-uv@v4
|
|
17
|
+
|
|
18
|
+
- name: Build package
|
|
19
|
+
run: uv build
|
|
20
|
+
|
|
21
|
+
- name: Publish to PyPI
|
|
22
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
borsapy-0.1.0/.gitignore
ADDED
borsapy-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to the Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
Copyright 2025 Said Surucu
|
|
179
|
+
|
|
180
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
181
|
+
you may not use this file except in compliance with the License.
|
|
182
|
+
You may obtain a copy of the License at
|
|
183
|
+
|
|
184
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
185
|
+
|
|
186
|
+
Unless required by applicable law or agreed to in writing, software
|
|
187
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
188
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
189
|
+
See the License for the specific language governing permissions and
|
|
190
|
+
limitations under the License.
|
borsapy-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,409 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: borsapy
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Turkish financial markets data library - yfinance-like API for BIST stocks, forex, crypto, and more
|
|
5
|
+
Project-URL: Homepage, https://github.com/saidsurucu/borsapy
|
|
6
|
+
Project-URL: Documentation, https://github.com/saidsurucu/borsapy#readme
|
|
7
|
+
Project-URL: Repository, https://github.com/saidsurucu/borsapy
|
|
8
|
+
Project-URL: Issues, https://github.com/saidsurucu/borsapy/issues
|
|
9
|
+
Author: Said Surucu
|
|
10
|
+
License: Apache-2.0
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: bist,crypto,finance,forex,market-data,stocks,turkey
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Intended Audience :: Financial and Insurance Industry
|
|
16
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
17
|
+
Classifier: Operating System :: OS Independent
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
23
|
+
Classifier: Topic :: Office/Business :: Financial :: Investment
|
|
24
|
+
Requires-Python: >=3.9
|
|
25
|
+
Requires-Dist: beautifulsoup4>=4.12.0
|
|
26
|
+
Requires-Dist: httpx>=0.27.0
|
|
27
|
+
Requires-Dist: lxml>=5.0.0
|
|
28
|
+
Requires-Dist: openpyxl>=3.1.0
|
|
29
|
+
Requires-Dist: pandas>=2.0.0
|
|
30
|
+
Requires-Dist: pydantic>=2.0.0
|
|
31
|
+
Requires-Dist: urllib3>=2.0.0
|
|
32
|
+
Provides-Extra: dev
|
|
33
|
+
Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
|
|
34
|
+
Requires-Dist: pytest>=7.0.0; extra == 'dev'
|
|
35
|
+
Requires-Dist: ruff>=0.1.0; extra == 'dev'
|
|
36
|
+
Description-Content-Type: text/markdown
|
|
37
|
+
|
|
38
|
+
# borsapy
|
|
39
|
+
|
|
40
|
+
Türk finansal piyasaları için Python veri kütüphanesi. BIST hisseleri, döviz, kripto, yatırım fonları ve ekonomik veriler için yfinance benzeri API.
|
|
41
|
+
|
|
42
|
+
## Kurulum
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
pip install borsapy
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Hızlı Başlangıç
|
|
49
|
+
|
|
50
|
+
```python
|
|
51
|
+
import borsapy as bp
|
|
52
|
+
|
|
53
|
+
# Hisse senedi verisi
|
|
54
|
+
hisse = bp.Ticker("THYAO")
|
|
55
|
+
print(hisse.info) # Anlık fiyat ve şirket bilgileri
|
|
56
|
+
print(hisse.history(period="1ay")) # Geçmiş OHLCV verileri
|
|
57
|
+
print(hisse.balance_sheet) # Bilanço
|
|
58
|
+
|
|
59
|
+
# Çoklu hisse
|
|
60
|
+
data = bp.download(["THYAO", "GARAN", "AKBNK"], period="1ay")
|
|
61
|
+
print(data)
|
|
62
|
+
|
|
63
|
+
# Döviz
|
|
64
|
+
usd = bp.FX("USD")
|
|
65
|
+
print(usd.current) # Güncel kur
|
|
66
|
+
print(usd.history(period="1ay")) # Geçmiş veriler
|
|
67
|
+
|
|
68
|
+
# Kripto
|
|
69
|
+
btc = bp.Crypto("BTCTRY")
|
|
70
|
+
print(btc.current) # Güncel fiyat
|
|
71
|
+
|
|
72
|
+
# Yatırım fonu
|
|
73
|
+
fon = bp.Fund("AAK")
|
|
74
|
+
print(fon.info) # Fon bilgileri
|
|
75
|
+
|
|
76
|
+
# Enflasyon
|
|
77
|
+
enf = bp.Inflation()
|
|
78
|
+
print(enf.latest()) # Son TÜFE verileri
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Ticker (Hisse Senedi)
|
|
84
|
+
|
|
85
|
+
`Ticker` sınıfı, BIST hisse senetleri için kapsamlı veri erişimi sağlar.
|
|
86
|
+
|
|
87
|
+
### Temel Kullanım
|
|
88
|
+
|
|
89
|
+
```python
|
|
90
|
+
import borsapy as bp
|
|
91
|
+
|
|
92
|
+
hisse = bp.Ticker("THYAO")
|
|
93
|
+
|
|
94
|
+
# Anlık fiyat bilgileri
|
|
95
|
+
print(hisse.info["last"]) # Son fiyat
|
|
96
|
+
print(hisse.info["marketCap"]) # Piyasa değeri
|
|
97
|
+
print(hisse.info["trailingPE"]) # F/K oranı
|
|
98
|
+
print(hisse.info["dividendYield"]) # Temettü verimi
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Fiyat Geçmişi
|
|
102
|
+
|
|
103
|
+
```python
|
|
104
|
+
# Dönem bazlı
|
|
105
|
+
df = hisse.history(period="1ay") # Son 1 ay
|
|
106
|
+
df = hisse.history(period="3ay") # Son 3 ay
|
|
107
|
+
df = hisse.history(period="1y") # Son 1 yıl
|
|
108
|
+
df = hisse.history(period="max") # Tüm geçmiş
|
|
109
|
+
|
|
110
|
+
# Tarih aralığı
|
|
111
|
+
df = hisse.history(start="2024-01-01", end="2024-06-30")
|
|
112
|
+
|
|
113
|
+
# Farklı zaman dilimleri
|
|
114
|
+
df = hisse.history(period="5g", interval="1sa") # 5 gün, saatlik
|
|
115
|
+
df = hisse.history(period="1ay", interval="1g") # 1 ay, günlük
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Finansal Tablolar
|
|
119
|
+
|
|
120
|
+
```python
|
|
121
|
+
# Yıllık tablolar
|
|
122
|
+
print(hisse.balance_sheet) # Bilanço
|
|
123
|
+
print(hisse.income_stmt) # Gelir tablosu
|
|
124
|
+
print(hisse.cashflow) # Nakit akış
|
|
125
|
+
|
|
126
|
+
# Çeyreklik tablolar
|
|
127
|
+
print(hisse.quarterly_balance_sheet)
|
|
128
|
+
print(hisse.quarterly_income_stmt)
|
|
129
|
+
print(hisse.quarterly_cashflow)
|
|
130
|
+
|
|
131
|
+
# TTM (Son 12 ay)
|
|
132
|
+
print(hisse.ttm_income_stmt)
|
|
133
|
+
print(hisse.ttm_cashflow)
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Temettü ve Sermaye Artırımları
|
|
137
|
+
|
|
138
|
+
```python
|
|
139
|
+
print(hisse.dividends) # Temettü geçmişi
|
|
140
|
+
print(hisse.splits) # Sermaye artırımları
|
|
141
|
+
print(hisse.actions) # Tüm kurumsal işlemler
|
|
142
|
+
|
|
143
|
+
# Geçmiş verilerde temettü ve split
|
|
144
|
+
df = hisse.history(period="1y", actions=True)
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Ortaklık Yapısı
|
|
148
|
+
|
|
149
|
+
```python
|
|
150
|
+
print(hisse.major_holders) # Ana ortaklar
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### Analist Verileri
|
|
154
|
+
|
|
155
|
+
```python
|
|
156
|
+
print(hisse.analyst_price_targets) # Hedef fiyatlar
|
|
157
|
+
print(hisse.recommendations_summary) # AL/TUT/SAT dağılımı
|
|
158
|
+
print(hisse.recommendations) # Detaylı tavsiyeler
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### KAP Bildirimleri
|
|
162
|
+
|
|
163
|
+
```python
|
|
164
|
+
print(hisse.news) # Son bildirimler
|
|
165
|
+
print(hisse.calendar) # Beklenen açıklamalar
|
|
166
|
+
print(hisse.earnings_dates) # Finansal rapor tarihleri
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
### Diğer Bilgiler
|
|
170
|
+
|
|
171
|
+
```python
|
|
172
|
+
print(hisse.isin) # ISIN kodu
|
|
173
|
+
print(hisse.info["sector"]) # Sektör
|
|
174
|
+
print(hisse.info["industry"]) # Alt sektör
|
|
175
|
+
print(hisse.info["website"]) # Web sitesi
|
|
176
|
+
print(hisse.info["longBusinessSummary"]) # Faaliyet konusu
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## Tickers ve download (Çoklu Hisse)
|
|
182
|
+
|
|
183
|
+
Birden fazla hisse için toplu veri çekme.
|
|
184
|
+
|
|
185
|
+
### Tickers Sınıfı
|
|
186
|
+
|
|
187
|
+
```python
|
|
188
|
+
import borsapy as bp
|
|
189
|
+
|
|
190
|
+
# Birden fazla hisse
|
|
191
|
+
hisseler = bp.Tickers(["THYAO", "GARAN", "AKBNK"])
|
|
192
|
+
|
|
193
|
+
# Her hissenin bilgilerine erişim
|
|
194
|
+
for sembol in hisseler.symbols:
|
|
195
|
+
ticker = hisseler.tickers[sembol]
|
|
196
|
+
print(f"{sembol}: {ticker.info['last']}")
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
### download Fonksiyonu
|
|
200
|
+
|
|
201
|
+
```python
|
|
202
|
+
# Basit kullanım
|
|
203
|
+
df = bp.download(["THYAO", "GARAN", "AKBNK"], period="1ay")
|
|
204
|
+
|
|
205
|
+
# Ticker bazlı gruplama
|
|
206
|
+
df = bp.download(["THYAO", "GARAN"], period="1ay", group_by="ticker")
|
|
207
|
+
|
|
208
|
+
# Sütun bazlı gruplama (varsayılan)
|
|
209
|
+
df = bp.download(["THYAO", "GARAN"], period="1ay", group_by="column")
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
## Index (Endeksler)
|
|
215
|
+
|
|
216
|
+
BIST endekslerine erişim.
|
|
217
|
+
|
|
218
|
+
```python
|
|
219
|
+
import borsapy as bp
|
|
220
|
+
|
|
221
|
+
# Mevcut endeksler
|
|
222
|
+
print(bp.indices())
|
|
223
|
+
|
|
224
|
+
# Endeks verisi
|
|
225
|
+
xu100 = bp.Index("XU100")
|
|
226
|
+
print(xu100.history(period="1ay"))
|
|
227
|
+
|
|
228
|
+
# Endeks bileşenleri
|
|
229
|
+
print(xu100.components)
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
---
|
|
233
|
+
|
|
234
|
+
## FX (Döviz ve Emtia)
|
|
235
|
+
|
|
236
|
+
Döviz kurları ve emtia fiyatları.
|
|
237
|
+
|
|
238
|
+
### Döviz Kurları
|
|
239
|
+
|
|
240
|
+
```python
|
|
241
|
+
import borsapy as bp
|
|
242
|
+
|
|
243
|
+
usd = bp.FX("USD")
|
|
244
|
+
print(usd.current) # Güncel kur
|
|
245
|
+
print(usd.history(period="1ay")) # Geçmiş veriler
|
|
246
|
+
|
|
247
|
+
# Diğer dövizler
|
|
248
|
+
eur = bp.FX("EUR")
|
|
249
|
+
gbp = bp.FX("GBP")
|
|
250
|
+
chf = bp.FX("CHF")
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
### Altın ve Emtialar
|
|
254
|
+
|
|
255
|
+
```python
|
|
256
|
+
# Altın
|
|
257
|
+
gram_altin = bp.FX("gram-altin")
|
|
258
|
+
ceyrek = bp.FX("ceyrek-altin")
|
|
259
|
+
yarim = bp.FX("yarim-altin")
|
|
260
|
+
tam = bp.FX("tam-altin")
|
|
261
|
+
cumhuriyet = bp.FX("cumhuriyet-altini")
|
|
262
|
+
|
|
263
|
+
# Gümüş
|
|
264
|
+
gumus = bp.FX("gumus")
|
|
265
|
+
|
|
266
|
+
print(gram_altin.current)
|
|
267
|
+
print(gram_altin.history(period="1ay"))
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
---
|
|
271
|
+
|
|
272
|
+
## Crypto (Kripto Para)
|
|
273
|
+
|
|
274
|
+
BtcTurk üzerinden kripto para verileri.
|
|
275
|
+
|
|
276
|
+
```python
|
|
277
|
+
import borsapy as bp
|
|
278
|
+
|
|
279
|
+
# Mevcut çiftler
|
|
280
|
+
print(bp.crypto_pairs())
|
|
281
|
+
|
|
282
|
+
# Bitcoin/TRY
|
|
283
|
+
btc = bp.Crypto("BTCTRY")
|
|
284
|
+
print(btc.current) # Güncel fiyat
|
|
285
|
+
print(btc.history(period="1ay")) # OHLCV geçmişi
|
|
286
|
+
|
|
287
|
+
# Ethereum/TRY
|
|
288
|
+
eth = bp.Crypto("ETHTRY")
|
|
289
|
+
print(eth.current)
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
---
|
|
293
|
+
|
|
294
|
+
## Fund (Yatırım Fonları)
|
|
295
|
+
|
|
296
|
+
TEFAS üzerinden yatırım fonu verileri.
|
|
297
|
+
|
|
298
|
+
```python
|
|
299
|
+
import borsapy as bp
|
|
300
|
+
|
|
301
|
+
# Fon arama
|
|
302
|
+
print(bp.search_funds("banka"))
|
|
303
|
+
|
|
304
|
+
# Fon verisi
|
|
305
|
+
fon = bp.Fund("AAK")
|
|
306
|
+
print(fon.info) # Fon bilgileri
|
|
307
|
+
print(fon.history(period="1ay")) # Fiyat geçmişi
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
---
|
|
311
|
+
|
|
312
|
+
## Inflation (Enflasyon)
|
|
313
|
+
|
|
314
|
+
TCMB enflasyon verileri.
|
|
315
|
+
|
|
316
|
+
```python
|
|
317
|
+
import borsapy as bp
|
|
318
|
+
|
|
319
|
+
enf = bp.Inflation()
|
|
320
|
+
|
|
321
|
+
# Son TÜFE verileri
|
|
322
|
+
print(enf.latest())
|
|
323
|
+
|
|
324
|
+
# Enflasyon hesaplayıcı
|
|
325
|
+
# 100.000 TL'nin 2020-01'den 2024-01'e değeri
|
|
326
|
+
sonuc = enf.calculate(100000, "2020-01", "2024-01")
|
|
327
|
+
print(sonuc)
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
---
|
|
331
|
+
|
|
332
|
+
## VIOP (Vadeli İşlem ve Opsiyon)
|
|
333
|
+
|
|
334
|
+
İş Yatırım üzerinden vadeli işlem ve opsiyon verileri.
|
|
335
|
+
|
|
336
|
+
```python
|
|
337
|
+
import borsapy as bp
|
|
338
|
+
|
|
339
|
+
viop = bp.VIOP()
|
|
340
|
+
|
|
341
|
+
# Vadeli işlem kontratları
|
|
342
|
+
print(viop.futures())
|
|
343
|
+
|
|
344
|
+
# Opsiyon verileri
|
|
345
|
+
print(viop.options("F_XU0300225"))
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
---
|
|
349
|
+
|
|
350
|
+
## Şirket Listesi
|
|
351
|
+
|
|
352
|
+
BIST şirketlerini listeleme ve arama.
|
|
353
|
+
|
|
354
|
+
```python
|
|
355
|
+
import borsapy as bp
|
|
356
|
+
|
|
357
|
+
# Tüm şirketler
|
|
358
|
+
df = bp.companies()
|
|
359
|
+
print(df)
|
|
360
|
+
|
|
361
|
+
# Şirket arama
|
|
362
|
+
sonuc = bp.search_companies("banka")
|
|
363
|
+
print(sonuc)
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
---
|
|
367
|
+
|
|
368
|
+
## Veri Kaynakları
|
|
369
|
+
|
|
370
|
+
| Modül | Kaynak | Açıklama |
|
|
371
|
+
|-------|--------|----------|
|
|
372
|
+
| Ticker | İş Yatırım, Paratic, KAP | Hisse verileri, finansallar, bildirimler |
|
|
373
|
+
| Index | Paratic | BIST endeksleri |
|
|
374
|
+
| FX | doviz.com | Döviz kurları, altın, emtia |
|
|
375
|
+
| Crypto | BtcTurk | Kripto para verileri |
|
|
376
|
+
| Fund | TEFAS | Yatırım fonu verileri |
|
|
377
|
+
| Inflation | TCMB | Enflasyon verileri |
|
|
378
|
+
| VIOP | İş Yatırım | Vadeli işlem ve opsiyon |
|
|
379
|
+
|
|
380
|
+
---
|
|
381
|
+
|
|
382
|
+
## yfinance ile Karşılaştırma
|
|
383
|
+
|
|
384
|
+
### Ortak Özellikler
|
|
385
|
+
- `Ticker`, `Tickers` sınıfları
|
|
386
|
+
- `download()` fonksiyonu
|
|
387
|
+
- `info`, `history()`, finansal tablolar
|
|
388
|
+
- Temettü, split, kurumsal işlemler
|
|
389
|
+
- Analist hedefleri ve tavsiyeler
|
|
390
|
+
|
|
391
|
+
### borsapy'ye Özgü
|
|
392
|
+
- **FX**: Döviz ve emtia verileri (doviz.com)
|
|
393
|
+
- **Crypto**: Kripto para (BtcTurk)
|
|
394
|
+
- **Fund**: Yatırım fonları (TEFAS)
|
|
395
|
+
- **Inflation**: Enflasyon verileri ve hesaplayıcı (TCMB)
|
|
396
|
+
- **VIOP**: Vadeli işlem ve opsiyon
|
|
397
|
+
- **KAP Entegrasyonu**: Resmi bildirimler ve takvim
|
|
398
|
+
|
|
399
|
+
---
|
|
400
|
+
|
|
401
|
+
## Katkıda Bulunma
|
|
402
|
+
|
|
403
|
+
Ek özellik istekleri ve öneriler için [GitHub Discussions](https://github.com/saidsurucu/borsapy/discussions) üzerinden tartışma açabilirsiniz.
|
|
404
|
+
|
|
405
|
+
---
|
|
406
|
+
|
|
407
|
+
## Lisans
|
|
408
|
+
|
|
409
|
+
Apache 2.0
|