fintables 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.
- fintables-0.1.0/LICENSE +21 -0
- fintables-0.1.0/PKG-INFO +194 -0
- fintables-0.1.0/README.md +161 -0
- fintables-0.1.0/pyproject.toml +61 -0
- fintables-0.1.0/setup.cfg +4 -0
- fintables-0.1.0/src/fintables/__init__.py +8 -0
- fintables-0.1.0/src/fintables/api/__init__.py +3 -0
- fintables-0.1.0/src/fintables/api/auth.py +87 -0
- fintables-0.1.0/src/fintables/api/client.py +184 -0
- fintables-0.1.0/src/fintables/api/endpoints/__init__.py +65 -0
- fintables-0.1.0/src/fintables/api/endpoints/agenda.py +23 -0
- fintables-0.1.0/src/fintables/api/endpoints/analyst_ratings.py +26 -0
- fintables-0.1.0/src/fintables/api/endpoints/companies.py +9 -0
- fintables-0.1.0/src/fintables/api/endpoints/feed.py +47 -0
- fintables-0.1.0/src/fintables/api/endpoints/funds.py +14 -0
- fintables-0.1.0/src/fintables/api/endpoints/memo.py +36 -0
- fintables-0.1.0/src/fintables/api/endpoints/newsletter.py +36 -0
- fintables-0.1.0/src/fintables/api/endpoints/notifications.py +41 -0
- fintables-0.1.0/src/fintables/api/endpoints/portfolio.py +95 -0
- fintables-0.1.0/src/fintables/api/endpoints/post.py +32 -0
- fintables-0.1.0/src/fintables/api/endpoints/search.py +106 -0
- fintables-0.1.0/src/fintables/api/endpoints/sheets.py +12 -0
- fintables-0.1.0/src/fintables/api/endpoints/symbols.py +9 -0
- fintables-0.1.0/src/fintables/api/endpoints/video.py +34 -0
- fintables-0.1.0/src/fintables/api/endpoints/watchlist.py +22 -0
- fintables-0.1.0/src/fintables/cli/__init__.py +3 -0
- fintables-0.1.0/src/fintables/cli/commands/__init__.py +33 -0
- fintables-0.1.0/src/fintables/cli/commands/agenda.py +54 -0
- fintables-0.1.0/src/fintables/cli/commands/analyst.py +43 -0
- fintables-0.1.0/src/fintables/cli/commands/auth.py +47 -0
- fintables-0.1.0/src/fintables/cli/commands/company.py +31 -0
- fintables-0.1.0/src/fintables/cli/commands/feed.py +43 -0
- fintables-0.1.0/src/fintables/cli/commands/fund.py +38 -0
- fintables-0.1.0/src/fintables/cli/commands/memo.py +118 -0
- fintables-0.1.0/src/fintables/cli/commands/newsletter.py +83 -0
- fintables-0.1.0/src/fintables/cli/commands/notification.py +90 -0
- fintables-0.1.0/src/fintables/cli/commands/portfolio.py +288 -0
- fintables-0.1.0/src/fintables/cli/commands/post.py +70 -0
- fintables-0.1.0/src/fintables/cli/commands/search.py +31 -0
- fintables-0.1.0/src/fintables/cli/commands/symbol.py +57 -0
- fintables-0.1.0/src/fintables/cli/commands/video.py +83 -0
- fintables-0.1.0/src/fintables/cli/commands/watchlist.py +54 -0
- fintables-0.1.0/src/fintables/cli/main.py +112 -0
- fintables-0.1.0/src/fintables/config.py +53 -0
- fintables-0.1.0/src/fintables/exceptions.py +19 -0
- fintables-0.1.0/src/fintables/i18n.py +1199 -0
- fintables-0.1.0/src/fintables/models/__init__.py +129 -0
- fintables-0.1.0/src/fintables/models/agenda.py +20 -0
- fintables-0.1.0/src/fintables/models/analyst_rating.py +36 -0
- fintables-0.1.0/src/fintables/models/company.py +40 -0
- fintables-0.1.0/src/fintables/models/feed.py +143 -0
- fintables-0.1.0/src/fintables/models/fund.py +87 -0
- fintables-0.1.0/src/fintables/models/memo.py +21 -0
- fintables-0.1.0/src/fintables/models/newsletter.py +59 -0
- fintables-0.1.0/src/fintables/models/notification.py +25 -0
- fintables-0.1.0/src/fintables/models/portfolio.py +42 -0
- fintables-0.1.0/src/fintables/models/post.py +46 -0
- fintables-0.1.0/src/fintables/models/search.py +28 -0
- fintables-0.1.0/src/fintables/models/sheets.py +28 -0
- fintables-0.1.0/src/fintables/models/symbol.py +75 -0
- fintables-0.1.0/src/fintables/models/video.py +29 -0
- fintables-0.1.0/src/fintables/models/watchlist.py +12 -0
- fintables-0.1.0/src/fintables/output/__init__.py +31 -0
- fintables-0.1.0/src/fintables/output/formatter.py +954 -0
- fintables-0.1.0/src/fintables.egg-info/PKG-INFO +194 -0
- fintables-0.1.0/src/fintables.egg-info/SOURCES.txt +84 -0
- fintables-0.1.0/src/fintables.egg-info/dependency_links.txt +1 -0
- fintables-0.1.0/src/fintables.egg-info/entry_points.txt +2 -0
- fintables-0.1.0/src/fintables.egg-info/requires.txt +12 -0
- fintables-0.1.0/src/fintables.egg-info/top_level.txt +1 -0
- fintables-0.1.0/tests/test_analyst_ratings.py +52 -0
- fintables-0.1.0/tests/test_auth.py +46 -0
- fintables-0.1.0/tests/test_cli.py +136 -0
- fintables-0.1.0/tests/test_client.py +103 -0
- fintables-0.1.0/tests/test_company.py +25 -0
- fintables-0.1.0/tests/test_e2e.py +223 -0
- fintables-0.1.0/tests/test_feed.py +45 -0
- fintables-0.1.0/tests/test_formatter.py +118 -0
- fintables-0.1.0/tests/test_i18n.py +192 -0
- fintables-0.1.0/tests/test_memo.py +101 -0
- fintables-0.1.0/tests/test_notifications.py +191 -0
- fintables-0.1.0/tests/test_search.py +80 -0
- fintables-0.1.0/tests/test_sheets.py +35 -0
- fintables-0.1.0/tests/test_symbol.py +25 -0
- fintables-0.1.0/tests/test_video.py +73 -0
- fintables-0.1.0/tests/test_watchlist.py +59 -0
fintables-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
fintables-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: fintables
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Fintables mobile API client and CLI tool
|
|
5
|
+
Author: Sinan Erdinç
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/sinanerdinc/fintables
|
|
8
|
+
Project-URL: Repository, https://github.com/sinanerdinc/fintables
|
|
9
|
+
Project-URL: Issues, https://github.com/sinanerdinc/fintables/issues
|
|
10
|
+
Keywords: fintables,finance,borsa,bist,cli,api,stock-market
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Topic :: Office/Business :: Financial :: Investment
|
|
18
|
+
Requires-Python: >=3.11
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
License-File: LICENSE
|
|
21
|
+
Requires-Dist: httpx>=0.27.0
|
|
22
|
+
Requires-Dist: curl-cffi>=0.7.0
|
|
23
|
+
Requires-Dist: pydantic>=2.7.0
|
|
24
|
+
Requires-Dist: pydantic-settings>=2.2.0
|
|
25
|
+
Requires-Dist: typer>=0.12.0
|
|
26
|
+
Requires-Dist: rich>=13.7.0
|
|
27
|
+
Requires-Dist: python-dotenv>=1.0.0
|
|
28
|
+
Provides-Extra: dev
|
|
29
|
+
Requires-Dist: pytest>=8.0.0; extra == "dev"
|
|
30
|
+
Requires-Dist: pytest-asyncio>=0.23.0; extra == "dev"
|
|
31
|
+
Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
|
|
32
|
+
Dynamic: license-file
|
|
33
|
+
|
|
34
|
+
# Fintables
|
|
35
|
+
|
|
36
|
+
Fintables mobil API'si için Python paketi ve CLI aracı.
|
|
37
|
+
|
|
38
|
+
## Özellikler
|
|
39
|
+
- **Public Endpointler**: Şirket detayları (`company`), sembol özetleri (`symbol summary`), analist değerlendirmeleri (`analyst`), çoklu arama (`search`).
|
|
40
|
+
- **Authenticated Endpointler**: Finansal tablolar (`symbol sheets`), haber akışı (`feed`), favoriler (`watchlist`), notlar (`memo`).
|
|
41
|
+
- **Zengin Terminal Görünümü**: `rich` destekli tablolar, renkli kartlar, rozetler ve ikonlar.
|
|
42
|
+
- **JSON Çıktı Desteği**: Otomasyonlar ve scriptler için `--output json`.
|
|
43
|
+
- **Async-First Mimari**: `httpx` ve `pydantic v2` tabanlı.
|
|
44
|
+
|
|
45
|
+
## Kurulum
|
|
46
|
+
```bash
|
|
47
|
+
pip install -e .
|
|
48
|
+
# veya test paketleri ile:
|
|
49
|
+
pip install -e ".[dev]"
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Yapılandırma
|
|
53
|
+
`.env.example` dosyasını `.env` olarak kopyalayın ve kimlik bilgilerinizi girin:
|
|
54
|
+
```bash
|
|
55
|
+
cp .env.example .env
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Python SDK Kullanımı
|
|
59
|
+
|
|
60
|
+
Paketi başka bir Python projesinde kütüphane/SDK olarak kullanmak isterseniz `FintablesClient` istemcisini ve endpoint fonksiyonlarını doğrudan import edebilirsiniz:
|
|
61
|
+
|
|
62
|
+
```python
|
|
63
|
+
import asyncio
|
|
64
|
+
from fintables import FintablesClient
|
|
65
|
+
from fintables.api.endpoints import get_company, get_symbol_summary, add_favorite
|
|
66
|
+
|
|
67
|
+
async def main():
|
|
68
|
+
async with FintablesClient() as client:
|
|
69
|
+
# Şirket detayları (Public)
|
|
70
|
+
company = await get_company(client, "ASELS")
|
|
71
|
+
print(f"Şirket Kodu: {company.code} | Ünvan: {company.title}")
|
|
72
|
+
|
|
73
|
+
# Sembol özeti (Public)
|
|
74
|
+
summary = await get_symbol_summary(client, "ASELS")
|
|
75
|
+
print(f"Sektör Sayısı: {len(summary.data.sectors)}")
|
|
76
|
+
|
|
77
|
+
# Favori ekleme (Authenticated - .env bilgilerini kullanır)
|
|
78
|
+
# res = await add_favorite(client, "ASELS")
|
|
79
|
+
|
|
80
|
+
if __name__ == "__main__":
|
|
81
|
+
asyncio.run(main())
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## CLI Kullanımı
|
|
85
|
+
```bash
|
|
86
|
+
# Şirket bilgisi
|
|
87
|
+
fintables company ASELS
|
|
88
|
+
|
|
89
|
+
# Sembol özeti
|
|
90
|
+
fintables symbol ASELS summary
|
|
91
|
+
|
|
92
|
+
# Analist tahminleri
|
|
93
|
+
fintables analyst ASELS
|
|
94
|
+
fintables analyst ASELS --model-portfolio
|
|
95
|
+
|
|
96
|
+
# Çoklu arama
|
|
97
|
+
fintables search Polyester
|
|
98
|
+
|
|
99
|
+
# Finansal tablolar (Authenticated)
|
|
100
|
+
fintables symbol FROTO sheets
|
|
101
|
+
fintables symbol FROTO sheets --sheet balance --periods 5
|
|
102
|
+
|
|
103
|
+
# Haber akışı (Authenticated)
|
|
104
|
+
fintables feed
|
|
105
|
+
fintables feed FROTO
|
|
106
|
+
|
|
107
|
+
# Favori hisseler (Authenticated)
|
|
108
|
+
fintables watchlist add FROTO
|
|
109
|
+
fintables watchlist remove FROTO
|
|
110
|
+
|
|
111
|
+
# Notlar (Authenticated)
|
|
112
|
+
fintables memo list
|
|
113
|
+
fintables memo add FROTO "Beklentim pozitif"
|
|
114
|
+
fintables memo update 42212 "Güncellenmiş not"
|
|
115
|
+
fintables memo delete 42212
|
|
116
|
+
|
|
117
|
+
# Fonlar
|
|
118
|
+
fintables fund TLY
|
|
119
|
+
fintables fund MAC
|
|
120
|
+
|
|
121
|
+
# Araştırma Yazıları & Şirket Notları (Authenticated)
|
|
122
|
+
fintables post list # tüm yazıları listele
|
|
123
|
+
fintables post list --filter "Şirket Notları" # kategori filtresi
|
|
124
|
+
fintables post list --page 2 # sayfa ilerle
|
|
125
|
+
fintables post read altny-analist-toplantisi-notlari-2026-6 # yazıyı oku (+ benzer yazılar)
|
|
126
|
+
fintables post read <slug> --output json # JSON çıktı
|
|
127
|
+
|
|
128
|
+
# Bültenler (Authenticated)
|
|
129
|
+
fintables newsletter list # tüm bültenleri listele
|
|
130
|
+
fintables newsletter list --category bist # kategori filtresi
|
|
131
|
+
fintables newsletter list --filter "Günlük" # başlık/kategori filtresi
|
|
132
|
+
fintables newsletter list --page 2 # sayfa ilerle
|
|
133
|
+
fintables newsletter read endekslerde-tarihi-degisim # bülten içeriğini oku
|
|
134
|
+
fintables newsletter read <slug> --output json # JSON çıktı
|
|
135
|
+
|
|
136
|
+
# Videolar (YouTube & Borsa Programları)
|
|
137
|
+
fintables video list # videoları listele
|
|
138
|
+
fintables video list --series "Haftalık Sohbetler" # seriye göre filtrele
|
|
139
|
+
fintables video list --series "Halka Arz Oluyor" # halka arz videoları
|
|
140
|
+
fintables video list --filter "Bilanço" # başlığa göre filtrele
|
|
141
|
+
fintables video list --page 2 # sayfa ilerle
|
|
142
|
+
fintables video show bilanco-donemini-kapatiyoruz-fintables-haftalik-sohbetler-149 # detay & bölümler
|
|
143
|
+
fintables video show <slug> --output json # JSON formatında çıktı
|
|
144
|
+
|
|
145
|
+
# Ajanda / Ekonomik Takvim (Authenticated)
|
|
146
|
+
fintables agenda # bugünün ajandası (varsayılan)
|
|
147
|
+
fintables agenda today # bugün
|
|
148
|
+
fintables agenda thisWeek # bu hafta
|
|
149
|
+
fintables agenda nextWeek # gelecek hafta
|
|
150
|
+
fintables agenda thisWeek --type dividend # sadece temettüler
|
|
151
|
+
fintables agenda thisWeek --type macro # sadece makro veriler
|
|
152
|
+
fintables agenda thisWeek --output json # JSON çıktı
|
|
153
|
+
|
|
154
|
+
# Sanal Portföy (Authenticated)
|
|
155
|
+
fintables portfolio list # tüm portföyleri listele
|
|
156
|
+
fintables portfolio create "Benim Portföyüm" # yeni portföy oluştur
|
|
157
|
+
fintables portfolio show "Benim Portföyüm" # pozisyonları göster
|
|
158
|
+
fintables portfolio buy "Benim Portföyüm" SASA 250000 2.76 --date 2026-09-22 # alış ekle
|
|
159
|
+
fintables portfolio sell "Benim Portföyüm" SASA 100000 3.10 --date 2026-09-22 # satış ekle
|
|
160
|
+
fintables portfolio delete "Benim Portföyüm" # portföyü sil (onay yok)
|
|
161
|
+
fintables portfolio rename "Benim Portföyüm" "Yeni İsim" # portföy adını değiştir
|
|
162
|
+
|
|
163
|
+
# UUID ile de kullanılabilir (isimsiz veya belirsiz durumlarda)
|
|
164
|
+
fintables portfolio show ad857c49-d902-4f58-a57a-6429e7b40460
|
|
165
|
+
|
|
166
|
+
# Bildirimler (Authenticated)
|
|
167
|
+
fintables notification list # bildirimleri listele
|
|
168
|
+
fintables notification list --page-size 50 # sayfa boyutu ile listele
|
|
169
|
+
fintables notification unread # okunmamış bildirim durumu ve son okuma tarihi
|
|
170
|
+
fintables notification mark-read # tüm bildirimleri okundu olarak işaretle
|
|
171
|
+
fintables notification list --output json # JSON çıktısı
|
|
172
|
+
|
|
173
|
+
# Dil Desteği (i18n)
|
|
174
|
+
fintables --lang tr [KOMUT] # Türkçe CLI ve çıktılar (varsayılan: sistem dili veya tr)
|
|
175
|
+
fintables --lang en [COMMAND] # İngilizce CLI ve çıktılar
|
|
176
|
+
# Veya ortam değişkeni:
|
|
177
|
+
export FINTABLES_LANG=tr # ya da en
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
## Yasal Uyarı (Disclaimer)
|
|
181
|
+
|
|
182
|
+
> **Önemli:** Bu proje tamamen **eğitim ve kişisel kullanım amacıyla** geliştirilmiş açık kaynaklı gayriresmi bir araçtır.
|
|
183
|
+
>
|
|
184
|
+
> - Fintables (Fintables Bilişim Teknolojileri A.Ş.) ile hiçbir resmi bağı, ortaklığı veya sponsorluğu yoktur.
|
|
185
|
+
> - Bu araç finansal tavsiye, yatırım tavsiyesi veya alım-satım önerisi sunmaz.
|
|
186
|
+
> - Verilerin doğruluğu, güncelliği veya eksiksizliği konusunda herhangi bir garanti verilmez. Veri sağlayıcısından alınan verilerin kullanımında doğabilecek her türlü sorumluluk kullanıcıya aittir.
|
|
187
|
+
> - Yazılım "olduğu gibi" (AS IS) sunulmaktadır; yazar ve geliştiriciler doğabilecek doğrudan veya dolaylı hiçbir zarardan sorumlu tutulamaz.
|
|
188
|
+
|
|
189
|
+
## Lisans
|
|
190
|
+
|
|
191
|
+
Bu proje [MIT Lisansı](LICENSE) altında lisanslanmıştır.
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# Fintables
|
|
2
|
+
|
|
3
|
+
Fintables mobil API'si için Python paketi ve CLI aracı.
|
|
4
|
+
|
|
5
|
+
## Özellikler
|
|
6
|
+
- **Public Endpointler**: Şirket detayları (`company`), sembol özetleri (`symbol summary`), analist değerlendirmeleri (`analyst`), çoklu arama (`search`).
|
|
7
|
+
- **Authenticated Endpointler**: Finansal tablolar (`symbol sheets`), haber akışı (`feed`), favoriler (`watchlist`), notlar (`memo`).
|
|
8
|
+
- **Zengin Terminal Görünümü**: `rich` destekli tablolar, renkli kartlar, rozetler ve ikonlar.
|
|
9
|
+
- **JSON Çıktı Desteği**: Otomasyonlar ve scriptler için `--output json`.
|
|
10
|
+
- **Async-First Mimari**: `httpx` ve `pydantic v2` tabanlı.
|
|
11
|
+
|
|
12
|
+
## Kurulum
|
|
13
|
+
```bash
|
|
14
|
+
pip install -e .
|
|
15
|
+
# veya test paketleri ile:
|
|
16
|
+
pip install -e ".[dev]"
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Yapılandırma
|
|
20
|
+
`.env.example` dosyasını `.env` olarak kopyalayın ve kimlik bilgilerinizi girin:
|
|
21
|
+
```bash
|
|
22
|
+
cp .env.example .env
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Python SDK Kullanımı
|
|
26
|
+
|
|
27
|
+
Paketi başka bir Python projesinde kütüphane/SDK olarak kullanmak isterseniz `FintablesClient` istemcisini ve endpoint fonksiyonlarını doğrudan import edebilirsiniz:
|
|
28
|
+
|
|
29
|
+
```python
|
|
30
|
+
import asyncio
|
|
31
|
+
from fintables import FintablesClient
|
|
32
|
+
from fintables.api.endpoints import get_company, get_symbol_summary, add_favorite
|
|
33
|
+
|
|
34
|
+
async def main():
|
|
35
|
+
async with FintablesClient() as client:
|
|
36
|
+
# Şirket detayları (Public)
|
|
37
|
+
company = await get_company(client, "ASELS")
|
|
38
|
+
print(f"Şirket Kodu: {company.code} | Ünvan: {company.title}")
|
|
39
|
+
|
|
40
|
+
# Sembol özeti (Public)
|
|
41
|
+
summary = await get_symbol_summary(client, "ASELS")
|
|
42
|
+
print(f"Sektör Sayısı: {len(summary.data.sectors)}")
|
|
43
|
+
|
|
44
|
+
# Favori ekleme (Authenticated - .env bilgilerini kullanır)
|
|
45
|
+
# res = await add_favorite(client, "ASELS")
|
|
46
|
+
|
|
47
|
+
if __name__ == "__main__":
|
|
48
|
+
asyncio.run(main())
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## CLI Kullanımı
|
|
52
|
+
```bash
|
|
53
|
+
# Şirket bilgisi
|
|
54
|
+
fintables company ASELS
|
|
55
|
+
|
|
56
|
+
# Sembol özeti
|
|
57
|
+
fintables symbol ASELS summary
|
|
58
|
+
|
|
59
|
+
# Analist tahminleri
|
|
60
|
+
fintables analyst ASELS
|
|
61
|
+
fintables analyst ASELS --model-portfolio
|
|
62
|
+
|
|
63
|
+
# Çoklu arama
|
|
64
|
+
fintables search Polyester
|
|
65
|
+
|
|
66
|
+
# Finansal tablolar (Authenticated)
|
|
67
|
+
fintables symbol FROTO sheets
|
|
68
|
+
fintables symbol FROTO sheets --sheet balance --periods 5
|
|
69
|
+
|
|
70
|
+
# Haber akışı (Authenticated)
|
|
71
|
+
fintables feed
|
|
72
|
+
fintables feed FROTO
|
|
73
|
+
|
|
74
|
+
# Favori hisseler (Authenticated)
|
|
75
|
+
fintables watchlist add FROTO
|
|
76
|
+
fintables watchlist remove FROTO
|
|
77
|
+
|
|
78
|
+
# Notlar (Authenticated)
|
|
79
|
+
fintables memo list
|
|
80
|
+
fintables memo add FROTO "Beklentim pozitif"
|
|
81
|
+
fintables memo update 42212 "Güncellenmiş not"
|
|
82
|
+
fintables memo delete 42212
|
|
83
|
+
|
|
84
|
+
# Fonlar
|
|
85
|
+
fintables fund TLY
|
|
86
|
+
fintables fund MAC
|
|
87
|
+
|
|
88
|
+
# Araştırma Yazıları & Şirket Notları (Authenticated)
|
|
89
|
+
fintables post list # tüm yazıları listele
|
|
90
|
+
fintables post list --filter "Şirket Notları" # kategori filtresi
|
|
91
|
+
fintables post list --page 2 # sayfa ilerle
|
|
92
|
+
fintables post read altny-analist-toplantisi-notlari-2026-6 # yazıyı oku (+ benzer yazılar)
|
|
93
|
+
fintables post read <slug> --output json # JSON çıktı
|
|
94
|
+
|
|
95
|
+
# Bültenler (Authenticated)
|
|
96
|
+
fintables newsletter list # tüm bültenleri listele
|
|
97
|
+
fintables newsletter list --category bist # kategori filtresi
|
|
98
|
+
fintables newsletter list --filter "Günlük" # başlık/kategori filtresi
|
|
99
|
+
fintables newsletter list --page 2 # sayfa ilerle
|
|
100
|
+
fintables newsletter read endekslerde-tarihi-degisim # bülten içeriğini oku
|
|
101
|
+
fintables newsletter read <slug> --output json # JSON çıktı
|
|
102
|
+
|
|
103
|
+
# Videolar (YouTube & Borsa Programları)
|
|
104
|
+
fintables video list # videoları listele
|
|
105
|
+
fintables video list --series "Haftalık Sohbetler" # seriye göre filtrele
|
|
106
|
+
fintables video list --series "Halka Arz Oluyor" # halka arz videoları
|
|
107
|
+
fintables video list --filter "Bilanço" # başlığa göre filtrele
|
|
108
|
+
fintables video list --page 2 # sayfa ilerle
|
|
109
|
+
fintables video show bilanco-donemini-kapatiyoruz-fintables-haftalik-sohbetler-149 # detay & bölümler
|
|
110
|
+
fintables video show <slug> --output json # JSON formatında çıktı
|
|
111
|
+
|
|
112
|
+
# Ajanda / Ekonomik Takvim (Authenticated)
|
|
113
|
+
fintables agenda # bugünün ajandası (varsayılan)
|
|
114
|
+
fintables agenda today # bugün
|
|
115
|
+
fintables agenda thisWeek # bu hafta
|
|
116
|
+
fintables agenda nextWeek # gelecek hafta
|
|
117
|
+
fintables agenda thisWeek --type dividend # sadece temettüler
|
|
118
|
+
fintables agenda thisWeek --type macro # sadece makro veriler
|
|
119
|
+
fintables agenda thisWeek --output json # JSON çıktı
|
|
120
|
+
|
|
121
|
+
# Sanal Portföy (Authenticated)
|
|
122
|
+
fintables portfolio list # tüm portföyleri listele
|
|
123
|
+
fintables portfolio create "Benim Portföyüm" # yeni portföy oluştur
|
|
124
|
+
fintables portfolio show "Benim Portföyüm" # pozisyonları göster
|
|
125
|
+
fintables portfolio buy "Benim Portföyüm" SASA 250000 2.76 --date 2026-09-22 # alış ekle
|
|
126
|
+
fintables portfolio sell "Benim Portföyüm" SASA 100000 3.10 --date 2026-09-22 # satış ekle
|
|
127
|
+
fintables portfolio delete "Benim Portföyüm" # portföyü sil (onay yok)
|
|
128
|
+
fintables portfolio rename "Benim Portföyüm" "Yeni İsim" # portföy adını değiştir
|
|
129
|
+
|
|
130
|
+
# UUID ile de kullanılabilir (isimsiz veya belirsiz durumlarda)
|
|
131
|
+
fintables portfolio show ad857c49-d902-4f58-a57a-6429e7b40460
|
|
132
|
+
|
|
133
|
+
# Bildirimler (Authenticated)
|
|
134
|
+
fintables notification list # bildirimleri listele
|
|
135
|
+
fintables notification list --page-size 50 # sayfa boyutu ile listele
|
|
136
|
+
fintables notification unread # okunmamış bildirim durumu ve son okuma tarihi
|
|
137
|
+
fintables notification mark-read # tüm bildirimleri okundu olarak işaretle
|
|
138
|
+
fintables notification list --output json # JSON çıktısı
|
|
139
|
+
|
|
140
|
+
# Dil Desteği (i18n)
|
|
141
|
+
fintables --lang tr [KOMUT] # Türkçe CLI ve çıktılar (varsayılan: sistem dili veya tr)
|
|
142
|
+
fintables --lang en [COMMAND] # İngilizce CLI ve çıktılar
|
|
143
|
+
# Veya ortam değişkeni:
|
|
144
|
+
export FINTABLES_LANG=tr # ya da en
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## Yasal Uyarı (Disclaimer)
|
|
148
|
+
|
|
149
|
+
> **Önemli:** Bu proje tamamen **eğitim ve kişisel kullanım amacıyla** geliştirilmiş açık kaynaklı gayriresmi bir araçtır.
|
|
150
|
+
>
|
|
151
|
+
> - Fintables (Fintables Bilişim Teknolojileri A.Ş.) ile hiçbir resmi bağı, ortaklığı veya sponsorluğu yoktur.
|
|
152
|
+
> - Bu araç finansal tavsiye, yatırım tavsiyesi veya alım-satım önerisi sunmaz.
|
|
153
|
+
> - Verilerin doğruluğu, güncelliği veya eksiksizliği konusunda herhangi bir garanti verilmez. Veri sağlayıcısından alınan verilerin kullanımında doğabilecek her türlü sorumluluk kullanıcıya aittir.
|
|
154
|
+
> - Yazılım "olduğu gibi" (AS IS) sunulmaktadır; yazar ve geliştiriciler doğabilecek doğrudan veya dolaylı hiçbir zarardan sorumlu tutulamaz.
|
|
155
|
+
|
|
156
|
+
## Lisans
|
|
157
|
+
|
|
158
|
+
Bu proje [MIT Lisansı](LICENSE) altında lisanslanmıştır.
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "fintables"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Fintables mobile API client and CLI tool"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = {text = "MIT"}
|
|
11
|
+
requires-python = ">=3.11"
|
|
12
|
+
authors = [
|
|
13
|
+
{name = "Sinan Erdinç"}
|
|
14
|
+
]
|
|
15
|
+
keywords = ["fintables", "finance", "borsa", "bist", "cli", "api", "stock-market"]
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Development Status :: 4 - Beta",
|
|
18
|
+
"Intended Audience :: Developers",
|
|
19
|
+
"License :: OSI Approved :: MIT License",
|
|
20
|
+
"Programming Language :: Python :: 3",
|
|
21
|
+
"Programming Language :: Python :: 3.11",
|
|
22
|
+
"Programming Language :: Python :: 3.12",
|
|
23
|
+
"Topic :: Office/Business :: Financial :: Investment",
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
dependencies = [
|
|
27
|
+
"httpx>=0.27.0",
|
|
28
|
+
"curl-cffi>=0.7.0",
|
|
29
|
+
"pydantic>=2.7.0",
|
|
30
|
+
"pydantic-settings>=2.2.0",
|
|
31
|
+
"typer>=0.12.0",
|
|
32
|
+
"rich>=13.7.0",
|
|
33
|
+
"python-dotenv>=1.0.0",
|
|
34
|
+
]
|
|
35
|
+
|
|
36
|
+
[project.urls]
|
|
37
|
+
Homepage = "https://github.com/sinanerdinc/fintables"
|
|
38
|
+
Repository = "https://github.com/sinanerdinc/fintables"
|
|
39
|
+
Issues = "https://github.com/sinanerdinc/fintables/issues"
|
|
40
|
+
|
|
41
|
+
[project.optional-dependencies]
|
|
42
|
+
dev = [
|
|
43
|
+
"pytest>=8.0.0",
|
|
44
|
+
"pytest-asyncio>=0.23.0",
|
|
45
|
+
"pytest-cov>=4.1.0",
|
|
46
|
+
]
|
|
47
|
+
|
|
48
|
+
[project.scripts]
|
|
49
|
+
fintables = "fintables.cli.main:app"
|
|
50
|
+
|
|
51
|
+
[tool.setuptools.packages.find]
|
|
52
|
+
where = ["src"]
|
|
53
|
+
|
|
54
|
+
[tool.pytest.ini_options]
|
|
55
|
+
asyncio_mode = "auto"
|
|
56
|
+
testpaths = ["tests"]
|
|
57
|
+
pythonpath = ["."]
|
|
58
|
+
|
|
59
|
+
[tool.pyright]
|
|
60
|
+
include = ["src", "tests"]
|
|
61
|
+
extraPaths = ["."]
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
from typing import Any
|
|
2
|
+
from fintables.exceptions import AuthError
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
async def login(
|
|
6
|
+
client: Any,
|
|
7
|
+
email: str,
|
|
8
|
+
password: str,
|
|
9
|
+
base_url: str = "https://api.fintables.com",
|
|
10
|
+
headers: dict[str, str] | None = None,
|
|
11
|
+
) -> tuple[str, str]:
|
|
12
|
+
"""Logs in using email/password and returns (access_token, refresh_token)."""
|
|
13
|
+
req_headers = {
|
|
14
|
+
"User-Agent": "fintables-mobile/323 (2.28.2)",
|
|
15
|
+
"Content-Type": "application/json",
|
|
16
|
+
"Accept": "application/json",
|
|
17
|
+
}
|
|
18
|
+
if headers:
|
|
19
|
+
req_headers.update(headers)
|
|
20
|
+
|
|
21
|
+
payload = {"email": email, "password": password}
|
|
22
|
+
try:
|
|
23
|
+
resp = await client.post(
|
|
24
|
+
f"{base_url}/auth/token/",
|
|
25
|
+
json=payload,
|
|
26
|
+
headers=req_headers,
|
|
27
|
+
)
|
|
28
|
+
if resp.status_code == 200:
|
|
29
|
+
data = resp.json()
|
|
30
|
+
access = data.get("access") or data.get("access_token")
|
|
31
|
+
refresh = data.get("refresh") or data.get("refresh_token", "")
|
|
32
|
+
if access:
|
|
33
|
+
return access, refresh
|
|
34
|
+
elif resp.status_code == 400 and "username" in getattr(resp, "text", ""):
|
|
35
|
+
resp2 = await client.post(
|
|
36
|
+
f"{base_url}/auth/token/",
|
|
37
|
+
json={"username": email, "password": password},
|
|
38
|
+
headers=req_headers,
|
|
39
|
+
)
|
|
40
|
+
if resp2.status_code == 200:
|
|
41
|
+
data = resp2.json()
|
|
42
|
+
access = data.get("access") or data.get("access_token")
|
|
43
|
+
refresh = data.get("refresh") or data.get("refresh_token", "")
|
|
44
|
+
if access:
|
|
45
|
+
return access, refresh
|
|
46
|
+
except Exception as e:
|
|
47
|
+
if isinstance(e, AuthError):
|
|
48
|
+
raise
|
|
49
|
+
raise AuthError(f"Giriş isteği sırasında hata oluştu: {type(e).__name__}") from e
|
|
50
|
+
|
|
51
|
+
error_msg = resp.text if "resp" in locals() and hasattr(resp, "text") else "Bilinmeyen hata"
|
|
52
|
+
raise AuthError(
|
|
53
|
+
f"Giriş yapılamadı: {error_msg}. "
|
|
54
|
+
"Lütfen FINTABLES_USERNAME/FINTABLES_EMAIL ve FINTABLES_PASSWORD ayarlarınızı kontrol edin."
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
async def refresh_token(
|
|
59
|
+
client: Any,
|
|
60
|
+
refresh: str,
|
|
61
|
+
base_url: str = "https://api.fintables.com",
|
|
62
|
+
headers: dict[str, str] | None = None,
|
|
63
|
+
) -> str:
|
|
64
|
+
"""Refreshes access_token using refresh_token."""
|
|
65
|
+
req_headers = {
|
|
66
|
+
"User-Agent": "fintables-mobile/323 (2.28.2)",
|
|
67
|
+
"Content-Type": "application/json",
|
|
68
|
+
"Accept": "application/json",
|
|
69
|
+
}
|
|
70
|
+
if headers:
|
|
71
|
+
req_headers.update(headers)
|
|
72
|
+
|
|
73
|
+
try:
|
|
74
|
+
resp = await client.post(
|
|
75
|
+
f"{base_url}/auth/token/refresh/",
|
|
76
|
+
json={"refresh": refresh},
|
|
77
|
+
headers=req_headers,
|
|
78
|
+
)
|
|
79
|
+
if resp.status_code == 200:
|
|
80
|
+
data = resp.json()
|
|
81
|
+
access = data.get("access") or data.get("access_token")
|
|
82
|
+
if access:
|
|
83
|
+
return access
|
|
84
|
+
except Exception as e:
|
|
85
|
+
raise AuthError(f"Token yenileme sırasında hata oluştu: {type(e).__name__}") from e
|
|
86
|
+
|
|
87
|
+
raise AuthError("Token yenilenemedi. Lütfen tekrar giriş yapın.")
|