POST
https://prv.gateway.indexer.biya.io
/
injective_spot_exchange_rpc.InjectiveSpotExchangeRPC
/
StreamOrders
StreamOrders
curl --request POST \
  --url https://prv.gateway.indexer.biya.io/injective_spot_exchange_rpc.InjectiveSpotExchangeRPC/StreamOrders \
  --header 'Content-Type: application/json' \
  --data '
{
  "market_id": "<string>",
  "subaccount_id": "<string>",
  "order_side": "<string>",
  "include_inactive": true
}
'
Stream updates to individual orders of a Spot Market. This endpoint sends real-time updates whenever orders are created, updated, or cancelled.
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_id
string
Market ID (optional)
subaccount_id
string
Subaccount ID (optional)
order_side
string
Order side (optional)
include_inactive
boolean
Include inactive orders (optional)

Response

The response is a stream of StreamOrdersResponse objects:
{
  "order": {
    "order_hash": "string",
    "order_side": "string",
    "market_id": "string",
    "subaccount_id": "string",
    "price": "string",
    "quantity": "string",
    "unfilled_quantity": "string",
    "trigger_price": "string",
    "fee_recipient": "string",
    "state": "string",
    "created_at": "number",
    "updated_at": "number",
    "tx_hash": "string",
    "cid": "string"
  },
  "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_id": "0x...",
  "subaccount_id": "0x..."
}' \
  localhost:8088 \
  injective_spot_exchange_rpc.InjectiveSpotExchangeRPC/StreamOrders
Using websocat:
echo '{"market_id": "0x...", "subaccount_id": "0x..."}' | \
  websocat ws://localhost:8088/injective_spot_exchange_rpc.InjectiveSpotExchangeRPC/StreamOrders
Using wscat:
wscat -c ws://localhost:8088/injective_spot_exchange_rpc.InjectiveSpotExchangeRPC/StreamOrders
# Then send: {"market_id": "0x...", "subaccount_id": "0x..."}