Overview
BlockDB’s WebSocket channel already delivers real-time EVM data with sub-150 ms latency. For latency-critical applications — high-frequency trading, co-located execution, or ultra-low-latency signal pipelines — JSON serialization overhead can become a bottleneck. Because the transport layer is already WebSocket, switching to Protocol Buffers (Protobuf) binary encoding requires no infrastructure change on either side. The same streams, the same subscription protocol, the samechain_id and dataset_id identifiers — with a binary payload instead of JSON.
Why Protobuf for HFT
Smaller payloads
Binary encoding typically reduces message size by 30-70% compared to JSON, reducing bandwidth and kernel buffer pressure at high throughput.
Faster deserialization
Protobuf deserialization is significantly faster than JSON parsing — measurable in microseconds per message at the volumes HFT systems process.
Schema-defined contracts
.proto definitions give you a typed, versioned contract for every stream payload — no runtime field discovery, no string parsing.Availability
Protobuf encoding is available on request. To enable it for your account:- Contact support@blockdb.io with the subject “Protobuf stream access”
- Specify the chain IDs and dataset IDs you need
- BlockDB will provide the
.protoschema files and a binary-mode endpoint
Protobuf streams share the same subscription lifecycle as JSON WebSocket streams. See the WebSocket page for connection, authentication, and subscription details.
What Changes vs JSON WebSocket
| JSON WebSocket | Protobuf WebSocket | |
|---|---|---|
| Encoding | UTF-8 JSON | Binary (Protobuf wire format) |
| Message size | Baseline | ~30-70% smaller |
| Deserialization | JSON parser | Generated Protobuf bindings |
| Schema | Documented in data catalog | .proto files provided by BlockDB |
| Transport | wss://api.blockdb.io/v1/evm/ | Dedicated binary endpoint |
| Subscription protocol | JSON subscribe / unsubscribe | Same JSON control messages |