RawLedgerUpdate

Documentation for eth_defi.hyperliquid.deposit.RawLedgerUpdate Python class.

class RawLedgerUpdate

Bases: object

Parsed ledger update data from Hyperliquid API.

This is an intermediate representation of raw API ledger data with proper typing.

Attributes summary

timestamp_ms

Timestamp in milliseconds

hash

Transaction hash

delta

Delta type and data

timestamp

Convert millisecond timestamp to datetime.

Methods summary

__init__(timestamp_ms, hash, delta)

from_api_response(data)

Parse a ledger update from API response data.

timestamp_ms: int

Timestamp in milliseconds

hash: str | None

Transaction hash

delta: dict

Delta type and data

classmethod from_api_response(data)

Parse a ledger update from API response data.

Parameters

data (dict) – Raw ledger update dict from API

Returns

Parsed RawLedgerUpdate object

Return type

eth_defi.hyperliquid.deposit.RawLedgerUpdate

property timestamp: datetime.datetime

Convert millisecond timestamp to datetime.

__init__(timestamp_ms, hash, delta)
Parameters
  • timestamp_ms (int) –

  • hash (str | None) –

  • delta (dict) –

Return type

None