Code Monkey home page Code Monkey logo

ubiquity-blockdaemon's Introduction

Using the Blockdaemon Ubiquity API to fetch cross-chain gas prices

Blockdaemon's Ubiquity API lets you fetch data from different blockchains easily, using a simple API call. In this basic app, we'll use Ubiquity to easily get the gas prices (fast, medium, slow) from 4 different blockchains:

  1. Bitcoin
  2. Bitcoin Cash
  3. Ethereum
  4. Litecoin

We will fetch both the mainnet and testnet gas prices of each chain. You can reference the gas fee API documentation here.

Get up and running

To use this app, git clone the repo.
Run npm install, add a .env file in the root folder and obtain a Blockdaemon API key.
Open the .env file and add the API key like so:
REACT_APP_API_KEY=yourapikeyhere (without " or ')
Save the .env file and run npm start, allow to open port 3000 if needed.
The app will now load in your browser.

Using the app

The app usage is very simple.
First, get the data by using the Fetch data button.
Make sure to open the console to see the different events that are logged.
Once that's done, press the Show gas prices button to see the gas fees for the 4 different blockchains.

This project was bootstrapped with Create React App.

ubiquity-blockdaemon's People

Contributors

pclaesen avatar robbiekruszynski avatar

Stargazers

 avatar  avatar

Watchers

 avatar

ubiquity-blockdaemon's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.