Bitcoin (Native BTC Transfers)

Track native BTC transfers on the Bitcoin blockchain.

Endpoint: GET /v1/btc/native/events/transfer

Parameters:

ParameterTypeRequiredDescription
min_amountnumberNoMinimum amount (in BTC)
max_amountnumberNoMaximum amount (0 = no limit)
senderstringNoFilter by sender address
receiverstringNoFilter by receiver address
involvingstringNoFilter by address involved as either sender OR receiver
involving_labelstringNoFilter where any address matches a label substring
involving_categorystringNoFilter 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_numbertokensenderreceiveramounttime
875000BTCbc1qxy…7p8bc1q9h…3kf15.422025-12-01T00:12:35Z
875001BTC3J98t1…Qk2bc1qw5…m9n50.002025-12-01T00:22:18Z
875003BTCbc1qar…0hl3FZbgi…sEf125.802025-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:

ParameterTypeDefaultDescription
group_bystringtimetime or block_number
periodstring1h / 1000Time: 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.