> ## Documentation Index
> Fetch the complete documentation index at: https://takeprofit.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Compact Indie API reference

> Generated compact index of the public Indie API.

```python theme={null}
from typing import overload
from enum import Enum

# dataclasses
# decorator
def dataclass(): ...

# datetime
class datetime:
    day: int
    hour: int
    microsecond: int
    minute: int
    month: int
    second: int
    year: int
    def __add__(self, delta: datetime.timedelta) -> datetime.datetime: ...
    def __init__(self, year: int, month: int, day: int, hour: int = 0, minute: int = 0, second: int = 0, microsecond: int = 0) -> None: ...
    @overload
    def __sub__(self, delta: datetime.timedelta) -> datetime.datetime: ...

    @overload
    def __sub__(self, other: datetime.datetime) -> datetime.timedelta: ...
    def timestamp(self) -> float: ...
    def weekday(self) -> int: ...
    @staticmethod
    def strptime(date_string: str, format: str) -> datetime.datetime: ...
    @staticmethod
    def utcfromtimestamp(timestamp: float) -> datetime.datetime: ...

class time:
    hour: int
    microsecond: int
    minute: int
    second: int
    def __add__(self, delta: datetime.timedelta) -> datetime.datetime: ...
    def __init__(self, hour: int = 0, minute: int = 0, second: int = 0, microsecond: int = 0) -> None: ...
    def __sub__(self, delta: datetime.timedelta) -> datetime.datetime: ...

class timedelta:
    days: int
    microseconds: int
    seconds: int
    def __init__(self, days: int = 0, seconds: int = 0, microseconds: int = 0, milliseconds: int = 0, minutes: int = 0, hours: int = 0, weeks: int = 0) -> None: ...
    def total_seconds(self) -> float: ...


# indie
class Algorithm:
    ctx: indie.Context
    def __init__(self, ctx: indie.Context) -> None: ...

# decorator
def algorithm(): ...
# decorator
def band(value1: float, value2: float, title: indie.Optional[str] = None, fill_color: indie.Color = indie.color.GREEN(0.05), line_color: indie.Color = indie.color.GRAY(0.5), line_style: indie.line_style = indie.line_style.DASHED, line_width: int = 1): ...
class Color:
    def __call__(self, alpha: float) -> indie.Color: ...

class Context:
    bar_count: int
    bar_index: int
    close: indie.Series[float]
    high: indie.Series[float]
    hl2: indie.Series[float]
    hlc3: indie.Series[float]
    info: indie.SymbolInfo
    is_closed_bar: bool
    is_history: bool
    is_last_bar: bool
    is_last_history_bar: bool
    is_new_bar: bool
    is_realtime: bool
    low: indie.Series[float]
    ohlc4: indie.Series[float]
    open: indie.Series[float]
    time: indie.Series[float]
    time_frame: indie.TimeFrame
    trading_session: indie.TradingSession
    volume: indie.Series[float]
    def calc_on(self, sec_context: typing.Any, exchange: indie.Optional[str] = None, ticker: indie.Optional[str] = None, time_frame: indie.Optional[indie.TimeFrame] = None, *, source: indie.Optional[indie.data.sources.IExternalSource] = None, lookahead: bool = False) -> indie.SeriesF | tuple[indie.SeriesF, ...]: ...
    def is_first_in_regular_session(self) -> bool: ...
    def is_first_in_session(self) -> bool: ...
    def is_last_in_regular_session(self) -> bool: ...
    def is_last_in_session(self) -> bool: ...
    def new_mut_series(self, default: T, size: int = 2) -> indie.MutSeries[T]: ...
    def new_mut_series_f(self, default: indie.Optional[float] = None, size: int = 2) -> indie.MutSeries[float]: ...
    def new_var(self, init: T) -> indie.Var[T]: ...

@data_context[T]
class DataContext[T](Context):
    data: indie.Series[T]

class format(Enum):
    INHERITED: format
    PRICE: format
    VOLUME: format

# decorator
def indicator(abbrev_title: str, overlay_main_pane: bool = False, format: indie.format = indie.format.INHERITED, precision: indie.Optional[int] = None): ...
class IndieError:
    def __init__(self, msg: str) -> None: ...

# decorator
def level(value: float, title: indie.Optional[str] = None, line_color: indie.Color = indie.color.GRAY(0.5), line_style: indie.line_style = indie.line_style.DASHED, line_width: int = 1): ...
class line_style(Enum):
    DASHED: line_style
    DOTTED: line_style
    SOLID: line_style

class MainContext(Context):
    chart: indie.drawings.Chart

class MainStrategyContext(MainContext):
    trading: indie.strategies.Trading

class MutSeries[T](Series[T]):
    def __setitem__(self, i: int, x: T) -> None: ...
    def calc(self, reset: indie.Optional[T] = None, init: indie.Optional[T] = None, size: int = 2) -> indie.MutSeries[T]: ...
    @overload
    @staticmethod
    def new(reset: T, size: int = 2) -> indie.MutSeries[T]: ...

    @overload
    @staticmethod
    def new(reset: indie.Optional[T] = None, init: indie.Optional[T] = None, size: int = 2) -> indie.MutSeries[T]: ...

MutSeriesF = indie.MutSeries[float]
class Optional[T]:
    def __bool__(self) -> bool: ...
    @overload
    def __init__(self, value: T) -> None: ...

    @overload
    def __init__(self) -> None: ...
    def __isnone__(self) -> bool: ...
    def value(self) -> T: ...
    def value_or(self, default: T) -> T: ...

class param:
    # decorator
    @staticmethod
    def bool(id: str, default: bool, title: indie.Optional[str] = None): ...
    # decorator
    @staticmethod
    def color(id: str, default: indie.Color, title: indie.Optional[str] = None): ...
    # decorator
    @staticmethod
    def float(id: str, default: float, min: float = -1000000.0, max: float = 1000000.0, step: float = 0.1, title: indie.Optional[str] = None): ...
    # decorator
    @staticmethod
    def int(id: str, default: int, min: int = -1000000, max: int = 1000000, step: int = 1, title: indie.Optional[str] = None): ...
    # decorator
    @staticmethod
    def source(id: str, default: indie.source = source.CLOSE, options: indie.Optional[list[indie.source]] = None, title: indie.Optional[str] = None): ...
    # decorator
    @staticmethod
    def str(id: str, default: str, options: indie.Optional[list[str]] = None, title: indie.Optional[str] = None): ...
    # decorator
    @staticmethod
    def time_frame(id: str, default: str, options: indie.Optional[list[str]] = None, title: indie.Optional[str] = None): ...

# decorator
def param_ref(id: str): ...
# With time_frame=None returns Series[T].
def request_series[T](source: indie.Optional[indie.data.sources.IExternalSource], time_frame: indie.Optional[indie.TimeFrame] = None, lookahead: bool = False) -> indie.RequestedSeries[T]: ...
class RequestedSeries[T](Series[T]):
    def request_subperiods(self, size: int) -> None: ...
    def subperiods(self, offset: int = 0) -> indie.Optional[list[T]]: ...

# decorator
def sec_context(): ...
class SecContext(Context):
    pass

class Series[T]:
    def __getitem__(self, i: int) -> T: ...
    def __len__(self) -> int: ...
    def get(self, offset: int, default: T, neg_offset_ok: bool = False) -> T: ...
    def request_size(self, size: int) -> None: ...
    def set_size(self, size: int) -> None: ...

SeriesF = indie.Series[float]
class source(Enum):
    CLOSE: source
    HIGH: source
    HL2: source
    HLC3: source
    LOW: source
    OHLC4: source
    OPEN: source
    VOLUME: source

# decorator
def strategy(abbrev_title: str, *, overlay_main_pane: bool = False, format: indie.format = indie.format.INHERITED, precision: indie.Optional[int] = None, initial_capital: float = 1000000.0, commission: indie.strategies.Commission = indie.strategies.Commission(0.0, indie.strategies.commission_type.PERCENT), leverage: float = 1.0, intrabar_order_filter: indie.strategies.intrabar_order_filter = indie.strategies.intrabar_order_filter.ON_BAR_CLOSE, market_order_price: indie.strategies.market_order_price = indie.strategies.market_order_price.MARKET_PRICE, risk_free_rate: float = 0.02): ...
class SymbolInfo:
    exchange_aliases: list[str]
    exchange_code: str
    price_precision: int
    tick_size: float
    ticker: str
    timezone: str

class time_frame_unit(Enum):
    DAY: time_frame_unit
    HOUR: time_frame_unit
    MINUTE: time_frame_unit
    MONTH: time_frame_unit
    SECOND: time_frame_unit
    WEEK: time_frame_unit

class TimeFrame:
    count: int
    unit: indie.time_frame_unit
    def __eq__(self, other: indie.TimeFrame) -> bool: ...
    def __init__(self, count: int, unit: indie.time_frame_unit) -> None: ...
    def __le__(self, other: indie.TimeFrame) -> bool: ...
    def __lt__(self, other: indie.TimeFrame) -> bool: ...
    def to_minutes(self) -> int: ...
    def to_seconds(self) -> int: ...
    @staticmethod
    def from_str(tf_str: str) -> indie.TimeFrame: ...

class TradingSession:
    after_hours: indie.schedule.Schedule
    extended: indie.schedule.Schedule
    pre_market: indie.schedule.Schedule
    regular: indie.schedule.Schedule
    @overload
    def __contains__(self, t: float) -> bool: ...

    @overload
    def __contains__(self, d: datetime.datetime) -> bool: ...
    def is_after_hours(self, timestamp: float) -> bool: ...
    def is_extended(self, timestamp: float) -> bool: ...
    def is_pre_market(self, timestamp: float) -> bool: ...
    def is_regular(self, timestamp: float) -> bool: ...
    def is_same_period(self, timestamp1: float, timestamp2: float) -> bool: ...

class Var[T]:
    def get(self) -> T: ...
    def set(self, new_value: T) -> None: ...
    @staticmethod
    def new(init: T) -> indie.Var[T]: ...


# indie.algorithms
class Adx(Algorithm):
    def __init__(self, ctx: indie.Context) -> None: ...
    def calc(self, adx_len: int, di_len: int) -> tuple[indie.Series[float], indie.Series[float], indie.Series[float]]: ...
    @staticmethod
    def new(adx_len: int, di_len: int) -> tuple[indie.Series[float], indie.Series[float], indie.Series[float]]: ...

class Atr(Algorithm):
    def __init__(self, ctx: indie.Context) -> None: ...
    def calc(self, length: int, ma_algorithm: str = "RMA") -> indie.Series[float]: ...
    @staticmethod
    def new(length: int, ma_algorithm: str = "RMA") -> indie.Series[float]: ...

class Bb(Algorithm):
    def __init__(self, ctx: indie.Context) -> None: ...
    def calc(self, src: indie.Series[float], length: int, mult: float) -> tuple[indie.Series[float], indie.Series[float], indie.Series[float]]: ...
    @staticmethod
    def new(src: indie.Series[float], length: int, mult: float) -> tuple[indie.Series[float], indie.Series[float], indie.Series[float]]: ...

class Cci(Algorithm):
    def __init__(self, ctx: indie.Context) -> None: ...
    def calc(self, src: indie.Series[float], length: int) -> indie.Series[float]: ...
    @staticmethod
    def new(src: indie.Series[float], length: int) -> indie.Series[float]: ...

class Change(Algorithm):
    def __init__(self, ctx: indie.Context) -> None: ...
    def calc(self, src: indie.Series[float], length: int = 1) -> indie.Series[float]: ...
    @staticmethod
    def new(src: indie.Series[float], length: int = 1) -> indie.Series[float]: ...

class Corr(Algorithm):
    def __init__(self, ctx: indie.Context) -> None: ...
    def calc(self, x: indie.Series[float], y: indie.Series[float], length: int) -> indie.Series[float]: ...
    @staticmethod
    def new(x: indie.Series[float], y: indie.Series[float], length: int) -> indie.Series[float]: ...

class CumSum(Algorithm):
    def __init__(self, ctx: indie.Context) -> None: ...
    def calc(self, src: indie.Series[float]) -> indie.Series[float]: ...
    @staticmethod
    def new(src: indie.Series[float]) -> indie.Series[float]: ...

class Dev(Algorithm):
    def __init__(self, ctx: indie.Context) -> None: ...
    def calc(self, src: indie.Series[float], length: int) -> indie.Series[float]: ...
    @staticmethod
    def new(src: indie.Series[float], length: int) -> indie.Series[float]: ...

class Donchian(Algorithm):
    def __init__(self, ctx: indie.Context) -> None: ...
    def calc(self, length: int) -> indie.Series[float]: ...
    @staticmethod
    def new(length: int) -> indie.Series[float]: ...

class Ema(Algorithm):
    def __init__(self, ctx: indie.Context) -> None: ...
    def calc(self, src: indie.Series[float], length: int) -> indie.Series[float]: ...
    @staticmethod
    def new(src: indie.Series[float], length: int) -> indie.Series[float]: ...

class FixNan(Algorithm):
    def __init__(self, ctx: indie.Context) -> None: ...
    def calc(self, src: indie.Series[float]) -> indie.Series[float]: ...
    @staticmethod
    def new(src: indie.Series[float]) -> indie.Series[float]: ...

class Highest(Algorithm):
    def __init__(self, ctx: indie.Context) -> None: ...
    def calc(self, src: indie.Series[float], length: int) -> indie.Series[float]: ...
    @staticmethod
    def new(src: indie.Series[float], length: int) -> indie.Series[float]: ...

class LinReg(Algorithm):
    def __init__(self, ctx: indie.Context) -> None: ...
    def calc(self, src: indie.Series[float], length: int, offset: int = 0) -> indie.Series[float]: ...
    @staticmethod
    def new(src: indie.Series[float], length: int, offset: int = 0) -> indie.Series[float]: ...

class Lowest(Algorithm):
    def __init__(self, ctx: indie.Context) -> None: ...
    def calc(self, src: indie.Series[float], length: int) -> indie.Series[float]: ...
    @staticmethod
    def new(src: indie.Series[float], length: int) -> indie.Series[float]: ...

class Ma(Algorithm):
    def __init__(self, ctx: indie.Context) -> None: ...
    def calc(self, src: indie.Series[float], length: int, algorithm: str) -> indie.Series[float]: ...
    @staticmethod
    def new(src: indie.Series[float], length: int, algorithm: str) -> indie.Series[float]: ...

class Macd(Algorithm):
    def __init__(self, ctx: indie.Context) -> None: ...
    def calc(self, src: indie.Series[float], fast_len: int, slow_len: int, sig_len: int, ma_source: str = "EMA", ma_signal: str = "EMA") -> tuple[indie.Series[float], indie.Series[float], indie.Series[float]]: ...
    @staticmethod
    def new(src: indie.Series[float], fast_len: int, slow_len: int, sig_len: int, ma_source: str = "EMA", ma_signal: str = "EMA") -> tuple[indie.Series[float], indie.Series[float], indie.Series[float]]: ...

class Median(Algorithm):
    def __init__(self, ctx: indie.Context) -> None: ...
    def calc(self, src: indie.Series[float], length: int) -> indie.Series[float]: ...
    @staticmethod
    def new(src: indie.Series[float], length: int) -> indie.Series[float]: ...

class Mfi(Algorithm):
    def __init__(self, ctx: indie.Context) -> None: ...
    def calc(self, src: indie.Series[float], length: int) -> indie.Series[float]: ...
    @staticmethod
    def new(src: indie.Series[float], length: int) -> indie.Series[float]: ...

class Mfv(Algorithm):
    def __init__(self, ctx: indie.Context) -> None: ...
    def calc(self) -> indie.Series[float]: ...
    @staticmethod
    def new() -> indie.Series[float]: ...

class NanToZero(Algorithm):
    def __init__(self, ctx: indie.Context) -> None: ...
    def calc(self, src: indie.Series[float]) -> indie.Series[float]: ...
    @staticmethod
    def new(src: indie.Series[float]) -> indie.Series[float]: ...

class NetVolume(Algorithm):
    def __init__(self, ctx: indie.Context) -> None: ...
    def calc(self, src: indie.Series[float]) -> indie.Series[float]: ...
    @staticmethod
    def new(src: indie.Series[float]) -> indie.Series[float]: ...

class Percentile(Algorithm):
    def __init__(self, ctx: indie.Context) -> None: ...
    def calc(self, src: indie.Series[float], length: int, pct: float, interpolate: bool) -> indie.Series[float]: ...
    @staticmethod
    def new(src: indie.Series[float], length: int, pct: float, interpolate: bool) -> indie.Series[float]: ...

class PercentRank(Algorithm):
    def __init__(self, ctx: indie.Context) -> None: ...
    def calc(self, src: indie.Series[float], length: int) -> indie.Series[float]: ...
    @staticmethod
    def new(src: indie.Series[float], length: int) -> indie.Series[float]: ...

class PivotHighLow(Algorithm):
    def __init__(self, ctx: indie.Context) -> None: ...
    def calc(self, src: indie.Series[float], left_bars: int, right_bars: int) -> tuple[indie.Series[float], indie.Series[float]]: ...
    @staticmethod
    def new(src: indie.Series[float], left_bars: int, right_bars: int) -> tuple[indie.Series[float], indie.Series[float]]: ...

class Rma(Algorithm):
    def __init__(self, ctx: indie.Context) -> None: ...
    def calc(self, src: indie.Series[float], length: int) -> indie.Series[float]: ...
    @staticmethod
    def new(src: indie.Series[float], length: int) -> indie.Series[float]: ...

class Roc(Algorithm):
    def __init__(self, ctx: indie.Context) -> None: ...
    def calc(self, src: indie.Series[float], length: int) -> indie.Series[float]: ...
    @staticmethod
    def new(src: indie.Series[float], length: int) -> indie.Series[float]: ...

class Rsi(Algorithm):
    def __init__(self, ctx: indie.Context) -> None: ...
    def calc(self, src: indie.Series[float], length: int) -> indie.Series[float]: ...
    @staticmethod
    def new(src: indie.Series[float], length: int) -> indie.Series[float]: ...

class Sar(Algorithm):
    def __init__(self, ctx: indie.Context) -> None: ...
    def calc(self, start: float, increment: float, maximum: float) -> indie.Series[float]: ...
    @staticmethod
    def new(start: float, increment: float, maximum: float) -> indie.Series[float]: ...

class SinceHighest(Algorithm):
    def __init__(self, ctx: indie.Context) -> None: ...
    def calc(self, src: indie.Series[float], length: int) -> indie.Series[int]: ...
    @staticmethod
    def new(src: indie.Series[float], length: int) -> indie.Series[int]: ...

class SinceLowest(Algorithm):
    def __init__(self, ctx: indie.Context) -> None: ...
    def calc(self, src: indie.Series[float], length: int) -> indie.Series[int]: ...
    @staticmethod
    def new(src: indie.Series[float], length: int) -> indie.Series[int]: ...

class SinceTrue(Algorithm):
    def __init__(self, ctx: indie.Context) -> None: ...
    def calc(self, condition: indie.Series[bool]) -> indie.Series[int]: ...
    @staticmethod
    def new(condition: indie.Series[bool]) -> indie.Series[int]: ...

class Sma(Algorithm):
    def __init__(self, ctx: indie.Context) -> None: ...
    def calc(self, src: indie.Series[float], length: int) -> indie.Series[float]: ...
    @staticmethod
    def new(src: indie.Series[float], length: int) -> indie.Series[float]: ...

class StdDev(Algorithm):
    def __init__(self, ctx: indie.Context) -> None: ...
    def calc(self, src: indie.Series[float], length: int) -> indie.Series[float]: ...
    @staticmethod
    def new(src: indie.Series[float], length: int) -> indie.Series[float]: ...

class Stoch(Algorithm):
    def __init__(self, ctx: indie.Context) -> None: ...
    def calc(self, src: indie.Series[float], low: indie.Series[float], high: indie.Series[float], length: int) -> indie.Series[float]: ...
    @staticmethod
    def new(src: indie.Series[float], low: indie.Series[float], high: indie.Series[float], length: int) -> indie.Series[float]: ...

class Sum(Algorithm):
    def __init__(self, ctx: indie.Context) -> None: ...
    def calc(self, src: indie.Series[float], length: int) -> indie.Series[float]: ...
    @staticmethod
    def new(src: indie.Series[float], length: int) -> indie.Series[float]: ...

class Supertrend(Algorithm):
    def __init__(self, ctx: indie.Context) -> None: ...
    def calc(self, factor: float, atr_period: int, ma_algorithm: str) -> tuple[indie.Series[float], indie.Series[float]]: ...
    @staticmethod
    def new(factor: float, atr_period: int, ma_algorithm: str) -> tuple[indie.Series[float], indie.Series[float]]: ...

class Tr(Algorithm):
    def __init__(self, ctx: indie.Context) -> None: ...
    def calc(self, handle_na: bool = False) -> indie.Series[float]: ...
    @staticmethod
    def new(handle_na: bool = False) -> indie.Series[float]: ...

class Tsi(Algorithm):
    def __init__(self, ctx: indie.Context) -> None: ...
    def calc(self, src: indie.Series[float], long_len: int, short_len: int) -> indie.Series[float]: ...
    @staticmethod
    def new(src: indie.Series[float], long_len: int, short_len: int) -> indie.Series[float]: ...

class Uo(Algorithm):
    def __init__(self, ctx: indie.Context) -> None: ...
    def calc(self, fast_len: int, middle_len: int, slow_len: int) -> indie.Series[float]: ...
    @staticmethod
    def new(fast_len: int, middle_len: int, slow_len: int) -> indie.Series[float]: ...

class Vwap(Algorithm):
    def __init__(self, ctx: indie.Context) -> None: ...
    def calc(self, src: indie.Series[float], anchor: str, std_dev_mult: float) -> tuple[indie.Series[float], indie.Series[float], indie.Series[float]]: ...
    @staticmethod
    def new(src: indie.Series[float], anchor: str, std_dev_mult: float) -> tuple[indie.Series[float], indie.Series[float], indie.Series[float]]: ...

class Vwma(Algorithm):
    def __init__(self, ctx: indie.Context) -> None: ...
    def calc(self, src: indie.Series[float], length: int) -> indie.Series[float]: ...
    @staticmethod
    def new(src: indie.Series[float], length: int) -> indie.Series[float]: ...

class Wma(Algorithm):
    def __init__(self, ctx: indie.Context) -> None: ...
    def calc(self, src: indie.Series[float], length: int) -> indie.Series[float]: ...
    @staticmethod
    def new(src: indie.Series[float], length: int) -> indie.Series[float]: ...

class ZigZag(Algorithm):
    def __init__(self, ctx: indie.Context) -> None: ...
    def calc(self, left_bars: int, right_bars: int, dev_threshold: float, allow_zig_zag_within_one_bar: bool = True) -> tuple[bool, bool, bool, bool]: ...
    @staticmethod
    def new(left_bars: int, right_bars: int, dev_threshold: float, allow_zig_zag_within_one_bar: bool = True) -> tuple[bool, bool, bool, bool]: ...


# indie.color
AQUA: indie.Color
BLACK: indie.Color
BLUE: indie.Color
BROWN: indie.Color
FUCHSIA: indie.Color
GRAY: indie.Color
GREEN: indie.Color
def hex(value: str) -> indie.Color: ...
LIME: indie.Color
MAROON: indie.Color
NAVY: indie.Color
OLIVE: indie.Color
ORANGE: indie.Color
PINK: indie.Color
PURPLE: indie.Color
RED: indie.Color
def rgba(red: int, green: int, blue: int, alpha: float = 1.0) -> indie.Color: ...
SILVER: indie.Color
TEAL: indie.Color
TRANSPARENT: indie.Color
WHITE: indie.Color
YELLOW: indie.Color

# indie.data
class TpoBlockInfo:
    block_start_offset_seconds: int

class TpoPriceRow:
    block_indexes: list[int]
    price: float
    volume_buy: float
    volume_sell: float

class TpoProfile:
    block_infos: list[indie.data.TpoBlockInfo]
    initial_balance_high: float
    initial_balance_low: float
    open_trading_day_unix_seconds: int
    point_of_control: float
    profile_end_unix_seconds: int
    row_size: float
    rows: list[indie.data.TpoPriceRow]
    session_type: indie.data.sources.session_types
    def to_block_profile(self, into: indie.Optional[indie.drawings.BlockProfile] = None) -> indie.drawings.BlockProfile: ...

class VolumeFootprintPriceRow:
    price: float
    trades_count_buy: int
    trades_count_sell: int
    volume_buy: float
    volume_sell: float

class VolumeFootprintProfile:
    profile_end_unix_seconds: int
    profile_start_unix_seconds: int
    row_size: float
    rows: list[indie.data.VolumeFootprintPriceRow]
    session_type: indie.data.sources.session_types
    total_trades_count_buy: int
    total_trades_count_sell: int
    total_volume_buy: float
    total_volume_sell: float


# indie.data.sources
class Csv(IExternalSource):
    def __init__(self, url: str, time_column: str = "time") -> None: ...

class DataFeed(IExternalSource):
    def __init__(self, url: str, stale_after: indie.Optional[datetime.timedelta] = None) -> None: ...

class IExternalSource:
    pass

class session_types(Enum):
    MAIN_SESSION: session_types
    POST_MARKET: session_types
    PRE_MARKET: session_types

class Tpo(IExternalSource):
    def __init__(self, session_types: list[indie.data.sources.session_types] = [indie.data.sources.session_types.MAIN_SESSION, indie.data.sources.session_types.PRE_MARKET, indie.data.sources.session_types.POST_MARKET], merge_sessions: indie.data.sources.tpo_merge_sessions = indie.data.sources.tpo_merge_sessions.MERGE_ALL, block_size: str = "30m", row_size_ticks: int = 0) -> None: ...

class tpo_merge_sessions(Enum):
    GROUP_BY_TYPE: tpo_merge_sessions
    MERGE_ALL: tpo_merge_sessions

class VolumeFootprint(IExternalSource):
    def __init__(self, session_types: list[indie.data.sources.session_types] = [indie.data.sources.session_types.MAIN_SESSION, indie.data.sources.session_types.PRE_MARKET, indie.data.sources.session_types.POST_MARKET], row_size_ticks: int = 0) -> None: ...


# indie.drawings
class AbsolutePosition:
    offset: float
    price: float
    time: float
    def __init__(self, time: float, price: float, offset: float = 0.0) -> None: ...

class BlockProfile:
    row_size: float
    time_from: float
    time_to: float
    def __init__(self, row_size: float, time_from: float, time_to: float) -> None: ...
    def add_cell(self, price: float, column_index: int, values: indie.Optional[list[float]] = None, color: indie.Optional[indie.Color] = None) -> None: ...
    def add_column(self, start_offset_seconds: int, color: indie.Optional[indie.Color] = None) -> int: ...
    def add_level(self, name: str, price: float) -> None: ...
    def cell_count(self) -> int: ...
    def clear(self) -> None: ...
    def column_count(self) -> int: ...
    def is_empty(self) -> bool: ...
    def set_palette(self, colors: list[indie.Color]) -> None: ...

class callout_position(Enum):
    BOTTOM_LEFT: callout_position
    BOTTOM_RIGHT: callout_position
    TOP_LEFT: callout_position
    TOP_RIGHT: callout_position

class Channel:
    bg_color: indie.Color
    channel_width: float
    line_color: indie.Color
    line_style: indie.line_style
    line_width: int
    middle_line_color: indie.Color
    middle_line_style: indie.line_style
    middle_line_width: int
    point_a: indie.drawings.AbsolutePosition
    point_b: indie.drawings.AbsolutePosition
    def __init__(self, point_a: indie.drawings.AbsolutePosition, point_b: indie.drawings.AbsolutePosition, channel_width: float, line_style: indie.line_style = indie.line_style.SOLID, line_width: int = 1, line_color: indie.Color = indie.color.YELLOW, bg_color: indie.Color = indie.color.TRANSPARENT, middle_line_style: indie.line_style = indie.line_style.DOTTED, middle_line_width: int = 1, middle_line_color: indie.Color = indie.color.YELLOW) -> None: ...

class Chart:
    def draw(self, obj: indie.drawings.IDrawingItem) -> None: ...
    def erase(self, obj: indie.drawings.IDrawingItem) -> None: ...

class Circle:
    bg_color: indie.Color
    line_color: indie.Color
    line_style: indie.line_style
    line_width: int
    point_center: indie.drawings.AbsolutePosition
    point_edge: indie.drawings.AbsolutePosition
    def __init__(self, point_center: indie.drawings.AbsolutePosition, point_edge: indie.drawings.AbsolutePosition, line_style: indie.line_style = indie.line_style.SOLID, line_width: int = 1, line_color: indie.Color = indie.color.YELLOW, bg_color: indie.Color = indie.color.TRANSPARENT) -> None: ...

class horizontal_anchor(Enum):
    CENTER: horizontal_anchor
    LEFT: horizontal_anchor
    RIGHT: horizontal_anchor

class Label[T]:
    bg_color: indie.Color
    callout_position: indie.drawings.callout_position
    font_size: int
    position: T
    text: str
    text_color: indie.Color
    def __init__(self, text: str, position: T, *, font_size: int = 14, text_color: indie.Color = indie.color.BLACK, bg_color: indie.Color = indie.color.YELLOW, callout_position: indie.drawings.callout_position = indie.drawings.callout_position.TOP_RIGHT) -> None: ...

LabelAbs = indie.drawings.Label[indie.drawings.AbsolutePosition]
LabelRel = indie.drawings.Label[indie.drawings.RelativePosition]
class LineSegment:
    color: indie.Color
    line_style: indie.line_style
    line_width: int
    point_a: indie.drawings.AbsolutePosition
    point_b: indie.drawings.AbsolutePosition
    def __init__(self, point_a: indie.drawings.AbsolutePosition, point_b: indie.drawings.AbsolutePosition, color: indie.Color = indie.color.YELLOW, line_style: indie.line_style = indie.line_style.SOLID, line_width: int = 1) -> None: ...

class PriceHistogram:
    pass

class Rectangle:
    bg_color: indie.Color
    line_color: indie.Color
    line_style: indie.line_style
    line_width: int
    middle_line_color: indie.Color
    middle_line_style: indie.line_style
    middle_line_width: int
    point_a: indie.drawings.AbsolutePosition
    point_b: indie.drawings.AbsolutePosition
    def __init__(self, point_a: indie.drawings.AbsolutePosition, point_b: indie.drawings.AbsolutePosition, line_style: indie.line_style = indie.line_style.SOLID, line_width: int = 1, line_color: indie.Color = indie.color.YELLOW, bg_color: indie.Color = indie.color.TRANSPARENT, middle_line_style: indie.line_style = indie.line_style.DOTTED, middle_line_width: int = 1, middle_line_color: indie.Color = indie.color.TRANSPARENT) -> None: ...

class relative_position(Enum):
    BOTTOM_CENTER: relative_position
    BOTTOM_LEFT: relative_position
    BOTTOM_RIGHT: relative_position
    MIDDLE_CENTER: relative_position
    MIDDLE_LEFT: relative_position
    MIDDLE_RIGHT: relative_position
    TOP_CENTER: relative_position
    TOP_LEFT: relative_position
    TOP_RIGHT: relative_position

class RelativePosition:
    horizontal_anchor: indie.drawings.horizontal_anchor
    left_right_ratio: float
    top_bottom_ratio: float
    vertical_anchor: indie.drawings.vertical_anchor
    def __init__(self, vertical_anchor: indie.drawings.vertical_anchor, horizontal_anchor: indie.drawings.horizontal_anchor, top_bottom_ratio: float, left_right_ratio: float) -> None: ...

class Table:
    bg_color: indie.Color
    font_size: int
    frame_color: indie.Color
    frame_width: int
    grid_color: indie.Color
    grid_width: int
    position: indie.drawings.RelativePosition
    rows_data: list[indie.drawings.TableRow]
    text_color: indie.Color
    def __getitem__(self, index: int) -> indie.drawings.TableRow: ...
    def __init__(self, position: indie.drawings.RelativePosition = indie.drawings.relative_position.TOP_RIGHT, rows_data: list[indie.drawings.TableRow] = [], bg_color: indie.Optional[indie.Color] = None, frame_color: indie.Optional[indie.Color] = None, frame_width: int = 1, grid_color: indie.Optional[indie.Color] = None, grid_width: int = 1, text_color: indie.Optional[indie.Color] = None, font_size: int = 12) -> None: ...
    def __len__(self) -> int: ...
    def add_row(self, cells: list[str]) -> None: ...
    def append(self, row: indie.drawings.TableRow) -> None: ...
    def clear(self) -> None: ...

class TableCell:
    bg_color: indie.Optional[indie.Color]
    text_color: indie.Optional[indie.Color]
    value: str
    def __init__(self, value: str, text_color: indie.Optional[indie.Color] = None, bg_color: indie.Optional[indie.Color] = None) -> None: ...
    def get(self) -> str: ...
    def set(self, value: str) -> None: ...

class TableRow:
    cells: list[indie.drawings.TableCell]
    def __getitem__(self, index: int) -> indie.drawings.TableCell: ...
    def __init__(self, cells: list[indie.drawings.TableCell] = []) -> None: ...
    def __len__(self) -> int: ...

class Triangle:
    bg_color: indie.Color
    line_color: indie.Color
    line_style: indie.line_style
    line_width: int
    point_a: indie.drawings.AbsolutePosition
    point_b: indie.drawings.AbsolutePosition
    point_c: indie.drawings.AbsolutePosition
    def __init__(self, point_a: indie.drawings.AbsolutePosition, point_b: indie.drawings.AbsolutePosition, point_c: indie.drawings.AbsolutePosition, line_style: indie.line_style = indie.line_style.SOLID, line_width: int = 1, line_color: indie.Color = indie.color.YELLOW, bg_color: indie.Color = indie.color.TRANSPARENT) -> None: ...

class vertical_anchor(Enum):
    BOTTOM: vertical_anchor
    MIDDLE: vertical_anchor
    TOP: vertical_anchor


# indie.math
@overload
def cross(src1: indie.Series[float], src2: indie.Series[float]) -> bool: ...

@overload
def cross(src: indie.Series[float], level: float) -> bool: ...
@overload
def cross_over(src1: indie.Series[float], src2: indie.Series[float]) -> bool: ...

@overload
def cross_over(src: indie.Series[float], level: float) -> bool: ...
@overload
def cross_under(src1: indie.Series[float], src2: indie.Series[float]) -> bool: ...

@overload
def cross_under(src: indie.Series[float], level: float) -> bool: ...
def divide(numerator: float, denominator: float, default: float = math.nan) -> float: ...

# indie.plot
class Background:
    color: indie.Optional[indie.Color]
    offset: int
    outline_left: bool
    outline_right: bool
    def __init__(self, color: indie.Optional[indie.Color] = None, outline_left: bool = False, outline_right: bool = False, offset: int = 0) -> None: ...

# decorator
def background(title: indie.Optional[str] = None, color: indie.Optional[indie.Color] = None, outline_color: indie.Optional[indie.Color] = None, outline_style: indie.Optional[indie.line_style] = None, outline_width: indie.Optional[int] = None): ...
class BackgroundDisplayOptions:
    def __init__(self, *, pane: bool = False) -> None: ...

# decorator
def bar_color(title: indie.Optional[str] = None, color: indie.Optional[indie.Color] = None, display_options: indie.plot.BarColorDisplayOptions = indie.plot.BarColorDisplayOptions(pane=True)): ...
class BarColor:
    color: indie.Optional[indie.Color]
    offset: int
    def __init__(self, color: indie.Optional[indie.Color] = None, offset: int = 0) -> None: ...

class BarColorDisplayOptions:
    def __init__(self, *, pane: bool = False) -> None: ...

class Candles:
    border_color: indie.Optional[indie.Color]
    close: float
    color: indie.Optional[indie.Color]
    high: float
    low: float
    offset: int
    open: float
    wick_color: indie.Optional[indie.Color]
    def __init__(self, open: float, high: float, low: float, close: float, color: indie.Optional[indie.Color] = None, wick_color: indie.Optional[indie.Color] = None, border_color: indie.Optional[indie.Color] = None, offset: int = 0) -> None: ...

# decorator
def candles(id: indie.Optional[str] = None, title: indie.Optional[str] = None, up_color: indie.Optional[indie.Color] = None, down_color: indie.Optional[indie.Color] = None, wick_visible: bool = True, border_visible: bool = True, display_options: indie.plot.CandlesDisplayOptions = indie.plot.CandlesDisplayOptions(pane=True, status_line=True, price_label=True)): ...
class CandlesDisplayOptions:
    def __init__(self, *, pane: bool = False, status_line: bool = False, price_label: bool = False) -> None: ...

class Columns:
    color: indie.Optional[indie.Color]
    offset: int
    value: float
    def __init__(self, value: float, color: indie.Optional[indie.Color] = None, offset: int = 0) -> None: ...

# decorator
def columns(id: indie.Optional[str] = None, title: indie.Optional[str] = None, color: indie.Optional[indie.Color] = None, base_value: float = 0.0, rel_width: float = 0.8, display_options: indie.plot.ColumnsDisplayOptions = indie.plot.ColumnsDisplayOptions(pane=True, status_line=True, price_label=True)): ...
class ColumnsDisplayOptions:
    def __init__(self, *, pane: bool = False, status_line: bool = False, price_label: bool = False, price_scale_id: str = '') -> None: ...

class Fill:
    color: indie.Optional[indie.Color]
    offset: int
    def __init__(self, color: indie.Optional[indie.Color] = None, offset: int = 0) -> None: ...

# decorator
def fill(id1: str, id2: str, id: indie.Optional[str] = None, title: indie.Optional[str] = None, color: indie.Optional[indie.Color] = None): ...
class FillDisplayOptions:
    def __init__(self, *, pane: bool = False) -> None: ...

class Histogram:
    color: indie.Optional[indie.Color]
    offset: int
    value: float
    def __init__(self, value: float, color: indie.Optional[indie.Color] = None, offset: int = 0) -> None: ...

# decorator
def histogram(id: indie.Optional[str] = None, title: indie.Optional[str] = None, color: indie.Optional[indie.Color] = None, line_width: int = 1, base_value: float = 0.0, display_options: indie.plot.HistogramDisplayOptions = indie.plot.HistogramDisplayOptions(pane=True, status_line=True, price_label=True)): ...
class HistogramDisplayOptions:
    def __init__(self, *, pane: bool = False, status_line: bool = False, price_label: bool = False) -> None: ...

class Line:
    color: indie.Optional[indie.Color]
    offset: int
    value: float
    def __init__(self, value: float, color: indie.Optional[indie.Color] = None, offset: int = 0) -> None: ...

# decorator
def line(id: indie.Optional[str] = None, title: indie.Optional[str] = None, color: indie.Optional[indie.Color] = None, line_style: indie.line_style = indie.line_style.SOLID, line_width: int = 1, continuous: bool = False, display_options: indie.plot.LineDisplayOptions = indie.plot.LineDisplayOptions(pane=True, status_line=True, price_label=True)): ...
class LineDisplayOptions:
    def __init__(self, *, pane: bool = False, status_line: bool = False, price_label: bool = False, price_scale_id: str = '') -> None: ...

class Marker:
    color: indie.Optional[indie.Color]
    offset: int
    text: indie.Optional[str]
    value: float
    def __init__(self, value: float, color: indie.Optional[indie.Color] = None, text: indie.Optional[str] = None, offset: int = 0) -> None: ...

# decorator
def marker(title: indie.Optional[str] = None, color: indie.Optional[indie.Color] = None, text: indie.Optional[str] = None, style: indie.plot.marker_style = indie.plot.marker_style.CIRCLE, position: indie.plot.marker_position = indie.plot.marker_position.ABOVE, size: int = 4, display_options: indie.plot.MarkerDisplayOptions = indie.plot.MarkerDisplayOptions(pane=True, status_line=True, price_label=True)): ...
class marker_position(Enum):
    ABOVE: marker_position
    BELOW: marker_position
    CENTER: marker_position
    LEFT: marker_position
    RIGHT: marker_position

class marker_style(Enum):
    CIRCLE: marker_style
    CROSS: marker_style
    LABEL: marker_style
    NONE: marker_style

class MarkerDisplayOptions:
    def __init__(self, *, pane: bool = False, status_line: bool = False, price_label: bool = False) -> None: ...

class Steps:
    color: indie.Optional[indie.Color]
    offset: int
    value: float
    def __init__(self, value: float, color: indie.Optional[indie.Color] = None, offset: int = 0) -> None: ...

# decorator
def steps(id: indie.Optional[str] = None, title: indie.Optional[str] = None, color: indie.Optional[indie.Color] = None, line_width: int = 1, display_options: indie.plot.StepsDisplayOptions = indie.plot.StepsDisplayOptions(pane=True, status_line=True, price_label=True)): ...
class StepsDisplayOptions:
    def __init__(self, *, pane: bool = False, status_line: bool = False, price_label: bool = False) -> None: ...


# indie.schedule
ALL_DAYS: list[indie.schedule.week_day]
class Schedule:
    @overload
    def __contains__(self, t: float) -> bool: ...

    @overload
    def __contains__(self, d: datetime.datetime) -> bool: ...
    def __init__(self, rules: list[indie.schedule.ScheduleRule], except_once: list[datetime.datetime] = [], except_yearly: list[datetime.datetime] = [], timezone: str = "UTC") -> None: ...
    def is_empty(self) -> bool: ...
    def is_same_period(self, timestamp1: float, timestamp2: float) -> bool: ...

class ScheduleRule:
    def __init__(self, start: datetime.time, end: datetime.time, days: list[indie.schedule.week_day] = indie.schedule.ALL_DAYS) -> None: ...

class week_day(Enum):
    FRIDAY: week_day
    MONDAY: week_day
    SATURDAY: week_day
    SUNDAY: week_day
    THURSDAY: week_day
    TUESDAY: week_day
    WEDNESDAY: week_day

WEEKEND: list[indie.schedule.week_day]
WORKDAYS: list[indie.schedule.week_day]

# indie.strategies
class AmendOrderBuilder:
    def limit(self, price: float) -> indie.strategies.AmendOrderBuilder: ...
    def size(self, size: float) -> indie.strategies.AmendOrderBuilder: ...
    def stop(self, price: float) -> indie.strategies.AmendOrderBuilder: ...
    def stop_loss(self, stop: float, *, limit: indie.Optional[float] = None) -> indie.strategies.AmendOrderBuilder: ...
    def submit(self) -> None: ...
    def take_profit(self, stop: float, *, limit: indie.Optional[float] = None) -> indie.strategies.AmendOrderBuilder: ...

class Commission:
    def __init__(self, value: float, commission_type: indie.strategies.commission_type) -> None: ...

class commission_type(Enum):
    FIXED: commission_type
    PERCENT: commission_type

class ExitOrder:
    limit: indie.Optional[float]
    stop: float

class InstrumentInfo:
    min_order_size: float
    min_order_value: float

class intrabar_order_filter(Enum):
    FIRST_IN_BAR: intrabar_order_filter
    LAST_IN_BAR: intrabar_order_filter
    NO_FILTER: intrabar_order_filter
    ON_BAR_CLOSE: intrabar_order_filter

class market_order_price(Enum):
    BAR_OPEN_PRICE: market_order_price
    MARKET_PRICE: market_order_price
    ORDER_CREATION_PRICE: market_order_price

class Order:
    execution_type: indie.strategies.order_execution_type
    id: str
    limit: indie.Optional[float]
    side: indie.strategies.order_side
    size: float
    status: indie.strategies.order_status
    stop: indie.Optional[indie.strategies.Stop]
    stop_loss: indie.Optional[indie.strategies.ExitOrder]
    take_profit: indie.Optional[indie.strategies.ExitOrder]
    def amend(self) -> indie.strategies.AmendOrderBuilder: ...
    def cancel(self) -> None: ...

class order_execution_type(Enum):
    LIMIT: order_execution_type
    MARKET: order_execution_type
    STOP: order_execution_type
    STOP_LIMIT: order_execution_type

class order_side(Enum):
    BUY: order_side
    SELL: order_side

class order_status(Enum):
    CANCELED: order_status
    CREATED: order_status
    FILLED: order_status
    PARTIALLY_FILLED: order_status
    PARTIALLY_FILLED_CLOSED: order_status
    PENDING_PLACED: order_status
    PLACED: order_status
    REJECTED: order_status

class PlaceOrderBuilder:
    def limit(self, price: float) -> indie.strategies.PlaceOrderBuilder: ...
    def stop(self, price: float, direction: indie.strategies.trigger_direction = indie.strategies.trigger_direction.AUTO) -> indie.strategies.PlaceOrderBuilder: ...
    def stop_loss(self, stop: float, *, limit: indie.Optional[float] = None) -> indie.strategies.PlaceOrderBuilder: ...
    def submit(self) -> indie.strategies.Order: ...
    def take_profit(self, stop: float, *, limit: indie.Optional[float] = None) -> indie.strategies.PlaceOrderBuilder: ...

class Position:
    price: float
    size: float

class Stop:
    direction: indie.strategies.trigger_direction
    price: float

class Trading:
    cash: float
    instrument_info: indie.strategies.InstrumentInfo
    position: indie.strategies.Position
    def amend_order(self, id: str) -> indie.strategies.AmendOrderBuilder: ...
    def cancel_order(self, id: str) -> None: ...
    def place_order(self, side: indie.strategies.order_side = indie.strategies.order_side.BUY, size: float = 1.0) -> indie.strategies.PlaceOrderBuilder: ...

class trigger_direction(Enum):
    AUTO: trigger_direction
    FALLS_TO: trigger_direction
    RISES_TO: trigger_direction


# math
def acos(x: float) -> float: ...
def asin(x: float) -> float: ...
def atan(x: float) -> float: ...
def ceil(x: float) -> int: ...
def cos(x: float) -> float: ...
e: float
def exp(x: float) -> float: ...
def exp2(x: float) -> float: ...
def floor(x: float) -> int: ...
inf: float
def isclose(x: float, y: float, *, rel_tol: float = 1e-9, abs_tol: float = 0.0) -> bool: ...
def isnan(x: float) -> bool: ...
def log(x: float) -> float: ...
def log10(x: float) -> float: ...
def log2(x: float) -> float: ...
nan: float
pi: float
def pow(x: float, y: float) -> float: ...
def sin(x: float) -> float: ...
def sqrt(x: float) -> float: ...
def tan(x: float) -> float: ...

# sortedcontainers
class SortedList:
    def __contains__(self, x: float) -> bool: ...
    def __getitem__(self, i: int) -> float: ...
    def __init__(self, lst: indie.Optional[list[float]] = None) -> None: ...
    def __len__(self) -> int: ...
    def add(self, value: float) -> None: ...
    def remove(self, x: float) -> None: ...


# statistics
def fmean(data: list[float]) -> float: ...
@overload
def mean(data: list[float]) -> float: ...

@overload
def mean(data: list[int]) -> float: ...
def median(data: list[float]) -> float: ...
def mode(data: list[float]) -> float: ...
def pstdev(data: list[float]) -> float: ...
def stdev(data: list[float]) -> float: ...

# builtins
@overload
def abs(x: int) -> int: ...

@overload
def abs(x: float) -> float: ...
class bool:
    @overload
    def __init__(self, x: bool) -> None: ...

    @overload
    def __init__(self, x: int) -> None: ...

    @overload
    def __init__(self, x: float) -> None: ...

    @overload
    def __init__(self, x: str) -> None: ...

    @overload
    def __init__(self, x: NoneType) -> None: ...

class dict[K, V]:
    def __bool__(self) -> bool: ...
    def __contains__(self, key: K) -> bool: ...
    def __delitem__(self, key: K) -> None: ...
    def __getitem__(self, key: K) -> V: ...
    def __len__(self) -> int: ...
    def __setitem__(self, key: K, value: V) -> None: ...
    def clear(self) -> None: ...
    def copy(self) -> dict[K, V]: ...
    def get(self, key: K, default: V) -> V: ...
    def keys(self) -> list[K]: ...
    def pop(self, key: K) -> V: ...
    def values(self) -> list[V]: ...

def enumerate(iterable: iterable[T], start: int = 0) -> enumerate_t[T]: ...
False: bool
class float:
    @overload
    def __init__(self, x: float) -> None: ...

    @overload
    def __init__(self, x: int) -> None: ...

    @overload
    def __init__(self, x: str) -> None: ...

    @overload
    def __init__(self, x: bool) -> None: ...

class int:
    @overload
    def __init__(self, x: int) -> None: ...

    @overload
    def __init__(self, x: float) -> None: ...

    @overload
    def __init__(self, x: str) -> None: ...

    @overload
    def __init__(self, x: bool) -> None: ...

def len(x: typing.Any) -> int: ...
class list[T]:
    def __add__(self, l: list[T]) -> list[T]: ...
    def __bool__(self) -> bool: ...
    def __contains__(self, x: T) -> bool: ...
    def __delitem__(self, i: int) -> None: ...
    def __delslice__(self, start: indie.Optional[int] = None, stop: indie.Optional[int] = None, step: int = 1) -> None: ...
    def __getitem__(self, i: int) -> T: ...
    def __getslice__(self, start: indie.Optional[int] = None, stop: indie.Optional[int] = None, step: int = 1) -> list[T]: ...
    def __len__(self) -> int: ...
    def __mul__(self, n: int) -> list[T]: ...
    def __setitem__(self, i: int, x: T) -> None: ...
    def __setslice__(self, start: indie.Optional[int] = None, stop: indie.Optional[int] = None, step: int = 1, new_list: list[T]) -> None: ...
    def append(self, x: T) -> None: ...
    def clear(self) -> None: ...
    def copy(self) -> list[T]: ...
    def extend(self, l: list[T]) -> None: ...
    def index(self, x: T) -> int: ...
    def insert(self, i: int, x: T) -> None: ...
    def pop(self, i: int = -1) -> T: ...
    def remove(self, x: T) -> None: ...
    def reverse(self) -> None: ...

@overload
def max(x: int, y: int) -> int: ...

@overload
def max(x: int, y: int, z: int) -> int: ...

@overload
def max(x: float, y: float) -> float: ...

@overload
def max(x: float, y: float, z: float) -> float: ...

@overload
def max(l: list[int]) -> int: ...

@overload
def max(l: list[float]) -> float: ...
@overload
def min(x: int, y: int) -> int: ...

@overload
def min(x: int, y: int, z: int) -> int: ...

@overload
def min(x: float, y: float) -> float: ...

@overload
def min(x: float, y: float, z: float) -> float: ...

@overload
def min(l: list[int]) -> int: ...

@overload
def min(l: list[float]) -> float: ...
None: NoneType
class NoneType:
    pass

class range:
    @overload
    def __init__(self, stop: int) -> None: ...

    @overload
    def __init__(self, start: int, stop: int, step: int = 1) -> None: ...

@overload
def round(number: float) -> int: ...

@overload
def round(number: float, ndigits: indie.Optional[int] = None) -> float: ...
class str:
    def __add__(self, s: str) -> str: ...
    def __contains__(self, s: str) -> bool: ...
    def __getitem__(self, i: int) -> str: ...
    def __getslice__(self, start: indie.Optional[int] = None, stop: indie.Optional[int] = None, step: int = 1) -> str: ...
    @overload
    def __init__(self, x: int) -> None: ...

    @overload
    def __init__(self, x: float) -> None: ...

    @overload
    def __init__(self, x: str) -> None: ...

    @overload
    def __init__(self, x: bool) -> None: ...
    def __len__(self) -> int: ...
    def __mul__(self, n: int) -> str: ...
    def capitalize(self) -> str: ...
    def center(self, length: int, character: str = " ") -> str: ...
    def count(self, value: str, start: int, end: int) -> int: ...
    def endswith(self, value: str, start: int, end: int) -> bool: ...
    def find(self, value: str, start: int, end: int) -> int: ...
    def index(self, value: str, start: int, end: int) -> int: ...
    def isalpha(self) -> bool: ...
    def islower(self) -> bool: ...
    def isspace(self) -> bool: ...
    def isupper(self) -> bool: ...
    def join(self, l: list[str]) -> str: ...
    def ljust(self, length: int, character: str = " ") -> str: ...
    def lower(self) -> str: ...
    def lstrip(self, symbols: str = " ") -> str: ...
    def partition(self, s: str) -> list[str]: ...
    def replace(self, oldvalue: str, newvalue: str, count: int = -1) -> str: ...
    def rfind(self, value: str, start: int, end: int) -> int: ...
    def rindex(self, value: str, start: int, end: int) -> int: ...
    def rjust(self, length: int, character: str = " ") -> str: ...
    def rpartition(self, s: str) -> list[str]: ...
    def rsplit(self, separator: str = " ", maxsplit: int = -1) -> list[str]: ...
    def rstrip(self, symbols: str = " ") -> str: ...
    def split(self, separator: str = " ", maxsplit: int = -1) -> list[str]: ...
    def startswith(self, value: str, start: int, end: int) -> bool: ...
    def strip(self, symbols: str = " ") -> str: ...
    def swapcase(self) -> str: ...
    def upper(self) -> str: ...

@overload
def sum(l: list[int], start: int = 0) -> int: ...

@overload
def sum(l: list[float], start: float = 0.0) -> float: ...
True: bool
class tuple[...]:
    pass


```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.