Binance Smart Chain
Gas Price Forecast
This tool attempts to predict the gas price to be paid on Binance Smart Chain by averaging recent past transactions. Take into consideration that the numbers shown here are just estimations.
Right now, submitting transactions on the BSC network should cost:
If you are a software developer, and want to integrate your application with our gas price oracle, you can use our endpoints.
Gas price estimation
You could also retrieve the gas price estimations through our API endpoint:
apikey argument is required only if you are not behind a public IP address or have high usage requirements. If that's the case, check the API keys section.
The endpoint will answer with a JSON string with the following fields:
timestamp: An ISO 8601 compliant date for when the API returned the result.
slow: Estimated minimum Gwei to be paid for a transaction that will be safely accepted. That means it can take a while (usually about half an hour).
standard: Estimated Gwei paid recently where the transaction was accepted on 60% of the blocks. It usually takes about a minute.
fast: Estimated Gwei paid recently where the transaction was accepted on 90% of the blocks. It usually takes about 15 seconds.
instant: Estimated Gwei needed for the transaction to be accepted in the next block. Usually, this means you are overpaying.
block_time: Average time between each block confirmation.
last_block: Number of the last block the oracle scanned.
Note that if you plan to integrate this API with your application using the web3 library, you
must multiply the value by
19 as the library expects the gas price
A sample response (fetched on page load) is provided below:
Gas price history
In case you need to retrieve the gas price history, you could fetch the history endpoint:
You can pass the following arguments in a GET request:
apikey: Your API key.
from: Unix timestamp representing the time where your search will start from. Default 0.
to: Unix timestamp representing the time where to finish your search. Default current timestamp.
page: If your search returns more than 1000 candles, you must inform the page of the search you wish to retrieve. Default 1.
candles: How many results (maximum) you wish the search to retrieve. Default 1000.
timeframe: The time you wish to aggregate results to form candles. The allowed values are 10m, 30m, 1h, 2h, 4h or 1d. You could also inform these values in minutes (10, 30, 60, 120, 240, or 1440). Default 30.
The API will return an array of candlesticks built from aggregate data of the requested timeframe. The array is ordered from decreasing timestamps.
timestamp: An ISO 8601 compliant date for the candlestick time.
samples: Number of samples composing the candle.
slow: Gas price information regarding each speed (check gas endpoint for an explanation about speeds).
open: The gas price reported on the first moment of the candle.
close: The gas price reported on the last moment of the candle.
low: The lowest gas price reported on the entire candle.
high: The highest gas price reported on the entire candle.
Fetching data from our API is as simple as a GET request:
When you access our endpoints, you need to be behind a public ip address or use an API key. In either case, you can request our data up to
times per hour for free. After reaching that limit, you can continue to make requests either waiting a few minutes or using your api credit.
API key management window
You can use the button below or the one in the header of this page to create, edit, and get information about your API keys. You can also use it to update your credit recharges in real-time.
Please keep in mind that you should use your API key in your server's code, never in the front-end code, mainly because of these two reasons:
- Front-end code is publicly readable, even if obfuscated. Thus, writing your keys in the source-code will EXPOSE them.
- If used in the front-end, every user request will trigger a call to our endpoints. Depending on your app's traffic, that will make your API key consume the free calls per hour quickly, and beyond that your api credit.
You can make your calls to our endpoint in your server code, save the result in a file or database, then every time your users request the information you could send the cached result. Remember to schedule calls to our endpoints at regular intervals to make sure your cached data is always up-to-date.
After reaching the free request limit (
requests in the last hour), each new request will subtract
at current BNB price).
Any time you want to recharge your API credit, you can make a BNB transfer of any amount to your API wallet. After the transfer, our server will update your api credit automatically within one hour. If you want to be credited instantly, you can click the update button on the API key information window.
API key information
You can access information about your API key using the keys endpoint
Fill your API key in the field above to get a sample response with real data
If the request is succeeded, you will get a JSON response with the following fields:
apiKey: Your API key.
creation: An ISO 8601 compliant date for the time the API key was created.
wallet: Your API wallet. You should transfer BNB to this address to recharge your credit.
credit: The amount of your unspent credit (
1 credit = 0.00000001 BNB).
origin: Your requests will only be processed if the request's origin match your API key origin field. This field will not be present if you did not fill an origin when creating the API key.
note: A personal informative note about the key. This field will only be present if you filled a note when creating your key.
usage: The API key Usage:
apiKeyHour: Requests made using your API key in the last hour.
apiKeyTotal: Total requests made using your API key.
API key credit recharge history
Get information about every api recharge
Fill an API key having at least one recharge in the above field to get a sample response with real data
On a success, the result will be a JSON containing
results fields. The
results field is an array containing information about each API recharge transaction, where each element is an Object with the following fields:
tx: The transaction hash of your deposit. You can check Bscscan for details about the transaction.
timestamp: An ISO 8601 compliant date for the time of the transaction.
value: Credit deposited.
1 credit = 0.00000001 BNB.
fromWallet: The wallet that sent the credit to your API wallet.
API key usage log
Get information about your API key usage
You can pass the optional arguments
totime. They define the time range of your search:
fromtime: The time (unix timestamp) you want to start your search. Default: one hour in the past.
totime: The time (unix timestamp) you want to end your search. Default: now.
Fill an API key that have been used in the last hour in the above field to get a sample response with real data
On a success, the result will be an array of JSON objects for each of your API key requests (limited to the last 10000 requests). Each record have the following fields:
ip: The ip address of the request.
nullif the request was made from a private ip.
origin: The origin of the request. This is the domain (the website name) that originates the request.
nullif the request did not originate from a website (or called from the client browser).
timestamp: An ISO 8601 compliant date for the time of the transaction.
You can fetch your API key information with a GET request:
Frequently Asked Questions
Didn't find what you were looking for? Ask us on telegram.
If you liked this website, or if you find the public API endpoint useful in any way, please consider buying me a coffee. It helps to pay for the domain, keeps the server running 24/7, and rewards my time. Thank you!