Description
The Yields stream delivers real-time updates to rolling yield/ROI predictions across fixed time horizons. Use this stream to monitor pool performance and ranking signals as they evolve with each block.
Subscription Parameters
Target horizon in days (e.g., 1, 7, 30).
Filter updates to specific BlockDB pool identifiers.
Message Fields
Predicted ROI fractions per token for the target horizon.
Current reserves per token used for the ROI denominator.
Block height of the prediction anchor.
Row-level lineage hash for correlation.
Subscription Example
# Use wscat to connect and subscribe
wscat -c wss://api.blockdb.io/v1/evm/ \
-H "Authorization: Bearer $BLOCKDB_API_KEY" \
-x '{"action": "subscribe", "dataset_id": "0411", "chain_id": 1, "params": {"target_period_days": 7}}'
Response Example
{
"chain_id": 1,
"dataset_id": "0411",
"is_reorg": false,
"data": {
"pool_uid": "88e6a0c2ddd26feeb64f039a2c41296fcb3f5640000000000000000000000000",
"block_number": 19001234,
"target_period_days": 30,
"tokens": [
"c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
],
"current_reserves": [
"1250.000000000000000000",
"3950000.000000000000000000"
],
"roi_predicted": [
"0.028800000000000000",
"0.000000000000000000"
],
"_tracing_id": "0411c0ffee0000000000000000000000000000000000000000000000000001",
"_created_at": "2025-12-20T12:35:01Z"
}
}