quantlab.acquisition.symbol_batch.BatchOutcome#

class quantlab.acquisition.symbol_batch.BatchOutcome(symbols, symbols_with_data=<factory>, pages=0, complete=False)[source]#

Bases: object

Summary of what one _fetch_batch call did.

symbols_with_data is a subset of symbols, but it only says which symbols have no data once complete is true. A vendor that sorts symbol-major can legitimately return a single symbol on the first page of a hundred-symbol batch, so an incomplete batch says nothing about absence.

Attributes:
symbolstuple[str, …]

The symbols the batch requested.

symbols_with_dataset[str]

Symbols for which at least one row has landed.

pagesint

Pages fetched so far, including those resumed from the ledger.

completebool

Whether the vendor has returned its final page.

Examples

>>> outcome = BatchOutcome(symbols=("AAPL", "MSFT"))
>>> outcome.pages, outcome.complete
(0, False)
>>> outcome.symbols_with_data
set()