drift-cataloger Prefect Flows#
The Drift Cataloger project pulls the latest data from the Drift API and stores it in a database. This data is then used downstream to help assist with trading positions on the Drift Protocol.
drift_cataloger.load_drift_api
#
Pull funding rate data from the Drift API and publish it to the database.
This function initializes the Drift database if it is not already initialized, then
fetches and publishes funding rate data for the specified symbols and dates. This
calls publish_funding_rate_data for each symbol and date combination on different
threads to speed up the process.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
date_
|
date | list[date] | None
|
The specific date or list of dates to fetch funding rates for. If None, fetches all available funding rates for the symbols from the last 31 days. Defaults to None. |
None
|
engine
|
Engine | None
|
SQLAlchemy engine, if not provided, the default engine will be used. Defaults to None. |
None
|