🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

tefas-crawler

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tefas-crawler

Crawl the public data from Tefas.

0.5.0
PyPI
Maintainers
1

Tefas Crawler

PyPI version License: MIT Python Versions Package Status CI Build

Crawl public invenstment fund information from Turkey Electronic Fund Trading Platform (TEFAS) with ease.

Installation

pip install tefas-crawler

Usage

Import the Crawler object and create an instance of it.

from tefas import Crawler

tefas = Crawler()

API

fetch(start, end, name, columns, kind)

ArgumentTypeDescriptionRequired
startstring or datetime.datetimeThe date that fund information is crawled for.Yes
endstring or datetime.datetimeEnd of the period that fund information is crawled for.No
namestringName of the fund. If not given, all funds will be returned.No
columns[]list of stringList of columns to be returned.No
kindstringType of the fund. One of YAT, EMK, or BYF. Defaults to YAT.No

Examples

Get all funds for a given day.

data = tefas.fetch(start="2020-11-20")

Get a specific fund for a time period, and select columns.

data = tefas.fetch(start="2020-11-15", end="2020-11-20", name="YAC", columns=["code", "date", "price"])

Data Schema

As of today, we support the following data schema from Tefas:

ColumnDescriptionType
dateSatedate
pricePrice of the fund for a given datestring
codeShort code of the fundstring
titleFull name of the fundstring
market_capTotal value of the fundfloat
number_of_sharesNumber of outstanding sharesfloat
number_of_investorsNumber of participantsfloat
bank_billsShare of bank billsfloat
exchange_traded_fundShare of exchange traded fundfloat
otherShare of otherfloat
fx_payable_billsShare of fx payable billsfloat
government_bondShare of government bondfloat
foreign_currency_billsShare of foreign currency billsfloat
eurobondsShare of eurobondsfloat
commercial_paperShare of commercial paperfloat
fund_participation_certificateShare of fund participation certificatefloat
real_estate_certificateShare of real estate certificatefloat
venture_capital_investment_fund_participationShare of venture capital investment fundfloat
real_estate_investment_fund_participationShare of real estate investment fundfloat
treasury_billShare of treasury billfloat
stockShare of stockfloat
government_bonds_and_bills_fxShare of government bonds and bills (fx)float
participation_accountShare of participation accountfloat
participation_account_auShare of gold participation accountfloat
participation_account_dShare of foreign currency participation accountfloat
participation_account_tlShare of Turkish Lira participation accountfloat
government_lease_certificatesShare of government lease certificatesfloat
government_lease_certificates_dShare of foreign currency government lease certificatesfloat
government_lease_certificates_tlShare of Turkish Lira government lease certificatesfloat
government_lease_certificates_foreignShare of government foreign lease certificatesfloat
precious_metalsShare of precious metalsfloat
precious_metals_byfShare of precious metals stock market investment fundfloat
precious_metals_kbaShare of precious metals government dept instrumentfloat
precious_metals_kksShare of precious metals public lease certificatesfloat
public_domestic_debt_instrumentsShare of foreign exchange public domestic debt instrumentsfloat
private_sector_lease_certificatesShare of private sector lease certificatesfloat
private_sector_bondShare of private sector bondfloat
repoShare of repofloat
derivativesShare of derivativesfloat
tmmShare of tmmfloat
reverse_repoShare of reverse-repofloat
asset_backed_securitiesShare of asset-backed securitiesfloat
term_depositShare of term depositfloat
term_deposit_auShare of gold term depositfloat
term_deposit_dShare of foreign currency term depositfloat
term_deposit_tlShare of Turkish Lira term depositfloat
futures_cash_collateralShare of futures cash collateralfloat
foreign_debt_instrumentsShare of foreign debt instrumentsfloat
foreign_domestic_debt_instrumentsShare of foreign domestic debt instrumentsfloat
foreign_private_sector_debt_instrumentsShare of foreign private sector debt instrumentsfloat
foreign_exchange_traded_fundsShare of foreign exchange traded fundsfloat
foreign_equityShare of foreign equityfloat
foreign_securitiesShare of foreign securitiesfloat
foreign_investment_fund_participation_sharesShare of foreign investment fund participationfloat
private_sector_international_lease_certificateShare of private sector international lease certificatefloat
private_sector_foreign_debt_instrumentsShare of private sector foreign dept instrumentsfloat

To-do

  • Increase test coverage
  • Request error handling
  • Cache query results

License

MIT

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts