Skip to main content
Filters narrow the event stream to only matching events. All filter dimensions use AND logic: if multiple filters are specified, an event must match all of them.

Filter fields

FieldTypeMatch LogicCase
action_typesstring[]Exact match on event typeCase-sensitive
addressesstring[]Match on event user fieldCase-insensitive (auto-lowercased)
assetsstring[]Match on event asset fieldCase-insensitive (auto-uppercased)
asset_idsnumber[]Match on event asset_id fieldExact numeric equality

Behavior

  • Omitted filter = matches everything (no restriction on that dimension)
  • Empty array [] = matches nothing (blocks all events)
  • Firehose = subscribe with no filters field at all

Examples

All BTC activity:
{"action": "subscribe", "filters": {"assets": ["BTC"]}}
Verified output:
{"action":"subscribed","id":"default","sub_id":4,"total_subs":1}
Then only BTC events arrive:
{"block":70874222,"type":"cancelByCloid","asset":"BTC","asset_id":0,...}
Only cancel events:
{"action": "subscribe", "filters": {"action_types": ["cancel", "cancelByCloid"]}}
Track a specific address:
{"action": "subscribe", "filters": {"addresses": ["0xd071d6d6ea52f5aa34b79e47f908ee48c8215837"]}}
Verified: all events returned match the subscribed address exactly. Combined filter (AND logic) — ETH orders only:
{"action": "subscribe", "filters": {"action_types": ["order"], "assets": ["ETH"]}}
Both conditions must match. An ETH cancel would not be delivered. A BTC order would not be delivered. Track by raw asset ID:
{"action": "subscribe", "filters": {"asset_ids": [0]}}
Asset ID 0 = BTC. See Events for the full asset ID encoding.