Skip to content
Get started

Create a new valuation for an entity

client.Entities.Valuation.New(ctx, id, body) (*Valuation, error)
post/entities/{id}/valuation

Add a new valuation to the entity's history

ParametersExpand Collapse
id string
body EntityValuationNewParams
DirectlyHeldAssets param.Field[[]EntityValuationNewParamsDirectlyHeldAsset]

List of assets to include in this valuation

AssetClassID string

Asset class ID to associate with this asset

DisplayName string

Display name of the asset

minLength1
Value float64

Value of this asset in USD

formatdouble
ExternalID stringoptional

External ID for the asset

minLength1
EffectiveDate param.Field[Time]

The date this valuation is effective

formatdate
Description param.Field[string]optional

Free-form notes about this valuation

maxLength2048
ReturnsExpand Collapse
type Valuation struct{…}
ID string

Unique identifier with valuationv2_ prefix

CreatedAt Time

Timestamp when the valuation was created

formatdate-time
DirectlyHeldAssetValue float64

Total value of all directly held assets in USD

formatdouble
DirectlyHeldAssets []ValuationDirectlyHeldAsset

List of individual assets in this valuation

ID string

Asset ID

AssetClass ValuationDirectlyHeldAssetAssetClass
ID string

Asset class ID

DisplayName string

Display name of the asset class

DisplayName string

Display name of the asset

Value float64

Value of this asset in USD

formatdouble
ExternalID stringoptional

External ID from the static asset (if available)

EffectiveDate Time

The date this valuation is effective

formatdate
EntityID string

Entity ID this valuation belongs to

TotalValue float64

Total value of all assets minus liabilities in USD

formatdouble
UpdatedAt Time

Timestamp when the valuation was last updated

formatdate-time
Description stringoptional

Free-form notes about this valuation

maxLength2048
Create a new valuation for an entity
package main

import (
  "context"
  "fmt"
  "time"

  "github.com/withluminary/go-sdk"
  "github.com/withluminary/go-sdk/option"
)

func main() {
  client := withluminary.NewClient(
    option.WithClientID("My Client ID"),
    option.WithClientSecret("My Client Secret"),
  )
  valuation, err := client.Entities.Valuation.New(
    context.TODO(),
    "id",
    withluminary.EntityValuationNewParams{
      DirectlyHeldAssets: []withluminary.EntityValuationNewParamsDirectlyHeldAsset{withluminary.EntityValuationNewParamsDirectlyHeldAsset{
        AssetClassID: "asset_class_01ARZ3NDEKTSV4RRFFQ69G5FAV",
        DisplayName: "Apple Inc. Stock",
        Value: 50000,
      }},
      EffectiveDate: time.Now(),
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", valuation.ID)
}
{
  "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"
}
Returns Examples
{
  "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"
}