Giter Club home page Giter Club logo

chainradar-api's Introduction

chainradar-api

Installation

npm install chainradar

Usage

Importing:

var ChainRadar = require('chainradar');

An instance of a api needs to be initialized before it can be used:

var api = new ChainRadar(options)

Options:

  • apiUrl - API ENDPOINT default: 'http://chainradar.com/api'
  • version - CURRENT API VERSION default: 'v1'
  • coin - Each API request is relative to a coin, so there is a required parameter default: bcn

Status

Get actual coin statistics data.

api.getStatus((data) => {
  console.log(data.hash)
});

Blocks headers

Get blocks header data in height range.

const blockOptions = {
  from: '100000',
  to: '100001'
};

api.getBlocksHeader(blockOptions, (data) => {
  console.log(data)
});

Parameters:

  • from: integer Blocks starting height.
  • to: integer Blocks ending height.

Blocks data

Get blocks full data in height range.

const blockOptions = {
  from: '100000',
  to: '100001'
};

api.getBlocksData(blockOptions, (data) => {
  console.log(data)
});

Parameters:

  • from: integer Blocks starting height.
  • to: integer Blocks ending height.

Block header

Get block header data by height or hash.

api.getBlockHeader('077f4e2c32688157b695d44792ad9dfd986bbabb3fa7e4472805f9858d020f04', (data) => {
  console.log(data)
});

Parameters:

  • height|hash: string Block height or hash.

Block data

Get block data by height or hash.

api.getBlockData('077f4e2c32688157b695d44792ad9dfd986bbabb3fa7e4472805f9858d020f04', (data) => {
  console.log(data)
})

Parameters:

  • height|hash: string Block height or hash.

Transaction header

Get transaction header data.

api.getTransactionHeader('b90da74c3ffc1210e1432766d06260330008b79cda9cdcb363702490ae054162', (data) => {
  console.log(data)
})

Parameters:

  • hash: string Transaction hash.

Transaction data

Get transaction full data.

api.getTransactionData('b90da74c3ffc1210e1432766d06260330008b79cda9cdcb363702490ae054162', (data) => {
  console.log(data)
})

Parameters:

  • hash: string Transaction hash.

Pre Publish

npm run prepublish

Limits

There are API requests count limits by IP for direct calls and by domain for AJAX calls.

ANONYMOUS

Direct calls - 100 requests from one IP in a 1 day. AJAX calls - not allowed.

LINKED

If web-site adds a link to the ChainRadar and inform us, we will increase its limits to both IP and domain.

Direct calls - 1500 requests from one IP in a 1 day. AJAX calls - 30000 total requests referred to linked site domain in a 1 day.

PREMIUM

If Linked limits are not enough for your web-service, then you can contact us and we can discuss special limits.

Donations

Donations for the work done in this fork are accepted at

  • BCN: 27HTiGScRW1eUbawbmdNCcBThtVFYBDAL4j9XV4drPVcBh2EDBnBRwKfNCezqRpKfLJf5dmANoy6uA2bGtZ3uT5fJGqgzX8

chainradar-api's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

chainradar-api's Issues

Issue can be deleted

I edited this issue to remove cryptocurrency adspam. My account was used by a bad actor because of a leaked access token. This bad actor created lots of issues with cryptocurrency adspam. I am sorry.

Issue can be deleted

I edited this issue to remove cryptocurrency adspam. My account was used by a bad actor because of a leaked access token. This bad actor created lots of issues with cryptocurrency adspam. I am sorry. Sadly I can only update issues, not delete them.

Add bitcoin as a topic to this repository

Hello,

This repository is listed on the Awesome Bitcoin list, which is a collection of useful Bitcoin projects. However, it seems that the 'bitcoin' topic is missing from this repository's topics.

Adding the 'bitcoin' topic will help users discover your project more easily and recognize its relevance to the Bitcoin ecosystem. To add the topic, please follow these steps:

  1. Navigate to the main page of the repository.
  2. Click on the gear icon next to "About" on the right side of the page.
  3. In the "Topics" section, type 'bitcoin' and press Enter.
  4. Click "Save changes."

Thank you for your attention and for contributing to the Bitcoin community!

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.