: $
network icon

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 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 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 ( requests in the last hour), each new request will subtract $ 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 while using the 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.

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.

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 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.

Gas history

Retrieve the price history for gas, token price and fee for network. If you prefer another network, replace 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.

API key information

Request information about your API key.

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:

API key usage log

Get information about your API key usage.

You can pass the optional arguments fromtime and totimeto set the time range of your search.