POST
https://prv.gateway.indexer.biya.io
/
injective_spot_exchange_rpc.InjectiveSpotExchangeRPC
/
StreamOrderbookUpdate
StreamOrderbookUpdate
curl --request POST \
  --url https://prv.gateway.indexer.biya.io/injective_spot_exchange_rpc.InjectiveSpotExchangeRPC/StreamOrderbookUpdate \
  --header 'Content-Type: application/json' \
  --data '
{
  "market_ids": [
    {}
  ]
}
'
Stream live level updates of selected spot market orderbook. This endpoint sends incremental updates (only changed price levels) rather than full snapshots.
This is a streaming endpoint that requires WebSocket or Server-Sent Events support. The connection will remain open and receive updates in real-time.
market_ids
array
List of market IDs for orderbook streaming. Empty array means ‘ALL’ spot markets (optional)

Response

The response is a stream of StreamOrderbookUpdateResponse objects:
{
  "orderbook": {
    "buys": [
      {
        "price": "string",
        "quantity": "string",
        "timestamp": "number"
      }
    ],
    "sells": [
      {
        "price": "string",
        "quantity": "string",
        "timestamp": "number"
      }
    ],
    "sequence": "number",
    "timestamp": "number",
    "height": "number"
  },
  "operation_type": "string",
  "timestamp": "number"
}

cURL Example

gRPC-Web streaming endpoints require WebSocket support. Standard curl cannot handle streaming responses.
Using grpcurl:
grpcurl -plaintext -d '{"market_ids": ["0x..."]}' \
  localhost:8088 \
  injective_spot_exchange_rpc.InjectiveSpotExchangeRPC/StreamOrderbookUpdate
Using websocat:
echo '{"market_ids": ["0x..."]}' | websocat ws://localhost:8088/injective_spot_exchange_rpc.InjectiveSpotExchangeRPC/StreamOrderbookUpdate
Using wscat:
wscat -c ws://localhost:8088/injective_spot_exchange_rpc.InjectiveSpotExchangeRPC/StreamOrderbookUpdate
# Then send: {"market_ids": ["0x..."]}