# sbtc-flows Subgraph API
Version: 1.0.0
Schema hash: abe87ca7732b889d0649a1cc14304ca38138d18b31cf0e72e4b7455843bbc3cb
Server: https://api.secondlayer.tools
Visibility: public — anon reads, no API key. Responses use the `{ rows, next_cursor, tip }` envelope; paginate with `?cursor=<next_cursor>` and `_order=asc|desc` (`_offset`/`_sort` are rejected).
sBTC deposits, withdrawals, signer rotations, governance

## flows

GET https://api.secondlayer.tools/v1/subgraphs/sbtc-flows/flows
GET https://api.secondlayer.tools/v1/subgraphs/sbtc-flows/flows/count
GET https://api.secondlayer.tools/v1/subgraphs/sbtc-flows/flows/aggregate
GET https://api.secondlayer.tools/v1/subgraphs/sbtc-flows/flows/stream (SSE)

Rows: 1461

### Columns

| Column | Type | Attributes |
| --- | --- | --- |
| `topic` | `text` | indexed, searchable |
| `amount` | `text` | nullable |
| `sender` | `principal` | nullable, indexed |
| `request_id` | `uint` | nullable, indexed |
| `burn_height` | `uint` | nullable |
| `bitcoin_txid` | `text` | nullable, searchable |
| `_id` | `serial` | system |
| `_block_height` | `bigint` | system |
| `_tx_id` | `text` | system |
| `_created_at` | `timestamp` | system |

### Query

Parameters: `_limit`, `cursor`, `_order`, `_fields`, `_search`
Filters: `topic`, `topic.neq`, `topic.like`, `amount`, `amount.neq`, `amount.like`, `sender`, `sender.neq`, `sender.like`, `request_id`, `request_id.neq`, `request_id.gt`, `request_id.gte`, `request_id.lt`, `request_id.lte`, `burn_height`, `burn_height.neq`, `burn_height.gt`, `burn_height.gte`, `burn_height.lt`, `burn_height.lte`, `bitcoin_txid`, `bitcoin_txid.neq`, `bitcoin_txid.like`, `_id`, `_id.neq`, `_id.gt`, `_id.gte`, `_id.lt`, `_id.lte`, `_block_height`, `_block_height.neq`, `_block_height.gt`, `_block_height.gte`, `_block_height.lt`, `_block_height.lte`, `_tx_id`, `_tx_id.neq`, `_tx_id.like`, `_created_at`, `_created_at.neq`, `_created_at.gt`, `_created_at.gte`, `_created_at.lt`, `_created_at.lte`, `_created_at.like`

### Example

```bash
curl 'https://api.secondlayer.tools/v1/subgraphs/sbtc-flows/flows?_limit=10&_order=desc'
```
