DeriveV3VaultPrice

Documentation for eth_defi.derive.v3_vaults.DeriveV3VaultPrice Python class.

class DeriveV3VaultPrice

Bases: object

One sampled vault performance point.

share_price is the historical mark-to-market share price reported by Derive. It can differ from the live simulated post-fee settlement price.

See public/get_vault_performance_history.

Attributes summary

subaccount_id

Native vault subaccount ID.

timestamp

Naive UTC observation time.

share_price

Historical USD price per native share.

nav_usd

Vault NAV in USD, or None when the API cannot value the vault.

total_shares

Outstanding native shares.

Methods summary

__init__(subaccount_id, timestamp, ...)

from_api(subaccount_id, value)

Parse a performance point and normalise its Unix timestamp.

subaccount_id: int

Native vault subaccount ID.

timestamp: datetime.datetime

Naive UTC observation time.

share_price: decimal.Decimal

Historical USD price per native share.

nav_usd: Optional[decimal.Decimal]

Vault NAV in USD, or None when the API cannot value the vault.

total_shares: decimal.Decimal

Outstanding native shares.

classmethod from_api(subaccount_id, value)

Parse a performance point and normalise its Unix timestamp.

Derive’s OpenAPI text describes milliseconds. Testnet responses on 24 September 2026 used seconds, so the parser accepts both units.

Parameters
  • subaccount_id (int) – Vault subaccount ID from the request.

  • value (dict) – VaultPerformancePointResponse object.

Returns

Parsed performance observation.

Return type

eth_defi.derive.v3_vaults.DeriveV3VaultPrice

__init__(subaccount_id, timestamp, share_price, nav_usd, total_shares)
Parameters
Return type

None