Arcfeed Docs
arcfeed.finance ↗

StreamDataRequest

StreamDataRequest is the single message sent to initiate a stream. It contains an optional list of filters that control which trades are delivered.

Proto definition

proto
// A filter to apply to the stream
message Filter {
  // The pair to filter on. Format: BASE-QUOTE (e.g. "BTC-USDT").
  // Empty string = no filter (match all pairs).
  string pair = 1;

  // The source to filter on. Exchange identifier (e.g. "binance").
  // Empty string = no filter (match all sources).
  string source = 2;
}

// A request to stream data
message StreamDataRequest {
  // Filters to apply. Maximum 100 filters.
  // Empty list = stream all pairs from all sources.
  repeated Filter filter = 1;
}

Fields

filter — repeated Filter

A list of filters. Each filter can specify a pair, a source, or both. Filters are combined with OR logic — a trade is delivered if it matches any filter in the list.

Maximum 100 filters per request.

Filter.pair

Trading pair in BASE-QUOTE format. Both components must be uppercase alphanumeric (e.g. BTC-USDT, ETH-BTC). Leave empty to match all pairs.

Filter.source

Exchange identifier string (lowercase alphanumeric, hyphens allowed). See Supported Exchanges for the full list. Leave empty to match all sources.

Examples

typescript
// Filter by pair only
client.streamData({ filter: [{ pair: 'BTC-USDT' }] });

// Filter by source only
client.streamData({ filter: [{ source: 'binance' }] });

// Filter by both pair and source
client.streamData({ filter: [{ pair: 'BTC-USDT', source: 'binance' }] });

// Multiple filters (OR logic) — BTC-USDT from Binance, or any ETH-USDT
client.streamData({
  filter: [
    { pair: 'BTC-USDT', source: 'binance' },
    { pair: 'ETH-USDT' }
  ]
});

// Empty filter — stream all trades from all sources
client.streamData({ filter: [] });
Filtering at the server reduces bandwidth and processing on your end. Use the most specific filters your use case allows.