bloXroute Documentation
WebsiteBlogTwitterDiscord
  • Welcome to bloXroute
  • Introduction
    • Why Use bloXroute?
    • Products
    • Create An Account
    • Technical Support
  • SOLANA
    • Trader API
      • Introduction
        • Regions
        • Authorization
        • Rate Limits
        • Tip and Tipping Addresses
      • Quick Start
        • Transaction Submission
        • Front-Running Protection & Transaction Bundle
        • Go SDK
        • Python SDK
        • Typescript SDK
        • Rust SDK
      • API Endpoints
        • Core Endpoints
          • submit
          • submit-paladin
          • submit-batch
          • balance
          • rate-limit
          • transaction
          • priority-fee
          • GetPriorityFeeStream
          • GetBundleTipStream
          • submit-snipe
        • Pump.fun
          • quotes
          • swap
          • swap-sol
          • GetPumpFunNewTokensStream
          • GetPumpFunSwapsStream
          • GetPumpFunAMMSwapsStream
        • Raydium
          • quotes
          • pools
          • pool-reserves
          • swap
          • cpmm-swap
          • clmm-swap
          • route-swap
          • GetPoolReservesStream
          • GetSwapsStream
          • GetNewRaydiumPoolsStream
          • GetNewRaydiumPoolsByTransactionStream
        • Jupiter
          • quotes
          • swap
          • swap-instructions
          • route-swap
        • Openbook
          • markets
          • orderbooks/{market}
          • depth/{market}
          • tickers/{market}
          • open-orders/{market}
          • unsettled/{market}
          • place
          • replace
          • cancel
          • settle
          • GetOrderbooksStream
          • GetTickersStream
      • Best Performance for Landing Transactions
      • Support
        • API Health
        • Contact us
        • Suggestions
        • Wiki
          • Terms & Concepts
          • Resources
    • Optimized Feed Relay (OFR)
      • Transaction Streamer
      • Gateway and OFR Requirements
      • Gateway and OFR Setup
      • Gateway Startup Arguments
      • OFR performance
      • Logging
      • Submitting Transaction
      • Upgrading Gateway
      • Troubleshooting
  • BSC & ETH
    • EVM Blockchain Distribution Network (BDN)
      • How to Connect
      • The bloXroute Gateway
        • Local Gateway
          • Installation and Startup
            • Authentication & Certificates
            • Requirements
            • Supported Clients
            • GitHub repository option
            • Docker container option
            • Startup Script
            • Startup Arguments
          • General Connectivity Troubleshooting
          • Logging
          • Upgrading your Gateway
        • Add Your Gateway as a Trusted Peer to Your Execution Layer Client
        • Connecting Your Gateway with the Consensus Layer
      • IPs & Relays
        • Relays IPs
        • Private Relays
        • Cloud-API IPs
          • ⏩Reducing Latencies using the BDN
    • APIs
      • Authorization
      • Check Transaction Quota
      • Submit a Transaction
        • Raw Transaction Construction
        • Tx-Validation
        • Batch Transaction
      • Private Transactions
        • ETH Private Transactions
        • BSC Private Transactions
      • Transaction Bundles
        • Bundle Simulation
        • Bundle Validation
        • Bundle Submission
          • BSC Bundle Submission
            • List of BSC Validators
          • ETH Bundle Submission
          • Bundle Submission with Gateway
        • Bundle Tracking
          • BSC Bundle-Trace
          • ETH Bundle-Trace
          • ETH Bundle Inclusion Status
        • Bundle Refunds
          • Priority Fee Refund
          • Bundle Refund
          • Latest Bundle Refunds
      • Backrun Arbitrage
        • BackRunMe: Bundle Submission
          • BSC submit arbOnly
          • ETH submit arbOnly
            • blxr_info
            • ETH arbOnly Simulation
      • Token Launch Sniping
      • Other Utilities
        • List of bloXroute Builders
        • List of External Builders
        • Tx-Trace
        • Ping
    • Streams
      • Requirements
      • Subscription limits
      • Working With Streams
        • Creating a Subscription
          • Websocket
          • gRPC
        • Handling the Notification
          • Websocket
          • gRPC
        • Cancelling a Subscription
          • Websocket
          • gRPC
        • Local Node Validation
      • newTxs and pendingTxs
        • Filters
        • Raw TX Reconstruction
      • BackRunMe: arbOnlyMEV
        • ETH arbOnlyMEV
        • BSC arbOnlyMEV
      • transactionStatus
      • txReceipts
      • newBlocks
      • bdnBlocks
      • ethOnBlock
      • MEVBlockValue
      • MEVNextProposerInfo
    • Block Builders and Validators
      • Validator Gateway
      • MEV Relay (For Validators)
      • Block Submission
      • Proposer MEV-Protect
      • Compliance Lists
      • Preconfirmations
    • Protect RPCs
      • ETH Protect RPC
      • ETH Gas Protect RPC
      • BSC Protect RPC
      • SOL Protect RPC
  • Base Network
    • Submit Transactions
    • Streams
      • GetBdnBlockStream
  • TON NETWORK
    • TON Trader API
      • Quick Start
      • Fee Schedule
      • Connection
      • Submit Signed Transaction
  • Resources
    • BDN Explorer
    • Block Explorer
    • Guides
      • Algorithmic Trading
      • Setting Up a Local Gateway
      • Gateway as Web3 Bridge
    • Architecture
      • BDN Architecture
        • Network Components
        • Performance Techniques
          • Block Compression
          • Cut-through Routing
          • Optimized Topology
      • bloXroute Protocol
        • Versioning
        • Message Structure
        • Message Types
    • Contact Us
Powered by GitBook
On this page
  1. BSC & ETH
  2. Streams

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 (wss://api.blxrbdn.com/ws) 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. Cloud-API automatically starts monitoring transactions submitted by the same sender that have the same nonce.

Parameters

Parameter

Description

transactions

[Mandatory] List of raw transaction bytes without 0x prefix.

subscription_id

[Mandatory] The returned subscription ID from initial transactionStatus stream subscription

blockchain_network

[Optional, default: Mainnet] The blockchain network for the transaction. (note: It should match with the blockchain_network provided in the initial transactionStatus subscribe request.)

Method: stop_monitor_transaction

Description: Stops monitoring a transaction.

Parameters

Parameter

Description

transaction_hash

[Mandatory] Transaction hash without 0x prefix.

subscription_id

[Mandatory] The returned subscription ID from initial transactionStatus stream subscription

blockchain_network

[Optional, default: Mainnet] The blockchain network for the transaction. (note: It should match with the blockchain_network provided in the initial transactionStatus subscribe request.)

Requests Examples

Subscribing to the Cloud-API transactionStatus stream in Python (Line 7 creates the subscription):

import asyncio
from bxcommon.rpc.provider.cloud_wss_provider import CloudWssProvider
async def main():
    async with CloudWssProvider(
        ssl_dir="/usr/bloxroute/certificate/external_gateway/registration_only"
    ) as ws:
        subscription_id = await ws.subscribe("transactionStatus", {"include": ["tx_hash", "status"]})
        while True:
            next_notification = await ws.get_next_subscription_notification_by_id(subscription_id)
            print(next_notification)  # or process it generally
        await ws.unsubscribe(subscription_id)
if __name__ == '__main__':
    asyncio.get_event_loop().run_until_complete(main())
import asyncio
from bxcommon.rpc.provider.ws_provider import WsProvider
from bxcommon.rpc.rpc_request_type import RpcRequestType

async def main():
    async with WsProvider(
        uri="wss://api.blxrbdn.com/ws",
        headers={"Authorization": <YOUR_AUTHORIZATION_HEADER>}
    ) as ws:
        ... # subscrib to transactionStatus, and get the subscription_id
        result = await ws.call_bx(RpcRequestType.START_MONITOR_TRANSACTION, {"transactions": ["f86b0184...e0b58219"], "subscription_id":subscription_id})
        print(result)  # or process it generally
if __name__ == '__main__':
    asyncio.get_event_loop().run_until_complete(main())
import asyncio
from bxcommon.rpc.provider.ws_provider import WsProvider
from bxcommon.rpc.rpc_request_type import RpcRequestType

async def main():
    async with WsProvider(
        uri="wss://api.blxrbdn.com/ws",
        headers={"Authorization": <YOUR_AUTHORIZATION_HEADER>}
    ) as ws:
        ... # subscrib to transactionStatus, and get the subscription_id
        result = await ws.call_bx(RpcRequestType.STOP_MONITOR_TRANSACTION, {"transaction_hash": "f86b0184...e0b58219", "subscription_id": subscription_id})
        print(result)  # or process it generally
if __name__ == '__main__':
    asyncio.get_event_loop().run_until_complete(main())
wscat -c wss://api.blxrbdn.com/ws --header "Authorization: <YOUR-AUTHORIZATION-HEADER>"
> {"jsonrpc":"2.0","id":1,"method":"subscribe","params":["transactionStatus",{"include":["tx_hash","status"]}]}
< {"jsonrpc": "2.0", "id": 1, "result": "3bb82078-c895-4b31-9f59-c376ef2b26f6"}
> {"jsonrpc":"2.0","id":1,"method":"start_monitor_transaction","params":{"transactions":["f87...581"],"subscription_id":"3bb82078-c895-4b31-9f59-c376ef2b26f6"}}
< {"jsonrpc": "2.0", "id": 1, "result": {"success": true}}
> {"jsonrpc":"2.0","id":1,"method":"stop_monitor_transaction","params":{"transaction_hash":"311...875"}}
< {"jsonrpc": "2.0", "id": 1, "result": {"success": true}}

Possible statuses are:

Status

Description

UNKNOWN

The transaction is not recognized.

TX_POOL

The transaction was received by a blockchain node and accepted to its tx pool.

MINED

The transaction was included in a block.

CANCELED

The transaction is canceled.

REPLACED

Received a new transaction with the same address and nonce as the monitored transaction.

Results Example

<<< {"jsonrpc": "2.0", "id": null, "method": "subscribe", 
     "params": {"subscription": "909e4bae-2c48-43f3-a007-f17d4c8a3ce8",
     "result": {"txHash": "14f3d7a1553b252b89....3214f3de", 
                "status": TX_POOL
                }
PreviousBSC arbOnlyMEVNexttxReceipts