<!-- source: https://secondlayer.tools/docs/api-reference#discover-streams -->

## Streams discovery

`GET /v1/streams`

Lists the Streams routes, the event types and filters `/v1/streams/events` accepts, and the cursor format. Served ahead of Streams auth, so it never needs a credential.

### Returns

One `StreamsDiscovery` object.

### Responses

- `200` Route and filter catalog

### Example

```bash
curl https://api.secondlayer.tools/v1/streams \
  -H "Authorization: Bearer $SECONDLAYER_API_KEY"
```

```json
{
  "routes": [
    {
      "path": "/v1/streams/events",
      "method": "GET",
      "description": "Raw event firehose. Cursor-paginated. Returns events[], next_cursor, tip, reorgs[].",
      "event_types": [
        "stx_transfer",
        "stx_mint",
        "stx_burn",
        "stx_lock",
        "ft_transfer",
        "ft_mint",
        "ft_burn",
        "nft_transfer",
        "nft_mint",
        "nft_burn",
        "print"
      ],
      "filters": [
        {
          "name": "types",
          "type": "event_type[]",
          "description": "Event types to include"
        },
        {
          "name": "contract_id",
          "type": "principal | comma-list"
        },
        {
          "name": "limit",
          "type": "number (max 1000)"
        }
      ],
      "auth": "bearer required, metered per row"
    },
    {
      "path": "/v1/streams/tip",
      "method": "GET",
      "description": "Current chain tip: { block_height, block_hash, burn_block_height, finalized_height, lag_seconds }."
    }
  ],
  "cursor": {
    "format": "<block_height>:<event_index>",
    "semantics": "opaque resume token; pass back unchanged to continue. Equals last event's cursor (inclusive on output, exclusive on input)."
  },
  "reorgs_shape": {
    "detected_at": "ISO 8601",
    "new_canonical_tip": "<block_height>:<event_index>",
    "new_canonical_height": "number",
    "new_canonical_event_index": "number"
  }
}
```
