# Valuation ## Get the current valuation for an entity `client.entities.valuation.retrieve(stringid, RequestOptionsoptions?): Valuation` **get** `/entities/{id}/valuation` Retrieve the most recent valuation with flattened asset values by type ### Parameters - `id: string` ### Returns - `Valuation` - `id: string` Unique identifier with valuationv2_ prefix - `created_at: string` Timestamp when the valuation was created - `directly_held_asset_value: number` Total value of all directly held assets in USD - `directly_held_assets: Array` List of individual assets in this valuation - `id: string` Asset ID - `asset_class: AssetClass` - `id: string` Asset class ID - `display_name: string` Display name of the asset class - `display_name: string` Display name of the asset - `value: number` Value of this asset in USD - `external_id?: string | null` External ID from the static asset (if available) - `effective_date: string` The date this valuation is effective - `entity_id: string` Entity ID this valuation belongs to - `total_value: number` Total value of all assets minus liabilities in USD - `updated_at: string` Timestamp when the valuation was last updated - `description?: string | null` Free-form notes about this valuation ### Example ```typescript import Luminary from 'withluminary'; const client = new Luminary(); const valuation = await client.entities.valuation.retrieve('id'); console.log(valuation.id); ``` #### Response ```json { "id": "valuationv2_01ARZ3NDEKTSV4RRFFQ69G5FAV", "created_at": "2024-01-15T09:30:00Z", "directly_held_asset_value": 1000000, "directly_held_assets": [ { "id": "assetv2_01ARZ3NDEKTSV4RRFFQ69G5FAV", "asset_class": { "id": "asset_class_01ARZ3NDEKTSV4RRFFQ69G5FAV", "display_name": "Equities" }, "display_name": "Apple Inc. Stock", "value": 50000, "external_id": "AAPL-12345" } ], "effective_date": "2024-01-15", "entity_id": "entity_01ARZ3NDEKTSV4RRFFQ69G5FAV", "total_value": 1000000, "updated_at": "2024-01-20T14:45:00Z", "description": "description" } ``` ## Create a new valuation for an entity `client.entities.valuation.create(stringid, ValuationCreateParamsbody, RequestOptionsoptions?): Valuation` **post** `/entities/{id}/valuation` Add a new valuation to the entity's history ### Parameters - `id: string` - `body: ValuationCreateParams` - `directly_held_assets: Array` List of assets to include in this valuation - `asset_class_id: string` Asset class ID to associate with this asset - `display_name: string` Display name of the asset - `value: number` Value of this asset in USD - `external_id?: string | null` External ID for the asset - `effective_date: string` The date this valuation is effective - `description?: string | null` Free-form notes about this valuation ### Returns - `Valuation` - `id: string` Unique identifier with valuationv2_ prefix - `created_at: string` Timestamp when the valuation was created - `directly_held_asset_value: number` Total value of all directly held assets in USD - `directly_held_assets: Array` List of individual assets in this valuation - `id: string` Asset ID - `asset_class: AssetClass` - `id: string` Asset class ID - `display_name: string` Display name of the asset class - `display_name: string` Display name of the asset - `value: number` Value of this asset in USD - `external_id?: string | null` External ID from the static asset (if available) - `effective_date: string` The date this valuation is effective - `entity_id: string` Entity ID this valuation belongs to - `total_value: number` Total value of all assets minus liabilities in USD - `updated_at: string` Timestamp when the valuation was last updated - `description?: string | null` Free-form notes about this valuation ### Example ```typescript import Luminary from 'withluminary'; const client = new Luminary(); const valuation = await client.entities.valuation.create('id', { directly_held_assets: [ { asset_class_id: 'asset_class_01ARZ3NDEKTSV4RRFFQ69G5FAV', display_name: 'Apple Inc. Stock', value: 50000, }, ], effective_date: '2024-01-15', }); console.log(valuation.id); ``` #### Response ```json { "id": "valuationv2_01ARZ3NDEKTSV4RRFFQ69G5FAV", "created_at": "2024-01-15T09:30:00Z", "directly_held_asset_value": 1000000, "directly_held_assets": [ { "id": "assetv2_01ARZ3NDEKTSV4RRFFQ69G5FAV", "asset_class": { "id": "asset_class_01ARZ3NDEKTSV4RRFFQ69G5FAV", "display_name": "Equities" }, "display_name": "Apple Inc. Stock", "value": 50000, "external_id": "AAPL-12345" } ], "effective_date": "2024-01-15", "entity_id": "entity_01ARZ3NDEKTSV4RRFFQ69G5FAV", "total_value": 1000000, "updated_at": "2024-01-20T14:45:00Z", "description": "description" } ``` ## Domain Types ### Valuation - `Valuation` - `id: string` Unique identifier with valuationv2_ prefix - `created_at: string` Timestamp when the valuation was created - `directly_held_asset_value: number` Total value of all directly held assets in USD - `directly_held_assets: Array` List of individual assets in this valuation - `id: string` Asset ID - `asset_class: AssetClass` - `id: string` Asset class ID - `display_name: string` Display name of the asset class - `display_name: string` Display name of the asset - `value: number` Value of this asset in USD - `external_id?: string | null` External ID from the static asset (if available) - `effective_date: string` The date this valuation is effective - `entity_id: string` Entity ID this valuation belongs to - `total_value: number` Total value of all assets minus liabilities in USD - `updated_at: string` Timestamp when the valuation was last updated - `description?: string | null` Free-form notes about this valuation