diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index 7d5542cf..3e9b4880 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -27,6 +27,7 @@ + [Address (Ethereum)](#ethereumdashboardsaddressa) + [Stats](#bitcoin-cashlitecoinethereumstats) + [General stats](#stats) + + [Network stats](#bitcoin-cashlitecoinnodes) + [API request example](#api-request-examples) + [Broadcasting transactions](#broadcasting-transactions) + [Retrieving raw transactions](#retrieving-raw-transactions) @@ -653,6 +654,18 @@ Returns data on four calls: * `ethereum/stats` * `litecoin/stats` +#### (bitcoin[-cash]|litecoin)/nodes + +Returns data on networks stats. +* `nodes` - nodes + * `version` - user agent + * `country` - country (we use GeoIP) + * `height` - node's best height + * `flags` - [services](https://en.bitcoin.it/wiki/Protocol_documentation#version) flags +* `count` - nodes count +* `countries` - nodes count by country +* `versions` - nodes count by user agent + ### API request examples Suppose we would like to receive all the latest transactions from the Ethereum blockchain which amount to more than $1M USD. The following request should be done for this: @@ -670,7 +683,7 @@ Increase offset value until getting a data set with the transaction that we alre ### Broadcasting transactions -In order to broadcast a transaction into the network, you should make a POST request to `https://api.blockchair.com/{chain}/push/transaction` (where `{chain}` can be one of those: `bitcoin`, `bitcoin-cash`, `ethereum`, and `litecoin`) with `data` holding hex represenatation of a transaction (for Ethereum it should start with `0x`). An example: +In order to broadcast a transaction into the network, you should make a POST request to `https://api.blockchair.com/{chain}/push/transaction` (where `{chain}` can be one of those: `bitcoin`, `bitcoin-cash`, `ethereum`, or `litecoin`) with `data` holding hex represenatation of a transaction (for Ethereum it should start with `0x`). An example: ``` curl -v --data "data=01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0704ffff001d0104ffffffff0100f2052a0100000043410496b538e853519c726a2c91e61ec11600ae1390813a627c66fb8be7947be63c52da7589379515d4e0a604f8141781e62294721166bf621e73a82cbf2342c858eeac00000000" https://api.blockchair.com/bitcoin/push/transaction @@ -686,11 +699,11 @@ Example of a successful response: ### Retrieving raw transactions -It's possible to get raw transaction data directly from our nodes. In order to do this you should make the following API call: `https://api.blockchair.com/{chain}/raw/transaction/{txhash}` (where `{chain}` can be one of those: `bitcoin`, `bitcoin-cash`, `ethereum`, and `litecoin`) +It's possible to get raw transaction data directly from our nodes. In order to do this you should make the following API call: `https://api.blockchair.com/{chain}/raw/transaction/{txhash}` (where `{chain}` can be one of those: `bitcoin`, `bitcoin-cash`, `ethereum`, or `litecoin`) The response contains two keys which are: * `raw_transaction` - raw transaction represented as hex string -* `decoded_raw_transaction` (not available for Ethereum) - raw transaction encoded in JSON by our nodes. Please not that the structure of this JSON array may change as we upgrade our nodes, and this won't be reflected in our change logs. +* `decoded_raw_transaction` (not available for Ethereum) - raw transaction encoded in JSON by our nodes. Please note that the structure of this JSON array may change as we upgrade our nodes, and this won't be reflected in our change logs. ### Support