> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blockdb.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Protobuf

> Binary-encoded WebSocket streams using Protocol Buffers — available on request for latency-critical and high-frequency trading applications.

## 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 same `chain_id` and `dataset_id` identifiers — with a binary payload instead of JSON.

***

## Why Protobuf for HFT

<CardGroup cols={3}>
  <Card title="Smaller payloads" icon="minimize">
    Binary encoding typically reduces message size by 30-70% compared to JSON, reducing bandwidth and kernel buffer pressure at high throughput.
  </Card>

  <Card title="Faster deserialization" icon="gauge-max">
    Protobuf deserialization is significantly faster than JSON parsing — measurable in microseconds per message at the volumes HFT systems process.
  </Card>

  <Card title="Schema-defined contracts" icon="file-contract">
    `.proto` definitions give you a typed, versioned contract for every stream payload — no runtime field discovery, no string parsing.
  </Card>
</CardGroup>

***

## Availability

Protobuf encoding is available **on request**. To enable it for your account:

1. Contact [support@blockdb.io](mailto:support@blockdb.io) with the subject **"Protobuf stream access"**
2. Specify the chain IDs and dataset IDs you need
3. BlockDB will provide the `.proto` schema files and a binary-mode endpoint

<Note>
  Protobuf streams share the same subscription lifecycle as JSON WebSocket streams. See the [WebSocket page](/user-guide/real-time-delivery/websocket) for connection, authentication, and subscription details.
</Note>

***

## 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         |

***

## Contact

To request Protobuf stream access or discuss throughput requirements for your HFT setup, reach out at [support@blockdb.io](mailto:support@blockdb.io).
