Skip to main content

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:

  1. Python'ı sisteminize yükleyin: https://www.python.org/downloads/
  2. 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_cek fonksiyonundaki parametreleri kontrol eden koşul ifadeleri güncellendi.
  • json kütüphanesi kaldırıldı.
  • veri_cek fonksiyonuna 200 HTTP kodu koşul ile beraber eklendi ve takibe alındı.

v0.2.0 - 30/07/2023

  • veri_gorsel fonksiyonu eklendi. Fonksiyon, 3 farklı veri türünde görselleştirme yapma imkanı sunuyor.
  • veri_cek fonksiyonuna 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_data
    • veri_gorsel: visualize_data
  • Finansal (Mali) tabloları alabilmeyi sağlayan fetch_financials fonksiyonu eklendi.
  • Fonksiyonlara çıktıları iki dilde (İngilizce ve Türkçe) alabilme özelliği eklendi.
  • fetch_data fonksiyonu, hisse senetlerinin TL bazlı fiyatlarının yanı sıra USD bazlı fiyatlarını da alabilme imkanı sunacak şekilde güncellendi.
  • visualize_data fonksiyonuna 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_data fonksiyonundaki currency parametresi exchange olarak değiştirildi.
  • fetch_financials fonksiyonundaki selenium paketi bağımlılığı kaldırıldı.
  • fetch_financials fonksiyonu ile finansal tablolar tek bir tablo olarak alınacak şekilde güncellendi.
  • fetch_financials fonksiyonundaki start_period ve end_period parametreleri sırasıyla start_year ve end_year olarak güncellendi.
  • fetch_financials fonksiyonuna exchange ve financial_group parametreleri eklendi.
  • fetch_data ve fetch_financials fonksiyonlarındaki kontroller artırıldı.

v2.1.0 - 12/08/2023

  • fetch_data fonksiyonuna endekslere ait verileri çekmeyi sağlayacak stock_market_index parametresi eklenmiştir.
  • fetch_financials fonksiyonları ile çekilen finansalların kalemlerinde bulunan boşluklar kaldırılmıştır.

v2.1.1 - 13/08/2023

  • fetch_data fonksiyonu 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_data fonksiyonu asenkron yapıya geçirilmiştir.
  • fetch_data fonksiyonundaki sembol parametresi 400 sembol ile sınırlandırılmıştır.
  • visualize_data fonksiyonunun ç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

  • StockData ve Financials isimli iki sınıf oluşturuldu.
  • StockData sınıfındaki get_data ve Financials sınıfındaki get_data metotları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_financials fonksiyonları eklendi.
  • Kod ve dökümantasyon sadeleştirildi.

v5.0.1 - 21/02/2026

  • truststore ile 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:

  1. Install Python on your system: https://www.python.org/downloads/

  2. 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_cek function.
  • Removed the json library.
  • Added HTTP code 200 condition to the veri_cek function and started tracking it.

v0.2.0 - 30/07/2023

  • Added the veri_gorsel function, providing visualization in 3 different data types.
  • Added parameters to the veri_cek function 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_data
    • veri_gorsel -> visualize_data
  • Added the fetch_financials function for fetching financial statements.
  • Added the option to receive outputs in both English and Turkish.
  • Updated the fetch_data function to fetch USD-based as well as TRY-based prices.
  • Extended **kwargs in the visualize_data function to allow extra features.
  • Updated documentation to be available in both Turkish and English.

v2.0.0 - 10/08/2023

  • Changed the currency parameter in the fetch_data function to exchange.
  • Removed the selenium dependency from the fetch_financials function.
  • Updated the fetch_financials function to fetch financial statements as a single table.
  • Renamed start_period and end_period parameters to start_year and end_year in the fetch_financials function.
  • Added exchange and financial_group parameters to the fetch_financials function.
  • Added more checks and validation to both fetch_data and fetch_financials.

v2.1.0 - 12/08/2023

  • Added stock_market_index parameter to the fetch_data function 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_data function 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_data function made asynchronous.
  • Symbol parameter in fetch_data limited to 400 symbols.
  • The way visualize_data is 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: StockData and Financials.
  • Updated parameters for the get_data methods 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, and fetch_financials functions.
  • 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

isyatirimhisse-5.0.1.tar.gz (16.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

isyatirimhisse-5.0.1-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

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

Hashes for isyatirimhisse-5.0.1.tar.gz
Algorithm Hash digest
SHA256 2928d46658dfabf09dab3733c8b28883b4752a82af78359950d2304e01d8d114
MD5 c3f06da60ea4e77763ee4277fb395b78
BLAKE2b-256 e02f5fa36852b68cf0a02d809ed4f84146315714d201af6da921f54b48d324f0

See more details on using hashes here.

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

Hashes for isyatirimhisse-5.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ff968284c6f81c5413583e05af2cc15329b0e69979d5de7f4c3178a57ffd6e4c
MD5 2a7ee1021a8555d308e149059dfea509
BLAKE2b-256 9898c5be89d929633945b7c20802e9b5bbc66b5131c65b2b3b2895e4e64e4b57

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page