tse-dara 0.5.0a1

Data only. Sources reviewed; live endpoints not verified by these synthetic tests.

search_instruments

Search symbols without silently selecting the first match. Returns a typed DataFrame, including for no matches. A limit only limits displayed results; it is not a server pagination parameter.

search_instruments(query: 'str', *, market: 'Market | None' = None, include_inactive: 'bool' = True, limit: 'int | None' = None, policy: 'FetchPolicy | str | None' = None) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
querystrrequiredNonempty text to search. Search does not guess which result the user meant.
marketMarket | NoneNoneTSE/IFB/BASE enum or documented string. Support depends on endpoint; index/overview support TSE/IFB only. None never certifies historical coverage.
include_inactiveboolTrueOnly False is supported for the current-observed instrument list; True cannot be claimed from market watch.
limitint | NoneNonePositive cap. For download_market at most 10000 entries; default 100 and request budget still applies.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError

get_instrument

Resolve one symbol or explicit InstrumentRef and verify its identity. Raises AmbiguousInstrumentError for multiple exact matches; use candidates or search_instruments to choose an ins_code. Historical identity and ISIN-only lookup remain unsupported.

get_instrument(instrument: 'InstrumentLike', *, market: 'Market | None' = None, as_of: 'date | None' = None, known_at: 'datetime | None' = None, policy: 'FetchPolicy | str | None' = None) -> 'InstrumentRecord'

Output: InstrumentRecord

ParameterTypeDefaultDescription
instrumentInstrumentLikerequiredSymbol string or explicit InstrumentRef. A bare numeric string is not inferred as ins_code.
marketMarket | NoneNoneTSE/IFB/BASE enum or documented string. Support depends on endpoint; index/overview support TSE/IFB only. None never certifies historical coverage.
as_ofdate | NoneNoneReserved economic identity date; historical identity lookup is explicitly unsupported.
known_atdatetime | NoneNoneHistorical identity knowledge cutoff; reserved and explicitly rejected in this release.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError

get_quote

Fetch the latest report as an immutable Quote with source and retrieval timestamps. A last report may be from a past trading day. Use an explicit offline policy to permit stale cached data; autosave errors are reported separately.

get_quote(instrument: 'InstrumentLike', *, freshness: 'FreshnessPolicy | None' = None, policy: 'FetchPolicy | str | None' = None) -> 'Quote'

Output: Quote

ParameterTypeDefaultDescription
instrumentInstrumentLikerequiredSymbol string or explicit InstrumentRef. A bare numeric string is not inferred as ins_code.
freshnessFreshnessPolicy | NoneNoneExplicit FreshnessPolicy, with precedence over policy freshness for quotes.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError

get_price

Return a Decimal price. field is last, closing or previous_reference. Missing price raises MissingValueError and unverified price units raise UnsupportedQuoteUnitError. Use get_quote/get_quote_frame to retain time and unit metadata.

get_price(instrument: 'InstrumentLike', *, field: 'str' = 'last', freshness: 'FreshnessPolicy | None' = None, policy: 'FetchPolicy | str | None' = None) -> 'Decimal'

Output: Decimal

ParameterTypeDefaultDescription
instrumentInstrumentLikerequiredSymbol string or explicit InstrumentRef. A bare numeric string is not inferred as ins_code.
fieldstr'last'One of 'last', 'closing', 'previous_reference'; not a raw API field name.
freshnessFreshnessPolicy | NoneNoneExplicit FreshnessPolicy, with precedence over policy freshness for quotes.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError, MissingValueError, UnsupportedQuoteUnitError

get_quotes

Fetch an ordered batch to a DataFrame. Accepts list/tuple, Series, Index or a 1D NumPy array. Duplicates and input order are preserved. on_error=collect records per-item errors; raise attaches partial_result to BatchDataError. No concurrency is implied.

get_quotes(instruments: 'Sequence[InstrumentLike] | pd.Series | pd.Index | np.ndarray', *, on_error: 'str' = 'raise', freshness: 'FreshnessPolicy | None' = None, policy: 'FetchPolicy | str | None' = None) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
instrumentsSequence[InstrumentLike] | pd.Series | pd.Index | np.ndarrayrequiredNonempty ordered list/tuple, Pandas Series/Index or a one-dimensional NumPy array. Duplicates preserved; nulls rejected.
on_errorstr'raise''raise' stops with partial_result; 'collect' records errors without losing other inputs.
freshnessFreshnessPolicy | NoneNoneExplicit FreshnessPolicy, with precedence over policy freshness for quotes.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError, BatchDataError

get_history

Raw daily history, ascending and inclusive. No rows are forward-filled. The full available endpoint response is fetched/cached, then filtered locally. ``source`` adjustments, stitched identities and ``as_of`` are reserved but raise explicit errors until their evidence is implemented.

get_history(instrument: 'InstrumentLike', *, start: 'DateLike | None' = None, end: 'DateLike | None' = None, calendar: 'Calendar' = 'gregorian', adjustment: 'str' = 'none', series: 'str' = 'listing', as_of: 'datetime | None' = None, policy: 'FetchPolicy | str | None' = None, include_jdate: 'bool' = False) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
instrumentInstrumentLikerequiredSymbol string or explicit InstrumentRef. A bare numeric string is not inferred as ins_code.
startDateLike | NoneNoneابتدای بازه؛ در نتیجه مشمول است.
endDateLike | NoneNoneانتهای بازه؛ در نتیجه مشمول است.
calendarCalendar'gregorian'auto only in simple aliases: 1200..1599 Jalali, 1800..2199 Gregorian; ambiguous/mixed years rejected. Low-level get_* retains explicit Gregorian/Jalali defaults.
adjustmentstr'none'Only 'none' is implemented; 'source' raises UnsupportedCapabilityError, never a fabricated adjusted series.
seriesstr'listing'Only 'listing' is implemented. 'continuous_verified' requires a verified historical identity chain.
as_ofdatetime | NoneNoneTimezone-aware cutoff for locally stored history; online historical reconstruction is not implemented.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.
include_jdateboolFalseAdd a textual Jalali date column. It does not change the primary Gregorian date column.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError, UnsupportedCapabilityError, PointInTimeUnavailableError, CoverageError

get_history_many

Bounded sequential batch. Each input, even repeated/empty, gets a report row.

get_history_many(instruments: 'Sequence[InstrumentLike] | pd.Series | pd.Index | np.ndarray', *, start: 'DateLike | None' = None, end: 'DateLike | None' = None, calendar: 'Calendar' = 'gregorian', adjustment: 'str' = 'none', on_error: 'str' = 'raise', policy: 'FetchPolicy | str | None' = None, include_jdate: 'bool' = False) -> 'BatchFrames'

Output: BatchFrames

ParameterTypeDefaultDescription
instrumentsSequence[InstrumentLike] | pd.Series | pd.Index | np.ndarrayrequiredNonempty ordered list/tuple, Pandas Series/Index or a one-dimensional NumPy array. Duplicates preserved; nulls rejected.
startDateLike | NoneNoneابتدای بازه؛ در نتیجه مشمول است.
endDateLike | NoneNoneانتهای بازه؛ در نتیجه مشمول است.
calendarCalendar'gregorian'auto only in simple aliases: 1200..1599 Jalali, 1800..2199 Gregorian; ambiguous/mixed years rejected. Low-level get_* retains explicit Gregorian/Jalali defaults.
adjustmentstr'none'Only 'none' is implemented; 'source' raises UnsupportedCapabilityError, never a fabricated adjusted series.
on_errorstr'raise''raise' stops with partial_result; 'collect' records errors without losing other inputs.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.
include_jdateboolFalseAdd a textual Jalali date column. It does not change the primary Gregorian date column.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError, UnsupportedCapabilityError, PointInTimeUnavailableError, CoverageError, BatchDataError

iter_history

Yield local calendar chunks. The underlying full HTTP response is NOT streamed. Skips chunks without rows; yields one typed empty frame if the whole selected range is empty. Each frame records its actual and chunk range.

iter_history(instrument: 'InstrumentLike', *, start: 'DateLike', end: 'DateLike', calendar: 'Calendar' = 'gregorian', adjustment: 'str' = 'none', chunk_days: 'int' = 366, policy: 'FetchPolicy | str | None' = None, include_jdate: 'bool' = False) -> 'Iterator[pd.DataFrame]'

Output: Iterator[pd.DataFrame]

ParameterTypeDefaultDescription
instrumentInstrumentLikerequiredSymbol string or explicit InstrumentRef. A bare numeric string is not inferred as ins_code.
startDateLikerequiredابتدای بازه؛ در نتیجه مشمول است.
endDateLikerequiredانتهای بازه؛ در نتیجه مشمول است.
calendarCalendar'gregorian'auto only in simple aliases: 1200..1599 Jalali, 1800..2199 Gregorian; ambiguous/mixed years rejected. Low-level get_* retains explicit Gregorian/Jalali defaults.
adjustmentstr'none'Only 'none' is implemented; 'source' raises UnsupportedCapabilityError, never a fabricated adjusted series.
chunk_daysint366Positive calendar-day span for local output chunks. Not server-side streaming or pagination.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.
include_jdateboolFalseAdd a textual Jalali date column. It does not change the primary Gregorian date column.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError

to_gregorian

to_gregorian(value: 'DateLike', *, calendar: 'Calendar' = 'jalali') -> 'date'

Output: date

ParameterTypeDefaultDescription
valueDateLikerequiredInput date or identifier; use the documented constructor to state its kind.
calendarCalendar'jalali'auto only in simple aliases: 1200..1599 Jalali, 1800..2199 Gregorian; ambiguous/mixed years rejected. Low-level get_* retains explicit Gregorian/Jalali defaults.

Errors: InvalidArgumentError

to_jalali

to_jalali(value: 'DateLike') -> 'str'

Output: str

ParameterTypeDefaultDescription
valueDateLikerequiredInput date or identifier; use the documented constructor to state its kind.

Errors: InvalidArgumentError

capabilities

Return the implemented, conditional and deferred capability matrix. A source-reviewed endpoint is not a live-service guarantee.

capabilities() -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription

Errors: InvalidArgumentError, DataQualityError, StorageError (explicit I/O)

storage_status

Return in-memory storage counters without querying the database. Queued work is not durable until committed.

storage_status() -> 'StorageStatus'

Output: StorageStatus

ParameterTypeDefaultDescription

Errors: InvalidArgumentError, DataQualityError, StorageError (explicit I/O)

get_write_receipt

Read the receipt status for this process. Unknown IDs raise UnknownReceiptError. A queued receipt does not prove disk durability.

get_write_receipt(receipt_id: 'str') -> 'WriteReceipt'

Output: WriteReceipt

ParameterTypeDefaultDescription
receipt_idstrrequiredReceipt identifier created in this running process, not a reusable authentication token.

Errors: UnknownReceiptError

flush

Explicitly wait up to timeout seconds for queued persistence. With raise_on_error=True incomplete or failed storage raises StorageError/StorageFlushTimeout. Normal automatic saving never waits for this call.

flush(*, timeout: 'float' = 5.0, raise_on_error: 'bool' = True) -> 'FlushReport'

Output: FlushReport

ParameterTypeDefaultDescription
timeoutfloat5.0Bounded seconds for the explicit storage wait; not an exchange availability guarantee.
raise_on_errorboolTrueWhether detected errors should raise instead of only returning a report.

Errors: StorageError, StorageFlushTimeout, ConfigurationError

close

Close the default client. Explicitly flush first to require durable writes. The selected configuration is retained; configure() can replace it after close.

close(*, flush_timeout: 'float' = 1.0) -> 'FlushReport'

Output: FlushReport

ParameterTypeDefaultDescription
flush_timeoutfloat1.0Maximum seconds to attempt flushing on close; inspect the returned complete flag.

Errors: ConfigurationError

get_quote_frame

A one-row Pandas quote with the same checks as get_quote; no second HTTP call.

get_quote_frame(instrument: 'InstrumentLike', *, freshness: 'FreshnessPolicy | None' = None, policy: 'FetchPolicy | str | None' = None) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
instrumentInstrumentLikerequiredSymbol string or explicit InstrumentRef. A bare numeric string is not inferred as ins_code.
freshnessFreshnessPolicy | NoneNoneExplicit FreshnessPolicy, with precedence over policy freshness for quotes.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError

get_instrument_frame

Resolve exactly one instrument and return its typed one-row DataFrame.

get_instrument_frame(instrument: 'InstrumentLike', *, market: 'Market | None' = None, as_of: 'date | None' = None, known_at: 'datetime | None' = None, policy: 'FetchPolicy | str | None' = None) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
instrumentInstrumentLikerequiredSymbol string or explicit InstrumentRef. A bare numeric string is not inferred as ins_code.
marketMarket | NoneNoneTSE/IFB/BASE enum or documented string. Support depends on endpoint; index/overview support TSE/IFB only. None never certifies historical coverage.
as_ofdate | NoneNoneReserved economic identity date; historical identity lookup is explicitly unsupported.
known_atdatetime | NoneNoneHistorical identity knowledge cutoff; reserved and explicitly rejected in this release.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError

configure

Configure the lazy module-level client without HTTP or creating a database. Call before using data.get_*; if a default client already exists, close it explicitly with data.close() first. This avoids silently losing queued work or changing the configuration of an in-flight request. Omitted settings use ClientConfig defaults (or the explicitly supplied config).

configure(config: 'ClientConfig | None' = None, *, source: 'str | None' = None, mode: 'str | None' = None, storage: 'bool | None' = None, data_dir: 'str | Path | None' = None, numeric: 'str | None' = None) -> 'ClientConfig'

Output: ClientConfig

ParameterTypeDefaultDescription
configClientConfig | NoneNoneImmutable ClientConfig; supplied constructor overrides take precedence.
sourcestr | NoneNoneget_futures uses explicitly identified separate tse_exchange gateway. Not an authenticated TSETMC provider.
modestr | NoneNoneauto/online/offline; fresh cached responses may be reused in online. FetchPolicy.fresh() bypasses the cache.
storagebool | NoneNoneBoolean enabling the default best-effort local response storage, or None to use config.
data_dirstr | Path | NoneNoneDirectory containing dara.sqlite3. Does not move or delete old databases.
numericstr | NoneNone'analysis' gives nullable Float64; 'exact' uses Decimal for price/quantity fields. Identifiers always remain text.

Errors: ConfigurationError

get_config

Return immutable default settings without creating a Client or any I/O.

get_config() -> 'ClientConfig'

Output: ClientConfig

ParameterTypeDefaultDescription

Errors: InvalidArgumentError, DataQualityError, StorageError (explicit I/O)

save

Save a self-describing snapshot; return only after successful commit. ``metadata=False`` omits df.attrs, not structural type/checksum information. MultiIndex/unsupported object values are rejected. No network requests. CSV + sidecar replace is not one filesystem transaction: a crash between replacements is detected by load's SHA256 check, never silently accepted.

save(df: 'pd.DataFrame', path: 'str | Path', *, format: 'str | None' = None, dataset: 'str' = 'user_data', metadata: 'bool' = True, overwrite: 'bool' = False, safe_text: 'bool' = True) -> 'WriteReceipt'

Output: WriteReceipt

ParameterTypeDefaultDescription
dfpd.DataFramerequiredAn ordinary Pandas DataFrame; input is never modified in place by local helpers.
pathstr | PathrequiredNonempty path string or pathlib.Path, not the working cache database for archive exports.
formatstr | NoneNonecsv/excel/parquet/sqlite, or None to infer from the supported file suffix.
datasetstr'user_data'history, client_types, trades, order_book_history, adjustments, shares, dividends, disclosures, messages, quotes, shareholders.
metadataboolTrueKeep dataframe attrs as well as structural schema; False omits attrs, not required type/checksum metadata.
overwriteboolFalseExplicit permission to replace the named output only. Active working database is never an archive destination.
safe_textboolTrueProtect dangerous formula-like text on export; decoding reverses the protection.

Errors: InvalidArgumentError, FileExistsDataError, StorageError, OptionalDependencyError

load

Read a Dara archive and verify its structure/content. This is not a signature. For arbitrary externally-created files use pandas readers, then validate. ``verify=False`` allows deliberate value edits, not code execution or a different schema. CSV still requires its sidecar for dtype restoration.

load(path: 'str | Path', *, format: 'str | None' = None, dataset: 'str' = 'user_data', schema=None, verify: 'bool' = True) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
pathstr | PathrequiredNonempty path string or pathlib.Path, not the working cache database for archive exports.
formatstr | NoneNonecsv/excel/parquet/sqlite, or None to infer from the supported file suffix.
datasetstr'user_data'history, client_types, trades, order_book_history, adjustments, shares, dividends, disclosures, messages, quotes, shareholders.
schemaobject | NoneNoneName of an implemented structural schema. For load, this argument remains reserved; use None.
verifyboolTrueCheck archive checksums and structure. Not a cryptographic signature of a trusted sender.

Errors: InvalidArgumentError, StorageError, OptionalDependencyError

sync_history

Explicit reconciliation into the local history index. full=True rechecks old corrections; overlap_days controls the tail window. wait=True may wait for storage. on_storage_error=report preserves fetched data with failure information; raise demands success. SyncResult.data is only this fetch, not the whole database.

sync_history(instrument: 'InstrumentLike', *, full: 'bool' = False, overlap_days: 'int' = 14, full_refresh_days: 'float' = 7, wait: 'bool' = True, timeout: 'float' = 30.0, on_storage_error: 'str' = 'report') -> 'SyncResult'

Output: SyncResult

ParameterTypeDefaultDescription
instrumentInstrumentLikerequiredSymbol string or explicit InstrumentRef. A bare numeric string is not inferred as ins_code.
fullboolFalseForce a full source-history recheck instead of the calculated tail request.
overlap_daysint14Positive calendar-day overlap window for rechecking recent corrections.
full_refresh_daysfloat7After this many days since a full fetch, the next explicit sync performs a full audit. No scheduler.
waitboolTrueWait for storage only in explicit sync. False may return queued state, not durable data.
timeoutfloat30.0Bounded seconds for the explicit storage wait; not an exchange availability guarantee.
on_storage_errorstr'report''report' retains downloaded data with a failure report; 'raise' requires successful explicit storage.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError

load_stored_history

Read the versioned local history index; never sends HTTP. Dates are inclusive. as_of is a local observation/commit cutoff, not proof of historical public availability. Raises OfflineDataUnavailableError when no usable indexed data exists.

load_stored_history(instrument: 'InstrumentLike', *, start: 'DateLike | None' = None, end: 'DateLike | None' = None, calendar: 'Calendar' = 'gregorian', include_jdate: 'bool' = False, as_of: 'datetime | None' = None) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
instrumentInstrumentLikerequiredSymbol string or explicit InstrumentRef. A bare numeric string is not inferred as ins_code.
startDateLike | NoneNoneابتدای بازه؛ در نتیجه مشمول است.
endDateLike | NoneNoneانتهای بازه؛ در نتیجه مشمول است.
calendarCalendar'gregorian'auto only in simple aliases: 1200..1599 Jalali, 1800..2199 Gregorian; ambiguous/mixed years rejected. Low-level get_* retains explicit Gregorian/Jalali defaults.
include_jdateboolFalseAdd a textual Jalali date column. It does not change the primary Gregorian date column.
as_ofdatetime | NoneNoneTimezone-aware cutoff for locally stored history; online historical reconstruction is not implemented.

Errors: OfflineDataUnavailableError, StorageError, InvalidArgumentError, AmbiguousInstrumentError

history_status

Return per-instrument counts, ranges and latest fetch state from the local index. Explicit disk read; no HTTP. Counts do not certify full market history.

history_status() -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription

Errors: StorageError

get_history_revisions

Return locally observed economic revisions in the requested inclusive range. This is local evidence, not all revisions ever published by the exchange.

get_history_revisions(instrument: 'InstrumentLike', *, start: 'DateLike | None' = None, end: 'DateLike | None' = None, calendar: 'Calendar' = 'gregorian') -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
instrumentInstrumentLikerequiredSymbol string or explicit InstrumentRef. A bare numeric string is not inferred as ins_code.
startDateLike | NoneNoneابتدای بازه؛ در نتیجه مشمول است.
endDateLike | NoneNoneانتهای بازه؛ در نتیجه مشمول است.
calendarCalendar'gregorian'auto only in simple aliases: 1200..1599 Jalali, 1800..2199 Gregorian; ambiguous/mixed years rejected. Low-level get_* retains explicit Gregorian/Jalali defaults.

Errors: StorageError, OfflineDataUnavailableError, InvalidArgumentError, UnsupportedCapabilityError, PointInTimeUnavailableError, CoverageError

reindex_history

Explicitly rebuild missing normalized history from cached responses of previous releases, without HTTP. Existing history is not deleted. Return a dictionary report; durable storage can raise StorageError.

reindex_history() -> 'dict'

Output: dict

ParameterTypeDefaultDescription

Errors: StorageError

schema_info

Return column names, expected dtypes and meanings for an implemented schema. Parameters ---------- schema : str, default 'daily_bars' One of daily_bars, quote, quotes.batch, instruments. numeric : {'analysis', 'exact'}, default 'analysis' Floating nullable columns or Decimal object columns for prices/quantities. Returns ------- pandas.DataFrame column, dtype, required, description. It is a description, not market data.

schema_info(schema: 'str' = 'daily_bars', *, numeric: 'str' = 'analysis') -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
schemastr'daily_bars'An implemented schema name returned by capabilities()/the dataset metadata; includes daily_bars, quote, market_watch, client_types, indices, index_history and related new schemas.
numericstr'analysis''analysis' gives nullable Float64; 'exact' uses Decimal for price/quantity fields. Identifiers always remain text.

Errors: InvalidArgumentError

validate_data

Report schema/value issues without changing data or contacting TSETMC. The report columns are severity, rule, column, count, row_positions, message. row_positions are zero-based positions (not possibly duplicated index labels). At most ten example positions are kept per rule. Warnings do not certify or invalidate financial truth. This function is NOT a point-in-time/leakage audit.

validate_data(df: 'pd.DataFrame', *, schema: 'str | None' = None, raise_on_error: 'bool' = False, check_order: 'bool' = True) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
dfpd.DataFramerequiredAn ordinary Pandas DataFrame; input is never modified in place by local helpers.
schemastr | NoneNoneAn implemented schema name returned by capabilities()/the dataset metadata; includes daily_bars, quote, market_watch, client_types, indices, index_history and related new schemas.
raise_on_errorboolFalseWhether detected errors should raise instead of only returning a report.
check_orderboolTrueReport ascending natural-key order violations without sorting input.

Errors: InvalidArgumentError, DataQualityError

normalize_data

Normalize only present known fields; never invent source/time/zero values. ``columns`` is an explicit old-name -> standard-name mapping. Date strings use the explicitly supplied calendar. Naive real timestamps require timezone. Floating-point identifiers are rejected even when they look integral: original digits may already be lost. Unknown columns are preserved, rows are not dropped, duplicate keys are left for validate_data(), and the input/index are preserved unless sort=True reorders rows. No investment calculation is performed.

normalize_data(df: 'pd.DataFrame', *, schema: 'str' = 'daily_bars', columns: 'Mapping[str, str] | None' = None, calendar: 'Calendar' = 'gregorian', numeric: 'str' = 'analysis', timezone: 'str | None' = None, sort: 'bool' = False) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
dfpd.DataFramerequiredAn ordinary Pandas DataFrame; input is never modified in place by local helpers.
schemastr'daily_bars'An implemented schema name returned by capabilities()/the dataset metadata; includes daily_bars, quote, market_watch, client_types, indices, index_history and related new schemas.
columnsMapping[str, str] | NoneNoneExplicit column names or supported presets. No silent dropping of unknown names.
calendarCalendar'gregorian'auto only in simple aliases: 1200..1599 Jalali, 1800..2199 Gregorian; ambiguous/mixed years rejected. Low-level get_* retains explicit Gregorian/Jalali defaults.
numericstr'analysis''analysis' gives nullable Float64; 'exact' uses Decimal for price/quantity fields. Identifiers always remain text.
timezonestr | NoneNoneExplicit timezone for otherwise-naive real timestamps. Daily dates remain timezone-naive.
sortboolFalseExplicitly reorder normalized rows by request_index/ins_code/date if present. No rows are dropped.

Errors: InvalidArgumentError

select_columns

Select explicit columns, or the documented 'compact'/'full' presentation. Compact output is a view for users, not a provenance-complete archive. Full metadata is copied, and any removed evidence columns are listed in it. Unknown/duplicate column names raise InvalidArgumentError instead of being ignored.

select_columns(df: 'pd.DataFrame', columns: 'Sequence[str] | str' = 'compact') -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
dfpd.DataFramerequiredAn ordinary Pandas DataFrame; input is never modified in place by local helpers.
columnsSequence[str] | str'compact'Explicit column names or supported presets. No silent dropping of unknown names.

Errors: InvalidArgumentError

frame_metadata

Return a deep copy of df.attrs['tse_dara']; absent evidence stays unknown.

frame_metadata(df: 'pd.DataFrame') -> 'dict'

Output: dict

ParameterTypeDefaultDescription
dfpd.DataFramerequiredAn ordinary Pandas DataFrame; input is never modified in place by local helpers.

Errors: InvalidArgumentError

api_reference

Return signatures, inputs, outputs, errors and dependencies for this release. name is an optional exact public function/class name. The catalog includes implemented API only; the HTML roadmap has separate not-yet-implemented plans.

api_reference(name: 'str | None' = None) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
namestr | NoneNoneOptional exact public API name to select from the installed reference.

Errors: InvalidArgumentError

validate

Roadmap-compatible validation entry point. Returns row_id, rule, severity, message and additional grouped diagnostic columns. A grouped issue may have no single row_id; count and row_positions then describe it. strict=True raises DataQualityError with this same report. This verifies a structural contract, not source correctness or completeness.

validate(df: 'pd.DataFrame', *, schema: 'str', strict: 'bool' = True) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
dfpd.DataFramerequiredAn ordinary Pandas DataFrame; input is never modified in place by local helpers.
schemastrrequiredAn implemented schema name returned by capabilities()/the dataset metadata; includes daily_bars, quote, market_watch, client_types, indices, index_history and related new schemas.
strictboolTrueValidated setting; see the constructor docstring and configuration source.

Errors: InvalidArgumentError, DataQualityError

normalize

Roadmap normalization entry point for already canonical column names. source='canonical' is the currently reviewed mapping. Raw external API mappings are not inferred; use normalize_data(columns=...) for an explicit user mapping and then validate it. All unknown sources fail explicitly.

normalize(df: 'pd.DataFrame', *, schema: 'str', source: 'str', strict: 'bool' = True) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
dfpd.DataFramerequiredAn ordinary Pandas DataFrame; input is never modified in place by local helpers.
schemastrrequiredName of an implemented structural schema. For load, this argument remains reserved; use None.
sourcestrrequiredget_futures uses explicitly identified separate tse_exchange gateway. Not an authenticated TSETMC provider.
strictboolTrueValidated setting; see the constructor docstring and configuration source.

Errors: InvalidArgumentError, DataQualityError, UnsupportedCapabilityError

load_sample

Load explicit synthetic data with no database access or real network. Names: daily_prices_v1, quote_v1, market_watch_v1, client_types_v1, indices_v1 and index_history_v1. These are teaching/test values, never current market prices, and they cannot become live data through fallback.

load_sample(name: 'str' = 'daily_prices_v1') -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
namestr'daily_prices_v1'Synthetic fixture: daily_prices_v1, quote_v1, market_watch_v1, client_types_v1, indices_v1 or index_history_v1.

Errors: InvalidArgumentError

get_market_watch

Return the current public market watch as a typed DataFrame. auto falls back to the reviewed legacy text route only when JSON returns a valid empty list. Optional books and client types retain independent provenance; rows are not an atomic snapshot. Empty is not proof of a closed market.

get_market_watch(*, market: 'Market | str | None' = None, include_order_book: 'bool' = False, include_client_types: 'bool' = False, show_traded: 'bool' = False, backend: 'str' = 'auto', policy: 'FetchPolicy | str | None' = None) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
marketMarket | str | NoneNoneTSE/IFB/BASE enum or documented string. Support depends on endpoint; index/overview support TSE/IFB only. None never certifies historical coverage.
include_order_bookboolFalseAdd reported depth 1..5 columns with separate provenance; no forward fill.
include_client_typesboolFalseFetch and join a separate bulk response by exact ID; timestamps may be absent/different.
show_tradedboolFalseReturn only rows with a reported positive trade_count. Unknown is not treated as proof of no trading.
backendstr'auto'auto/json/legacy; auto uses legacy only after valid empty JSON, not after auth/HTTP/schema errors.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError, UnsupportedCapabilityError, PointInTimeUnavailableError, CoverageError

get_market_order_book

Return reported best-limit levels for the current watch. This is not the full exchange order book or historical depth. Missing levels are not filled. Source timestamps not reported by the feed remain missing.

get_market_order_book(*, market: 'Market | str | None' = None, backend: 'str' = 'auto', policy: 'FetchPolicy | str | None' = None) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
marketMarket | str | NoneNoneTSE/IFB/BASE enum or documented string. Support depends on endpoint; index/overview support TSE/IFB only. None never certifies historical coverage.
backendstr'auto'auto/json/legacy; auto uses legacy only after valid empty JSON, not after auth/HTTP/schema errors.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError, UnsupportedCapabilityError, PointInTimeUnavailableError, CoverageError

get_market_overview

Return one row of reported market totals and index values. TSE or IFB only. Activity time and overall data time remain separate.

get_market_overview(*, market: 'Market | str' = <Market.TSE: 'TSE'>, policy: 'FetchPolicy | str | None' = None) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
marketMarket | str<Market.TSE: 'TSE'>TSE/IFB/BASE enum or documented string. Support depends on endpoint; index/overview support TSE/IFB only. None never certifies historical coverage.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError, UnsupportedCapabilityError, PointInTimeUnavailableError, CoverageError

get_market_map

Return the reported market-map data only; no drawing or computed ranking. The source size parameter can truncate output; coverage is not certified.

get_market_map(*, sector_code: 'str | None' = None, limit: 'int' = 9999, policy: 'FetchPolicy | str | None' = None) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
sector_codestr | NoneNoneExact short sector code returned by get_sectors(), preserving leading zeros.
limitint9999Positive cap. For download_market at most 10000 entries; default 100 and request budget still applies.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError, UnsupportedCapabilityError, PointInTimeUnavailableError, CoverageError

get_sectors

Return sector codes/names with the four source counters preserved as source_c1..source_c4. Their undocumented bucket meanings are not guessed.

get_sectors(*, policy: 'FetchPolicy | str | None' = None) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError

get_sector_instruments

Return current related-company quotes for an exact sector code. This is industry grouping, not evidence of corporate ownership.

get_sector_instruments(sector_code: 'str', *, policy: 'FetchPolicy | str | None' = None) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
sector_codestrrequiredExact short sector code returned by get_sectors(), preserving leading zeros.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError

get_key_statistics

Return all reported parameter-code/value pairs (potentially a large response). ins_code filtering is local after the bulk response. reported_value stays text: undocumented units and metrics are not guessed.

get_key_statistics(*, ins_code: 'str | int | None' = None, policy: 'FetchPolicy | str | None' = None) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
ins_codestr | int | NoneNoneExact positive integer identifier; on bulk key statistics this is a local filter.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError

get_client_types

Return latest or one specified day of natural/legal counts, volumes and reported values as a DataFrame. Missing values and dates are not inferred. DDD source fields are kept separate from individual/institutional.

get_client_types(instrument: 'InstrumentLike', *, day: 'DateLike | None' = None, calendar: 'Calendar' = 'gregorian', include_jdate: 'bool' = False, policy: 'FetchPolicy | str | None' = None) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
instrumentInstrumentLikerequiredSymbol string or explicit InstrumentRef. A bare numeric string is not inferred as ins_code.
dayDateLike | NoneNoneOptional explicit single Gregorian/Jalali day; latest intraday index endpoint only supports None.
calendarCalendar'gregorian'auto only in simple aliases: 1200..1599 Jalali, 1800..2199 Gregorian; ambiguous/mixed years rejected. Low-level get_* retains explicit Gregorian/Jalali defaults.
include_jdateboolFalseAdd a textual Jalali date column. It does not change the primary Gregorian date column.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError, UnsupportedCapabilityError, PointInTimeUnavailableError, CoverageError

get_client_type_history

Return full available client-type history, then filter locally to inclusive dates, sorted ascending. Current identity does not certify historical identity or point-in-time availability.

get_client_type_history(instrument: 'InstrumentLike', *, start: 'DateLike | None' = None, end: 'DateLike | None' = None, calendar: 'Calendar' = 'gregorian', include_jdate: 'bool' = False, policy: 'FetchPolicy | str | None' = None) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
instrumentInstrumentLikerequiredSymbol string or explicit InstrumentRef. A bare numeric string is not inferred as ins_code.
startDateLike | NoneNoneابتدای بازه؛ در نتیجه مشمول است.
endDateLike | NoneNoneانتهای بازه؛ در نتیجه مشمول است.
calendarCalendar'gregorian'auto only in simple aliases: 1200..1599 Jalali, 1800..2199 Gregorian; ambiguous/mixed years rejected. Low-level get_* retains explicit Gregorian/Jalali defaults.
include_jdateboolFalseAdd a textual Jalali date column. It does not change the primary Gregorian date column.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError, UnsupportedCapabilityError, PointInTimeUnavailableError, CoverageError

get_market_client_types

Return the bulk client-type response. With market selected, intersect with current watch identities (one extra component); without a filter, keep every returned ins_code. No date/value/market is guessed when absent.

get_market_client_types(*, market: 'Market | str | None' = None, backend: 'str' = 'auto', policy: 'FetchPolicy | str | None' = None) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
marketMarket | str | NoneNoneTSE/IFB/BASE enum or documented string. Support depends on endpoint; index/overview support TSE/IFB only. None never certifies historical coverage.
backendstr'auto'auto/json/legacy; auto uses legacy only after valid empty JSON, not after auth/HTTP/schema errors.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError, UnsupportedCapabilityError, PointInTimeUnavailableError, CoverageError

get_indices

Return index codes, names and latest reported values. market=None explicitly requests TSE and IFB catalogs separately. Unit is points, never currency.

get_indices(*, market: 'Market | str | None' = <Market.TSE: 'TSE'>, policy: 'FetchPolicy | str | None' = None) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
marketMarket | str | None<Market.TSE: 'TSE'>TSE/IFB/BASE enum or documented string. Support depends on endpoint; index/overview support TSE/IFB only. None never certifies historical coverage.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError

search_indices

Search normalized current index names; never choose the first match implicitly. A local limit does not change server pagination.

search_indices(query: 'str', *, market: 'Market | str | None' = <Market.TSE: 'TSE'>, limit: 'int | None' = None, policy: 'FetchPolicy | str | None' = None) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
querystrrequiredNonempty text to search. Search does not guess which result the user meant.
marketMarket | str | None<Market.TSE: 'TSE'>TSE/IFB/BASE enum or documented string. Support depends on endpoint; index/overview support TSE/IFB only. None never certifies historical coverage.
limitint | NoneNonePositive cap. For download_market at most 10000 entries; default 100 and request budget still applies.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError, UnsupportedCapabilityError, PointInTimeUnavailableError, CoverageError

get_index

Resolve exactly one index from the current catalog by exact name or code, returning a one-row DataFrame. Ambiguous names raise. Use get_indices(market=None) to inspect available codes.

get_index(index: 'str | int | InstrumentRef', *, market: 'Market | str | None' = <Market.TSE: 'TSE'>, policy: 'FetchPolicy | str | None' = None) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
indexstr | int | InstrumentRefrequiredExact index code (string/int/InstrumentRef) or exact normalized catalog name. No first-match guess.
marketMarket | str | None<Market.TSE: 'TSE'>TSE/IFB/BASE enum or documented string. Support depends on endpoint; index/overview support TSE/IFB only. None never certifies historical coverage.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError, UnsupportedCapabilityError, PointInTimeUnavailableError, CoverageError

get_index_history

Return daily index close/high/low in points, ascending with inclusive date filtering. Open and volume are not invented. A full response is fetched before local filtering.

get_index_history(index: 'str | int | InstrumentRef', *, market: 'Market | str | None' = <Market.TSE: 'TSE'>, start: 'DateLike | None' = None, end: 'DateLike | None' = None, calendar: 'Calendar' = 'gregorian', include_jdate: 'bool' = False, policy: 'FetchPolicy | str | None' = None) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
indexstr | int | InstrumentRefrequiredExact index code (string/int/InstrumentRef) or exact normalized catalog name. No first-match guess.
marketMarket | str | None<Market.TSE: 'TSE'>TSE/IFB/BASE enum or documented string. Support depends on endpoint; index/overview support TSE/IFB only. None never certifies historical coverage.
startDateLike | NoneNoneابتدای بازه؛ در نتیجه مشمول است.
endDateLike | NoneNoneانتهای بازه؛ در نتیجه مشمول است.
calendarCalendar'gregorian'auto only in simple aliases: 1200..1599 Jalali, 1800..2199 Gregorian; ambiguous/mixed years rejected. Low-level get_* retains explicit Gregorian/Jalali defaults.
include_jdateboolFalseAdd a textual Jalali date column. It does not change the primary Gregorian date column.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError, UnsupportedCapabilityError, PointInTimeUnavailableError, CoverageError

get_index_intraday

Return index observations for the latest session available from the public endpoint. day=None only; selecting a historical session is not supported and raises before HTTP. Equal-time points preserve source order.

get_index_intraday(index: 'str | int | InstrumentRef', *, market: 'Market | str | None' = <Market.TSE: 'TSE'>, day: 'DateLike | None' = None, calendar: 'Calendar' = 'gregorian', include_jdate: 'bool' = False, policy: 'FetchPolicy | str | None' = None) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
indexstr | int | InstrumentRefrequiredExact index code (string/int/InstrumentRef) or exact normalized catalog name. No first-match guess.
marketMarket | str | None<Market.TSE: 'TSE'>TSE/IFB/BASE enum or documented string. Support depends on endpoint; index/overview support TSE/IFB only. None never certifies historical coverage.
dayDateLike | NoneNoneOptional explicit single Gregorian/Jalali day; latest intraday index endpoint only supports None.
calendarCalendar'gregorian'auto only in simple aliases: 1200..1599 Jalali, 1800..2199 Gregorian; ambiguous/mixed years rejected. Low-level get_* retains explicit Gregorian/Jalali defaults.
include_jdateboolFalseAdd a textual Jalali date column. It does not change the primary Gregorian date column.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError, UnsupportedCapabilityError, PointInTimeUnavailableError, CoverageError

get_index_members

Return current constituent quotes, not historical membership or index weights. as_of is unsupported and raises before HTTP. Quote dates are not membership effective dates.

get_index_members(index: 'str | int | InstrumentRef', *, market: 'Market | str | None' = <Market.TSE: 'TSE'>, as_of: 'DateLike | None' = None, policy: 'FetchPolicy | str | None' = None) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
indexstr | int | InstrumentRefrequiredExact index code (string/int/InstrumentRef) or exact normalized catalog name. No first-match guess.
marketMarket | str | None<Market.TSE: 'TSE'>TSE/IFB/BASE enum or documented string. Support depends on endpoint; index/overview support TSE/IFB only. None never certifies historical coverage.
as_ofDateLike | NoneNoneOnly None is supported; historical membership raises before HTTP.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError, UnsupportedCapabilityError, PointInTimeUnavailableError, CoverageError

get_index_impact

EXPERIMENTAL: fetch the reported total-market index-effect records and preserve every source field in source_fields. impact_points/unit remain unknown until the live economic mapping is verified. This does not compute index impact or address arbitrary indices.

get_index_impact(*, market: 'Market | str' = <Market.TSE: 'TSE'>, limit: 'int' = 7, policy: 'FetchPolicy | str | None' = None) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
marketMarket | str<Market.TSE: 'TSE'>TSE/IFB/BASE enum or documented string. Support depends on endpoint; index/overview support TSE/IFB only. None never certifies historical coverage.
limitint7Positive cap. For download_market at most 10000 entries; default 100 and request budget still applies.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError, UnsupportedCapabilityError, PointInTimeUnavailableError, CoverageError

watch_market

Yield freshly fetched full snapshots with bounded polling, not WebSocket deltas. A one-second local lower bound is not an exchange rate-limit promise. max_updates=None opts into indefinite polling. Cancel/close the iterator or interrupt execution to stop; exceptions propagate, no infinite retry.

watch_market(*, interval: 'float' = 10.0, max_updates: 'int | None' = 10, market: 'Market | str | None' = None, include_order_book: 'bool' = False, include_client_types: 'bool' = False, show_traded: 'bool' = False, backend: 'str' = 'auto') -> 'Iterator[pd.DataFrame]'

Output: Iterator[pd.DataFrame]

ParameterTypeDefaultDescription
intervalfloat10.0Polling sleep seconds after the previous returned snapshot; local minimum 1 second, not an exchange limit.
max_updatesint | None10Maximum yielded snapshots (default 10); None explicitly opts into indefinite polling.
marketMarket | str | NoneNoneTSE/IFB/BASE enum or documented string. Support depends on endpoint; index/overview support TSE/IFB only. None never certifies historical coverage.
include_order_bookboolFalseAdd reported depth 1..5 columns with separate provenance; no forward fill.
include_client_typesboolFalseFetch and join a separate bulk response by exact ID; timestamps may be absent/different.
show_tradedboolFalseReturn only rows with a reported positive trade_count. Unknown is not treated as proof of no trading.
backendstr'auto'auto/json/legacy; auto uses legacy only after valid empty JSON, not after auth/HTTP/schema errors.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError, UnsupportedCapabilityError, PointInTimeUnavailableError, CoverageError

get_client_types_many

Sequential ordered batch with data/errors/requests tables. Input duplicates and empty successes have separate request rows. on_error=raise includes partial_result; collect reports per-item errors without claiming completeness.

get_client_types_many(instruments: 'Sequence[InstrumentLike] | pd.Series | pd.Index | np.ndarray', *, day: 'DateLike | None' = None, calendar: 'Calendar' = 'gregorian', include_jdate: 'bool' = False, on_error: 'str' = 'raise', policy: 'FetchPolicy | str | None' = None) -> 'BatchFrames'

Output: BatchFrames

ParameterTypeDefaultDescription
instrumentsSequence[InstrumentLike] | pd.Series | pd.Index | np.ndarrayrequiredNonempty ordered list/tuple, Pandas Series/Index or a one-dimensional NumPy array. Duplicates preserved; nulls rejected.
dayDateLike | NoneNoneOptional explicit single Gregorian/Jalali day; latest intraday index endpoint only supports None.
calendarCalendar'gregorian'auto only in simple aliases: 1200..1599 Jalali, 1800..2199 Gregorian; ambiguous/mixed years rejected. Low-level get_* retains explicit Gregorian/Jalali defaults.
include_jdateboolFalseAdd a textual Jalali date column. It does not change the primary Gregorian date column.
on_errorstr'raise''raise' stops with partial_result; 'collect' records errors without losing other inputs.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError, UnsupportedCapabilityError, PointInTimeUnavailableError, CoverageError, BatchDataError

get_client_type_history_many

Sequential ordered batch with data/errors/requests tables. Input duplicates and empty successes have separate request rows. on_error=raise includes partial_result; collect reports per-item errors without claiming completeness.

get_client_type_history_many(instruments: 'Sequence[InstrumentLike] | pd.Series | pd.Index | np.ndarray', *, start: 'DateLike | None' = None, end: 'DateLike | None' = None, calendar: 'Calendar' = 'gregorian', include_jdate: 'bool' = False, on_error: 'str' = 'raise', policy: 'FetchPolicy | str | None' = None) -> 'BatchFrames'

Output: BatchFrames

ParameterTypeDefaultDescription
instrumentsSequence[InstrumentLike] | pd.Series | pd.Index | np.ndarrayrequiredNonempty ordered list/tuple, Pandas Series/Index or a one-dimensional NumPy array. Duplicates preserved; nulls rejected.
startDateLike | NoneNoneابتدای بازه؛ در نتیجه مشمول است.
endDateLike | NoneNoneانتهای بازه؛ در نتیجه مشمول است.
calendarCalendar'gregorian'auto only in simple aliases: 1200..1599 Jalali, 1800..2199 Gregorian; ambiguous/mixed years rejected. Low-level get_* retains explicit Gregorian/Jalali defaults.
include_jdateboolFalseAdd a textual Jalali date column. It does not change the primary Gregorian date column.
on_errorstr'raise''raise' stops with partial_result; 'collect' records errors without losing other inputs.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError, UnsupportedCapabilityError, PointInTimeUnavailableError, CoverageError, BatchDataError

get_index_history_many

Sequential ordered batch with data/errors/requests tables. Input duplicates and empty successes have separate request rows. on_error=raise includes partial_result; collect reports per-item errors without claiming completeness.

get_index_history_many(indices: 'Sequence[str | int | InstrumentRef] | pd.Series | pd.Index | np.ndarray', *, market: 'Market | str | None' = <Market.TSE: 'TSE'>, start: 'DateLike | None' = None, end: 'DateLike | None' = None, calendar: 'Calendar' = 'gregorian', include_jdate: 'bool' = False, on_error: 'str' = 'raise', policy: 'FetchPolicy | str | None' = None) -> 'BatchFrames'

Output: BatchFrames

ParameterTypeDefaultDescription
indicesSequence[str | int | InstrumentRef] | pd.Series | pd.Index | np.ndarrayrequiredOrdered index names/codes, including Series/Index or a one-dimensional array; duplicates preserved.
marketMarket | str | None<Market.TSE: 'TSE'>TSE/IFB/BASE enum or documented string. Support depends on endpoint; index/overview support TSE/IFB only. None never certifies historical coverage.
startDateLike | NoneNoneابتدای بازه؛ در نتیجه مشمول است.
endDateLike | NoneNoneانتهای بازه؛ در نتیجه مشمول است.
calendarCalendar'gregorian'auto only in simple aliases: 1200..1599 Jalali, 1800..2199 Gregorian; ambiguous/mixed years rejected. Low-level get_* retains explicit Gregorian/Jalali defaults.
include_jdateboolFalseAdd a textual Jalali date column. It does not change the primary Gregorian date column.
on_errorstr'raise''raise' stops with partial_result; 'collect' records errors without losing other inputs.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError, UnsupportedCapabilityError, PointInTimeUnavailableError, CoverageError, BatchDataError

Client

Identity, quotes and raw daily history client. Construct freely; close explicitly or use ``with``. Part 3 adds file interchange and local reconciliation; adjustments, analytics and ML remain deferred. ``transport`` is a test/development hook, not a TSETMC authentication mechanism. A Client is not intended for concurrent use from multiple OS threads.

Client(*, config: 'ClientConfig | None' = None, source: 'str | None' = None, mode: 'str | None' = None, storage: 'bool | None' = None, data_dir: 'str | Path | None' = None, numeric: 'str | None' = None, credentials=None, transport: 'httpx.BaseTransport | None' = None, _namespace: 'str' = 'public')

Output: Client

ParameterTypeDefaultDescription
configClientConfig | NoneNoneImmutable ClientConfig; supplied constructor overrides take precedence.
sourcestr | NoneNoneget_futures uses explicitly identified separate tse_exchange gateway. Not an authenticated TSETMC provider.
modestr | NoneNoneauto/online/offline; fresh cached responses may be reused in online. FetchPolicy.fresh() bypasses the cache.
storagebool | NoneNoneBoolean enabling the default best-effort local response storage, or None to use config.
data_dirstr | Path | NoneNoneDirectory containing dara.sqlite3. Does not move or delete old databases.
numericstr | NoneNone'analysis' gives nullable Float64; 'exact' uses Decimal for price/quantity fields. Identifiers always remain text.
credentialsobject | NoneNoneReserved for official provider; any non-None value is rejected.
transporthttpx.BaseTransport | NoneNoneExplicit HTTPX transport test hook. It must never be used as an auth workaround.
_namespacestr'public'Internal/testing cache namespace; normally leave unchanged.

Errors: ConfigurationError, UnsupportedCapabilityError

AsyncClient

Use within one event loop and async context manager. No hidden asyncio.run().

AsyncClient(*, config: 'ClientConfig | None' = None, source: 'str | None' = None, mode: 'str | None' = None, storage: 'bool | None' = None, data_dir: 'str | Path | None' = None, numeric: 'str | None' = None, credentials=None, transport: 'httpx.AsyncBaseTransport | None' = None, _namespace: 'str' = 'public')

Output: AsyncClient

ParameterTypeDefaultDescription
configClientConfig | NoneNoneImmutable ClientConfig; supplied constructor overrides take precedence.
sourcestr | NoneNoneget_futures uses explicitly identified separate tse_exchange gateway. Not an authenticated TSETMC provider.
modestr | NoneNoneauto/online/offline; fresh cached responses may be reused in online. FetchPolicy.fresh() bypasses the cache.
storagebool | NoneNoneBoolean enabling the default best-effort local response storage, or None to use config.
data_dirstr | Path | NoneNoneDirectory containing dara.sqlite3. Does not move or delete old databases.
numericstr | NoneNone'analysis' gives nullable Float64; 'exact' uses Decimal for price/quantity fields. Identifiers always remain text.
credentialsobject | NoneNoneReserved for official provider; any non-None value is rejected.
transporthttpx.AsyncBaseTransport | NoneNoneExplicit HTTPX transport test hook. It must never be used as an auth workaround.
_namespacestr'public'Internal/testing cache namespace; normally leave unchanged.

Errors: ConfigurationError, UnsupportedCapabilityError

ClientConfig

ClientConfig(*, source: "Literal['public', 'official']" = 'public', mode: "Literal['auto', 'online', 'offline']" = 'auto', storage: 'StorageConfig | None' = None, network: 'NetworkConfig | None' = None, numeric: "Literal['analysis', 'exact']" = 'analysis', timezone: 'str' = 'Asia/Tehran', strict_schema: 'bool' = True)

ClientConfig(*, source: "Literal['public', 'official']" = 'public', mode: "Literal['auto', 'online', 'offline']" = 'auto', storage: 'StorageConfig | None' = None, network: 'NetworkConfig | None' = None, numeric: "Literal['analysis', 'exact']" = 'analysis', timezone: 'str' = 'Asia/Tehran', strict_schema: 'bool' = True) -> None

Output: None

ParameterTypeDefaultDescription
sourceLiteral['public', 'official']'public'get_futures uses explicitly identified separate tse_exchange gateway. Not an authenticated TSETMC provider.
modeLiteral['auto', 'online', 'offline']'auto'auto/online/offline; fresh cached responses may be reused in online. FetchPolicy.fresh() bypasses the cache.
storageStorageConfig | NoneNoneBoolean enabling the default best-effort local response storage, or None to use config.
networkNetworkConfig | NoneNoneenvironment/direct/auto. direct is explicit and retains TLS verification; auto tests environment and tries direct only with permission.
numericLiteral['analysis', 'exact']'analysis''analysis' gives nullable Float64; 'exact' uses Decimal for price/quantity fields. Identifiers always remain text.
timezonestr'Asia/Tehran'Explicit timezone for otherwise-naive real timestamps. Daily dates remain timezone-naive.
strict_schemaboolTrueValidated setting; see the constructor docstring and configuration source.

Errors: ConfigurationError

NetworkConfig

NetworkConfig(*, connect_timeout: 'float' = 5.0, read_timeout: 'float' = 20.0, operation_timeout: 'float' = 60.0, max_concurrency: 'int' = 4, max_retries: 'int' = 2, requests_per_second: 'float' = 0.5, request_budget: 'int' = 100, max_response_bytes: 'int' = 33554432, trust_env: 'bool' = True)

NetworkConfig(*, connect_timeout: 'float' = 5.0, read_timeout: 'float' = 20.0, operation_timeout: 'float' = 60.0, max_concurrency: 'int' = 4, max_retries: 'int' = 2, requests_per_second: 'float' = 0.5, request_budget: 'int' = 100, max_response_bytes: 'int' = 33554432, trust_env: 'bool' = True) -> None

Output: None

ParameterTypeDefaultDescription
connect_timeoutfloat5.0Validated setting; see the constructor docstring and configuration source.
read_timeoutfloat20.0Validated setting; see the constructor docstring and configuration source.
operation_timeoutfloat60.0Validated setting; see the constructor docstring and configuration source.
max_concurrencyint4Validated setting; see the constructor docstring and configuration source.
max_retriesint2Validated setting; see the constructor docstring and configuration source.
requests_per_secondfloat0.5Validated setting; see the constructor docstring and configuration source.
request_budgetint100Validated setting; see the constructor docstring and configuration source.
max_response_bytesint33554432Validated setting; see the constructor docstring and configuration source.
trust_envboolTrueValidated setting; see the constructor docstring and configuration source.

Errors: ConfigurationError

StorageConfig

StorageConfig(*, enabled: 'bool' = True, backend: "Literal['sqlite']" = 'sqlite', path: 'str | Path | None' = None, queue_max_jobs: 'int' = 128, queue_max_bytes: 'int' = 67108864, queue_overflow: "Literal['drop_new']" = 'drop_new', read_timeout: 'float' = 0.05, offline_read_timeout: 'float' = 30.0, busy_timeout: 'float' = 0.1, failure_cooldown: 'float' = 60.0, raw_capture: 'bool' = True)

StorageConfig(*, enabled: 'bool' = True, backend: "Literal['sqlite']" = 'sqlite', path: 'str | Path | None' = None, queue_max_jobs: 'int' = 128, queue_max_bytes: 'int' = 67108864, queue_overflow: "Literal['drop_new']" = 'drop_new', read_timeout: 'float' = 0.05, offline_read_timeout: 'float' = 30.0, busy_timeout: 'float' = 0.1, failure_cooldown: 'float' = 60.0, raw_capture: 'bool' = True) -> None

Output: None

ParameterTypeDefaultDescription
enabledboolTrueValidated setting; see the constructor docstring and configuration source.
backendLiteral['sqlite']'sqlite'auto/json/legacy; auto uses legacy only after valid empty JSON, not after auth/HTTP/schema errors.
pathstr | Path | NoneNoneNonempty path string or pathlib.Path, not the working cache database for archive exports.
queue_max_jobsint128Validated setting; see the constructor docstring and configuration source.
queue_max_bytesint67108864Validated setting; see the constructor docstring and configuration source.
queue_overflowLiteral['drop_new']'drop_new'Validated setting; see the constructor docstring and configuration source.
read_timeoutfloat0.05Validated setting; see the constructor docstring and configuration source.
offline_read_timeoutfloat30.0Validated setting; see the constructor docstring and configuration source.
busy_timeoutfloat0.1Validated setting; see the constructor docstring and configuration source.
failure_cooldownfloat60.0Validated setting; see the constructor docstring and configuration source.
raw_captureboolTrueValidated setting; see the constructor docstring and configuration source.

Errors: ConfigurationError

FreshnessPolicy

FreshnessPolicy(*, max_age: 'timedelta | None' = None, allow_stale: 'bool' = False, max_stale: 'timedelta | None' = None, max_source_age: 'timedelta | None' = None)

FreshnessPolicy(*, max_age: 'timedelta | None' = None, allow_stale: 'bool' = False, max_stale: 'timedelta | None' = None, max_source_age: 'timedelta | None' = None) -> None

Output: None

ParameterTypeDefaultDescription
max_agetimedelta | NoneNoneValidated setting; see the constructor docstring and configuration source.
allow_staleboolFalseExplicit permission to use old cached data; never relabels it as live.
max_staletimedelta | NoneNoneOptional nonnegative timedelta limiting age since response retrieval.
max_source_agetimedelta | NoneNoneValidated setting; see the constructor docstring and configuration source.

Errors: ConfigurationError

FetchPolicy

FetchPolicy(*, mode: "Literal['auto', 'online', 'offline'] | None" = None, freshness: 'FreshnessPolicy | None' = None, coverage: "Literal['raise', 'report']" = 'report', allow_official_offline: 'bool' = False)

FetchPolicy(*, mode: "Literal['auto', 'online', 'offline'] | None" = None, freshness: 'FreshnessPolicy | None' = None, coverage: "Literal['raise', 'report']" = 'report', allow_official_offline: 'bool' = False) -> None

Output: None

ParameterTypeDefaultDescription
modeLiteral['auto', 'online', 'offline'] | NoneNoneauto/online/offline; fresh cached responses may be reused in online. FetchPolicy.fresh() bypasses the cache.
freshnessFreshnessPolicy | NoneNoneExplicit FreshnessPolicy, with precedence over policy freshness for quotes.
coverageLiteral['raise', 'report']'report''report' preserves unknown/partial coverage; 'raise' requires the available evidence.
allow_official_offlineboolFalseValidated setting; see the constructor docstring and configuration source.

Errors: ConfigurationError

get_adjustments

Reported price-adjustment events and price ratios. Reasons and complete corporate-action coverage are unknown; this is not a total-return algorithm.

get_adjustments(instrument: 'InstrumentLike', *, start: 'DateLike | None' = None, end: 'DateLike | None' = None, calendar: 'Calendar' = 'gregorian', include_jdate: 'bool' = False, policy: 'FetchPolicy | str | None' = None) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
instrumentInstrumentLikerequiredSee function contract; parameter is validated before use.
startDateLike | NoneNoneابتدای بازه؛ در نتیجه مشمول است.
endDateLike | NoneNoneانتهای بازه؛ در نتیجه مشمول است.
calendarCalendar'gregorian'auto only in simple aliases: 1200..1599 Jalali, 1800..2199 Gregorian; ambiguous/mixed years rejected. Low-level get_* retains explicit Gregorian/Jalali defaults.
include_jdateboolFalseSee function contract; parameter is validated before use.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError, UnsupportedCapabilityError

get_share_capital_history

Reported old/new share counts, not legal capital-increase classifications. All observed rows are retained.

get_share_capital_history(instrument: 'InstrumentLike', *, start: 'DateLike | None' = None, end: 'DateLike | None' = None, calendar: 'Calendar' = 'gregorian', include_jdate: 'bool' = False, policy: 'FetchPolicy | str | None' = None) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
instrumentInstrumentLikerequiredSee function contract; parameter is validated before use.
startDateLike | NoneNoneابتدای بازه؛ در نتیجه مشمول است.
endDateLike | NoneNoneانتهای بازه؛ در نتیجه مشمول است.
calendarCalendar'gregorian'auto only in simple aliases: 1200..1599 Jalali, 1800..2199 Gregorian; ambiguous/mixed years rejected. Low-level get_* retains explicit Gregorian/Jalali defaults.
include_jdateboolFalseSee function contract; parameter is validated before use.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError, UnsupportedCapabilityError

get_dividends

Dividend history from the legacy text route. Payment/ex dates are not inferred; failed or HTML responses raise.

get_dividends(instrument: 'InstrumentLike', *, start: 'DateLike | None' = None, end: 'DateLike | None' = None, calendar: 'Calendar' = 'gregorian', include_jdate: 'bool' = False, policy: 'FetchPolicy | str | None' = None) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
instrumentInstrumentLikerequiredSee function contract; parameter is validated before use.
startDateLike | NoneNoneابتدای بازه؛ در نتیجه مشمول است.
endDateLike | NoneNoneانتهای بازه؛ در نتیجه مشمول است.
calendarCalendar'gregorian'auto only in simple aliases: 1200..1599 Jalali, 1800..2199 Gregorian; ambiguous/mixed years rejected. Low-level get_* retains explicit Gregorian/Jalali defaults.
include_jdateboolFalseSee function contract; parameter is validated before use.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError, UnsupportedCapabilityError

get_adjusted_history

Source-adjusted chart history, separate from raw history. Source method tsetmc_chart_a1; anchor is the last returned date. No total-return or point-in-time guarantee. Missing turnover/count/reference price stay missing.

get_adjusted_history(instrument: 'InstrumentLike', *, start: 'DateLike | None' = None, end: 'DateLike | None' = None, calendar: 'Calendar' = 'gregorian', include_jdate: 'bool' = False, policy: 'FetchPolicy | str | None' = None) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
instrumentInstrumentLikerequiredSee function contract; parameter is validated before use.
startDateLike | NoneNoneابتدای بازه؛ در نتیجه مشمول است.
endDateLike | NoneNoneانتهای بازه؛ در نتیجه مشمول است.
calendarCalendar'gregorian'auto only in simple aliases: 1200..1599 Jalali, 1800..2199 Gregorian; ambiguous/mixed years rejected. Low-level get_* retains explicit Gregorian/Jalali defaults.
include_jdateboolFalseSee function contract; parameter is validated before use.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError, UnsupportedCapabilityError

get_shareholders

Latest reported major shareholders. Empty does not prove that no major holders exist.

get_shareholders(instrument: 'InstrumentLike', *, policy: 'FetchPolicy | str | None' = None) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
instrumentInstrumentLikerequiredSee function contract; parameter is validated before use.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError, UnsupportedCapabilityError

get_shareholder_history

History of one holder of one instrument; holder_id comes from get_shareholders, not the holding_ref. days is 1..3650; date filtering is local.

get_shareholder_history(instrument: 'InstrumentLike', holder_id: 'str | int', *, days: 'int' = 90, start: 'DateLike | None' = None, end: 'DateLike | None' = None, calendar: 'Calendar' = 'gregorian', include_jdate: 'bool' = False, policy: 'FetchPolicy | str | None' = None) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
instrumentInstrumentLikerequiredSee function contract; parameter is validated before use.
holder_idstr | intrequiredExact shareholder identifier from get_shareholders(), not a holdings-row ID.
daysint90See function contract; parameter is validated before use.
startDateLike | NoneNoneابتدای بازه؛ در نتیجه مشمول است.
endDateLike | NoneNoneانتهای بازه؛ در نتیجه مشمول است.
calendarCalendar'gregorian'auto only in simple aliases: 1200..1599 Jalali, 1800..2199 Gregorian; ambiguous/mixed years rejected. Low-level get_* retains explicit Gregorian/Jalali defaults.
include_jdateboolFalseSee function contract; parameter is validated before use.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError, UnsupportedCapabilityError

get_disclosures

Disclosure metadata linked by TSETMC. Does not download or parse financial-statement attachments. limit is 1..1000; dates filter the returned subset only.

get_disclosures(instrument: 'InstrumentLike', *, limit: 'int' = 20, start: 'DateLike | None' = None, end: 'DateLike | None' = None, calendar: 'Calendar' = 'gregorian', include_jdate: 'bool' = False, policy: 'FetchPolicy | str | None' = None) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
instrumentInstrumentLikerequiredSee function contract; parameter is validated before use.
limitint20Positive cap. For download_market at most 10000 entries; default 100 and request budget still applies.
startDateLike | NoneNoneابتدای بازه؛ در نتیجه مشمول است.
endDateLike | NoneNoneانتهای بازه؛ در نتیجه مشمول است.
calendarCalendar'gregorian'auto only in simple aliases: 1200..1599 Jalali, 1800..2199 Gregorian; ambiguous/mixed years rejected. Low-level get_* retains explicit Gregorian/Jalali defaults.
include_jdateboolFalseSee function contract; parameter is validated before use.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError, UnsupportedCapabilityError

get_messages

Reported instrument supervisor messages, with source timestamp and original text.

get_messages(instrument: 'InstrumentLike', *, start: 'DateLike | None' = None, end: 'DateLike | None' = None, calendar: 'Calendar' = 'gregorian', include_jdate: 'bool' = False, policy: 'FetchPolicy | str | None' = None) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
instrumentInstrumentLikerequiredSee function contract; parameter is validated before use.
startDateLike | NoneNoneابتدای بازه؛ در نتیجه مشمول است.
endDateLike | NoneNoneانتهای بازه؛ در نتیجه مشمول است.
calendarCalendar'gregorian'auto only in simple aliases: 1200..1599 Jalali, 1800..2199 Gregorian; ambiguous/mixed years rejected. Low-level get_* retains explicit Gregorian/Jalali defaults.
include_jdateboolFalseSee function contract; parameter is validated before use.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError, UnsupportedCapabilityError

get_trades

Reported executions, current or per explicit calendar day. Same-second trades are not deduplicated. Cancellation remains unknown; only as_reported is supported. Max 31 days by default, configurable up to 366.

get_trades(instrument: 'InstrumentLike', *, day: 'DateLike | None' = None, start: 'DateLike | None' = None, end: 'DateLike | None' = None, calendar: 'Calendar' = 'gregorian', include_jdate: 'bool' = False, max_days: 'int' = 31, cancellation: 'str' = 'as_reported', policy: 'FetchPolicy | str | None' = None) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
instrumentInstrumentLikerequiredSee function contract; parameter is validated before use.
dayDateLike | NoneNoneSee function contract; parameter is validated before use.
startDateLike | NoneNoneابتدای بازه؛ در نتیجه مشمول است.
endDateLike | NoneNoneانتهای بازه؛ در نتیجه مشمول است.
calendarCalendar'gregorian'auto only in simple aliases: 1200..1599 Jalali, 1800..2199 Gregorian; ambiguous/mixed years rejected. Low-level get_* retains explicit Gregorian/Jalali defaults.
include_jdateboolFalseSee function contract; parameter is validated before use.
max_daysint31Maximum number of calendar dates requested by an intraday operation. Default31; up to366 configurable. No holiday inference.
cancellationstr'as_reported'as_reported only. Source cancellation semantics are not verified; no guessed cancellation filtering.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError, UnsupportedCapabilityError

get_order_book

Current reported best limits (up to five depths), not a full exchange order book. Missing source timestamps stay missing.

get_order_book(instrument: 'InstrumentLike', *, policy: 'FetchPolicy | str | None' = None) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
instrumentInstrumentLikerequiredSee function contract; parameter is validated before use.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError, UnsupportedCapabilityError

get_order_book_history

Historical best-limit updates. Sequence/reference and source position are preserved. No fill-forward or fictional complete snapshots; empty days do not prove holidays.

get_order_book_history(instrument: 'InstrumentLike', *, start: 'DateLike', end: 'DateLike | None' = None, calendar: 'Calendar' = 'gregorian', include_jdate: 'bool' = False, max_days: 'int' = 31, policy: 'FetchPolicy | str | None' = None) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
instrumentInstrumentLikerequiredSee function contract; parameter is validated before use.
startDateLikerequiredابتدای بازه؛ در نتیجه مشمول است.
endDateLike | NoneNoneانتهای بازه؛ در نتیجه مشمول است.
calendarCalendar'gregorian'auto only in simple aliases: 1200..1599 Jalali, 1800..2199 Gregorian; ambiguous/mixed years rejected. Low-level get_* retains explicit Gregorian/Jalali defaults.
include_jdateboolFalseSee function contract; parameter is validated before use.
max_daysint31Maximum number of calendar dates requested by an intraday operation. Default31; up to366 configurable. No holiday inference.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError, UnsupportedCapabilityError

get_instrument_states

Reported state/price-limit records for one day. No day means the last trading date reported by the quote, not today. Empty is not interpreted as open/unrestricted.

get_instrument_states(instrument: 'InstrumentLike', *, day: 'DateLike | None' = None, calendar: 'Calendar' = 'gregorian', include_jdate: 'bool' = False, policy: 'FetchPolicy | str | None' = None) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
instrumentInstrumentLikerequiredSee function contract; parameter is validated before use.
dayDateLike | NoneNoneSee function contract; parameter is validated before use.
calendarCalendar'gregorian'auto only in simple aliases: 1200..1599 Jalali, 1800..2199 Gregorian; ambiguous/mixed years rejected. Low-level get_* retains explicit Gregorian/Jalali defaults.
include_jdateboolFalseSee function contract; parameter is validated before use.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError, UnsupportedCapabilityError

get_thresholds

Reported state/price-limit records for one day. No day means the last trading date reported by the quote, not today. Empty is not interpreted as open/unrestricted.

get_thresholds(instrument: 'InstrumentLike', *, day: 'DateLike | None' = None, calendar: 'Calendar' = 'gregorian', include_jdate: 'bool' = False, policy: 'FetchPolicy | str | None' = None) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
instrumentInstrumentLikerequiredSee function contract; parameter is validated before use.
dayDateLike | NoneNoneSee function contract; parameter is validated before use.
calendarCalendar'gregorian'auto only in simple aliases: 1200..1599 Jalali, 1800..2199 Gregorian; ambiguous/mixed years rejected. Low-level get_* retains explicit Gregorian/Jalali defaults.
include_jdateboolFalseSee function contract; parameter is validated before use.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError, UnsupportedCapabilityError

get_boards

Board codes from the reviewed reference HTML table. A replaced page raises rather than returning a false empty registry.

get_boards(*, policy: 'FetchPolicy | str | None' = None) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError, UnsupportedCapabilityError

get_instruments

Current observed watch instrument list only. include_inactive=True and changed_since require a historical registry and raise; suspended instruments may still be in the current watch.

get_instruments(*, market: 'Market | str | None' = None, include_inactive: 'bool' = False, changed_since: 'DateLike | None' = None, backend: 'str' = 'auto', policy: 'FetchPolicy | str | None' = None) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
marketMarket | str | NoneNoneSee function contract; parameter is validated before use.
include_inactiveboolFalseOnly False is supported for the current-observed instrument list; True cannot be claimed from market watch.
changed_sinceDateLike | NoneNoneNot supported by the current-observed instrument list. Raises instead of inventing a historical registry.
backendstr'auto'See function contract; parameter is validated before use.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError, UnsupportedCapabilityError

get_funds

Registered funds by category name/code; None explicitly fetches the ten reviewed categories. registration_no is not an ins_code.

get_funds(category: 'str | None' = 'stock', *, policy: 'FetchPolicy | str | None' = None) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
categorystr | None'stock'stock/mixed/fixed/market_making/vc/reit/project/commodity/private/fund, corresponding code, or None for all configured categories.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError, UnsupportedCapabilityError

get_fund

Fund detail as a one-row frame with raw fields retained. Use the registration_no from get_funds.

get_fund(registration_no: 'str | int', *, policy: 'FetchPolicy | str | None' = None) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
registration_nostr | intrequiredExact fund registration number; not ins_code.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError, UnsupportedCapabilityError

get_fund_nav_history

Reported NAV stats; unit/currency not supplied by source remain unknown, not assumed from stock prices.

get_fund_nav_history(registration_no: 'str | int', *, start: 'DateLike | None' = None, end: 'DateLike | None' = None, calendar: 'Calendar' = 'gregorian', include_jdate: 'bool' = False, policy: 'FetchPolicy | str | None' = None) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
registration_nostr | intrequiredExact fund registration number; not ins_code.
startDateLike | NoneNoneابتدای بازه؛ در نتیجه مشمول است.
endDateLike | NoneNoneانتهای بازه؛ در نتیجه مشمول است.
calendarCalendar'gregorian'auto only in simple aliases: 1200..1599 Jalali, 1800..2199 Gregorian; ambiguous/mixed years rejected. Low-level get_* retains explicit Gregorian/Jalali defaults.
include_jdateboolFalseSee function contract; parameter is validated before use.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError, UnsupportedCapabilityError

get_options

Public option-chain pairs expanded into one row per put/call contract. Underlying filter is optional and local. No option pricing or inferred Greeks.

get_options(underlying: 'InstrumentLike | None' = None, *, policy: 'FetchPolicy | str | None' = None) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
underlyingInstrumentLike | NoneNoneOptional underlying instrument filter; does not value the options.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError, UnsupportedCapabilityError

get_futures

Current futures snapshot from the separate public tse.ir exchange gateway (not TSETMC CDN). Source must be tse_exchange. Fields with unverified meanings remain in source_fields. No history or commodity-exchange completeness guarantee.

get_futures(*, source: 'str' = 'tse_exchange', policy: 'FetchPolicy | str | None' = None) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
sourcestr'tse_exchange'get_futures uses explicitly identified separate tse_exchange gateway. Not an authenticated TSETMC provider.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError, UnsupportedCapabilityError

history

تاریخچه با رابط ساده و تقویم خودکار محدود.

history(instrument: 'InstrumentLike', *, start: 'DateLike | None' = None, end: 'DateLike | None' = None, calendar: 'str' = 'auto', adjustment: 'str' = 'none', include_jdate: 'bool' = False, policy: 'FetchPolicy | str | None' = None) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
instrumentInstrumentLikerequiredSee function contract; parameter is validated before use.
startDateLike | NoneNoneابتدای بازه؛ در نتیجه مشمول است.
endDateLike | NoneNoneانتهای بازه؛ در نتیجه مشمول است.
calendarstr'auto'auto only in simple aliases: 1200..1599 Jalali, 1800..2199 Gregorian; ambiguous/mixed years rejected. Low-level get_* retains explicit Gregorian/Jalali defaults.
adjustmentstr'none'See function contract; parameter is validated before use.
include_jdateboolFalseSee function contract; parameter is validated before use.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError, UnsupportedCapabilityError

market

Simple alias for get_market_watch; no financial analysis.

market(*, market: 'Market | str | None' = None, include_order_book: 'bool' = False, include_client_types: 'bool' = False, backend: 'str' = 'auto', policy: 'FetchPolicy | str | None' = None) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
marketMarket | str | NoneNoneSee function contract; parameter is validated before use.
include_order_bookboolFalseSee function contract; parameter is validated before use.
include_client_typesboolFalseSee function contract; parameter is validated before use.
backendstr'auto'See function contract; parameter is validated before use.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError, UnsupportedCapabilityError

index_history

Simple index-history alias with explicit auto-calendar policy.

index_history(index: 'str | int', *, start: 'DateLike | None' = None, end: 'DateLike | None' = None, calendar: 'str' = 'auto', include_jdate: 'bool' = False, market: 'Market | str | None' = <Market.TSE: 'TSE'>, policy: 'FetchPolicy | str | None' = None) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
indexstr | intrequiredSee function contract; parameter is validated before use.
startDateLike | NoneNoneابتدای بازه؛ در نتیجه مشمول است.
endDateLike | NoneNoneانتهای بازه؛ در نتیجه مشمول است.
calendarstr'auto'auto only in simple aliases: 1200..1599 Jalali, 1800..2199 Gregorian; ambiguous/mixed years rejected. Low-level get_* retains explicit Gregorian/Jalali defaults.
include_jdateboolFalseSee function contract; parameter is validated before use.
marketMarket | str | None<Market.TSE: 'TSE'>See function contract; parameter is validated before use.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError, UnsupportedCapabilityError

datasets

List locally stored response families, without HTTP.

datasets() -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription

Errors: InvalidArgumentError, DataQualityError, StorageError (explicit I/O)

storage_info

Inspect local storage health and file sizes, without HTTP.

storage_info() -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription

Errors: InvalidArgumentError, DataQualityError, StorageError (explicit I/O)

query

Read locally stored data only. Never a live request; cached results retain time and stale flags.

query(instrument: 'InstrumentLike', *, dataset: 'str' = 'history', start: 'DateLike | None' = None, end: 'DateLike | None' = None, calendar: 'str' = 'auto', include_jdate: 'bool' = False) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
instrumentInstrumentLikerequiredSee function contract; parameter is validated before use.
datasetstr'history'history, client_types, trades, order_book_history, adjustments, shares, dividends, disclosures, messages, quotes, shareholders.
startDateLike | NoneNoneابتدای بازه؛ در نتیجه مشمول است.
endDateLike | NoneNoneانتهای بازه؛ در نتیجه مشمول است.
calendarstr'auto'auto only in simple aliases: 1200..1599 Jalali, 1800..2199 Gregorian; ambiguous/mixed years rejected. Low-level get_* retains explicit Gregorian/Jalali defaults.
include_jdateboolFalseSee function contract; parameter is validated before use.

Errors: InvalidArgumentError, DataQualityError, StorageError (explicit I/O)

backup

پشتیبان سازگار SQLite با WAL؛ عملیات صریح.

backup(path: 'str | Path', *, overwrite: 'bool' = False, timeout: 'float' = 30.0, flush: 'bool' = True) -> 'dict'

Output: dict

ParameterTypeDefaultDescription
pathstr | PathrequiredSee function contract; parameter is validated before use.
overwriteboolFalseExplicit permission to replace the named output only. Active working database is never an archive destination.
timeoutfloat30.0See function contract; parameter is validated before use.
flushboolTrueWait for queued writes before an explicit backup. Backup itself is SQLite-consistent, including WAL.

Errors: InvalidArgumentError, DataQualityError, StorageError (explicit I/O)

download

دریافت گروهی، قابل ادامه و همراه گزارش خطا.

download(symbols, *, dataset: 'str' = 'history', start: 'DateLike | None' = None, end: 'DateLike | None' = None, calendar: 'str' = 'auto', update: 'bool' = True, store: 'bool | None' = None, on_error: 'str' = 'collect', checkpoint_dir: 'str | Path | None' = None, resume: 'bool' = True, resume_max_age: 'float' = 3600.0, include_jdate: 'bool' = False, progress=None, policy: 'FetchPolicy | str | None' = None) -> 'BatchFrames'

Output: BatchFrames(data: DataFrame, requests: DataFrame, errors: DataFrame, manifest: dict)

ParameterTypeDefaultDescription
symbolsInstrumentLike | Sequence[InstrumentLike] | pd.Series | pd.Indexrequiredنماد یا فهرست مرتب نمادها؛ Series/Index هم پذیرفته می‌شود.
datasetstr'history'history, client_types, trades, order_book_history, adjustments, shares, dividends, disclosures, messages, quotes, shareholders.
startDateLike | NoneNoneابتدای بازه؛ در نتیجه مشمول است.
endDateLike | NoneNoneانتهای بازه؛ در نتیجه مشمول است.
calendarstr'auto'auto only in simple aliases: 1200..1599 Jalali, 1800..2199 Gregorian; ambiguous/mixed years rejected. Low-level get_* retains explicit Gregorian/Jalali defaults.
updateboolTrueHistory only: use bounded tail/full refresh and the local revision repository when enabled. Other datasets refresh through their own cache rules.
storebool | NoneNoneNone uses Client setting; module facade may explicitly create a client with storage False/True. Client method must agree with its config.
on_errorstr'collect'See function contract; parameter is validated before use.
checkpoint_dirstr | Path | NoneNoneOptional directory for per-input typed snapshots and a resumable job journal. None disables checkpoints. Storage failure is reported, not a fake success.
resumeboolTrueReuse successfully persisted job items only while within resume_max_age; labeled as a cached snapshot, not refreshed data.
resume_max_agefloat3600.0Maximum checkpoint age in seconds; nonnegative. resume=False or policy=fresh() bypasses checkpoint reuse.
include_jdateboolFalseSee function contract; parameter is validated before use.
progressCallable[[dict], None] | NoneNoneOptional synchronous callback receiving a report dict after each input. No hidden UI, telemetry or scheduling.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError, UnsupportedCapabilityError

update

Update raw histories with overlap/correction handling. Default resume=False checks anew rather than reusing a job snapshot.

update(symbols, *, start: 'DateLike | None' = None, end: 'DateLike | None' = None, calendar: 'str' = 'auto', on_error: 'str' = 'collect', checkpoint_dir: 'str | Path | None' = None, resume: 'bool' = False, progress=None) -> 'BatchFrames'

Output: BatchFrames(data: DataFrame, requests: DataFrame, errors: DataFrame, manifest: dict)

ParameterTypeDefaultDescription
symbolsInstrumentLike | Sequence[InstrumentLike] | pd.Series | pd.Indexrequiredنماد یا فهرست مرتب نمادها؛ Series/Index هم پذیرفته می‌شود.
startDateLike | NoneNoneابتدای بازه؛ در نتیجه مشمول است.
endDateLike | NoneNoneانتهای بازه؛ در نتیجه مشمول است.
calendarstr'auto'auto only in simple aliases: 1200..1599 Jalali, 1800..2199 Gregorian; ambiguous/mixed years rejected. Low-level get_* retains explicit Gregorian/Jalali defaults.
on_errorstr'collect'See function contract; parameter is validated before use.
checkpoint_dirstr | Path | NoneNoneOptional directory for per-input typed snapshots and a resumable job journal. None disables checkpoints. Storage failure is reported, not a fake success.
resumeboolFalseReuse successfully persisted job items only while within resume_max_age; labeled as a cached snapshot, not refreshed data.
progressCallable[[dict], None] | NoneNoneOptional synchronous callback receiving a report dict after each input. No hidden UI, telemetry or scheduling.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError, UnsupportedCapabilityError

download_market

Plan bounded downloads for the current watch universe. dry_run=True performs only watch retrieval; historical universe is not reconstructed.

download_market(*, dataset: 'str' = 'history', market: 'Market | str | None' = None, limit: 'int' = 100, start: 'DateLike | None' = None, end: 'DateLike | None' = None, calendar: 'str' = 'auto', dry_run: 'bool' = True, on_error: 'str' = 'collect', checkpoint_dir: 'str | Path | None' = None) -> 'pd.DataFrame | BatchFrames'

Output: pd.DataFrame (dry_run=True) | BatchFrames (dry_run=False)

ParameterTypeDefaultDescription
datasetstr'history'history, client_types, trades, order_book_history, adjustments, shares, dividends, disclosures, messages, quotes, shareholders.
marketMarket | str | NoneNoneSee function contract; parameter is validated before use.
limitint100Positive cap. For download_market at most 10000 entries; default 100 and request budget still applies.
startDateLike | NoneNoneابتدای بازه؛ در نتیجه مشمول است.
endDateLike | NoneNoneانتهای بازه؛ در نتیجه مشمول است.
calendarstr'auto'auto only in simple aliases: 1200..1599 Jalali, 1800..2199 Gregorian; ambiguous/mixed years rejected. Low-level get_* retains explicit Gregorian/Jalali defaults.
dry_runboolTrueTrue returns a plan after retrieving current watch; False executes a bounded job. Does not reconstruct a historical universe.
on_errorstr'collect'See function contract; parameter is validated before use.
checkpoint_dirstr | Path | NoneNoneOptional directory for per-input typed snapshots and a resumable job journal. None disables checkpoints. Storage failure is reported, not a fake success.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError, UnsupportedCapabilityError

get_trades_many

Trades for multiple inputs with explicit errors, not silent dropping.

get_trades_many(instruments, *, start, end=None, calendar='gregorian', include_jdate=False, on_error='collect', policy=None) -> 'BatchFrames'

Output: BatchFrames(data: DataFrame, requests: DataFrame, errors: DataFrame, manifest: dict)

ParameterTypeDefaultDescription
instrumentsSequence[InstrumentLike]requiredSee function contract; parameter is validated before use.
startobject | Nonerequiredابتدای بازه؛ در نتیجه مشمول است.
endobject | NoneNoneانتهای بازه؛ در نتیجه مشمول است.
calendarstr'gregorian'auto only in simple aliases: 1200..1599 Jalali, 1800..2199 Gregorian; ambiguous/mixed years rejected. Low-level get_* retains explicit Gregorian/Jalali defaults.
include_jdateboolFalseSee function contract; parameter is validated before use.
on_errorstr'collect'See function contract; parameter is validated before use.
policyobject | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError, UnsupportedCapabilityError

get_order_book_updates

Historical best-limit updates, not full snapshots.

get_order_book_updates(instrument, *, start, end=None, calendar='gregorian', include_jdate=False, max_days=31, policy=None) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
instrumentInstrumentLikerequiredSee function contract; parameter is validated before use.
startobject | Nonerequiredابتدای بازه؛ در نتیجه مشمول است.
endobject | NoneNoneانتهای بازه؛ در نتیجه مشمول است.
calendarstr'gregorian'auto only in simple aliases: 1200..1599 Jalali, 1800..2199 Gregorian; ambiguous/mixed years rejected. Low-level get_* retains explicit Gregorian/Jalali defaults.
include_jdateboolFalseSee function contract; parameter is validated before use.
max_daysint31Maximum number of calendar dates requested by an intraday operation. Default31; up to366 configurable. No holiday inference.
policyobject | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError, UnsupportedCapabilityError

export

Save a self-describing snapshot; return only after successful commit. ``metadata=False`` omits df.attrs, not structural type/checksum information. MultiIndex/unsupported object values are rejected. No network requests. CSV + sidecar replace is not one filesystem transaction: a crash between replacements is detected by load's SHA256 check, never silently accepted.

export(df: 'pd.DataFrame', path: 'str | Path', *, format: 'str | None' = None, dataset: 'str' = 'user_data', metadata: 'bool' = True, overwrite: 'bool' = False, safe_text: 'bool' = True) -> 'WriteReceipt'

Output: WriteReceipt

ParameterTypeDefaultDescription
dfpd.DataFramerequiredSee function contract; parameter is validated before use.
pathstr | PathrequiredSee function contract; parameter is validated before use.
formatstr | NoneNoneSee function contract; parameter is validated before use.
datasetstr'user_data'history, client_types, trades, order_book_history, adjustments, shares, dividends, disclosures, messages, quotes, shareholders.
metadataboolTrueSee function contract; parameter is validated before use.
overwriteboolFalseExplicit permission to replace the named output only. Active working database is never an archive destination.
safe_textboolTrueSee function contract; parameter is validated before use.

Errors: InvalidArgumentError, DataQualityError, StorageError (explicit I/O)

export_many

Export separate files with safe deterministic filenames; no path traversal. Returns one receipt/error row per group and format. Does not delete other files.

export_many(value, directory, *, formats=('csv',), group_by='symbol', overwrite=False, on_error='collect') -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
valuepd.DataFrame | Quote | BatchFrames | recordsrequiredSee function contract; parameter is validated before use.
directoryobject | NonerequiredSee function contract; parameter is validated before use.
formatsstr | Sequence[str]('csv',)One or more csv, excel/xlsx, parquet, sqlite; optional engines remain required.
group_bystr'symbol'See function contract; parameter is validated before use.
overwriteboolFalseExplicit permission to replace the named output only. Active working database is never an archive destination.
on_errorstr'collect'See function contract; parameter is validated before use.

Errors: InvalidArgumentError, DataQualityError, StorageError (explicit I/O)

download_many

Ordered data job with reports and opt-in disk checkpoints. Uses existing bounded network budget; partial success is explicit.

download_many(symbols, *, dataset: 'str' = 'history', start: 'DateLike | None' = None, end: 'DateLike | None' = None, calendar: 'str' = 'auto', update: 'bool' = True, store: 'bool | None' = None, on_error: 'str' = 'collect', checkpoint_dir: 'str | Path | None' = None, resume: 'bool' = True, resume_max_age: 'float' = 3600.0, include_jdate: 'bool' = False, progress=None, policy: 'FetchPolicy | str | None' = None) -> 'BatchFrames'

Output: BatchFrames(data: DataFrame, requests: DataFrame, errors: DataFrame, manifest: dict)

ParameterTypeDefaultDescription
symbolsInstrumentLike | Sequence[InstrumentLike] | pd.Series | pd.Indexrequiredنماد یا فهرست مرتب نمادها؛ Series/Index هم پذیرفته می‌شود.
datasetstr'history'history, client_types, trades, order_book_history, adjustments, shares, dividends, disclosures, messages, quotes, shareholders.
startDateLike | NoneNoneابتدای بازه؛ در نتیجه مشمول است.
endDateLike | NoneNoneانتهای بازه؛ در نتیجه مشمول است.
calendarstr'auto'auto only in simple aliases: 1200..1599 Jalali, 1800..2199 Gregorian; ambiguous/mixed years rejected. Low-level get_* retains explicit Gregorian/Jalali defaults.
updateboolTrueHistory only: use bounded tail/full refresh and the local revision repository when enabled. Other datasets refresh through their own cache rules.
storebool | NoneNoneNone uses Client setting; module facade may explicitly create a client with storage False/True. Client method must agree with its config.
on_errorstr'collect'See function contract; parameter is validated before use.
checkpoint_dirstr | Path | NoneNoneOptional directory for per-input typed snapshots and a resumable job journal. None disables checkpoints. Storage failure is reported, not a fake success.
resumeboolTrueReuse successfully persisted job items only while within resume_max_age; labeled as a cached snapshot, not refreshed data.
resume_max_agefloat3600.0Maximum checkpoint age in seconds; nonnegative. resume=False or policy=fresh() bypasses checkpoint reuse.
include_jdateboolFalseSee function contract; parameter is validated before use.
progressCallable[[dict], None] | NoneNoneOptional synchronous callback receiving a report dict after each input. No hidden UI, telemetry or scheduling.
policyFetchPolicy | str | NoneNoneFetchPolicy or auto/online/offline. Old data requires explicit stale permission; fresh() bypasses response cache.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError, UnsupportedCapabilityError

setup

تنظیم ساده ارتباط بدون تغییر پنهانی تنظیمات امنیتی.

setup(*, network='environment', allow_direct=False, probe=False, storage=None, data_dir=None, mode=None, numeric=None) -> 'ClientConfig'

Output: ClientConfig

ParameterTypeDefaultDescription
networkstr'environment'environment/direct/auto. direct is explicit and retains TLS verification; auto tests environment and tries direct only with permission.
allow_directboolFalseExplicit permission for diagnostics to try a direct profile after environment profile; False never bypasses environment proxy implicitly.
probeboolFalseWhether to validate the selected environment/direct profile. auto always performs bounded probes.
storageobject | NoneNoneSee function contract; parameter is validated before use.
data_dirobject | NoneNoneSee function contract; parameter is validated before use.
modeobject | NoneNoneSee function contract; parameter is validated before use.
numericobject | NoneNoneSee function contract; parameter is validated before use.

Errors: InvalidArgumentError, DataQualityError, StorageError (explicit I/O)

check_connection

Probe one reviewed small endpoint with explicit connection profiles. network: environment/direct/auto. auto tries direct ONLY when allow_direct=True. Does not alter configuration, disable certificate validation, or expose proxy URLs.

check_connection(*, network='environment', allow_direct=False, timeout=10.0) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
networkstr'environment'environment/direct/auto. direct is explicit and retains TLS verification; auto tests environment and tries direct only with permission.
allow_directboolFalseExplicit permission for diagnostics to try a direct profile after environment profile; False never bypasses environment proxy implicitly.
timeoutfloat10.0See function contract; parameter is validated before use.

Errors: InvalidArgumentError, NetworkError, ApiError, SchemaMismatchError, DataQualityError, UnknownInstrumentError, AmbiguousInstrumentError, StaleDataError, OfflineDataUnavailableError, UnsupportedCapabilityError

diagnose

Version/dependency report without network by default; no credentials or proxy URLs.

diagnose(*, live=False, network='environment', allow_direct=False) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
liveboolFalseSee function contract; parameter is validated before use.
networkstr'environment'environment/direct/auto. direct is explicit and retains TLS verification; auto tests environment and tries direct only with permission.
allow_directboolFalseExplicit permission for diagnostics to try a direct profile after environment profile; False never bypasses environment proxy implicitly.

Errors: InvalidArgumentError, DataQualityError, StorageError (explicit I/O)

to_pandas

Obtain a caller-owned DataFrame; no automatic import of optional engines. Supports DataFrame, a Dara object with to_frame(), records, or BatchFrames.data. Does not invent provenance for external data.

to_pandas(value, *, copy=True) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
valuepd.DataFrame | Quote | BatchFrames | recordsrequiredSee function contract; parameter is validated before use.
copyboolTrueSee function contract; parameter is validated before use.

Errors: InvalidArgumentError, DataQualityError, StorageError (explicit I/O)

set_date_index

Use a date or (ins_code,date) index, preserving identifier strings. Multi-instrument frames automatically retain ins_code in the index.

set_date_index(df: 'pd.DataFrame', *, column='date', calendar='gregorian', by=None, sort=True, verify_unique=True) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
dfpd.DataFramerequiredSee function contract; parameter is validated before use.
columnstr'date'See function contract; parameter is validated before use.
calendarstr'gregorian'auto only in simple aliases: 1200..1599 Jalali, 1800..2199 Gregorian; ambiguous/mixed years rejected. Low-level get_* retains explicit Gregorian/Jalali defaults.
bystr | Sequence[str] | NoneNoneColumns to preserve alongside date in the index; multi-instrument frames default to including ins_code.
sortboolTrueSee function contract; parameter is validated before use.
verify_uniqueboolTrueSee function contract; parameter is validated before use.

Errors: InvalidArgumentError, DataQualityError, StorageError (explicit I/O)

select

Filter without mutating input. Omitted columns retain all evidence.

select(df: 'pd.DataFrame', columns=None, *, symbols=None, start=None, end=None, calendar='auto', date_column='date') -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
dfpd.DataFramerequiredSee function contract; parameter is validated before use.
columnsstr | Sequence[str] | NoneNoneExplicit column names or supported presets. No silent dropping of unknown names.
symbolsInstrumentLike | Sequence[InstrumentLike] | pd.Series | pd.IndexNoneنماد یا فهرست مرتب نمادها؛ Series/Index هم پذیرفته می‌شود.
startobject | NoneNoneابتدای بازه؛ در نتیجه مشمول است.
endobject | NoneNoneانتهای بازه؛ در نتیجه مشمول است.
calendarstr'auto'auto only in simple aliases: 1200..1599 Jalali, 1800..2199 Gregorian; ambiguous/mixed years rejected. Low-level get_* retains explicit Gregorian/Jalali defaults.
date_columnstr'date'See function contract; parameter is validated before use.

Errors: InvalidArgumentError, DataQualityError, StorageError (explicit I/O)

concat

Concatenate schema-compatible tables, preserving component provenance. Unknown schema remains unknown. Raw and adjusted data are never mixed silently.

concat(frames: 'Sequence[pd.DataFrame]', *, verify_keys=None) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
framesSequence[pd.DataFrame]requiredSee function contract; parameter is validated before use.
verify_keysobject | NoneNoneSee function contract; parameter is validated before use.

Errors: InvalidArgumentError, DataQualityError, StorageError (explicit I/O)

coverage

پوشش مشاهده‌شده؛ نه تضمین کمال تاریخچه.

coverage(df: 'pd.DataFrame', *, expected_sessions=None, start=None, end=None, calendar='auto') -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
dfpd.DataFramerequiredSee function contract; parameter is validated before use.
expected_sessionsSequence[date] | pd.Series | pd.DatetimeIndex | pd.DataFrameNoneExplicit caller-supplied Gregorian session dates. No guessed holidays/halts. Missing is only relative to this list.
startobject | NoneNoneابتدای بازه؛ در نتیجه مشمول است.
endobject | NoneNoneانتهای بازه؛ در نتیجه مشمول است.
calendarstr'auto'auto only in simple aliases: 1200..1599 Jalali, 1800..2199 Gregorian; ambiguous/mixed years rejected. Low-level get_* retains explicit Gregorian/Jalali defaults.

Errors: InvalidArgumentError, DataQualityError, StorageError (explicit I/O)

missing_sessions

Compare to caller-supplied sessions. Missing means no record, not a holiday or halt.

missing_sessions(df: 'pd.DataFrame', *, expected_sessions, date_column='date') -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
dfpd.DataFramerequiredSee function contract; parameter is validated before use.
expected_sessionsSequence[date] | pd.Series | pd.DatetimeIndex | pd.DataFramerequiredExplicit caller-supplied Gregorian session dates. No guessed holidays/halts. Missing is only relative to this list.
date_columnstr'date'See function contract; parameter is validated before use.

Errors: InvalidArgumentError, DataQualityError, StorageError (explicit I/O)

compare_sources

Compare two supplied tables without fetching sources or replacing values. Currency/adjustment mismatch raises. Differences are evidence, not a verdict.

compare_sources(left: 'pd.DataFrame', right: 'pd.DataFrame', *, keys=('ins_code', 'date'), columns=None, atol=0.0, rtol=0.0) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
leftpd.DataFramerequiredSee function contract; parameter is validated before use.
rightpd.DataFramerequiredSee function contract; parameter is validated before use.
keysSequence[str]('ins_code', 'date')Existing unique comparison keys; duplicates raise instead of a many-to-many merge.
columnsstr | Sequence[str] | NoneNoneExplicit column names or supported presets. No silent dropping of unknown names.
atolfloat0.0Nonnegative absolute tolerance for comparison of supplied data, not price rounding.
rtolfloat0.0Nonnegative relative tolerance for comparison, no economic correctness verdict.

Errors: InvalidArgumentError, DataQualityError, StorageError (explicit I/O)

examples

Runnable usage snippets. Network examples are labeled; no snippet is executed.

examples(name: 'str | None' = None) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
namestr | NoneNoneSee function contract; parameter is validated before use.

Errors: InvalidArgumentError, DataQualityError, StorageError (explicit I/O)

help

Persian-aware API catalog, returned as a DataFrame without printing or network.

help(name: 'str | None' = None) -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
namestr | NoneNoneSee function contract; parameter is validated before use.

Errors: InvalidArgumentError, DataQualityError, StorageError (explicit I/O)

columns

Alias for schema_info; no duplicate column registry.

columns(schema: 'str' = 'daily_bars', *, numeric='analysis') -> 'pd.DataFrame'

Output: pd.DataFrame

ParameterTypeDefaultDescription
schemastr'daily_bars'See function contract; parameter is validated before use.
numericstr'analysis'See function contract; parameter is validated before use.

Errors: InvalidArgumentError, DataQualityError, StorageError (explicit I/O)