Class: Portfolios
Defined in: src/api/entities/Identity/Portfolios.ts:35
Handles all Portfolio related functionality on the Identity side
Extends
Namespace
<Identity
>
Methods
delete()
delete(
args
:object
,opts?
:ProcedureOpts
):Promise
<GenericPolymeshTransaction
<void
,void
>>
Defined in: src/api/entities/Identity/Portfolios.ts:224
Delete a Portfolio by ID
Parameters
Parameter | Type | Description |
---|---|---|
| { | ‐ |
|
| Portfolio instance or portfolio ID to delete |
| ‐ |
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
getCustodiedPortfolios()
getCustodiedPortfolios(
paginationOpts?
:PaginationOptions
):Promise
<ResultSet
<DefaultPortfolio
|NumberedPortfolio
>>
Defined in: src/api/entities/Identity/Portfolios.ts:96
Retrieve all Portfolios custodied by this Identity. This only includes portfolios owned by a different Identity but custodied by this one. To fetch Portfolios owned by this Identity, use getPortfolios
Parameters
Parameter | Type | Description |
---|---|---|
| Optional pagination options |
Returns
Promise
<ResultSet
<DefaultPortfolio
| NumberedPortfolio
>>
A ResultSet of portfolios (Default or Numbered) and pagination metadata
Note
supports pagination
getPortfolio()
Call Signature
getPortfolio():
Promise
<DefaultPortfolio
>
Defined in: src/api/entities/Identity/Portfolios.ts:143
Retrieve the Default Portfolio for this Identity
Returns
Promise
<DefaultPortfolio
>
Promise that resolves to the Default Portfolio
Call Signature
getPortfolio(
args
:object
):Promise
<NumberedPortfolio
>
Defined in: src/api/entities/Identity/Portfolios.ts:151
Retrieve a Numbered Portfolio by its ID
Parameters
Parameter | Type | Description |
---|---|---|
| { | ‐ |
|
| ID of the Portfolio to retrieve |
Returns
Promise
<NumberedPortfolio
>
Promise that resolves to the requested Numbered Portfolio
getPortfolioByName()
getPortfolioByName(
args
:object
):Promise
<NumberedPortfolio
>
Defined in: src/api/entities/Identity/Portfolios.ts:188
Retrieve a Numbered Portfolio by its name
Parameters
Parameter | Type | Description |
---|---|---|
| { | ‐ |
|
| Name of the Portfolio to fetch |
Returns
Promise
<NumberedPortfolio
>
Promise that resolves to the Portfolio with the given name
Throws
if no Portfolio exists with the given name
getPortfolios()
getPortfolios():
Promise
<[DefaultPortfolio
,...NumberedPortfolio[]
]>
Defined in: src/api/entities/Identity/Portfolios.ts:62
Retrieve all the 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
getTransactionHistory()
getTransactionHistory(
filters
:object
):Promise
<HistoricSettlement
[]>
Defined in: src/api/entities/Identity/Portfolios.ts:236
Retrieve a list of transactions where this identity was involved. Can be filtered using parameters
Parameters
Parameter | Type | Description |
---|---|---|
| { | ‐ |
|
| Account involved in the settlement |
|
| Asset ID to filter by (overrides ticker if both provided) |
|
| ticker involved in the transaction |
Returns
Promise
<HistoricSettlement
[]>
Promise that resolves to an array of historical settlements
Note
uses the middlewareV2