Fetches data from the IS Investment website.
Project description
isyatirimhisse v5.0.1
Türkçe tercih edenler için:
Those who prefer English can scroll down the page.
Açıklama
isyatirimhisse, İş Yatırım'ın web sitesinden hisse senedi, endeks ve finansal tablo verilerini kolayca çekmek için geliştirilmiş bir Python kütüphanesidir.
*** UYARI ***
isyatirimhisse, resmi İş Yatırım Menkul Değerler A.Ş. kütüphanesi değildir ve şirket tarafından doğrulanmamıştır. Kullanıcılar, kütüphaneyi kullanmadan önce ilgili tüm verilere erişim için İş Yatırım Menkul Değerler A.Ş.'nin kullanım koşullarını ve haklarını incelemelidir. isyatirimhisse, yalnızca kişisel kullanım amaçları için tasarlanmıştır.
İş Yatırım web sitesinden hisse senedi verileri ve finansal tablolara erişmek için Python paketini kullanırken, aşırı talep göndermenin potansiyel sonuçlarına dikkat etmek çok önemlidir. Aşırı talep aşağıdaki çeşitli olumsuz etkilere neden olabilir:
-
Performans Etkisi: Kısa bir süre içinde çok fazla talep göndermek, İş Yatırım web sitesinin performansını ve yanıt verme hızını ciddi şekilde etkileyebilir.
-
Hizmet Kesintisi: Yoğun veri çekme işlemleri, web sitesindeki güvenlik önlemlerini tetikleyebilir ve geçici hizmet kesintilerine neden olabilir.
-
IP Engelleme: Tekrarlayan veya agresif veri çekme davranışları, IP adresinizin web sitesine erişimini geçici veya kalıcı olarak engellemesine yol açabilir.
Bu sorunlardan kaçınmak ve sorunsuz bir işlem sağlamak için aşağıdaki önerileri dikkate alabilirsiniz.
-
Taleplerinizin hızını, web sitesinin kapasitesini dikkate alarak makul bir seviyede tutun.
-
Sıkça çekilen verileri yerel olarak saklamaya çalışın. Böylece tekrarlayan taleplere gerek kalmayacaktır.
Bu kurallara uymak, kesinti riskini en aza indirgeyebilir ve İş Yatırım web sitesinin hem sizin hem de diğer kullanıcılar için güvenilir bir deneyim sunmasını sağlar.
Kurulum
Kütüphaneyi kullanmak için aşağıdaki adımları izleyin:
- Python'ı sisteminize yükleyin: https://www.python.org/downloads/
- Terminali açın ve paketi yüklemek için aşağıdaki komutu çalıştırın:
pip install isyatirimhisse
Spesifik bir versiyona ait kurulum yapacaksanız aşağıdaki örnekte olduğu gibi komutu çalıştırabilirsiniz.
pip install isyatirimhisse==5.0.1
Yüklü paketin versiyonuna aşağıdaki komut yardımıyla ulaşabilirsiniz.
pip show isyatirimhisse
Kullanım
Kütüphanenin İçeri Aktarılması
from isyatirimhisse import fetch_stock_data, fetch_index_data, fetch_financials
Fonksiyonlar ve Parametreleri
Hisse Senedi Verisi Çekme (fetch_stock_data)
df = fetch_stock_data(
symbols="THYAO",
start_date="01-01-2023",
end_date="18-07-2025",
save_to_excel=True
)
symbols: (str | list) - Bir veya birden fazla hisse kodu.start_date: (str) - Veri başlangıç tarihi, 'GG-AA-YYYY' formatında.end_date: (str, opsiyonel) - Veri bitiş tarihi, 'GG-AA-YYYY' formatında.save_to_excel: (bool, opsiyonel) - Sonuçları Excel dosyasına kaydet (varsayılan: False).
Endeks Verisi Çekme (fetch_index_data)
df = fetch_index_data(
indices="XU100",
start_date="01-01-2023",
end_date="18-07-2025",
save_to_excel=True
)
indices: (str | list) - Bir veya birden fazla endeks kodu.start_date: (str) - Veri başlangıç tarihi, 'GG-AA-YYYY' formatında.end_date: (str, opsiyonel) - Veri bitiş tarihi, 'GG-AA-YYYY' formatında.save_to_excel: (bool, opsiyonel) - Sonuçları Excel dosyasına kaydet (varsayılan: False).
Finansal Tablo Verisi Çekme (fetch_financials)
df = fetch_financials(
symbols="THYAO",
start_year=2023,
end_year=2025,
exchange="TRY",
financial_group='1',
save_to_excel=True
)
symbols: (str | list) - Bir veya birden fazla hisse kodu.start_year: (int | str) - Başlangıç yılı.end_year: (int | str, opsiyonel) - Bitiş yılı.exchange: (str, opsiyonel) - Döviz türü ('TRY' veya 'USD'), varsayılan 'TRY'.financial_group: (str) - Finansal tablo grubu.- '1': XI_29
- '2': UFRS
- '3': UFRS_K
save_to_excel: (bool, opsiyonel) - Sonuçları Excel dosyasına kaydet (varsayılan: False).
İpuçları:
- Birden fazla hisse veya endeks ile çalışırken, string yerine mutlaka köşeli parantezli (
[]) liste kullanınız. - Liste girilmediği durumda, tek bir sembol için doğrudan string yazabilirsiniz.
Notlar
- Kütüphane, İş Yatırım'ın web sitesindeki verilere bağımlıdır. Bu nedenle, verilerin doğruluğu ve sürekliliği için lütfen ilgili web sitesini kontrol edin: İş Yatırım
- Kütüphanenin geliştirilmesi ve iyileştirilmesi için geri bildirimlerinizi bekliyorum. GitHub reposuna katkıda bulunun: GitHub Repo
- Herhangi bir sorun veya öneride lütfen GitHub reposundaki "Issue" bölümünden yeni bir konu açarak bildirim sağlayın: GitHub Issues
Sürüm Notları
v0.1.0 - 25/07/2023
- İlk sürüm yayınlandı.
v0.1.1 - 27/07/2023
veri_cekfonksiyonundaki parametreleri kontrol eden koşul ifadeleri güncellendi.jsonkütüphanesi kaldırıldı.veri_cekfonksiyonuna200HTTP kodu koşul ile beraber eklendi ve takibe alındı.
v0.2.0 - 30/07/2023
veri_gorselfonksiyonu eklendi. Fonksiyon, 3 farklı veri türünde görselleştirme yapma imkanı sunuyor.veri_cekfonksiyonuna pandas DataFrame'i excel olarak kaydedecek parametreler eklendi.
v0.2.1 - 31/07/2023
- 0.2.0 sürümündeki kurulum hatası giderildi.
- Dokümantasyondaki Türkçe karakter problemi giderildi.
- Dokümantasyonda görünmeyen görseller görünür hale getirildi.
v1.0.0 - 05/08/2023
- Fonksiyonlar İngilizce diline çevrildi.
veri_cek:fetch_dataveri_gorsel:visualize_data
- Finansal (Mali) tabloları alabilmeyi sağlayan
fetch_financialsfonksiyonu eklendi. - Fonksiyonlara çıktıları iki dilde (İngilizce ve Türkçe) alabilme özelliği eklendi.
fetch_datafonksiyonu, hisse senetlerinin TL bazlı fiyatlarının yanı sıra USD bazlı fiyatlarını da alabilme imkanı sunacak şekilde güncellendi.visualize_datafonksiyonuna ekstra özellik ekleyebilmeyi sağlayan **kwargs parametreleri genişletildi.- Dokümantasyon içeriği Türkçe ve İngilizce olacak şekilde güncellendi.
v2.0.0 - 10/08/2023
fetch_datafonksiyonundakicurrencyparametresiexchangeolarak değiştirildi.fetch_financialsfonksiyonundakiseleniumpaketi bağımlılığı kaldırıldı.fetch_financialsfonksiyonu ile finansal tablolar tek bir tablo olarak alınacak şekilde güncellendi.fetch_financialsfonksiyonundakistart_periodveend_periodparametreleri sırasıylastart_yearveend_yearolarak güncellendi.fetch_financialsfonksiyonunaexchangevefinancial_groupparametreleri eklendi.fetch_datavefetch_financialsfonksiyonlarındaki kontroller artırıldı.
v2.1.0 - 12/08/2023
fetch_datafonksiyonuna endekslere ait verileri çekmeyi sağlayacakstock_market_indexparametresi eklenmiştir.fetch_financialsfonksiyonları ile çekilen finansalların kalemlerinde bulunan boşluklar kaldırılmıştır.
v2.1.1 - 13/08/2023
fetch_datafonksiyonu ile gönderilen istekler kontrol edilecek.
v2.1.2 - 13/08/2023
- 2.1.1 sürümündeki kod hatası düzeltilmiştir.
v2.1.3 - 13/08/2023
- Gönderilen isteklerdeki zaman kısıtlaması iyileştirildi.
v3.0.0 - 19/08/2023
fetch_datafonksiyonu asenkron yapıya geçirilmiştir.fetch_datafonksiyonundaki sembol parametresi 400 sembol ile sınırlandırılmıştır.visualize_datafonksiyonunun çalıştırılma şekli asenkron yapı nedeniyle değişmiştir.
v3.0.1 - 20/08/2023
- Veri çerçevesindeki tarih aralığı problemi düzeltildi.
v3.0.2 - 05/10/2023
- 400 olan sembol sınırlaması kaldırıldı.
v4.0.0 - 07/10/2023
StockDataveFinancialsisimli iki sınıf oluşturuldu.StockDatasınıfındakiget_dataveFinancialssınıfındakiget_datametotlarının parametreleri güncellendi.- Tablo çıktılarının yapısı değiştirildi.
- Veri görselleştirme özelliği kaldırıldı.
- Asenkron yapı kaldırıldı.
v5.0.0 - 19/07/2025
- Sınıf yapısı kaldırıldı, fonksiyon tabanlı API yapısına geçildi.
fetch_stock_data,fetch_index_data,fetch_financialsfonksiyonları eklendi.- Kod ve dökümantasyon sadeleştirildi.
v5.0.1 - 21/02/2026
truststoreile SSL sertifika doğrulama hatası giderildi.
Lisans
Bu proje MIT Lisansı altında lisanslanmıştır.
For those who prefer English:
Description
isyatirimhisse is a Python library developed to easily fetch stock, index, and financial statement data from the Is Investment website.
*** WARNING ***
isyatirimhisse is not the official library of Is Investment Securities Inc. and has not been verified by the company. Before using the library, users should review Is Investment Securities Inc.'s terms of use and rights regarding data access. isyatirimhisse is designed for personal use only.
When using the Python package to access stock and financial statement data from the Is Investment website, it is very important to be aware of the potential consequences of sending excessive requests. Excessive requests can cause various negative effects, such as:
-
Performance Impact: Sending too many requests in a short period can seriously affect the performance and response speed of the Is Investment website.
-
Service Disruption: Intensive data fetching operations can trigger the website’s security measures and cause temporary service interruptions.
-
IP Blocking: Repetitive or aggressive data fetching behaviors can cause your IP address to be temporarily or permanently blocked from accessing the website.
To avoid these issues and ensure smooth operation, please consider the following recommendations:
-
Keep the speed of your requests at a reasonable level, considering the website's capacity.
-
Try to store frequently fetched data locally, so you won’t need to make repetitive requests.
Following these rules will minimize the risk of interruption and help ensure that the Is Investment website provides a reliable experience for both you and other users.
Installation
To use the library, follow these steps:
-
Install Python on your system: https://www.python.org/downloads/
-
Open the terminal and run the following command to install the package:
pip install isyatirimhisse
If you want to install a specific version, run the command as shown below:
pip install isyatirimhisse==5.0.1
You can check the installed package version using the following command:
pip show isyatirimhisse
Usage
Importing the Library
from isyatirimhisse import fetch_stock_data, fetch_index_data, fetch_financials
Functions and Parameters
Fetching Stock Data (fetch_stock_data)
df = fetch_stock_data(
symbols="THYAO",
start_date="01-01-2023",
end_date="18-07-2025",
save_to_excel=True
)
symbols: (str | list) - One or more stock tickers.start_date: (str) - Start date for the data, in 'DD-MM-YYYY' format.end_date: (str, optional) - End date for the data, in 'DD-MM-YYYY' format.save_to_excel: (bool, optional) - Save results to an Excel file (default: False).
Fetching Index Data (fetch_index_data)
df = fetch_index_data(
indices="XU100",
start_date="01-01-2023",
end_date="18-07-2025",
save_to_excel=True
)
indices: (str | list) - One or more index codes.start_date: (str) - Start date for the data, in 'DD-MM-YYYY' format.end_date: (str, optional) - End date for the data, in 'DD-MM-YYYY' format.save_to_excel: (bool, optional) - Save results to an Excel file (default: False).
Fetching Financial Statement Data (fetch_financials)
df = fetch_financials(
symbols="THYAO",
start_year=2023,
end_year=2025,
exchange="TRY",
financial_group='1',
save_to_excel=True
)
symbols: (str | list) - One or more stock tickers.start_year: (int | str) - Start year.end_year: (int | str, optional) - End year.exchange: (str, optional) - Currency ('TRY' or 'USD'), default is 'TRY'.financial_group: (str) - Financial statement group.- '1': XI_29
- '2': IFRS
- '3': IFRS_K
save_to_excel: (bool, optional) - Save results to an Excel file (default: False).
Tips
- When working with multiple stocks or indices, always use a list with square brackets (
[]) instead of a string. - For a single symbol, you can provide it directly as a string.
Notes
- The library depends on the data available on the Is Investment website. Therefore, please check the relevant website for the accuracy and continuity of the data: IS Investment
- I welcome your feedback and contributions for the development and improvement of the library. Please contribute to the GitHub repo: GitHub Repo
- For any problems or suggestions, please open a new issue in the "Issues" section of the GitHub repo: GitHub Issues
Release Notes
v0.1.0 - 25/07/2023
- First release.
v0.1.1 - 27/07/2023
- Updated conditional statements checking parameters in the
veri_cekfunction. - Removed the
jsonlibrary. - Added HTTP code
200condition to theveri_cekfunction and started tracking it.
v0.2.0 - 30/07/2023
- Added the
veri_gorselfunction, providing visualization in 3 different data types. - Added parameters to the
veri_cekfunction to save pandas DataFrame as Excel.
v0.2.1 - 31/07/2023
- Fixed the installation error present in version 0.2.0.
- Fixed Turkish character problems in the documentation.
- Made previously invisible images in the documentation visible.
v1.0.0 - 05/08/2023
- Functions translated into English:
veri_cek->fetch_dataveri_gorsel->visualize_data
- Added the
fetch_financialsfunction for fetching financial statements. - Added the option to receive outputs in both English and Turkish.
- Updated the
fetch_datafunction to fetch USD-based as well as TRY-based prices. - Extended **kwargs in the
visualize_datafunction to allow extra features. - Updated documentation to be available in both Turkish and English.
v2.0.0 - 10/08/2023
- Changed the
currencyparameter in thefetch_datafunction toexchange. - Removed the
seleniumdependency from thefetch_financialsfunction. - Updated the
fetch_financialsfunction to fetch financial statements as a single table. - Renamed
start_periodandend_periodparameters tostart_yearandend_yearin thefetch_financials function. - Added
exchangeandfinancial_groupparameters to thefetch_financialsfunction. - Added more checks and validation to both
fetch_dataandfetch_financials.
v2.1.0 - 12/08/2023
- Added
stock_market_indexparameter to thefetch_datafunction for index data. - Removed spaces in the items of financial statements fetched with
fetch_financials.
v2.1.1 - 13/08/2023
- Requests sent with the
fetch_datafunction will be checked.
v2.1.2 - 13/08/2023
- Fixed a code bug present in version 2.1.1.
v2.1.3 - 13/08/2023
- Improved time restriction for requests sent.
v3.0.0 - 19/08/2023
fetch_datafunction made asynchronous.- Symbol parameter in
fetch_datalimited to 400 symbols. - The way
visualize_datais executed changed due to asynchronous structure.
v3.0.1 - 20/08/2023
- Fixed date range problem in data frames.
v3.0.2 - 05/10/2023
- Removed the 400-symbol limit.
v4.0.0 - 07/10/2023
- Created two classes:
StockDataandFinancials. - Updated parameters for the
get_datamethods of both classes. - Modified the structure of table outputs.
- Removed data visualization feature.
- Removed asynchronous structure.
v5.0.0 - 19/07/2025
- Removed class structure; switched to a function-based API.
- Added
fetch_stock_data,fetch_index_data, andfetch_financialsfunctions. - Simplified code and documentation.
v5.0.1 - 21/02/2026
- Fixed SSL certificate verification with
truststore.
License
This project is licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file isyatirimhisse-5.0.1.tar.gz.
File metadata
- Download URL: isyatirimhisse-5.0.1.tar.gz
- Upload date:
- Size: 16.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2928d46658dfabf09dab3733c8b28883b4752a82af78359950d2304e01d8d114
|
|
| MD5 |
c3f06da60ea4e77763ee4277fb395b78
|
|
| BLAKE2b-256 |
e02f5fa36852b68cf0a02d809ed4f84146315714d201af6da921f54b48d324f0
|
File details
Details for the file isyatirimhisse-5.0.1-py3-none-any.whl.
File metadata
- Download URL: isyatirimhisse-5.0.1-py3-none-any.whl
- Upload date:
- Size: 13.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff968284c6f81c5413583e05af2cc15329b0e69979d5de7f4c3178a57ffd6e4c
|
|
| MD5 |
2a7ee1021a8555d308e149059dfea509
|
|
| BLAKE2b-256 |
9898c5be89d929633945b7c20802e9b5bbc66b5131c65b2b3b2895e4e64e4b57
|