Class: NumberedPortfolio
api/entities/NumberedPortfolio.NumberedPortfolio
Represents a numbered (non-default) Portfolio for an Identity
Hierarchy
-
↳
NumberedPortfolio
Properties
id
• id: BigNumber
Portfolio identifier number
Defined in
api/entities/NumberedPortfolio.ts:40
owner
• owner: Identity
Identity of the Portfolio's owner
Inherited from
Defined in
api/entities/Portfolio/index.ts:71
uuid
• uuid: string
Inherited from
Defined in
Methods
createdAt
▸ createdAt(): Promise
<null
| EventIdentifier
>
Retrieve the identifier data (block number, date and event index) of the event that was emitted when this Portfolio was created
Returns
Promise
<null
| EventIdentifier
>
Note
uses the middlewareV2
Note
there is a possibility that the data is not ready by the time it is requested. In that case, null
is returned
Defined in
api/entities/NumberedPortfolio.ts:107
exists
▸ exists(): Promise
<boolean
>
Return whether this Portfolio exists
Returns
Promise
<boolean
>
Overrides
Defined in
api/entities/NumberedPortfolio.ts:133
getAssetBalances
▸ getAssetBalances(args?
): Promise
<PortfolioBalance
[]>
Retrieve the balances of all Assets in this Portfolio
Parameters
Name | Type | Description |
---|---|---|
args? | Object | - |
args.assets | (string | Asset )[] | array of Assets (or tickers) for which to fetch balances (optional, all balances are retrieved if not passed) |
Returns
Promise
<PortfolioBalance
[]>
Inherited from
Defined in
api/entities/Portfolio/index.ts:137
getCustodian
▸ getCustodian(): Promise
<Identity
>
Retrieve the custodian Identity of this Portfolio
Returns
Promise
<Identity
>
Note
if no custodian is set, the owner Identity is returned
Inherited from
Defined in
api/entities/Portfolio/index.ts:259
getName
▸ getName(): Promise
<string
>
Return the Portfolio name
Returns
Promise
<string
>
Defined in
api/entities/NumberedPortfolio.ts:73
getTransactionHistory
▸ getTransactionHistory(filters?
): Promise
<HistoricSettlement
[]>
Retrieve a list of transactions where this portfolio was involved. Can be filtered using parameters
Parameters
Name | Type | Description |
---|---|---|
filters | Object | - |
filters.account? | string | Account involved in the settlement |
filters.ticker? | string | ticker involved in the transaction |
Returns
Promise
<HistoricSettlement
[]>
Note
uses the middlewareV2
Inherited from
Portfolio.getTransactionHistory
Defined in
api/entities/Portfolio/index.ts:301
isCustodiedBy
▸ isCustodiedBy(args?
): Promise
<boolean
>
Return whether an Identity is the Portfolio custodian
Parameters
Name | Type | Description |
---|---|---|
args? | Object | - |
args.identity | string | Identity | optional, defaults to the signing Identity |
Returns
Promise
<boolean
>
Inherited from
Defined in
api/entities/Portfolio/index.ts:121
isEqual
▸ isEqual(entity
): boolean
Determine whether this Entity is the same as another one
Parameters
Name | Type |
---|---|
entity | Entity <unknown , unknown > |
Returns
boolean