Messages
No examples found{
"action": "<string>",
"chain_id": 123,
"dataset_id": "<string>"
}{
"action": "<string>",
"chain_id": 123,
"dataset_id": "<string>",
"status": "<string>",
"error": {
"code": "<string>",
"message": "<string>",
"severity": "<string>",
"retryable": true
}
}{
"action": "<string>",
"chain_id": 123,
"dataset_id": "<string>",
"status": "<string>",
"error": {
"code": "<string>",
"message": "<string>",
"severity": "<string>",
"retryable": true
}
}{
"chain_id": 123,
"dataset_id": "<string>",
"is_reorg": true,
"data": {
"pool_uid": "<string>",
"token": "<string>",
"amount_borrowed": "<string>",
"amount_repaid": "<string>",
"block_number": 123,
"_tracing_id": "<string>"
}
}Flash loans
Flash Loan Prints
Subscribe to flash loan borrow/repay events.
WSS
/
Overview
- Dataset ID:
0305 - Flash Loan Prints - Description: One row per borrowed token per on-chain flash loan event (V2-style flash swap, V3 Flash event, Balancer V2 Vault, etc.).
pool_uidis NULL for vault-level events not tied to a single pool. - Sample: Hugging Face Sample
Subscription Parameters
Optional filters: pool UIDs (32-byte hex, no
0x prefix).Optional filters: emitter contracts (pool or vault), 20-byte hex without
0x.Optional filters: borrowed token addresses (hex, no
0x).Message Fields
Pool id when pool-scoped; null for vault-level events.
Exchange identifier when pool-scoped.
Pool type identifier when pool-scoped.
Address of the contract that emitted the event (hex).
Borrowed token address (hex).
Raw borrowed amount (decimal string).
Raw repaid amount (decimal string).
Raw fee paid:
amount_repaid − amount_borrowed (decimal string).Event block.
Block time (ISO-8601).
Transaction index.
Log index.
Lineage id (hex).
Parent lineage ids (hex).
Record creation time (ISO-8601).
Record last update time (ISO-8601).
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": "0305", "chain_id": 1, "params": {}}'
Response Example
{
"chain_id": 1,
"dataset_id": "0305",
"is_reorg": false,
"data": {
"block_number": 19000050,
"block_time": "2025-11-11T10:00:00Z",
"tx_index": 12,
"log_index": 3,
"pool_uid": "88e6a0c2ddd26feeb64f039a2c41296fcb3f5640000000000000000000000000",
"exchange_id": 1,
"type_id": 201,
"flash_loan_source": "88e6a0c2ddd26feeb64f039a2c41296fcb3f564",
"token": "c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"amount_borrowed": "1000000000000000000",
"amount_repaid": "1003000000000000000",
"fee_amount": "3000000000000000",
"_tracing_id": "0305c0ffee000000000000000000000000000000000000000000000000000001",
"_parent_tracing_ids": [
"0103c0ffee000000000000000000000000000000000000000000000000000001"
],
"_created_at": "2025-11-11T10:00:05Z",
"_updated_at": "2025-11-11T10:00:05Z"
}
}
Messages
No examples found{
"action": "<string>",
"chain_id": 123,
"dataset_id": "<string>"
}{
"action": "<string>",
"chain_id": 123,
"dataset_id": "<string>",
"status": "<string>",
"error": {
"code": "<string>",
"message": "<string>",
"severity": "<string>",
"retryable": true
}
}{
"action": "<string>",
"chain_id": 123,
"dataset_id": "<string>",
"status": "<string>",
"error": {
"code": "<string>",
"message": "<string>",
"severity": "<string>",
"retryable": true
}
}{
"chain_id": 123,
"dataset_id": "<string>",
"is_reorg": true,
"data": {
"pool_uid": "<string>",
"token": "<string>",
"amount_borrowed": "<string>",
"amount_repaid": "<string>",
"block_number": 123,
"_tracing_id": "<string>"
}
}subscribe
type:object
unsubscribe
type:object
subscribe_response
type:object
unsubscribe_response
type:object
update
type:object
Last modified on April 6, 2026
Was this page helpful?
⌘I