You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: API.md
+39Lines changed: 39 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,6 +58,45 @@ GET /v2/waterfalls.cbor?<query_params>
58
58
**Differences between v1 and v2:**
59
59
- v2 includes `tip` field in response
60
60
61
+
### Waterfalls Data with Full Tip Metadata (v4)
62
+
63
+
```
64
+
GET /v4/waterfalls?<query_params>
65
+
GET /v4/waterfalls.cbor?<query_params>
66
+
```
67
+
68
+
The v4 endpoints accept the same query parameters as v2 but return extended tip metadata including block height. This is particularly useful for Bitcoin, where the block height cannot be derived from the header alone.
69
+
70
+
**Response Format (JSON):**
71
+
```json
72
+
{
73
+
"txs_seen": {
74
+
"descriptor_or_addresses": [
75
+
{
76
+
"txid": "transaction_id",
77
+
"height": 12345,
78
+
"block_hash": "block_hash",
79
+
"block_timestamp": 1234567890,
80
+
"v": 1
81
+
}
82
+
]
83
+
},
84
+
"page": 0,
85
+
"tip_meta": {
86
+
"b": "current_tip_block_hash",
87
+
"t": 1234567890,
88
+
"h": 876543
89
+
}
90
+
}
91
+
```
92
+
93
+
**Differences between v2 and v4:**
94
+
- v4 returns `tip_meta` object instead of `tip` hash string
0 commit comments