Docs
Docs
Home
Getting Started
Agent Tooling
CLI
Supported Chains
Acala
Aptos
Arbitrum
Arc
Asset Hub
Astar
Avalanche
Base
Berachain
Bifrost
Binance Smart Chain
Bittensor
Blast
Boba Network
Bridge Hub
Celo
Centrifuge
Chiliz
Cronos
Enjin
Ethereum
Etherlink
Flow EVM Gateway
Gnosis
Hydration
Hyperliquid
Immutable
Ink
IoTeX
Kusama
Linea
LISK
Manta Atlantic
Manta Pacific
Mantle
MegaETH
Monad
Movement
Neuroweb
opBNB
Optimism
Plasma
Polkadot
Polygon
Pulsechain
Robinhood
Ronin
Scroll
Sonic
Starknet
Taiko
Tempo
Sui
TRON
Unichain
Viction
World Chain
XDC Network
XX Network
Zetachain
zkSync Era
Zora
Supported ChainsHyperliquidHyperliquid HyperCoregRPC Streaming API

StreamBbo - Stream Best Bid and Offer

Subscribe to typed best-bid-and-offer updates for up to 20 Hyperliquid markets over the V3 gRPC API.

Hyperliquid RPC endpoint: endpoint URLs, plans and pricing.

StreamBbo sends the best bid and ask for each requested coin. It opens with the current top of book for every coin, then emits only when that coin's top changes.

Request and opening behavior

coins is required and accepts 1 through 20 distinct, case-sensitive native coin identifiers. Duplicates are removed before enforcing the cap. Empty lists, blank entries, wildcard entries, and unknown or disabled coins return INVALID_ARGUMENT.

Each coin has an independent stream order. Cross-coin ordering is unspecified. bid or ask is unset when that side of the book is empty.

Go request
package main

import (
    "context"
    "crypto/tls"
    "errors"
    "io"
    "log"
    "os"
    "os/signal"
    "syscall"

    pb "example.com/hyperliquid-v3-client/gen/v3"
    "google.golang.org/grpc"
    "google.golang.org/grpc/credentials"
    "google.golang.org/grpc/metadata"
)

func main() {
    endpoint := os.Getenv("HYPERLIQUID_GRPC_ENDPOINT")
    apiKey := os.Getenv("DWELLIR_API_KEY")
    if endpoint == "" || apiKey == "" {
        log.Fatal("set HYPERLIQUID_GRPC_ENDPOINT and DWELLIR_API_KEY")
    }
    conn, err := grpc.NewClient(endpoint, grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{MinVersion: tls.VersionTLS12})))
    if err != nil {
        log.Fatal(err)
    }
    defer conn.Close()

    ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
    defer stop()
    ctx = metadata.AppendToOutgoingContext(ctx, "x-api-key", apiKey)
    stream, err := pb.NewMarketStreamingClient(conn).StreamBbo(ctx, &pb.BboRequest{Coins: []string{"BTC", "ETH"}})
    if err != nil {
        log.Fatal(err)
    }
    for {
        update, err := stream.Recv()
        if errors.Is(err, io.EOF) {
            return
        }
        if err != nil {
            log.Fatal(err)
        }
        log.Printf("coin=%s block=%d bid=%v ask=%v", update.GetCoin(), update.GetBlockNumber(), update.GetBid(), update.GetAsk())
    }
}

Delivery and recovery

The stream recovers from subscriber lag by invalidating its dedup state and re-sending the current top of book on a later window. That recovery frame may repeat a value already observed. ABORTED means the stream state reset; reconnect to receive fresh opening values. See the shared market-stream contract for common errors and delivery rules.

Related references: StreamL2Book and the Order Book WebSocket BBO channel.

StreamL2Book - Stream L2 Book Snapshots

Subscribe to typed full L2 order-book snapshots for one Hyperliquid market over the V3 gRPC API.

StreamL2BookDiff - Stream Ordered L2 Diffs

Reconstruct up to 20 Hyperliquid L2 books from typed opening snapshots and sequenced level diffs over V3 gRPC.

On this page

Request and opening behaviorDelivery and recovery