pfeed 0.0.2.dev3__tar.gz → 0.0.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pfeed-0.0.2.dev3 → pfeed-0.0.4}/PKG-INFO +82 -77
- {pfeed-0.0.2.dev3 → pfeed-0.0.4}/README.md +43 -39
- pfeed-0.0.4/docker-compose.yml +29 -0
- pfeed-0.0.4/logging.yml +56 -0
- pfeed-0.0.4/pfeed/__init__.py +70 -0
- pfeed-0.0.4/pfeed/_etl/base.py +91 -0
- pfeed-0.0.4/pfeed/_etl/market.py +128 -0
- pfeed-0.0.4/pfeed/_etl/news.py +40 -0
- pfeed-0.0.4/pfeed/_io/base_io.py +38 -0
- pfeed-0.0.4/pfeed/_io/tabular_io.py +126 -0
- pfeed-0.0.4/pfeed/bytewax_connectors/sources/exchange_source.py +6 -0
- pfeed-0.0.4/pfeed/cli/commands/clear.py +74 -0
- pfeed-0.0.4/pfeed/cli/commands/config.py +137 -0
- pfeed-0.0.4/pfeed/cli/commands/deltalake.py +72 -0
- pfeed-0.0.4/pfeed/cli/commands/doc.py +64 -0
- pfeed-0.0.4/pfeed/cli/commands/docker_compose.py +27 -0
- pfeed-0.0.4/pfeed/cli/commands/download.py +63 -0
- {pfeed-0.0.2.dev3 → pfeed-0.0.4}/pfeed/cli/main.py +9 -4
- pfeed-0.0.4/pfeed/cli/utils.py +23 -0
- pfeed-0.0.4/pfeed/config.py +215 -0
- pfeed-0.0.4/pfeed/const/aliases.py +7 -0
- {pfeed-0.0.2.dev3 → pfeed-0.0.4}/pfeed/const/paths.py +4 -3
- pfeed-0.0.4/pfeed/data_handlers/__init__.py +2 -0
- pfeed-0.0.4/pfeed/data_handlers/base_data_handler.py +32 -0
- pfeed-0.0.4/pfeed/data_handlers/market_data_handler.py +38 -0
- pfeed-0.0.4/pfeed/data_handlers/news_data_handler.py +39 -0
- pfeed-0.0.4/pfeed/data_handlers/time_based_data_handler.py +124 -0
- pfeed-0.0.4/pfeed/data_models/__init__.py +2 -0
- pfeed-0.0.4/pfeed/data_models/base_data_model.py +68 -0
- pfeed-0.0.4/pfeed/data_models/market_data_model.py +96 -0
- pfeed-0.0.4/pfeed/data_models/news_data_model.py +80 -0
- pfeed-0.0.4/pfeed/data_models/time_based_data_model.py +42 -0
- pfeed-0.0.4/pfeed/data_tools/data_tool_dask.py +72 -0
- pfeed-0.0.4/pfeed/data_tools/data_tool_pandas.py +88 -0
- pfeed-0.0.4/pfeed/data_tools/data_tool_polars.py +68 -0
- pfeed-0.0.4/pfeed/data_tools/data_tool_spark.py +61 -0
- pfeed-0.0.4/pfeed/enums/__init__.py +10 -0
- pfeed-0.0.4/pfeed/enums/data_access_type.py +11 -0
- pfeed-0.0.4/pfeed/enums/data_layer.py +8 -0
- pfeed-0.0.4/pfeed/enums/data_provider_type.py +9 -0
- pfeed-0.0.4/pfeed/enums/data_source.py +27 -0
- pfeed-0.0.4/pfeed/enums/data_storage.py +40 -0
- pfeed-0.0.4/pfeed/enums/data_tool.py +8 -0
- pfeed-0.0.4/pfeed/enums/data_type.py +28 -0
- pfeed-0.0.4/pfeed/enums/env.py +8 -0
- pfeed-0.0.4/pfeed/enums/extract_type.py +8 -0
- pfeed-0.0.4/pfeed/feeds/analyst_feed.py +8 -0
- pfeed-0.0.4/pfeed/feeds/base_feed.py +470 -0
- pfeed-0.0.2.dev3/pfeed/feeds/binance_feed.py → pfeed-0.0.4/pfeed/feeds/binance/binance.py +5 -5
- pfeed-0.0.4/pfeed/feeds/bybit/bybit.py +144 -0
- pfeed-0.0.4/pfeed/feeds/calendar_feed.py +8 -0
- pfeed-0.0.4/pfeed/feeds/company_feed.py +6 -0
- pfeed-0.0.4/pfeed/feeds/crypto_market_feed.py +11 -0
- pfeed-0.0.4/pfeed/feeds/databento/databento.py +13 -0
- pfeed-0.0.4/pfeed/feeds/economics_feed.py +8 -0
- pfeed-0.0.4/pfeed/feeds/financial_modeling_prep/__init__.py +16 -0
- pfeed-0.0.4/pfeed/feeds/financial_modeling_prep/analyst_feed.py +9 -0
- pfeed-0.0.4/pfeed/feeds/financial_modeling_prep/economics_feed.py +5 -0
- pfeed-0.0.4/pfeed/feeds/financial_modeling_prep/financial_modeling_prep.py +71 -0
- pfeed-0.0.4/pfeed/feeds/financial_modeling_prep/market_feed.py +7 -0
- pfeed-0.0.4/pfeed/feeds/financial_modeling_prep/news_feed.py +101 -0
- pfeed-0.0.4/pfeed/feeds/financial_modeling_prep/statements_feed.py +7 -0
- pfeed-0.0.4/pfeed/feeds/market_feed.py +418 -0
- pfeed-0.0.4/pfeed/feeds/news_feed.py +200 -0
- pfeed-0.0.4/pfeed/feeds/pfund/backtest_engine_feed.py +8 -0
- pfeed-0.0.4/pfeed/feeds/pfund/trade_engine_feed.py +6 -0
- pfeed-0.0.4/pfeed/feeds/pfund/train_engine_feed.py +6 -0
- pfeed-0.0.4/pfeed/feeds/statements_feed.py +8 -0
- pfeed-0.0.4/pfeed/feeds/time_based_feed.py +379 -0
- pfeed-0.0.4/pfeed/feeds/yahoo_finance/market_feed.py +314 -0
- pfeed-0.0.4/pfeed/feeds/yahoo_finance/news_feed.py +55 -0
- pfeed-0.0.4/pfeed/feeds/yahoo_finance/yahoo_finance.py +47 -0
- pfeed-0.0.4/pfeed/flows/dataflow.py +200 -0
- pfeed-0.0.4/pfeed/flows/faucet.py +51 -0
- pfeed-0.0.4/pfeed/flows/result.py +34 -0
- pfeed-0.0.4/pfeed/flows/sink.py +34 -0
- pfeed-0.0.4/pfeed/schemas/__init__.py +4 -0
- pfeed-0.0.4/pfeed/schemas/bar_data_schema.py +50 -0
- pfeed-0.0.4/pfeed/schemas/market_data_schema.py +40 -0
- pfeed-0.0.4/pfeed/schemas/news_data_schema.py +16 -0
- pfeed-0.0.4/pfeed/schemas/tick_data_schema.py +14 -0
- pfeed-0.0.4/pfeed/sources/__init__.py +13 -0
- pfeed-0.0.4/pfeed/sources/base_source.py +62 -0
- {pfeed-0.0.2.dev3 → pfeed-0.0.4}/pfeed/sources/binance/__init__.py +1 -1
- {pfeed-0.0.2.dev3 → pfeed-0.0.4}/pfeed/sources/binance/api.py +2 -2
- {pfeed-0.0.2.dev3 → pfeed-0.0.4}/pfeed/sources/binance/const.py +2 -2
- {pfeed-0.0.2.dev3 → pfeed-0.0.4}/pfeed/sources/binance/download.py +9 -10
- pfeed-0.0.4/pfeed/sources/bybit/api.py +100 -0
- pfeed-0.0.4/pfeed/sources/bybit/metadata.yml +19 -0
- pfeed-0.0.4/pfeed/sources/bybit/source.py +44 -0
- pfeed-0.0.4/pfeed/sources/databento/const.py +14 -0
- pfeed-0.0.4/pfeed/sources/databento/metadata.yml +31 -0
- pfeed-0.0.4/pfeed/sources/databento/source.py +193 -0
- pfeed-0.0.4/pfeed/sources/financial_modeling_prep/metadata.yml +43 -0
- pfeed-0.0.4/pfeed/sources/financial_modeling_prep/source.py +22 -0
- pfeed-0.0.4/pfeed/sources/firstrate_data/metadata.yml +27 -0
- pfeed-0.0.4/pfeed/sources/polygon/metadata.yml +18 -0
- pfeed-0.0.4/pfeed/sources/tradfi_source.py +47 -0
- pfeed-0.0.4/pfeed/sources/yahoo_finance/metadata.yml +37 -0
- pfeed-0.0.4/pfeed/sources/yahoo_finance/source.py +46 -0
- pfeed-0.0.4/pfeed/storages/__init__.py +5 -0
- pfeed-0.0.4/pfeed/storages/azure_storage.py +6 -0
- pfeed-0.0.4/pfeed/storages/base_storage.py +145 -0
- pfeed-0.0.4/pfeed/storages/cache_storage.py +54 -0
- pfeed-0.0.4/pfeed/storages/delta_lake_storage_mixin.py +65 -0
- pfeed-0.0.4/pfeed/storages/duckdb_storage.py +349 -0
- pfeed-0.0.4/pfeed/storages/gcp_storage.py +5 -0
- pfeed-0.0.4/pfeed/storages/huggingface_storage.py +5 -0
- pfeed-0.0.4/pfeed/storages/local_storage.py +21 -0
- pfeed-0.0.4/pfeed/storages/minio_storage.py +143 -0
- pfeed-0.0.4/pfeed/storages/s3_storage.py +41 -0
- pfeed-0.0.4/pfeed/typing.py +42 -0
- pfeed-0.0.4/pfeed/utils/dataframe.py +34 -0
- pfeed-0.0.4/pfeed/utils/file_formats.py +156 -0
- {pfeed-0.0.2.dev3 → pfeed-0.0.4}/pfeed/utils/monitor.py +6 -4
- pfeed-0.0.4/pfeed/utils/utils.py +192 -0
- pfeed-0.0.4/pyproject.toml +92 -0
- pfeed-0.0.2.dev3/pfeed/__init__.py +0 -62
- pfeed-0.0.2.dev3/pfeed/cli/commands/config.py +0 -66
- pfeed-0.0.2.dev3/pfeed/cli/commands/docker_compose.py +0 -33
- pfeed-0.0.2.dev3/pfeed/cli/commands/download.py +0 -47
- pfeed-0.0.2.dev3/pfeed/cli/commands/open.py +0 -47
- pfeed-0.0.2.dev3/pfeed/config_handler.py +0 -153
- pfeed-0.0.2.dev3/pfeed/const/common.py +0 -32
- pfeed-0.0.2.dev3/pfeed/data_tools/data_tool_pandas.py +0 -61
- pfeed-0.0.2.dev3/pfeed/data_tools/data_tool_polars.py +0 -68
- pfeed-0.0.2.dev3/pfeed/datastore.py +0 -156
- pfeed-0.0.2.dev3/pfeed/etl.py +0 -377
- pfeed-0.0.2.dev3/pfeed/feeds/__init__.py +0 -3
- pfeed-0.0.2.dev3/pfeed/feeds/base_feed.py +0 -232
- pfeed-0.0.2.dev3/pfeed/feeds/bybit_feed.py +0 -51
- pfeed-0.0.2.dev3/pfeed/feeds/yahoo_finance_feed.py +0 -186
- pfeed-0.0.2.dev3/pfeed/filepath.py +0 -103
- pfeed-0.0.2.dev3/pfeed/resolution.py +0 -62
- pfeed-0.0.2.dev3/pfeed/sources/binance/stream.py +0 -3
- pfeed-0.0.2.dev3/pfeed/sources/bybit/__init__.py +0 -4
- pfeed-0.0.2.dev3/pfeed/sources/bybit/api.py +0 -76
- pfeed-0.0.2.dev3/pfeed/sources/bybit/const.py +0 -26
- pfeed-0.0.2.dev3/pfeed/sources/bybit/download.py +0 -201
- pfeed-0.0.2.dev3/pfeed/sources/bybit/stream.py +0 -3
- pfeed-0.0.2.dev3/pfeed/sources/bybit/types.py +0 -4
- pfeed-0.0.2.dev3/pfeed/sources/bybit/utils.py +0 -46
- pfeed-0.0.2.dev3/pfeed/types/common_literals.py +0 -15
- pfeed-0.0.2.dev3/pfeed/types/core.py +0 -11
- pfeed-0.0.2.dev3/pfeed/utils/file_formats.py +0 -76
- pfeed-0.0.2.dev3/pfeed/utils/utils.py +0 -137
- pfeed-0.0.2.dev3/pfeed/utils/validate.py +0 -39
- pfeed-0.0.2.dev3/pyproject.toml +0 -93
- {pfeed-0.0.2.dev3 → pfeed-0.0.4}/LICENSE +0 -0
- {pfeed-0.0.2.dev3 → pfeed-0.0.4}/pfeed/cli/__init__.py +0 -0
- {pfeed-0.0.2.dev3 → pfeed-0.0.4}/pfeed/cli/commands/__init__.py +0 -0
- {pfeed-0.0.2.dev3 → pfeed-0.0.4}/pfeed/cli/commands/stream.py +0 -0
- /pfeed-0.0.2.dev3/pfeed/cli/commands/doc.py → /pfeed-0.0.4/pfeed/data_models/economics_data_model.py +0 -0
- {pfeed-0.0.2.dev3 → pfeed-0.0.4}/pfeed/feeds/custom_csv_feed.py +0 -0
- {pfeed-0.0.2.dev3 → pfeed-0.0.4}/pfeed/main.py +0 -0
|
@@ -1,58 +1,59 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
2
|
Name: pfeed
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.4
|
|
4
4
|
Summary: Data pipeline for algo-trading, getting and storing both real-time and historical data made easy.
|
|
5
|
-
Home-page: https://pfund.ai
|
|
6
5
|
License: Apache-2.0
|
|
7
|
-
Keywords: trading,algo-trading,data pipeline,ETL,data lake,data warehouse,data integration,historical data,live data,data streaming
|
|
6
|
+
Keywords: trading,algo-trading,data pipeline,ETL,data lake,data warehouse,data integration,historical data,live data,data streaming,data engineering
|
|
8
7
|
Author: Stephen Yau
|
|
9
8
|
Author-email: softwareentrepreneer+pfeed@gmail.com
|
|
10
|
-
Requires-Python: >=3.10
|
|
11
|
-
Classifier:
|
|
12
|
-
Classifier:
|
|
9
|
+
Requires-Python: >=3.10
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Intended Audience :: Science/Research
|
|
13
|
+
Classifier: Intended Audience :: Financial and Insurance Industry
|
|
14
|
+
Classifier: Intended Audience :: Information Technology
|
|
15
|
+
Classifier: Topic :: Office/Business :: Financial
|
|
16
|
+
Classifier: Topic :: Office/Business :: Financial :: Investment
|
|
17
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
13
18
|
Classifier: Programming Language :: Python :: 3.10
|
|
14
19
|
Classifier: Programming Language :: Python :: 3.11
|
|
15
20
|
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
-
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
17
22
|
Provides-Extra: core
|
|
18
23
|
Provides-Extra: dask
|
|
19
|
-
Provides-Extra:
|
|
20
|
-
Provides-Extra:
|
|
21
|
-
Provides-Extra:
|
|
24
|
+
Provides-Extra: databento
|
|
25
|
+
Provides-Extra: financial-modeling-prep
|
|
26
|
+
Provides-Extra: fmp
|
|
22
27
|
Provides-Extra: spark
|
|
23
|
-
Provides-Extra: storage
|
|
24
|
-
Requires-Dist: adlfs (>=2024.7.0,<2025.0.0) ; extra == "storage" or extra == "all"
|
|
25
28
|
Requires-Dist: beautifulsoup4 (>=4.12.3,<5.0.0)
|
|
26
|
-
Requires-Dist: bytewax (>=0.21.
|
|
27
|
-
Requires-Dist: coiled (>=1.
|
|
28
|
-
Requires-Dist: confluent-kafka (>=2.
|
|
29
|
-
Requires-Dist:
|
|
30
|
-
Requires-Dist:
|
|
31
|
-
Requires-Dist:
|
|
32
|
-
Requires-Dist:
|
|
33
|
-
Requires-Dist:
|
|
34
|
-
Requires-Dist:
|
|
35
|
-
Requires-Dist: minio (>=7.2.
|
|
36
|
-
Requires-Dist:
|
|
37
|
-
Requires-Dist: pandas (>=2.2.
|
|
38
|
-
Requires-Dist:
|
|
39
|
-
Requires-Dist:
|
|
40
|
-
Requires-Dist: polars-
|
|
41
|
-
Requires-Dist:
|
|
42
|
-
Requires-Dist:
|
|
43
|
-
Requires-Dist:
|
|
44
|
-
Requires-Dist:
|
|
45
|
-
Requires-Dist:
|
|
46
|
-
Requires-Dist:
|
|
47
|
-
Requires-Dist:
|
|
48
|
-
Requires-Dist: ray (>=2.35.0,<3.0.0) ; extra == "core" or extra == "all"
|
|
49
|
-
Requires-Dist: s3fs (>=2024.9.0,<2025.0.0) ; extra == "storage" or extra == "all"
|
|
50
|
-
Requires-Dist: yfinance (>=0.2.43,<0.3.0)
|
|
29
|
+
Requires-Dist: bytewax (>=0.21.1,<0.22.0) ; extra == "core"
|
|
30
|
+
Requires-Dist: coiled (>=1.89.0,<2.0.0) ; extra == "dask"
|
|
31
|
+
Requires-Dist: confluent-kafka (>=2.8.2,<3.0.0) ; extra == "core"
|
|
32
|
+
Requires-Dist: dask[complete,dataframe] (>=2025.3.0,<2026.0.0) ; extra == "dask"
|
|
33
|
+
Requires-Dist: databento (>=0.50.0,<0.51.0) ; (python_version < "4.0.0") and (extra == "databento")
|
|
34
|
+
Requires-Dist: deltalake (>=0.25.4,<0.26.0) ; extra == "core"
|
|
35
|
+
Requires-Dist: duckdb (>=1.2.1,<2.0.0)
|
|
36
|
+
Requires-Dist: fmp-api-client (>=0.0.1,<0.1.0) ; extra == "financial-modeling-prep"
|
|
37
|
+
Requires-Dist: fmp-api-client (>=0.0.1,<0.1.0) ; extra == "fmp"
|
|
38
|
+
Requires-Dist: minio (>=7.2.15,<8.0.0) ; extra == "core"
|
|
39
|
+
Requires-Dist: narwhals (>=1.32.0,<2.0.0)
|
|
40
|
+
Requires-Dist: pandas (>=2.2.3,<3.0.0)
|
|
41
|
+
Requires-Dist: pandera (>=0.23.1,<0.24.0)
|
|
42
|
+
Requires-Dist: pfund (>=0.0.2,<0.1.0)
|
|
43
|
+
Requires-Dist: polars[polars-cloud] (>=1.26.0,<2.0.0)
|
|
44
|
+
Requires-Dist: prefect (>=3.2.2,<4.0.0) ; extra == "core"
|
|
45
|
+
Requires-Dist: pyarrow (>=18.0.0,<19.0.0)
|
|
46
|
+
Requires-Dist: pydantic (>=2.10.6,<3.0.0)
|
|
47
|
+
Requires-Dist: pyspark[connect,pandas-on-spark,sql] (>=3.5.3,<4.0.0) ; extra == "spark"
|
|
48
|
+
Requires-Dist: ray (>=2.44.0,<3.0.0) ; extra == "core"
|
|
49
|
+
Requires-Dist: yfinance (>=0.2.55,<0.3.0)
|
|
50
|
+
Requires-Dist: zstandard (>=0.23.0,<0.24.0)
|
|
51
51
|
Project-URL: Documentation, https://pfeed-docs.pfund.ai
|
|
52
|
+
Project-URL: Homepage, https://pfund.ai
|
|
52
53
|
Project-URL: Repository, https://github.com/PFund-Software-Ltd/pfeed
|
|
53
54
|
Description-Content-Type: text/markdown
|
|
54
55
|
|
|
55
|
-
# PFeed:
|
|
56
|
+
# PFeed: The Single Source of Truth for Algo-Trading Data. Uniting Traders to Clean Once & Share with All.
|
|
56
57
|
|
|
57
58
|
[](https://x.com/pfund_ai)
|
|
58
59
|

|
|
@@ -60,9 +61,10 @@ Description-Content-Type: text/markdown
|
|
|
60
61
|
[](https://pypi.org/project/pfeed)
|
|
61
62
|

|
|
62
63
|
<!-- [](https://jupyterbook.org) -->
|
|
63
|
-
[](https://python-poetry.org/)
|
|
64
|
+
<!-- [](https://python-poetry.org/) -->
|
|
64
65
|
|
|
65
66
|
[MinIO]: https://min.io/
|
|
67
|
+
[Deltalake]: https://github.com/delta-io/delta-rs
|
|
66
68
|
[PFund]: https://github.com/PFund-Software-Ltd/pfund
|
|
67
69
|
[Polars]: https://github.com/pola-rs/polars
|
|
68
70
|
[Dask]: https://www.dask.org/
|
|
@@ -75,21 +77,28 @@ Description-Content-Type: text/markdown
|
|
|
75
77
|
[Databento]: https://databento.com/
|
|
76
78
|
[Polygon]: https://polygon.io/
|
|
77
79
|
[FirstRate Data]: https://firstratedata.com
|
|
80
|
+
[Prefect]: https://www.prefect.io/
|
|
81
|
+
[Bytewax]: https://www.bytewax.io
|
|
82
|
+
|
|
83
|
+
> **This library is NOT stable yet. For a stable release, please wait for 0.1.0.**
|
|
84
|
+
|
|
85
|
+
## TLDR: use pfeed to manage your trading data; other traders will help you clean it
|
|
78
86
|
|
|
79
87
|
## Problem
|
|
80
|
-
Starting algo-trading requires reliable
|
|
88
|
+
Starting algo-trading requires reliable and clean data, but traders often **work in silos**, each writing **duplicated code** to clean the same datasets—wasting time and effort. Accessing clean, ready-to-use data is a challenge, forcing traders to handle tedious data tasks before they can even start trading.
|
|
81
89
|
|
|
82
90
|
## Solution
|
|
83
|
-
|
|
91
|
+
`pfeed` leverages modern data engineering tools to centralize data cleaning efforts, automate ETL/ELT, store data in a **data lake with Delta Lake** support, and output **backtesting-ready data**, allowing traders to focus on strategy development.
|
|
84
92
|
|
|
85
93
|
---
|
|
86
|
-
PFeed (/piː fiːd/) is
|
|
94
|
+
PFeed (/piː fiːd/) is the data engine for trading, serving as a pipeline between raw data sources and traders. It enables you to **download historical data**, **stream real-time data**, and **store cleaned data** in a **local data lake for quantitative analysis**, supporting both **batch processing** and **streaming** workflows through streamlined data collection, cleaning, transformation, and storage.
|
|
87
95
|
|
|
88
96
|
## Core Features
|
|
89
97
|
- [x] Download or stream reliable, validated and **clean data** for research, backtesting, or live trading
|
|
90
98
|
- [x] Get historical data (**dataframe**) or live data in standardized formats by just calling a **single** function
|
|
91
|
-
- [x] **Own your data** by storing them locally using [MinIO]
|
|
99
|
+
- [x] **Own your data** by storing them locally using [MinIO] + [Deltalake], or in the cloud
|
|
92
100
|
- [x] Interact with different kinds of data (including TradFi, CeFi and DeFi) using a **unified interface**
|
|
101
|
+
- [x] Scale using modern data tools (e.g. [Polars], [Dask]) and workflow orchestration frameworks ([Prefect] for batch processing, [Bytewax] for streaming)
|
|
93
102
|
|
|
94
103
|
---
|
|
95
104
|
|
|
@@ -98,7 +107,7 @@ PFeed (/piː fiːd/) is a data pipeline for algorithmic trading, serving as a br
|
|
|
98
107
|
|
|
99
108
|
- [Installation](#installation)
|
|
100
109
|
- [Quick Start](#quick-start)
|
|
101
|
-
- [Get Historical Data in Dataframe](#1-get-historical-data-in-dataframe
|
|
110
|
+
- [Get Historical Data in Dataframe](#1-get-historical-data-in-dataframe)
|
|
102
111
|
- [Download Historical Data on Command Line](#2-download-historical-data-on-the-command-line-interface-cli)
|
|
103
112
|
- [Download Historical Data in Python](#3-download-historical-data-in-python)
|
|
104
113
|
- [Supported Data Sources](#supported-data-sources)
|
|
@@ -112,67 +121,63 @@ PFeed (/piː fiːd/) is a data pipeline for algorithmic trading, serving as a br
|
|
|
112
121
|
## Installation
|
|
113
122
|
> For more installation options, please refer to the [documentation](https://pfeed-docs.pfund.ai/installation).
|
|
114
123
|
```bash
|
|
115
|
-
# [RECOMMENDED]:
|
|
116
|
-
pip install -U "pfeed[
|
|
124
|
+
# [RECOMMENDED]: Core Features, including Minio, Deltalake, Ray, etc.
|
|
125
|
+
pip install -U "pfeed[core,prefect,bytewax]"
|
|
126
|
+
|
|
127
|
+
# add your desired data sources, e.g. databento, polygon, etc.
|
|
128
|
+
pip install -U "pfeed[core,databento,polygon]"
|
|
117
129
|
|
|
118
|
-
# Minimal Features
|
|
119
|
-
pip install -U "pfeed
|
|
130
|
+
# Minimal Features
|
|
131
|
+
pip install -U "pfeed"
|
|
120
132
|
```
|
|
121
133
|
|
|
122
134
|
|
|
123
135
|
|
|
124
136
|
## Quick Start
|
|
125
|
-
### 1. Get Historical Data in Dataframe
|
|
126
|
-
Get [Bybit]'s data in dataframe, e.g. 1-minute data (data is downloaded on the fly if not
|
|
137
|
+
### 1. Get Historical Data in Dataframe
|
|
138
|
+
Get [Bybit]'s data in dataframe, e.g. 1-minute data (data is downloaded on the fly if not found in storage)
|
|
127
139
|
|
|
128
140
|
```python
|
|
129
141
|
import pfeed as pe
|
|
130
142
|
|
|
131
|
-
|
|
143
|
+
bybit = pe.Bybit(data_tool='polars')
|
|
132
144
|
|
|
133
|
-
df =
|
|
145
|
+
df = bybit.get_historical_data(
|
|
134
146
|
'BTC_USDT_PERP',
|
|
135
147
|
resolution='1minute', # 'raw' or '1tick'/'1t' or '2second'/'2s' etc.
|
|
136
|
-
start_date='
|
|
137
|
-
end_date='
|
|
148
|
+
start_date='2025-01-01',
|
|
149
|
+
end_date='2025-01-01',
|
|
138
150
|
)
|
|
139
151
|
```
|
|
140
152
|
|
|
141
153
|
Printing the first few rows of `df`:
|
|
142
|
-
|
|
|
143
|
-
|
|
144
|
-
|
|
|
145
|
-
|
|
|
146
|
-
| 2 | 2024-03-01 00:02:00 | BTC_USDT_PERP | 1m | 61232.2 | 61249 | 61180 | 61184.2 | 91.446 |
|
|
154
|
+
| date | resolution | product | symbol | open | high | low | close | volume |
|
|
155
|
+
|:--------------------|:-------------|:--------------|:---------|--------:|--------:|--------:|--------:|---------:|
|
|
156
|
+
| 2025-01-01 00:00:00 | 1m | BTC_USDT_PERP | BTCUSDT | 93530 | 93590.8 | 93501.3 | 93590.5 | 30.284 |
|
|
157
|
+
| 2025-01-01 00:01:00 | 1m | BTC_USDT_PERP | BTCUSDT | 93590.5 | 93627.7 | 93571.8 | 93625 | 30.334 |
|
|
147
158
|
|
|
148
|
-
> By using pfeed, you are just
|
|
159
|
+
> By using pfeed, you are just **one function call** away from getting a standardized dataframe
|
|
149
160
|
|
|
150
161
|
### 2. Download Historical Data on the Command Line Interface (CLI)
|
|
151
162
|
> For more CLI commands, please refer to the [documentation](https://pfeed-docs.pfund.ai/cli-commands).
|
|
152
163
|
```bash
|
|
153
|
-
# download
|
|
154
|
-
pfeed download -d BYBIT -p BTC_USDT_PERP --start-date
|
|
164
|
+
# download BTC tick data
|
|
165
|
+
pfeed download -d BYBIT -p BTC_USDT_PERP -r tick --start-date 2025-01-01 --end-date 2025-02-01
|
|
155
166
|
|
|
156
|
-
# download
|
|
157
|
-
pfeed download -d BYBIT -p BTC_USDT_PERP
|
|
167
|
+
# download data and store it in MinIO
|
|
168
|
+
pfeed download -d BYBIT -p BTC_USDT_PERP --storage minio
|
|
158
169
|
```
|
|
159
170
|
|
|
160
171
|
### 3. Download Historical Data in Python
|
|
161
172
|
```python
|
|
162
173
|
import pfeed as pe
|
|
163
174
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
'BCH_USDT_PERP',
|
|
171
|
-
],
|
|
172
|
-
dtypes=['raw'], # data types, e.g. 'raw', 'tick', 'second', 'minute' etc.
|
|
173
|
-
start_date='2024-03-01',
|
|
174
|
-
end_date='2024-03-08',
|
|
175
|
-
use_minio=False,
|
|
175
|
+
bybit = pe.Bybit()
|
|
176
|
+
bybit.download(
|
|
177
|
+
product='BTC_USDT_PERP',
|
|
178
|
+
resolution='1s', # 1-second data
|
|
179
|
+
rollback_period='1w', # rollback 1 week
|
|
180
|
+
to_storage='local',
|
|
176
181
|
)
|
|
177
182
|
```
|
|
178
183
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# PFeed:
|
|
1
|
+
# PFeed: The Single Source of Truth for Algo-Trading Data. Uniting Traders to Clean Once & Share with All.
|
|
2
2
|
|
|
3
3
|
[](https://x.com/pfund_ai)
|
|
4
4
|

|
|
@@ -6,9 +6,10 @@
|
|
|
6
6
|
[](https://pypi.org/project/pfeed)
|
|
7
7
|

|
|
8
8
|
<!-- [](https://jupyterbook.org) -->
|
|
9
|
-
[](https://python-poetry.org/)
|
|
9
|
+
<!-- [](https://python-poetry.org/) -->
|
|
10
10
|
|
|
11
11
|
[MinIO]: https://min.io/
|
|
12
|
+
[Deltalake]: https://github.com/delta-io/delta-rs
|
|
12
13
|
[PFund]: https://github.com/PFund-Software-Ltd/pfund
|
|
13
14
|
[Polars]: https://github.com/pola-rs/polars
|
|
14
15
|
[Dask]: https://www.dask.org/
|
|
@@ -21,21 +22,28 @@
|
|
|
21
22
|
[Databento]: https://databento.com/
|
|
22
23
|
[Polygon]: https://polygon.io/
|
|
23
24
|
[FirstRate Data]: https://firstratedata.com
|
|
25
|
+
[Prefect]: https://www.prefect.io/
|
|
26
|
+
[Bytewax]: https://www.bytewax.io
|
|
27
|
+
|
|
28
|
+
> **This library is NOT stable yet. For a stable release, please wait for 0.1.0.**
|
|
29
|
+
|
|
30
|
+
## TLDR: use pfeed to manage your trading data; other traders will help you clean it
|
|
24
31
|
|
|
25
32
|
## Problem
|
|
26
|
-
Starting algo-trading requires reliable
|
|
33
|
+
Starting algo-trading requires reliable and clean data, but traders often **work in silos**, each writing **duplicated code** to clean the same datasets—wasting time and effort. Accessing clean, ready-to-use data is a challenge, forcing traders to handle tedious data tasks before they can even start trading.
|
|
27
34
|
|
|
28
35
|
## Solution
|
|
29
|
-
|
|
36
|
+
`pfeed` leverages modern data engineering tools to centralize data cleaning efforts, automate ETL/ELT, store data in a **data lake with Delta Lake** support, and output **backtesting-ready data**, allowing traders to focus on strategy development.
|
|
30
37
|
|
|
31
38
|
---
|
|
32
|
-
PFeed (/piː fiːd/) is
|
|
39
|
+
PFeed (/piː fiːd/) is the data engine for trading, serving as a pipeline between raw data sources and traders. It enables you to **download historical data**, **stream real-time data**, and **store cleaned data** in a **local data lake for quantitative analysis**, supporting both **batch processing** and **streaming** workflows through streamlined data collection, cleaning, transformation, and storage.
|
|
33
40
|
|
|
34
41
|
## Core Features
|
|
35
42
|
- [x] Download or stream reliable, validated and **clean data** for research, backtesting, or live trading
|
|
36
43
|
- [x] Get historical data (**dataframe**) or live data in standardized formats by just calling a **single** function
|
|
37
|
-
- [x] **Own your data** by storing them locally using [MinIO]
|
|
44
|
+
- [x] **Own your data** by storing them locally using [MinIO] + [Deltalake], or in the cloud
|
|
38
45
|
- [x] Interact with different kinds of data (including TradFi, CeFi and DeFi) using a **unified interface**
|
|
46
|
+
- [x] Scale using modern data tools (e.g. [Polars], [Dask]) and workflow orchestration frameworks ([Prefect] for batch processing, [Bytewax] for streaming)
|
|
39
47
|
|
|
40
48
|
---
|
|
41
49
|
|
|
@@ -44,7 +52,7 @@ PFeed (/piː fiːd/) is a data pipeline for algorithmic trading, serving as a br
|
|
|
44
52
|
|
|
45
53
|
- [Installation](#installation)
|
|
46
54
|
- [Quick Start](#quick-start)
|
|
47
|
-
- [Get Historical Data in Dataframe](#1-get-historical-data-in-dataframe
|
|
55
|
+
- [Get Historical Data in Dataframe](#1-get-historical-data-in-dataframe)
|
|
48
56
|
- [Download Historical Data on Command Line](#2-download-historical-data-on-the-command-line-interface-cli)
|
|
49
57
|
- [Download Historical Data in Python](#3-download-historical-data-in-python)
|
|
50
58
|
- [Supported Data Sources](#supported-data-sources)
|
|
@@ -58,67 +66,63 @@ PFeed (/piː fiːd/) is a data pipeline for algorithmic trading, serving as a br
|
|
|
58
66
|
## Installation
|
|
59
67
|
> For more installation options, please refer to the [documentation](https://pfeed-docs.pfund.ai/installation).
|
|
60
68
|
```bash
|
|
61
|
-
# [RECOMMENDED]:
|
|
62
|
-
pip install -U "pfeed[
|
|
69
|
+
# [RECOMMENDED]: Core Features, including Minio, Deltalake, Ray, etc.
|
|
70
|
+
pip install -U "pfeed[core,prefect,bytewax]"
|
|
71
|
+
|
|
72
|
+
# add your desired data sources, e.g. databento, polygon, etc.
|
|
73
|
+
pip install -U "pfeed[core,databento,polygon]"
|
|
63
74
|
|
|
64
|
-
# Minimal Features
|
|
65
|
-
pip install -U "pfeed
|
|
75
|
+
# Minimal Features
|
|
76
|
+
pip install -U "pfeed"
|
|
66
77
|
```
|
|
67
78
|
|
|
68
79
|
|
|
69
80
|
|
|
70
81
|
## Quick Start
|
|
71
|
-
### 1. Get Historical Data in Dataframe
|
|
72
|
-
Get [Bybit]'s data in dataframe, e.g. 1-minute data (data is downloaded on the fly if not
|
|
82
|
+
### 1. Get Historical Data in Dataframe
|
|
83
|
+
Get [Bybit]'s data in dataframe, e.g. 1-minute data (data is downloaded on the fly if not found in storage)
|
|
73
84
|
|
|
74
85
|
```python
|
|
75
86
|
import pfeed as pe
|
|
76
87
|
|
|
77
|
-
|
|
88
|
+
bybit = pe.Bybit(data_tool='polars')
|
|
78
89
|
|
|
79
|
-
df =
|
|
90
|
+
df = bybit.get_historical_data(
|
|
80
91
|
'BTC_USDT_PERP',
|
|
81
92
|
resolution='1minute', # 'raw' or '1tick'/'1t' or '2second'/'2s' etc.
|
|
82
|
-
start_date='
|
|
83
|
-
end_date='
|
|
93
|
+
start_date='2025-01-01',
|
|
94
|
+
end_date='2025-01-01',
|
|
84
95
|
)
|
|
85
96
|
```
|
|
86
97
|
|
|
87
98
|
Printing the first few rows of `df`:
|
|
88
|
-
|
|
|
89
|
-
|
|
90
|
-
|
|
|
91
|
-
|
|
|
92
|
-
| 2 | 2024-03-01 00:02:00 | BTC_USDT_PERP | 1m | 61232.2 | 61249 | 61180 | 61184.2 | 91.446 |
|
|
99
|
+
| date | resolution | product | symbol | open | high | low | close | volume |
|
|
100
|
+
|:--------------------|:-------------|:--------------|:---------|--------:|--------:|--------:|--------:|---------:|
|
|
101
|
+
| 2025-01-01 00:00:00 | 1m | BTC_USDT_PERP | BTCUSDT | 93530 | 93590.8 | 93501.3 | 93590.5 | 30.284 |
|
|
102
|
+
| 2025-01-01 00:01:00 | 1m | BTC_USDT_PERP | BTCUSDT | 93590.5 | 93627.7 | 93571.8 | 93625 | 30.334 |
|
|
93
103
|
|
|
94
|
-
> By using pfeed, you are just
|
|
104
|
+
> By using pfeed, you are just **one function call** away from getting a standardized dataframe
|
|
95
105
|
|
|
96
106
|
### 2. Download Historical Data on the Command Line Interface (CLI)
|
|
97
107
|
> For more CLI commands, please refer to the [documentation](https://pfeed-docs.pfund.ai/cli-commands).
|
|
98
108
|
```bash
|
|
99
|
-
# download
|
|
100
|
-
pfeed download -d BYBIT -p BTC_USDT_PERP --start-date
|
|
109
|
+
# download BTC tick data
|
|
110
|
+
pfeed download -d BYBIT -p BTC_USDT_PERP -r tick --start-date 2025-01-01 --end-date 2025-02-01
|
|
101
111
|
|
|
102
|
-
# download
|
|
103
|
-
pfeed download -d BYBIT -p BTC_USDT_PERP
|
|
112
|
+
# download data and store it in MinIO
|
|
113
|
+
pfeed download -d BYBIT -p BTC_USDT_PERP --storage minio
|
|
104
114
|
```
|
|
105
115
|
|
|
106
116
|
### 3. Download Historical Data in Python
|
|
107
117
|
```python
|
|
108
118
|
import pfeed as pe
|
|
109
119
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
'BCH_USDT_PERP',
|
|
117
|
-
],
|
|
118
|
-
dtypes=['raw'], # data types, e.g. 'raw', 'tick', 'second', 'minute' etc.
|
|
119
|
-
start_date='2024-03-01',
|
|
120
|
-
end_date='2024-03-08',
|
|
121
|
-
use_minio=False,
|
|
120
|
+
bybit = pe.Bybit()
|
|
121
|
+
bybit.download(
|
|
122
|
+
product='BTC_USDT_PERP',
|
|
123
|
+
resolution='1s', # 1-second data
|
|
124
|
+
rollback_period='1w', # rollback 1 week
|
|
125
|
+
to_storage='local',
|
|
122
126
|
)
|
|
123
127
|
```
|
|
124
128
|
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: pfeed
|
|
2
|
+
services:
|
|
3
|
+
minio:
|
|
4
|
+
container_name: pe-minio
|
|
5
|
+
image: minio/minio:RELEASE.2025-01-20T14-49-07Z
|
|
6
|
+
ports:
|
|
7
|
+
- "${MINIO_PORT:-9000}:9000"
|
|
8
|
+
- "${MINIO_CONSOLE_PORT:-9001}:9001"
|
|
9
|
+
volumes:
|
|
10
|
+
- ${MINIO_DATA_PATH}:/data
|
|
11
|
+
environment:
|
|
12
|
+
MINIO_ROOT_USER: ${MINIO_ROOT_USER:-pfunder}
|
|
13
|
+
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD:-password}
|
|
14
|
+
command: server /data --console-address ":9001"
|
|
15
|
+
profiles:
|
|
16
|
+
- minio
|
|
17
|
+
# timescaledb:
|
|
18
|
+
# container_name: pe-timescaledb
|
|
19
|
+
# image: timescaledev/timescaledb-ha:pg17.2-ts2.17.2-all-oss
|
|
20
|
+
# ports:
|
|
21
|
+
# - "${TIMESCALEDB_PORT:-5432}:5432"
|
|
22
|
+
# volumes:
|
|
23
|
+
# - ${TIMESCALEDB_DATA_PATH}/timescaledb:/var/lib/postgresql/data
|
|
24
|
+
# environment:
|
|
25
|
+
# POSTGRES_DB: ${TIMESCALEDB_DB:-pfeed}
|
|
26
|
+
# POSTGRES_USER: ${TIMESCALEDB_USER:-pfunder}
|
|
27
|
+
# POSTGRES_PASSWORD: ${TIMESCALEDB_PASSWORD:-password}
|
|
28
|
+
# profiles:
|
|
29
|
+
# - timescaledb
|
pfeed-0.0.4/logging.yml
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
version: 1
|
|
2
|
+
# filename_format: '%Y-%m-%d_UTC%z'
|
|
3
|
+
# incremental False = replaces the existing configuration
|
|
4
|
+
incremental: False
|
|
5
|
+
# disable_existing_loggers will be ignored if incremental is True
|
|
6
|
+
disable_existing_loggers: False
|
|
7
|
+
loggers:
|
|
8
|
+
root:
|
|
9
|
+
level: 'WARNING'
|
|
10
|
+
handlers: ['compressed_timed_rotating_file_handler', 'stream_path_handler']
|
|
11
|
+
propagate: False
|
|
12
|
+
pfeed:
|
|
13
|
+
level: 'DEBUG'
|
|
14
|
+
handlers: ['compressed_timed_rotating_file_handler', 'stream_handler']
|
|
15
|
+
propagate: False
|
|
16
|
+
# NOTE: avoid name conflict with pfund, add "_data" suffix to e.g. bybit
|
|
17
|
+
yahoo_finance_data:
|
|
18
|
+
level: 'DEBUG'
|
|
19
|
+
handlers: ['compressed_timed_rotating_file_handler', 'stream_handler']
|
|
20
|
+
propagate: False
|
|
21
|
+
bybit_data:
|
|
22
|
+
level: 'DEBUG'
|
|
23
|
+
handlers: ['compressed_timed_rotating_file_handler', 'stream_handler']
|
|
24
|
+
propagate: False
|
|
25
|
+
databento_data:
|
|
26
|
+
level: 'DEBUG'
|
|
27
|
+
handlers: ['compressed_timed_rotating_file_handler', 'stream_handler']
|
|
28
|
+
propagate: False
|
|
29
|
+
handlers:
|
|
30
|
+
file_handler:
|
|
31
|
+
class: 'logging.FileHandler'
|
|
32
|
+
level: 'DEBUG'
|
|
33
|
+
formatter: 'file'
|
|
34
|
+
compressed_timed_rotating_file_handler:
|
|
35
|
+
class: 'pfund.plogging.handlers.CompressedTimedRotatingFileHandler'
|
|
36
|
+
level: 'DEBUG'
|
|
37
|
+
formatter: 'file'
|
|
38
|
+
kwargs: {'when': 'midnight', 'backupCount': 7, 'utc': True, 'encoding': 'utf-8'}
|
|
39
|
+
stream_handler:
|
|
40
|
+
class: 'logging.StreamHandler'
|
|
41
|
+
level: 'INFO'
|
|
42
|
+
formatter: 'console'
|
|
43
|
+
stream_path_handler:
|
|
44
|
+
class: 'logging.StreamHandler'
|
|
45
|
+
level: 'INFO'
|
|
46
|
+
formatter: 'path'
|
|
47
|
+
formatters:
|
|
48
|
+
path:
|
|
49
|
+
format: '%(asctime)s.%(msecs)03d | %(levelname)s | %(name)s | %(message)s | %(shortpath)s fn:%(funcName)s ln:%(lineno)d'
|
|
50
|
+
datefmt: '%Y-%m-%dT%H:%M:%S%z'
|
|
51
|
+
file:
|
|
52
|
+
format: '%(asctime)s.%(msecs)03d | %(levelname)s | %(message)s | %(filename)s fn:%(funcName)s ln:%(lineno)d'
|
|
53
|
+
datefmt: '%H:%M:%S%z'
|
|
54
|
+
console:
|
|
55
|
+
format: '%(asctime)s.%(msecs)03d | %(levelname)s | %(name)s | %(message)s | %(filename)s fn:%(funcName)s ln:%(lineno)d'
|
|
56
|
+
datefmt: '%Y-%m-%dT%H:%M:%S%z'
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
from typing import TYPE_CHECKING
|
|
3
|
+
if TYPE_CHECKING:
|
|
4
|
+
from pfund_plugins.base_plugin import BasePlugin
|
|
5
|
+
# need these imports to support IDE hints:
|
|
6
|
+
aliases = ...
|
|
7
|
+
from pfeed.feeds.yahoo_finance.yahoo_finance import (
|
|
8
|
+
YahooFinance,
|
|
9
|
+
YahooFinance as YF,
|
|
10
|
+
)
|
|
11
|
+
from pfeed.feeds.bybit.bybit import (
|
|
12
|
+
BybitMarketFeed as Bybit,
|
|
13
|
+
)
|
|
14
|
+
from pfeed.feeds.financial_modeling_prep.financial_modeling_prep import (
|
|
15
|
+
FinancialModelingPrep,
|
|
16
|
+
FinancialModelingPrep as FMP,
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
from importlib.metadata import version
|
|
20
|
+
from pfeed.config import configure, get_config
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
plugins = {}
|
|
25
|
+
def add_plugin(plugin: BasePlugin):
|
|
26
|
+
plugins[plugin.name] = plugin
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def __getattr__(name: str):
|
|
31
|
+
if name == 'aliases':
|
|
32
|
+
from pfeed.const.aliases import ALIASES
|
|
33
|
+
from pfund.const.aliases import ALIASES as PFUND_ALIASES
|
|
34
|
+
return {**ALIASES, **PFUND_ALIASES}
|
|
35
|
+
elif name in ('YahooFinance', 'YF'):
|
|
36
|
+
from pfeed.feeds.yahoo_finance.yahoo_finance import YahooFinance
|
|
37
|
+
return YahooFinance
|
|
38
|
+
elif name in ('Bybit',):
|
|
39
|
+
from pfeed.feeds.bybit.bybit import BybitMarketFeed as Bybit
|
|
40
|
+
return Bybit
|
|
41
|
+
elif name in ('FinancialModelingPrep', 'FMP'):
|
|
42
|
+
from pfeed.feeds.financial_modeling_prep.financial_modeling_prep import FinancialModelingPrep
|
|
43
|
+
return FinancialModelingPrep
|
|
44
|
+
elif name in plugins:
|
|
45
|
+
return plugins[name]
|
|
46
|
+
raise AttributeError(f"'{__name__}' object has no attribute '{name}'")
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
# TODO: add llm plugin to explain "what is xxx?"
|
|
50
|
+
def what_is(alias: str) -> str | None:
|
|
51
|
+
from pfeed.const.aliases import ALIASES
|
|
52
|
+
from pfund.const.aliases import ALIASES as PFUND_ALIASES
|
|
53
|
+
if alias in PFUND_ALIASES or alias.upper() in PFUND_ALIASES:
|
|
54
|
+
return PFUND_ALIASES.get(alias, PFUND_ALIASES.get(alias.upper(), None))
|
|
55
|
+
elif alias in ALIASES or alias.upper() in ALIASES:
|
|
56
|
+
return aliases.get(alias, aliases.get(alias.upper(), None))
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
__version__ = version("pfeed")
|
|
60
|
+
__all__ = (
|
|
61
|
+
"__version__",
|
|
62
|
+
"configure",
|
|
63
|
+
"get_config",
|
|
64
|
+
"add_plugin",
|
|
65
|
+
"aliases",
|
|
66
|
+
"what_is",
|
|
67
|
+
"YahooFinance", "YF",
|
|
68
|
+
"Bybit",
|
|
69
|
+
"FinancialModelingPrep", "FMP",
|
|
70
|
+
)
|