quantlab.acquisition.sharadar.refresh.refresh_raw_tier#

quantlab.acquisition.sharadar.refresh.refresh_raw_tier(download_dir, *, end=None, trading_days=10, client=None)[source]#

Pull the table plan into the raw tier under <download_dir>/sharadar/.

The tables are pulled in the order WHOLE_TABLES, WINDOW_TABLES, UPDATED_TABLES. A table that fails with one of TABLE_FAILURES is listed as failed and keeps its watermark, and the tables after it are still pulled; a failed updated pull (SharadarHttpError) is first retried as a bulk pull.

Parameters:
download_dirstr or Path

The download root, holding a bulk pull of every table already.

enddate or None, default None

The last day of the window pulls; None is today in Sharadar’s time zone (US/Eastern).

trading_daysint, default 10

Raw dates re-pulled before each window table’s watermark.

clientSharadarClient or None, default None

The client to pull through; one reading SHARADAR_API_KEY when omitted.

Returns:
RawTierRefreshResult

One part per table: the raw file written, or why it failed.

Raises:
SharadarEntitlementError

If SHARADAR_API_KEY is unset; nothing is requested.

ValueError

If a table has no bulk pull yet; the tables before it are pulled.

Examples

Needs the key and the network:

refresh_raw_tier("/data/quantlab/downloads", trading_days=10).failed  # ()