Skip to main content

Tehran Stock Exchange OSINT Tool for Python

Project description

Python version PyPi version PyPi downloads

This is just an Alpha release, So If you find it interesting or you encounter any bugs, I would appreciate if you let me know!

Overview

Currently there is no active well-documented API for TSE capital market out there. And this is a big obstacle to development of projects and studies based on this data. tfinance aimes to solve this problem by developing an OSINT tool to provide a reliable, threaded, and Pythonic way to access TSE’s historical data.

>> import tfinance as tfin
>> market = tfin.Market() # Initializes your local database - The first run on your system may take a few minutes(~It will download ~90MB of data.)

>> market.tickers.head()
                  id                    name  ...   sub_market   ticker_code
0  37661500521100963  توليد نيروي برق آبادان  ...  فهرست اوليه  IRO1NBAB0001
1  55254206302462116       آسان پرداخت پرشين  ...  فهرست اوليه  IRO1APPE0001
2  51106317433079213               بيمه آسيا  ...   تابلو اصلي  IRO1ASIA0001
3  14079693677610396  انتقال داده هاي آسياتك  ...  فهرست اوليه  IRO1ASTC0001
4  44834847569322522        كنتورسازيايران  ...   تابلو فرعي  IRO1CONT0001

>>foolad = tfin.Ticker(ticker="فولاد")
>> foolad.name
'فولاد مباركه اصفهان'
>> foolad.sector
'فلزات اساسي'

>> foolad.history.head()
            <TICKER> <DTYYYYMMDD>  <FIRST>  ...  <PER>   <OPEN>   <LAST>
0  S*Mobarakeh.Steel   2020-10-06  17700.0  ...      D  17860.0  18240.0
1  S*Mobarakeh.Steel   2020-10-05  17610.0  ...      D  18210.0  17700.0
2  S*Mobarakeh.Steel   2020-10-04  18760.0  ...      D  18710.0  18090.0
3  S*Mobarakeh.Steel   2020-10-03  18290.0  ...      D  17920.0  18810.0
4  S*Mobarakeh.Steel   2020-09-30  18170.0  ...      D  17500.0  18290.0
[5 rows x 12 columns]

Installation

The easiest way to install tfinance is from the Python Package Index using pip or easy_install:

$ pip install tfinance

License

https://img.shields.io/pypi/l/tfinance?color=green

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

tfinance-0.1.3.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

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

tfinance-0.1.3-py3-none-any.whl (20.1 kB view details)

Uploaded Python 3

File details

Details for the file tfinance-0.1.3.tar.gz.

File metadata

  • Download URL: tfinance-0.1.3.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.6.9

File hashes

Hashes for tfinance-0.1.3.tar.gz
Algorithm Hash digest
SHA256 a3f942da374f098618d4dbd3ea63904b1ed7dd66c4b0b808f08bd4720dcce8ca
MD5 04dcaad1ed054ddf45093ca6a0c24bf5
BLAKE2b-256 fe6d6c4b2138a530ca10fcd2f4cb81cdfd8248ee02f5b81547817b9435a8cccb

See more details on using hashes here.

File details

Details for the file tfinance-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: tfinance-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 20.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.6.9

File hashes

Hashes for tfinance-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 bdd811028c2c4dba700dee6e81c2a4777cb28b0a8837e2eb0f17d5210c858d65
MD5 0bd00b7cff86af249c788007d50372c7
BLAKE2b-256 c0c8e83950ff5f9cef28753f7c25ffad5033209d86d8cb08250afe08bb935033

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