Owlracle API documentation
Owlracle API provides endpoints for easy integration with your app. Providing your users with Owlracle's data will ensure they never get stuck transactions again or overpay for gas, whether minting a fresh NFT, performing a swap at a DEX, lending, or borrowing assets.
Note that the first time you log in with your API key, you will be asked to confirm your email address. To be able to enjoy the free request limit, you need to provide provide your email first. Do not worry though, you will only be sent emails regarding Owlracle's new features and updates.
When you access our endpoints, it is reccomended that you use an API key. You can request our data up to
100
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. You can also make
requests without an api key for testing purposes, up to 10
times per hour. API keys without a bound email address cannot enjoy the increased free limit.
API keys
To create your API key and be able to make requests to our endpoints, go to the header section of this page, and click New API key on the dropdown option. On the New API key window, fill the required fields and click the Create API key button. Copy your key and secret, and keep them safe. The API key will be required to make requests to our endpoints, and the secret will be used if you want to change any information about your key.
Security tip: When using your key, keep in mind that front-end code is publicly readable, even if obfuscated. Thus, writing your key in the source-code will expose it.


API Credit
After reaching the free request limit (100
requests in the
last hour), each new request will subtract $0.00005
USD from your
API account.
Any time you want to recharge your API credit, you can use the header to open the Recharge key tab. You will be asked to connect your wallet using Metamask extension. This window will let you transfer to Owlracle's wallet any amount of ETH while using the Ethereum network. The amount transferred will be converted to USD and credited in your account. After the transfer confirmation, our server will update your API credit automatically. Keep in mind that the amount credited may vary depending of the token exchange rate.

Quick Start Integration Guide
It is very straightforward to use Owlracle API in your application. Whether you are building a website, a bot, or any other kind of software, the best-around gas price information can be fetched with a simple request.
const fetch = require('node-fetch');
const network = 'eth'; // could be any supported network
const key = 'YOUR_API_KEY'; // fill your api key here
const res = await fetch(`https://api.owlracle.info/v4/${ network }/gas?apikey=${ key }`);
const data = await res.json();
console.log(data);
import requests
network = 'eth'; # could be any supported network
key = 'YOUR_API_KEY'; # fill your api key here
res = requests.get('https://api.owlracle.info/v4/{}/gas?apikey={}'.format(network, key))
data = res.json()
print(data)
$network = 'eth'; // could be any supported network
$key = 'YOUR_API_KEY'; // fill your api key here
$url = "https://api.owlracle.info/v4/$network/gas?apikey=$key";
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$resp = curl_exec($curl);
curl_close($curl);
var_dump($resp);
import java.net.*;
import java.io.*;
class Main {
public static void main(String[] args) throws Exception {
String network = "eth"; // could be any supported network
String key = "YOUR_API_KEY"; // fill your api key here
URL url = new URL(String.format("https://api.owlracle.info/v4/%s/gas?apikey=%s", network, key));
URLConnection conn = url.openConnection();
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
while ((inputLine = in.readLine()) != null)
System.out.println(inputLine);
in.close();
}
}
Suppose you are building a web3 app and want to use Owlracle's estimations into a smart contract interaction. In that case, it is just a matter of using the gas price information returned by your previous request in the gasPrice argument.
// Interaction using user's browser through Metamask extension. Check their docs here:
// https://docs.metamask.io/guide/sending-transactions.html#example
const txHash = await ethereum.request({
method: 'eth_sendTransaction',
params: {
from: ethereum.selectedAddress, // Metamask's selected address
to: '0x0000', // contract address
gasPrice: 1000000000 * OWLRACLE_GAS, // this is where you will set the gas price received from Owlracle. The multiplication converts Gwei to Wei.
},
});
// This sample code send 1 BUSD from your address to Owlracle's address on the BNB chain.
const Web3 = require('web3');
const web3 = new Web3('https://bsc-dataseed.binance.org'); // this is a BNB Chain RPC. You can use any other.
// huge info. get it from https://github.com/paxosglobal/busd-contract/blob/master/BUSD.abi
const ERC20TransferABI = 'CONTRACT_ABI_HERE';
const BUSD_ADDRESS = "0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56";
const busdToken = new web3.eth.Contract(ERC20TransferABI, BUSD_ADDRESS);
const privateKey = 'YOUR_ADDRESS_PRIVATE_KEY';
web3.eth.accounts.wallet.add(privateKey);
const senderAddress = "YOUR_ADDRESS";
const receiverAddress = "0xA6E126a5bA7aE209A92b16fcf464E502f27fb658"; // Owlracle address
// get token balance
busdToken.methods.balanceOf(senderAddress).call(function (err, res) {
if (err) {
console.log("An error occured", err);
return;
}
console.log("The balance is: ", res);
});
// send 1 BUSD from your address to Owlracle
busdToken.methods.transfer(receiverAddress, web3.utils.toWei('1', 'ether')).send({
from: senderAddress,
gasPrice: web3.utils.toWei(OWLRACLE_DATA, 'gwei'), // here you insert owlracle gas price
gas: web3.utils.toHex('320000'), // gas limit
}, function (err, res) {
if (err) {
console.log("An error occured", err);
return;
}
console.log("Hash of the transaction: " + res)
});
Owlracle's API endpoitns
All public API endpoints are detailed below. After the endpoint description, you should see a table explaining every endpoint's arguments, response fields, and the sandbox. There you can visually build your own requests, customizing argument values to your desire. Owlracle sandbox will teach you what the request URL should look like.
Gas fee estimation
Retrieve gas for Ethereum network. You can use any of the following as the alias for this network: . If you prefer another network, replace it for the corresponding network alias. Check our header for the supported network list.
Owlracle scans recent past blocks (blocks
param) to build an estimative
of required gas fee to be paid. It looks for the minimum gas accepted on a transaction for every scanned
block (based on the chosen percentile
). Then it shows you the minimum
gas you should pay to be accepted on a percentage of your choice (accept
param) of those blocks.
false
, the estimatedFee response value will be reported in native token (ETH, BNB, MATIC, etc), instead of the default reporting in USD.false
, the response will be reported as legacy gas type transaction (e.g., gasPrice
instead of maxFeePerGas
and maxPriorityFeePerGas
). Valid only for networks supporting EIP-1559.true
, the response fields gasPrice
, maxFeePerGas
, maxPriorityFeePerGas
and baseFee
will be reported in Wei instead of Gwei, and the value will also be a string instead of float.'priorityFee'
, the calculation of the maxPriorityFeePerGas
parameter will be based on the scanned blocks, instead of using the default calculation (maxFeePerGas - baseFee
. Consequently, the calculation of maxFeePerGas
will be based on the sum of baseFee
and maxPriorityFeePerGas
, rather than relying on the scanned blocks as done by default.feeinusd
is set enabled, this will be the gas used for the transaction estimation. If not informed, the value will be the average gas used in the scanned blocks. You can use SW3 /estimate endpoint to get the gas used for a specific transaction.accept
param.accept
argument.accept
% of scanned blocks. This field is only available if the network is EIP-1559 compliant and eip1559
argument is set to true
.accept
% of blocks. This field will not be available when the eip1559
argument is set to false
.accept
% of blocks. This field will not be available when the eip1559
argument is set to false
.accept
% of blocks. This field is only available when eip1559
argument is set to false
.avgGas
value.const fetch = require('node-fetch');
const url = `https://api.owlracle.info/v4/eth/gas`;
const data = await fetch(url).then(res => res.json());
console.log(data);
Gas history
Retrieve the price history for gas, token price and fee for Ethereum
network. If you prefer another network, replace eth
for the corresponding network symbol.
Check our header for the supported network list.
The API will return an array of candlesticks built from aggregate data of the requested timeframe. The array is ordered from decreasing timestamps.
tokenprice
argument is set to true
txfee
argument is set to true
const fetch = require('node-fetch');
const url = `https://api.owlracle.info/v4/eth/history`;
const data = await fetch(url).then(res => res.json());
console.log(data);
API key information
Request information about your API key.
const fetch = require('node-fetch');
const url = `https://api.owlracle.info/v4/keys/`;
const data = await fetch(url).then(res => res.json());
console.log(data);
API key credit recharge history
Get information about every api recharge.
On a success, the result will be a JSON containing message
and 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:
const fetch = require('node-fetch');
const url = `https://api.owlracle.info/v4/credit/`;
const data = await fetch(url).then(res => res.json());
console.log(data);
API key usage log
Get information about your API key usage.
You can pass the optional arguments fromtime
and totime
to set the time range of your search.
null
if the request was made from a private ip.null
if the request did not originate from a website (or called from the client browser).const fetch = require('node-fetch');
const url = `https://api.owlracle.info/v4/logs/`;
const data = await fetch(url).then(res => res.json());
console.log(data);
RPC endpoint
Get information about the RPCs used by Owlracle.
timeDiff < 60
seconds).const fetch = require('node-fetch');
const url = `https://api.owlracle.info/rpc`;
const data = await fetch(url).then(res => res.json());
console.log(data);
SW3 API
With the Seamless Web3 API, you can easily onboard your users to the blockchain. It is a very powerful API that allows you to create wallets, send transactions, and more. All your users need to interact with the blockchain is a username and password while navigating your app.
Check out the SW3 API documentation for more information.
Proxy Node
We also provide a Proxy Node service that dynamically routes your requests to the fastest available RPC. To use it, you can simply replace your existing RPC URL in your wallet with our URL.
Check out the Proxy Node documentation for more information.