Bitcoin (Native BTC Transfers)
Track native BTC transfers on the Bitcoin blockchain.
Endpoint: GET /v1/btc/native/events/transfer
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
min_amount | number | No | Minimum amount (in BTC) |
max_amount | number | No | Maximum amount (0 = no limit) |
sender | string | No | Filter by sender address |
receiver | string | No | Filter by receiver address |
involving | string | No | Filter by address involved as either sender OR receiver |
involving_label | string | No | Filter where any address matches a label substring |
involving_category | string | No | Filter where any address matches a category |
Example: Large BTC transfers
curl -H "X-API-Key: $API_KEY"
"https://api.defistream.dev/v1/btc/native/events/transfer?since=2025-12-01T00:00:00Z&until=2025-12-02T00:00:00Z&min_amount=10"
-o btc_large.csv Sample Results:
| block_number | token | sender | receiver | amount | time |
|---|---|---|---|---|---|
| 875000 | BTC | bc1qxy…7p8 | bc1q9h…3kf | 15.42 | 2025-12-01T00:12:35Z |
| 875001 | BTC | 3J98t1…Qk2 | bc1qw5…m9n | 50.00 | 2025-12-01T00:22:18Z |
| 875003 | BTC | bc1qar…0hl | 3FZbgi…sEf | 125.80 | 2025-12-01T00:41:52Z |
Example: Track BTC transfers involving exchange wallets
curl -H "X-API-Key: $API_KEY"
"https://api.defistream.dev/v1/btc/native/events/transfer?since=2025-12-01T00:00:00Z&until=2025-12-02T00:00:00Z&involving_category=exchange"
-o btc_exchange.csv Aggregate Queries
Bucket Bitcoin transfers by time or block number and get totals per window instead of individual events.
Endpoint: GET /v1/btc/native/events/transfer/aggregate
Accepts all filters from the raw endpoint (sender, receiver, involving, min_amount, max_amount) plus:
| Parameter | Type | Default | Description |
|---|---|---|---|
group_by | string | time | time or block_number |
period | string | 1h / 1000 | Time: 1m, 5m, 30m, 1h, 1d, 1w. Block: integer block count. |
Example: Hourly BTC transfer volume
curl -H "X-API-Key: $API_KEY"
"https://api.defistream.dev/v1/btc/native/events/transfer/aggregate?block_start=880000&block_end=881000&group_by=time&period=1h" Response:
{
"status": "success",
"events": [
{"time": 1739127600, "token": "BTC", "agg_amount": 12843.27, "count": 58314},
{"time": 1739131200, "token": "BTC", "agg_amount": 9501.02, "count": 47125}
],
"count": 2
} Each row contains {time | block_number, token, agg_amount, count}. For Bitcoin, time is returned as epoch seconds when grouping by time (JSON and Parquet responses). agg_amount is the SUM of transfer amounts (in BTC).
Schema discovery: GET /v1/btc/native/aggregate_schema.
Range limits and cost: Same as the raw endpoint (JSON/CSV: 10k blocks or 1 day; Parquet: 100k blocks or 7 days). Aggregate quota cost: block_range × 0.5 (min 100).
Quota & Limits
Bitcoin endpoints use a time-based quota model similar to exchange data endpoints.
Check response headers X-RateLimit-Remaining and X-Request-Cost to monitor usage.