Skip to content

Index Class

Index

Bases: ObjectBase

Represents a index.

Example
from fmd import FmdApi

fa = FmdApi()
index = fa.index.get(symbol='LI0001')

Attributes:

Name Type Description
symbol str

The symbol of the index.

Methods:

Name Description
get_price

Retrieves the price data for the index within the specified date range.

get_profile

Retrieves the profile information of the index.

get_price(start_date=None, end_date=None)

Retrieves the price data for the index within the specified date range. Default data range is last 30 days.

Parameters:

Name Type Description Default
start_date str | date | None

The start date for the price data.

None
end_date str | date | None

The end date for the price data.

None

Returns:

Type Description
list[IndexPrice]

A list of IndexPrice objects containing price information.

get_profile()

Retrieves the profile for the index.

Returns:

Type Description
IndexProfile

A IndexProfile object containing the profile information of the index.

IndexManager

Bases: ManagerBase

Manages multiple Index objects.

Methods:

Name Description
get

Retrieves a Index object based on the provided symbol.

get_available_list

Retrieves a list of available indexs with their profiles.

get(symbol)

Retrieves a Index object based on the provided symbol.

Parameters:

Name Type Description Default
symbol str

The symbol of the index to retrieve.

required

Returns:

Type Description
Index

A Index object corresponding to the provided symbol.

get_available_list()

Retrieves a list of available indexs with their profiles.

Returns:

Type Description
list[IndexProfile]

A list of IndexProfile objects containing the profile information of available indexs.