Skip to content

ETF Class

ETF

Bases: ObjectBase

Represents an Exchange Traded Fund (ETF).

Example
from fmd import FmdApi

fa = FmdApi()
etf = fa.etf.get(symbol='0050')

Attributes:

Name Type Description
symbol str

The symbol of the ETF.

Methods:

Name Description
get_price

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

get_dividend

Retrieves the dividend data for the ETF within the specified year range.

get_dividend(start_year=None, end_year=None)

Retrieves the dividend data for the ETF within the specified year range. Default data range is last 3 years.

Parameters:

Name Type Description Default
start_year int | None

The start year for the dividend data.

None
end_year int | None

The end year for the dividend data.

None

Returns:

Type Description
list[ETFDividend]

A list of ETFDividend objects containing dividend information.

get_institution_trade_summary(start_date=None, end_date=None)

Retrieves the institution trade summary for the ETF 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 data.

None
end_date str | date | None

The end date for data.

None

Returns:

Type Description
list[ETFInstitutionTradeSummary]

A list of ETFInstitutionTradeSummary objects containing institutions trade summary.

get_margin_balance(start_date=None, end_date=None)

Retrieves the margin balance data for the ETF 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 data.

None
end_date str | date | None

The end date for data.

None

Returns:

Type Description
list[ETFMarginBalance]

A list of ETFMarginBalance objects containing margin balance information.

get_price(start_date=None, end_date=None)

Retrieves the price data for the ETF 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[ETFPrice]

A list of ETFPrice objects containing price information.

get_profile()

Retrieves the profile for the ETF.

Returns:

Type Description
ETFProfile

A ETFProfile object containing the profile information of the ETF.

ETFManager

Bases: ManagerBase

Manages multiple ETF objects.

Methods:

Name Description
get

Retrieves an ETF object based on the provided symbol.

get_available_list

Retrieves a list of available ETFs with their profiles.

get(symbol)

Retrieves an ETF object based on the provided symbol.

Parameters:

Name Type Description Default
symbol str

The symbol of the ETF to retrieve.

required

Returns:

Type Description
ETF

An ETF object corresponding to the provided symbol.

get_available_list()

Retrieves a list of available ETFs with their profiles.

Returns:

Type Description
list[ETFProfile]

A list of ETFProfile objects containing the profile information of available ETFs.