Author

Topic: Question to Bitcoin expert in getJSON, Javascript and Blockchain API (Read 836 times)

member
Activity: 72
Merit: 10
Hi,

I am trying to download Bitcoin block headers from Blockchain.info via API
using
https://blockchain.info/block-index/100?format=json

and getJSON  + Javascript
to parse json file from a remote web server
to get 6 block header input parameters into my Bitcoin miner in plain Javascript (under development)

Tell me how to modify this code to get remote json file and parse data

(just tested this demo on a web server)

Quote


the title
  
  


  

Click on the button to load result.html file:


  

          STAGE
  

  


Do I have to loop API call
https://blockchain.info/api/blockchain_api

http://blockchain.info/rawblock/$block_index

to parse blocks i=1 to 10

http://blockchain.info/rawblock/i

or API can be modified to download file made of 10 block headers in JSON format in one pass ?

Just testing one another getJSON test to access Blockchain header via API

Quote














Ok, this Javascript code is run on local web server, accessing file from a remote web server
but exactly the case with Blockchain.info + API

Blockchain.info = remote server
My Javascript getJSON is run locally

previewed a large number of examples, demos and none worked for me.

Any help ?
Jump to: