API منبعمحور#
این توابع برای نوتبوک و تحلیل سریع مناسبن و مستقیماً polars.DataFrame برمیگردونن. نام
منبع همیشه در مسیر فراخوانی مشخصه. برای فرادادهٔ کامل از متدهای fetch_... کلاینت استفاده
کن.
TGJU: ارز و سکه#
- oxtapus.tgju.daily_prices(asset, start=None, end=None, *, progress=None)[source]#
دادههای گذشتهٔ یک ارز یا سکه را از TGJU برمیگرداند.
- Parameters:
asset (str) – A supported Persian asset name or canonical asset code.
start (date | str | None) – Optional inclusive Jalali or Gregorian start date.
end (date | str | None) – Optional inclusive Jalali or Gregorian end date.
progress (bool | ProgressReporter | Callable[[OperationStarted | TransferStarted | TransferAdvanced | ItemStarted | RetryScheduled | ItemCompleted | ItemFailed | OperationCompleted | OperationCancelled], None] | None) – Progress reporting configuration or event callback.
- Returns:
A Polars DataFrame containing canonical daily OHLC price rows.
- Return type:
DataFrame
>>> import oxtapus as ox
>>> frame = ox.tgju.daily_prices("سکه امامی", start="1403/10/12")
>>> frame.select("asset_code", "trading_date", "close_price").tail(2)
shape: (2, 3)
┌─────────────────┬──────────────┬─────────────┐
│ asset_code ┆ trading_date ┆ close_price │
│ --- ┆ --- ┆ --- │
│ str ┆ date ┆ i64 │
╞═════════════════╪══════════════╪═════════════╡
│ emami_gold_coin ┆ … ┆ … │
│ emami_gold_coin ┆ … ┆ … │
└─────────────────┴──────────────┴─────────────┘
TSETMC: قیمت و بازار#
- oxtapus.tsetmc.daily_prices(symbols, start=None, end=None, *, adjusted=False, progress=None)[source]#
دادههای تاریخی معاملهٔ یک یا چند نماد را برمیگرداند.
- Parameters:
symbols (Sequence[str]) – Symbols, ISINs, or TSETMC instrument codes.
start (date | str | None) – Optional inclusive Jalali or Gregorian start date.
end (date | str | None) – Optional inclusive Jalali or Gregorian end date.
adjusted (bool) – Must be
False; adjusted prices are not currently provided.progress (bool | ProgressReporter | Callable[[OperationStarted | TransferStarted | TransferAdvanced | ItemStarted | RetryScheduled | ItemCompleted | ItemFailed | OperationCompleted | OperationCancelled], None] | None) – Progress reporting configuration or event callback.
- Returns:
A Polars DataFrame containing canonical daily price rows.
- Return type:
DataFrame
- oxtapus.tsetmc.market_watch(instrument_types=('equity', 'etf'), *, progress=None)[source]#
دادههای دیدهبان بازار را برای بخشهای درخواستی برمیگرداند.
- Parameters:
instrument_types (Sequence[str]) – Instrument categories to include. Supported values are
equityandetf.progress (bool | ProgressReporter | Callable[[OperationStarted | TransferStarted | TransferAdvanced | ItemStarted | RetryScheduled | ItemCompleted | ItemFailed | OperationCompleted | OperationCancelled], None] | None) – Progress reporting configuration or event callback.
- Returns:
A Polars DataFrame containing the latest canonical market snapshot.
- Return type:
DataFrame
- oxtapus.tsetmc.quote(identifier, *, progress=None)[source]#
دادههای صفحهٔ نماد را برمیگرداند.
- Parameters:
identifier (str) – A symbol, ISIN, TSETMC instrument code, or provider identifier.
progress (bool | ProgressReporter | Callable[[OperationStarted | TransferStarted | TransferAdvanced | ItemStarted | RetryScheduled | ItemCompleted | ItemFailed | OperationCompleted | OperationCancelled], None] | None) – Progress reporting configuration or event callback.
- Returns:
A one-row Polars DataFrame containing the latest trading-board data.
- Return type:
DataFrame
- oxtapus.tsetmc.market_depth(identifier, *, progress=None)[source]#
سفارشهای فعلی نماد را برمیگرداند.
- Parameters:
identifier (str) – A symbol, ISIN, TSETMC instrument code, or provider identifier.
progress (bool | ProgressReporter | Callable[[OperationStarted | TransferStarted | TransferAdvanced | ItemStarted | RetryScheduled | ItemCompleted | ItemFailed | OperationCompleted | OperationCancelled], None] | None) – Progress reporting configuration or event callback.
- Returns:
A Polars DataFrame containing up to five current bid and ask levels.
- Return type:
DataFrame
- oxtapus.tsetmc.investor_activity(identifier, *, progress=None)[source]#
دادههای خرید و فروش حقیقی و حقوقی نماد را برمیگرداند.
- Parameters:
identifier (str) – A symbol, ISIN, TSETMC instrument code, or provider identifier.
progress (bool | ProgressReporter | Callable[[OperationStarted | TransferStarted | TransferAdvanced | ItemStarted | RetryScheduled | ItemCompleted | ItemFailed | OperationCompleted | OperationCancelled], None] | None) – Progress reporting configuration or event callback.
- Returns:
A one-row Polars DataFrame containing individual and institutional trading activity.
- Return type:
DataFrame
>>> quote = ox.tsetmc.quote("فولاد")
>>> quote.select("symbol", "last_price", "close_price")
shape: (1, 3)
┌────────┬────────────┬─────────────┐
│ symbol ┆ last_price ┆ close_price │
│ --- ┆ --- ┆ --- │
│ str ┆ i64 ┆ i64 │
╞════════╪════════════╪═════════════╡
│ فولاد ┆ … ┆ … │
└────────┴────────────┴─────────────┘
اطلاعات ابزار و شرکت#
- oxtapus.tsetmc.instrument_search(term, *, progress=None)[source]#
کد و مشخصات ابزارهای منطبق با عبارت جستوجو را برمیگرداند.
- Parameters:
term (str) – A symbol or instrument-name fragment.
progress (bool | ProgressReporter | Callable[[OperationStarted | TransferStarted | TransferAdvanced | ItemStarted | RetryScheduled | ItemCompleted | ItemFailed | OperationCompleted | OperationCancelled], None] | None) – Progress reporting configuration or event callback.
- Returns:
A Polars DataFrame containing every matching TSETMC instrument.
- Return type:
DataFrame
- oxtapus.tsetmc.instrument_info(identifier, *, progress=None)[source]#
دادههای پایهٔ نماد یا ابزار معاملاتی را برمیگرداند.
- Parameters:
identifier (str) – A symbol, ISIN, TSETMC instrument code, or provider identifier.
progress (bool | ProgressReporter | Callable[[OperationStarted | TransferStarted | TransferAdvanced | ItemStarted | RetryScheduled | ItemCompleted | ItemFailed | OperationCompleted | OperationCancelled], None] | None) – Progress reporting configuration or event callback.
- Returns:
A one-row Polars DataFrame containing the instrument information returned by TSETMC.
- Return type:
DataFrame
- oxtapus.tsetmc.instrument_identity(identifier, *, progress=None)[source]#
شناسهٔ نماد یا ابزار معاملاتی را برمیگرداند.
- Parameters:
identifier (str) – A symbol, ISIN, TSETMC instrument code, or provider identifier.
progress (bool | ProgressReporter | Callable[[OperationStarted | TransferStarted | TransferAdvanced | ItemStarted | RetryScheduled | ItemCompleted | ItemFailed | OperationCompleted | OperationCancelled], None] | None) – Progress reporting configuration or event callback.
- Returns:
A one-row Polars DataFrame containing the instrument identity returned by TSETMC.
- Return type:
DataFrame
- oxtapus.tsetmc.board_members(identifier, *, progress=None)[source]#
اطلاعات اعضای هیئتمدیرهٔ شرکت را برمیگرداند.
- Parameters:
identifier (str) – A symbol, ISIN, TSETMC instrument code, or provider identifier.
progress (bool | ProgressReporter | Callable[[OperationStarted | TransferStarted | TransferAdvanced | ItemStarted | RetryScheduled | ItemCompleted | ItemFailed | OperationCompleted | OperationCancelled], None] | None) – Progress reporting configuration or event callback.
- Returns:
A Polars DataFrame containing the company’s board-member disclosure records.
- Return type:
DataFrame
- oxtapus.tsetmc.option_chain(underlying, *, progress=None)[source]#
دادههای نمای بازار اختیار معامله را برمیگرداند.
- Parameters:
underlying (str) – An underlying symbol, ISIN, or TSETMC instrument code.
progress (bool | ProgressReporter | Callable[[OperationStarted | TransferStarted | TransferAdvanced | ItemStarted | RetryScheduled | ItemCompleted | ItemFailed | OperationCompleted | OperationCancelled], None] | None) – Progress reporting configuration or event callback.
- Returns:
A Polars DataFrame containing one canonical row per matching option contract.
- Return type:
DataFrame