How to use API of BTC.com

0

I'd like to get some information(BTC's difficulty, hash rate). I think I can get that from api of BTC.com, and I checked github of btccom, but I can't mount api with python.

How Can I use btccom api(v3)? maybe for the first time, I need to install something on terminal(mac). It's like a [pip insall ***].

Than you

Mikihisa Fukuta

Posted 2017-11-23T06:57:07.547

Reputation: 17

Answers

0

BTC.com APIs are Web APIs. This means you can use them by making HTTP requests (GET/POST requests).

Like all online APIs, you can access them through whatever program/script you want, provided they are able to make HTTP requests and handle the answers. Requests/responses are usually encoded using the JSON format.

You can find a good introduction here.

You can choose your favorite language. However, since data is in JSON format, I would suggest to use either Javascript or Python. In Python you can use the 'request' package. Here you can find a quick introduction.

In Javascript you have the 'request' library. I wrote a generic lib to make Web API requests: https://github.com/frz-dev/webapi.js/blob/master/webapi.js

FedFranzoni

Posted 2017-11-23T06:57:07.547

Reputation: 490

どうもありがとうございます。 I did misunderstanding , but now It makes sense for me.

I'm grateful. – Mikihisa Fukuta 2017-11-24T01:01:51.700

I'm glad it helped you. If you consider the answer as correct, please mark it as accepted. thanksçFedFranzoni 2017-11-24T15:05:46.023