Crawl the public data from Tefas.
Project description
Tefas Crawler
Crawl public fund information from Tefas with ease.
Installation
pip install tefas-crawler
Usage
Import the Crawler
object and create an instance of it.
from tefas import Crawler
crawler = Crawler()
API
fetch(date="YYYY-MM-DD")
Get all funds for a given day.
data = crawler.fetch(date="2020-11-20")
This should return all fund information for the given day as a list of dictionaries like this:
[
{
'Tarih': '20.11.2020',
'FonKodu': 'AAK',
'Fon Adı': 'ATA PORTFÖY ÇOKLU VARLIK DEĞİŞKEN FON',
'Fiyat': '41,302235',
'TedavüldekiPaySayısı': '1.898.223,00',
'KişiSayısı': '422',
'Fon Toplam Değer': '78.400.851,68'},
'Banka Bonosu (%)': '0,00',
...
},
...
]
Data Schema
As of today, we support the following data schema from Tefas:
Column | Description | Type |
---|---|---|
Tarih | Date | string |
FonKodu | Short code of the fund | string |
Fon Adı | Full name of the fund | string |
Fiyat | Price of the fund | string |
TedavüldekiPaySayısı | Number of shares | string |
KişiSayısı | Number of participants | string |
Fon Toplam Değer | Total value | string |
To-do
API
Below API is planned but not implemented yet.
fetch(date="2020-11-20", fund="AAK")
A single fund's inormation for a given day.fetch(start_date="2020-11-19", end_date="2020-11-20")
All fund information for a given date range.fetch(start_date="2020-11-19", end_date="2020-11-20", fund="AAK")
A single fund's information for a given date range.
Data Schema
- Map each field to an appropriate data type instead of string.
- Add the "distribution" pane.
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
tefas-crawler-0.2.2.tar.gz
(5.1 kB
view hashes)
Built Distribution
Close
Hashes for tefas_crawler-0.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ad04fec9d32c507049092214913b83c2ef799336ffb4145b6601543204d0197 |
|
MD5 | 96f3dcde800280b63a4e5063668010b9 |
|
BLAKE2b-256 | 937d6bb1f8634a1b546b8417cbe22f59a8222a75cb9470ae45d3cab82593cd7a |