Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

CommandDescription
pfeed downloadDownload historical market data and store it
pfeed streamStream live market data
pfeed dataExplore stored data in a notebook
pfeed ducklakeMaintain the DuckLake tables
pfeed configView and change the configuration
pfeed removeRemove data and logs
pfeed tuiOpen the terminal UI

Run pfeed <command> --help for the full details of any command.


pfeed download

pfeed download SOURCE PRODUCT RESOLUTION [OPTIONS]
OptionDescriptionDefault
--startFirst date (inclusive), YYYY-MM-DD
--endLast date (inclusive), YYYY-MM-DDyesterday (UTC)
--rollbackHow far to roll back from today (UTC) when --start is not given, e.g. 7d, ytd, max1d
--layerData layer to store the data in: raw or cleanedcleaned
--ioWhere and how to store the data: parquet or ducklakeparquet
--pathDirectory to store the data underpfeed’s data path
--originSub-label for data from the same source but different origins
pfeed download bybit BTC_USDT_PERP 1m --start 2025-01-01 --end 2025-01-31
pfeed download bybit BTC_USDT_PERP 1t --rollback 7d --io ducklake

pfeed stream

pfeed stream SOURCE PRODUCT RESOLUTION [OPTIONS]
OptionDescriptionDefault
--ioWhere and how to store the streamed data: parquet or ducklakenot stored
--pathDirectory to store the data under (with --io)pfeed’s data path
--envTrading environment: paper or livelive
--originSub-label for data from the same source but different origins
--flush-intervalSeconds between writes of the buffered data (with --io)100
--incremental-barsAlso store the updates of a bar before it closes (with --io)
--quietDo not print the streamed data
pfeed stream bybit BTC_USDT_PERP 1m
pfeed stream bybit BTC_USDT_PERP 1t --io ducklake --quiet

pfeed data

pfeed data PATH [OPTIONS]
OptionDescriptionDefault
--keepKeep the notebook after exitdeleted on exit
--portPort of the data explorera free port
--data-pathOverride the data pathpfeed’s data path
pfeed data ducklake                        # the DuckLake tables stored by pfeed
pfeed data parquet                         # the Parquet files stored by pfeed
pfeed data ~/Downloads/trades.parquet --keep

pfeed ducklake

pfeed ducklake [OPTIONS] COMMAND
OptionDescriptionDefault
--base-pathDuckLake directory to maintain<data_path>/ducklake
CommandDescription
optimizeCompact all tables into fewer, larger Parquet files to speed up reads
vacuumDelete history older than the retention period (--retention-hours, default 168). Dry run by default; add --no-dry-run (-n) to actually delete
pfeed ducklake optimize
pfeed ducklake vacuum --no-dry-run

pfeed config

CommandDescription
listPrint the config and the config file’s path
wherePrint the config directory
setChange the data path (--data) or log path (--log)
openOpen the config file (-c) or logging.yaml (-l) in your editor
resetReset the config file (-c) or logging.yaml (-l) to defaults, all of them if no flag is given

See Configuration for details.


pfeed remove

Alias: pfeed rm

CommandDescription
data [TARGET]Remove a file/folder under the data path, or empty it if no TARGET is given
log [TARGET]Remove a file/folder under the log path, or empty it if no TARGET is given

Asks for confirmation first; add -y to skip it.

pfeed rm data some_folder

pfund-shell

pfeed comes with pfund-shell, an interactive shell that brings together the commands of every installed package in the PFund ecosystem (e.g. pfeed, pfund) in one place, with autocompletion:

pfund-shell