
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
[ English | 中文 ]
libfinance
is python library for accessing financial data easily. The goal of libfinance
is to provide HIGH quality financial data for scholars, researchers and developers in research and production environment.
Method1: Install libfinance
by pip
$ pip install libfinance
Method2: Install from source with a develop mode
git clone https://github.com/StateOfTheArt-quant/libfinance.git
cd libfinance
python -m pip install --editable .
from libfinance import get_trading_dates, get_price
trading_dates = get_trading_dates(start_date="2023-12-25", end_date="2024-01-11")
print(trading_dates)
DatetimeIndex(['2023-12-25', '2023-12-26', '2023-12-27', '2023-12-28',
'2023-12-29', '2024-01-02', '2024-01-03', '2024-01-04',
'2024-01-05', '2024-01-08', '2024-01-09', '2024-01-10',
'2024-01-11'],
dtype='datetime64[ns]', freq=None)
data = get_price(order_book_ids=["000001.XSHE","600000.XSHG"], start_date="2024-03-01", end_date="2024-03-11")
print(data)
open high low close volume
order_book_id datetime
000001.XSHE 2024-03-01 10.59 10.60 10.43 10.49 182810290.0
2024-03-04 10.45 10.50 10.32 10.33 165592954.0
2024-03-05 10.30 10.47 10.26 10.43 181731907.0
2024-03-06 10.40 10.45 10.33 10.33 134564016.0
2024-03-07 10.33 10.64 10.33 10.38 201616589.0
2024-03-08 10.35 10.44 10.30 10.38 111397428.0
2024-03-11 10.38 10.47 10.34 10.47 121067298.0
600000.XSHG 2024-03-01 7.13 7.16 7.10 7.11 29431801.0
2024-03-04 7.12 7.12 7.05 7.07 27855963.0
2024-03-05 7.05 7.18 7.04 7.16 41756232.0
2024-03-06 7.17 7.22 7.12 7.12 25918749.0
2024-03-07 7.12 7.20 7.11 7.14 24690348.0
2024-03-08 7.12 7.17 7.11 7.12 19861794.0
2024-03-11 7.13 7.17 7.06 7.11 26195498.0
More info for Documentation
Join us WeChat Official Accounts to get the libfinance updated info:
FAQs
libfinance is a modern finance API
We found that libfinance demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.