transactionStatus
Name: transactionStatus
transactionStatus is a stream that shows the real-time status of transactions as they propagate throughout the Ethereum network. For example, this allows users to know the exact moment their transaction is confirmed, i.e. has been included in enough blocks that it is considered confirmed.
To use the transactionStatus stream, you first need to subscribe to the stream. Then you need to request monitoring for transactions for which you would like to receive status updates. Transactions can be yours or someone else's. In order to monitor a transaction, you need to send the signed raw transaction to the Cloud-API (note: sending only the transaction hash is not sufficient because the Cloud-API might not have the transaction you want to monitor). This is a Cloud-API only stream. The stream will return an event every time a status is changed for one of the monitored transactions. Please review the list of possible statuses at the bottom of the page. The stream supports two methods as documented below.
Method: start_monitor_transaction
Description: Submits transactions for monitoring.

Parameters

Parameter
Description
transactions
[Mandatory] List of raw transaction bytes without 0x prefix.
monitor_speedup
[Optional, default: False] A boolean flag that enables automatic monitoring of transactions submitted with the same nonce.
Method: stop_monitor_transaction
Description: Stops monitoring a transaction

Parameters

Parameter
Description
transaction_hash
[Mandatory] Transaction hash without 0x prefix.
Requests Examples
Subscribing to the feed
Start Monitor
Stop Monitor
Subscribing to the Cloud-API transactionStatus stream in Python (Line 7 creates the subscription):
1
import asyncio
2
from bloxroute_cli.provider.cloud_wss_provider import CloudWssProvider
3
async def main():
4
async with CloudWssProvider(
5
ssl_dir="/usr/bloxroute/certificate/external_gateway/registration_only"
6
) as ws:
7
subscription_id = await ws.subscribe("transactionStatus", {"include": ["tx_hash", "status"]})
8
while True:
9
next_notification = await ws.get_next_subscription_notification_by_id(subscription_id)
10
print(next_notification) # or process it generally
11
await ws.unsubscribe(subscription_id)
12
if __name__ == '__main__':
13
asyncio.get_event_loop().run_until_complete(main())
14
​
Copied!
1
import asyncio
2
from bloxroute_cli.provider.ws_provider import WsProvider
3
from bxcommon.rpc.rpc_request_type import RpcRequestType
4
​
5
async def main():
6
async with WsProvider(
7
uri="wss://api.blxrbdn.com/ws",
8
headers={"Authorization": <YOUR_AUTHORIZATION_HEADER>}
9
) as ws:
10
result = await ws.call_bx(RpcRequestType.START_MONITOR_TRANSACTION, {"transactions": ["f86b0184...e0b58219"], "monitor_speedup": "True"})
11
print(result) # or process it generally
12
if __name__ == '__main__':
13
asyncio.get_event_loop().run_until_complete(main())
Copied!
1
import asyncio
2
from bloxroute_cli.provider.ws_provider import WsProvider
3
from bxcommon.rpc.rpc_request_type import RpcRequestType
4
​
5
async def main():
6
async with WsProvider(
7
uri="wss://api.blxrbdn.com/ws",
8
headers={"Authorization": <YOUR_AUTHORIZATION_HEADER>}
9
) as ws:
10
result = await ws.call_bx(RpcRequestType.STOP_MONITOR_TRANSACTION, {"transaction_hash": "f86b0184...e0b58219"})
11
print(result) # or process it generally
12
if __name__ == '__main__':
13
asyncio.get_event_loop().run_until_complete(main())
Copied!
Possible statuses are:
Status
Description
UNKNOWN
The transaction is not recognized.
PROPAGATING
The transaction is propagating within the BDN.
TX_POOL
The transaction was received by an ETH node and accepted to its tx pool.
MINED
The transaction was included in a block.
CONFIRMED
The transaction's block is confirmed.
REPROPAGATE
For a transaction summited with Nonce monitoring, this status indicates that the system is resubmitting the transaction.
SPEEDUP
Received a new transaction with the same address and nonce as the monitored transaction. This new transaction will be monitored if monitor_speedup is enabled.
CANCELED
The transaction is canceled.
Results Example
Transaction Status Event
1
<<< {"jsonrpc": "2.0", "id": null, "method": "subscribe",
2
"params": {"subscription": "909e4bae-2c48-43f3-a007-f17d4c8a3ce8",
3
"result": {"txHash": "14f3d7a1553b252b89....3214f3de",
4
"status": PROPAGATING
5
}
6
​
Copied!
Last modified 1mo ago
Copy link