Skip to content
Branch: master
Find file History
bret-fusion corrected buy ticket query
added version query
Latest commit 1a64c64 May 6, 2019

web3-fusion-extend.js - Fusion JavaScript API

Block Explorer API


This block explorer api section shows how to collect all information from the fusion block chain and update a mysql database.

You will need a node for the application readAllBlocksToDatabase.js to communicate with as well as a mysql database to store the information.

You will need an environment string called DB_CONNECT_STRING and CONNECT_STRING

It can be passed on the command line.

CONNECT_STRING="ws://"  DB_CONNECT_STRING="{'host':'mysqlserver,'user':'adminuser','password':'password','database':'fusionblockdb','connectionLimit':100}" node readAllBlocksToDatabase.js 

You can then host the api server for the database via:

DB_CONNECT_STRING="{'host':'mysqlserver,'user':'adminuser','password':'password','database':'fusionblockdb','connectionLimit':100}" nodemon   node ./bin/www

Fusion Org and its public explorer api

Fusion organization keeps an api endpoint open at to assist in application development

You can try commands like or

Note if you are not a developer the results may look scary but they are the actual last block or transaction info


npm install

API Commands

If running locally replace with your own server link




fields can be: [ timestamp, hash , numberOfTransactions, height ]


#Transactions fields can be: [ timestamp, hash , type, block , asset ]

Return an array of transactions from a - seperated array

#Fusion Price

last price

historical prices

last two prices


#miner leaderboard

#Ticket purchase applicaton

Example: node autoPurchaseTicket --c"wss://" -p "./password.txt" -k "./keystore.key" -n 10

          -c --connectString web socket gateway to connect to
          -k  --keyStore keystore file to use
          -p  --passPharseFile key file
          -n  --Number of tickets to purchase
You can’t perform that action at this time.