gRPC
Overview
Section titled “Overview”The gRPC bridge provides low-latency streaming access to Hyperliquid market data via Protocol Buffers over HTTP/2 with TLS. Microsecond-precision timestamps enable precise latency tracking.
Endpoints
Section titled “Endpoints”| Region | URL |
|---|---|
| US (East US 2) | hl.grpc.aleatoric.systems:443 |
| JP (Japan East) | jp.grpc.aleatoric.systems:443 |
Service Definition
Section titled “Service Definition”service PriceService { rpc GetMidPrice(MidPriceRequest) returns (MidPriceResponse); rpc StreamMids(StreamMidsRequest) returns (stream MidPriceResponse); rpc GetBlockNumber(BlockNumberRequest) returns (BlockNumberResponse); rpc StreamLiquidations(StreamLiquidationsRequest) returns (stream LiquidationEvent);}Subscription Types
Section titled “Subscription Types”allMids— All coin mid pricestrades— Trade stream for a specific coinl2Book— Level-2 order book for a specific coin
Response Fields
Section titled “Response Fields”| Field | Description |
|---|---|
coin | Asset symbol (e.g., “BTC”) |
price | Mid price |
ts_ms | Upstream timestamp (milliseconds) |
best_bid / best_ask | Top-of-book prices |
upstream_ts_ms | Source timestamp |
ingest_ts_us | Bridge ingest time (microseconds) |
publish_ts_us | Publish time (microseconds) |
cached | Whether response is from cache |
Authentication
Section titled “Authentication”Pass your API key via gRPC metadata:
metadata = [("x-api-key", "YOUR_API_KEY")]response = stub.GetMidPrice(request, metadata=metadata)