create_hyperliquid_vault_row

Documentation for eth_defi.hyperliquid.vault_data_export.create_hyperliquid_vault_row function.

create_hyperliquid_vault_row(vault_address, name, description, tvl, create_time, follower_count=None, is_closed=False, allow_deposits=True, relationship_type='normal', leader_fraction=None)

Create a synthetic VaultRow for a Hyperliquid native vault.

Builds a VaultRow that matches what calculate_vault_record() expects, using the Hypercore synthetic chain ID.

User-created vaults (relationship_type="normal") use the fixed platform performance fee HYPERLIQUID_VAULT_PERFORMANCE_FEE. Protocol vaults (HLP and its children with relationship_type="parent" or "child") have zero fees.

Parameters
  • vault_address (eth_typing.evm.HexAddress) – Vault hex address (will be lowercased).

  • name (str) – Vault display name.

  • description (str | None) – Vault description text.

  • tvl (float) – Current TVL in USD.

  • create_time (datetime.datetime | None) – Vault creation timestamp.

  • follower_count (int | None) – Number of vault depositors.

  • is_closed (bool) – Whether the vault is closed for new deposits.

  • allow_deposits (bool) – Whether the vault allows deposits. A vault can have is_closed=False but allow_deposits=False.

  • relationship_type (str) – Vault relationship type from the API: "normal" for user-created vaults, "parent" for HLP, "child" for HLP sub-vaults.

  • leader_fraction (float | None) – Leader’s fraction of total vault capital (e.g. 0.10 = 10%). Used for _get_deposit_closed_reason() to warn when close to the Hyperliquid 5% minimum.

Returns

Tuple of (VaultSpec, VaultRow).

Return type

tuple[eth_defi.vault.base.VaultSpec, eth_defi.vault.vaultdb.VaultRow]