Skip to main content
Version: v28.0.x

Class: Portfolios

api/entities/Identity/Portfolios.Portfolios

Handles all Portfolio-related functionality on the Identity side

Hierarchy

Methods

delete

delete(args, opts?): Promise<GenericPolymeshTransaction<void, void>>

Delete a Portfolio

Parameters

NameTypeDescription
argsObject-
args.portfolioBigNumber | NumberedPortfolioPortfolio instance or portfolio ID to delete
opts?ProcedureOpts-

Returns

Promise<GenericPolymeshTransaction<void, void>>

Note

The calling Identity must be the custodian of the Portfolio

Note

this method is of type ProcedureMethod, which means you can call delete.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it

Defined in

api/entities/Identity/Portfolios.ts:231


getCustodiedPortfolios

getCustodiedPortfolios(paginationOpts?): Promise<ResultSet<DefaultPortfolio | NumberedPortfolio>>

Retrieve all Portfolios currently custodied by this Identity

These include portfolios owned by another Identity but with this one as custodian. To fetch portfolios actually owned by this Identity, use getPortfolios.

Parameters

NameTypeDescription
paginationOpts?PaginationOptionsOptional pagination options

Returns

Promise<ResultSet<DefaultPortfolio | NumberedPortfolio>>

A ResultSet of portfolios (Default or Numbered) and pagination metadata

Note

supports pagination

Defined in

api/entities/Identity/Portfolios.ts:97


getPortfolio

getPortfolio(): Promise<DefaultPortfolio>

Retrieve the Default Portfolio owned by this Identity

Returns

Promise<DefaultPortfolio>

The Default Portfolio

Defined in

api/entities/Identity/Portfolios.ts:144

getPortfolio(args): Promise<NumberedPortfolio>

Retrieve a Numbered Portfolio owned by this Identity

Parameters

NameTypeDescription
argsObject-
args.portfolioIdBigNumberThe ID of the Numbered Portfolio to retrieve

Returns

Promise<NumberedPortfolio>

The requested Numbered Portfolio

Throws

If the specified Numbered Portfolio does not exist

Defined in

api/entities/Identity/Portfolios.ts:154


getPortfolioByName

getPortfolioByName(args): Promise<NumberedPortfolio>

Retrieve a Numbered Portfolio by name

Parameters

NameTypeDescription
argsObject-
args.namestringName of the Portfolio to fetch

Returns

Promise<NumberedPortfolio>

The Portfolio with the given name

Throws

If no Portfolio exists with the specified name

Defined in

api/entities/Identity/Portfolios.ts:192


getPortfolios

getPortfolios(): Promise<[DefaultPortfolio, ...NumberedPortfolio[]]>

Retrieve all Portfolios owned by this Identity

Returns

Promise<[DefaultPortfolio, ...NumberedPortfolio[]]>

An array where the first item is always the Default Portfolio, followed by any Numbered Portfolios owned by this Identity

Defined in

api/entities/Identity/Portfolios.ts:63


getTransactionHistory

getTransactionHistory(filters?): Promise<HistoricSettlement[]>

Retrieve historical transaction activity involving portfolios of this Identity

This includes transfers and settlements that involved any portfolio owned by this Identity.

Parameters

NameTypeDescription
filtersObject-
filters.account?stringAccount address involved in the settlement
filters.assetId?stringAsset ID to filter by (overrides ticker if both provided)
filters.ticker?stringAsset ticker to filter by

Returns

Promise<HistoricSettlement[]>

An array of historical settlements related to this Identity

Defined in

api/entities/Identity/Portfolios.ts:245