Docs

GetMiscEvents - Get Miscellaneous Event Data

Retrieve miscellaneous events at a specific position from Hyperliquid L1 Gateway via gRPC. Get non-fill balance-affecting events for analysis and reconciliation.

Retrieve miscellaneous events at a specific position from the Hyperliquid L1 Gateway.

Full Code Examples

Clone our gRPC Code Examples Repository for complete, runnable implementations in Go, Python, and Node.js.

When to Use This Method

GetMiscEvents is essential for:

  • Reconciliation - Verify deposits, withdrawals, and transfers at a specific block
  • Historical Analysis - Retrieve misc events for reporting or accounting
  • Auditing - Confirm staking and validator reward activity at a specific block
  • Debugging - Investigate specific events during development

Method Signature

protobuf
rpc GetMiscEvents(Position) returns (BlockMiscEvents) {}

Common Use Cases

1. Inspect a Single Block

Python
def get_block_misc_events(client, metadata, block_height):
    request = hyperliquid_pb2.Position(block_height=block_height)
    response = client.GetMiscEvents(request, metadata=metadata)
    block = json.loads(response.data)

    for event in block.get('events', []):
        kind = next(iter(event['inner']))  # the discriminator key
        print(kind, event['hash'])

2. Replay a Block Range

Python
def replay_misc_events(client, metadata, start_block, end_block):
    for block_height in range(start_block, end_block + 1):
        request = hyperliquid_pb2.Position(block_height=block_height)
        response = client.GetMiscEvents(request, metadata=metadata)
        process(json.loads(response.data))

Misc Event Field Reference

GetMiscEvents returns the same format as StreamMiscEvents. See the StreamMiscEvents documentation for the complete field reference, including the block envelope and per-event type shapes.

Best Practices

  1. Position Selection: Use block height for precise queries; timestamps may resolve to different blocks across requests
  2. Defensive Parsing: Branch on the key inside inner (and delta.type for LedgerUpdate) and handle unknown types gracefully
  3. Data Validation: Always validate JSON structure and handle the common empty events array
  4. Error Recovery: Implement retry logic with exponential backoff
  5. Resource Management: Close gRPC connections properly to avoid resource leaks

Current Limitations

  • Data Retention: Historical misc event data is limited to a 24-hour rolling window
  • Rate Limits: Be mindful of request frequency to avoid overwhelming the service

Resources

Need help? Contact our support team or check the Hyperliquid gRPC documentation.