Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/BlockRazorinc/docs_en/llms.txt

Use this file to discover all available pages before exploring further.

BlockRazor Network Fee Stream delivers real-time gas price, priority fee, and validator tip data computed from recent historical block activity on supported chains. Rather than guessing at appropriate fee levels or querying slow RPC endpoints under load, your application receives a continuous push of current fee market conditions — enabling precise transaction cost calibration, faster inclusion, and reduced overpayment. Network Fee Stream is available for BSC and Solana.
BlockRazor’s BSC Network Fee Stream includes three distinct feeds: GetGasPriceStream for the current single gas price, GetAllGasPriceStream for a full distribution of gas prices observed in recent blocks, and the Sandwich Detector for identifying sandwich attack patterns in the mempool that may affect your fee strategy.

GetGasPriceStream

Real-time current gas price derived from recent BSC blocks. Use this for simple, single-value fee estimation.

GetAllGasPriceStream

Full gas price distribution from recent blocks, giving you percentile-level visibility into the fee market.

Sandwich Detector

Detects active sandwich attack patterns in the mempool so you can adjust fees or timing to avoid front-running.
Pricing: $500 / month for all BSC fee stream services.Subscribing to GetGasPriceStream (gRPC)The following Go example demonstrates connecting to the BSC GetGasPriceStream endpoint over gRPC:
package main

import (
    "context"
    "fmt"
    "log"

    "google.golang.org/grpc"
    "google.golang.org/grpc/credentials"
    "google.golang.org/grpc/metadata"
)

func main() {
    conn, err := grpc.Dial(
        "fees.blockrazor.io:443",
        grpc.WithTransportCredentials(credentials.NewTLS(nil)),
    )
    if err != nil {
        log.Fatalf("Failed to connect: %v", err)
    }
    defer conn.Close()

    ctx := metadata.AppendToOutgoingContext(
        context.Background(),
        "authorization", "Bearer YOUR_AUTH_TOKEN",
    )

    stream, err := client.GetGasPriceStream(ctx, &GasPriceStreamRequest{
        Chain: "bsc",
    })
    if err != nil {
        log.Fatalf("Failed to start stream: %v", err)
    }

    for {
        resp, err := stream.Recv()
        if err != nil {
            log.Fatalf("Stream error: %v", err)
        }
        fmt.Printf("Current BSC gas price: %s Gwei\n", resp.GasPrice)
    }
}
Use GetAllGasPriceStream when your strategy needs to select a percentile-based fee (e.g., 75th percentile for fast inclusion without overpaying) rather than relying on a single average value.
The Sandwich Detector analyses mempool transaction ordering in real time. When a sandwich pattern is detected, your application can respond by increasing the tip, splitting transactions, or delaying submission until the attack window closes.
For full API details, see the BSC Network Fee Stream API Reference.

Use Cases

Dynamic Fee Calibration

Continuously adjust your transaction fees based on live fee market data to achieve the optimal balance between inclusion speed and cost efficiency.

MEV Strategy Optimization

Feed real-time gas price distributions into your backrunning or arbitrage logic to set bids precisely enough to win block inclusion without unnecessary overpayment.

Sandwich Attack Avoidance

Use the BSC Sandwich Detector to identify when your transaction is at risk of being sandwiched and adjust submission timing or fee parameters accordingly.

Cost Analytics & Reporting

Record a historical stream of gas prices and tip levels to analyze fee market trends, benchmark your execution costs, and optimize long-term strategy parameters.

Stream Summary

ChainStreamDescriptionPricing
BSCGetGasPriceStreamCurrent single gas price from recent blocks$500/month
BSCGetAllGasPriceStreamFull gas price distribution from recent blocks$500/month
BSCSandwich DetectorReal-time sandwich attack pattern detection$500/month
SolanaGetTransactionFeePriority fee and tip data from recent blocks$300/month
The BSC $500/month subscription covers all three BSC fee streams — GetGasPriceStream, GetAllGasPriceStream, and the Sandwich Detector — under a single plan.

Build docs developers (and LLMs) love