a library to retrieve data from tsetmc.com website
Project description
A Python library to fetch data from http://tsetmc.com.
Installation
Requires Python 3.9+.
pip install --user tsetmc
Overview
There are four main functions that return pandas DataFrame s:
get_market_watch_init
get_closing_price_all
get_client_type_all
get_key_stats
Together, they return all the information available for creating filters on tsetmc.com.
There is also an Instrument class which provides methods for getting the information on page of the given instrument (get_page_info), its instantaneous information (get_info), and its trading history (get_trade_history).
>>> from tsetmc import Instrument
>>> inst = Instrument('فملی')
>>> inst.get_trade_history(top=2)
pmax pmin pc ... tval tvol tno
date ...
20210120 10400.0 10120.0 10380.0 ... 4.984848e+11 48013394 7284
20210119 10380.0 9400.0 9910.0 ... 2.649416e+12 267389256 36765
[2 rows x 9 columns]
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
tsetmc-0.24.0.tar.gz
(78.7 kB
view hashes)
Built Distribution
tsetmc-0.24.0-py3-none-any.whl
(70.5 kB
view hashes)