From 6fed3caca959f2fb4af7a4ded9367a520953d344 Mon Sep 17 00:00:00 2001 From: Yedige Davletgaliyev <25755605+linuxion@users.noreply.github.com> Date: Tue, 20 Nov 2018 22:25:43 +0300 Subject: [PATCH 001/180] Update API_DOCUMENTATION_EN.md --- API_DOCUMENTATION_EN.md | 107 ++++++++++++++++++++++++++-------------- 1 file changed, 69 insertions(+), 38 deletions(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index 954dd358..3dd7ccab 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,6 +1,37 @@ -### [Blockchair.com](https://blockchair.com/) API v.2.0.6 Documentation - -#### Changelog +## [Blockchair.com](https://blockchair.com/) API v.2.0.6 Documentation + +![alt text](https://blockchair.com/images/logo_full.png "Blockchair logo") + +### Table of contents + ++ [Changelog](#changelog) + + [Tested features changelog](#tested-features-changelog) ++ [General Provisions](#general-provisions) ++ [Infinitable Calls (blockhain tables)](#infinitable-calls-blockhain-tables) ++ Bitcoin, Bitcoin Cash, Litecoin + + [Blocks](#bitcoin-cashlitecoinmempoolblocks) + + [Transaction](#bitcoin-cashlitecoinmempooltransactions) + + [Outputs](#bitcoin-cashlitecoinmempooloutputs) ++ Ethereum + + [Blocks](#ethereummempoolblocks) + + [Uncles](#ethereumuncles) + + [Transactions](#ethereummempooltransactions) + + [Calls](#ethereumcalls) ++ [Notes](#notes) ++ [Dashboard calls](#dashboard-calls) + + [Blocks](#bitcoin-cashlitecoinethereumdashboardsblocka-and-bitcoin-cashlitecoinethereumdashboardsblocksab) + + [Uncles (Ethereum)](#ethereumdashboardsunclea-and-ethereumdashboardsunclesab) + + [Transactions](#bitcoin-cashlitecoinethereumdashboardstransactiona-and-bitcoin-cashlitecoinethereumdashboardstransactionsab) + + [Unconfirmed transactions priority (in mempool)](#bitcoin-cashlitecoinethereumdashboardstransactionhashpriority) + + [Address (Bitcoin, Bitcoin Cash, Litecoin)](#bitcoin-cashlitecoindashboardsaddressa) + + [Address (Ethereum)](#ethereumdashboardsaddressa) + + [Stats](#bitcoin-cashlitecoinethereumstats) + + [General stats](#stats) ++ [API request example](#api-request-examples) ++ [Support](#support) + + +### Changelog * v.2.0.6 - Oct 8th - Added data aggregation of blockchain data in beta mode, see `Data aggregation support` below * v.2.0.5 - Oct 8th - Fixed bug where `balance` and `received` for bitcoin[-cash]|litecoin addresses in the `{chain}/dashboards/address/{address}` call were calculated wrong if there were specific unconfirmed transactions @@ -9,7 +40,7 @@ * v.2.0.2 - Sep 9th - Added `address.contract_created` to the `ethereum/dashboards/address/{A}` call * v.2.0.1 - Sep 1st - Added Litecoin support -#### Tested features changelog +### Tested features changelog ##### Data aggregation support (since Oct 8th) @@ -25,34 +56,34 @@ To use aggregation, put the fields by which you'd like to group by (zero, one, o Possible fields: * Bitcoin, Bitcoin Cash, Litecoin: - * Blocks table + * [Blocks table](#bitcoin-cashlitecoinmempoolblocks) * Group by: date (or week, month, year), version, guessed_miner - * To calculate: size, stripped_size (except BCH), weight (except BCH), transaction_count, witness_count, input_count, output_count, input_total, input_total_usd, output_total, output_total_usd, fee_total, fee_total_usd, fee_per_kb, fee_per_kb_usd, fee_per_kwu (except BCH), fee_per_kwu_usd (except BCH), cdd_total, generation, generation_usd, reward, reward_usd -- possible functions: avg(field), median(field), min(field), max(field), sum(field), count() - * Transactions table + * To calculate: size, stripped_size (except BCH), weight (except BCH), transaction_count, witness_count, input_count, output_count, input_total, input_total_usd, output_total, output_total_usd, fee_total, fee_total_usd, fee_per_kb, fee_per_kb_usd, fee_per_kwu (except BCH), fee_per_kwu_usd (except BCH), cdd_total, generation, generation_usd, reward, reward_usd — possible functions: avg(field), median(field), min(field), max(field), sum(field), count() + * [Transactions table](#bitcoin-cashlitecoinmempooltransactions) * Group by: block_id, date (or week, month, year), version, is_coinbase, has_witness (except BCH), input_count, output_count - * To calculate: size, weight (except BCH), input_count, output_count, input_total, input_total_usd, output_total, output_total_usd, fee, fee_usd, fee_per_kb, fee_per_kb_usd, fee_per_kwu (except BCH), fee_per_kwu_usd (except BCH), cdd_total -- possible functions: avg(field), median(field), min(field), max(field), sum(field), count() - * Outputs table + * To calculate: size, weight (except BCH), input_count, output_count, input_total, input_total_usd, output_total, output_total_usd, fee, fee_usd, fee_per_kb, fee_per_kb_usd, fee_per_kwu (except BCH), fee_per_kwu_usd (except BCH), cdd_total — possible functions: avg(field), median(field), min(field), max(field), sum(field), count() + * [Outputs table](#bitcoin-cashlitecoinmempooloutputs) * Group by: block_id, date (or week, month, year), type, is_from_coinbase, is_spendable, is_spent, spending_block_id, spending_date (no support for spending_week, spending_month, spending_year yet) - * To calculate: value, value_usd, spending_value_usd, lifespan, cdd -- possible functions: avg(field), median(field), min(field), max(field), sum(field), count() + * To calculate: value, value_usd, spending_value_usd, lifespan, cdd — possible functions: avg(field), median(field), min(field), max(field), sum(field), count() * Ethereum: - * Blocks table + * [Blocks table](#ethereummempoolblocks) * Group by: date (or week, month, year), miner - * To calculate: size, difficulty, gas_used, gas_limit, uncle_count, transaction_count, synthetic_transaction_count, call_count, synthetic_call_count, value_total, value_total_usd, internal_value_total, internal_value_total_usd, generation, generation_usd, uncle_generation, uncle_generation_usd, fee_total, fee_total_usd, reward, reward_usd -- possible functions: avg(field), median(field), min(field), max(field), sum(field), count() - * Uncles table + * To calculate: size, difficulty, gas_used, gas_limit, uncle_count, transaction_count, synthetic_transaction_count, call_count, synthetic_call_count, value_total, value_total_usd, internal_value_total, internal_value_total_usd, generation, generation_usd, uncle_generation, uncle_generation_usd, fee_total, fee_total_usd, reward, reward_usd — possible functions: avg(field), median(field), min(field), max(field), sum(field), count() + * [Uncles table](#ethereumuncles) * Group by: parent_block_id, date (or week, month, year), miner - * To calculate: size, difficulty, gas_used, gas_limit, generation, generation_usd -- possible functions: avg(field), median(field), min(field), max(field), sum(field), count() - * Transactions table + * To calculate: size, difficulty, gas_used, gas_limit, generation, generation_usd — possible functions: avg(field), median(field), min(field), max(field), sum(field), count() + * [Transactions table](#ethereummempooltransactions) * Group by: block_id, date (or week, month, year), failed, type - * To calculate: call_count, value, value_usd, internal_value, internal_value_usd, fee, fee_usd, gas_used, gas_limit, gas_price -- possible functions: avg(field), median(field), min(field), max(field), sum(field), count() - * Calls table + * To calculate: call_count, value, value_usd, internal_value, internal_value_usd, fee, fee_usd, gas_used, gas_limit, gas_price — possible functions: avg(field), median(field), min(field), max(field), sum(field), count() + * [Calls table](#ethereumcalls) * Group by: block_id, date (or week, month, year), failed, fail_reason, type, transferred - * To calculate: child_call_count, value, value_usd -- possible functions: avg(field), median(field), min(field), max(field), sum(field), count() + * To calculate: child_call_count, value, value_usd — possible functions: avg(field), median(field), min(field), max(field), sum(field), count() ##### Omni Layer and Wormhole support (since Sep 18th) * v.a1 - Sep 18th - Added alpha support for Omni Layer in Bitcoin (`bitcoin/omni/properties`, `bitcoin/omni/dashboards/property/{id}` calls, plus `_omni` key in the `bitcoin/dashboards/transaction` call and `_omni` key in the `bitcoin/dashboards/address` call), and support for Wormhole in Bitcoin Cash (`bitcoin-cash/wormhole/properties`, `bitcoin-cash/wormhole/dashboards/property/{id}` calls, plus `_wormhole` key in the `bitcoin-cash/dashboards/transaction` call and `_wormhole` key in the `bitcoin-cash/dashboards/address` call). Please don't use this in production yet, there will be massive changes! -#### General Provisions +### General Provisions * Requests to our server should be made through the HTTPS protocol by GET requests to the domain `api.blockchair.com` @@ -149,7 +180,7 @@ If you need to apply several sorts, you can list them by commas, similar to filt **Offset** can be used as a paginator, e.g., `?offset=10` returns the next 10 results. `context.offset` takes the value of the set `OFFSET`. The maximum value is 10000. If you need just the last page, it's easier and quicker to change the direction of the sorting to the opposite. Important: when iterating through the results, it is extremely likely that the number of rows in the database will increase because new blocks were found. To avoid that, you may add an additional condition that limits the block id to the value obtained in `context.state` in the first query. -##### (bitcoin[-cash]|litecoin)/[mempool/]blocks +#### (bitcoin[-cash]|litecoin)/[mempool/]blocks Returns data about blocks @@ -206,7 +237,7 @@ Notes: - (\*) - only for Bitcoin - the default sorting - id DESC -##### (bitcoin[-cash]|litecoin)/[mempool/]transactions +#### (bitcoin[-cash]|litecoin)/[mempool/]transactions Returns transaction data @@ -243,7 +274,7 @@ Notes: - (\*) - only for Bitcoin - the default sort is id DESC -##### (bitcoin[-cash]|litecoin)/[mempool/]outputs +#### (bitcoin[-cash]|litecoin)/[mempool/]outputs Returns information about the outputs (that become inputs when they are spent, and then `spending*` information appears) @@ -289,7 +320,7 @@ Notes: - (\*) - only for Bitcoin - the default sort is - transaction_id DESC -##### ethereum/[mempool/]blocks +#### ethereum/[mempool/]blocks Returns block data @@ -346,7 +377,7 @@ Notes: - the difference between `value_total` and `internal_value_total`: e.g., a transaction itself sends 0 eth, but this transaction is a call of a contract that sends someone, let's say, 10 eth. Then `value` will be 0 eth, and `internal_value` - 10 eth - the default sort is id DESC -##### ethereum/uncles +#### ethereum/uncles Returns information about uncles @@ -388,7 +419,7 @@ Notes: - the search over `extra_data_hex` column can be done by the operator `^`, you can also use `~` for `extra_data_bin` (however, the field `extra_data_bin` will still not be shown) - sort by default - parent_block_id DESC -##### ethereum/[mempool/]transactions +#### ethereum/[mempool/]transactions Returns transaction information @@ -444,7 +475,7 @@ Notes: * create_tree - create a new contract that create contracts or starts making calls * synthetic_coinbase - a synthetic transaction for awarding a reward to the miner (block or uncle) -##### ethereum/calls +#### ethereum/calls Returns information about calls @@ -478,18 +509,18 @@ Notes: - the default sort is transaction_id DESC - sorting by `index` is alphabetical (ie "0.2" goes after "0.11"), in some cases a switch to natural sorting is used (for example, when there is a filter for `transaction_id`) -##### Notes +#### Notes - for unconfirmed transactions (and outputs in the case of bitcoin[-cash]), the following rules are applied: - their `block_id` is equal to `-1` - `date` and` time` indicate the time when the transaction was received by our node - when using `offset`, it is reasonable to add to the filters the maximum block number (`?q=block_id(..N)`), since it is very likely that during the iteration new rows will be added to the table. For convenience, you can take the value of `context.state` from the first result of any query containing the number of the latest block at the query time and use this result later on. -#### Dashboard calls +### Dashboard calls The API supports a number of calls that produce some aggregated data, or data in a more convenient form for certain entities. -##### (bitcoin[-cash]|litecoin|ethereum)/dashboards/block/{A} and (bitcoin[-cash]|litecoin|ethereum)/dashboards/blocks/{A[,B,...]} +#### (bitcoin[-cash]|litecoin|ethereum)/dashboards/block/{A} and (bitcoin[-cash]|litecoin|ethereum)/dashboards/blocks/{A[,B,...]} As the input data, it takes the height or hash of the block(s). `data` returns an array with block heights or block hashes used as keys, and arrays of elements as values: * `block` - information about the block in infinitable-format `(bitcoin[-cash]|ethereum)/blocks` @@ -499,14 +530,14 @@ As the input data, it takes the height or hash of the block(s). `data` returns a `context.results` contains the number of found blocks. -##### ethereum/dashboards/uncle/{A} and ethereum/dashboards/uncles/{A[,B,...]} +#### ethereum/dashboards/uncle/{A} and ethereum/dashboards/uncles/{A[,B,...]} As the input data, it takes an uncle hash(es). `data` returns an array with uncle hashes used as keys, and arrays of elements as values: * `uncle` - information about the block in infinitable-format `ethereum/uncles` `context.results` contains the number of found uncles. -##### (bitcoin[-cash]|litecoin|ethereum)/dashboards/transaction/{A} and (bitcoin[-cash]|litecoin|ethereum)/dashboards/transactions/{A[,B,...]} +#### (bitcoin[-cash]|litecoin|ethereum)/dashboards/transaction/{A} and (bitcoin[-cash]|litecoin|ethereum)/dashboards/transactions/{A[,B,...]} At the input data, it takes an internal blockchair-id or a hash of a transaction (transactions). `data` returns an array with identifiers or hashes of transactions used as keys, and arrays of elements as keys: * `transaction` - transaction information in infinitable-format `bitcoin[-cash]/transactions` @@ -516,11 +547,11 @@ At the input data, it takes an internal blockchair-id or a hash of a transaction `context.results` contains the number of found transactions. -##### (bitcoin[-cash]|litecoin|ethereum)/dashboards/transaction/{hash}/priority +#### (bitcoin[-cash]|litecoin|ethereum)/dashboards/transaction/{hash}/priority For mempool transactions shows priority (`position`) (for Bitcoin - by `fee_per_kwu`, for Bitcoin Cash - by `fee_per_kb`, for Ethereum - by `gas_price`) over other transactions (`out_of` mempool transactions). It has the same structure as the `(bitcoin[-cash]|ethereum)/dashboards/transaction/{A}` call -##### (bitcoin[-cash]|litecoin)/dashboards/address/{A} +#### (bitcoin[-cash]|litecoin)/dashboards/address/{A} Uses address as the input data. `data` returns an array with one element (if the address is found), in that case the address is the key, and the value is an array consisting of the following elements: * `address` @@ -545,7 +576,7 @@ Uses address as the input data. `data` returns an array with one element (if the To iterate `transactions`, `?offset=N` is supported. -##### ethereum/dashboards/address/{A} +#### ethereum/dashboards/address/{A} Uses address as the input data. `data` returns an array with one element (if the address is found), in that case the address is the key, and the value is an array consisting of the following elements: * `address` @@ -579,7 +610,7 @@ Notes: - (\*) - in these columns, the value in wei can be rounded. For a million of calls, the error can be more than 1 ether. - (\*\*) - counted only those calls that fit the following condition: ethereum/calls.transferred = true (see the `ethereum/calls` documentation), i.e. those calls as well as failed calls that do not change state (staticcall, etc.) are not considered -##### (bitcoin[-cash]|litecoin|ethereum)/stats +#### (bitcoin[-cash]|litecoin|ethereum)/stats Returns an array with blockchain statistics: * `blocks` - total number of blocks @@ -610,7 +641,7 @@ Returns an array with blockchain statistics: * `market_dominance_percentage` - dominance index (how much % of the total cryptocurrency market is the market capitalization of the coin) ... there's also some other self-explanatory keys -##### stats +#### stats Returns data on four calls: * `bitcoin/stats` @@ -618,7 +649,7 @@ Returns data on four calls: * `ethereum/stats` * `litecoin/stats` -#### API request examples +### 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: * `https://api.blockchair.com/ethereum/transactions?q=internal_value_usd(10000000..)&s=id(desc)` @@ -633,7 +664,7 @@ From its result we save `context.state`, put it in a variable `_S_`, and further Increase offset value until getting a data set with the transaction that we already knew about. -#### Support +### Support * E-mail: [info@blockchair.com](mailto:info@blockchair.com) * Telegram chat: [@Blockchair](https://telegram.me/Blockchair) From ada01775aa14f9b1ac27c6904f8c16f7d9bf6b3a Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Thu, 22 Nov 2018 19:06:16 +0300 Subject: [PATCH 002/180] Update API_DOCUMENTATION_EN.md --- API_DOCUMENTATION_EN.md | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index 3dd7ccab..dd06152c 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,6 +1,6 @@ -## [Blockchair.com](https://blockchair.com/) API v.2.0.6 Documentation +## [Blockchair.com](https://blockchair.com/) API v.2.0.7 Documentation -![alt text](https://blockchair.com/images/logo_full.png "Blockchair logo") +![Blockchair logo](https://blockchair.com/images/logo_full.png "Blockchair logo") ### Table of contents @@ -28,11 +28,13 @@ + [Stats](#bitcoin-cashlitecoinethereumstats) + [General stats](#stats) + [API request example](#api-request-examples) ++ [Broadcasting transactions](#broadcasting-transactions) + [Support](#support) ### Changelog +* v.2.0.7 - Nov 22th - Now it's possible to broadcast transactions using our API, see [Broadcasting transactions](#broadcast) * v.2.0.6 - Oct 8th - Added data aggregation of blockchain data in beta mode, see `Data aggregation support` below * v.2.0.5 - Oct 8th - Fixed bug where `balance` and `received` for bitcoin[-cash]|litecoin addresses in the `{chain}/dashboards/address/{address}` call were calculated wrong if there were specific unconfirmed transactions * v.2.0.4 - Oct 3rd - Added some new useful fields to `{chain}/stats` calls @@ -664,6 +666,22 @@ From its result we save `context.state`, put it in a variable `_S_`, and further Increase offset value until getting a data set with the transaction that we already knew about. +### 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` 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 +``` + +If the transaction has been successfully broadcast to the network, API will return a JSON response (code 200) containing `data` array with `transaction_hash` key holding the hash of the received transaction. In case of any error (wrong transaction format, spending already spent outputs, etc.) API returns status code 400. + +Example of a successful response: + +``` +{"data":{"transaction_hash": "0e3e2357e806b6cdb1f70b54c3a3a17b6714ee1f0e68bebb44a74b1efd512098…"},"context":{"code":200,… +``` + ### Support * E-mail: [info@blockchair.com](mailto:info@blockchair.com) From a6dfd6755fdbec452e182cd44aa3faf721d204d4 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Thu, 22 Nov 2018 19:06:38 +0300 Subject: [PATCH 003/180] Update API_DOCUMENTATION_EN.md --- API_DOCUMENTATION_EN.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index dd06152c..28b9023c 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -34,7 +34,7 @@ ### Changelog -* v.2.0.7 - Nov 22th - Now it's possible to broadcast transactions using our API, see [Broadcasting transactions](#broadcast) +* v.2.0.7 - Nov 22th - Now it's possible to broadcast transactions using our API, see [Broadcasting transactions](#broadcasting-transactions) * v.2.0.6 - Oct 8th - Added data aggregation of blockchain data in beta mode, see `Data aggregation support` below * v.2.0.5 - Oct 8th - Fixed bug where `balance` and `received` for bitcoin[-cash]|litecoin addresses in the `{chain}/dashboards/address/{address}` call were calculated wrong if there were specific unconfirmed transactions * v.2.0.4 - Oct 3rd - Added some new useful fields to `{chain}/stats` calls From 4d2378e7c6b476a1d87166489828395ad63a4a7f Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Thu, 22 Nov 2018 19:07:54 +0300 Subject: [PATCH 004/180] Update API_DOCUMENTATION_EN.md --- API_DOCUMENTATION_EN.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index 28b9023c..2f01636a 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -668,7 +668,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` 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`, and `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 From c4fbf02e398b25c6ecd31acd8af7d668b87e9c2c Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Thu, 22 Nov 2018 19:08:52 +0300 Subject: [PATCH 005/180] Update API_DOCUMENTATION_RU.md --- API_DOCUMENTATION_RU.md | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/API_DOCUMENTATION_RU.md b/API_DOCUMENTATION_RU.md index 2cc70656..206393ce 100644 --- a/API_DOCUMENTATION_RU.md +++ b/API_DOCUMENTATION_RU.md @@ -1,6 +1,6 @@ -## [Blockchair.com](https://blockchair.com/) API v.2.0.6 - документация +## [Blockchair.com](https://blockchair.com/) API v.2.0.7 - документация -![alt text](https://blockchair.com/images/logo_full.png "Blockchair logo") +![Blockchair logo](https://blockchair.com/images/logo_full.png "Blockchair logo") ### Содержание @@ -28,10 +28,12 @@ + [Статистика](#bitcoin-cashlitecoinethereumstats) + [Статистика по всем блокчейнам](#stats) + [Пример](#пример-работы-с-api) ++ [Broadcasting transactions](#broadcasting-transactions) + [Поддержка](#поддержка) ### Changelog +* v.2.0.7 - Nov 22th - Now it's possible to broadcast transactions using our API, see [Broadcasting transactions](#broadcasting-transactions) * v.2.0.6 - 8 октября - В бета-режиме добавлена возможность агрегировать информацию из блокчейнов, см. `Поддержка агрегирования данных` ниже * v.2.0.5 - 8 октября - Исправлен баг с подсчётом `balance` и `received` у bitcoin[-cash]|litecoin-адресов в колле `{chain}/dashboards/address/{address}`, когда имелись специфические неподтверждённые транзакции * v.2.0.4 - 3 октября - Добавлены некоторые полезные поля к коллам `{chain}/stats` @@ -664,6 +666,22 @@ API поддерживает ряд коллов, которые выдают к Увеличиваем значение offset пока не получим выборку с транзакцией, о которой мы уже знали. +### 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: + +``` +curl -v --data "data=01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0704ffff001d0104ffffffff0100f2052a0100000043410496b538e853519c726a2c91e61ec11600ae1390813a627c66fb8be7947be63c52da7589379515d4e0a604f8141781e62294721166bf621e73a82cbf2342c858eeac00000000" https://api.blockchair.com/bitcoin/push/transaction +``` + +If the transaction has been successfully broadcast to the network, API will return a JSON response (code 200) containing `data` array with `transaction_hash` key holding the hash of the received transaction. In case of any error (wrong transaction format, spending already spent outputs, etc.) API returns status code 400. + +Example of a successful response: + +``` +{"data":{"transaction_hash": "0e3e2357e806b6cdb1f70b54c3a3a17b6714ee1f0e68bebb44a74b1efd512098…"},"context":{"code":200,… +``` + ### Поддержка * E-mail: [info@blockchair.com](mailto:info@blockchair.com) From 8d031fbf220c960172e9434275f60077ee46bff0 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Thu, 22 Nov 2018 19:10:06 +0300 Subject: [PATCH 006/180] Update API.md --- API.md | 40 ++-------------------------------------- 1 file changed, 2 insertions(+), 38 deletions(-) diff --git a/API.md b/API.md index 6b88fcde..0de53ec3 100644 --- a/API.md +++ b/API.md @@ -6,7 +6,8 @@ ### Changelog -* v.2.0.6 - Oct 8th - Added data aggregation of blockchain data in beta mode, see `Data aggregation support` below +* v.2.0.7 - Nov 22th - Now it's possible to broadcast transactions using our API, see `Broadcasting transactions` in the docs +* v.2.0.6 - Oct 8th - Added data aggregation of blockchain data in beta mode, see `Data aggregation support` in the docs * v.2.0.5 - Oct 8th - Fixed bug where `balance` and `received` for bitcoin[-cash]|litecoin addresses in the `{chain}/dashboards/address/{address}` call were calculated wrong if there were specific unconfirmed transactions * v.2.0.4 - Oct 3rd - Added some new useful fields to `{chain}/stats` calls * v.2.0.3 - Sep 18th - Added `context.api.tested_features` with the list of features our API supports, but with no guarantee for backward compatibility if updated. Added Omni Layer and Wormhole support in testing mode (see "Tested features changelog") @@ -14,43 +15,6 @@ * v.2.0.1 - Sep 1st, 2018 - Added Litecoin support * v.2.0.0 - Migrating from API v.1 to API v.2 (see the docs) -##### Data aggregation support (since Oct 8th - please note this is a tested feature!) - -* v.b1 - Oct 8th - Bringing the ability to obtain aggregated data. Now you can use Blockchair not only to filter and sort blockchain data, but also to aggregate it. - -See the examples: -* https://api.blockchair.com/bitcoin/blocks?a=year,count()# - get the total number of Bitcoin blocks by year -* https://api.blockchair.com/bitcoin/transactions?a=month,median(fee_usd)# - get the median Bitcoin transaction fees by month -* https://api.blockchair.com/ethereum/blocks?a=miner,sum(generation)&s=sum(generation)(desc)# - get the list of Ethereum miners (except uncle miners) and sort it by the total amount minted -* https://api.blockchair.com/bitcoin-cash/blocks?a=sum(fee_total_usd)&q=id(478559..)# - calculate how much miners have collected in fees since the fork - -To use aggregation, put the fields by which you'd like to group by (zero, one, or several), and fields (at least one) which you'd like to calculate using some aggregate function under the `?a=` section. You can also sort the results by one of the fields included in the `?a=` section (`asc` or `desc`) using the `?s=` section, and apply additional filters (see the documentation for the `?q=` section). - -Possible fields: -* Bitcoin, Bitcoin Cash, Litecoin: - * Blocks table - * Group by: date (or week, month, year), version, guessed_miner - * To calculate: size, stripped_size (except BCH), weight (except BCH), transaction_count, witness_count, input_count, output_count, input_total, input_total_usd, output_total, output_total_usd, fee_total, fee_total_usd, fee_per_kb, fee_per_kb_usd, fee_per_kwu (except BCH), fee_per_kwu_usd (except BCH), cdd_total, generation, generation_usd, reward, reward_usd -- possible functions: avg(field), median(field), min(field), max(field), sum(field), count() - * Transactions table - * Group by: block_id, date (or week, month, year), version, is_coinbase, has_witness (except BCH), input_count, output_count - * To calculate: size, weight (except BCH), input_count, output_count, input_total, input_total_usd, output_total, output_total_usd, fee, fee_usd, fee_per_kb, fee_per_kb_usd, fee_per_kwu (except BCH), fee_per_kwu_usd (except BCH), cdd_total -- possible functions: avg(field), median(field), min(field), max(field), sum(field), count() - * Outputs table - * Group by: block_id, date (or week, month, year), type, is_from_coinbase, is_spendable, is_spent, spending_block_id, spending_date (no support for spending_week, spending_month, spending_year yet) - * To calculate: value, value_usd, spending_value_usd, lifespan, cdd -- possible functions: avg(field), median(field), min(field), max(field), sum(field), count() -* Ethereum: - * Blocks table - * Group by: date (or week, month, year), miner - * To calculate: size, difficulty, gas_used, gas_limit, uncle_count, transaction_count, synthetic_transaction_count, call_count, synthetic_call_count, value_total, value_total_usd, internal_value_total, internal_value_total_usd, generation, generation_usd, uncle_generation, uncle_generation_usd, fee_total, fee_total_usd, reward, reward_usd -- possible functions: avg(field), median(field), min(field), max(field), sum(field), count() - * Uncles table - * Group by: parent_block_id, date (or week, month, year), miner - * To calculate: size, difficulty, gas_used, gas_limit, generation, generation_usd -- possible functions: avg(field), median(field), min(field), max(field), sum(field), count() - * Transactions table - * Group by: block_id, date (or week, month, year), failed, type - * To calculate: call_count, value, value_usd, internal_value, internal_value_usd, fee, fee_usd, gas_used, gas_limit, gas_price -- possible functions: avg(field), median(field), min(field), max(field), sum(field), count() - * Calls table - * Group by: block_id, date (or week, month, year), failed, fail_reason, type, transferred - * To calculate: child_call_count, value, value_usd -- possible functions: avg(field), median(field), min(field), max(field), sum(field), count() - ### Support * E-mail: [info@blockchair.com](mailto:info@blockchair.com) From 204246fd0ec3ab4efd8c775cdf39e29abf7b28a2 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Sun, 25 Nov 2018 17:06:25 +0300 Subject: [PATCH 007/180] Update API_DOCUMENTATION_EN.md --- API_DOCUMENTATION_EN.md | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index 2f01636a..7d5542cf 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,4 +1,4 @@ -## [Blockchair.com](https://blockchair.com/) API v.2.0.7 Documentation +## [Blockchair.com](https://blockchair.com/) API v.2.0.8 Documentation ![Blockchair logo](https://blockchair.com/images/logo_full.png "Blockchair logo") @@ -29,11 +29,13 @@ + [General stats](#stats) + [API request example](#api-request-examples) + [Broadcasting transactions](#broadcasting-transactions) ++ [Retrieving raw transactions](#retrieving-raw-transactions) + [Support](#support) ### Changelog +* v.2.0.8 - Nov 26th - Add the ability to retrieve raw transaction data in hex, see [Retrieving raw transactions](#retrieving-raw-transactions) * v.2.0.7 - Nov 22th - Now it's possible to broadcast transactions using our API, see [Broadcasting transactions](#broadcasting-transactions) * v.2.0.6 - Oct 8th - Added data aggregation of blockchain data in beta mode, see `Data aggregation support` below * v.2.0.5 - Oct 8th - Fixed bug where `balance` and `received` for bitcoin[-cash]|litecoin addresses in the `{chain}/dashboards/address/{address}` call were calculated wrong if there were specific unconfirmed transactions @@ -93,7 +95,7 @@ Possible fields: * `data` - contains some data * `context` - contains metadata, e.g., a status code, a query execution time, and so on. -* `data` can contain either an associative array (e.g., for `bitcoin/stats`), or for infinitable-queries (see below) - an unnumbered array (for example, `bitcoin/blocks`), or for dashboard-queries (see below) - an associative array with keys which are parts of the query (e.g., for `bitcoin/dashboards/transactions/A,B`, the keys are `A` and `B`), and with values ​- arrays of data. +* `data` can contain either an associative array (e.g., for `bitcoin/stats`), or for infinitable-queries (see below) - an unnumbered array (for example, `bitcoin/blocks`), or for dashboard-queries (see below) - an associative array with keys which are parts of the query (e.g., for `bitcoin/dashboards/transactions/A,B`, the keys are `A` and `B`), and with values - arrays of data. * `context`, depending on the call type, can contain the following useful values: * `context.code` - server response code, can return: * `200` if the request succeeds @@ -105,9 +107,9 @@ Possible fields: * `context.results` - contains the number of found results for dashboard-calls * `context.limit` - applied limit to the number of results * `context.offset` - applied offset - * `context.rows` - ​​contains the number of returned rows for infinitable-calls - * `context.pre_rows` - ​​for some infinitable-calls contains the number of rows that should've been returned before duplicate removal (note: this architecture is used for the `bitcoin[-cash].outputs` tables only) - * `context.total_rows` - ​​number of rows that a query returns + * `context.rows` - contains the number of returned rows for infinitable-calls + * `context.pre_rows` - for some infinitable-calls contains the number of rows that should've been returned before duplicate removal (note: this architecture is used for the `bitcoin[-cash].outputs` tables only) + * `context.total_rows` - number of rows that a query returns * `context.api` - an array of data on the status of the API: * `context.api.version` - version of API * `context.api.last_major_update` - time of the last update, that somehow broke backward compatibility @@ -162,7 +164,7 @@ For `time*`-fields, the value can be specified in the following formats: * `YYYY-MM-DD` * `YYYY-MM` -Inequalities are also supported for such values, but the left and right values ​​must be in the same format, e.g.: `bitcoin/blocks?q=time(2009-01-03..2009-01-31)`. +Inequalities are also supported for such values, but the left and right values must be in the same format, e.g.: `bitcoin/blocks?q=time(2009-01-03..2009-01-31)`. If you need to list several filters, you need to sepatate them by commas in the `?q=` section, e.g., `bitcoin/blocks?q=id(500000..),coinbase_data_bin(~hello)` @@ -682,6 +684,14 @@ Example of a successful response: {"data":{"transaction_hash": "0e3e2357e806b6cdb1f70b54c3a3a17b6714ee1f0e68bebb44a74b1efd512098…"},"context":{"code":200,… ``` +### 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`) + +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. + ### Support * E-mail: [info@blockchair.com](mailto:info@blockchair.com) From 374b4d5942fb54732c637269e22ef7ecd571f957 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Sun, 25 Nov 2018 17:06:45 +0300 Subject: [PATCH 008/180] Update API_DOCUMENTATION_RU.md --- API_DOCUMENTATION_RU.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/API_DOCUMENTATION_RU.md b/API_DOCUMENTATION_RU.md index 206393ce..34a0147e 100644 --- a/API_DOCUMENTATION_RU.md +++ b/API_DOCUMENTATION_RU.md @@ -1,4 +1,4 @@ -## [Blockchair.com](https://blockchair.com/) API v.2.0.7 - документация +## [Blockchair.com](https://blockchair.com/) API v.2.0.8 - документация ![Blockchair logo](https://blockchair.com/images/logo_full.png "Blockchair logo") @@ -29,10 +29,12 @@ + [Статистика по всем блокчейнам](#stats) + [Пример](#пример-работы-с-api) + [Broadcasting transactions](#broadcasting-transactions) ++ [Retrieving raw transactions](#retrieving-raw-transactions) + [Поддержка](#поддержка) ### Changelog +* v.2.0.8 - Nov 26th - Add the ability to retrieve raw transaction data in hex, see [Retrieving raw transactions](#retrieving-raw-transactions) * v.2.0.7 - Nov 22th - Now it's possible to broadcast transactions using our API, see [Broadcasting transactions](#broadcasting-transactions) * v.2.0.6 - 8 октября - В бета-режиме добавлена возможность агрегировать информацию из блокчейнов, см. `Поддержка агрегирования данных` ниже * v.2.0.5 - 8 октября - Исправлен баг с подсчётом `balance` и `received` у bitcoin[-cash]|litecoin-адресов в колле `{chain}/dashboards/address/{address}`, когда имелись специфические неподтверждённые транзакции @@ -682,6 +684,14 @@ Example of a successful response: {"data":{"transaction_hash": "0e3e2357e806b6cdb1f70b54c3a3a17b6714ee1f0e68bebb44a74b1efd512098…"},"context":{"code":200,… ``` +### 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`) + +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. + ### Поддержка * E-mail: [info@blockchair.com](mailto:info@blockchair.com) From feaff3c62aa48e7afb86c2453064a49538603b90 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Sun, 25 Nov 2018 17:07:15 +0300 Subject: [PATCH 009/180] Update API.md --- API.md | 1 + 1 file changed, 1 insertion(+) diff --git a/API.md b/API.md index 0de53ec3..03d219b6 100644 --- a/API.md +++ b/API.md @@ -6,6 +6,7 @@ ### Changelog +* v.2.0.8 - Nov 26th - Add the ability to retrieve raw transaction data in hex, see `Retrieving raw transactions` in the docs * v.2.0.7 - Nov 22th - Now it's possible to broadcast transactions using our API, see `Broadcasting transactions` in the docs * v.2.0.6 - Oct 8th - Added data aggregation of blockchain data in beta mode, see `Data aggregation support` in the docs * v.2.0.5 - Oct 8th - Fixed bug where `balance` and `received` for bitcoin[-cash]|litecoin addresses in the `{chain}/dashboards/address/{address}` call were calculated wrong if there were specific unconfirmed transactions From c42938ed4acfb08689f79a112693fc6da5e3c38e Mon Sep 17 00:00:00 2001 From: Yedige Davletgaliyev <25755605+linuxion@users.noreply.github.com> Date: Mon, 26 Nov 2018 15:47:56 +0300 Subject: [PATCH 010/180] Update API_DOCUMENTATION_RU.md --- API_DOCUMENTATION_RU.md | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/API_DOCUMENTATION_RU.md b/API_DOCUMENTATION_RU.md index 34a0147e..883dafff 100644 --- a/API_DOCUMENTATION_RU.md +++ b/API_DOCUMENTATION_RU.md @@ -27,9 +27,10 @@ + [Адрес Ethereum](#ethereumdashboardsaddressa) + [Статистика](#bitcoin-cashlitecoinethereumstats) + [Статистика по всем блокчейнам](#stats) + + [Статистика сети](#bitcoin-cashlitecoinnodes) + [Пример](#пример-работы-с-api) -+ [Broadcasting transactions](#broadcasting-transactions) -+ [Retrieving raw transactions](#retrieving-raw-transactions) ++ [Рассылка транзакций](#рассылка-транзакций) ++ [Получение транзакций в сыром виде](#получение-транзакций-в-сыром-виде) + [Поддержка](#поддержка) ### Changelog @@ -653,6 +654,17 @@ API поддерживает ряд коллов, которые выдают к * `ethereum/stats` * `litecoin/stats` +#### (bitcoin[-cash]|litecoin)/nodes +Возвращает информацию о доступных нодах. +* `nodes` - ноды + * `version` - User Agent клиента + * `country` - страна (определяется по GeoIP) + * `height` - последний блок в цепочке ноды + * `flags` - флаги [сервисов](https://en.bitcoin.it/wiki/Protocol_documentation#version) +* `count` - количество +* `countries` - количество нод по странам +* `versions` - количество нод по User Agent + ### Пример работы с API Допустим, нам требуется получать все последние транзакции из блокчейна Эфириума на сумму более 1 млн. долларов. Для этого необходимо составить следующий запрос: @@ -668,29 +680,29 @@ API поддерживает ряд коллов, которые выдают к Увеличиваем значение offset пока не получим выборку с транзакцией, о которой мы уже знали. -### 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: +Для рассылки транзакции по сети, нужно выполнить POST-запрос к `https://api.blockchair.com/{chain}/push/transaction` (где `{chain}` может быть: `bitcoin`, `bitcoin-cash`, `ethereum`, или `litecoin`) с `data`, содержащим транзакцию в сыром шестнадцатеричном виде (в Ethereum начинается с `0x`). Пример: ``` curl -v --data "data=01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0704ffff001d0104ffffffff0100f2052a0100000043410496b538e853519c726a2c91e61ec11600ae1390813a627c66fb8be7947be63c52da7589379515d4e0a604f8141781e62294721166bf621e73a82cbf2342c858eeac00000000" https://api.blockchair.com/bitcoin/push/transaction ``` -If the transaction has been successfully broadcast to the network, API will return a JSON response (code 200) containing `data` array with `transaction_hash` key holding the hash of the received transaction. In case of any error (wrong transaction format, spending already spent outputs, etc.) API returns status code 400. +Если транзакция была успешно разослана по сети, API вернёт JSON-ответ (код 200), содержищий массив `data` с ключом `transaction_hash`, содержащим хеш самой транзакции. В случае ошибки (неправильный формат транзакции, трата уже потраченных выходов, и т.д.) API вернёт код 400. -Example of a successful response: +Пример успешного ответа: ``` {"data":{"transaction_hash": "0e3e2357e806b6cdb1f70b54c3a3a17b6714ee1f0e68bebb44a74b1efd512098…"},"context":{"code":200,… ``` -### 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`) +Можно получить транзакцию в сыром виде напрямую от наших нод. Для этого требуется выполнить следующий API-запрос: `https://api.blockchair.com/{chain}/raw/transaction/{txhash}` (где `{chain}` может быть: `bitcoin`, `bitcoin-cash`, `ethereum`, или `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. +Ответ содержит два ключа: +* `raw_transaction` — транзакция в сыром виде в шестнадцатеричной с.и.; +* `decoded_raw_transaction` (недоступно для Ethereum) — транзакция в сыром виде в JSON. Пожалуйста, имейте в виду, что структура JSON-массива может измениться с обновлением наших нод, и это не будет отмечено в журнале изменений. ### Поддержка From 926da74fc5729c5a7735c10d27af5c6a73f565b0 Mon Sep 17 00:00:00 2001 From: Yedige Davletgaliyev <25755605+linuxion@users.noreply.github.com> Date: Mon, 26 Nov 2018 15:53:25 +0300 Subject: [PATCH 011/180] Update API_DOCUMENTATION_EN.md --- API_DOCUMENTATION_EN.md | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) 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 From 0bd1e3b173d122c17fd8536c25d37e01e5a81953 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Thu, 13 Dec 2018 18:06:30 +0300 Subject: [PATCH 012/180] Update API.md --- API.md | 1 + 1 file changed, 1 insertion(+) diff --git a/API.md b/API.md index 03d219b6..f0ddc913 100644 --- a/API.md +++ b/API.md @@ -6,6 +6,7 @@ ### Changelog +* v.2.0.9 - Dec 13th - Added Bitcoin SV support in test mode (see `Bitcoin SV support below` below); updated aggregation abilities (see `Data aggregation support` below) * v.2.0.8 - Nov 26th - Add the ability to retrieve raw transaction data in hex, see `Retrieving raw transactions` in the docs * v.2.0.7 - Nov 22th - Now it's possible to broadcast transactions using our API, see `Broadcasting transactions` in the docs * v.2.0.6 - Oct 8th - Added data aggregation of blockchain data in beta mode, see `Data aggregation support` in the docs From 1b496bfd0eb563a5f073716db1d0ae9bf4b10662 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Thu, 13 Dec 2018 18:06:48 +0300 Subject: [PATCH 013/180] Update API.md --- API.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/API.md b/API.md index f0ddc913..312d3dea 100644 --- a/API.md +++ b/API.md @@ -6,8 +6,8 @@ ### Changelog -* v.2.0.9 - Dec 13th - Added Bitcoin SV support in test mode (see `Bitcoin SV support below` below); updated aggregation abilities (see `Data aggregation support` below) -* v.2.0.8 - Nov 26th - Add the ability to retrieve raw transaction data in hex, see `Retrieving raw transactions` in the docs +* v.2.0.9 - Dec 13th - Added Bitcoin SV support in test mode (see `Bitcoin SV support below` in the docs); updated aggregation abilities (see `Data aggregation support` in the docs) +* v.2.0.8 - Nov 26th - Added the ability to retrieve raw transaction data in hex, see `Retrieving raw transactions` in the docs * v.2.0.7 - Nov 22th - Now it's possible to broadcast transactions using our API, see `Broadcasting transactions` in the docs * v.2.0.6 - Oct 8th - Added data aggregation of blockchain data in beta mode, see `Data aggregation support` in the docs * v.2.0.5 - Oct 8th - Fixed bug where `balance` and `received` for bitcoin[-cash]|litecoin addresses in the `{chain}/dashboards/address/{address}` call were calculated wrong if there were specific unconfirmed transactions From 4bc6daa96ef0fd5c9320469c4dfcfe77c13a8d08 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Thu, 13 Dec 2018 18:07:14 +0300 Subject: [PATCH 014/180] Update API_DOCUMENTATION_EN.md --- API_DOCUMENTATION_EN.md | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index 3e9b4880..cd5f44c9 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,4 +1,4 @@ -## [Blockchair.com](https://blockchair.com/) API v.2.0.8 Documentation +## [Blockchair.com](https://blockchair.com/) API v.2.0.9 Documentation ![Blockchair logo](https://blockchair.com/images/logo_full.png "Blockchair logo") @@ -27,7 +27,6 @@ + [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) @@ -36,7 +35,8 @@ ### Changelog -* v.2.0.8 - Nov 26th - Add the ability to retrieve raw transaction data in hex, see [Retrieving raw transactions](#retrieving-raw-transactions) +* v.2.0.9 - Dec 13th - Added Bitcoin SV support in test mode (see `Bitcoin SV support below` below); updated aggregation abilities (see `Data aggregation support` below) +* v.2.0.8 - Nov 26th - Added the ability to retrieve raw transaction data in hex, see [Retrieving raw transactions](#retrieving-raw-transactions) * v.2.0.7 - Nov 22th - Now it's possible to broadcast transactions using our API, see [Broadcasting transactions](#broadcasting-transactions) * v.2.0.6 - Oct 8th - Added data aggregation of blockchain data in beta mode, see `Data aggregation support` below * v.2.0.5 - Oct 8th - Fixed bug where `balance` and `received` for bitcoin[-cash]|litecoin addresses in the `{chain}/dashboards/address/{address}` call were calculated wrong if there were specific unconfirmed transactions @@ -47,10 +47,19 @@ ### Tested features changelog +##### Bitcoin SV support (since Dec 12th) + +* v.b1 - Dec 12th - Hooray! We're now providing data for the Bitcoin SV chain (BSV ticker). All API calls are fully compatible with Bitcoin Cash, i.e. if you need to request the latest nulldata (OP_RETURN) outputs, just replace `bitcoin-cash` with `bitcoin-sv`: https://api.blockchair.com/bitcoin-sv/outputs?q=type(nulldata)# + +Please note that SV support is in test mode, and not intended for production use until Bitcoin SV has a more clear roadmap (e.g. we won't be able to offer some functionality if blocks suddenly become larger than 1 exabyte...) + ##### Data aggregation support (since Oct 8th) +* v.b2 - Dec 12th - Now it's possible to apply `?limit=` and `?offset=` sections to aggregated queries. `context.total_rows` now shows how many aggregated results are there, and `context.rows` shows how many are shown. * v.b1 - Oct 8th - Bringing the ability to obtain aggregated data. Now you can use Blockchair not only to filter and sort blockchain data, but also to aggregate it. +Please don't use this in production yet, there could be massive changes! + See the examples: * https://api.blockchair.com/bitcoin/blocks?a=year,count()# - get the total number of Bitcoin blocks by year * https://api.blockchair.com/bitcoin/transactions?a=month,median(fee_usd)# - get the median Bitcoin transaction fees by month @@ -654,18 +663,6 @@ 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: @@ -683,7 +680,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`, or `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`, and `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 @@ -699,11 +696,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`, or `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`, and `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 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. +* `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. ### Support From 62b268e0c48a18e46fd2b01c39417766645b6b4c Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Thu, 13 Dec 2018 18:07:31 +0300 Subject: [PATCH 015/180] Update API_DOCUMENTATION_RU.md --- API_DOCUMENTATION_RU.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/API_DOCUMENTATION_RU.md b/API_DOCUMENTATION_RU.md index 883dafff..94039c72 100644 --- a/API_DOCUMENTATION_RU.md +++ b/API_DOCUMENTATION_RU.md @@ -1,4 +1,4 @@ -## [Blockchair.com](https://blockchair.com/) API v.2.0.8 - документация +## [Blockchair.com](https://blockchair.com/) API v.2.0.9 - документация ![Blockchair logo](https://blockchair.com/images/logo_full.png "Blockchair logo") @@ -35,6 +35,7 @@ ### Changelog +* v.2.0.9 - Dec 12th - Added Bitcoin SV support in test mode (see `Bitcoin SV support below` below); updated aggregation abilities (see `Data aggregation support` below) * v.2.0.8 - Nov 26th - Add the ability to retrieve raw transaction data in hex, see [Retrieving raw transactions](#retrieving-raw-transactions) * v.2.0.7 - Nov 22th - Now it's possible to broadcast transactions using our API, see [Broadcasting transactions](#broadcasting-transactions) * v.2.0.6 - 8 октября - В бета-режиме добавлена возможность агрегировать информацию из блокчейнов, см. `Поддержка агрегирования данных` ниже @@ -46,10 +47,18 @@ ### Changelog тестируемых фич +##### Поддержка Bitcoin SV (с 12 декабря) + +* v.b1 - Dec 12th - Hooray! We're now providing data for the Bitcoin SV chain (BSV ticker). All API calls are fully compatible with Bitcoin Cash, i.e. if you need to request the latest nulldata (OP_RETURN) outputs, just replace `bitcoin-cash` with `bitcoin-sv`: https://api.blockchair.com/bitcoin-sv/outputs?q=type(nulldata)# + +Please note that SV support is in test mode, and not intended for production use until Bitcoin SV has a more clear roadmap (e.g. we won't be able to offer some functionality if blocks suddenly become larger than 1 exabyte...) + ##### Поддержка агрегирования данных (с 8 октября) * v.b1 - 8 октября - Внедрение возможности получать агрегированную информацию. Теперь вы можете использовать Blockchair не только для фильтрации и сортировки информации из блокчейнов, но и для агрегации данных. +Please don't use this in production yet, there could be massive changes! + См. примеры: * https://api.blockchair.com/bitcoin/blocks?a=year,count()# - выдаёт количество блоков в Bitcoin по годам * https://api.blockchair.com/bitcoin/transactions?a=month,median(fee_usd)# - медианные комиссии за транзакции в Bitcoin по месяцам From 38bd0718845fca17d6014d23a704715031852bd6 Mon Sep 17 00:00:00 2001 From: Yedige Davletgaliyev <25755605+linuxion@users.noreply.github.com> Date: Fri, 21 Dec 2018 19:41:08 +0300 Subject: [PATCH 016/180] Update API_DOCUMENTATION_EN.md --- API_DOCUMENTATION_EN.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index cd5f44c9..d61fb676 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -35,7 +35,7 @@ ### Changelog -* v.2.0.9 - Dec 13th - Added Bitcoin SV support in test mode (see `Bitcoin SV support below` below); updated aggregation abilities (see `Data aggregation support` below) +* v.2.0.9 - Dec 13th - Added [Bitcoin SV support](#bitcoin-sv-support-since-dec-12th) in test mode; updated [aggregation abilities](#data-aggregation-support-since-oct-8th) * v.2.0.8 - Nov 26th - Added the ability to retrieve raw transaction data in hex, see [Retrieving raw transactions](#retrieving-raw-transactions) * v.2.0.7 - Nov 22th - Now it's possible to broadcast transactions using our API, see [Broadcasting transactions](#broadcasting-transactions) * v.2.0.6 - Oct 8th - Added data aggregation of blockchain data in beta mode, see `Data aggregation support` below @@ -51,7 +51,7 @@ * v.b1 - Dec 12th - Hooray! We're now providing data for the Bitcoin SV chain (BSV ticker). All API calls are fully compatible with Bitcoin Cash, i.e. if you need to request the latest nulldata (OP_RETURN) outputs, just replace `bitcoin-cash` with `bitcoin-sv`: https://api.blockchair.com/bitcoin-sv/outputs?q=type(nulldata)# -Please note that SV support is in test mode, and not intended for production use until Bitcoin SV has a more clear roadmap (e.g. we won't be able to offer some functionality if blocks suddenly become larger than 1 exabyte...) +Please note that Bitcoin SV support is in test mode, and not intended for production use until Bitcoin SV has a more clear roadmap (e.g. we won't be able to offer some functionality if blocks suddenly become larger than 1 exabyte...) ##### Data aggregation support (since Oct 8th) @@ -680,7 +680,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 @@ -696,11 +696,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 From 4f09884eaedcb07a09c0df61630eaaabdad1a72d Mon Sep 17 00:00:00 2001 From: Yedige Davletgaliyev <25755605+linuxion@users.noreply.github.com> Date: Fri, 21 Dec 2018 19:41:58 +0300 Subject: [PATCH 017/180] Update API_DOCUMENTATION_RU.md --- API_DOCUMENTATION_RU.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/API_DOCUMENTATION_RU.md b/API_DOCUMENTATION_RU.md index 94039c72..d811e61f 100644 --- a/API_DOCUMENTATION_RU.md +++ b/API_DOCUMENTATION_RU.md @@ -35,9 +35,9 @@ ### Changelog -* v.2.0.9 - Dec 12th - Added Bitcoin SV support in test mode (see `Bitcoin SV support below` below); updated aggregation abilities (see `Data aggregation support` below) -* v.2.0.8 - Nov 26th - Add the ability to retrieve raw transaction data in hex, see [Retrieving raw transactions](#retrieving-raw-transactions) -* v.2.0.7 - Nov 22th - Now it's possible to broadcast transactions using our API, see [Broadcasting transactions](#broadcasting-transactions) +* v.2.0.9 - 12 декабря - Добавлена [поддержка Bitcoin SV](#поддержка-bitcoin-sv-с-12-декабря) в тестовом режиме; обновлены возможности [агрегации данных](#поддержка-агрегирования-данных-с-8-октября) +* v.2.0.8 - 26 ноября - Появилась возможность получать транзакции в сыром виде, см. [Получение транзакций в сыром виде](#получение-транзакций-в-сыром-виде) +* v.2.0.7 - 22 ноября - Появилась возможность рассылать транзакции через API, см. [Рассылка транзакций](#рассылка-транзакций) * v.2.0.6 - 8 октября - В бета-режиме добавлена возможность агрегировать информацию из блокчейнов, см. `Поддержка агрегирования данных` ниже * v.2.0.5 - 8 октября - Исправлен баг с подсчётом `balance` и `received` у bitcoin[-cash]|litecoin-адресов в колле `{chain}/dashboards/address/{address}`, когда имелись специфические неподтверждённые транзакции * v.2.0.4 - 3 октября - Добавлены некоторые полезные поля к коллам `{chain}/stats` @@ -49,15 +49,15 @@ ##### Поддержка Bitcoin SV (с 12 декабря) -* v.b1 - Dec 12th - Hooray! We're now providing data for the Bitcoin SV chain (BSV ticker). All API calls are fully compatible with Bitcoin Cash, i.e. if you need to request the latest nulldata (OP_RETURN) outputs, just replace `bitcoin-cash` with `bitcoin-sv`: https://api.blockchair.com/bitcoin-sv/outputs?q=type(nulldata)# +* v.b1 - 12 декабря - Ура! Теперь мы предоставляем данные по Bitcoin SV (BSV). Все API-вызовы совместимы с таковыми для Bitcoin Cash, например, если вы хотите получить последние nulldata-выходы (OP_RETURN), то просто замените `bitcoin-cash` на `bitcoin-sv`: https://api.blockchair.com/bitcoin-sv/outputs?q=type(nulldata)# -Please note that SV support is in test mode, and not intended for production use until Bitcoin SV has a more clear roadmap (e.g. we won't be able to offer some functionality if blocks suddenly become larger than 1 exabyte...) +Пожалуйста, имейте в виду, что поддержка Bitcoin SV осуществляется в тестовом режиме и не предназначена для использования в рабочей среде, пока Bitcoin SV не продемонстрирует более конструктивную дорожную карту (например, мы не сможем предоставить некоторый функционал, если блоки внезапно увеличатся до 1 экзабайте...) ##### Поддержка агрегирования данных (с 8 октября) * v.b1 - 8 октября - Внедрение возможности получать агрегированную информацию. Теперь вы можете использовать Blockchair не только для фильтрации и сортировки информации из блокчейнов, но и для агрегации данных. -Please don't use this in production yet, there could be massive changes! +Пожалуйста, не используйте это в рабочей среде, могут быть фундаментальные изменения! См. примеры: * https://api.blockchair.com/bitcoin/blocks?a=year,count()# - выдаёт количество блоков в Bitcoin по годам From 33c766cbd6f3e8ace6a6bf0b9e43fa749c8cae7d Mon Sep 17 00:00:00 2001 From: Yedige Davletgaliyev <25755605+linuxion@users.noreply.github.com> Date: Fri, 21 Dec 2018 19:43:47 +0300 Subject: [PATCH 018/180] Update API_DOCUMENTATION_RU.md --- API_DOCUMENTATION_RU.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/API_DOCUMENTATION_RU.md b/API_DOCUMENTATION_RU.md index d811e61f..52c366bb 100644 --- a/API_DOCUMENTATION_RU.md +++ b/API_DOCUMENTATION_RU.md @@ -51,7 +51,7 @@ * v.b1 - 12 декабря - Ура! Теперь мы предоставляем данные по Bitcoin SV (BSV). Все API-вызовы совместимы с таковыми для Bitcoin Cash, например, если вы хотите получить последние nulldata-выходы (OP_RETURN), то просто замените `bitcoin-cash` на `bitcoin-sv`: https://api.blockchair.com/bitcoin-sv/outputs?q=type(nulldata)# -Пожалуйста, имейте в виду, что поддержка Bitcoin SV осуществляется в тестовом режиме и не предназначена для использования в рабочей среде, пока Bitcoin SV не продемонстрирует более конструктивную дорожную карту (например, мы не сможем предоставить некоторый функционал, если блоки внезапно увеличатся до 1 экзабайте...) +Пожалуйста, имейте в виду, что поддержка Bitcoin SV осуществляется в тестовом режиме и не предназначена для использования в рабочей среде, пока Bitcoin SV не продемонстрирует более конструктивную дорожную карту (например, мы не сможем предоставить некоторый функционал, если блоки внезапно увеличатся до 1 экзабайта...) ##### Поддержка агрегирования данных (с 8 октября) From 91e826bc17008659c53a9d07321c5547ec0468e2 Mon Sep 17 00:00:00 2001 From: Yedige Davletgaliyev <25755605+linuxion@users.noreply.github.com> Date: Mon, 21 Jan 2019 14:48:21 +0300 Subject: [PATCH 019/180] Create PRIVACY.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Blockchair’s privacy policy --- PRIVACY.md | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 PRIVACY.md diff --git a/PRIVACY.md b/PRIVACY.md new file mode 100644 index 00000000..e193371e --- /dev/null +++ b/PRIVACY.md @@ -0,0 +1,68 @@ +###### TL;DR: Blockchair does not collect personal data or share it with third parties. We don't track you. +* * * + +## Why is this important? + +**One of the key advantages of cryptocurrencies is that they enable (pseudo)anonymous transactions.** In most cases the user’s address and transaction details are made public and cannot be deleted, but their personal identity remains unknown if no link exists between the user and their blockchain data. + +Privacy is at risk when you share any information with third parties. Cryptocurrency exchanges with KYC policies, online retailers that require delivery addresses and web wallets associated with phone numbers all require you to share information. + +What’s more, most web servers maintain default logs of your IP address and User Agent (browser name and operating system), the dates and times of your browsing activity and, most importantly, the URLs you visited. Ordinarily, a cryptocurrency address page is only visited by the address owner, while the transaction page is visited by the transaction parties. **Blockchain explorers can therefore easily trace the digital fingerprint that links addresses and transactions. Unfortunately, this data is also picked up by the web analytics tools (Google Analytics, Baidu Tongji, Yandex.Metrica), advertising platforms and similar third-party services.** + +User data can be traced in others ways too. CDN providers like Cloudflare, Incapsula and AWS Shield act as reverse proxies, which means some websites require you to request data from a CDN in order to use the site. You therefore share your information with the provider. + +In addition to these data tracking services, there are several other ways how users can be identified online. + +* HTTP referer: a client request header that allows a server to trace the previous site you visited. Say you visit example.com followed by explorer.com/1YourBitcoinAddress then the former will receive information that you have come from the latter; +* Web beacon (bug): an invisible web page element that confirms a user has visited a web page. This is used to collect user analytics; +* Cookies: user activity data stored in the user’s browser. Third-party cookies can also be embedded in the site’s code (if it contains elements from other sites); +* Evercookie: a JavaScript app that stores zombie cookies on a computer. These cookies are extremely difficult to remove since Evercookie recreates them whenever they are deleted; +* Device / browser fingerprint: the device and browser information collected for user identification; +* Browser extensions. + +* * * + +## Why is it unsafe to share you personal data? + +Most blockchain explorers and cryptocurrency companies store user information, including available balances, lists of transactions and types of cryptocurrency. + +They might sell this information, publish it, share it with government agencies, or they might be hacked. If it becomes public knowledge that you have significant funds stored in cryptocurrency, you’re likely to be targeted by cyber criminals. Your personal safety may be at risk too. + +* * * + +## Why is Blockchair the safer option? + +* When you connect to Blockchair your browser automatically sends us information about your computer, User Agent, IP address, and the page you want to visit. Since this data may expose your identity, **we do not permanently store information about you**; +* **We do not use cookies that can be used to identify you.** See below for details; +* **Your browser won’t send HTTP referer headers when leaving Blockchair.com. This means you can move to other sites without your browsing activity being traced by those sites;** +* **We do not use CDN-providers, including those used to distribute JavaScript libraries and styles. We do not use hit counters, web analytics tools (such as Google Analytics) or any other third-party site elements. Therefore, other parties do not receive information about you.** + +* * * + +## What data do we store and how do we use this data? + +We only collect anonymous aggregated data that allows us to improve our website features. We count visitors, analyze popular searches, cryptocurrencies, sortings and other queries. + +We also store the incoming IP addresses for short periods of 5 to 10 minutes. This is to limit the rate of API requests. + +Your device may store technical cookies, such as those that keep the night mode on. In this case, only the client part of the site interacts with them. + +Collected data is used to improve user experience and compile website traffic statistics. + +* * * + +## Exceptions + +We might activate logging procedure to safeguard our services since we're not protected from certain types of third-party network attacks. If this happens, we will post a notification in the site header to let you know we're collecting additional information during the attack. Once the attack has been stopped, all logs will be deleted along with the notification. + +* * * + +## Privacy Policy updates + +We will publish any updates to our Privacy Policy at this page ([https://blockchair.com/privacy](https://blockchair.com/privacy)) and in the GitHub repository at [https://github.com/Blockchair/Blockchair.Support/blob/master/PRIVACY.md](https://github.com/Blockchair/Blockchair.Support/blob/master/PRIVACY.md) plus the link to the updated version will be available at the bottom of all our site pages. + +* * * + +## Contacts + +Please share your comments and suggestions at . From b0a9bd6f3cb37294f47c3540696102008649a314 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Tue, 29 Jan 2019 18:32:41 +0300 Subject: [PATCH 020/180] Add Dogecoin support --- API_DOCUMENTATION_EN.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index d61fb676..e75fe5cb 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,4 +1,4 @@ -## [Blockchair.com](https://blockchair.com/) API v.2.0.9 Documentation +## [Blockchair.com](https://blockchair.com/) API v.2.0.10 Documentation ![Blockchair logo](https://blockchair.com/images/logo_full.png "Blockchair logo") @@ -35,6 +35,7 @@ ### Changelog +* v.2.0.10 - Jan 29th 2019 - Added [Dogecoin support](#dogecoin-support-since-jan-29th-2019) in test mode * v.2.0.9 - Dec 13th - Added [Bitcoin SV support](#bitcoin-sv-support-since-dec-12th) in test mode; updated [aggregation abilities](#data-aggregation-support-since-oct-8th) * v.2.0.8 - Nov 26th - Added the ability to retrieve raw transaction data in hex, see [Retrieving raw transactions](#retrieving-raw-transactions) * v.2.0.7 - Nov 22th - Now it's possible to broadcast transactions using our API, see [Broadcasting transactions](#broadcasting-transactions) @@ -43,17 +44,25 @@ * v.2.0.4 - Oct 3rd - Added some new useful fields to `{chain}/stats` calls * v.2.0.3 - Sep 18th - Added `context.api.tested_features` with the list of features our API supports, but with no guarantee for backward compatibility if updated. Added Omni Layer and Wormhole support in testing mode (see the "Tested features changelog" below) * v.2.0.2 - Sep 9th - Added `address.contract_created` to the `ethereum/dashboards/address/{A}` call -* v.2.0.1 - Sep 1st - Added Litecoin support +* v.2.0.1 - Sep 1st 2018 - Added Litecoin support ### Tested features changelog +##### Dogecoin support (since Jan 29th 2019) + +* v.rc1 - Jan 29th - We're now processing the Dogecoin chain. All API calls are fully compatible with Bitcoin Cash (i.e. replace `bitcoin-cash` with `dogecoin` in URLs) with a few exceptions: + * There's no node list for Dogecoin yet; + * The `blocks` table has one additional field called `is_aux` - it is a boolean field showing whether a block was mined using AuxPoW. + +It is expected that Dogecoin will be out of beta mode very soon. Wow. + ##### Bitcoin SV support (since Dec 12th) * v.b1 - Dec 12th - Hooray! We're now providing data for the Bitcoin SV chain (BSV ticker). All API calls are fully compatible with Bitcoin Cash, i.e. if you need to request the latest nulldata (OP_RETURN) outputs, just replace `bitcoin-cash` with `bitcoin-sv`: https://api.blockchair.com/bitcoin-sv/outputs?q=type(nulldata)# Please note that Bitcoin SV support is in test mode, and not intended for production use until Bitcoin SV has a more clear roadmap (e.g. we won't be able to offer some functionality if blocks suddenly become larger than 1 exabyte...) -##### Data aggregation support (since Oct 8th) +##### Data aggregation support (since Oct 8th 2018) * v.b2 - Dec 12th - Now it's possible to apply `?limit=` and `?offset=` sections to aggregated queries. `context.total_rows` now shows how many aggregated results are there, and `context.rows` shows how many are shown. * v.b1 - Oct 8th - Bringing the ability to obtain aggregated data. Now you can use Blockchair not only to filter and sort blockchain data, but also to aggregate it. From f7603ca2163b7a62a29b09cb0b552cf90f26675e Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Tue, 29 Jan 2019 18:33:10 +0300 Subject: [PATCH 021/180] Add Dogecoin support --- API_DOCUMENTATION_RU.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/API_DOCUMENTATION_RU.md b/API_DOCUMENTATION_RU.md index 52c366bb..50a69292 100644 --- a/API_DOCUMENTATION_RU.md +++ b/API_DOCUMENTATION_RU.md @@ -35,6 +35,7 @@ ### Changelog +* v.2.0.10 - Jan 29th 2019 - Added [Dogecoin support](#dogecoin-support-since-jan-29th-2019) in test mode * v.2.0.9 - 12 декабря - Добавлена [поддержка Bitcoin SV](#поддержка-bitcoin-sv-с-12-декабря) в тестовом режиме; обновлены возможности [агрегации данных](#поддержка-агрегирования-данных-с-8-октября) * v.2.0.8 - 26 ноября - Появилась возможность получать транзакции в сыром виде, см. [Получение транзакций в сыром виде](#получение-транзакций-в-сыром-виде) * v.2.0.7 - 22 ноября - Появилась возможность рассылать транзакции через API, см. [Рассылка транзакций](#рассылка-транзакций) @@ -43,17 +44,25 @@ * v.2.0.4 - 3 октября - Добавлены некоторые полезные поля к коллам `{chain}/stats` * v.2.0.3 - 18 сентября - Добавлен ключ `context.api.tested_features` со списком тестируемых фич, поддерживаемых нашим API (у тестируемых фич нет гарантий поддержки в будущем, гарантий, что в какой-то момент не потеряется совместимость при обновлении). Добавлена поддержка Omni Layer и Wormhole в режиме тестирования (см. ниже) * v.2.0.2 - 9 сентября - Добавлено поле `address.contract_created` для колла `ethereum/dashboards/address/{A}` -* v.2.0.1 - 1 сентября - Добавлена поддержка Litecoin +* v.2.0.1 - 1 сентября 2018 - Добавлена поддержка Litecoin ### Changelog тестируемых фич +##### Dogecoin support (since Jan 29th 2019) + +* v.rc1 - Jan 29th - We're now processing the Dogecoin chain. All API calls are fully compatible with Bitcoin Cash (i.e. replace `bitcoin-cash` with `dogecoin` in URLs) with a few exceptions: + * There's no node list for Dogecoin yet; + * The `blocks` table has one additional field called `is_aux` - it is a boolean field showing whether a block was mined using AuxPoW. + +It is expected that Dogecoin will be out of beta mode very soon. Wow. + ##### Поддержка Bitcoin SV (с 12 декабря) * v.b1 - 12 декабря - Ура! Теперь мы предоставляем данные по Bitcoin SV (BSV). Все API-вызовы совместимы с таковыми для Bitcoin Cash, например, если вы хотите получить последние nulldata-выходы (OP_RETURN), то просто замените `bitcoin-cash` на `bitcoin-sv`: https://api.blockchair.com/bitcoin-sv/outputs?q=type(nulldata)# Пожалуйста, имейте в виду, что поддержка Bitcoin SV осуществляется в тестовом режиме и не предназначена для использования в рабочей среде, пока Bitcoin SV не продемонстрирует более конструктивную дорожную карту (например, мы не сможем предоставить некоторый функционал, если блоки внезапно увеличатся до 1 экзабайта...) -##### Поддержка агрегирования данных (с 8 октября) +##### Поддержка агрегирования данных (с 8 октября 2018) * v.b1 - 8 октября - Внедрение возможности получать агрегированную информацию. Теперь вы можете использовать Blockchair не только для фильтрации и сортировки информации из блокчейнов, но и для агрегации данных. From 02f854b7e7783f14cf39390f29249f4a7225084e Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Tue, 29 Jan 2019 18:34:46 +0300 Subject: [PATCH 022/180] Add Dogecoin support --- API.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/API.md b/API.md index 312d3dea..7cd4f17d 100644 --- a/API.md +++ b/API.md @@ -6,14 +6,15 @@ ### Changelog -* v.2.0.9 - Dec 13th - Added Bitcoin SV support in test mode (see `Bitcoin SV support below` in the docs); updated aggregation abilities (see `Data aggregation support` in the docs) +* v.2.0.10 - Jan 29th, 2019 - Added Dogecoin support in test mode (see `Dogecoin support` in the docs) +* v.2.0.9 - Dec 13th - Added Bitcoin SV support in test mode (see `Bitcoin SV support` in the docs); updated aggregation abilities (see `Data aggregation support` in the docs) * v.2.0.8 - Nov 26th - Added the ability to retrieve raw transaction data in hex, see `Retrieving raw transactions` in the docs * v.2.0.7 - Nov 22th - Now it's possible to broadcast transactions using our API, see `Broadcasting transactions` in the docs * v.2.0.6 - Oct 8th - Added data aggregation of blockchain data in beta mode, see `Data aggregation support` in the docs * v.2.0.5 - Oct 8th - Fixed bug where `balance` and `received` for bitcoin[-cash]|litecoin addresses in the `{chain}/dashboards/address/{address}` call were calculated wrong if there were specific unconfirmed transactions * v.2.0.4 - Oct 3rd - Added some new useful fields to `{chain}/stats` calls * v.2.0.3 - Sep 18th - Added `context.api.tested_features` with the list of features our API supports, but with no guarantee for backward compatibility if updated. Added Omni Layer and Wormhole support in testing mode (see "Tested features changelog") -* v.2.0.2 - Sep 9th, 2018 - Added `address.contract_created` to the `ethereum/dashboards/address/{A}` call +* v.2.0.2 - Sep 9th - Added `address.contract_created` to the `ethereum/dashboards/address/{A}` call * v.2.0.1 - Sep 1st, 2018 - Added Litecoin support * v.2.0.0 - Migrating from API v.1 to API v.2 (see the docs) From c938c3ab5c6497214e01e47ef6009d6844cabe69 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Sun, 3 Feb 2019 04:46:05 +0300 Subject: [PATCH 023/180] Update API_DOCUMENTATION_EN.md --- API_DOCUMENTATION_EN.md | 1 + 1 file changed, 1 insertion(+) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index e75fe5cb..d556028a 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -50,6 +50,7 @@ ##### Dogecoin support (since Jan 29th 2019) +* v.rc2 - Feb 2nd - Groundhog Day! Unlike for other coins, the latest Dogecoin block along with its transactions isn't stored in `mempool` tables anymore. `dogecoin/mempool/blocks` is now deprecated, while `dogecoin/mempool/transactions` and `dogecoin/mempool/outputs` show only mempool data. * v.rc1 - Jan 29th - We're now processing the Dogecoin chain. All API calls are fully compatible with Bitcoin Cash (i.e. replace `bitcoin-cash` with `dogecoin` in URLs) with a few exceptions: * There's no node list for Dogecoin yet; * The `blocks` table has one additional field called `is_aux` - it is a boolean field showing whether a block was mined using AuxPoW. From 01045137e8b7fe3fa85c11fff004639ebba3b4f7 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Sun, 3 Feb 2019 04:46:26 +0300 Subject: [PATCH 024/180] Update API_DOCUMENTATION_RU.md --- API_DOCUMENTATION_RU.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/API_DOCUMENTATION_RU.md b/API_DOCUMENTATION_RU.md index 50a69292..62f61ba3 100644 --- a/API_DOCUMENTATION_RU.md +++ b/API_DOCUMENTATION_RU.md @@ -1,4 +1,4 @@ -## [Blockchair.com](https://blockchair.com/) API v.2.0.9 - документация +## [Blockchair.com](https://blockchair.com/) API v.2.0.10 - документация ![Blockchair logo](https://blockchair.com/images/logo_full.png "Blockchair logo") @@ -50,6 +50,7 @@ ##### Dogecoin support (since Jan 29th 2019) +* v.rc2 - Feb 2nd - Groundhog Day! Unlike for other coins, the latest Dogecoin block along with its transactions isn't stored in `mempool` tables anymore. `dogecoin/mempool/blocks` is now deprecated, while `dogecoin/mempool/transactions` and `dogecoin/mempool/outputs` show only mempool data. * v.rc1 - Jan 29th - We're now processing the Dogecoin chain. All API calls are fully compatible with Bitcoin Cash (i.e. replace `bitcoin-cash` with `dogecoin` in URLs) with a few exceptions: * There's no node list for Dogecoin yet; * The `blocks` table has one additional field called `is_aux` - it is a boolean field showing whether a block was mined using AuxPoW. From fe58832b0b2735891e52e3a7d5275fd21e8b23e2 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Tue, 5 Feb 2019 00:13:54 +0300 Subject: [PATCH 025/180] Update API_DOCUMENTATION_EN.md --- API_DOCUMENTATION_EN.md | 1 + 1 file changed, 1 insertion(+) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index d556028a..8632c373 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -50,6 +50,7 @@ ##### Dogecoin support (since Jan 29th 2019) +* v.rc3 - Feb 5th - It's now possible to retrieve the list of Dogecoin nodes using the `dogecoin/nodes` call (the output format is compatible with other coins) * v.rc2 - Feb 2nd - Groundhog Day! Unlike for other coins, the latest Dogecoin block along with its transactions isn't stored in `mempool` tables anymore. `dogecoin/mempool/blocks` is now deprecated, while `dogecoin/mempool/transactions` and `dogecoin/mempool/outputs` show only mempool data. * v.rc1 - Jan 29th - We're now processing the Dogecoin chain. All API calls are fully compatible with Bitcoin Cash (i.e. replace `bitcoin-cash` with `dogecoin` in URLs) with a few exceptions: * There's no node list for Dogecoin yet; From 661b032b36f9be2a76b19b248f64ca3b80c1a688 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Tue, 5 Feb 2019 00:14:26 +0300 Subject: [PATCH 026/180] Update API_DOCUMENTATION_RU.md --- API_DOCUMENTATION_RU.md | 1 + 1 file changed, 1 insertion(+) diff --git a/API_DOCUMENTATION_RU.md b/API_DOCUMENTATION_RU.md index 62f61ba3..30d63276 100644 --- a/API_DOCUMENTATION_RU.md +++ b/API_DOCUMENTATION_RU.md @@ -50,6 +50,7 @@ ##### Dogecoin support (since Jan 29th 2019) +* v.rc3 - Feb 5th - It's now possible to retrieve the list of Dogecoin nodes using the `dogecoin/nodes` call (the output format is compatible with other coins) * v.rc2 - Feb 2nd - Groundhog Day! Unlike for other coins, the latest Dogecoin block along with its transactions isn't stored in `mempool` tables anymore. `dogecoin/mempool/blocks` is now deprecated, while `dogecoin/mempool/transactions` and `dogecoin/mempool/outputs` show only mempool data. * v.rc1 - Jan 29th - We're now processing the Dogecoin chain. All API calls are fully compatible with Bitcoin Cash (i.e. replace `bitcoin-cash` with `dogecoin` in URLs) with a few exceptions: * There's no node list for Dogecoin yet; From 861479a9c03efeff2d45aa5899887ecb219502d2 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Tue, 5 Feb 2019 19:26:31 +0300 Subject: [PATCH 027/180] v.2.0.11 --- API_DOCUMENTATION_EN.md | 121 +++++++++++++++++++++++----------------- 1 file changed, 69 insertions(+), 52 deletions(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index 8632c373..e209bac4 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,4 +1,4 @@ -## [Blockchair.com](https://blockchair.com/) API v.2.0.10 Documentation +## [Blockchair.com](https://blockchair.com/) API v.2.0.11 Documentation ![Blockchair logo](https://blockchair.com/images/logo_full.png "Blockchair logo") @@ -35,8 +35,16 @@ ### Changelog -* v.2.0.10 - Jan 29th 2019 - Added [Dogecoin support](#dogecoin-support-since-jan-29th-2019) in test mode -* v.2.0.9 - Dec 13th - Added [Bitcoin SV support](#bitcoin-sv-support-since-dec-12th) in test mode; updated [aggregation abilities](#data-aggregation-support-since-oct-8th) +* v.2.0.11 - Feb 5th + * We're changing behavior of our `mempool` tables (for all supported coins except for Ethereum): now they don't contain the contents of the latest block (it was quite a clumsy thing to have both mempool transactions and transactions from the latest block in this table, but we've rebuilt our engine, so now `mempool` tables contain mempool content only, and it finally makes sense!). That means: + * `{chain}/mempool/blocks` is deprecated + * `{chain}/mempool/transactions` and `{chain}/mempool/outputs` now don't contain info from the latest block, while `{chain}/transactions` and `{chain}/outputs` do + * Before this update when using (undocumented) `export` functionality there was no information about the latest block at all, now there is + * The same change to Ethereum will come in one of the next updates + * Dogecoin is out of beta. + * Bitcoin SV is out of beta. Please note there's still a possibility that we won't be able to offer some functionality in the long term if blocks suddenly become larger than 1 exabyte, we're still waiting for a more clear development roadmap. +* v.2.0.10 - Jan 29th 2019 - Added Dogecoin support in test mode +* v.2.0.9 - Dec 13th - Added Bitcoin SV support in test mode; updated [aggregation abilities](#data-aggregation-support-since-oct-8th) * v.2.0.8 - Nov 26th - Added the ability to retrieve raw transaction data in hex, see [Retrieving raw transactions](#retrieving-raw-transactions) * v.2.0.7 - Nov 22th - Now it's possible to broadcast transactions using our API, see [Broadcasting transactions](#broadcasting-transactions) * v.2.0.6 - Oct 8th - Added data aggregation of blockchain data in beta mode, see `Data aggregation support` below @@ -48,22 +56,6 @@ ### Tested features changelog -##### Dogecoin support (since Jan 29th 2019) - -* v.rc3 - Feb 5th - It's now possible to retrieve the list of Dogecoin nodes using the `dogecoin/nodes` call (the output format is compatible with other coins) -* v.rc2 - Feb 2nd - Groundhog Day! Unlike for other coins, the latest Dogecoin block along with its transactions isn't stored in `mempool` tables anymore. `dogecoin/mempool/blocks` is now deprecated, while `dogecoin/mempool/transactions` and `dogecoin/mempool/outputs` show only mempool data. -* v.rc1 - Jan 29th - We're now processing the Dogecoin chain. All API calls are fully compatible with Bitcoin Cash (i.e. replace `bitcoin-cash` with `dogecoin` in URLs) with a few exceptions: - * There's no node list for Dogecoin yet; - * The `blocks` table has one additional field called `is_aux` - it is a boolean field showing whether a block was mined using AuxPoW. - -It is expected that Dogecoin will be out of beta mode very soon. Wow. - -##### Bitcoin SV support (since Dec 12th) - -* v.b1 - Dec 12th - Hooray! We're now providing data for the Bitcoin SV chain (BSV ticker). All API calls are fully compatible with Bitcoin Cash, i.e. if you need to request the latest nulldata (OP_RETURN) outputs, just replace `bitcoin-cash` with `bitcoin-sv`: https://api.blockchair.com/bitcoin-sv/outputs?q=type(nulldata)# - -Please note that Bitcoin SV support is in test mode, and not intended for production use until Bitcoin SV has a more clear roadmap (e.g. we won't be able to offer some functionality if blocks suddenly become larger than 1 exabyte...) - ##### Data aggregation support (since Oct 8th 2018) * v.b2 - Dec 12th - Now it's possible to apply `?limit=` and `?offset=` sections to aggregated queries. `context.total_rows` now shows how many aggregated results are there, and `context.rows` shows how many are shown. @@ -80,7 +72,7 @@ See the examples: To use aggregation, put the fields by which you'd like to group by (zero, one, or several), and fields (at least one) which you'd like to calculate using some aggregate function under the `?a=` section. You can also sort the results by one of the fields included in the `?a=` section (`asc` or `desc`) using the `?s=` section, and apply additional filters (see the documentation for the `?q=` section). Possible fields: -* Bitcoin, Bitcoin Cash, Litecoin: +* Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin: * [Blocks table](#bitcoin-cashlitecoinmempoolblocks) * Group by: date (or week, month, year), version, guessed_miner * To calculate: size, stripped_size (except BCH), weight (except BCH), transaction_count, witness_count, input_count, output_count, input_total, input_total_usd, output_total, output_total_usd, fee_total, fee_total_usd, fee_per_kb, fee_per_kb_usd, fee_per_kwu (except BCH), fee_per_kwu_usd (except BCH), cdd_total, generation, generation_usd, reward, reward_usd — possible functions: avg(field), median(field), min(field), max(field), sum(field), count() @@ -148,23 +140,24 @@ Note: it makes sense to check `context.api.version` and, if `context.api.next_ma Return data from the tables according to the filters (`q`), sorting (`s`), limit (`limit`), and offset (`offset`). -A request should be construced like this: `https://api.blockchair.com/{blockchain}/[/mempool]{table}[?q={query}][&s={sorting}][&limit={limit}][&offset={offset}]` +A request should be construced like this: `https://api.blockchair.com/{chain}/[/mempool]{table}[?q={query}][&s={sorting}][&limit={limit}][&offset={offset}]` + +E.g. `https://api.blockchair.com/bitcoin/blocks?q=size(1000000..)` **Possible combinations of blockchains and tables:** * Bitcoin: * `bitcoin/blocks` - contains all Bitcoin blocks, including the latest one * `bitcoin/transactions` - contains all Bitcoin transactions, excluding mempool transactions and transactions from the latest block * `bitcoin/outputs` - contains all Bitcoin outputs, excluding the outputs contained in the mempool transactions as well as in the transactions from the latest block - * `bitcoin/mempool/blocks` - contains only the latest Bitcoin block - * `bitcoin/mempool/transactions` - contains Bitcoin mempool transactions as well as transactions from the latest block - * `bitcoin/mempool/outputs` - contains Bitcoin outputs included in mempool transactions as well as in transactions from the latest block -* Bitcoin Cash, Litecoin - the same as for Bitcoin + * `bitcoin/mempool/transactions` - contains Bitcoin mempool transactions + * `bitcoin/mempool/outputs` - contains Bitcoin outputs included in mempool transactions +* Bitcoin Cash, Bitcoin SV, Litecoin, Dogecoin - the same as for Bitcoin * Ethereum: * `ethereum/blocks` - contains all Ethereum blocks, except the last 6 * `ethereum/uncles` - contains all Ethereum uncles, except those that belong to the last 6 blocks * `ethereum/transactions` - contains all Ethereum transactions, except transactions from the last 6 blocks * `ethereum/calls` - contains all transaction calls, except calls for the last 6 blocks - * `ethereum/mempool/blocks` - contains the last 6 Ethereum blocks, some columns contain null + * `ethereum/mempool/blocks` - contains the last 6 Ethereum blocks, some columns contain nulls * `ethereum/mempool/transactions` - contains all Ethereum transactions from the last 6 blocks as well as mempool transactions Notes: to speed up the process, our architecture contains separate tables (`mempool*`) for unconfirmed transactions, as well as for blocks that with a certain probability can be forked off from the main chain. For Bitcoin, Bitcoin Cash, and Litecoin, `mempool*` contains the latest block transactions in addition to mempool transactions, and for Ethereum, that's the latest 6 blocks plus the mempool. Exception: for Bitcoin, Bitcoin Cash, and Litecoin, the `blocks` table also contains information about the latest block (this may change in the future). For Ethereum, we do not "replay" transactions entirely (i.e. not looking for internal calls) for the last 6 blocks, so there is no `mempool/calls` table. @@ -205,7 +198,9 @@ If you need to apply several sorts, you can list them by commas, similar to filt **Offset** can be used as a paginator, e.g., `?offset=10` returns the next 10 results. `context.offset` takes the value of the set `OFFSET`. The maximum value is 10000. If you need just the last page, it's easier and quicker to change the direction of the sorting to the opposite. Important: when iterating through the results, it is extremely likely that the number of rows in the database will increase because new blocks were found. To avoid that, you may add an additional condition that limits the block id to the value obtained in `context.state` in the first query. -#### (bitcoin[-cash]|litecoin)/[mempool/]blocks +#### bitcoin/blocks, bitcoin-cash/blocks, bitcoin-sv/blocks, litecoin/blocks, dogecoin/blocks + +E.g. `https://api.blockchair.com/bitcoin/blocks` Returns data about blocks @@ -248,6 +243,8 @@ Returns data about blocks | reward | int | Miner total reward (reward + total fee) in Satoshi | + | + | | reward_usd | float | Miner total reward (reward + total fee) in USD | + | + | | guessed_miner | string `.*` | The supposed name of the miner who found the block (the heuristic is based on `coinbase_data_bin` and the addresses to which the reward goes) | + | + | +| is_aux (\*\*) | boolean | Whether a block was mined using AuxPoW | | + | | + Additional synthetic columns (you can search over them and / or sort them, but they are not shown) @@ -259,10 +256,13 @@ Notes: - for the columns `id` and` hash` the increased efficiency at unloading of one record is applied - there is no possibility to search over the `date` column directly, you can search like `?q=time(YYYY-MM-DD)` - the search over the column `coinbase_data_hex` is done by the operator `^`, you can also use `~` for `coinbase_data_bin` (however, the field `coinbase_data_bin` will not be shown anyway) -- (\*) - only for Bitcoin +- (\*) - only for Bitcoin and Litecoin (SegWit data) +- (\*\*) - only for Dogecoin - the default sorting - id DESC -#### (bitcoin[-cash]|litecoin)/[mempool/]transactions +#### bitcoin/transactions, bitcoin/mempool/transactions, bitcoin-cash/transactions, bitcoin-cash/mempool/transactions, litecoin/transactions, litecoin/mempool/transactions, dogecoin/transactions, dogecoin/mempool/transactions + +E.g. `https://api.blockchair.com/dogecoin/mempool/transactions` Returns transaction data @@ -296,10 +296,13 @@ Returns transaction data Notes: - for the columns `id` and` hash` the increased efficiency at unloading of one record is applied - there is no possibility to search over `date` column, you can use `?q=time(YYYY-MM-DD instead -- (\*) - only for Bitcoin +- (\*) - only for Bitcoin and Litecoin (SegWit data) - the default sort is id DESC +- `block_id` for mempool transactions is `-1` + +#### bitcoin/outputs, bitcoin/mempool/outputs, bitcoin-cash/outputs, bitcoin-cash/mempool/outputs, litecoin/outputs, litecoin/mempool/outputs, dogecoin/outputs, dogecoin/mempool/outputs -#### (bitcoin[-cash]|litecoin)/[mempool/]outputs +E.g. `https://api.blockchair.com/litecoin/mempool/outputs` Returns information about the outputs (that become inputs when they are spent, and then `spending*` information appears) @@ -342,12 +345,12 @@ Notes: - for columns `transaction_id` and `spending_transaction_id`, the increased efficiency at unloading records if one specific transaction is specified (and not the range), is applied - there is no possibility to search over the `date` and `spending_date` columns, you can use `?q=time(YYYY-MM-DD)` and `?q=spending_time(YYYY-MM-DD)` instead - the search over `script_hex` column can be done by the operator `^`, you can also use `~` for `script_bin` (however, the field `script_bin` will still not be shown) -- (\*) - only for Bitcoin +- (\*) - only for Bitcoin and Litecoin (SegWit data) - the default sort is - transaction_id DESC -#### ethereum/[mempool/]blocks +#### ethereum/blocks, ethereum/mempool/blocks -Returns block data +Returns block data (`mempool` contains the latest 6 blocks) | Column | Type | Description | Q? | S? | |--------|------|-------------|----|----| @@ -394,7 +397,7 @@ Additional synthetic columns (you can search over them and / or sort them, but t | extra_data_bin | string `.*` | Text representation of extra data. Allows you to use the `LIKE` operator: `?q=extra_data_bin(~hello)`| + | | Notes: -- (\*) - always `null` for `mempool / blocks` +- (\*) - always `null` for `mempool/blocks` - for `id` and` hash` columns the increased efficiency at unloading of one record is applied - there is no possibility to search the `date` column, but you can use `?q=time(YYYY-MM-DD)` instead - search by fields that contain values in wei (`value_total`,` internal_value_total`, `generation`,` uncle_generation`, `fee_total`,` reward`) can be with some inaccuracies @@ -444,7 +447,7 @@ Notes: - the search over `extra_data_hex` column can be done by the operator `^`, you can also use `~` for `extra_data_bin` (however, the field `extra_data_bin` will still not be shown) - sort by default - parent_block_id DESC -#### ethereum/[mempool/]transactions +#### ethereum/transactions, ethereum/mempool/transactions Returns transaction information @@ -502,7 +505,7 @@ Notes: #### ethereum/calls -Returns information about calls +Returns information about internal calls | Column | Type | Description | Q? | S? | |--------|------|-------------|----|----| @@ -545,9 +548,11 @@ Notes: The API supports a number of calls that produce some aggregated data, or data in a more convenient form for certain entities. -#### (bitcoin[-cash]|litecoin|ethereum)/dashboards/block/{A} and (bitcoin[-cash]|litecoin|ethereum)/dashboards/blocks/{A[,B,...]} +#### {chain}/dashboards/block/{A} and {chain}/dashboards/blocks/{A[,B,...]} -As the input data, it takes the height or hash of the block(s). `data` returns an array with block heights or block hashes used as keys, and arrays of elements as values: +`{chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `bitcoin-sv`, `litecoin`, `dogecoin`, `ethereum` + +As the input data (`{A}`), it takes the height or hash of the block(s). `data` returns an array with block heights or block hashes used as keys, and arrays of elements as values: * `block` - information about the block in infinitable-format `(bitcoin[-cash]|ethereum)/blocks` * `transactions` - the array of all hashes of transactions included in the block * only for Ethereum - `synthetic_transactions` - array of internal ids of synthetic transactions (they do not have a hash) (`null` instead of the array until the block receives 6 confirmations) @@ -557,26 +562,32 @@ As the input data, it takes the height or hash of the block(s). `data` returns a #### ethereum/dashboards/uncle/{A} and ethereum/dashboards/uncles/{A[,B,...]} -As the input data, it takes an uncle hash(es). `data` returns an array with uncle hashes used as keys, and arrays of elements as values: +As the input data (`{A}`), it takes an uncle hash(es). `data` returns an array with uncle hashes used as keys, and arrays of elements as values: * `uncle` - information about the block in infinitable-format `ethereum/uncles` `context.results` contains the number of found uncles. -#### (bitcoin[-cash]|litecoin|ethereum)/dashboards/transaction/{A} and (bitcoin[-cash]|litecoin|ethereum)/dashboards/transactions/{A[,B,...]} +#### {chain}/dashboards/transaction/{A} and {chain}/dashboards/transactions/{A[,B,...]} + +`{chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `bitcoin-sv`, `litecoin`, `dogecoin`, `ethereum` At the input data, it takes an internal blockchair-id or a hash of a transaction (transactions). `data` returns an array with identifiers or hashes of transactions used as keys, and arrays of elements as keys: * `transaction` - transaction information in infinitable-format `bitcoin[-cash]/transactions` -* (only bitcoin[-cash]|litecoin) `inputs` - array of all transaction inputs, sorted by `spending_index` in infinitable-format `bitcoin[-cash]/outputs` -* (only bitcoin[-cash]|litecoin) `outputs` - array of all transaction outputs, sorted by `index` in infinitable-format `bitcoin[-cash]/outputs` +* (except ethereum) `inputs` - array of all transaction inputs, sorted by `spending_index` in infinitable-format `bitcoin[-cash]/outputs` +* (except ethereum) `outputs` - array of all transaction outputs, sorted by `index` in infinitable-format `bitcoin[-cash]/outputs` * (only ethereum) `calls` - the array of all calls made during the execution of the transaction (always `null` for mempool transactions and the last 6 blocks) `context.results` contains the number of found transactions. -#### (bitcoin[-cash]|litecoin|ethereum)/dashboards/transaction/{hash}/priority +#### {chain}/dashboards/transaction/{hash}/priority + +`{chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `bitcoin-sv`, `litecoin`, `dogecoin`, `ethereum` For mempool transactions shows priority (`position`) (for Bitcoin - by `fee_per_kwu`, for Bitcoin Cash - by `fee_per_kb`, for Ethereum - by `gas_price`) over other transactions (`out_of` mempool transactions). It has the same structure as the `(bitcoin[-cash]|ethereum)/dashboards/transaction/{A}` call -#### (bitcoin[-cash]|litecoin)/dashboards/address/{A} +#### {chain}/dashboards/address/{A} + +`{chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `bitcoin-sv`, `litecoin`, `dogecoin` Uses address as the input data. `data` returns an array with one element (if the address is found), in that case the address is the key, and the value is an array consisting of the following elements: * `address` @@ -635,7 +646,9 @@ Notes: - (\*) - in these columns, the value in wei can be rounded. For a million of calls, the error can be more than 1 ether. - (\*\*) - counted only those calls that fit the following condition: ethereum/calls.transferred = true (see the `ethereum/calls` documentation), i.e. those calls as well as failed calls that do not change state (staticcall, etc.) are not considered -#### (bitcoin[-cash]|litecoin|ethereum)/stats +#### {chain}/stats + +`{chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `bitcoin-sv`, `litecoin`, `dogecoin`, `ethereum` Returns an array with blockchain statistics: * `blocks` - total number of blocks @@ -649,15 +662,15 @@ Returns an array with blockchain statistics: * `volume_24h` for bitcoin[-cash]|litecoin, `volume_24h_approximate` for ethereum - monetary volume of transactions for the last 24 hours (for ethereum - an approximate value) * `mempool_transactions` - number of transactions in the mempool * (only ethereum) `mempool_median_gas_price` - median gas price in the mempool -* (only bitcoin[-cash]|litecoin) `mempool_size` - the mempool size in bytes +* (except ethereum) `mempool_size` - the mempool size in bytes * `mempool_tps` - number of transactions per second added to the mempool -* (only ethereum) `mempool_total_value_approximate` - mempool monetary value -* (only bitcoin[-cash]|litecoin) `mempool_total_fee_usd` - total mempool fee, in USD +* (except ethereum) `mempool_total_value_approximate` - mempool monetary value +* (except ethereum) `mempool_total_fee_usd` - total mempool fee, in USD * `best_block_height` - the latest block height * `best_block_hash` - the latest block hash * `best_block_time` - the latest block time * (only ethereum) `uncles_24h` - number of uncles for the last 24 hours -* (only bitcoin[-cash]|litecoin) `nodes` - number of complete nodes +* (except ethereum and bitcoin-sv) `nodes` - number of full nodes * `hashrate_24h` - hashrate (hashes per second) in average for the last 24 hours * `market_price_usd` - average market price of 1 coin in USD (market data source: CoinGecko) * `market_price_btc` - average market price of 1 coin in BTC (for Bitcoin always returns 1) @@ -668,11 +681,15 @@ Returns an array with blockchain statistics: #### stats -Returns data on four calls: +https://api.blockchair.com/stats + +Returns data on six calls: * `bitcoin/stats` * `bitcoin-cash/stats` * `ethereum/stats` * `litecoin/stats` +* `bitcoin-sv/stats` +* `dogecoin/stats` ### API request examples @@ -707,7 +724,7 @@ 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`, or `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 these: `bitcoin`, `bitcoin-cash`, `bitcoin-sv`, `litecoin`, `dogecoin`, `ethereum`) The response contains two keys which are: * `raw_transaction` - raw transaction represented as hex string From 7a0d007b15ab334d02714fa22207184367078693 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Tue, 5 Feb 2019 19:29:20 +0300 Subject: [PATCH 028/180] v.2.0.11 --- API.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/API.md b/API.md index 7cd4f17d..e595100a 100644 --- a/API.md +++ b/API.md @@ -6,6 +6,14 @@ ### Changelog +* v.2.0.11 - Feb 5th + * We're changing behavior of our `mempool` tables (for all supported coins except for Ethereum): now they don't contain the contents of the latest block (it was quite a clumsy thing to have both mempool transactions and transactions from the latest block in this table, but we've rebuilt our engine, so now `mempool` tables contain mempool content only, and it finally makes sense!). That means: + * `{chain}/mempool/blocks` is deprecated + * `{chain}/mempool/transactions` and `{chain}/mempool/outputs` now don't contain info from the latest block, while `{chain}/transactions` and `{chain}/outputs` do + * Before this update when using (undocumented) `export` functionality there was no information about the latest block at all, now there is + * The same change to Ethereum will come in one of the next updates + * Dogecoin is out of beta. + * Bitcoin SV is out of beta. Please note there's still a possibility that we won't be able to offer some functionality in the long term if blocks suddenly become larger than 1 exabyte, we're still waiting for a more clear development roadmap. * v.2.0.10 - Jan 29th, 2019 - Added Dogecoin support in test mode (see `Dogecoin support` in the docs) * v.2.0.9 - Dec 13th - Added Bitcoin SV support in test mode (see `Bitcoin SV support` in the docs); updated aggregation abilities (see `Data aggregation support` in the docs) * v.2.0.8 - Nov 26th - Added the ability to retrieve raw transaction data in hex, see `Retrieving raw transactions` in the docs From 8b5aa5aed991c72f2f9b4f5a82f2ebc02d2a4310 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Wed, 6 Feb 2019 02:55:26 +0300 Subject: [PATCH 029/180] v.2.0.11 --- API.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/API.md b/API.md index e595100a..459e5cd8 100644 --- a/API.md +++ b/API.md @@ -8,7 +8,7 @@ * v.2.0.11 - Feb 5th * We're changing behavior of our `mempool` tables (for all supported coins except for Ethereum): now they don't contain the contents of the latest block (it was quite a clumsy thing to have both mempool transactions and transactions from the latest block in this table, but we've rebuilt our engine, so now `mempool` tables contain mempool content only, and it finally makes sense!). That means: - * `{chain}/mempool/blocks` is deprecated + * `{chain}/mempool/blocks` is deprecated. Hint: if you used `mempool/blocks` to get info about the latest block you can simply switch to using `blocks?limit=1`, e.g. `https://api.blockchair.com/bitcoin/blocks?limit=1` * `{chain}/mempool/transactions` and `{chain}/mempool/outputs` now don't contain info from the latest block, while `{chain}/transactions` and `{chain}/outputs` do * Before this update when using (undocumented) `export` functionality there was no information about the latest block at all, now there is * The same change to Ethereum will come in one of the next updates From 477fa14db8b048bc638098ac63ad57bd550a541f Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Wed, 6 Feb 2019 02:57:24 +0300 Subject: [PATCH 030/180] v.2.0.11 --- API_DOCUMENTATION_EN.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index e209bac4..b2af7690 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -37,7 +37,7 @@ * v.2.0.11 - Feb 5th * We're changing behavior of our `mempool` tables (for all supported coins except for Ethereum): now they don't contain the contents of the latest block (it was quite a clumsy thing to have both mempool transactions and transactions from the latest block in this table, but we've rebuilt our engine, so now `mempool` tables contain mempool content only, and it finally makes sense!). That means: - * `{chain}/mempool/blocks` is deprecated + * `{chain}/mempool/blocks` is deprecated. Hint: if you used `mempool/blocks` to get info about the latest block you can simply switch to using `blocks?limit=1`, e.g. `https://api.blockchair.com/bitcoin/blocks?limit=1` * `{chain}/mempool/transactions` and `{chain}/mempool/outputs` now don't contain info from the latest block, while `{chain}/transactions` and `{chain}/outputs` do * Before this update when using (undocumented) `export` functionality there was no information about the latest block at all, now there is * The same change to Ethereum will come in one of the next updates From d6a1af16394d413e11283f4fe26095a7c7a7cc48 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Tue, 12 Feb 2019 21:02:38 +0300 Subject: [PATCH 031/180] v.2.0.12 --- API.md | 1 + 1 file changed, 1 insertion(+) diff --git a/API.md b/API.md index 459e5cd8..cff484ba 100644 --- a/API.md +++ b/API.md @@ -6,6 +6,7 @@ ### Changelog +* v.2.0.12 - Feb 12th - Fixed a bug in Ethereum where some contract creations were erroneously shown as failed (thanks Daniel Luca for noticing) * v.2.0.11 - Feb 5th * We're changing behavior of our `mempool` tables (for all supported coins except for Ethereum): now they don't contain the contents of the latest block (it was quite a clumsy thing to have both mempool transactions and transactions from the latest block in this table, but we've rebuilt our engine, so now `mempool` tables contain mempool content only, and it finally makes sense!). That means: * `{chain}/mempool/blocks` is deprecated. Hint: if you used `mempool/blocks` to get info about the latest block you can simply switch to using `blocks?limit=1`, e.g. `https://api.blockchair.com/bitcoin/blocks?limit=1` From f8616bbe2a57ae1601641431294d7bbd3acd2e64 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Tue, 12 Feb 2019 21:02:55 +0300 Subject: [PATCH 032/180] v.2.0.12 --- API_DOCUMENTATION_EN.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index b2af7690..1cf10640 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,4 +1,4 @@ -## [Blockchair.com](https://blockchair.com/) API v.2.0.11 Documentation +## [Blockchair.com](https://blockchair.com/) API v.2.0.12 Documentation ![Blockchair logo](https://blockchair.com/images/logo_full.png "Blockchair logo") @@ -35,6 +35,7 @@ ### Changelog +* v.2.0.12 - Feb 12th - Fixed a bug in Ethereum where some contract creations were erroneously shown as failed (thanks Daniel Luca for noticing) * v.2.0.11 - Feb 5th * We're changing behavior of our `mempool` tables (for all supported coins except for Ethereum): now they don't contain the contents of the latest block (it was quite a clumsy thing to have both mempool transactions and transactions from the latest block in this table, but we've rebuilt our engine, so now `mempool` tables contain mempool content only, and it finally makes sense!). That means: * `{chain}/mempool/blocks` is deprecated. Hint: if you used `mempool/blocks` to get info about the latest block you can simply switch to using `blocks?limit=1`, e.g. `https://api.blockchair.com/bitcoin/blocks?limit=1` From 10960fdc9cad0f530f140a15c8d3c5fab9578304 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Wed, 13 Feb 2019 02:47:12 +0300 Subject: [PATCH 033/180] v.2.0.13 --- API.md | 1 + 1 file changed, 1 insertion(+) diff --git a/API.md b/API.md index cff484ba..21fa452f 100644 --- a/API.md +++ b/API.md @@ -6,6 +6,7 @@ ### Changelog +* v.2.0.13 - Feb 13th - Added support for Cyrillic characters in fulltext search, e.g. https://api.blockchair.com/bitcoin/outputs?q=script_bin(~привет) * v.2.0.12 - Feb 12th - Fixed a bug in Ethereum where some contract creations were erroneously shown as failed (thanks Daniel Luca for noticing) * v.2.0.11 - Feb 5th * We're changing behavior of our `mempool` tables (for all supported coins except for Ethereum): now they don't contain the contents of the latest block (it was quite a clumsy thing to have both mempool transactions and transactions from the latest block in this table, but we've rebuilt our engine, so now `mempool` tables contain mempool content only, and it finally makes sense!). That means: From 6b2cfba1d777ffff264ef17dea8d86a0ec3eb230 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Wed, 13 Feb 2019 02:47:36 +0300 Subject: [PATCH 034/180] v.2.0.13 --- API.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/API.md b/API.md index 21fa452f..09cbc27a 100644 --- a/API.md +++ b/API.md @@ -6,7 +6,7 @@ ### Changelog -* v.2.0.13 - Feb 13th - Added support for Cyrillic characters in fulltext search, e.g. https://api.blockchair.com/bitcoin/outputs?q=script_bin(~привет) +* v.2.0.13 - Feb 13th - Added support for Cyrillic characters in fulltext search, e.g. `https://api.blockchair.com/bitcoin/outputs?q=script_bin(~привет)` * v.2.0.12 - Feb 12th - Fixed a bug in Ethereum where some contract creations were erroneously shown as failed (thanks Daniel Luca for noticing) * v.2.0.11 - Feb 5th * We're changing behavior of our `mempool` tables (for all supported coins except for Ethereum): now they don't contain the contents of the latest block (it was quite a clumsy thing to have both mempool transactions and transactions from the latest block in this table, but we've rebuilt our engine, so now `mempool` tables contain mempool content only, and it finally makes sense!). That means: From b0e7b2ab275cc4d5628781cf5d70aa1c37a10701 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Wed, 13 Feb 2019 02:48:03 +0300 Subject: [PATCH 035/180] v.2.0.13 --- API_DOCUMENTATION_EN.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index 1cf10640..3f7e740c 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,4 +1,4 @@ -## [Blockchair.com](https://blockchair.com/) API v.2.0.12 Documentation +## [Blockchair.com](https://blockchair.com/) API v.2.0.13 Documentation ![Blockchair logo](https://blockchair.com/images/logo_full.png "Blockchair logo") @@ -35,6 +35,7 @@ ### Changelog +* v.2.0.13 - Feb 13th - Added support for Cyrillic characters in fulltext search, e.g. `https://api.blockchair.com/bitcoin/outputs?q=script_bin(~привет)` * v.2.0.12 - Feb 12th - Fixed a bug in Ethereum where some contract creations were erroneously shown as failed (thanks Daniel Luca for noticing) * v.2.0.11 - Feb 5th * We're changing behavior of our `mempool` tables (for all supported coins except for Ethereum): now they don't contain the contents of the latest block (it was quite a clumsy thing to have both mempool transactions and transactions from the latest block in this table, but we've rebuilt our engine, so now `mempool` tables contain mempool content only, and it finally makes sense!). That means: From 7a41f01462f66c1db94fa430ff3a63cf00370e20 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Wed, 6 Mar 2019 16:44:37 +0300 Subject: [PATCH 036/180] v.2.0.14 --- API_DOCUMENTATION_EN.md | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index 3f7e740c..eb19dc95 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,4 +1,4 @@ -## [Blockchair.com](https://blockchair.com/) API v.2.0.13 Documentation +## [Blockchair.com](https://blockchair.com/) API v.2.0.14 Documentation ![Blockchair logo](https://blockchair.com/images/logo_full.png "Blockchair logo") @@ -35,8 +35,15 @@ ### Changelog +* v.2.0.14 - Mar 6th + * Added xpub support in test mode. There's now support for retrieving info about multiple addresses using xpub keys. Use `https://api.blockchair.com/{chain/dashboards/xpub/{xpub}`. See `xpub support` in the docs. + * Extended data aggregation abilities (still in test mode), see `Data aggregation support` in the docs. Now it's possbile to find correlations with price, and use special functions (e.g. to calculate SegWit adoption). + * We're DEPRECATING API v.1 and will be shutting it down on April 1st, 2019. + * We're DEPRECATING undocumented `?export=` functionality when exporting large datasets without an API key. This feature will be documented in one of the next updates. + * Full support for `CREATE2` in Ethereum (see `https://blockchair.com/ethereum/calls?q=type(create2)#`) + * When using CSV/TSV API (undocumented `?export=` functionality) amounts in USD are now shown as in the JSON API version (previously you had to divide them by 10000). `bitcoin.outputs.type`, `ethereum.transaction.type`, and `ethereum.calls.type` now yield strings (e.g. `pubkeyhash` instead of `2`). * v.2.0.13 - Feb 13th - Added support for Cyrillic characters in fulltext search, e.g. `https://api.blockchair.com/bitcoin/outputs?q=script_bin(~привет)` -* v.2.0.12 - Feb 12th - Fixed a bug in Ethereum where some contract creations were erroneously shown as failed (thanks Daniel Luca for noticing) +* v.2.0.12 - Feb 12th - Fixed a bug in Ethereum where some contract creations were erroneously shown as failed (thanks Daniel Luca for noticing) * v.2.0.11 - Feb 5th * We're changing behavior of our `mempool` tables (for all supported coins except for Ethereum): now they don't contain the contents of the latest block (it was quite a clumsy thing to have both mempool transactions and transactions from the latest block in this table, but we've rebuilt our engine, so now `mempool` tables contain mempool content only, and it finally makes sense!). That means: * `{chain}/mempool/blocks` is deprecated. Hint: if you used `mempool/blocks` to get info about the latest block you can simply switch to using `blocks?limit=1`, e.g. `https://api.blockchair.com/bitcoin/blocks?limit=1` @@ -58,8 +65,21 @@ ### Tested features changelog +##### xpub support (since Mar 6th 2019) + +* v.b1 - Mar 6th - There's now support for retrieving info about multiple addresses using xpub keys. Use `https://api.blockchair.com/{chain}/dashboards/xpub/{xpub}` (where `{chain}` is one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, e.g. `https://api.blockchair.com/bitcoin/dashboards/xpub/xpub6CUGRUonZSQ4TWtTMmzXdrXDtypWKiKrhko4egpiMZbpiaQL2jkwSB1icqYh2cfDfVxdx4df189oLKnC5fSwqPfgyP3hooxujYzAu3fDVmz`). The response contains following keys: + * `xpub` - information about group of addresses, including its current balance (`xpub.balance`) + * `addresses` - array of addresses (returns the same schema as `https://api.blockchair.com/{chain}/dashboards/address/{addr}` with two exceptions: there's no `transaction_count` key, and there's `path key` showing xpub path) + * `transactions` - hashes of the latest transactions, iterable using `?offset=N` + ##### Data aggregation support (since Oct 8th 2018) +* v.b3 - Mar 6th + * New function `price({ticker1}_{ticker2})` which shows the price if `date` (or one of: `week`, `month`, `year`) is also applied. E.g. it's now possible to build a chart showing correlation between price and transaction count: `https://api.blockchair.com/bitcoin/blocks?a=month,sum(transaction_count),price(btc_usd)`. Supported tickers: usd, btc, bch, bsv, eth, ltc, doge. + * Output values now have correct types (e.g. `sum(transaction_count)` is now integer instead of string). + * Now it's possible to use special functions and applying special filters to them. Two examples: + * `https://api.blockchair.com/bitcoin/blocks?a=date,f(sum(witness_count)/sum(transaction_count))&q=time(2017-08-24..)` - calculate SegWit adoption + * `https://api.blockchair.com/bitcoin/outputs?a=date,f(count()/count())&q=type(nulldata),time(2019-02)&aq=0:0` - calculate the percentage of nulldata outputs: the `?aq=0:0` section applies 0th condition to 0th function (NB: after that 0th condition isn't used in the `WHERE` clause) * v.b2 - Dec 12th - Now it's possible to apply `?limit=` and `?offset=` sections to aggregated queries. `context.total_rows` now shows how many aggregated results are there, and `context.rows` shows how many are shown. * v.b1 - Oct 8th - Bringing the ability to obtain aggregated data. Now you can use Blockchair not only to filter and sort blockchain data, but also to aggregate it. From 2cba34f4bf8f45af734d1a06f0c7841126eb3217 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Wed, 6 Mar 2019 16:45:23 +0300 Subject: [PATCH 037/180] v.2.0.14 --- API.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/API.md b/API.md index 09cbc27a..69cd8b49 100644 --- a/API.md +++ b/API.md @@ -6,6 +6,13 @@ ### Changelog +* v.2.0.14 - Mar 6th + * Added xpub support in test mode. There's now support for retrieving info about multiple addresses using xpub keys. Use `https://api.blockchair.com/{chain/dashboards/xpub/{xpub}`. See `xpub support` in the docs. + * Extended data aggregation abilities (still in test mode), see `Data aggregation support` in the docs. Now it's possbile to find correlations with price, and use special functions (e.g. to calculate SegWit adoption). + * We're DEPRECATING API v.1 and will be shutting it down on April 1st, 2019. + * We're DEPRECATING undocumented `?export=` functionality when exporting large datasets without an API key. This feature will be documented in one of the next updates. + * Full support for `CREATE2` in Ethereum (see `https://blockchair.com/ethereum/calls?q=type(create2)#`) + * When using CSV/TSV API (undocumented `?export=` functionality) amounts in USD are now shown as in the JSON API version (previously you had to divide them by 10000). `bitcoin.outputs.type`, `ethereum.transaction.type`, and `ethereum.calls.type` now yield strings (e.g. `pubkeyhash` instead of `2`). * v.2.0.13 - Feb 13th - Added support for Cyrillic characters in fulltext search, e.g. `https://api.blockchair.com/bitcoin/outputs?q=script_bin(~привет)` * v.2.0.12 - Feb 12th - Fixed a bug in Ethereum where some contract creations were erroneously shown as failed (thanks Daniel Luca for noticing) * v.2.0.11 - Feb 5th From 438915d239a38c0c567f6b9555dc98ec3be7f1f3 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Tue, 12 Mar 2019 17:28:47 +0300 Subject: [PATCH 038/180] v.2.0.15 --- API_DOCUMENTATION_EN.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index eb19dc95..a336bfbc 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,4 +1,4 @@ -## [Blockchair.com](https://blockchair.com/) API v.2.0.14 Documentation +## [Blockchair.com](https://blockchair.com/) API v.2.0.15 Documentation ![Blockchair logo](https://blockchair.com/images/logo_full.png "Blockchair logo") @@ -35,8 +35,9 @@ ### Changelog +* v.2.0.15 - Mar 12th - Added Dash support in test mode. We're supporting all the features for DASH as we support for other Satoshi-like coins. Additional columns: `blocks.cbtx`, `transactions.type` (possible types: `simple`, `proregtx`, `proupservtx`, `proupregtx`, `prouprevtx`, `cbtx`, `qctx`, `subtxregister`, `subtxtopup`, `subtxresetkey`, `subtxcloseaccount`), `transactions.is_instant_lock`, `transactions.is_special` (`true` for all transaction types except `simple`), `transactions.special_json` (contains special transaction data encoded in json). E.g.: `https://api.blockchair.com/dash/blocks` * v.2.0.14 - Mar 6th - * Added xpub support in test mode. There's now support for retrieving info about multiple addresses using xpub keys. Use `https://api.blockchair.com/{chain/dashboards/xpub/{xpub}`. See `xpub support` in the docs. + * Added xpub support in test mode. There's now support for retrieving info about multiple addresses using xpub keys. Use `https://api.blockchair.com/{chain}/dashboards/xpub/{xpub}`. See `xpub support` in the docs. * Extended data aggregation abilities (still in test mode), see `Data aggregation support` in the docs. Now it's possbile to find correlations with price, and use special functions (e.g. to calculate SegWit adoption). * We're DEPRECATING API v.1 and will be shutting it down on April 1st, 2019. * We're DEPRECATING undocumented `?export=` functionality when exporting large datasets without an API key. This feature will be documented in one of the next updates. @@ -65,6 +66,10 @@ ### Tested features changelog +##### Dash support (since Mar 12th 2019) + +* v.rc1 - Mar 12th - We're supporting all the features for DASH as we support for other Satoshi-like coins. Additional columns: `blocks.cbtx`, `transactions.type` (possible types: `simple`, `proregtx`, `proupservtx`, `proupregtx`, `prouprevtx`, `cbtx`, `qctx`, `subtxregister`, `subtxtopup`, `subtxresetkey`, `subtxcloseaccount`), `transactions.is_instant_lock`, `transactions.is_special` (`true` for all transaction types except `simple`), `transactions.special_json` (contains special transaction data encoded in json). + ##### xpub support (since Mar 6th 2019) * v.b1 - Mar 6th - There's now support for retrieving info about multiple addresses using xpub keys. Use `https://api.blockchair.com/{chain}/dashboards/xpub/{xpub}` (where `{chain}` is one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, e.g. `https://api.blockchair.com/bitcoin/dashboards/xpub/xpub6CUGRUonZSQ4TWtTMmzXdrXDtypWKiKrhko4egpiMZbpiaQL2jkwSB1icqYh2cfDfVxdx4df189oLKnC5fSwqPfgyP3hooxujYzAu3fDVmz`). The response contains following keys: @@ -118,7 +123,7 @@ Possible fields: * Group by: block_id, date (or week, month, year), failed, fail_reason, type, transferred * To calculate: child_call_count, value, value_usd — possible functions: avg(field), median(field), min(field), max(field), sum(field), count() -##### Omni Layer and Wormhole support (since Sep 18th) +##### Omni Layer and Wormhole support (since Sep 18th 2018) * v.a1 - Sep 18th - Added alpha support for Omni Layer in Bitcoin (`bitcoin/omni/properties`, `bitcoin/omni/dashboards/property/{id}` calls, plus `_omni` key in the `bitcoin/dashboards/transaction` call and `_omni` key in the `bitcoin/dashboards/address` call), and support for Wormhole in Bitcoin Cash (`bitcoin-cash/wormhole/properties`, `bitcoin-cash/wormhole/dashboards/property/{id}` calls, plus `_wormhole` key in the `bitcoin-cash/dashboards/transaction` call and `_wormhole` key in the `bitcoin-cash/dashboards/address` call). Please don't use this in production yet, there will be massive changes! From 5ccbaf9ff5973174e2b7b1df961c0ef9ad27c4d1 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Tue, 12 Mar 2019 17:29:29 +0300 Subject: [PATCH 039/180] v.2.0.15 --- API.md | 1 + 1 file changed, 1 insertion(+) diff --git a/API.md b/API.md index 69cd8b49..bf3562f1 100644 --- a/API.md +++ b/API.md @@ -6,6 +6,7 @@ ### Changelog +* v.2.0.15 - Mar 12th - Added Dash support in test mode. We're supporting all the features for DASH as we support for other Satoshi-like coins. Additional columns: `blocks.cbtx`, `transactions.type` (possible types: `simple`, `proregtx`, `proupservtx`, `proupregtx`, `prouprevtx`, `cbtx`, `qctx`, `subtxregister`, `subtxtopup`, `subtxresetkey`, `subtxcloseaccount`), `transactions.is_instant_lock`, `transactions.is_special` (`true` for all transaction types except `simple`), `transactions.special_json` (contains special transaction data encoded in json). E.g.: `https://api.blockchair.com/dash/blocks` * v.2.0.14 - Mar 6th * Added xpub support in test mode. There's now support for retrieving info about multiple addresses using xpub keys. Use `https://api.blockchair.com/{chain/dashboards/xpub/{xpub}`. See `xpub support` in the docs. * Extended data aggregation abilities (still in test mode), see `Data aggregation support` in the docs. Now it's possbile to find correlations with price, and use special functions (e.g. to calculate SegWit adoption). From d450b31a3f709f1b336be905d0d0ff1ea4840f62 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Wed, 13 Mar 2019 18:21:50 +0300 Subject: [PATCH 040/180] v.2.0.16 --- API_DOCUMENTATION_EN.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index a336bfbc..bf3cab6e 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,4 +1,4 @@ -## [Blockchair.com](https://blockchair.com/) API v.2.0.15 Documentation +## [Blockchair.com](https://blockchair.com/) API v.2.0.16 Documentation ![Blockchair logo](https://blockchair.com/images/logo_full.png "Blockchair logo") @@ -35,6 +35,7 @@ ### Changelog +* v.2.0.16 - Mar 13th - Added support for ypub and zpub for Bitcoin and Litecoin in test mode. See `xpub support` in the docs. * v.2.0.15 - Mar 12th - Added Dash support in test mode. We're supporting all the features for DASH as we support for other Satoshi-like coins. Additional columns: `blocks.cbtx`, `transactions.type` (possible types: `simple`, `proregtx`, `proupservtx`, `proupregtx`, `prouprevtx`, `cbtx`, `qctx`, `subtxregister`, `subtxtopup`, `subtxresetkey`, `subtxcloseaccount`), `transactions.is_instant_lock`, `transactions.is_special` (`true` for all transaction types except `simple`), `transactions.special_json` (contains special transaction data encoded in json). E.g.: `https://api.blockchair.com/dash/blocks` * v.2.0.14 - Mar 6th * Added xpub support in test mode. There's now support for retrieving info about multiple addresses using xpub keys. Use `https://api.blockchair.com/{chain}/dashboards/xpub/{xpub}`. See `xpub support` in the docs. @@ -72,6 +73,7 @@ ##### xpub support (since Mar 6th 2019) +* v.b2 - Mar 13th - We're bringing support for ypub and zpub as well (for Bitcoin and Litecoin). The endpoints are `https://api.blockchair.com/{chain}/dashboards/ypub/{ypub}` and `https://api.blockchair.com/{chain}/dashboards/zpub/{zpub}` (where `{chain}` is one of these: `bitcoin`, `litecoin`) * v.b1 - Mar 6th - There's now support for retrieving info about multiple addresses using xpub keys. Use `https://api.blockchair.com/{chain}/dashboards/xpub/{xpub}` (where `{chain}` is one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, e.g. `https://api.blockchair.com/bitcoin/dashboards/xpub/xpub6CUGRUonZSQ4TWtTMmzXdrXDtypWKiKrhko4egpiMZbpiaQL2jkwSB1icqYh2cfDfVxdx4df189oLKnC5fSwqPfgyP3hooxujYzAu3fDVmz`). The response contains following keys: * `xpub` - information about group of addresses, including its current balance (`xpub.balance`) * `addresses` - array of addresses (returns the same schema as `https://api.blockchair.com/{chain}/dashboards/address/{addr}` with two exceptions: there's no `transaction_count` key, and there's `path key` showing xpub path) From 9708ed142dd2d6d016fbf9e310a01ee1f0f74991 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Wed, 13 Mar 2019 18:22:58 +0300 Subject: [PATCH 041/180] v.2.0.16 --- API.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/API.md b/API.md index bf3562f1..4db8d65c 100644 --- a/API.md +++ b/API.md @@ -6,9 +6,10 @@ ### Changelog +* v.2.0.16 - Mar 13th - Added support for ypub and zpub for Bitcoin and Litecoin in test mode. See `xpub support` in the docs. * v.2.0.15 - Mar 12th - Added Dash support in test mode. We're supporting all the features for DASH as we support for other Satoshi-like coins. Additional columns: `blocks.cbtx`, `transactions.type` (possible types: `simple`, `proregtx`, `proupservtx`, `proupregtx`, `prouprevtx`, `cbtx`, `qctx`, `subtxregister`, `subtxtopup`, `subtxresetkey`, `subtxcloseaccount`), `transactions.is_instant_lock`, `transactions.is_special` (`true` for all transaction types except `simple`), `transactions.special_json` (contains special transaction data encoded in json). E.g.: `https://api.blockchair.com/dash/blocks` * v.2.0.14 - Mar 6th - * Added xpub support in test mode. There's now support for retrieving info about multiple addresses using xpub keys. Use `https://api.blockchair.com/{chain/dashboards/xpub/{xpub}`. See `xpub support` in the docs. + * Added xpub support in test mode. There's now support for retrieving info about multiple addresses using xpub keys. Use `https://api.blockchair.com/{chain}/dashboards/xpub/{xpub}`. See `xpub support` in the docs. * Extended data aggregation abilities (still in test mode), see `Data aggregation support` in the docs. Now it's possbile to find correlations with price, and use special functions (e.g. to calculate SegWit adoption). * We're DEPRECATING API v.1 and will be shutting it down on April 1st, 2019. * We're DEPRECATING undocumented `?export=` functionality when exporting large datasets without an API key. This feature will be documented in one of the next updates. From 353d829042a64f26a97c1853819ea44525be73d8 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Thu, 14 Mar 2019 21:47:33 +0300 Subject: [PATCH 042/180] v.2.0.17 --- API_DOCUMENTATION_EN.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index bf3cab6e..b31f41fe 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,4 +1,4 @@ -## [Blockchair.com](https://blockchair.com/) API v.2.0.16 Documentation +## [Blockchair.com](https://blockchair.com/) API v.2.0.17 Documentation ![Blockchair logo](https://blockchair.com/images/logo_full.png "Blockchair logo") @@ -35,6 +35,7 @@ ### Changelog +* v.2.0.17 - Mar 14th - Added support for Bitcoin SV nodes, they are now separate from Bitcoin Cash nodes. Endpoint: `https://api.blockchair.com/bitcoin-sv/nodes`. * v.2.0.16 - Mar 13th - Added support for ypub and zpub for Bitcoin and Litecoin in test mode. See `xpub support` in the docs. * v.2.0.15 - Mar 12th - Added Dash support in test mode. We're supporting all the features for DASH as we support for other Satoshi-like coins. Additional columns: `blocks.cbtx`, `transactions.type` (possible types: `simple`, `proregtx`, `proupservtx`, `proupregtx`, `prouprevtx`, `cbtx`, `qctx`, `subtxregister`, `subtxtopup`, `subtxresetkey`, `subtxcloseaccount`), `transactions.is_instant_lock`, `transactions.is_special` (`true` for all transaction types except `simple`), `transactions.special_json` (contains special transaction data encoded in json). E.g.: `https://api.blockchair.com/dash/blocks` * v.2.0.14 - Mar 6th From 710a80cdc7f5a0dd7d9371f496518898af344e6d Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Thu, 14 Mar 2019 21:48:07 +0300 Subject: [PATCH 043/180] v.2.0.17 --- API.md | 1 + 1 file changed, 1 insertion(+) diff --git a/API.md b/API.md index 4db8d65c..c022d45a 100644 --- a/API.md +++ b/API.md @@ -6,6 +6,7 @@ ### Changelog +* v.2.0.17 - Mar 14th - Added support for Bitcoin SV nodes, they are now separate from Bitcoin Cash nodes. Endpoint: `https://api.blockchair.com/bitcoin-sv/nodes`. * v.2.0.16 - Mar 13th - Added support for ypub and zpub for Bitcoin and Litecoin in test mode. See `xpub support` in the docs. * v.2.0.15 - Mar 12th - Added Dash support in test mode. We're supporting all the features for DASH as we support for other Satoshi-like coins. Additional columns: `blocks.cbtx`, `transactions.type` (possible types: `simple`, `proregtx`, `proupservtx`, `proupregtx`, `prouprevtx`, `cbtx`, `qctx`, `subtxregister`, `subtxtopup`, `subtxresetkey`, `subtxcloseaccount`), `transactions.is_instant_lock`, `transactions.is_special` (`true` for all transaction types except `simple`), `transactions.special_json` (contains special transaction data encoded in json). E.g.: `https://api.blockchair.com/dash/blocks` * v.2.0.14 - Mar 6th From e984806e762ce84d5ccebde804d3ea7abbfa0d11 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Tue, 2 Apr 2019 19:20:26 +0300 Subject: [PATCH 044/180] v.2.0.18 --- API.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/API.md b/API.md index c022d45a..6a0f2770 100644 --- a/API.md +++ b/API.md @@ -6,6 +6,15 @@ ### Changelog +* v.2.0.18 - Apr 2nd + * Added biggest transactions over the last 24h to `https://api.blockchair.com/{chain}/stats` calls (`largest_transaction_24h` key); + * Updated xpub support to v.b3 (see `xpub support` in the docs, there are some breaking changes); + * Updated aggregation support to v.b4 (see `Data aggregation support` in the docs) + * We're **DEPRECATING** usage of unsupported parameters in GET and POST requests to our API endpoints (e.g. `https://api.blockchair.com/stats?myarbitrarykey=1234` might result in a `400 Bad Request` error); + * Previously DEPRECATED API v.1 has been shut down + * Previously DEPRECATED undocumented `?export=` functionality now requires an API key (apply at <`info@blockchair.com`>) for everything except: + * Aggregated results + * `blocks` tables across all blockchains we support * v.2.0.17 - Mar 14th - Added support for Bitcoin SV nodes, they are now separate from Bitcoin Cash nodes. Endpoint: `https://api.blockchair.com/bitcoin-sv/nodes`. * v.2.0.16 - Mar 13th - Added support for ypub and zpub for Bitcoin and Litecoin in test mode. See `xpub support` in the docs. * v.2.0.15 - Mar 12th - Added Dash support in test mode. We're supporting all the features for DASH as we support for other Satoshi-like coins. Additional columns: `blocks.cbtx`, `transactions.type` (possible types: `simple`, `proregtx`, `proupservtx`, `proupregtx`, `prouprevtx`, `cbtx`, `qctx`, `subtxregister`, `subtxtopup`, `subtxresetkey`, `subtxcloseaccount`), `transactions.is_instant_lock`, `transactions.is_special` (`true` for all transaction types except `simple`), `transactions.special_json` (contains special transaction data encoded in json). E.g.: `https://api.blockchair.com/dash/blocks` From 89cf956db4616fcfd088249d4e5acf4d4f9b6217 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Tue, 2 Apr 2019 19:21:05 +0300 Subject: [PATCH 045/180] v.2.0.18 --- API_DOCUMENTATION_EN.md | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index b31f41fe..4d42d7db 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,4 +1,4 @@ -## [Blockchair.com](https://blockchair.com/) API v.2.0.17 Documentation +## [Blockchair.com](https://blockchair.com/) API v.2.0.18 Documentation ![Blockchair logo](https://blockchair.com/images/logo_full.png "Blockchair logo") @@ -35,14 +35,23 @@ ### Changelog +* v.2.0.18 - Apr 2nd + * Added biggest transactions over the last 24h to `https://api.blockchair.com/{chain}/stats` calls (`largest_transaction_24h` key); + * Updated xpub support to v.b3 (see `xpub support` in the docs, there are some breaking changes); + * Updated aggregation support to v.b4 (see `Data aggregation support` in the docs) + * We're **DEPRECATING** usage of unsupported parameters in GET and POST requests to our API endpoints (e.g. `https://api.blockchair.com/stats?myarbitrarykey=1234` might result in a `400 Bad Request` error); + * Previously DEPRECATED API v.1 has been shut down + * Previously DEPRECATED undocumented `?export=` functionality now requires an API key (apply at <`info@blockchair.com`>) for everything except: + * Aggregated results + * `blocks` tables across all blockchains we support * v.2.0.17 - Mar 14th - Added support for Bitcoin SV nodes, they are now separate from Bitcoin Cash nodes. Endpoint: `https://api.blockchair.com/bitcoin-sv/nodes`. * v.2.0.16 - Mar 13th - Added support for ypub and zpub for Bitcoin and Litecoin in test mode. See `xpub support` in the docs. * v.2.0.15 - Mar 12th - Added Dash support in test mode. We're supporting all the features for DASH as we support for other Satoshi-like coins. Additional columns: `blocks.cbtx`, `transactions.type` (possible types: `simple`, `proregtx`, `proupservtx`, `proupregtx`, `prouprevtx`, `cbtx`, `qctx`, `subtxregister`, `subtxtopup`, `subtxresetkey`, `subtxcloseaccount`), `transactions.is_instant_lock`, `transactions.is_special` (`true` for all transaction types except `simple`), `transactions.special_json` (contains special transaction data encoded in json). E.g.: `https://api.blockchair.com/dash/blocks` * v.2.0.14 - Mar 6th * Added xpub support in test mode. There's now support for retrieving info about multiple addresses using xpub keys. Use `https://api.blockchair.com/{chain}/dashboards/xpub/{xpub}`. See `xpub support` in the docs. * Extended data aggregation abilities (still in test mode), see `Data aggregation support` in the docs. Now it's possbile to find correlations with price, and use special functions (e.g. to calculate SegWit adoption). - * We're DEPRECATING API v.1 and will be shutting it down on April 1st, 2019. - * We're DEPRECATING undocumented `?export=` functionality when exporting large datasets without an API key. This feature will be documented in one of the next updates. + * We're **DEPRECATING** API v.1 and will be shutting it down on April 1st, 2019. + * We're **DEPRECATING** undocumented `?export=` functionality when exporting large datasets without an API key. This feature will be documented in one of the next updates. * Full support for `CREATE2` in Ethereum (see `https://blockchair.com/ethereum/calls?q=type(create2)#`) * When using CSV/TSV API (undocumented `?export=` functionality) amounts in USD are now shown as in the JSON API version (previously you had to divide them by 10000). `bitcoin.outputs.type`, `ethereum.transaction.type`, and `ethereum.calls.type` now yield strings (e.g. `pubkeyhash` instead of `2`). * v.2.0.13 - Feb 13th - Added support for Cyrillic characters in fulltext search, e.g. `https://api.blockchair.com/bitcoin/outputs?q=script_bin(~привет)` @@ -74,6 +83,10 @@ ##### xpub support (since Mar 6th 2019) +* v.b3 - Apr 2nd + * Fixed a bug where unconfirmed balance didn't show up for xpubs + * Some optimizations to the address calculation process have been made, now response is generated 2.5-3x times faster + * Breaking change: paths for ypub, zpub (and possibly in the future for ltub, etc.) now all start with `https://api.blockchair.com/{chain}/dashboards/xpub/`, i.e. to use ypub functionality you'll need to use `https://api.blockchair.com/{chain}/dashboards/xpub/{ypub}` instead of `https://api.blockchair.com/{chain}/dashboards/ypub/{ypub}` * v.b2 - Mar 13th - We're bringing support for ypub and zpub as well (for Bitcoin and Litecoin). The endpoints are `https://api.blockchair.com/{chain}/dashboards/ypub/{ypub}` and `https://api.blockchair.com/{chain}/dashboards/zpub/{zpub}` (where `{chain}` is one of these: `bitcoin`, `litecoin`) * v.b1 - Mar 6th - There's now support for retrieving info about multiple addresses using xpub keys. Use `https://api.blockchair.com/{chain}/dashboards/xpub/{xpub}` (where `{chain}` is one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, e.g. `https://api.blockchair.com/bitcoin/dashboards/xpub/xpub6CUGRUonZSQ4TWtTMmzXdrXDtypWKiKrhko4egpiMZbpiaQL2jkwSB1icqYh2cfDfVxdx4df189oLKnC5fSwqPfgyP3hooxujYzAu3fDVmz`). The response contains following keys: * `xpub` - information about group of addresses, including its current balance (`xpub.balance`) @@ -82,6 +95,7 @@ ##### Data aggregation support (since Oct 8th 2018) +* v.b4 - Apr 2nd - Fixed a bug where some usd values under functions when exporting to TSV/CSV were multiplied by 10000. Use `&export=tsv` or `&export=csv` to export the dataset into the corresponding format, e.g.: `https://api.blockchair.com/bitcoin/transactions?a=date,avg(fee_usd)&q=time(2019-01-01..2019-04-01)&export=tsv` * v.b3 - Mar 6th * New function `price({ticker1}_{ticker2})` which shows the price if `date` (or one of: `week`, `month`, `year`) is also applied. E.g. it's now possible to build a chart showing correlation between price and transaction count: `https://api.blockchair.com/bitcoin/blocks?a=month,sum(transaction_count),price(btc_usd)`. Supported tickers: usd, btc, bch, bsv, eth, ltc, doge. * Output values now have correct types (e.g. `sum(transaction_count)` is now integer instead of string). From d6318c3de4f31fde731d96c7a0596297acd73061 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Wed, 17 Apr 2019 22:04:42 +0300 Subject: [PATCH 046/180] v.2.0.19 --- API_DOCUMENTATION_EN.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index 4d42d7db..c9c92012 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,4 +1,4 @@ -## [Blockchair.com](https://blockchair.com/) API v.2.0.18 Documentation +## [Blockchair.com](https://blockchair.com/) API v.2.0.19 Documentation ![Blockchair logo](https://blockchair.com/images/logo_full.png "Blockchair logo") @@ -35,6 +35,11 @@ ### Changelog +* v.2.0.19 - Apr 17th + * Added alpha support for Ripple (see `Ripple support` in the docs) + * Introducing Graph API for Ethereum (a possibility to find connections between two Ethereum addresses), see `Ethereum graph` in the docs) - it's in private alpha test mode + * If you're constantly hitting Error 402 (i.e. by making too many requests per minute to our free API), you'll now receive Error 429 which means that your IP is banned for an hour. Not honoring our limits may result in a permanent ban + * Fixed a couple of minor bugs in our Ethereum engine. We'll be rolling out an updated engine the next week, there shouldn't be any compatibility breaking changes * v.2.0.18 - Apr 2nd * Added biggest transactions over the last 24h to `https://api.blockchair.com/{chain}/stats` calls (`largest_transaction_24h` key); * Updated xpub support to v.b3 (see `xpub support` in the docs, there are some breaking changes); @@ -43,7 +48,7 @@ * Previously DEPRECATED API v.1 has been shut down * Previously DEPRECATED undocumented `?export=` functionality now requires an API key (apply at <`info@blockchair.com`>) for everything except: * Aggregated results - * `blocks` tables across all blockchains we support + * `blocks` and `mempool/*` tables across all blockchains we support * v.2.0.17 - Mar 14th - Added support for Bitcoin SV nodes, they are now separate from Bitcoin Cash nodes. Endpoint: `https://api.blockchair.com/bitcoin-sv/nodes`. * v.2.0.16 - Mar 13th - Added support for ypub and zpub for Bitcoin and Litecoin in test mode. See `xpub support` in the docs. * v.2.0.15 - Mar 12th - Added Dash support in test mode. We're supporting all the features for DASH as we support for other Satoshi-like coins. Additional columns: `blocks.cbtx`, `transactions.type` (possible types: `simple`, `proregtx`, `proupservtx`, `proupregtx`, `prouprevtx`, `cbtx`, `qctx`, `subtxregister`, `subtxtopup`, `subtxresetkey`, `subtxcloseaccount`), `transactions.is_instant_lock`, `transactions.is_special` (`true` for all transaction types except `simple`), `transactions.special_json` (contains special transaction data encoded in json). E.g.: `https://api.blockchair.com/dash/blocks` @@ -77,6 +82,14 @@ ### Tested features changelog +##### Ripple support (since Apr 17th 2019) + +* v.a1 - Apr 17th - Added alpha support for Ripple. We're not releasing the documentation for API yet, but we begin using it in our front end ourselves. If you're interested in participating in alpha test, drop us a line at <`info@blockchair.com`> + +##### Ethereum graph (since Apr 17th 2019) + +* v.a1 - Apr 17th - It's now possible to find connections between two Ethereum addresses using our API. Please note that since it's a resource consuming feature, it's available to our Private API users only (if you're interested in participating in alpha test, drop us a line at <`info@blockchair.com`>) + ##### Dash support (since Mar 12th 2019) * v.rc1 - Mar 12th - We're supporting all the features for DASH as we support for other Satoshi-like coins. Additional columns: `blocks.cbtx`, `transactions.type` (possible types: `simple`, `proregtx`, `proupservtx`, `proupregtx`, `prouprevtx`, `cbtx`, `qctx`, `subtxregister`, `subtxtopup`, `subtxresetkey`, `subtxcloseaccount`), `transactions.is_instant_lock`, `transactions.is_special` (`true` for all transaction types except `simple`), `transactions.special_json` (contains special transaction data encoded in json). From 8030c4ab9e9046eac49b2040264064ab1a6b4e22 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Wed, 17 Apr 2019 22:05:29 +0300 Subject: [PATCH 047/180] v.2.0.19 --- API.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/API.md b/API.md index 6a0f2770..025eaf7e 100644 --- a/API.md +++ b/API.md @@ -6,6 +6,11 @@ ### Changelog +* v.2.0.19 - Apr 17th + * Added alpha support for Ripple (see `Ripple support` in the docs) + * Introducing Graph API for Ethereum (a possibility to find connections between two Ethereum addresses), see `Ethereum graph` in the docs) - it's in private alpha test mode + * If you're constantly hitting Error 402 (i.e. by making too many requests per minute to our free API), you'll now receive Error 429 which means that your IP is banned for an hour. Not honoring our limits may result in a permanent ban + * Fixed a couple of minor bugs in our Ethereum engine. We'll be rolling out an updated engine the next week, there shouldn't be any compatibility breaking changes * v.2.0.18 - Apr 2nd * Added biggest transactions over the last 24h to `https://api.blockchair.com/{chain}/stats` calls (`largest_transaction_24h` key); * Updated xpub support to v.b3 (see `xpub support` in the docs, there are some breaking changes); From a8e490c71599d70f61aabed6b133ec7781b9cfea Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Fri, 19 Apr 2019 19:52:55 +0300 Subject: [PATCH 048/180] v.2.0.20 --- API_DOCUMENTATION_EN.md | 122 ++++++++++++++++++++++------------------ 1 file changed, 67 insertions(+), 55 deletions(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index c9c92012..1b2fb740 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,40 +1,40 @@ -## [Blockchair.com](https://blockchair.com/) API v.2.0.19 Documentation +## [Blockchair.com](https://blockchair.com/) API v.2.0.20 Documentation ![Blockchair logo](https://blockchair.com/images/logo_full.png "Blockchair logo") ### Table of contents -+ [Changelog](#changelog) - + [Tested features changelog](#tested-features-changelog) -+ [General Provisions](#general-provisions) -+ [Infinitable Calls (blockhain tables)](#infinitable-calls-blockhain-tables) -+ Bitcoin, Bitcoin Cash, Litecoin - + [Blocks](#bitcoin-cashlitecoinmempoolblocks) - + [Transaction](#bitcoin-cashlitecoinmempooltransactions) - + [Outputs](#bitcoin-cashlitecoinmempooloutputs) -+ Ethereum - + [Blocks](#ethereummempoolblocks) - + [Uncles](#ethereumuncles) - + [Transactions](#ethereummempooltransactions) - + [Calls](#ethereumcalls) -+ [Notes](#notes) -+ [Dashboard calls](#dashboard-calls) - + [Blocks](#bitcoin-cashlitecoinethereumdashboardsblocka-and-bitcoin-cashlitecoinethereumdashboardsblocksab) - + [Uncles (Ethereum)](#ethereumdashboardsunclea-and-ethereumdashboardsunclesab) - + [Transactions](#bitcoin-cashlitecoinethereumdashboardstransactiona-and-bitcoin-cashlitecoinethereumdashboardstransactionsab) - + [Unconfirmed transactions priority (in mempool)](#bitcoin-cashlitecoinethereumdashboardstransactionhashpriority) - + [Address (Bitcoin, Bitcoin Cash, Litecoin)](#bitcoin-cashlitecoindashboardsaddressa) - + [Address (Ethereum)](#ethereumdashboardsaddressa) - + [Stats](#bitcoin-cashlitecoinethereumstats) - + [General stats](#stats) -+ [API request example](#api-request-examples) -+ [Broadcasting transactions](#broadcasting-transactions) -+ [Retrieving raw transactions](#retrieving-raw-transactions) -+ [Support](#support) - - -### Changelog - ++ [Changelog](#link_changelog) + + [Tested features changelog](#link_testedfeatureschangelog) ++ [General Provisions](#link_generalprovisions) ++ [Dashboard calls](#link_dashboardcalls) (Retrieve information about various Bitcoin, Ethereum, Bitcoin Cash, Litecoin, Dash, Bitcoin SV, Dogecoin entities) + + [Block](#link_block) + + [Uncle](#link_uncle) (Ethereum only) + + [Transaction](#link_transaction) + + [Address](#link_bitcoinaddress) + + [Stats](#link_chainstats) + + [General stats](#link_stats) ++ [Infinitable Calls (blockhain tables)](#link_infinitablecalls) (Filter and sort blockchain data) + + Bitcoin, Bitcoin Cash, Litecoin, Dash, Bitcoin SV, Dogecoin: + + [Blocks](#link_bitcoinblocks) + + [Transaction](#link_bitcointransactions) + + [Outputs](#link_bitcoinoutputs) + + Ethereum: + + [Blocks](#link_ethereumblocks) + + [Uncles](#link_ethereumuncles) + + [Transactions](#link_ethereumtransactions) + + [Calls](#link_ethereumcalls) ++ Misc + + [API request example](#link_examples) + + [Broadcasting transactions](#link_broadcasting) + + [Retrieving raw transactions](#link_raw) + + [State changes](#link_state) + + [Support](#link_support) + +### Changelog + +* v.2.0.20 - Apr 19th + * Now it's possible to query state changes caused by a block for all chains we support except for ETH. The endpoint is `https://api.blockchair.com/{:chain}/state/changes/block/{:block_id)`. The response contains an array where the keys are addresses which were affected by the block, and the values are balance changes. Example: `https://api.blockchair.com/bitcoin/state/changes/block/1` returns `12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX => 5000000000` which means that the only state change caused by a block was rewarding the miner with 50 bitcoins. This is useful if you need to track balance changes for a lot of addresses - you can now simply track state changes and find the needed addresses there instead of constantly retrieving information about the balances. * v.2.0.19 - Apr 17th * Added alpha support for Ripple (see `Ripple support` in the docs) * Introducing Graph API for Ethereum (a possibility to find connections between two Ethereum addresses), see `Ethereum graph` in the docs) - it's in private alpha test mode @@ -80,7 +80,7 @@ * v.2.0.2 - Sep 9th - Added `address.contract_created` to the `ethereum/dashboards/address/{A}` call * v.2.0.1 - Sep 1st 2018 - Added Litecoin support -### Tested features changelog +### Tested features changelog ##### Ripple support (since Apr 17th 2019) @@ -157,7 +157,7 @@ Possible fields: * v.a1 - Sep 18th - Added alpha support for Omni Layer in Bitcoin (`bitcoin/omni/properties`, `bitcoin/omni/dashboards/property/{id}` calls, plus `_omni` key in the `bitcoin/dashboards/transaction` call and `_omni` key in the `bitcoin/dashboards/address` call), and support for Wormhole in Bitcoin Cash (`bitcoin-cash/wormhole/properties`, `bitcoin-cash/wormhole/dashboards/property/{id}` calls, plus `_wormhole` key in the `bitcoin-cash/dashboards/transaction` call and `_wormhole` key in the `bitcoin-cash/dashboards/address` call). Please don't use this in production yet, there will be massive changes! -### General Provisions +### General Provisions * Requests to our server should be made through the HTTPS protocol by GET requests to the domain `api.blockchair.com` @@ -193,7 +193,7 @@ Note: it makes sense to check `context.api.version` and, if `context.api.next_ma * Disclaimer: we do not guarantee the reliability or integrity of the provided information. Information provided by our API should not be used for making critical decisions. We do not guarantee an uptime for our free API. -#### Infinitable Calls (blockhain tables) +#### Infinitable Calls (blockhain tables) Return data from the tables according to the filters (`q`), sorting (`s`), limit (`limit`), and offset (`offset`). @@ -255,7 +255,7 @@ If you need to apply several sorts, you can list them by commas, similar to filt **Offset** can be used as a paginator, e.g., `?offset=10` returns the next 10 results. `context.offset` takes the value of the set `OFFSET`. The maximum value is 10000. If you need just the last page, it's easier and quicker to change the direction of the sorting to the opposite. Important: when iterating through the results, it is extremely likely that the number of rows in the database will increase because new blocks were found. To avoid that, you may add an additional condition that limits the block id to the value obtained in `context.state` in the first query. -#### bitcoin/blocks, bitcoin-cash/blocks, bitcoin-sv/blocks, litecoin/blocks, dogecoin/blocks +#### bitcoin/blocks, bitcoin-cash/blocks, bitcoin-sv/blocks, litecoin/blocks, dogecoin/blocks E.g. `https://api.blockchair.com/bitcoin/blocks` @@ -317,7 +317,7 @@ Notes: - (\*\*) - only for Dogecoin - the default sorting - id DESC -#### bitcoin/transactions, bitcoin/mempool/transactions, bitcoin-cash/transactions, bitcoin-cash/mempool/transactions, litecoin/transactions, litecoin/mempool/transactions, dogecoin/transactions, dogecoin/mempool/transactions +#### bitcoin/transactions, bitcoin/mempool/transactions, bitcoin-cash/transactions, bitcoin-cash/mempool/transactions, litecoin/transactions, litecoin/mempool/transactions, dogecoin/transactions, dogecoin/mempool/transactions E.g. `https://api.blockchair.com/dogecoin/mempool/transactions` @@ -357,7 +357,7 @@ Notes: - the default sort is id DESC - `block_id` for mempool transactions is `-1` -#### bitcoin/outputs, bitcoin/mempool/outputs, bitcoin-cash/outputs, bitcoin-cash/mempool/outputs, litecoin/outputs, litecoin/mempool/outputs, dogecoin/outputs, dogecoin/mempool/outputs +#### bitcoin/outputs, bitcoin/mempool/outputs, bitcoin-cash/outputs, bitcoin-cash/mempool/outputs, litecoin/outputs, litecoin/mempool/outputs, dogecoin/outputs, dogecoin/mempool/outputs E.g. `https://api.blockchair.com/litecoin/mempool/outputs` @@ -405,7 +405,7 @@ Notes: - (\*) - only for Bitcoin and Litecoin (SegWit data) - the default sort is - transaction_id DESC -#### ethereum/blocks, ethereum/mempool/blocks +#### ethereum/blocks, ethereum/mempool/blocks Returns block data (`mempool` contains the latest 6 blocks) @@ -462,7 +462,7 @@ Notes: - the difference between `value_total` and `internal_value_total`: e.g., a transaction itself sends 0 eth, but this transaction is a call of a contract that sends someone, let's say, 10 eth. Then `value` will be 0 eth, and `internal_value` - 10 eth - the default sort is id DESC -#### ethereum/uncles +#### ethereum/uncles Returns information about uncles @@ -504,7 +504,7 @@ Notes: - the search over `extra_data_hex` column can be done by the operator `^`, you can also use `~` for `extra_data_bin` (however, the field `extra_data_bin` will still not be shown) - sort by default - parent_block_id DESC -#### ethereum/transactions, ethereum/mempool/transactions +#### ethereum/transactions, ethereum/mempool/transactions Returns transaction information @@ -560,7 +560,7 @@ Notes: * create_tree - create a new contract that create contracts or starts making calls * synthetic_coinbase - a synthetic transaction for awarding a reward to the miner (block or uncle) -#### ethereum/calls +#### ethereum/calls Returns information about internal calls @@ -601,11 +601,11 @@ Notes: - `date` and` time` indicate the time when the transaction was received by our node - when using `offset`, it is reasonable to add to the filters the maximum block number (`?q=block_id(..N)`), since it is very likely that during the iteration new rows will be added to the table. For convenience, you can take the value of `context.state` from the first result of any query containing the number of the latest block at the query time and use this result later on. -### Dashboard calls +### Dashboard calls The API supports a number of calls that produce some aggregated data, or data in a more convenient form for certain entities. -#### {chain}/dashboards/block/{A} and {chain}/dashboards/blocks/{A[,B,...]} +#### {chain}/dashboards/block/{A} and {chain}/dashboards/blocks/{A[,B,...]} `{chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `bitcoin-sv`, `litecoin`, `dogecoin`, `ethereum` @@ -617,14 +617,14 @@ As the input data (`{A}`), it takes the height or hash of the block(s). `data` r `context.results` contains the number of found blocks. -#### ethereum/dashboards/uncle/{A} and ethereum/dashboards/uncles/{A[,B,...]} +#### ethereum/dashboards/uncle/{A} and ethereum/dashboards/uncles/{A[,B,...]} As the input data (`{A}`), it takes an uncle hash(es). `data` returns an array with uncle hashes used as keys, and arrays of elements as values: * `uncle` - information about the block in infinitable-format `ethereum/uncles` `context.results` contains the number of found uncles. -#### {chain}/dashboards/transaction/{A} and {chain}/dashboards/transactions/{A[,B,...]} +#### {chain}/dashboards/transaction/{A} and {chain}/dashboards/transactions/{A[,B,...]} `{chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `bitcoin-sv`, `litecoin`, `dogecoin`, `ethereum` @@ -636,13 +636,13 @@ At the input data, it takes an internal blockchair-id or a hash of a transaction `context.results` contains the number of found transactions. -#### {chain}/dashboards/transaction/{hash}/priority +#### {chain}/dashboards/transaction/{hash}/priority `{chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `bitcoin-sv`, `litecoin`, `dogecoin`, `ethereum` For mempool transactions shows priority (`position`) (for Bitcoin - by `fee_per_kwu`, for Bitcoin Cash - by `fee_per_kb`, for Ethereum - by `gas_price`) over other transactions (`out_of` mempool transactions). It has the same structure as the `(bitcoin[-cash]|ethereum)/dashboards/transaction/{A}` call -#### {chain}/dashboards/address/{A} +#### {chain}/dashboards/address/{A} `{chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `bitcoin-sv`, `litecoin`, `dogecoin` @@ -669,7 +669,7 @@ Uses address as the input data. `data` returns an array with one element (if the To iterate `transactions`, `?offset=N` is supported. -#### ethereum/dashboards/address/{A} +#### ethereum/dashboards/address/{A} Uses address as the input data. `data` returns an array with one element (if the address is found), in that case the address is the key, and the value is an array consisting of the following elements: * `address` @@ -703,7 +703,7 @@ Notes: - (\*) - in these columns, the value in wei can be rounded. For a million of calls, the error can be more than 1 ether. - (\*\*) - counted only those calls that fit the following condition: ethereum/calls.transferred = true (see the `ethereum/calls` documentation), i.e. those calls as well as failed calls that do not change state (staticcall, etc.) are not considered -#### {chain}/stats +#### {chain}/stats `{chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `bitcoin-sv`, `litecoin`, `dogecoin`, `ethereum` @@ -736,7 +736,7 @@ Returns an array with blockchain statistics: * `market_dominance_percentage` - dominance index (how much % of the total cryptocurrency market is the market capitalization of the coin) ... there's also some other self-explanatory keys -#### stats +#### stats https://api.blockchair.com/stats @@ -748,7 +748,7 @@ Returns data on six calls: * `bitcoin-sv/stats` * `dogecoin/stats` -### API request examples +### 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: * `https://api.blockchair.com/ethereum/transactions?q=internal_value_usd(10000000..)&s=id(desc)` @@ -763,7 +763,7 @@ From its result we save `context.state`, put it in a variable `_S_`, and further Increase offset value until getting a data set with the transaction that we already knew about. -### Broadcasting transactions +### 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`, or `litecoin`) with `data` holding hex represenatation of a transaction (for Ethereum it should start with `0x`). An example: @@ -779,7 +779,7 @@ Example of a successful response: {"data":{"transaction_hash": "0e3e2357e806b6cdb1f70b54c3a3a17b6714ee1f0e68bebb44a74b1efd512098…"},"context":{"code":200,… ``` -### Retrieving raw transactions +### 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 these: `bitcoin`, `bitcoin-cash`, `bitcoin-sv`, `litecoin`, `dogecoin`, `ethereum`) @@ -787,7 +787,19 @@ 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 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 +### State changes + +It's possible to query state changes caused by a block for all chains we support except for ETH. + +The endpoint is `https://api.blockchair.com/{:chain}/state/changes/block/{:block_id)`. + +The response contains an array where the keys are addresses which were affected by the block, and the values are balance changes. + +Example: `https://api.blockchair.com/bitcoin/state/changes/block/1` returns `12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX => 5000000000` which means that the only state change caused by a block was rewarding the miner with 50 bitcoins. + +This is useful if you need to track balance changes for a lot of addresses - you can now simply track state changes and find the needed addresses there instead of constantly retrieving information about the balances. + +### Support * E-mail: [info@blockchair.com](mailto:info@blockchair.com) * Telegram chat: [@Blockchair](https://telegram.me/Blockchair) From 50cc4d4f5f8032b86b906ba8bfad42a5513744ac Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Fri, 19 Apr 2019 19:54:39 +0300 Subject: [PATCH 049/180] v.2.0.20 --- API.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/API.md b/API.md index 025eaf7e..2c757ce4 100644 --- a/API.md +++ b/API.md @@ -6,6 +6,8 @@ ### Changelog +* v.2.0.20 - Apr 19th + * Now it's possible to query state changes caused by a block for all chains we support except for ETH. The endpoint is `https://api.blockchair.com/{:chain}/state/changes/block/{:block_id)`. The response contains an array where the keys are addresses which were affected by the block, and the values are balance changes. Example: `https://api.blockchair.com/bitcoin/state/changes/block/1` returns `12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX => 5000000000` which means that the only state change caused by a block was rewarding the miner with 50 bitcoins. This is useful if you need to track balance changes for a lot of addresses - you can now simply track state changes and find the needed addresses there instead of constantly retrieving information about the balances. * v.2.0.19 - Apr 17th * Added alpha support for Ripple (see `Ripple support` in the docs) * Introducing Graph API for Ethereum (a possibility to find connections between two Ethereum addresses), see `Ethereum graph` in the docs) - it's in private alpha test mode From d17406f9e63caa99e0a714ccbb7ebdbd6f56d43a Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Fri, 19 Apr 2019 20:01:17 +0300 Subject: [PATCH 050/180] v.2.0.20 --- API.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/API.md b/API.md index 2c757ce4..df2674cf 100644 --- a/API.md +++ b/API.md @@ -7,7 +7,7 @@ ### Changelog * v.2.0.20 - Apr 19th - * Now it's possible to query state changes caused by a block for all chains we support except for ETH. The endpoint is `https://api.blockchair.com/{:chain}/state/changes/block/{:block_id)`. The response contains an array where the keys are addresses which were affected by the block, and the values are balance changes. Example: `https://api.blockchair.com/bitcoin/state/changes/block/1` returns `12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX => 5000000000` which means that the only state change caused by a block was rewarding the miner with 50 bitcoins. This is useful if you need to track balance changes for a lot of addresses - you can now simply track state changes and find the needed addresses there instead of constantly retrieving information about the balances. + * Now it's possible to query state changes caused by a block for all chains we support except for ETH. The endpoint is `https://api.blockchair.com/{:chain}/state/changes/block/{:block_id)`. The response contains an array where the keys are addresses which were affected by the block, and the values are balance changes. Example: `https://api.blockchair.com/bitcoin/state/changes/block/1` returns `12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX => 5000000000` which means that the only state change caused by this block was rewarding the miner with 50 bitcoins. This is useful if you need to track balance changes for a lot of addresses - you can now simply track state changes and find the needed addresses there instead of constantly retrieving information about the balances. * v.2.0.19 - Apr 17th * Added alpha support for Ripple (see `Ripple support` in the docs) * Introducing Graph API for Ethereum (a possibility to find connections between two Ethereum addresses), see `Ethereum graph` in the docs) - it's in private alpha test mode From ec213aeb41a1bad3764f92998f2d13944febfe61 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Mon, 22 Apr 2019 18:32:50 +0300 Subject: [PATCH 051/180] v.2.0.21 --- API_DOCUMENTATION_EN.md | 63 ++++++++++++++++++++++++++--------------- 1 file changed, 40 insertions(+), 23 deletions(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index 1b2fb740..48489655 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,4 +1,4 @@ -## [Blockchair.com](https://blockchair.com/) API v.2.0.20 Documentation +## [Blockchair.com](https://blockchair.com/) API v.2.0.21 Documentation ![Blockchair logo](https://blockchair.com/images/logo_full.png "Blockchair logo") @@ -33,14 +33,16 @@ ### Changelog -* v.2.0.20 - Apr 19th - * Now it's possible to query state changes caused by a block for all chains we support except for ETH. The endpoint is `https://api.blockchair.com/{:chain}/state/changes/block/{:block_id)`. The response contains an array where the keys are addresses which were affected by the block, and the values are balance changes. Example: `https://api.blockchair.com/bitcoin/state/changes/block/1` returns `12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX => 5000000000` which means that the only state change caused by a block was rewarding the miner with 50 bitcoins. This is useful if you need to track balance changes for a lot of addresses - you can now simply track state changes and find the needed addresses there instead of constantly retrieving information about the balances. -* v.2.0.19 - Apr 17th +* v.2.0.21 - Apr 22nd, 2019 + * We've added an ability to query multiple addresses at once. The endpoint is `https://api.blockchair.com/{:chain}/dashboards/addresses/{:addr1},{:addr2},...` (supported for BTC, BCH, LTC, DASH, BSV, and DOGE). E.g., now, if you need to retrieve information about 3 different addresses, you wouldn't need to make 3 separate queries, you'd need to query just `https://api.blockchair.com/bitcoin/dashboards/addresses/1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa,12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX,1HLoD9E4SDFFPDiYfNYnkBLQ85Y51J3Zb1`. The response contains information on the set of addresses (total balance, total transaction count, etc.), information about each address, and the list of the latest 100 transactions for this set (iterable with `&offset=N`). The maximum number of addresses in one query is 100 (higher limits are available for our premium users). Querying multiple addresses at once works much faster (e.g. it's almost 95 times faster to query 100 addresses via the new endpoint compared to making separate requests). +* v.2.0.20 - Apr 19th, 2019 + * Now it's possible to query state changes caused by a block for all chains we support except for ETH. The endpoint is `https://api.blockchair.com/{:chain}/state/changes/block/{:block_id)`. The response contains an array where the keys are addresses which were affected by the block, and the values are balance changes. Example: `https://api.blockchair.com/bitcoin/state/changes/block/1` returns `12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX => 5000000000` which means that the only state change caused by this block was rewarding the miner with 50 bitcoins. This is useful if you need to track balance changes for a lot of addresses - you can now simply track state changes and find the needed addresses there instead of constantly retrieving information about the balances. +* v.2.0.19 - Apr 17th, 2019 * Added alpha support for Ripple (see `Ripple support` in the docs) * Introducing Graph API for Ethereum (a possibility to find connections between two Ethereum addresses), see `Ethereum graph` in the docs) - it's in private alpha test mode * If you're constantly hitting Error 402 (i.e. by making too many requests per minute to our free API), you'll now receive Error 429 which means that your IP is banned for an hour. Not honoring our limits may result in a permanent ban * Fixed a couple of minor bugs in our Ethereum engine. We'll be rolling out an updated engine the next week, there shouldn't be any compatibility breaking changes -* v.2.0.18 - Apr 2nd +* v.2.0.18 - Apr 2nd, 2019 * Added biggest transactions over the last 24h to `https://api.blockchair.com/{chain}/stats` calls (`largest_transaction_24h` key); * Updated xpub support to v.b3 (see `xpub support` in the docs, there are some breaking changes); * Updated aggregation support to v.b4 (see `Data aggregation support` in the docs) @@ -49,19 +51,24 @@ * Previously DEPRECATED undocumented `?export=` functionality now requires an API key (apply at <`info@blockchair.com`>) for everything except: * Aggregated results * `blocks` and `mempool/*` tables across all blockchains we support -* v.2.0.17 - Mar 14th - Added support for Bitcoin SV nodes, they are now separate from Bitcoin Cash nodes. Endpoint: `https://api.blockchair.com/bitcoin-sv/nodes`. -* v.2.0.16 - Mar 13th - Added support for ypub and zpub for Bitcoin and Litecoin in test mode. See `xpub support` in the docs. -* v.2.0.15 - Mar 12th - Added Dash support in test mode. We're supporting all the features for DASH as we support for other Satoshi-like coins. Additional columns: `blocks.cbtx`, `transactions.type` (possible types: `simple`, `proregtx`, `proupservtx`, `proupregtx`, `prouprevtx`, `cbtx`, `qctx`, `subtxregister`, `subtxtopup`, `subtxresetkey`, `subtxcloseaccount`), `transactions.is_instant_lock`, `transactions.is_special` (`true` for all transaction types except `simple`), `transactions.special_json` (contains special transaction data encoded in json). E.g.: `https://api.blockchair.com/dash/blocks` -* v.2.0.14 - Mar 6th +* v.2.0.17 - Mar 14th, 2019 + * Added support for Bitcoin SV nodes, they are now separate from Bitcoin Cash nodes. Endpoint: `https://api.blockchair.com/bitcoin-sv/nodes`. +* v.2.0.16 - Mar 13th, 2019 + * Added support for ypub and zpub for Bitcoin and Litecoin in test mode. See `xpub support` in the docs. +* v.2.0.15 - Mar 12th, 2019 + * Added Dash support in test mode. We're supporting all the features for DASH as we support for other Satoshi-like coins. Additional columns: `blocks.cbtx`, `transactions.type` (possible types: `simple`, `proregtx`, `proupservtx`, `proupregtx`, `prouprevtx`, `cbtx`, `qctx`, `subtxregister`, `subtxtopup`, `subtxresetkey`, `subtxcloseaccount`), `transactions.is_instant_lock`, `transactions.is_special` (`true` for all transaction types except `simple`), `transactions.special_json` (contains special transaction data encoded in json). E.g.: `https://api.blockchair.com/dash/blocks` +* v.2.0.14 - Mar 6th, 2019 * Added xpub support in test mode. There's now support for retrieving info about multiple addresses using xpub keys. Use `https://api.blockchair.com/{chain}/dashboards/xpub/{xpub}`. See `xpub support` in the docs. * Extended data aggregation abilities (still in test mode), see `Data aggregation support` in the docs. Now it's possbile to find correlations with price, and use special functions (e.g. to calculate SegWit adoption). * We're **DEPRECATING** API v.1 and will be shutting it down on April 1st, 2019. * We're **DEPRECATING** undocumented `?export=` functionality when exporting large datasets without an API key. This feature will be documented in one of the next updates. * Full support for `CREATE2` in Ethereum (see `https://blockchair.com/ethereum/calls?q=type(create2)#`) * When using CSV/TSV API (undocumented `?export=` functionality) amounts in USD are now shown as in the JSON API version (previously you had to divide them by 10000). `bitcoin.outputs.type`, `ethereum.transaction.type`, and `ethereum.calls.type` now yield strings (e.g. `pubkeyhash` instead of `2`). -* v.2.0.13 - Feb 13th - Added support for Cyrillic characters in fulltext search, e.g. `https://api.blockchair.com/bitcoin/outputs?q=script_bin(~привет)` -* v.2.0.12 - Feb 12th - Fixed a bug in Ethereum where some contract creations were erroneously shown as failed (thanks Daniel Luca for noticing) -* v.2.0.11 - Feb 5th +* v.2.0.13 - Feb 13th, 2019 + * Added support for Cyrillic characters in fulltext search, e.g. `https://api.blockchair.com/bitcoin/outputs?q=script_bin(~привет)` +* v.2.0.12 - Feb 12th, 2019 + * Fixed a bug in Ethereum where some contract creations were erroneously shown as failed (thanks Daniel Luca for noticing) +* v.2.0.11 - Feb 5th, 2019 * We're changing behavior of our `mempool` tables (for all supported coins except for Ethereum): now they don't contain the contents of the latest block (it was quite a clumsy thing to have both mempool transactions and transactions from the latest block in this table, but we've rebuilt our engine, so now `mempool` tables contain mempool content only, and it finally makes sense!). That means: * `{chain}/mempool/blocks` is deprecated. Hint: if you used `mempool/blocks` to get info about the latest block you can simply switch to using `blocks?limit=1`, e.g. `https://api.blockchair.com/bitcoin/blocks?limit=1` * `{chain}/mempool/transactions` and `{chain}/mempool/outputs` now don't contain info from the latest block, while `{chain}/transactions` and `{chain}/outputs` do @@ -69,16 +76,26 @@ * The same change to Ethereum will come in one of the next updates * Dogecoin is out of beta. * Bitcoin SV is out of beta. Please note there's still a possibility that we won't be able to offer some functionality in the long term if blocks suddenly become larger than 1 exabyte, we're still waiting for a more clear development roadmap. -* v.2.0.10 - Jan 29th 2019 - Added Dogecoin support in test mode -* v.2.0.9 - Dec 13th - Added Bitcoin SV support in test mode; updated [aggregation abilities](#data-aggregation-support-since-oct-8th) -* v.2.0.8 - Nov 26th - Added the ability to retrieve raw transaction data in hex, see [Retrieving raw transactions](#retrieving-raw-transactions) -* v.2.0.7 - Nov 22th - Now it's possible to broadcast transactions using our API, see [Broadcasting transactions](#broadcasting-transactions) -* v.2.0.6 - Oct 8th - Added data aggregation of blockchain data in beta mode, see `Data aggregation support` below -* v.2.0.5 - Oct 8th - Fixed bug where `balance` and `received` for bitcoin[-cash]|litecoin addresses in the `{chain}/dashboards/address/{address}` call were calculated wrong if there were specific unconfirmed transactions -* v.2.0.4 - Oct 3rd - Added some new useful fields to `{chain}/stats` calls -* v.2.0.3 - Sep 18th - Added `context.api.tested_features` with the list of features our API supports, but with no guarantee for backward compatibility if updated. Added Omni Layer and Wormhole support in testing mode (see the "Tested features changelog" below) -* v.2.0.2 - Sep 9th - Added `address.contract_created` to the `ethereum/dashboards/address/{A}` call -* v.2.0.1 - Sep 1st 2018 - Added Litecoin support +* v.2.0.10 - Jan 29th, 2019 + * Added Dogecoin support in test mode +* v.2.0.9 - Dec 13th, 2018 + * Added Bitcoin SV support in test mode; updated [aggregation abilities](#data-aggregation-support-since-oct-8th) +* v.2.0.8 - Nov 26th, 2018 + * Added the ability to retrieve raw transaction data in hex, see [Retrieving raw transactions](#retrieving-raw-transactions) +* v.2.0.7 - Nov 22th, 2018 + * Now it's possible to broadcast transactions using our API, see [Broadcasting transactions](#broadcasting-transactions) +* v.2.0.6 - Oct 8th, 2018 + * Added data aggregation of blockchain data in beta mode, see `Data aggregation support` below +* v.2.0.5 - Oct 8th, 2018 + * Fixed bug where `balance` and `received` for bitcoin[-cash]|litecoin addresses in the `{chain}/dashboards/address/{address}` call were calculated wrong if there were specific unconfirmed transactions +* v.2.0.4 - Oct 3rd, 2018 + * Added some new useful fields to `{chain}/stats` calls +* v.2.0.3 - Sep 18th, 2018 + * Added `context.api.tested_features` with the list of features our API supports, but with no guarantee for backward compatibility if updated. Added Omni Layer and Wormhole support in testing mode (see the "Tested features changelog" below) +* v.2.0.2 - Sep 9th, 2018 + * Added `address.contract_created` to the `ethereum/dashboards/address/{A}` call +* v.2.0.1 - Sep 1st, 2018 + * Added Litecoin support ### Tested features changelog @@ -795,7 +812,7 @@ The endpoint is `https://api.blockchair.com/{:chain}/state/changes/block/{:block The response contains an array where the keys are addresses which were affected by the block, and the values are balance changes. -Example: `https://api.blockchair.com/bitcoin/state/changes/block/1` returns `12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX => 5000000000` which means that the only state change caused by a block was rewarding the miner with 50 bitcoins. +Example: `https://api.blockchair.com/bitcoin/state/changes/block/1` returns `12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX => 5000000000` which means that the only state change caused by this block was rewarding the miner with 50 bitcoins. This is useful if you need to track balance changes for a lot of addresses - you can now simply track state changes and find the needed addresses there instead of constantly retrieving information about the balances. From bc711bc52a12f8cd4dd2d97cbdf8853d379a024f Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Mon, 22 Apr 2019 18:35:55 +0300 Subject: [PATCH 052/180] v.2.0.21 --- API.md | 60 ++++++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 39 insertions(+), 21 deletions(-) diff --git a/API.md b/API.md index df2674cf..ff4ef01c 100644 --- a/API.md +++ b/API.md @@ -6,14 +6,16 @@ ### Changelog -* v.2.0.20 - Apr 19th +* v.2.0.21 - Apr 22nd, 2019 + * We've added an ability to query multiple addresses at once. The endpoint is `https://api.blockchair.com/{:chain}/dashboards/addresses/{:addr1},{:addr2},...` (supported for BTC, BCH, LTC, DASH, BSV, and DOGE). E.g., now, if you need to retrieve information about 3 different addresses, you wouldn't need to make 3 separate queries, you'd need to query just `https://api.blockchair.com/bitcoin/dashboards/addresses/1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa,12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX,1HLoD9E4SDFFPDiYfNYnkBLQ85Y51J3Zb1`. The response contains information on the set of addresses (total balance, total transaction count, etc.), information about each address, and the list of the latest 100 transactions for this set (iterable with `&offset=N`). The maximum number of addresses in one query is 100 (higher limits are available for our premium users). Querying multiple addresses at once works much faster (e.g. it's almost 95 times faster to query 100 addresses via the new endpoint compared to making separate requests). +* v.2.0.20 - Apr 19th, 2019 * Now it's possible to query state changes caused by a block for all chains we support except for ETH. The endpoint is `https://api.blockchair.com/{:chain}/state/changes/block/{:block_id)`. The response contains an array where the keys are addresses which were affected by the block, and the values are balance changes. Example: `https://api.blockchair.com/bitcoin/state/changes/block/1` returns `12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX => 5000000000` which means that the only state change caused by this block was rewarding the miner with 50 bitcoins. This is useful if you need to track balance changes for a lot of addresses - you can now simply track state changes and find the needed addresses there instead of constantly retrieving information about the balances. -* v.2.0.19 - Apr 17th +* v.2.0.19 - Apr 17th, 2019 * Added alpha support for Ripple (see `Ripple support` in the docs) * Introducing Graph API for Ethereum (a possibility to find connections between two Ethereum addresses), see `Ethereum graph` in the docs) - it's in private alpha test mode * If you're constantly hitting Error 402 (i.e. by making too many requests per minute to our free API), you'll now receive Error 429 which means that your IP is banned for an hour. Not honoring our limits may result in a permanent ban * Fixed a couple of minor bugs in our Ethereum engine. We'll be rolling out an updated engine the next week, there shouldn't be any compatibility breaking changes -* v.2.0.18 - Apr 2nd +* v.2.0.18 - Apr 2nd, 2019 * Added biggest transactions over the last 24h to `https://api.blockchair.com/{chain}/stats` calls (`largest_transaction_24h` key); * Updated xpub support to v.b3 (see `xpub support` in the docs, there are some breaking changes); * Updated aggregation support to v.b4 (see `Data aggregation support` in the docs) @@ -22,19 +24,24 @@ * Previously DEPRECATED undocumented `?export=` functionality now requires an API key (apply at <`info@blockchair.com`>) for everything except: * Aggregated results * `blocks` tables across all blockchains we support -* v.2.0.17 - Mar 14th - Added support for Bitcoin SV nodes, they are now separate from Bitcoin Cash nodes. Endpoint: `https://api.blockchair.com/bitcoin-sv/nodes`. -* v.2.0.16 - Mar 13th - Added support for ypub and zpub for Bitcoin and Litecoin in test mode. See `xpub support` in the docs. -* v.2.0.15 - Mar 12th - Added Dash support in test mode. We're supporting all the features for DASH as we support for other Satoshi-like coins. Additional columns: `blocks.cbtx`, `transactions.type` (possible types: `simple`, `proregtx`, `proupservtx`, `proupregtx`, `prouprevtx`, `cbtx`, `qctx`, `subtxregister`, `subtxtopup`, `subtxresetkey`, `subtxcloseaccount`), `transactions.is_instant_lock`, `transactions.is_special` (`true` for all transaction types except `simple`), `transactions.special_json` (contains special transaction data encoded in json). E.g.: `https://api.blockchair.com/dash/blocks` -* v.2.0.14 - Mar 6th +* v.2.0.17 - Mar 14th, 2019 + * Added support for Bitcoin SV nodes, they are now separate from Bitcoin Cash nodes. Endpoint: `https://api.blockchair.com/bitcoin-sv/nodes`. +* v.2.0.16 - Mar 13th, 2019 + * Added support for ypub and zpub for Bitcoin and Litecoin in test mode. See `xpub support` in the docs. +* v.2.0.15 - Mar 12th, 2019 + * Added Dash support in test mode. We're supporting all the features for DASH as we support for other Satoshi-like coins. Additional columns: `blocks.cbtx`, `transactions.type` (possible types: `simple`, `proregtx`, `proupservtx`, `proupregtx`, `prouprevtx`, `cbtx`, `qctx`, `subtxregister`, `subtxtopup`, `subtxresetkey`, `subtxcloseaccount`), `transactions.is_instant_lock`, `transactions.is_special` (`true` for all transaction types except `simple`), `transactions.special_json` (contains special transaction data encoded in json). E.g.: `https://api.blockchair.com/dash/blocks` +* v.2.0.14 - Mar 6th, 2019 * Added xpub support in test mode. There's now support for retrieving info about multiple addresses using xpub keys. Use `https://api.blockchair.com/{chain}/dashboards/xpub/{xpub}`. See `xpub support` in the docs. * Extended data aggregation abilities (still in test mode), see `Data aggregation support` in the docs. Now it's possbile to find correlations with price, and use special functions (e.g. to calculate SegWit adoption). * We're DEPRECATING API v.1 and will be shutting it down on April 1st, 2019. * We're DEPRECATING undocumented `?export=` functionality when exporting large datasets without an API key. This feature will be documented in one of the next updates. * Full support for `CREATE2` in Ethereum (see `https://blockchair.com/ethereum/calls?q=type(create2)#`) * When using CSV/TSV API (undocumented `?export=` functionality) amounts in USD are now shown as in the JSON API version (previously you had to divide them by 10000). `bitcoin.outputs.type`, `ethereum.transaction.type`, and `ethereum.calls.type` now yield strings (e.g. `pubkeyhash` instead of `2`). -* v.2.0.13 - Feb 13th - Added support for Cyrillic characters in fulltext search, e.g. `https://api.blockchair.com/bitcoin/outputs?q=script_bin(~привет)` -* v.2.0.12 - Feb 12th - Fixed a bug in Ethereum where some contract creations were erroneously shown as failed (thanks Daniel Luca for noticing) -* v.2.0.11 - Feb 5th +* v.2.0.13 - Feb 13th, 2019 + * Added support for Cyrillic characters in fulltext search, e.g. `https://api.blockchair.com/bitcoin/outputs?q=script_bin(~привет)` +* v.2.0.12 - Feb 12th, 2019 + * Fixed a bug in Ethereum where some contract creations were erroneously shown as failed (thanks Daniel Luca for noticing) +* v.2.0.11 - Feb 5th, 2019 * We're changing behavior of our `mempool` tables (for all supported coins except for Ethereum): now they don't contain the contents of the latest block (it was quite a clumsy thing to have both mempool transactions and transactions from the latest block in this table, but we've rebuilt our engine, so now `mempool` tables contain mempool content only, and it finally makes sense!). That means: * `{chain}/mempool/blocks` is deprecated. Hint: if you used `mempool/blocks` to get info about the latest block you can simply switch to using `blocks?limit=1`, e.g. `https://api.blockchair.com/bitcoin/blocks?limit=1` * `{chain}/mempool/transactions` and `{chain}/mempool/outputs` now don't contain info from the latest block, while `{chain}/transactions` and `{chain}/outputs` do @@ -42,17 +49,28 @@ * The same change to Ethereum will come in one of the next updates * Dogecoin is out of beta. * Bitcoin SV is out of beta. Please note there's still a possibility that we won't be able to offer some functionality in the long term if blocks suddenly become larger than 1 exabyte, we're still waiting for a more clear development roadmap. -* v.2.0.10 - Jan 29th, 2019 - Added Dogecoin support in test mode (see `Dogecoin support` in the docs) -* v.2.0.9 - Dec 13th - Added Bitcoin SV support in test mode (see `Bitcoin SV support` in the docs); updated aggregation abilities (see `Data aggregation support` in the docs) -* v.2.0.8 - Nov 26th - Added the ability to retrieve raw transaction data in hex, see `Retrieving raw transactions` in the docs -* v.2.0.7 - Nov 22th - Now it's possible to broadcast transactions using our API, see `Broadcasting transactions` in the docs -* v.2.0.6 - Oct 8th - Added data aggregation of blockchain data in beta mode, see `Data aggregation support` in the docs -* v.2.0.5 - Oct 8th - Fixed bug where `balance` and `received` for bitcoin[-cash]|litecoin addresses in the `{chain}/dashboards/address/{address}` call were calculated wrong if there were specific unconfirmed transactions -* v.2.0.4 - Oct 3rd - Added some new useful fields to `{chain}/stats` calls -* v.2.0.3 - Sep 18th - Added `context.api.tested_features` with the list of features our API supports, but with no guarantee for backward compatibility if updated. Added Omni Layer and Wormhole support in testing mode (see "Tested features changelog") -* v.2.0.2 - Sep 9th - Added `address.contract_created` to the `ethereum/dashboards/address/{A}` call -* v.2.0.1 - Sep 1st, 2018 - Added Litecoin support -* v.2.0.0 - Migrating from API v.1 to API v.2 (see the docs) +* v.2.0.10 - Jan 29th, 2019 + * Added Dogecoin support in test mode (see `Dogecoin support` in the docs) +* v.2.0.9 - Dec 13th, 2018 + * Added Bitcoin SV support in test mode (see `Bitcoin SV support` in the docs); updated aggregation abilities (see `Data aggregation support` in the docs) +* v.2.0.8 - Nov 26th, 2018 + * Added the ability to retrieve raw transaction data in hex, see `Retrieving raw transactions` in the docs +* v.2.0.7 - Nov 22th, 2018 + * Now it's possible to broadcast transactions using our API, see `Broadcasting transactions` in the docs +* v.2.0.6 - Oct 8th, 2018 + * Added data aggregation of blockchain data in beta mode, see `Data aggregation support` in the docs +* v.2.0.5 - Oct 8th, 2018 + * Fixed bug where `balance` and `received` for bitcoin[-cash]|litecoin addresses in the `{chain}/dashboards/address/{address}` call were calculated wrong if there were specific unconfirmed transactions +* v.2.0.4 - Oct 3rd, 2018 + * Added some new useful fields to `{chain}/stats` calls +* v.2.0.3 - Sep 18th, 2018 + * Added `context.api.tested_features` with the list of features our API supports, but with no guarantee for backward compatibility if updated. Added Omni Layer and Wormhole support in testing mode (see "Tested features changelog") +* v.2.0.2 - Sep 9th, 2018 + * Added `address.contract_created` to the `ethereum/dashboards/address/{A}` call +* v.2.0.1 - Sep 1st, 2018 + * Added Litecoin support +* v.2.0.0 + * Migrating from API v.1 to API v.2 (see the docs) ### Support From 2d2c8e2eb4eca817c98ebe2faed08a5e0fc95558 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Fri, 3 May 2019 17:55:56 +0300 Subject: [PATCH 053/180] Create README.md --- Assets/README.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 Assets/README.md diff --git a/Assets/README.md b/Assets/README.md new file mode 100644 index 00000000..347b9860 --- /dev/null +++ b/Assets/README.md @@ -0,0 +1 @@ +This is a directory for images and other assets. From fd02951ba9a87739291c3035d56983597efbf212 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Fri, 3 May 2019 17:56:45 +0300 Subject: [PATCH 054/180] Add files via upload --- Assets/sql.png | Bin 0 -> 82855 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 Assets/sql.png diff --git a/Assets/sql.png b/Assets/sql.png new file mode 100644 index 0000000000000000000000000000000000000000..b6bf2dd1ba6e65b1ac9821fce8ccc16747f9d6ad GIT binary patch literal 82855 zcmZU41zcRe(kR6pTC~_gp-77rcPZ{#T#L&VcUW4q6xYS2I23m;Ebi{UxGk;=JpT9I zcfarb-pTKrlTBul%p@~AGsy{4RhGfQB*R2NK){icl~hMSK&gMpucD*AJU0-uoDdMO z_0{F9f1t}^w1uhXDPZJC;m3TKN0+0{ z>5jpdJYpXD(CGg9m7A2dl)>^0QB2+Ma<|t<<=Z(we^s**+ZVOUy)t}U^;r|V+gTO0 z8og5)SWbJ3;A-ooZo^uFC6<{dMhtk}l^U1Y`_2ss8KlaNJAZNO%p}OlN+$NU{aM4v zFt}cowTZE*J@dKZHv|6Q9Rjrzz7_fwTOhRo z%wIN{xmmw#Vsn?PFVOY6P_N=3r1U}usu9M&{qWYJ5yd*UHV&Qt@(y1CVVp*SqMzgp z8DHkJ5Ivhi(i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809G6BQQTY=wDCot45*g3)Tb5C3mxc*sycV# z(@a|<%dwE;V&FY5k`+0tSJk8VM1r*Nxg!`nCw88gS>Zs{SmWZ!*Qh&nj)Um!O#Nsf z5h84~$YRP8FY2u)8_A;40>yPTrQ>*>2_>1KwjtSt?=0mjFRGR-;X*WuXz-_w<^0wBI|RpmYr^P3BJ z=z!1u9KW5q#RLF~9}g6jo4yB-8#DKqa7=#dd!%jvz3hB-d9*|xfaN7_%2Bs}^WG0* zO!x56SZ&7d^HKWeN)I0WcJcrW#{}Jvmg$&?{)0OGD+vGKdjDVh5}je2n~qIUOuuRR zkH3U?;^>%p4W~=f|0mV>muGY+Kun>GmMKyHMD2aZV|qo7PCg^1`xQ3*Nz44_!-Nqo zx0#n$s=fI?5}wIv7c3$6$Lc}<$V)x*0_dy%>1DtG_VNj@|5j;$JOIl3Rm=Xq$m}Q5 ze`*vY4sc8rKg{MohxPwI`)$es%HMQpiu%1#0iF4wfe`cmMFW5|%67vczx9v+m-KA- y2Z8m!yzGBeXUl$`WWeJ;+0nmyK$7{L6Tn+zXG0Y)lwJV-Dab0zluAE){r>=lWk3P| literal 0 HcmV?d00001 From 5abe53202487f5ea9884321b1d2ef2f61e4dd827 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Fri, 3 May 2019 17:57:30 +0300 Subject: [PATCH 055/180] Direct SQL Access documentation --- SQL.md | 101 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 SQL.md diff --git a/SQL.md b/SQL.md new file mode 100644 index 00000000..629beedc --- /dev/null +++ b/SQL.md @@ -0,0 +1,101 @@ +## [Blockchair.com](https://blockchair.com/) Direct SQL Access documentation + +Example + +### Table of contents + ++ [Changelog](#link_changelog) ++ [Overview](#link_overview) ++ [Obtaining access](#link_obtainingaccess) ++ [Connecting to the server](#link_connecting) ++ [Database schema](#link_schema) ++ [Query example](#link_example) ++ [Support](#link_support) + +Example + +### Changelog + +* v.0.0.1 - May 3rd, 2019 + * We begin beta testing direct access to our databases. If you're interested in participating in the beta test, please reach us out at [](mailto:info@blockchair.com). Note that while in beta, there may be some compatibility breaking changes. + +### Overview + +Blockchair's Direct SQL Access allows you to query our databases directly bypassing our API. While in some cases our API works a lot faster (e.g. querying the balance of an address), sometimes it's handy to have an ability to execute an arbitrary query (e.g. you can create your own filters to aggregate data however you want, or you can use window functions). + +We start with supporting three blockchains - Bitcoin (BTC), Bitcoin Cash (BCH), and Litecoin (LTC). More blockchains are coming in the future. + +All our databases are working in real time - as soon as there's a new block it is instantly populated into the database. + +### Obtaining access + +While Blockchair has a public API available without obtaining a key, this feature requires dedicated access. Please contact us at [](mailto:info@blockchair.com) for pricing. As always, we provide free access for academic purposes in some cases. + + +### Connecting to the server + +The database server is PostgreSQL 11. + +The connection parameters are: +* Server: *\* +* Port: `5432` +* Login: *\* +* Password: *\* +* Database name: `blockchair` + +The simplest way to connect is to use `psql` utility: + +`$ psql -h -p 5432 -U blockchair` + +Please note that we allow neither connections to the `postgres` database, nor access to `public` schemas. External users do not have writing permissions, including creating views. + +By default, there's a limit of 1 connection per user. + +### Database schema + +The following schemas are available: +* `bitcoin` +* `bitcoincash` +* `litecoin` + +Each schema contains: +* `blocks` table +* `transactions` table +* `outputs` table +* `usd(BIGINT, TIMESTAMP DEFAULT current_date)` function to convert satoshi values to USD values using exchange rate on a specified date + +To get columns description use `\d`, e.g. `\d bitcoin.blocks`. The columns are consistent with the described columns in [the API documentation](API.md). There are no `*_usd` columns, please use the `usd` function instead (e.g. `blocks.output_total_usd` can be accessed as `usd(blocks.output_total, blocks.time)`). + +There are following indexes available: +* `blocks.id` +* `blocks.hash` +* `transactions.block_id` +* `transactions.id` +* `transactions.hash` +* `outputs.block_id` +* `outputs.transaction_id` +* `outputs.spending_block_id` +* `outputs.spending_transaction_id` + +### Query example + +``` +blockchair=> SELECT id, encode(hash, 'hex'), time FROM bitcoin.blocks WHERE id = 0 +blockchair-> UNION ALL +blockchair-> SELECT id, encode(hash, 'hex'), time FROM bitcoincash.blocks WHERE id = 0 +blockchair-> UNION ALL +blockchair-> SELECT id, encode(hash, 'hex'), time FROM litecoin.blocks WHERE id = 0; + id | encode | time +----+------------------------------------------------------------------+--------------------- + 0 | 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f | 2009-01-03 18:15:05 + 0 | 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f | 2009-01-03 18:15:05 + 0 | 12a765e31ffd4059bada1e25190f6e98c99d9714d334efa41a195a7e7e04bfe2 | 2011-10-07 07:31:05 +(3 rows) +``` + +### Support + +Support is available in two languages: English and Russian. + +* E-mail: [info@blockchair.com](mailto:info@blockchair.com) +* Telegram chat: [@Blockchair](https://telegram.me/Blockchair) From 6dec269890b53fb106e5d1f994bf565a443aaba1 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Fri, 3 May 2019 17:58:24 +0300 Subject: [PATCH 056/180] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index dcd5c2f0..56cd9def 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,8 @@ This is our public repository for issues and feature requests. Please feel free to submit any ideas as well as bugs using [the "New Issue" button](https://github.com/Blockchair/Blockchair.Support/issues/new)! * API documentation and changelog: https://github.com/Blockchair/Blockchair.Support/blob/master/API.md -* Questions regarding Bitcoin / Bitcoin Cash / Ethereum / Litecoin payments? Please refer to our FAQ first: https://github.com/Blockchair/Blockchair.Support/blob/master/FAQ_PAYMENTS.md +* Direct SQL Access documentation: https://github.com/Blockchair/Blockchair.Support/blob/master/SQL.md +* Questions regarding a payment? Please refer to our FAQ first: https://github.com/Blockchair/Blockchair.Support/blob/master/FAQ_PAYMENTS.md Additional contacts: * E-mail: [info@blockchair.com](mailto:info@blockchair.com) From f0c3bac985441c971a11432ed773a4f1b82607b2 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Thu, 23 May 2019 17:44:05 +0300 Subject: [PATCH 057/180] v.2.0.22 --- API_DOCUMENTATION_EN.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index 48489655..c82d352c 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,6 +1,6 @@ -## [Blockchair.com](https://blockchair.com/) API v.2.0.21 Documentation +## [Blockchair.com](https://blockchair.com/) API v.2.0.22 Documentation -![Blockchair logo](https://blockchair.com/images/logo_full.png "Blockchair logo") +Logo ### Table of contents @@ -33,10 +33,13 @@ ### Changelog +* v.2.0.22 - May 23rd, 2019 + * The state changes feature introduced in v.2.0.20 is now available for Ethereum. The endpoint is `https://api.blockchair.com/ethereum/state/changes/block/{:block_id}`. Please note that it shows only the balance changes caused by a block. Values are returned as strings because some wei values don't fit into int64. + * Some optimizations to the Ethereum mempool processing - we now show a lot more unconfirmed transactions * v.2.0.21 - Apr 22nd, 2019 * We've added an ability to query multiple addresses at once. The endpoint is `https://api.blockchair.com/{:chain}/dashboards/addresses/{:addr1},{:addr2},...` (supported for BTC, BCH, LTC, DASH, BSV, and DOGE). E.g., now, if you need to retrieve information about 3 different addresses, you wouldn't need to make 3 separate queries, you'd need to query just `https://api.blockchair.com/bitcoin/dashboards/addresses/1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa,12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX,1HLoD9E4SDFFPDiYfNYnkBLQ85Y51J3Zb1`. The response contains information on the set of addresses (total balance, total transaction count, etc.), information about each address, and the list of the latest 100 transactions for this set (iterable with `&offset=N`). The maximum number of addresses in one query is 100 (higher limits are available for our premium users). Querying multiple addresses at once works much faster (e.g. it's almost 95 times faster to query 100 addresses via the new endpoint compared to making separate requests). * v.2.0.20 - Apr 19th, 2019 - * Now it's possible to query state changes caused by a block for all chains we support except for ETH. The endpoint is `https://api.blockchair.com/{:chain}/state/changes/block/{:block_id)`. The response contains an array where the keys are addresses which were affected by the block, and the values are balance changes. Example: `https://api.blockchair.com/bitcoin/state/changes/block/1` returns `12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX => 5000000000` which means that the only state change caused by this block was rewarding the miner with 50 bitcoins. This is useful if you need to track balance changes for a lot of addresses - you can now simply track state changes and find the needed addresses there instead of constantly retrieving information about the balances. + * Now it's possible to query state changes caused by a block for all chains we support except for ETH. The endpoint is `https://api.blockchair.com/{:chain}/state/changes/block/{:block_id}`. The response contains an array where the keys are addresses which were affected by the block, and the values are balance changes. Example: `https://api.blockchair.com/bitcoin/state/changes/block/1` returns `12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX => 5000000000` which means that the only state change caused by this block was rewarding the miner with 50 bitcoins. This is useful if you need to track balance changes for a lot of addresses - you can now simply track state changes and find the needed addresses there instead of constantly retrieving information about the balances. * v.2.0.19 - Apr 17th, 2019 * Added alpha support for Ripple (see `Ripple support` in the docs) * Introducing Graph API for Ethereum (a possibility to find connections between two Ethereum addresses), see `Ethereum graph` in the docs) - it's in private alpha test mode From b61819ea84d9457138eade881b3abf408e566f46 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Thu, 23 May 2019 17:45:04 +0300 Subject: [PATCH 058/180] v.2.0.22 --- API.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/API.md b/API.md index ff4ef01c..f04c35c8 100644 --- a/API.md +++ b/API.md @@ -1,4 +1,6 @@ -# [Blockchair.com](https://blockchair.com/) API +## [Blockchair.com](https://blockchair.com/) API + +Logo ### API v.2 documentation * English: [API_DOCUMENTATION_EN.md](API_DOCUMENTATION_EN.md). @@ -6,10 +8,13 @@ ### Changelog +* v.2.0.22 - May 23rd, 2019 + * The state changes feature introduced in v.2.0.20 is now available for Ethereum. The endpoint is `https://api.blockchair.com/ethereum/state/changes/block/{:block_id}`. Please note that it shows only the balance changes caused by a block. Values are returned as strings because some wei values don't fit into int64. + * Some optimizations to the Ethereum mempool processing - we now show a lot more unconfirmed transactions * v.2.0.21 - Apr 22nd, 2019 * We've added an ability to query multiple addresses at once. The endpoint is `https://api.blockchair.com/{:chain}/dashboards/addresses/{:addr1},{:addr2},...` (supported for BTC, BCH, LTC, DASH, BSV, and DOGE). E.g., now, if you need to retrieve information about 3 different addresses, you wouldn't need to make 3 separate queries, you'd need to query just `https://api.blockchair.com/bitcoin/dashboards/addresses/1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa,12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX,1HLoD9E4SDFFPDiYfNYnkBLQ85Y51J3Zb1`. The response contains information on the set of addresses (total balance, total transaction count, etc.), information about each address, and the list of the latest 100 transactions for this set (iterable with `&offset=N`). The maximum number of addresses in one query is 100 (higher limits are available for our premium users). Querying multiple addresses at once works much faster (e.g. it's almost 95 times faster to query 100 addresses via the new endpoint compared to making separate requests). * v.2.0.20 - Apr 19th, 2019 - * Now it's possible to query state changes caused by a block for all chains we support except for ETH. The endpoint is `https://api.blockchair.com/{:chain}/state/changes/block/{:block_id)`. The response contains an array where the keys are addresses which were affected by the block, and the values are balance changes. Example: `https://api.blockchair.com/bitcoin/state/changes/block/1` returns `12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX => 5000000000` which means that the only state change caused by this block was rewarding the miner with 50 bitcoins. This is useful if you need to track balance changes for a lot of addresses - you can now simply track state changes and find the needed addresses there instead of constantly retrieving information about the balances. + * Now it's possible to query state changes caused by a block for all chains we support except for ETH. The endpoint is `https://api.blockchair.com/{:chain}/state/changes/block/{:block_id}`. The response contains an array where the keys are addresses which were affected by the block, and the values are balance changes. Example: `https://api.blockchair.com/bitcoin/state/changes/block/1` returns `12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX => 5000000000` which means that the only state change caused by this block was rewarding the miner with 50 bitcoins. This is useful if you need to track balance changes for a lot of addresses - you can now simply track state changes and find the needed addresses there instead of constantly retrieving information about the balances. * v.2.0.19 - Apr 17th, 2019 * Added alpha support for Ripple (see `Ripple support` in the docs) * Introducing Graph API for Ethereum (a possibility to find connections between two Ethereum addresses), see `Ethereum graph` in the docs) - it's in private alpha test mode From a229a0ede3ff502e200931104032a55e5dd4f28c Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Fri, 24 May 2019 15:08:08 +0300 Subject: [PATCH 059/180] v.2.0.23 --- API_DOCUMENTATION_EN.md | 59 ++++++++++++++++++++++++++++------------- 1 file changed, 40 insertions(+), 19 deletions(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index c82d352c..9188e9e9 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,4 +1,4 @@ -## [Blockchair.com](https://blockchair.com/) API v.2.0.22 Documentation +## [Blockchair.com](https://blockchair.com/) API v.2.0.23 Documentation Logo @@ -28,11 +28,16 @@ + [API request example](#link_examples) + [Broadcasting transactions](#link_broadcasting) + [Retrieving raw transactions](#link_raw) + + [Nodes](#link_nodes) + [State changes](#link_state) + [Support](#link_support) ### Changelog +* v.2.0.23 - May 24th, 2019 + * Added support for Dash nodes. The endpoint is `https://api.blockchair.com/dash/nodes`. The `stats` endpoint (`https://api.blockchair.com/dash/stats`) now also shows the node count. + * It's now possible to query Dash xpubs (see `xpub support` in the docs) + * Dash is now out of beta on our platform * v.2.0.22 - May 23rd, 2019 * The state changes feature introduced in v.2.0.20 is now available for Ethereum. The endpoint is `https://api.blockchair.com/ethereum/state/changes/block/{:block_id}`. Please note that it shows only the balance changes caused by a block. Values are returned as strings because some wei values don't fit into int64. * Some optimizations to the Ethereum mempool processing - we now show a lot more unconfirmed transactions @@ -110,12 +115,10 @@ * v.a1 - Apr 17th - It's now possible to find connections between two Ethereum addresses using our API. Please note that since it's a resource consuming feature, it's available to our Private API users only (if you're interested in participating in alpha test, drop us a line at <`info@blockchair.com`>) -##### Dash support (since Mar 12th 2019) - -* v.rc1 - Mar 12th - We're supporting all the features for DASH as we support for other Satoshi-like coins. Additional columns: `blocks.cbtx`, `transactions.type` (possible types: `simple`, `proregtx`, `proupservtx`, `proupregtx`, `prouprevtx`, `cbtx`, `qctx`, `subtxregister`, `subtxtopup`, `subtxresetkey`, `subtxcloseaccount`), `transactions.is_instant_lock`, `transactions.is_special` (`true` for all transaction types except `simple`), `transactions.special_json` (contains special transaction data encoded in json). - ##### xpub support (since Mar 6th 2019) +* v.b4 - May 24th + * Added support for Dash * v.b3 - Apr 2nd * Fixed a bug where unconfirmed balance didn't show up for xpubs * Some optimizations to the address calculation process have been made, now response is generated 2.5-3x times faster @@ -149,7 +152,7 @@ See the examples: To use aggregation, put the fields by which you'd like to group by (zero, one, or several), and fields (at least one) which you'd like to calculate using some aggregate function under the `?a=` section. You can also sort the results by one of the fields included in the `?a=` section (`asc` or `desc`) using the `?s=` section, and apply additional filters (see the documentation for the `?q=` section). Possible fields: -* Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin: +* Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash: * [Blocks table](#bitcoin-cashlitecoinmempoolblocks) * Group by: date (or week, month, year), version, guessed_miner * To calculate: size, stripped_size (except BCH), weight (except BCH), transaction_count, witness_count, input_count, output_count, input_total, input_total_usd, output_total, output_total_usd, fee_total, fee_total_usd, fee_per_kb, fee_per_kb_usd, fee_per_kwu (except BCH), fee_per_kwu_usd (except BCH), cdd_total, generation, generation_usd, reward, reward_usd — possible functions: avg(field), median(field), min(field), max(field), sum(field), count() @@ -228,7 +231,7 @@ E.g. `https://api.blockchair.com/bitcoin/blocks?q=size(1000000..)` * `bitcoin/outputs` - contains all Bitcoin outputs, excluding the outputs contained in the mempool transactions as well as in the transactions from the latest block * `bitcoin/mempool/transactions` - contains Bitcoin mempool transactions * `bitcoin/mempool/outputs` - contains Bitcoin outputs included in mempool transactions -* Bitcoin Cash, Bitcoin SV, Litecoin, Dogecoin - the same as for Bitcoin +* Bitcoin Cash, Bitcoin SV, Litecoin, Dogecoin, Dash - the same as for Bitcoin * Ethereum: * `ethereum/blocks` - contains all Ethereum blocks, except the last 6 * `ethereum/uncles` - contains all Ethereum uncles, except those that belong to the last 6 blocks @@ -275,7 +278,7 @@ If you need to apply several sorts, you can list them by commas, similar to filt **Offset** can be used as a paginator, e.g., `?offset=10` returns the next 10 results. `context.offset` takes the value of the set `OFFSET`. The maximum value is 10000. If you need just the last page, it's easier and quicker to change the direction of the sorting to the opposite. Important: when iterating through the results, it is extremely likely that the number of rows in the database will increase because new blocks were found. To avoid that, you may add an additional condition that limits the block id to the value obtained in `context.state` in the first query. -#### bitcoin/blocks, bitcoin-cash/blocks, bitcoin-sv/blocks, litecoin/blocks, dogecoin/blocks +#### bitcoin/blocks, bitcoin-cash/blocks, bitcoin-sv/blocks, litecoin/blocks, dogecoin/blocks, dash/blocks E.g. `https://api.blockchair.com/bitcoin/blocks` @@ -321,6 +324,7 @@ Returns data about blocks | reward_usd | float | Miner total reward (reward + total fee) in USD | + | + | | guessed_miner | string `.*` | The supposed name of the miner who found the block (the heuristic is based on `coinbase_data_bin` and the addresses to which the reward goes) | + | + | | is_aux (\*\*) | boolean | Whether a block was mined using AuxPoW | | + | | +| cbtx (\*\*\*) | string `.*` | Coinbase transaction data (encoded JSON) | | | | Additional synthetic columns (you can search over them and / or sort them, but they are not shown) @@ -335,9 +339,10 @@ Notes: - the search over the column `coinbase_data_hex` is done by the operator `^`, you can also use `~` for `coinbase_data_bin` (however, the field `coinbase_data_bin` will not be shown anyway) - (\*) - only for Bitcoin and Litecoin (SegWit data) - (\*\*) - only for Dogecoin +- (\*\*\*) - only for Dash - the default sorting - id DESC -#### bitcoin/transactions, bitcoin/mempool/transactions, bitcoin-cash/transactions, bitcoin-cash/mempool/transactions, litecoin/transactions, litecoin/mempool/transactions, dogecoin/transactions, dogecoin/mempool/transactions +#### bitcoin/transactions, bitcoin/mempool/transactions, bitcoin-cash/transactions, bitcoin-cash/mempool/transactions, litecoin/transactions, litecoin/mempool/transactions, dogecoin/transactions, dogecoin/mempool/transactions, dash/transactions, dash/mempool/transactions E.g. `https://api.blockchair.com/dogecoin/mempool/transactions` @@ -377,7 +382,16 @@ Notes: - the default sort is id DESC - `block_id` for mempool transactions is `-1` -#### bitcoin/outputs, bitcoin/mempool/outputs, bitcoin-cash/outputs, bitcoin-cash/mempool/outputs, litecoin/outputs, litecoin/mempool/outputs, dogecoin/outputs, dogecoin/mempool/outputs +Additional Dash-specific columns: + +| Column | Type | Description | Q? | S? | +|--------|------|-------------|----|----| +| type | string (enum) | Transaction type, one of the following: `simple`, `proregtx`, `proupservtx`, `proupregtx`, `prouprevtx`, `cbtx`, `qctx`, `subtxregister`, `subtxtopup`, `subtxresetkey`, `subtxcloseaccount` | + | + | +| is_instant_lock | boolean | | + | | +| is_special | boolean | | + | `true` for all transaction types except `simple` | +| special_json | string `.*` | Special transaction data (encoded JSON) | | | | + +#### bitcoin/outputs, bitcoin/mempool/outputs, bitcoin-cash/outputs, bitcoin-cash/mempool/outputs, litecoin/outputs, litecoin/mempool/outputs, dogecoin/outputs, dogecoin/mempool/outputs, dash/outputs, dash/mempool/outputs E.g. `https://api.blockchair.com/litecoin/mempool/outputs` @@ -627,7 +641,7 @@ The API supports a number of calls that produce some aggregated data, or data in #### {chain}/dashboards/block/{A} and {chain}/dashboards/blocks/{A[,B,...]} -`{chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `bitcoin-sv`, `litecoin`, `dogecoin`, `ethereum` +`{chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `bitcoin-sv`, `litecoin`, `dogecoin`, `dash`, `ethereum` As the input data (`{A}`), it takes the height or hash of the block(s). `data` returns an array with block heights or block hashes used as keys, and arrays of elements as values: * `block` - information about the block in infinitable-format `(bitcoin[-cash]|ethereum)/blocks` @@ -646,7 +660,7 @@ As the input data (`{A}`), it takes an uncle hash(es). `data` returns an array w #### {chain}/dashboards/transaction/{A} and {chain}/dashboards/transactions/{A[,B,...]} -`{chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `bitcoin-sv`, `litecoin`, `dogecoin`, `ethereum` +`{chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `bitcoin-sv`, `litecoin`, `dogecoin`, `dash`, `ethereum` At the input data, it takes an internal blockchair-id or a hash of a transaction (transactions). `data` returns an array with identifiers or hashes of transactions used as keys, and arrays of elements as keys: * `transaction` - transaction information in infinitable-format `bitcoin[-cash]/transactions` @@ -658,13 +672,13 @@ At the input data, it takes an internal blockchair-id or a hash of a transaction #### {chain}/dashboards/transaction/{hash}/priority -`{chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `bitcoin-sv`, `litecoin`, `dogecoin`, `ethereum` +`{chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `bitcoin-sv`, `litecoin`, `dogecoin`, `dash`, `ethereum` For mempool transactions shows priority (`position`) (for Bitcoin - by `fee_per_kwu`, for Bitcoin Cash - by `fee_per_kb`, for Ethereum - by `gas_price`) over other transactions (`out_of` mempool transactions). It has the same structure as the `(bitcoin[-cash]|ethereum)/dashboards/transaction/{A}` call #### {chain}/dashboards/address/{A} -`{chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `bitcoin-sv`, `litecoin`, `dogecoin` +`{chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `bitcoin-sv`, `litecoin`, `dogecoin`, `dash` Uses address as the input data. `data` returns an array with one element (if the address is found), in that case the address is the key, and the value is an array consisting of the following elements: * `address` @@ -725,7 +739,7 @@ Notes: #### {chain}/stats -`{chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `bitcoin-sv`, `litecoin`, `dogecoin`, `ethereum` +`{chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `bitcoin-sv`, `litecoin`, `dogecoin`, `dash`, `ethereum` Returns an array with blockchain statistics: * `blocks` - total number of blocks @@ -747,7 +761,7 @@ Returns an array with blockchain statistics: * `best_block_hash` - the latest block hash * `best_block_time` - the latest block time * (only ethereum) `uncles_24h` - number of uncles for the last 24 hours -* (except ethereum and bitcoin-sv) `nodes` - number of full nodes +* (except ethereum) `nodes` - number of full nodes * `hashrate_24h` - hashrate (hashes per second) in average for the last 24 hours * `market_price_usd` - average market price of 1 coin in USD (market data source: CoinGecko) * `market_price_btc` - average market price of 1 coin in BTC (for Bitcoin always returns 1) @@ -760,13 +774,14 @@ Returns an array with blockchain statistics: https://api.blockchair.com/stats -Returns data on six calls: +Returns data on seven calls: * `bitcoin/stats` * `bitcoin-cash/stats` * `ethereum/stats` * `litecoin/stats` * `bitcoin-sv/stats` * `dogecoin/stats` +* `dash/stats` ### API request examples @@ -801,15 +816,19 @@ 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 these: `bitcoin`, `bitcoin-cash`, `bitcoin-sv`, `litecoin`, `dogecoin`, `ethereum`) +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 these: `bitcoin`, `bitcoin-cash`, `bitcoin-sv`, `litecoin`, `dogecoin`, `dash`, `ethereum`) 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 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. +### Node list: {chain}/nodes + +Returns a list of full network nodes (except for Ethereum) + ### State changes -It's possible to query state changes caused by a block for all chains we support except for ETH. +It's possible to query state changes caused by a block for all chains we support. The endpoint is `https://api.blockchair.com/{:chain}/state/changes/block/{:block_id)`. @@ -819,6 +838,8 @@ Example: `https://api.blockchair.com/bitcoin/state/changes/block/1` returns `12c This is useful if you need to track balance changes for a lot of addresses - you can now simply track state changes and find the needed addresses there instead of constantly retrieving information about the balances. +Note: values are returned as strings for Ethereum. + ### Support * E-mail: [info@blockchair.com](mailto:info@blockchair.com) From 215ea8a5dbae0c6f44c66e8dba9536ca0616dd1a Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Fri, 24 May 2019 15:09:17 +0300 Subject: [PATCH 060/180] v.2.0.23 --- API.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/API.md b/API.md index f04c35c8..2c4818f2 100644 --- a/API.md +++ b/API.md @@ -8,6 +8,10 @@ ### Changelog +* v.2.0.23 - May 24th, 2019 + * Added support for Dash nodes. The endpoint is `https://api.blockchair.com/dash/nodes`. The `stats` endpoint (`https://api.blockchair.com/dash/stats`) now also shows the node count. + * It's now possible to query Dash xpubs (see `xpub support` in the docs) + * Dash is now out of beta on our platform * v.2.0.22 - May 23rd, 2019 * The state changes feature introduced in v.2.0.20 is now available for Ethereum. The endpoint is `https://api.blockchair.com/ethereum/state/changes/block/{:block_id}`. Please note that it shows only the balance changes caused by a block. Values are returned as strings because some wei values don't fit into int64. * Some optimizations to the Ethereum mempool processing - we now show a lot more unconfirmed transactions From b8546eaaa7c1aa73d32f167271c6507d206f99b7 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Thu, 6 Jun 2019 19:11:42 +0300 Subject: [PATCH 061/180] v.2.0.24 --- API_DOCUMENTATION_EN.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index 9188e9e9..03cac2ee 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,4 +1,4 @@ -## [Blockchair.com](https://blockchair.com/) API v.2.0.23 Documentation +## [Blockchair.com](https://blockchair.com/) API v.2.0.24 Documentation Logo @@ -34,6 +34,8 @@ ### Changelog +* v.2.0.24 - Jun 6th, 2019 + * Added an optional `countdowns` array to `{:chain}/stats` calls. If present, this array contains information about various upcoming events such as hard forks or reward halvings. There are two keys for each event: `event` which contains event description, and `time_left` showing how many seconds are left until the event occurs. Please note that the number of seconds is an approximate value because most events are triggered after a block at a specific height is mined, and since it's not possible to know for sure when a block becomes mined, we can only approximate that. * v.2.0.23 - May 24th, 2019 * Added support for Dash nodes. The endpoint is `https://api.blockchair.com/dash/nodes`. The `stats` endpoint (`https://api.blockchair.com/dash/stats`) now also shows the node count. * It's now possible to query Dash xpubs (see `xpub support` in the docs) From 63fee16666c72acc632044e542e2faa4530fe35f Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Thu, 6 Jun 2019 19:12:09 +0300 Subject: [PATCH 062/180] v.2.0.24 --- API.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/API.md b/API.md index 2c4818f2..55589433 100644 --- a/API.md +++ b/API.md @@ -8,6 +8,8 @@ ### Changelog +* v.2.0.24 - Jun 6th, 2019 + * Added an optional `countdowns` array to `{:chain}/stats` calls. If present, this array contains information about various upcoming events such as hard forks or reward halvings. There are two keys for each event: `event` which contains event description, and `time_left` showing how many seconds are left until the event occurs. Please note that the number of seconds is an approximate value because most events are triggered after a block at a specific height is mined, and since it's not possible to know for sure when a block becomes mined, we can only approximate that. * v.2.0.23 - May 24th, 2019 * Added support for Dash nodes. The endpoint is `https://api.blockchair.com/dash/nodes`. The `stats` endpoint (`https://api.blockchair.com/dash/stats`) now also shows the node count. * It's now possible to query Dash xpubs (see `xpub support` in the docs) From bb078c6ba6ab521914d52f5d725db411b0465011 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Wed, 19 Jun 2019 17:29:18 +0300 Subject: [PATCH 063/180] v.2.0.25 --- API_DOCUMENTATION_EN.md | 66 ++++++++++++++++++++++++----------------- 1 file changed, 38 insertions(+), 28 deletions(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index 03cac2ee..630ef61c 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,4 +1,4 @@ -## [Blockchair.com](https://blockchair.com/) API v.2.0.24 Documentation +## [Blockchair.com](https://blockchair.com/) API v.2.0.25 Documentation Logo @@ -34,6 +34,11 @@ ### Changelog + +* v.2.0.25 - Jun 19th, 2019 + * Added Groestlcoin support (it has SegWit support, so all API functionality available for Bitcoin and Litecoin is available for Groestlcoin as well). + * Added `suggested_transaction_fee_per_byte_sat` key to `{:chain}/stats` calls. This value shows a good enough approximation of an optimal fee value suggested by our engine based on the current mempool state (in satoshi per byte) to get into the next block. Please note that for transactions less important for you this fee suggestion may be too high, while for very important transactions it may not be enough if you'll get unlucky because of the lack of new blocks. Supported for all coins except for Ripple and Ethereum for which we'll have a separate value suggesting an appropriate gas price value. + * Updated xpub support to v.b5 (see `xpub support` in the docs: two bugs have been fixed); * v.2.0.24 - Jun 6th, 2019 * Added an optional `countdowns` array to `{:chain}/stats` calls. If present, this array contains information about various upcoming events such as hard forks or reward halvings. There are two keys for each event: `event` which contains event description, and `time_left` showing how many seconds are left until the event occurs. Please note that the number of seconds is an approximate value because most events are triggered after a block at a specific height is mined, and since it's not possible to know for sure when a block becomes mined, we can only approximate that. * v.2.0.23 - May 24th, 2019 @@ -119,6 +124,10 @@ ##### xpub support (since Mar 6th 2019) +* v.b5 - Jun 19th + * Added support for Groestlcoin + * Fixed a bug where some addresses were missing if there were huge gaps between used address (according the BIP44 / BIP32 standards the maximum gap is currently set to 20). Thanks to the Groestlcoin team for providing us with some great xpub examples. + * Fixed a bug where some of xpubs containing a very large set of addresses (>100) returned a 500 error. * v.b4 - May 24th * Added support for Dash * v.b3 - Apr 2nd @@ -154,27 +163,27 @@ See the examples: To use aggregation, put the fields by which you'd like to group by (zero, one, or several), and fields (at least one) which you'd like to calculate using some aggregate function under the `?a=` section. You can also sort the results by one of the fields included in the `?a=` section (`asc` or `desc`) using the `?s=` section, and apply additional filters (see the documentation for the `?q=` section). Possible fields: -* Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash: - * [Blocks table](#bitcoin-cashlitecoinmempoolblocks) +* Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin: + * Blocks table * Group by: date (or week, month, year), version, guessed_miner * To calculate: size, stripped_size (except BCH), weight (except BCH), transaction_count, witness_count, input_count, output_count, input_total, input_total_usd, output_total, output_total_usd, fee_total, fee_total_usd, fee_per_kb, fee_per_kb_usd, fee_per_kwu (except BCH), fee_per_kwu_usd (except BCH), cdd_total, generation, generation_usd, reward, reward_usd — possible functions: avg(field), median(field), min(field), max(field), sum(field), count() - * [Transactions table](#bitcoin-cashlitecoinmempooltransactions) + * Transactions table * Group by: block_id, date (or week, month, year), version, is_coinbase, has_witness (except BCH), input_count, output_count * To calculate: size, weight (except BCH), input_count, output_count, input_total, input_total_usd, output_total, output_total_usd, fee, fee_usd, fee_per_kb, fee_per_kb_usd, fee_per_kwu (except BCH), fee_per_kwu_usd (except BCH), cdd_total — possible functions: avg(field), median(field), min(field), max(field), sum(field), count() - * [Outputs table](#bitcoin-cashlitecoinmempooloutputs) + * Outputs table * Group by: block_id, date (or week, month, year), type, is_from_coinbase, is_spendable, is_spent, spending_block_id, spending_date (no support for spending_week, spending_month, spending_year yet) * To calculate: value, value_usd, spending_value_usd, lifespan, cdd — possible functions: avg(field), median(field), min(field), max(field), sum(field), count() * Ethereum: - * [Blocks table](#ethereummempoolblocks) + * Blocks table * Group by: date (or week, month, year), miner * To calculate: size, difficulty, gas_used, gas_limit, uncle_count, transaction_count, synthetic_transaction_count, call_count, synthetic_call_count, value_total, value_total_usd, internal_value_total, internal_value_total_usd, generation, generation_usd, uncle_generation, uncle_generation_usd, fee_total, fee_total_usd, reward, reward_usd — possible functions: avg(field), median(field), min(field), max(field), sum(field), count() - * [Uncles table](#ethereumuncles) + * Uncles table * Group by: parent_block_id, date (or week, month, year), miner * To calculate: size, difficulty, gas_used, gas_limit, generation, generation_usd — possible functions: avg(field), median(field), min(field), max(field), sum(field), count() - * [Transactions table](#ethereummempooltransactions) + * Transactions table * Group by: block_id, date (or week, month, year), failed, type * To calculate: call_count, value, value_usd, internal_value, internal_value_usd, fee, fee_usd, gas_used, gas_limit, gas_price — possible functions: avg(field), median(field), min(field), max(field), sum(field), count() - * [Calls table](#ethereumcalls) + * Calls table * Group by: block_id, date (or week, month, year), failed, fail_reason, type, transferred * To calculate: child_call_count, value, value_usd — possible functions: avg(field), median(field), min(field), max(field), sum(field), count() @@ -233,7 +242,7 @@ E.g. `https://api.blockchair.com/bitcoin/blocks?q=size(1000000..)` * `bitcoin/outputs` - contains all Bitcoin outputs, excluding the outputs contained in the mempool transactions as well as in the transactions from the latest block * `bitcoin/mempool/transactions` - contains Bitcoin mempool transactions * `bitcoin/mempool/outputs` - contains Bitcoin outputs included in mempool transactions -* Bitcoin Cash, Bitcoin SV, Litecoin, Dogecoin, Dash - the same as for Bitcoin +* Bitcoin Cash, Bitcoin SV, Litecoin, Dogecoin, Dash, Groestlcoin - the same as for Bitcoin * Ethereum: * `ethereum/blocks` - contains all Ethereum blocks, except the last 6 * `ethereum/uncles` - contains all Ethereum uncles, except those that belong to the last 6 blocks @@ -242,7 +251,7 @@ E.g. `https://api.blockchair.com/bitcoin/blocks?q=size(1000000..)` * `ethereum/mempool/blocks` - contains the last 6 Ethereum blocks, some columns contain nulls * `ethereum/mempool/transactions` - contains all Ethereum transactions from the last 6 blocks as well as mempool transactions -Notes: to speed up the process, our architecture contains separate tables (`mempool*`) for unconfirmed transactions, as well as for blocks that with a certain probability can be forked off from the main chain. For Bitcoin, Bitcoin Cash, and Litecoin, `mempool*` contains the latest block transactions in addition to mempool transactions, and for Ethereum, that's the latest 6 blocks plus the mempool. Exception: for Bitcoin, Bitcoin Cash, and Litecoin, the `blocks` table also contains information about the latest block (this may change in the future). For Ethereum, we do not "replay" transactions entirely (i.e. not looking for internal calls) for the last 6 blocks, so there is no `mempool/calls` table. +Notes: to speed up the process, our architecture contains separate tables (`mempool*`) for unconfirmed transactions, as well as for blocks that with a certain probability can be forked off from the main chain. For Ethereum, that's the latest 6 blocks plus the mempool. For Ethereum, we do not "replay" transactions entirely (i.e. not looking for internal calls) for the last 6 blocks, so there is no `mempool/calls` table. **You can use filters** as follows: `?q=field(value)[,field(value)...]`, where `field` is the column by which a filter is needed, and `value` is a value, special value, or a range of values. The possible columns are listed in the tables below. Possible expressions for values: * `value` - e.g., ` bitcoin/blocks?q=id(0)` finds information about block 0 @@ -280,7 +289,7 @@ If you need to apply several sorts, you can list them by commas, similar to filt **Offset** can be used as a paginator, e.g., `?offset=10` returns the next 10 results. `context.offset` takes the value of the set `OFFSET`. The maximum value is 10000. If you need just the last page, it's easier and quicker to change the direction of the sorting to the opposite. Important: when iterating through the results, it is extremely likely that the number of rows in the database will increase because new blocks were found. To avoid that, you may add an additional condition that limits the block id to the value obtained in `context.state` in the first query. -#### bitcoin/blocks, bitcoin-cash/blocks, bitcoin-sv/blocks, litecoin/blocks, dogecoin/blocks, dash/blocks +#### bitcoin/blocks, bitcoin-cash/blocks, bitcoin-sv/blocks, litecoin/blocks, dogecoin/blocks, dash/blocks, groestlcoin/blocks E.g. `https://api.blockchair.com/bitcoin/blocks` @@ -339,12 +348,12 @@ Notes: - for the columns `id` and` hash` the increased efficiency at unloading of one record is applied - there is no possibility to search over the `date` column directly, you can search like `?q=time(YYYY-MM-DD)` - the search over the column `coinbase_data_hex` is done by the operator `^`, you can also use `~` for `coinbase_data_bin` (however, the field `coinbase_data_bin` will not be shown anyway) -- (\*) - only for Bitcoin and Litecoin (SegWit data) +- (\*) - only for Bitcoin, Litecoin, and Groestlcoin (SegWit data) - (\*\*) - only for Dogecoin - (\*\*\*) - only for Dash - the default sorting - id DESC -#### bitcoin/transactions, bitcoin/mempool/transactions, bitcoin-cash/transactions, bitcoin-cash/mempool/transactions, litecoin/transactions, litecoin/mempool/transactions, dogecoin/transactions, dogecoin/mempool/transactions, dash/transactions, dash/mempool/transactions +#### bitcoin/transactions, bitcoin/mempool/transactions, bitcoin-cash/transactions, bitcoin-cash/mempool/transactions, litecoin/transactions, litecoin/mempool/transactions, dogecoin/transactions, dogecoin/mempool/transactions, dash/transactions, dash/mempool/transactions, groestlcoin/transaction, groestlcoin/mempool/transactions E.g. `https://api.blockchair.com/dogecoin/mempool/transactions` @@ -380,7 +389,7 @@ Returns transaction data Notes: - for the columns `id` and` hash` the increased efficiency at unloading of one record is applied - there is no possibility to search over `date` column, you can use `?q=time(YYYY-MM-DD instead -- (\*) - only for Bitcoin and Litecoin (SegWit data) +- (\*) - only for Bitcoin, Litecoin, and Groestlcoin (SegWit data) - the default sort is id DESC - `block_id` for mempool transactions is `-1` @@ -393,7 +402,7 @@ Additional Dash-specific columns: | is_special | boolean | | + | `true` for all transaction types except `simple` | | special_json | string `.*` | Special transaction data (encoded JSON) | | | | -#### bitcoin/outputs, bitcoin/mempool/outputs, bitcoin-cash/outputs, bitcoin-cash/mempool/outputs, litecoin/outputs, litecoin/mempool/outputs, dogecoin/outputs, dogecoin/mempool/outputs, dash/outputs, dash/mempool/outputs +#### bitcoin/outputs, bitcoin/mempool/outputs, bitcoin-cash/outputs, bitcoin-cash/mempool/outputs, litecoin/outputs, litecoin/mempool/outputs, dogecoin/outputs, dogecoin/mempool/outputs, dash/outputs, dash/mempool/outputs, groestlcoin/outputs, groestlcoin/mempool/outputs E.g. `https://api.blockchair.com/litecoin/mempool/outputs` @@ -438,7 +447,7 @@ Notes: - for columns `transaction_id` and `spending_transaction_id`, the increased efficiency at unloading records if one specific transaction is specified (and not the range), is applied - there is no possibility to search over the `date` and `spending_date` columns, you can use `?q=time(YYYY-MM-DD)` and `?q=spending_time(YYYY-MM-DD)` instead - the search over `script_hex` column can be done by the operator `^`, you can also use `~` for `script_bin` (however, the field `script_bin` will still not be shown) -- (\*) - only for Bitcoin and Litecoin (SegWit data) +- (\*) - only for Bitcoin, Litecoin, and Groestlcoin (SegWit data) - the default sort is - transaction_id DESC #### ethereum/blocks, ethereum/mempool/blocks @@ -643,7 +652,7 @@ The API supports a number of calls that produce some aggregated data, or data in #### {chain}/dashboards/block/{A} and {chain}/dashboards/blocks/{A[,B,...]} -`{chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `bitcoin-sv`, `litecoin`, `dogecoin`, `dash`, `ethereum` +`{chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `bitcoin-sv`, `litecoin`, `dogecoin`, `dash`, `ethereum`, `groestlcoin` As the input data (`{A}`), it takes the height or hash of the block(s). `data` returns an array with block heights or block hashes used as keys, and arrays of elements as values: * `block` - information about the block in infinitable-format `(bitcoin[-cash]|ethereum)/blocks` @@ -662,7 +671,7 @@ As the input data (`{A}`), it takes an uncle hash(es). `data` returns an array w #### {chain}/dashboards/transaction/{A} and {chain}/dashboards/transactions/{A[,B,...]} -`{chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `bitcoin-sv`, `litecoin`, `dogecoin`, `dash`, `ethereum` +`{chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `bitcoin-sv`, `litecoin`, `dogecoin`, `dash`, `ethereum`, `groestlcoin` At the input data, it takes an internal blockchair-id or a hash of a transaction (transactions). `data` returns an array with identifiers or hashes of transactions used as keys, and arrays of elements as keys: * `transaction` - transaction information in infinitable-format `bitcoin[-cash]/transactions` @@ -674,13 +683,13 @@ At the input data, it takes an internal blockchair-id or a hash of a transaction #### {chain}/dashboards/transaction/{hash}/priority -`{chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `bitcoin-sv`, `litecoin`, `dogecoin`, `dash`, `ethereum` +`{chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `bitcoin-sv`, `litecoin`, `dogecoin`, `dash`, `ethereum`, `groestlcoin` For mempool transactions shows priority (`position`) (for Bitcoin - by `fee_per_kwu`, for Bitcoin Cash - by `fee_per_kb`, for Ethereum - by `gas_price`) over other transactions (`out_of` mempool transactions). It has the same structure as the `(bitcoin[-cash]|ethereum)/dashboards/transaction/{A}` call #### {chain}/dashboards/address/{A} -`{chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `bitcoin-sv`, `litecoin`, `dogecoin`, `dash` +`{chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `bitcoin-sv`, `litecoin`, `dogecoin`, `dash`, `groestlcoin` Uses address as the input data. `data` returns an array with one element (if the address is found), in that case the address is the key, and the value is an array consisting of the following elements: * `address` @@ -741,7 +750,7 @@ Notes: #### {chain}/stats -`{chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `bitcoin-sv`, `litecoin`, `dogecoin`, `dash`, `ethereum` +`{chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `bitcoin-sv`, `litecoin`, `dogecoin`, `dash`, `ethereum`, `groestlcoin` Returns an array with blockchain statistics: * `blocks` - total number of blocks @@ -749,10 +758,10 @@ Returns an array with blockchain statistics: * `transactions` - total number of transactions * (only ethereum) `calls` - total number of internal calls * `blocks_24h` - blocks for the last 24 hours -* `circulation` for bitcoin[-cash]|litecoin, `circulation_approximate` for ethereum - number of coins in circulation (in Satoshi, or in wei for Ethereum - an approximate value) +* `circulation` for Bitcoin-like cryptos, `circulation_approximate` for Ethereum - number of coins in circulation (in Satoshi, or in wei for Ethereum - an approximate value) * `transactions_24h` - transactions for the last 24 hours * `difficulty` - current difficulty -* `volume_24h` for bitcoin[-cash]|litecoin, `volume_24h_approximate` for ethereum - monetary volume of transactions for the last 24 hours (for ethereum - an approximate value) +* `volume_24h` for Bitcoin-like cryptos, `volume_24h_approximate` for Ethereum - monetary volume of transactions for the last 24 hours (for ethereum - an approximate value) * `mempool_transactions` - number of transactions in the mempool * (only ethereum) `mempool_median_gas_price` - median gas price in the mempool * (except ethereum) `mempool_size` - the mempool size in bytes @@ -784,6 +793,7 @@ Returns data on seven calls: * `bitcoin-sv/stats` * `dogecoin/stats` * `dash/stats` +* `groestlcoin/stats` ### API request examples @@ -802,7 +812,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`, or `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`, `litecoin`, `bitcoin-sv`, `dash`, `dogecoin`, `groestlcoin`) 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 @@ -818,19 +828,19 @@ 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 these: `bitcoin`, `bitcoin-cash`, `bitcoin-sv`, `litecoin`, `dogecoin`, `dash`, `ethereum`) +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 these: `bitcoin`, `bitcoin-cash`, `bitcoin-sv`, `litecoin`, `dogecoin`, `dash`, `ethereum`, `groestlcoin`) 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 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. -### Node list: {chain}/nodes +### Node list: {:chain}/nodes Returns a list of full network nodes (except for Ethereum) ### State changes -It's possible to query state changes caused by a block for all chains we support. +It's possible to query state changes caused by a block for all chains we support (except for Ripple). The endpoint is `https://api.blockchair.com/{:chain}/state/changes/block/{:block_id)`. From d24c8014e8b9d4c7a2f03601fced39a06c1cc169 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Wed, 19 Jun 2019 17:30:50 +0300 Subject: [PATCH 064/180] v.2.0.25 --- API.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/API.md b/API.md index 55589433..50c8c472 100644 --- a/API.md +++ b/API.md @@ -3,11 +3,15 @@ Logo ### API v.2 documentation -* English: [API_DOCUMENTATION_EN.md](API_DOCUMENTATION_EN.md). -* Russian: [API_DOCUMENTATION_RU.md](API_DOCUMENTATION_RU.md). +* English: [API_DOCUMENTATION_EN.md](API_DOCUMENTATION_EN.md) (up to v.2.0.25) +* Russian: [API_DOCUMENTATION_RU.md](API_DOCUMENTATION_RU.md) (up to v.2.0.10) ### Changelog +* v.2.0.25 - Jun 19th, 2019 + * Added Groestlcoin support (it has SegWit support, so all API functionality available for Bitcoin and Litecoin is available for Groestlcoin as well). + * Added `suggested_transaction_fee_per_byte_sat` key to `{:chain}/stats` calls. This value shows a good enough approximation of an optimal fee value suggested by our engine based on the current mempool state (in satoshi per byte) to get into the next block. Please note that for transactions less important for you this fee suggestion may be too high, while for very important transactions it may not be enough if you'll get unlucky because of the lack of new blocks. Supported for all coins except for Ripple and Ethereum for which we'll have a separate value suggesting an appropriate gas price value. + * Updated xpub support to v.b5 (see `xpub support` in the docs: two bugs have been fixed); * v.2.0.24 - Jun 6th, 2019 * Added an optional `countdowns` array to `{:chain}/stats` calls. If present, this array contains information about various upcoming events such as hard forks or reward halvings. There are two keys for each event: `event` which contains event description, and `time_left` showing how many seconds are left until the event occurs. Please note that the number of seconds is an approximate value because most events are triggered after a block at a specific height is mined, and since it's not possible to know for sure when a block becomes mined, we can only approximate that. * v.2.0.23 - May 24th, 2019 From f59df74c82e17476bba0a120d08078cadcad6548 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Wed, 19 Jun 2019 17:48:30 +0300 Subject: [PATCH 065/180] v.2.0.25 --- API_DOCUMENTATION_EN.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index 630ef61c..c493a079 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -7,7 +7,7 @@ + [Changelog](#link_changelog) + [Tested features changelog](#link_testedfeatureschangelog) + [General Provisions](#link_generalprovisions) -+ [Dashboard calls](#link_dashboardcalls) (Retrieve information about various Bitcoin, Ethereum, Bitcoin Cash, Litecoin, Dash, Bitcoin SV, Dogecoin entities) ++ [Dashboard calls](#link_dashboardcalls) (Retrieve information about various Bitcoin, Ethereum, Bitcoin Cash, Litecoin, Dash, Bitcoin SV, Dogecoin, Groestlcoin entities) + [Block](#link_block) + [Uncle](#link_uncle) (Ethereum only) + [Transaction](#link_transaction) @@ -15,7 +15,7 @@ + [Stats](#link_chainstats) + [General stats](#link_stats) + [Infinitable Calls (blockhain tables)](#link_infinitablecalls) (Filter and sort blockchain data) - + Bitcoin, Bitcoin Cash, Litecoin, Dash, Bitcoin SV, Dogecoin: + + Bitcoin, Bitcoin Cash, Litecoin, Dash, Bitcoin SV, Dogecoin, Groestlcoin: + [Blocks](#link_bitcoinblocks) + [Transaction](#link_bitcointransactions) + [Outputs](#link_bitcoinoutputs) From 434bb0904abb78ded8a5ad662f4c6d1ded4e1aa8 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Thu, 20 Jun 2019 15:25:28 +0300 Subject: [PATCH 066/180] v.2.0.26 --- API_DOCUMENTATION_EN.md | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index c493a079..ec014609 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,4 +1,4 @@ -## [Blockchair.com](https://blockchair.com/) API v.2.0.25 Documentation +## [Blockchair.com](https://blockchair.com/) API v.2.0.26 Documentation Logo @@ -34,7 +34,27 @@ ### Changelog - +* v.2.0.26 - Jun 20th, 2019 + * Added `utxo` array showing available unspent transaction outputs for Bitcoin-like coins to the following endpoints: + * `api.blockchair.com/{:chain}/dashboards/address/{:address}` + * `api.blockchair.com/{:chain}/dashboards/addresses/{:address1}[,{:address2}…]` + * `api.blockchair.com/{:chain}/dashboards/xpub/{:[xyz]pub}` + + Each array element has the following structure: + * `block_id` - block number (`-1` for unconfirmed outputs) + * `transaction_hash` - transaction hash + * `index` - output index in the transaction (also known as the `vout` number) + * `value` - output value in satoshi + * `address` (only for `addresses` and `xpub` dashboards) - showing the output owner + + This new functionality **DEPRECATES** usage of an old method to retrieve the UTXO set for an address, namely `api.blockchair.com/{:chain}/outputs?q=recipient({:address}),is_spent(false)`. See the discussion with some examples here: https://github.com/Blockchair/Blockchair.Support/issues/192 + * The 3 above listed endpoints now also have a new way to iterate through the transaction list and the UTXO set. It's now possible to use `?limit=A,B` and `?offset=C,D` sections in the query. The first number affects the transaction list, the second number affects the UTXO set. If only one number is set, it affects both. The default `limit` is `100`. The maximum `limit` is `10000`. The default offset is `0`. The maximum offset is `1000000`. Here are some examples: + * `api.blockchair.com/{:chain}/dashboards/address/{:address}` - shows address data with an array of 100 latest transactions and 100 latest UTXOs + * `api.blockchair.com/{:chain}/dashboards/address/{:address}?limit=0` - if you require just some general stats like the address balance + * `api.blockchair.com/{:chain}/dashboards/address/{:address}?limit=0,100` - if you need just the general stats and the UTXO set + * `api.blockchair.com/{:chain}/dashboards/address/{:address}?limit=100,0` - if you need just the general stats and the transaction list + * `api.blockchair.com/{:chain}/dashboards/address/{:address}?limit=100,0&offset=100,0` - ... and to iterate it + * The `api.blockchair.com/{:chain}/dashboards/block/{:hash}|{:id}` endpoint now also has an iterable set of transaction hashes included in the block. The default `limit` is `100`. The maximum `limit` is `10000`. The default offset is `0`. The maximum offset is `1000000`. This feature implements https://github.com/Blockchair/Blockchair.Support/issues/189 * v.2.0.25 - Jun 19th, 2019 * Added Groestlcoin support (it has SegWit support, so all API functionality available for Bitcoin and Litecoin is available for Groestlcoin as well). * Added `suggested_transaction_fee_per_byte_sat` key to `{:chain}/stats` calls. This value shows a good enough approximation of an optimal fee value suggested by our engine based on the current mempool state (in satoshi per byte) to get into the next block. Please note that for transactions less important for you this fee suggestion may be too high, while for very important transactions it may not be enough if you'll get unlucky because of the lack of new blocks. Supported for all coins except for Ripple and Ethereum for which we'll have a separate value suggesting an appropriate gas price value. From 2116f0dd7726ef65e73ae476b4255b5faa9822f7 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Thu, 20 Jun 2019 15:26:00 +0300 Subject: [PATCH 067/180] v.2.0.26 --- API.md | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/API.md b/API.md index 50c8c472..8fa89da3 100644 --- a/API.md +++ b/API.md @@ -3,11 +3,32 @@ Logo ### API v.2 documentation -* English: [API_DOCUMENTATION_EN.md](API_DOCUMENTATION_EN.md) (up to v.2.0.25) +* English: [API_DOCUMENTATION_EN.md](API_DOCUMENTATION_EN.md) (up to v.2.0.26) * Russian: [API_DOCUMENTATION_RU.md](API_DOCUMENTATION_RU.md) (up to v.2.0.10) ### Changelog +* v.2.0.26 - Jun 20th, 2019 + * Added `utxo` array showing available unspent transaction outputs for Bitcoin-like coins to the following endpoints: + * `api.blockchair.com/{:chain}/dashboards/address/{:address}` + * `api.blockchair.com/{:chain}/dashboards/addresses/{:address1}[,{:address2}…]` + * `api.blockchair.com/{:chain}/dashboards/xpub/{:[xyz]pub}` + + Each array element has the following structure: + * `block_id` - block number (`-1` for unconfirmed outputs) + * `transaction_hash` - transaction hash + * `index` - output index in the transaction (also known as the `vout` number) + * `value` - output value in satoshi + * `address` (only for `addresses` and `xpub` dashboards) - showing the output owner + + This new functionality **DEPRECATES** usage of an old method to retrieve the UTXO set for an address, namely `api.blockchair.com/{:chain}/outputs?q=recipient({:address}),is_spent(false)`. See the discussion with some examples here: https://github.com/Blockchair/Blockchair.Support/issues/192 + * The 3 above listed endpoints now also have a new way to iterate through the transaction list and the UTXO set. It's now possible to use `?limit=A,B` and `?offset=C,D` sections in the query. The first number affects the transaction list, the second number affects the UTXO set. If only one number is set, it affects both. The default `limit` is `100`. The maximum `limit` is `10000`. The default offset is `0`. The maximum offset is `1000000`. Here are some examples: + * `api.blockchair.com/{:chain}/dashboards/address/{:address}` - shows address data with an array of 100 latest transactions and 100 latest UTXOs + * `api.blockchair.com/{:chain}/dashboards/address/{:address}?limit=0` - if you require just some general stats like the address balance + * `api.blockchair.com/{:chain}/dashboards/address/{:address}?limit=0,100` - if you need just the general stats and the UTXO set + * `api.blockchair.com/{:chain}/dashboards/address/{:address}?limit=100,0` - if you need just the general stats and the transaction list + * `api.blockchair.com/{:chain}/dashboards/address/{:address}?limit=100,0&offset=100,0` - ... and to iterate it + * The `api.blockchair.com/{:chain}/dashboards/block/{:hash}|{:id}` endpoint now also has an iterable set of transaction hashes included in the block. The default `limit` is `100`. The maximum `limit` is `10000`. The default offset is `0`. The maximum offset is `1000000`. This feature implements https://github.com/Blockchair/Blockchair.Support/issues/189 * v.2.0.25 - Jun 19th, 2019 * Added Groestlcoin support (it has SegWit support, so all API functionality available for Bitcoin and Litecoin is available for Groestlcoin as well). * Added `suggested_transaction_fee_per_byte_sat` key to `{:chain}/stats` calls. This value shows a good enough approximation of an optimal fee value suggested by our engine based on the current mempool state (in satoshi per byte) to get into the next block. Please note that for transactions less important for you this fee suggestion may be too high, while for very important transactions it may not be enough if you'll get unlucky because of the lack of new blocks. Supported for all coins except for Ripple and Ethereum for which we'll have a separate value suggesting an appropriate gas price value. From 829bee4888c611d7de7d14cc9aafafe5e5361880 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Thu, 27 Jun 2019 21:16:44 +0300 Subject: [PATCH 068/180] v.2.0.27 --- API_DOCUMENTATION_EN.md | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index ec014609..192beca4 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,4 +1,4 @@ -## [Blockchair.com](https://blockchair.com/) API v.2.0.26 Documentation +## [Blockchair.com](https://blockchair.com/) API v.2.0.27 Documentation Logo @@ -34,6 +34,9 @@ ### Changelog +* v.2.0.27 - Jun 27th, 2019 + * Effective July 19th, there will be a new policy on using our Public API for both non-commercial and commercial projects. Please see [Applying for an API key first](#link_apikey) and apply for an API key before July 19th! Since this is a major compatibility-breaking change, `context.api.next_major_update` is set to `2019-07-19 18:07:19` (see [General Provisions](#link_generalprovisions)) + * Removed `ethereum.uncles.total_difficulty` column according to https://github.com/ethereum/go-ethereum/issues/19024 * v.2.0.26 - Jun 20th, 2019 * Added `utxo` array showing available unspent transaction outputs for Bitcoin-like coins to the following endpoints: * `api.blockchair.com/{:chain}/dashboards/address/{:address}` @@ -247,7 +250,26 @@ Note: it makes sense to check `context.api.version` and, if `context.api.next_ma * Disclaimer: we do not guarantee the reliability or integrity of the provided information. Information provided by our API should not be used for making critical decisions. We do not guarantee an uptime for our free API. -#### Infinitable Calls (blockhain tables) +#### Please apply for an API key first + +tl;dr: +* If you use our API occasionally a key is not required +* Non-commercial and academic projects constantly using our API should apply for a free Public API key +* Commercial projects should apply for a key to Premium API + +Since the introduction of our API more than two years ago it has been free to use in both non-commercial and commercial cases with a limit of 30 requests per minute. Obtaining an API key has been required only for those who were hitting this limit. + +**Beginning July 19th, 2019 we require all applications using our API to obtain an API key.** + +If you develop a non-commercial project (e.g. a website showing some stats) or conducting academic research, please apply for a free key to our Public API (). + +If you develop a commercial project (e.g. a web wallet showing ads), please apply for a key to our Premium API (). + +While we still allow making requests without a key, services which make too many resource-consuming requests may automatically be banned (the API will return HTTP Error 430 in this case). + +The key is applied to the end of the request string like this: `api.blockchair.com/bitcoin/blocks?key=MYSECRETKEY`. Please remember that your key is a secret -- don't disclose it to client-side applications as unauthorized users may start to use your key. + +### Infinitable Calls (blockhain tables) Return data from the tables according to the filters (`q`), sorting (`s`), limit (`limit`), and offset (`offset`). From 523c110388933ebc3b60fc4671a7faafe9619137 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Thu, 27 Jun 2019 21:19:29 +0300 Subject: [PATCH 069/180] =?UTF-8?q?v.2.0.27=20=E2=80=94=20Please=20apply?= =?UTF-8?q?=20for=20an=20API=20key!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- API.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/API.md b/API.md index 8fa89da3..62686c00 100644 --- a/API.md +++ b/API.md @@ -3,11 +3,33 @@ Logo ### API v.2 documentation -* English: [API_DOCUMENTATION_EN.md](API_DOCUMENTATION_EN.md) (up to v.2.0.26) +* English: [API_DOCUMENTATION_EN.md](API_DOCUMENTATION_EN.md) (up to v.2.0.27) * Russian: [API_DOCUMENTATION_RU.md](API_DOCUMENTATION_RU.md) (up to v.2.0.10) +### Please apply for an API key first + +tl;dr: +* If you use our API occasionally a key is not required +* Non-commercial and academic projects constantly using our API should apply for a free Public API key +* Commercial projects should apply for a key to Premium API + +Since the introduction of our API more than two years ago it has been free to use in both non-commercial and commercial cases with a limit of 30 requests per minute. Obtaining an API key has been required only for those who were hitting this limit. + +**Beginning July 19th, 2019 we require all applications using our API to obtain an API key.** + +If you develop a non-commercial project (e.g. a website showing some stats) or conducting academic research, please apply for a free key to our Public API (). + +If you develop a commercial project (e.g. a web wallet showing ads), please apply for a key to our Premium API (). + +While we still allow making requests without a key, services which make too many resource-consuming requests may automatically be banned (the API will return HTTP Error 430 in this case). + +The key is applied to the end of the request string like this: `api.blockchair.com/bitcoin/blocks?key=MYSECRETKEY`. Please remember that your key is a secret -- don't disclose it to client-side applications as unauthorized users may start to use your key. + ### Changelog +* v.2.0.27 - Jun 27th, 2019 + * Effective July 19th, there will be a new policy on using our Public API for both non-commercial and commercial projects. Please see [Applying for an API key first](https://github.com/Blockchair/Blockchair.Support/blob/master/API_DOCUMENTATION_EN.md#link_apikey) and apply for an API key before July 19th! Since this is a major compatibility-breaking change, `context.api.next_major_update` is set to `2019-07-19 18:07:19` (see [General Provisions](#link_generalprovisions)) + * Removed `ethereum.uncles.total_difficulty` column according to https://github.com/ethereum/go-ethereum/issues/19024 * v.2.0.26 - Jun 20th, 2019 * Added `utxo` array showing available unspent transaction outputs for Bitcoin-like coins to the following endpoints: * `api.blockchair.com/{:chain}/dashboards/address/{:address}` From ceb06a71788e29a9f0d8641d56285def7f37143f Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Fri, 28 Jun 2019 20:24:54 +0300 Subject: [PATCH 070/180] v.2.0.28 --- API_DOCUMENTATION_EN.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index 192beca4..43535361 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,4 +1,4 @@ -## [Blockchair.com](https://blockchair.com/) API v.2.0.27 Documentation +## [Blockchair.com](https://blockchair.com/) API v.2.0.28 Documentation Logo @@ -34,6 +34,8 @@ ### Changelog +* v.2.0.28 - Jun 28th, 2019 + * Added support for Groestlcoin nodes. The endpoint is `https://api.blockchair.com/groestlcoin/nodes`. The `stats` endpoint (`https://api.blockchair.com/groestlcoin/stats`) now also shows the node count. * v.2.0.27 - Jun 27th, 2019 * Effective July 19th, there will be a new policy on using our Public API for both non-commercial and commercial projects. Please see [Applying for an API key first](#link_apikey) and apply for an API key before July 19th! Since this is a major compatibility-breaking change, `context.api.next_major_update` is set to `2019-07-19 18:07:19` (see [General Provisions](#link_generalprovisions)) * Removed `ethereum.uncles.total_difficulty` column according to https://github.com/ethereum/go-ethereum/issues/19024 From 556ce2d3c76593cea9195e7ffa725284b48b541f Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Fri, 28 Jun 2019 20:25:43 +0300 Subject: [PATCH 071/180] v.2.0.28 --- API.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/API.md b/API.md index 62686c00..98eef7af 100644 --- a/API.md +++ b/API.md @@ -3,7 +3,7 @@ Logo ### API v.2 documentation -* English: [API_DOCUMENTATION_EN.md](API_DOCUMENTATION_EN.md) (up to v.2.0.27) +* English: [API_DOCUMENTATION_EN.md](API_DOCUMENTATION_EN.md) (up to v.2.0.28) * Russian: [API_DOCUMENTATION_RU.md](API_DOCUMENTATION_RU.md) (up to v.2.0.10) ### Please apply for an API key first @@ -27,6 +27,8 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.28 - Jun 28th, 2019 + * Added support for Groestlcoin nodes. The endpoint is `https://api.blockchair.com/groestlcoin/nodes`. The `stats` endpoint (`https://api.blockchair.com/groestlcoin/stats`) now also shows the node count. * v.2.0.27 - Jun 27th, 2019 * Effective July 19th, there will be a new policy on using our Public API for both non-commercial and commercial projects. Please see [Applying for an API key first](https://github.com/Blockchair/Blockchair.Support/blob/master/API_DOCUMENTATION_EN.md#link_apikey) and apply for an API key before July 19th! Since this is a major compatibility-breaking change, `context.api.next_major_update` is set to `2019-07-19 18:07:19` (see [General Provisions](#link_generalprovisions)) * Removed `ethereum.uncles.total_difficulty` column according to https://github.com/ethereum/go-ethereum/issues/19024 From ea29424cd5429fd556aff8d5738c99a93c5c05ac Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Sun, 30 Jun 2019 20:05:39 +0300 Subject: [PATCH 072/180] v.2.0.29 --- API_DOCUMENTATION_EN.md | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index 43535361..7eac7cfd 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,4 +1,4 @@ -## [Blockchair.com](https://blockchair.com/) API v.2.0.28 Documentation +## [Blockchair.com](https://blockchair.com/) API v.2.0.29 Documentation Logo @@ -34,6 +34,8 @@ ### Changelog +* v.2.0.29 - Jun 30th, 2019 + * The [State changes](#link_state) feature now supports requesting potential state changes caused by mempool transactions. The endpoint is `https://api.blockchair.com/{:chain}/state/changes/mempool`. It's now possible to easily build an app watching for transactions incoming/outgoing to/from millions of addresses, see [an example](#link_state). * v.2.0.28 - Jun 28th, 2019 * Added support for Groestlcoin nodes. The endpoint is `https://api.blockchair.com/groestlcoin/nodes`. The `stats` endpoint (`https://api.blockchair.com/groestlcoin/stats`) now also shows the node count. * v.2.0.27 - Jun 27th, 2019 @@ -896,6 +898,27 @@ This is useful if you need to track balance changes for a lot of addresses - you Note: values are returned as strings for Ethereum. +It's also possible to query potential state changes caused by mempool transactions (this is not supported for Ethereum yet). + +The endpoint for mempool state changes is `https://api.blockchair.com/{:chain}/state/changes/mempool`. + +Here's an example logic for an application watching for Bitcoin transactions incoming/outgoing to/from 1 million addresses: + +``` +latest_known_block_height = 0 +addresses = [1Abc, 1Efg, 1Hij, ...] +while (true) + api_response = api_request('https://api.blockchair.com/bitcoin/state/changes/mempool') + if any of api_response.data keys are in the addresses array + print 'Found new transaction in the mempool' + if latest_known_block_height < api_response.context.state // A new block has been mined (context.state always yields the latest block number) + latest_known_block_height = api_response.context.state + api_response_block = api_request('https://api.blockchair.com/bitcoin/state/changes/block/{:api_response.context.state}') + if any of api_response_block.data keys are in the addresses array + print 'Found new transaction in the latest block' + sleep(10) // The mempool data is cached for 10 seconds on our servers by default +``` + ### Support * E-mail: [info@blockchair.com](mailto:info@blockchair.com) From bb2c52adeba0ae5d09a9c7d540393a98240b9ec3 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Sun, 30 Jun 2019 20:09:54 +0300 Subject: [PATCH 073/180] v.2.0.29 --- API.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/API.md b/API.md index 98eef7af..30664c87 100644 --- a/API.md +++ b/API.md @@ -3,7 +3,7 @@ Logo ### API v.2 documentation -* English: [API_DOCUMENTATION_EN.md](API_DOCUMENTATION_EN.md) (up to v.2.0.28) +* English: [API_DOCUMENTATION_EN.md](API_DOCUMENTATION_EN.md) (up to v.2.0.29) * Russian: [API_DOCUMENTATION_RU.md](API_DOCUMENTATION_RU.md) (up to v.2.0.10) ### Please apply for an API key first @@ -27,10 +27,12 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.29 - Jun 30th, 2019 + * The [State changes](API_DOCUMENTATION_EN.md#link_state) feature now supports requesting potential state changes caused by mempool transactions. The endpoint is `https://api.blockchair.com/{:chain}/state/changes/mempool`. It's now possible to easily build an app watching for transactions incoming/outgoing to/from millions of addresses, see [an example](API_DOCUMENTATION_EN.md#link_state). * v.2.0.28 - Jun 28th, 2019 * Added support for Groestlcoin nodes. The endpoint is `https://api.blockchair.com/groestlcoin/nodes`. The `stats` endpoint (`https://api.blockchair.com/groestlcoin/stats`) now also shows the node count. * v.2.0.27 - Jun 27th, 2019 - * Effective July 19th, there will be a new policy on using our Public API for both non-commercial and commercial projects. Please see [Applying for an API key first](https://github.com/Blockchair/Blockchair.Support/blob/master/API_DOCUMENTATION_EN.md#link_apikey) and apply for an API key before July 19th! Since this is a major compatibility-breaking change, `context.api.next_major_update` is set to `2019-07-19 18:07:19` (see [General Provisions](#link_generalprovisions)) + * Effective July 19th, there will be a new policy on using our Public API for both non-commercial and commercial projects. Please see [Applying for an API key first](API_DOCUMENTATION_EN.md#link_apikey) and apply for an API key before July 19th! Since this is a major compatibility-breaking change, `context.api.next_major_update` is set to `2019-07-19 18:07:19` (see [General Provisions](API_DOCUMENTATION_EN.md#link_generalprovisions)) * Removed `ethereum.uncles.total_difficulty` column according to https://github.com/ethereum/go-ethereum/issues/19024 * v.2.0.26 - Jun 20th, 2019 * Added `utxo` array showing available unspent transaction outputs for Bitcoin-like coins to the following endpoints: From 762f6624755fa91e97c5a094a11140b5127036e0 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Thu, 4 Jul 2019 16:14:05 +0300 Subject: [PATCH 074/180] v.2.0.30 --- API_DOCUMENTATION_EN.md | 48 ++++++++++++++++++++++++++++++++--------- 1 file changed, 38 insertions(+), 10 deletions(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index 7eac7cfd..55f6f315 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,4 +1,4 @@ -## [Blockchair.com](https://blockchair.com/) API v.2.0.29 Documentation +## [Blockchair.com](https://blockchair.com/) API v.2.0.30 Documentation Logo @@ -16,14 +16,15 @@ + [General stats](#link_stats) + [Infinitable Calls (blockhain tables)](#link_infinitablecalls) (Filter and sort blockchain data) + Bitcoin, Bitcoin Cash, Litecoin, Dash, Bitcoin SV, Dogecoin, Groestlcoin: - + [Blocks](#link_bitcoinblocks) - + [Transaction](#link_bitcointransactions) - + [Outputs](#link_bitcoinoutputs) + + [Blocks](#link_bitcoinblocks) (table) + + [Transaction](#link_bitcointransactions) (table) + + [Outputs](#link_bitcoinoutputs) (table) + + [Addresses](#link_bitcoinaddresses) (view) + Ethereum: - + [Blocks](#link_ethereumblocks) - + [Uncles](#link_ethereumuncles) - + [Transactions](#link_ethereumtransactions) - + [Calls](#link_ethereumcalls) + + [Blocks](#link_ethereumblocks) (table) + + [Uncles](#link_ethereumuncles) (table) + + [Transactions](#link_ethereumtransactions) (table) + + [Calls](#link_ethereumcalls) (table) + Misc + [API request example](#link_examples) + [Broadcasting transactions](#link_broadcasting) @@ -34,6 +35,15 @@ ### Changelog +* v.2.0.30 - Jul 4th, 2019 + * We're adding a new table called `addresses` containing the list of all addresses and their confirmed balances to all Bitcoin-like coins (Bitcoin, Bitcoin Cash, Litecoin, Dash, Bitcoin SV, Dogecoin, Groestlcoin). Unlike other "infinitables" (`blocks`, `transactions`, `outputs`) this table isn't live, it's automatically updated every 5 minutes, thus we're classifying it as an "infiniview", meaning it's not really a table, but a view over the `outputs` table. See [the documentation](#link_bitcoinaddresses) for this table. Here are some examples of how it can be used: + * `api.blockchair.com/bitcoin/addresses` - show Bitcoin addresses with biggest balances (i.e. the rich list) + * `api.blockchair.com/bitcoin/addresses?q=balance(100000000)` - show Bitcoin addresses having exactly 1 BTC on their balance + * `api.blockchair.com/bitcoin/addresses?a=count()` - count the number of addresses with a non-zero balance + * `api.blockchair.com/bitcoin/addresses?a=count()&q=balance(100000000..)` - count the number of addresses holding at least 1 BTC + * `api.blockchair.com/bitcoin/addresses?a=sum(balance)&q=balance(100000000..)` - calculate how many bitcoins do the addresses from the previous example hold + * `api.blockchair.com/bitcoin/addresses?a=median(balance)` - calculate the median balance + Using this table makes it trivial to build various sorts of rich lists. It's now also possible to retrieve a full list of addresses and balances in one file (available only in our Private API solution). Please note that this table shouldn't be used for retrieving balances for a particular set of addresses, please use the `api.blockchair.com/{:chain}/dashboards/addresses/{:addr1}[,{:addr2}...]` dashboard endpoint instead. * v.2.0.29 - Jun 30th, 2019 * The [State changes](#link_state) feature now supports requesting potential state changes caused by mempool transactions. The endpoint is `https://api.blockchair.com/{:chain}/state/changes/mempool`. It's now possible to easily build an app watching for transactions incoming/outgoing to/from millions of addresses, see [an example](#link_state). * v.2.0.28 - Jun 28th, 2019 @@ -169,6 +179,7 @@ ##### Data aggregation support (since Oct 8th 2018) +* v.b5 - Jul 4th - Added an ability to aggregate over the `addresses table`. * v.b4 - Apr 2nd - Fixed a bug where some usd values under functions when exporting to TSV/CSV were multiplied by 10000. Use `&export=tsv` or `&export=csv` to export the dataset into the corresponding format, e.g.: `https://api.blockchair.com/bitcoin/transactions?a=date,avg(fee_usd)&q=time(2019-01-01..2019-04-01)&export=tsv` * v.b3 - Mar 6th * New function `price({ticker1}_{ticker2})` which shows the price if `date` (or one of: `week`, `month`, `year`) is also applied. E.g. it's now possible to build a chart showing correlation between price and transaction count: `https://api.blockchair.com/bitcoin/blocks?a=month,sum(transaction_count),price(btc_usd)`. Supported tickers: usd, btc, bch, bsv, eth, ltc, doge. @@ -200,6 +211,9 @@ Possible fields: * Outputs table * Group by: block_id, date (or week, month, year), type, is_from_coinbase, is_spendable, is_spent, spending_block_id, spending_date (no support for spending_week, spending_month, spending_year yet) * To calculate: value, value_usd, spending_value_usd, lifespan, cdd — possible functions: avg(field), median(field), min(field), max(field), sum(field), count() + * Addresses view + * Group by: - + * To calculate: balance — possible functions: avg(field), median(field), min(field), max(field), sum(field), count() * Ethereum: * Blocks table * Group by: date (or week, month, year), miner @@ -399,7 +413,7 @@ Notes: - (\*\*\*) - only for Dash - the default sorting - id DESC -#### bitcoin/transactions, bitcoin/mempool/transactions, bitcoin-cash/transactions, bitcoin-cash/mempool/transactions, litecoin/transactions, litecoin/mempool/transactions, dogecoin/transactions, dogecoin/mempool/transactions, dash/transactions, dash/mempool/transactions, groestlcoin/transaction, groestlcoin/mempool/transactions +#### bitcoin/transactions, bitcoin/mempool/transactions, bitcoin-cash/transactions, bitcoin-cash/mempool/transactions, litecoin/transactions, litecoin/mempool/transactions, dogecoin/transactions, dogecoin/mempool/transactions, dash/transactions, dash/mempool/transactions, bitcoin-sv/transactions, bitcoin-sv/mempool/transactions, groestlcoin/transaction, groestlcoin/mempool/transactions E.g. `https://api.blockchair.com/dogecoin/mempool/transactions` @@ -448,7 +462,7 @@ Additional Dash-specific columns: | is_special | boolean | | + | `true` for all transaction types except `simple` | | special_json | string `.*` | Special transaction data (encoded JSON) | | | | -#### bitcoin/outputs, bitcoin/mempool/outputs, bitcoin-cash/outputs, bitcoin-cash/mempool/outputs, litecoin/outputs, litecoin/mempool/outputs, dogecoin/outputs, dogecoin/mempool/outputs, dash/outputs, dash/mempool/outputs, groestlcoin/outputs, groestlcoin/mempool/outputs +#### bitcoin/outputs, bitcoin/mempool/outputs, bitcoin-cash/outputs, bitcoin-cash/mempool/outputs, litecoin/outputs, litecoin/mempool/outputs, dogecoin/outputs, dogecoin/mempool/outputs, dash/outputs, dash/mempool/outputs, bitcoin-sv/outputs, bitcoin-sv/mempool/outputs, groestlcoin/outputs, groestlcoin/mempool/outputs E.g. `https://api.blockchair.com/litecoin/mempool/outputs` @@ -496,6 +510,20 @@ Notes: - (\*) - only for Bitcoin, Litecoin, and Groestlcoin (SegWit data) - the default sort is - transaction_id DESC +#### bitcoin/addresses, bitcoin-cash/addresses, litecoin/addresses, dogecoin/addresses, dash/addresses, bitcoin-sv/addresses, groestlcoin/addresses + +E.g. `https://api.blockchair.com/bitcoin/addresses` + +The `addresses` view contains the list of all addresses and their confirmed balances. Unlike other infinitables (`blocks`, `transactions`, `outputs`) this table isn't live, it's automatically updated every 5 minutes, thus we classify it as a "view". + +| Column | Type | Description | Q? | S? | +|--------|------|-------------|----|----| +| address | string `[0-9a-zA-Z\-]*` | Bitcoin address or synthetic address | | | +| balance | int | Its confirmed balance | + | + | + +Notes: +- the default sort is - `balance DESC` + #### ethereum/blocks, ethereum/mempool/blocks Returns block data (`mempool` contains the latest 6 blocks) From 1fca151611d8818240e4b6b4b3ee7570f7e303b1 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Thu, 4 Jul 2019 16:14:32 +0300 Subject: [PATCH 075/180] v.2.0.30 --- API.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/API.md b/API.md index 30664c87..af310e9b 100644 --- a/API.md +++ b/API.md @@ -27,6 +27,15 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.30 - Jul 4th, 2019 + * We're adding a new table called `addresses` containing the list of all addresses and their confirmed balances to all Bitcoin-like coins (Bitcoin, Bitcoin Cash, Litecoin, Dash, Bitcoin SV, Dogecoin, Groestlcoin). Unlike other "infinitables" (`blocks`, `transactions`, `outputs`) this table isn't live, it's automatically updated every 5 minutes, thus we're classifying it as an "infiniview", meaning it's not really a table, but a view over the `outputs` table. See [the documentation](#link_bitcoinaddresses) for this table. Here are some examples of how it can be used: + * `api.blockchair.com/bitcoin/addresses` - show Bitcoin addresses with biggest balances (i.e. the rich list) + * `api.blockchair.com/bitcoin/addresses?q=balance(100000000)` - show Bitcoin addresses having exactly 1 BTC on their balance + * `api.blockchair.com/bitcoin/addresses?a=count()` - count the number of addresses with a non-zero balance + * `api.blockchair.com/bitcoin/addresses?a=count()&q=balance(100000000..)` - count the number of addresses holding at least 1 BTC + * `api.blockchair.com/bitcoin/addresses?a=sum(balance)&q=balance(100000000..)` - calculate how many bitcoins do the addresses from the previous example hold + * `api.blockchair.com/bitcoin/addresses?a=median(balance)` - calculate the median balance + Using this table makes it trivial to build various sorts of rich lists. It's now also possible to retrieve a full list of addresses and balances in one file (available only in our Private API solution). Please note that this table shouldn't be used for retrieving balances for a particular set of addresses, please use the `api.blockchair.com/{:chain}/dashboards/addresses/{:addr1}[,{:addr2}...]` dashboard endpoint instead. * v.2.0.29 - Jun 30th, 2019 * The [State changes](API_DOCUMENTATION_EN.md#link_state) feature now supports requesting potential state changes caused by mempool transactions. The endpoint is `https://api.blockchair.com/{:chain}/state/changes/mempool`. It's now possible to easily build an app watching for transactions incoming/outgoing to/from millions of addresses, see [an example](API_DOCUMENTATION_EN.md#link_state). * v.2.0.28 - Jun 28th, 2019 From 7dc7b19a3e2fc39be975e326c6fd091b68f48cfd Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Fri, 5 Jul 2019 16:13:02 +0300 Subject: [PATCH 076/180] v.2.0.31 --- API_DOCUMENTATION_EN.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index 55f6f315..5ab14984 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,4 +1,4 @@ -## [Blockchair.com](https://blockchair.com/) API v.2.0.30 Documentation +## [Blockchair.com](https://blockchair.com/) API v.2.0.31 Documentation Logo @@ -35,6 +35,12 @@ ### Changelog +* v.2.0.31 - Jul 5th, 2019 + * Added two new keys to `bitcoin/stats` and `litecoin/stats` calls: + * `next_retarget_time_estimate` yields an estimated timestamp of the next difficulty retarget + * `next_difficulty_estimate` yeilds an estimated next difficulty value + + These keys are available for Bitcoin and Litecoin as other cryptos we support recalculate difficulty every block. * v.2.0.30 - Jul 4th, 2019 * We're adding a new table called `addresses` containing the list of all addresses and their confirmed balances to all Bitcoin-like coins (Bitcoin, Bitcoin Cash, Litecoin, Dash, Bitcoin SV, Dogecoin, Groestlcoin). Unlike other "infinitables" (`blocks`, `transactions`, `outputs`) this table isn't live, it's automatically updated every 5 minutes, thus we're classifying it as an "infiniview", meaning it's not really a table, but a view over the `outputs` table. See [the documentation](#link_bitcoinaddresses) for this table. Here are some examples of how it can be used: * `api.blockchair.com/bitcoin/addresses` - show Bitcoin addresses with biggest balances (i.e. the rich list) @@ -43,6 +49,7 @@ * `api.blockchair.com/bitcoin/addresses?a=count()&q=balance(100000000..)` - count the number of addresses holding at least 1 BTC * `api.blockchair.com/bitcoin/addresses?a=sum(balance)&q=balance(100000000..)` - calculate how many bitcoins do the addresses from the previous example hold * `api.blockchair.com/bitcoin/addresses?a=median(balance)` - calculate the median balance + Using this table makes it trivial to build various sorts of rich lists. It's now also possible to retrieve a full list of addresses and balances in one file (available only in our Private API solution). Please note that this table shouldn't be used for retrieving balances for a particular set of addresses, please use the `api.blockchair.com/{:chain}/dashboards/addresses/{:addr1}[,{:addr2}...]` dashboard endpoint instead. * v.2.0.29 - Jun 30th, 2019 * The [State changes](#link_state) feature now supports requesting potential state changes caused by mempool transactions. The endpoint is `https://api.blockchair.com/{:chain}/state/changes/mempool`. It's now possible to easily build an app watching for transactions incoming/outgoing to/from millions of addresses, see [an example](#link_state). From 10feb63c883762fb1f1010a46597f55860b2ddfe Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Fri, 5 Jul 2019 16:13:26 +0300 Subject: [PATCH 077/180] v.2.0.31 --- API.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/API.md b/API.md index af310e9b..a812010c 100644 --- a/API.md +++ b/API.md @@ -27,6 +27,12 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.31 - Jul 5th, 2019 + * Added two new keys to `bitcoin/stats` and `litecoin/stats` calls: + * `next_retarget_time_estimate` yields an estimated timestamp of the next difficulty retarget + * `next_difficulty_estimate` yeilds an estimated next difficulty value + + These keys are available for Bitcoin and Litecoin as other cryptos we support recalculate difficulty every block. * v.2.0.30 - Jul 4th, 2019 * We're adding a new table called `addresses` containing the list of all addresses and their confirmed balances to all Bitcoin-like coins (Bitcoin, Bitcoin Cash, Litecoin, Dash, Bitcoin SV, Dogecoin, Groestlcoin). Unlike other "infinitables" (`blocks`, `transactions`, `outputs`) this table isn't live, it's automatically updated every 5 minutes, thus we're classifying it as an "infiniview", meaning it's not really a table, but a view over the `outputs` table. See [the documentation](#link_bitcoinaddresses) for this table. Here are some examples of how it can be used: * `api.blockchair.com/bitcoin/addresses` - show Bitcoin addresses with biggest balances (i.e. the rich list) @@ -35,6 +41,7 @@ The key is applied to the end of the request string like this: `api.blockchair.c * `api.blockchair.com/bitcoin/addresses?a=count()&q=balance(100000000..)` - count the number of addresses holding at least 1 BTC * `api.blockchair.com/bitcoin/addresses?a=sum(balance)&q=balance(100000000..)` - calculate how many bitcoins do the addresses from the previous example hold * `api.blockchair.com/bitcoin/addresses?a=median(balance)` - calculate the median balance + Using this table makes it trivial to build various sorts of rich lists. It's now also possible to retrieve a full list of addresses and balances in one file (available only in our Private API solution). Please note that this table shouldn't be used for retrieving balances for a particular set of addresses, please use the `api.blockchair.com/{:chain}/dashboards/addresses/{:addr1}[,{:addr2}...]` dashboard endpoint instead. * v.2.0.29 - Jun 30th, 2019 * The [State changes](API_DOCUMENTATION_EN.md#link_state) feature now supports requesting potential state changes caused by mempool transactions. The endpoint is `https://api.blockchair.com/{:chain}/state/changes/mempool`. It's now possible to easily build an app watching for transactions incoming/outgoing to/from millions of addresses, see [an example](API_DOCUMENTATION_EN.md#link_state). From a53ec4fed02fcd47cbb2300d885c5e0009a1327f Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Fri, 5 Jul 2019 16:13:45 +0300 Subject: [PATCH 078/180] v.2.0.31 --- API.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/API.md b/API.md index a812010c..8d38d5dd 100644 --- a/API.md +++ b/API.md @@ -3,7 +3,7 @@ Logo ### API v.2 documentation -* English: [API_DOCUMENTATION_EN.md](API_DOCUMENTATION_EN.md) (up to v.2.0.29) +* English: [API_DOCUMENTATION_EN.md](API_DOCUMENTATION_EN.md) (up to v.2.0.31) * Russian: [API_DOCUMENTATION_RU.md](API_DOCUMENTATION_RU.md) (up to v.2.0.10) ### Please apply for an API key first From c6ae952fb2f9d173d6b29214fd2310d664d2643a Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Mon, 15 Jul 2019 20:22:16 +0300 Subject: [PATCH 079/180] v.2.0.32 --- API_DOCUMENTATION_EN.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index 5ab14984..b257631b 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,4 +1,4 @@ -## [Blockchair.com](https://blockchair.com/) API v.2.0.31 Documentation +## [Blockchair.com](https://blockchair.com/) API v.2.0.32 Documentation Logo @@ -35,6 +35,18 @@ ### Changelog +* v.2.0.32 - Jul 15th, 2019 + * We're launching Bitcoin Testnet support for developers! All the functions available for Bitcoin are now available for Bitcoin Testnet as well, including: + * Filtering and sorting blockchain data using infinitables (`api.blockchair.com/bitcoin/testnet/blocks`, `api.blockchair.com/bitcoin/testnet/transactions`, `api.blockchair.com/bitcoin/testnet/outputs`, `api.blockchair.com/bitcoin/testnet/mempool/transactions`, `api.blockchair.com/bitcoin/testnet/mempool/outputs`, and `api.blockchair.com/bitcoin/testnet/addresses`), including aggregation capabilities + * Dashboards (`api.blockchair.com/bitcoin/testnet/dashboards/block/{:id|hash}`, `api.blockchair.com/bitcoin/testnet/dashboards/blocks/{:id|hash},{:id|hash},...`, `api.blockchair.com/bitcoin/testnet/dashboards/transaction/{:hash}`, `api.blockchair.com/bitcoin/testnet/dashboards/transactions/{:hash},{:hash},...`), `api.blockchair.com/bitcoin/testnet/dashboards/address/{:address}`, `api.blockchair.com/bitcoin/testnet/dashboards/addresses/{:address},{:address},...`, `api.blockchair.com/bitcoin/testnet/dashboards/xpub/{:[xyz]pub}` + * Broadcasting transactions (`api.blockchair.com/bitcoin/testnet/push/transaction`) + * State changes (`api.blockchair.com/bitcoin/testnet/state/changes/block/{:block_id)` and `api.blockchair.com/bitcoin/testnet/state/changes/mempool`) + * Stats (`api.blockchair.com/bitcoin/testnet/stats`) + + See documentation for Bitcoin for more details. Please note that USD countervalue for testnet coins is always 0. In the future we also plan to launch support for Bitcoin Cash and Ethereum testnets. + * `outputs.type` column for SegWit-coins can now yield `witness_unknown` type + * `blocks.generation` column for Bitcoin-like coins can now yield negative values in case there are transaction fees, but the output for the coinbase transaction is less than the sum of the fees + * The `utxo` array in the `{:chain}/dashboards/xpub/{[xyz]pub}` dashboard now shows which utxo belongs to which addresses (now it's identical to `{:address1}[,{:address2}…]`) * v.2.0.31 - Jul 5th, 2019 * Added two new keys to `bitcoin/stats` and `litecoin/stats` calls: * `next_retarget_time_estimate` yields an estimated timestamp of the next difficulty retarget @@ -486,7 +498,7 @@ Returns information about the outputs (that become inputs when they are spent, a | value | int | Monetary value of output | + | + | | value_usd | float | Monetary value of output in USD at the moment `date` | + | + | | recipient | string `[0-9a-zA-Z\-]*` | Bitcoin address or synthetic address of an output recipient | + | + | -| type | string (enum) | Output type, one of the following: `pubkey/pubkeyhash/scripthash/multisig/nulldata/nonstandard/witness_v0_scripthash/witness_v0_keyhash` | + | + | +| type | string (enum) | Output type, one of the following: `pubkey/pubkeyhash/scripthash/multisig/nulldata/nonstandard/witness_v0_scripthash/witness_v0_keyhash/witness_unknown` | + | + | | script_hex | string `[0-9a-f]*` | Hex of the output script | + | | | is_from_coinbase | boolean | Is it a coinbase transaction output? | | + | | | is_spendable | null or boolean | Is it theoretically possible to spend this output? For `pubkey` and` multisig` outputs, the existence of the corresponding private key is tested, in that case `true` and `false` are the possible values, depending on the result of the check. For `nulldata` outputs, it is always `false`. For other types it is impossible to check trivially, in this case `null` is shown | + | | From 673c1c8595cf3bdc33bcd715dae20ff22dbfd153 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Mon, 15 Jul 2019 20:23:04 +0300 Subject: [PATCH 080/180] v.2.0.32 --- API.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/API.md b/API.md index 8d38d5dd..460f4b12 100644 --- a/API.md +++ b/API.md @@ -3,7 +3,7 @@ Logo ### API v.2 documentation -* English: [API_DOCUMENTATION_EN.md](API_DOCUMENTATION_EN.md) (up to v.2.0.31) +* English: [API_DOCUMENTATION_EN.md](API_DOCUMENTATION_EN.md) (up to v.2.0.32) * Russian: [API_DOCUMENTATION_RU.md](API_DOCUMENTATION_RU.md) (up to v.2.0.10) ### Please apply for an API key first @@ -27,6 +27,18 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.32 - Jul 15th, 2019 + * We're launching Bitcoin Testnet support for developers! All the functions available for Bitcoin are now available for Bitcoin Testnet as well, including: + * Filtering and sorting blockchain data using infinitables (`api.blockchair.com/bitcoin/testnet/blocks`, `api.blockchair.com/bitcoin/testnet/transactions`, `api.blockchair.com/bitcoin/testnet/outputs`, `api.blockchair.com/bitcoin/testnet/mempool/transactions`, `api.blockchair.com/bitcoin/testnet/mempool/outputs`, and `api.blockchair.com/bitcoin/testnet/addresses`), including aggregation capabilities + * Dashboards (`api.blockchair.com/bitcoin/testnet/dashboards/block/{:id|hash}`, `api.blockchair.com/bitcoin/testnet/dashboards/blocks/{:id|hash},{:id|hash},...`, `api.blockchair.com/bitcoin/testnet/dashboards/transaction/{:hash}`, `api.blockchair.com/bitcoin/testnet/dashboards/transactions/{:hash},{:hash},...`), `api.blockchair.com/bitcoin/testnet/dashboards/address/{:address}`, `api.blockchair.com/bitcoin/testnet/dashboards/addresses/{:address},{:address},...`, `api.blockchair.com/bitcoin/testnet/dashboards/xpub/{:[xyz]pub}` + * Broadcasting transactions (`api.blockchair.com/bitcoin/testnet/push/transaction`) + * State changes (`api.blockchair.com/bitcoin/testnet/state/changes/block/{:block_id)` and `api.blockchair.com/bitcoin/testnet/state/changes/mempool`) + * Stats (`api.blockchair.com/bitcoin/testnet/stats`) + + See documentation for Bitcoin for more details. Please note that USD countervalue for testnet coins is always 0. In the future we also plan to launch support for Bitcoin Cash and Ethereum testnets. + * `outputs.type` column for SegWit-coins can now yield `witness_unknown` type + * `blocks.generation` column for Bitcoin-like coins can now yield negative values in case there are transaction fees, but the output for the coinbase transaction is less than the sum of the fees + * The `utxo` array in the `{:chain}/dashboards/xpub/{[xyz]pub}` dashboard now shows which utxo belongs to which addresses (now it's identical to `{:address1}[,{:address2}…]`) * v.2.0.31 - Jul 5th, 2019 * Added two new keys to `bitcoin/stats` and `litecoin/stats` calls: * `next_retarget_time_estimate` yields an estimated timestamp of the next difficulty retarget From ad5abf5a67934e569ec4a62edc0ef9df753a44f5 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Tue, 23 Jul 2019 16:40:13 +0300 Subject: [PATCH 081/180] v.2.0.33 --- API.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/API.md b/API.md index 460f4b12..152bcb6f 100644 --- a/API.md +++ b/API.md @@ -3,7 +3,7 @@ Logo ### API v.2 documentation -* English: [API_DOCUMENTATION_EN.md](API_DOCUMENTATION_EN.md) (up to v.2.0.32) +* English: [API_DOCUMENTATION_EN.md](API_DOCUMENTATION_EN.md) (up to v.2.0.33) * Russian: [API_DOCUMENTATION_RU.md](API_DOCUMENTATION_RU.md) (up to v.2.0.10) ### Please apply for an API key first @@ -27,6 +27,19 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.33 - Jul 23rd, 2019 + * According to the Bitcoin SV roadmap we've upgraded our nodes to support the Quasar upgrade + * **BREAKING CHANGE**: Upon popular request (#161, #162, #193, #196, #211, and others), starting **July 29th 00:00:00+0000** we're switching to the legacy address format for Bitcoin SV. This will affect the output of the following endpoints: + * `api.blockchair.com/bitcoin-sv/dashboards/transaction/{:hash}` + * `api.blockchair.com/bitcoin-sv/dashboards/transactions/{:hash},{:hash},...` + * `api.blockchair.com/bitcoin-sv/dashboards/address/{:address}` (it will be still possible to use CashAddr in the query string) + * `api.blockchair.com/bitcoin-sv/dashboards/addresses/{:address},{:address},...` (the same) + * `api.blockchair.com/bitcoin-sv/dashboards/xpub/{:[xyz]pub}` + * `api.blockchair.com/bitcoin-sv/outputs?{:params}` + * `api.blockchair.com/bitcoin-sv/mempool/outputs?{:params}` + * `api.blockchair.com/bitcoin-sv/addresses?{:params}` + * `api.blockchair.com/bitcoin-sv/state/changes/block/{:block_id)` + * `api.blockchair.com/bitcoin-sv/state/changes/mempool` * v.2.0.32 - Jul 15th, 2019 * We're launching Bitcoin Testnet support for developers! All the functions available for Bitcoin are now available for Bitcoin Testnet as well, including: * Filtering and sorting blockchain data using infinitables (`api.blockchair.com/bitcoin/testnet/blocks`, `api.blockchair.com/bitcoin/testnet/transactions`, `api.blockchair.com/bitcoin/testnet/outputs`, `api.blockchair.com/bitcoin/testnet/mempool/transactions`, `api.blockchair.com/bitcoin/testnet/mempool/outputs`, and `api.blockchair.com/bitcoin/testnet/addresses`), including aggregation capabilities From a056f6f776f53c5987db8b7115501deb624f20d5 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Tue, 23 Jul 2019 16:40:38 +0300 Subject: [PATCH 082/180] v.2.0.33 --- API_DOCUMENTATION_EN.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index b257631b..ddd3d84a 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,4 +1,4 @@ -## [Blockchair.com](https://blockchair.com/) API v.2.0.32 Documentation +## [Blockchair.com](https://blockchair.com/) API v.2.0.33 Documentation Logo @@ -35,6 +35,19 @@ ### Changelog +* v.2.0.33 - Jul 23rd, 2019 + * According to the Bitcoin SV roadmap we've upgraded our nodes to support the Quasar upgrade + * **BREAKING CHANGE**: Upon popular request (#161, #162, #193, #196, #211, and others), starting **July 29th 00:00:00+0000** we're switching to the legacy address format for Bitcoin SV. This will affect the output of the following endpoints: + * `api.blockchair.com/bitcoin-sv/dashboards/transaction/{:hash}` + * `api.blockchair.com/bitcoin-sv/dashboards/transactions/{:hash},{:hash},...` + * `api.blockchair.com/bitcoin-sv/dashboards/address/{:address}` (it will be still possible to use CashAddr in the query string) + * `api.blockchair.com/bitcoin-sv/dashboards/addresses/{:address},{:address},...` (the same) + * `api.blockchair.com/bitcoin-sv/dashboards/xpub/{:[xyz]pub}` + * `api.blockchair.com/bitcoin-sv/outputs?{:params}` + * `api.blockchair.com/bitcoin-sv/mempool/outputs?{:params}` + * `api.blockchair.com/bitcoin-sv/addresses?{:params}` + * `api.blockchair.com/bitcoin-sv/state/changes/block/{:block_id)` + * `api.blockchair.com/bitcoin-sv/state/changes/mempool` * v.2.0.32 - Jul 15th, 2019 * We're launching Bitcoin Testnet support for developers! All the functions available for Bitcoin are now available for Bitcoin Testnet as well, including: * Filtering and sorting blockchain data using infinitables (`api.blockchair.com/bitcoin/testnet/blocks`, `api.blockchair.com/bitcoin/testnet/transactions`, `api.blockchair.com/bitcoin/testnet/outputs`, `api.blockchair.com/bitcoin/testnet/mempool/transactions`, `api.blockchair.com/bitcoin/testnet/mempool/outputs`, and `api.blockchair.com/bitcoin/testnet/addresses`), including aggregation capabilities From f81184ddcdc468b36c64c0aceb512c9cefd2484e Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Wed, 7 Aug 2019 22:12:15 +0300 Subject: [PATCH 083/180] v.2.0.34 --- API.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/API.md b/API.md index 152bcb6f..4845c825 100644 --- a/API.md +++ b/API.md @@ -27,6 +27,17 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.34 - Aug 7th, 2019 + * It's now possible to retrieve raw block data directly from our nodes. The endpoint is `api.blockchair.com/{:chain}/raw/block/{:hash}|{:id}`. This endpoint supports all chains except for `ripple`. + * For Bitcoin-like chains the `data` array returns two elements: + * `raw_block` - contains hex representation of the block + * `decoded_raw_block` - contains json representation of the block that is generated by our node + * For Ethereum only `decoded_raw_block` is available + + Please note that these endpoints are for development usage only. The result is returned directly from our nodes, so we can't guarantee backward compatibility in case we upgrade our nodes. For production, please use the `api.blockchair.com/{:chain}/dashboards/block/{:hash}|{:id}` endpoint - it pulls data from our databases. + * Ethereum uncles now have an `id` property (previously they only had `parent_block_id`, `index`, and `hash` properties as identifiers). This affects `api.blockchair.com/ethereum/dashboards/uncle/{:hash}` and `api.blockchair.com/ethereum/uncles?{:params}` endpoints. Please note that `id` is not a unique identifier for an uncle (use `hash` or `parent_block_id:index` instead). + * Fixed a bug where `api.blockchair.com/{:chain}/dashboards/addresses/{:address},{:address},...` endpoint returned `500` if `?limit=0` was applied + * `context.state` doesn't return the latest block number anymore in case API returns an error (`400`, `402`, `404`, etc.) * v.2.0.33 - Jul 23rd, 2019 * According to the Bitcoin SV roadmap we've upgraded our nodes to support the Quasar upgrade * **BREAKING CHANGE**: Upon popular request (#161, #162, #193, #196, #211, and others), starting **July 29th 00:00:00+0000** we're switching to the legacy address format for Bitcoin SV. This will affect the output of the following endpoints: From 7570bba2a3599c5161f902a47525e79d2e58971e Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Wed, 7 Aug 2019 22:12:35 +0300 Subject: [PATCH 084/180] v.2.0.34 --- API.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/API.md b/API.md index 4845c825..a4b87b69 100644 --- a/API.md +++ b/API.md @@ -3,7 +3,7 @@ Logo ### API v.2 documentation -* English: [API_DOCUMENTATION_EN.md](API_DOCUMENTATION_EN.md) (up to v.2.0.33) +* English: [API_DOCUMENTATION_EN.md](API_DOCUMENTATION_EN.md) (up to v.2.0.34) * Russian: [API_DOCUMENTATION_RU.md](API_DOCUMENTATION_RU.md) (up to v.2.0.10) ### Please apply for an API key first From 883a10f45904e2b4aede63312a44ffe97fb621c1 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Wed, 7 Aug 2019 22:12:58 +0300 Subject: [PATCH 085/180] v.2.0.34 --- API_DOCUMENTATION_EN.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index ddd3d84a..4e4df48f 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,4 +1,4 @@ -## [Blockchair.com](https://blockchair.com/) API v.2.0.33 Documentation +## [Blockchair.com](https://blockchair.com/) API v.2.0.34 Documentation Logo @@ -35,6 +35,17 @@ ### Changelog +* v.2.0.34 - Aug 7th, 2019 + * It's now possible to retrieve raw block data directly from our nodes. The endpoint is `api.blockchair.com/{:chain}/raw/block/{:hash}|{:id}`. This endpoint supports all chains except for `ripple`. + * For Bitcoin-like chains the `data` array returns two elements: + * `raw_block` - contains hex representation of the block + * `decoded_raw_block` - contains json representation of the block that is generated by our node + * For Ethereum only `decoded_raw_block` is available + + Please note that these endpoints are for development usage only. The result is returned directly from our nodes, so we can't guarantee backward compatibility in case we upgrade our nodes. For production, please use the `api.blockchair.com/{:chain}/dashboards/block/{:hash}|{:id}` endpoint - it pulls data from our databases. + * Ethereum uncles now have an `id` property (previously they only had `parent_block_id`, `index`, and `hash` properties as identifiers). This affects `api.blockchair.com/ethereum/dashboards/uncle/{:hash}` and `api.blockchair.com/ethereum/uncles?{:params}` endpoints. Please note that `id` is not a unique identifier for an uncle (use `hash` or `parent_block_id:index` instead). + * Fixed a bug where `api.blockchair.com/{:chain}/dashboards/addresses/{:address},{:address},...` endpoint returned `500` if `?limit=0` was applied + * `context.state` doesn't return the latest block number anymore in case API returns an error (`400`, `402`, `404`, etc.) * v.2.0.33 - Jul 23rd, 2019 * According to the Bitcoin SV roadmap we've upgraded our nodes to support the Quasar upgrade * **BREAKING CHANGE**: Upon popular request (#161, #162, #193, #196, #211, and others), starting **July 29th 00:00:00+0000** we're switching to the legacy address format for Bitcoin SV. This will affect the output of the following endpoints: From 5bd940f6d67c45586a6e7040449fff7b865ea26f Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Wed, 7 Aug 2019 22:15:44 +0300 Subject: [PATCH 086/180] v.2.0.34 --- API_DOCUMENTATION_EN.md | 1 + 1 file changed, 1 insertion(+) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index 4e4df48f..2256cb95 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -632,6 +632,7 @@ Returns information about uncles |--------|------|-------------|----|----| | parent_block_id | int | Parent block id | + | + | | index | int | Uncle index in the block | + | + | +| id | int | Uncle id | + | + | | hash | string `0x[0-9a-f]{64}` | Uncle hash (with 0x) | + | | | date | string `YYYY-MM-DD` | Date of generation (UTC) | | | | time | string `YYYY-MM-DD HH:ii:ss` | Time of generation (UTC) | + | + | From b42aa9979e1a04edf1ba69087d9be2f98f98efbe Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Wed, 11 Sep 2019 19:01:11 +0300 Subject: [PATCH 087/180] v.2.0.35 --- API.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/API.md b/API.md index a4b87b69..2c2612f0 100644 --- a/API.md +++ b/API.md @@ -3,7 +3,7 @@ Logo ### API v.2 documentation -* English: [API_DOCUMENTATION_EN.md](API_DOCUMENTATION_EN.md) (up to v.2.0.34) +* English: [API_DOCUMENTATION_EN.md](API_DOCUMENTATION_EN.md) (up to v.2.0.35) * Russian: [API_DOCUMENTATION_RU.md](API_DOCUMENTATION_RU.md) (up to v.2.0.10) ### Please apply for an API key first @@ -27,6 +27,10 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.35 - Sep 11th, 2019 + * `api.blockchair.com/{:chain}/nodes` endpoint now also returns the `heights` array showing distribution of the latest block numbers among nodes. See a visualisation on our web interface as an example: https://blockchair.com/bitcoin/nodes + * There's a new endpoint `api.blockchair.com/nodes` showing some aggregated node stats across 7 networks (Bitcoin, Bitcoin Cash, Bitcoin SV, Litecoin, Dash, Dogecoin, and Groestlcoin). + * Our database dumps now also feature daily balances snapshot, see Bitcoin for example: https://gz.blockchair.com/bitcoin/addresses/ (please note that the download speed is limited for non-premium users). The format is `addressbalance`. * v.2.0.34 - Aug 7th, 2019 * It's now possible to retrieve raw block data directly from our nodes. The endpoint is `api.blockchair.com/{:chain}/raw/block/{:hash}|{:id}`. This endpoint supports all chains except for `ripple`. * For Bitcoin-like chains the `data` array returns two elements: From adcf5d3531f09756e21f5962ae4d37f3cc3945a7 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Wed, 11 Sep 2019 19:01:53 +0300 Subject: [PATCH 088/180] v.2.0.35 --- API_DOCUMENTATION_EN.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index 2256cb95..3c74c9b1 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,4 +1,4 @@ -## [Blockchair.com](https://blockchair.com/) API v.2.0.34 Documentation +## [Blockchair.com](https://blockchair.com/) API v.2.0.35 Documentation Logo @@ -35,6 +35,10 @@ ### Changelog +* v.2.0.35 - Sep 11th, 2019 + * `api.blockchair.com/{:chain}/nodes` endpoint now also returns the `heights` array showing distribution of the latest block numbers among nodes. See a visualisation on our web interface as an example: https://blockchair.com/bitcoin/nodes + * There's a new endpoint `api.blockchair.com/nodes` showing some aggregated node stats across 7 networks (Bitcoin, Bitcoin Cash, Bitcoin SV, Litecoin, Dash, Dogecoin, and Groestlcoin). + * Our database dumps now also feature daily balances snapshot, see Bitcoin for example: https://gz.blockchair.com/bitcoin/addresses/ (please note that the download speed is limited for non-premium users). The format is `addressbalance`. * v.2.0.34 - Aug 7th, 2019 * It's now possible to retrieve raw block data directly from our nodes. The endpoint is `api.blockchair.com/{:chain}/raw/block/{:hash}|{:id}`. This endpoint supports all chains except for `ripple`. * For Bitcoin-like chains the `data` array returns two elements: From c83d078f533864d6ccea2af4aad58894e08afa8d Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Tue, 17 Sep 2019 19:21:52 +0300 Subject: [PATCH 089/180] v.2.0.36 - ERC-20 support --- API.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/API.md b/API.md index 2c2612f0..78a8a0d4 100644 --- a/API.md +++ b/API.md @@ -3,7 +3,7 @@ Logo ### API v.2 documentation -* English: [API_DOCUMENTATION_EN.md](API_DOCUMENTATION_EN.md) (up to v.2.0.35) +* English: [API_DOCUMENTATION_EN.md](API_DOCUMENTATION_EN.md) (up to v.2.0.36) * Russian: [API_DOCUMENTATION_RU.md](API_DOCUMENTATION_RU.md) (up to v.2.0.10) ### Please apply for an API key first @@ -27,6 +27,20 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.36 - Sep 17th, 2019 + * We begin a public beta test of ERC-20 support on our platform. Over 100.000 tokens are available to explore! + * New ERC-20 endpoints: + * ERC-20 tokens infinitable: `https://api.blockchair.com/ethereum/erc-20/tokens` + * ERC-20 transactions infinitable: `https://api.blockchair.com/ethereum/erc-20/transactions` (example: `https://api.blockchair.com/ethereum/erc-20/transactions?q=token_address({:token_address})` - filter transactions by a specific token). These two infinitables act as other infinitables in our API, i.e. it's possible to sort and filter by many params, to paginate, etc. + * ERC-20 token stats dashboard: `https://api.blockchair.com/ethereum/erc-20/{:token_address}/stats` - returns some basic stats about a token + * ERC-20 token holder dashboard: `https://api.blockchair.com/ethereum/erc-20/{:token_address}/dashboards/address/{:address}` - returns info about a token holder (the balance, list of latest transactions, etc.) + * New options and changes to the existing Ethereum dashboards: + * Ethereum transaction dashboard: `https://api.blockchair.com/ethereum/dashboards/transaction/{:transaction_hash}?erc_20=true` - returns info about a transaction including ERC-20 transfers + * Ethereum address dashboard: `https://api.blockchair.com/ethereum/dashboards/address/{:address}?erc_20=true` - returns info about an address including its ERC-20 token balances (tip: addresses and hashes should start with `0x`) + * Ethereum stats dashboards (`https://api.blockchair.com/ethereum/stats`) now have `data.layer_2.erc_20` key yielding basic stats on ERC-20's: the total number of tokens, the total number of transactions, and the number of new tokens and transactions over the last 24 hours. + * For all Ethereum endpoints there's a new key `context.state_layer_2` which yields the latest processed block number. It can be different from `context.state` as it takes some time to process second layer transactions. + + Please note these endpoints are in beta, so there may be some unannounced compatibility-breaking changes. More detailed documentation will come later this month. Appending `?erc_20=true` to requests makes it counted as 2 separate requests in the matter of API limits (including Premium API). * v.2.0.35 - Sep 11th, 2019 * `api.blockchair.com/{:chain}/nodes` endpoint now also returns the `heights` array showing distribution of the latest block numbers among nodes. See a visualisation on our web interface as an example: https://blockchair.com/bitcoin/nodes * There's a new endpoint `api.blockchair.com/nodes` showing some aggregated node stats across 7 networks (Bitcoin, Bitcoin Cash, Bitcoin SV, Litecoin, Dash, Dogecoin, and Groestlcoin). From 97bb040bad825de802345fd7693ea957e3118c09 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Tue, 17 Sep 2019 19:22:27 +0300 Subject: [PATCH 090/180] v.2.0.36 - ERC-20 support --- API_DOCUMENTATION_EN.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index 3c74c9b1..23aabae8 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,4 +1,4 @@ -## [Blockchair.com](https://blockchair.com/) API v.2.0.35 Documentation +## [Blockchair.com](https://blockchair.com/) API v.2.0.36 Documentation Logo @@ -35,6 +35,20 @@ ### Changelog +* v.2.0.36 - Sep 17th, 2019 + * We begin a public beta test of ERC-20 support on our platform. Over 100.000 tokens are available to explore! + * New ERC-20 endpoints: + * ERC-20 tokens infinitable: `https://api.blockchair.com/ethereum/erc-20/tokens` + * ERC-20 transactions infinitable: `https://api.blockchair.com/ethereum/erc-20/transactions` (example: `https://api.blockchair.com/ethereum/erc-20/transactions?q=token_address({:token_address})` - filter transactions by a specific token). These two infinitables act as other infinitables in our API, i.e. it's possible to sort and filter by many params, to paginate, etc. + * ERC-20 token stats dashboard: `https://api.blockchair.com/ethereum/erc-20/{:token_address}/stats` - returns some basic stats about a token + * ERC-20 token holder dashboard: `https://api.blockchair.com/ethereum/erc-20/{:token_address}/dashboards/address/{:address}` - returns info about a token holder (the balance, list of latest transactions, etc.) + * New options and changes to the existing Ethereum dashboards: + * Ethereum transaction dashboard: `https://api.blockchair.com/ethereum/dashboards/transaction/{:transaction_hash}?erc_20=true` - returns info about a transaction including ERC-20 transfers + * Ethereum address dashboard: `https://api.blockchair.com/ethereum/dashboards/address/{:address}?erc_20=true` - returns info about an address including its ERC-20 token balances (tip: addresses and hashes should start with `0x`) + * Ethereum stats dashboards (`https://api.blockchair.com/ethereum/stats`) now have `data.layer_2.erc_20` key yielding basic stats on ERC-20's: the total number of tokens, the total number of transactions, and the number of new tokens and transactions over the last 24 hours. + * For all Ethereum endpoints there's a new key `context.state_layer_2` which yields the latest processed block number. It can be different from `context.state` as it takes some time to process second layer transactions. + + Please note these endpoints are in beta, so there may be some unannounced compatibility-breaking changes. More detailed documentation will come later this month. Appending `?erc_20=true` to requests makes it counted as 2 separate requests in the matter of API limits (including Premium API). * v.2.0.35 - Sep 11th, 2019 * `api.blockchair.com/{:chain}/nodes` endpoint now also returns the `heights` array showing distribution of the latest block numbers among nodes. See a visualisation on our web interface as an example: https://blockchair.com/bitcoin/nodes * There's a new endpoint `api.blockchair.com/nodes` showing some aggregated node stats across 7 networks (Bitcoin, Bitcoin Cash, Bitcoin SV, Litecoin, Dash, Dogecoin, and Groestlcoin). From 67641a477dca0a577a6c9575723b8ebae5a8807d Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Wed, 9 Oct 2019 19:28:51 +0300 Subject: [PATCH 091/180] v.2.0.37 --- API_DOCUMENTATION_EN.md | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index 23aabae8..1bc2257e 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,4 +1,4 @@ -## [Blockchair.com](https://blockchair.com/) API v.2.0.36 Documentation +## [Blockchair.com](https://blockchair.com/) API v.2.0.37 Documentation Logo @@ -35,6 +35,17 @@ ### Changelog +* v.2.0.37 - Oct 9th, 2019 + * `{:chain}/dashboards/address/{:address}` endpoint now has an optional parameter `?transaction_details=true` which allows you to retrieve transaction details in the `transactions` array instead of just transaction hashes. Each `transactions` array element contains the following values: + * `hash` - transaction hash + * `time` - transaction timestamp (UTC) + * `balance_change` - how the transaction affected the balance of `{:address}` + + Appending a request with `?transaction_details=true` makes it count as 2 separate requests in the matter of API limits (including Premium API). + + Usage example: `https://api.blockchair.com/bitcoin/dashboards/address/12cbQLTFMXRnSzktFkuoG3eHoMeFtpTu3S?transaction_details=true` + + This option is supported for Bitcoin, Bitcoin Cash, Litecoin, Dash, Bitcoin SV, Dogecoin, and Groestlcoin only. * v.2.0.36 - Sep 17th, 2019 * We begin a public beta test of ERC-20 support on our platform. Over 100.000 tokens are available to explore! * New ERC-20 endpoints: @@ -92,7 +103,7 @@ * v.2.0.31 - Jul 5th, 2019 * Added two new keys to `bitcoin/stats` and `litecoin/stats` calls: * `next_retarget_time_estimate` yields an estimated timestamp of the next difficulty retarget - * `next_difficulty_estimate` yeilds an estimated next difficulty value + * `next_difficulty_estimate` yields an estimated next difficulty value These keys are available for Bitcoin and Litecoin as other cryptos we support recalculate difficulty every block. * v.2.0.30 - Jul 4th, 2019 @@ -212,6 +223,10 @@ ### Tested features changelog +##### ERC-20 support (since Sep 13th 2019) + +* v.a1 - Sep 13th - See the changelog for v.2.0.36 + ##### Ripple support (since Apr 17th 2019) * v.a1 - Apr 17th - Added alpha support for Ripple. We're not releasing the documentation for API yet, but we begin using it in our front end ourselves. If you're interested in participating in alpha test, drop us a line at <`info@blockchair.com`> From 8ad7d8f33715d64d20c7e8b6072687175454a895 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Wed, 9 Oct 2019 19:29:34 +0300 Subject: [PATCH 092/180] v.2.0.37 --- API.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/API.md b/API.md index 78a8a0d4..1dee2297 100644 --- a/API.md +++ b/API.md @@ -3,7 +3,7 @@ Logo ### API v.2 documentation -* English: [API_DOCUMENTATION_EN.md](API_DOCUMENTATION_EN.md) (up to v.2.0.36) +* English: [API_DOCUMENTATION_EN.md](API_DOCUMENTATION_EN.md) (up to v.2.0.37) * Russian: [API_DOCUMENTATION_RU.md](API_DOCUMENTATION_RU.md) (up to v.2.0.10) ### Please apply for an API key first @@ -27,6 +27,17 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.37 - Oct 9th, 2019 + * `{:chain}/dashboards/address/{:address}` endpoint now has an optional parameter `?transaction_details=true` which allows you to retrieve transaction details in the `transactions` array instead of just transaction hashes. Each `transactions` array element contains the following values: + * `hash` - transaction hash + * `time` - transaction timestamp (UTC) + * `balance_change` - how the transaction affected the balance of `{:address}` + + Appending a request with `?transaction_details=true` makes it count as 2 separate requests in the matter of API limits (including Premium API). + + Usage example: `https://api.blockchair.com/bitcoin/dashboards/address/12cbQLTFMXRnSzktFkuoG3eHoMeFtpTu3S?transaction_details=true` + + This option is supported for Bitcoin, Bitcoin Cash, Litecoin, Dash, Bitcoin SV, Dogecoin, and Groestlcoin only. * v.2.0.36 - Sep 17th, 2019 * We begin a public beta test of ERC-20 support on our platform. Over 100.000 tokens are available to explore! * New ERC-20 endpoints: From c3eb3476a2eb0361cb1b230c904c2b854c8afa9c Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Sat, 26 Oct 2019 22:59:40 +0300 Subject: [PATCH 093/180] v.2.0.38 --- API.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/API.md b/API.md index 1dee2297..ceaa8c7c 100644 --- a/API.md +++ b/API.md @@ -3,8 +3,7 @@ Logo ### API v.2 documentation -* English: [API_DOCUMENTATION_EN.md](API_DOCUMENTATION_EN.md) (up to v.2.0.37) -* Russian: [API_DOCUMENTATION_RU.md](API_DOCUMENTATION_RU.md) (up to v.2.0.10) +* English: [API_DOCUMENTATION_EN.md](API_DOCUMENTATION_EN.md) (up to v.2.0.38) ### Please apply for an API key first @@ -27,6 +26,21 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.38 - Oct 26th, 2019 + * We've published new documentation for our API which is lots more clear and describes all the functions we have, it's now available here: https://blockchair.com/api/docs + * Changes to the Omni Layer and Wormhole support (as they're in Alpha test mode these are compatibility-breaking changes; we'll be bringing Omni to Stable the next year): + * As Wormhole as a protocol isn't used anymore, we'll shut it down on our platform on January 1st, 2020 + * Retrieving infomation about Omni Layer transfers within a Bitcoin transaction now requires a `?omni=true` parameter + * Retrieving infomation about Wormhole transfers within a Bitcoin Cash transaction now requires a `?wormhole=true` parameter + * Retrieving infomation about Omni Layer token balances of a Bitcoin address now requires a `?omni=true` parameter + * Retrieving infomation about Wormhole token balances of a Bitcoin Cash transaction now requires a `?wormhole=true` parameter + * Data is now yielded in `layer_2.omni` and `layer_2.wormhole` arrays instead of `_omni` and `_wormhole` + * Changes to Ripple endpoints (they're in Alpha test mode as well): + * `https://api.blockchair.com/{:xrp_chain}/dashboards/ledger/{:hash|id}₀` is now `https://api.blockchair.com/{:xrp_chain}/raw/ledger/{:hash|id}₀` + * `https://api.blockchair.com/{:xrp_chain}/dashboards/transaction/{:hash}₀` is now `https://api.blockchair.com/{:xrp_chain}/raw/transaction/{:hash}₀` + * `https://api.blockchair.com/{:xrp_chain}/dashboards/account/{:address}₀` is now `https://api.blockchair.com/{:xrp_chain}/raw/account/{:address}₀` + * Added `block_id` property to the output of the `?transaction_details=true` param introduced in v.2.0.37 - it's now easier to count the number of confirmations. Also a small bug has been fixed with the timestamps (thanks to Maxim Chistov for noticing) + * We're introducing the "request cost" concept (full description is available in our new documentation; basically, the idea is that some of API requests will cost more than others). We'll not be forcing this rule at the moment, the launch date will be announced later. That won't affect our existing API customers until the end of their subscription periods. * v.2.0.37 - Oct 9th, 2019 * `{:chain}/dashboards/address/{:address}` endpoint now has an optional parameter `?transaction_details=true` which allows you to retrieve transaction details in the `transactions` array instead of just transaction hashes. Each `transactions` array element contains the following values: * `hash` - transaction hash From 1290b2c73f1dc07a8342463c5e419f5471450a00 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Sat, 26 Oct 2019 23:01:48 +0300 Subject: [PATCH 094/180] v.2.0.38 & revamped docs --- API_DOCUMENTATION_EN.md | 6127 +++++++++++++++++++++++++++++++++------ 1 file changed, 5205 insertions(+), 922 deletions(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index 1bc2257e..444cf07b 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,1013 +1,5230 @@ -## [Blockchair.com](https://blockchair.com/) API v.2.0.37 Documentation - -Logo - -### Table of contents - -+ [Changelog](#link_changelog) - + [Tested features changelog](#link_testedfeatureschangelog) -+ [General Provisions](#link_generalprovisions) -+ [Dashboard calls](#link_dashboardcalls) (Retrieve information about various Bitcoin, Ethereum, Bitcoin Cash, Litecoin, Dash, Bitcoin SV, Dogecoin, Groestlcoin entities) - + [Block](#link_block) - + [Uncle](#link_uncle) (Ethereum only) - + [Transaction](#link_transaction) - + [Address](#link_bitcoinaddress) - + [Stats](#link_chainstats) - + [General stats](#link_stats) -+ [Infinitable Calls (blockhain tables)](#link_infinitablecalls) (Filter and sort blockchain data) - + Bitcoin, Bitcoin Cash, Litecoin, Dash, Bitcoin SV, Dogecoin, Groestlcoin: - + [Blocks](#link_bitcoinblocks) (table) - + [Transaction](#link_bitcointransactions) (table) - + [Outputs](#link_bitcoinoutputs) (table) - + [Addresses](#link_bitcoinaddresses) (view) - + Ethereum: - + [Blocks](#link_ethereumblocks) (table) - + [Uncles](#link_ethereumuncles) (table) - + [Transactions](#link_ethereumtransactions) (table) - + [Calls](#link_ethereumcalls) (table) -+ Misc - + [API request example](#link_examples) - + [Broadcasting transactions](#link_broadcasting) - + [Retrieving raw transactions](#link_raw) - + [Nodes](#link_nodes) - + [State changes](#link_state) - + [Support](#link_support) - -### Changelog - -* v.2.0.37 - Oct 9th, 2019 - * `{:chain}/dashboards/address/{:address}` endpoint now has an optional parameter `?transaction_details=true` which allows you to retrieve transaction details in the `transactions` array instead of just transaction hashes. Each `transactions` array element contains the following values: - * `hash` - transaction hash - * `time` - transaction timestamp (UTC) - * `balance_change` - how the transaction affected the balance of `{:address}` - - Appending a request with `?transaction_details=true` makes it count as 2 separate requests in the matter of API limits (including Premium API). - - Usage example: `https://api.blockchair.com/bitcoin/dashboards/address/12cbQLTFMXRnSzktFkuoG3eHoMeFtpTu3S?transaction_details=true` - - This option is supported for Bitcoin, Bitcoin Cash, Litecoin, Dash, Bitcoin SV, Dogecoin, and Groestlcoin only. -* v.2.0.36 - Sep 17th, 2019 - * We begin a public beta test of ERC-20 support on our platform. Over 100.000 tokens are available to explore! - * New ERC-20 endpoints: - * ERC-20 tokens infinitable: `https://api.blockchair.com/ethereum/erc-20/tokens` - * ERC-20 transactions infinitable: `https://api.blockchair.com/ethereum/erc-20/transactions` (example: `https://api.blockchair.com/ethereum/erc-20/transactions?q=token_address({:token_address})` - filter transactions by a specific token). These two infinitables act as other infinitables in our API, i.e. it's possible to sort and filter by many params, to paginate, etc. - * ERC-20 token stats dashboard: `https://api.blockchair.com/ethereum/erc-20/{:token_address}/stats` - returns some basic stats about a token - * ERC-20 token holder dashboard: `https://api.blockchair.com/ethereum/erc-20/{:token_address}/dashboards/address/{:address}` - returns info about a token holder (the balance, list of latest transactions, etc.) - * New options and changes to the existing Ethereum dashboards: - * Ethereum transaction dashboard: `https://api.blockchair.com/ethereum/dashboards/transaction/{:transaction_hash}?erc_20=true` - returns info about a transaction including ERC-20 transfers - * Ethereum address dashboard: `https://api.blockchair.com/ethereum/dashboards/address/{:address}?erc_20=true` - returns info about an address including its ERC-20 token balances (tip: addresses and hashes should start with `0x`) - * Ethereum stats dashboards (`https://api.blockchair.com/ethereum/stats`) now have `data.layer_2.erc_20` key yielding basic stats on ERC-20's: the total number of tokens, the total number of transactions, and the number of new tokens and transactions over the last 24 hours. - * For all Ethereum endpoints there's a new key `context.state_layer_2` which yields the latest processed block number. It can be different from `context.state` as it takes some time to process second layer transactions. - - Please note these endpoints are in beta, so there may be some unannounced compatibility-breaking changes. More detailed documentation will come later this month. Appending `?erc_20=true` to requests makes it counted as 2 separate requests in the matter of API limits (including Premium API). -* v.2.0.35 - Sep 11th, 2019 - * `api.blockchair.com/{:chain}/nodes` endpoint now also returns the `heights` array showing distribution of the latest block numbers among nodes. See a visualisation on our web interface as an example: https://blockchair.com/bitcoin/nodes - * There's a new endpoint `api.blockchair.com/nodes` showing some aggregated node stats across 7 networks (Bitcoin, Bitcoin Cash, Bitcoin SV, Litecoin, Dash, Dogecoin, and Groestlcoin). - * Our database dumps now also feature daily balances snapshot, see Bitcoin for example: https://gz.blockchair.com/bitcoin/addresses/ (please note that the download speed is limited for non-premium users). The format is `addressbalance`. -* v.2.0.34 - Aug 7th, 2019 - * It's now possible to retrieve raw block data directly from our nodes. The endpoint is `api.blockchair.com/{:chain}/raw/block/{:hash}|{:id}`. This endpoint supports all chains except for `ripple`. - * For Bitcoin-like chains the `data` array returns two elements: - * `raw_block` - contains hex representation of the block - * `decoded_raw_block` - contains json representation of the block that is generated by our node - * For Ethereum only `decoded_raw_block` is available - - Please note that these endpoints are for development usage only. The result is returned directly from our nodes, so we can't guarantee backward compatibility in case we upgrade our nodes. For production, please use the `api.blockchair.com/{:chain}/dashboards/block/{:hash}|{:id}` endpoint - it pulls data from our databases. - * Ethereum uncles now have an `id` property (previously they only had `parent_block_id`, `index`, and `hash` properties as identifiers). This affects `api.blockchair.com/ethereum/dashboards/uncle/{:hash}` and `api.blockchair.com/ethereum/uncles?{:params}` endpoints. Please note that `id` is not a unique identifier for an uncle (use `hash` or `parent_block_id:index` instead). - * Fixed a bug where `api.blockchair.com/{:chain}/dashboards/addresses/{:address},{:address},...` endpoint returned `500` if `?limit=0` was applied - * `context.state` doesn't return the latest block number anymore in case API returns an error (`400`, `402`, `404`, etc.) -* v.2.0.33 - Jul 23rd, 2019 - * According to the Bitcoin SV roadmap we've upgraded our nodes to support the Quasar upgrade - * **BREAKING CHANGE**: Upon popular request (#161, #162, #193, #196, #211, and others), starting **July 29th 00:00:00+0000** we're switching to the legacy address format for Bitcoin SV. This will affect the output of the following endpoints: - * `api.blockchair.com/bitcoin-sv/dashboards/transaction/{:hash}` - * `api.blockchair.com/bitcoin-sv/dashboards/transactions/{:hash},{:hash},...` - * `api.blockchair.com/bitcoin-sv/dashboards/address/{:address}` (it will be still possible to use CashAddr in the query string) - * `api.blockchair.com/bitcoin-sv/dashboards/addresses/{:address},{:address},...` (the same) - * `api.blockchair.com/bitcoin-sv/dashboards/xpub/{:[xyz]pub}` - * `api.blockchair.com/bitcoin-sv/outputs?{:params}` - * `api.blockchair.com/bitcoin-sv/mempool/outputs?{:params}` - * `api.blockchair.com/bitcoin-sv/addresses?{:params}` - * `api.blockchair.com/bitcoin-sv/state/changes/block/{:block_id)` - * `api.blockchair.com/bitcoin-sv/state/changes/mempool` -* v.2.0.32 - Jul 15th, 2019 - * We're launching Bitcoin Testnet support for developers! All the functions available for Bitcoin are now available for Bitcoin Testnet as well, including: - * Filtering and sorting blockchain data using infinitables (`api.blockchair.com/bitcoin/testnet/blocks`, `api.blockchair.com/bitcoin/testnet/transactions`, `api.blockchair.com/bitcoin/testnet/outputs`, `api.blockchair.com/bitcoin/testnet/mempool/transactions`, `api.blockchair.com/bitcoin/testnet/mempool/outputs`, and `api.blockchair.com/bitcoin/testnet/addresses`), including aggregation capabilities - * Dashboards (`api.blockchair.com/bitcoin/testnet/dashboards/block/{:id|hash}`, `api.blockchair.com/bitcoin/testnet/dashboards/blocks/{:id|hash},{:id|hash},...`, `api.blockchair.com/bitcoin/testnet/dashboards/transaction/{:hash}`, `api.blockchair.com/bitcoin/testnet/dashboards/transactions/{:hash},{:hash},...`), `api.blockchair.com/bitcoin/testnet/dashboards/address/{:address}`, `api.blockchair.com/bitcoin/testnet/dashboards/addresses/{:address},{:address},...`, `api.blockchair.com/bitcoin/testnet/dashboards/xpub/{:[xyz]pub}` - * Broadcasting transactions (`api.blockchair.com/bitcoin/testnet/push/transaction`) - * State changes (`api.blockchair.com/bitcoin/testnet/state/changes/block/{:block_id)` and `api.blockchair.com/bitcoin/testnet/state/changes/mempool`) - * Stats (`api.blockchair.com/bitcoin/testnet/stats`) - - See documentation for Bitcoin for more details. Please note that USD countervalue for testnet coins is always 0. In the future we also plan to launch support for Bitcoin Cash and Ethereum testnets. - * `outputs.type` column for SegWit-coins can now yield `witness_unknown` type - * `blocks.generation` column for Bitcoin-like coins can now yield negative values in case there are transaction fees, but the output for the coinbase transaction is less than the sum of the fees - * The `utxo` array in the `{:chain}/dashboards/xpub/{[xyz]pub}` dashboard now shows which utxo belongs to which addresses (now it's identical to `{:address1}[,{:address2}…]`) -* v.2.0.31 - Jul 5th, 2019 - * Added two new keys to `bitcoin/stats` and `litecoin/stats` calls: - * `next_retarget_time_estimate` yields an estimated timestamp of the next difficulty retarget - * `next_difficulty_estimate` yields an estimated next difficulty value - - These keys are available for Bitcoin and Litecoin as other cryptos we support recalculate difficulty every block. -* v.2.0.30 - Jul 4th, 2019 - * We're adding a new table called `addresses` containing the list of all addresses and their confirmed balances to all Bitcoin-like coins (Bitcoin, Bitcoin Cash, Litecoin, Dash, Bitcoin SV, Dogecoin, Groestlcoin). Unlike other "infinitables" (`blocks`, `transactions`, `outputs`) this table isn't live, it's automatically updated every 5 minutes, thus we're classifying it as an "infiniview", meaning it's not really a table, but a view over the `outputs` table. See [the documentation](#link_bitcoinaddresses) for this table. Here are some examples of how it can be used: - * `api.blockchair.com/bitcoin/addresses` - show Bitcoin addresses with biggest balances (i.e. the rich list) - * `api.blockchair.com/bitcoin/addresses?q=balance(100000000)` - show Bitcoin addresses having exactly 1 BTC on their balance - * `api.blockchair.com/bitcoin/addresses?a=count()` - count the number of addresses with a non-zero balance - * `api.blockchair.com/bitcoin/addresses?a=count()&q=balance(100000000..)` - count the number of addresses holding at least 1 BTC - * `api.blockchair.com/bitcoin/addresses?a=sum(balance)&q=balance(100000000..)` - calculate how many bitcoins do the addresses from the previous example hold - * `api.blockchair.com/bitcoin/addresses?a=median(balance)` - calculate the median balance - - Using this table makes it trivial to build various sorts of rich lists. It's now also possible to retrieve a full list of addresses and balances in one file (available only in our Private API solution). Please note that this table shouldn't be used for retrieving balances for a particular set of addresses, please use the `api.blockchair.com/{:chain}/dashboards/addresses/{:addr1}[,{:addr2}...]` dashboard endpoint instead. -* v.2.0.29 - Jun 30th, 2019 - * The [State changes](#link_state) feature now supports requesting potential state changes caused by mempool transactions. The endpoint is `https://api.blockchair.com/{:chain}/state/changes/mempool`. It's now possible to easily build an app watching for transactions incoming/outgoing to/from millions of addresses, see [an example](#link_state). -* v.2.0.28 - Jun 28th, 2019 - * Added support for Groestlcoin nodes. The endpoint is `https://api.blockchair.com/groestlcoin/nodes`. The `stats` endpoint (`https://api.blockchair.com/groestlcoin/stats`) now also shows the node count. -* v.2.0.27 - Jun 27th, 2019 - * Effective July 19th, there will be a new policy on using our Public API for both non-commercial and commercial projects. Please see [Applying for an API key first](#link_apikey) and apply for an API key before July 19th! Since this is a major compatibility-breaking change, `context.api.next_major_update` is set to `2019-07-19 18:07:19` (see [General Provisions](#link_generalprovisions)) - * Removed `ethereum.uncles.total_difficulty` column according to https://github.com/ethereum/go-ethereum/issues/19024 -* v.2.0.26 - Jun 20th, 2019 - * Added `utxo` array showing available unspent transaction outputs for Bitcoin-like coins to the following endpoints: - * `api.blockchair.com/{:chain}/dashboards/address/{:address}` - * `api.blockchair.com/{:chain}/dashboards/addresses/{:address1}[,{:address2}…]` - * `api.blockchair.com/{:chain}/dashboards/xpub/{:[xyz]pub}` - - Each array element has the following structure: - * `block_id` - block number (`-1` for unconfirmed outputs) - * `transaction_hash` - transaction hash - * `index` - output index in the transaction (also known as the `vout` number) - * `value` - output value in satoshi - * `address` (only for `addresses` and `xpub` dashboards) - showing the output owner - - This new functionality **DEPRECATES** usage of an old method to retrieve the UTXO set for an address, namely `api.blockchair.com/{:chain}/outputs?q=recipient({:address}),is_spent(false)`. See the discussion with some examples here: https://github.com/Blockchair/Blockchair.Support/issues/192 - * The 3 above listed endpoints now also have a new way to iterate through the transaction list and the UTXO set. It's now possible to use `?limit=A,B` and `?offset=C,D` sections in the query. The first number affects the transaction list, the second number affects the UTXO set. If only one number is set, it affects both. The default `limit` is `100`. The maximum `limit` is `10000`. The default offset is `0`. The maximum offset is `1000000`. Here are some examples: - * `api.blockchair.com/{:chain}/dashboards/address/{:address}` - shows address data with an array of 100 latest transactions and 100 latest UTXOs - * `api.blockchair.com/{:chain}/dashboards/address/{:address}?limit=0` - if you require just some general stats like the address balance - * `api.blockchair.com/{:chain}/dashboards/address/{:address}?limit=0,100` - if you need just the general stats and the UTXO set - * `api.blockchair.com/{:chain}/dashboards/address/{:address}?limit=100,0` - if you need just the general stats and the transaction list - * `api.blockchair.com/{:chain}/dashboards/address/{:address}?limit=100,0&offset=100,0` - ... and to iterate it - * The `api.blockchair.com/{:chain}/dashboards/block/{:hash}|{:id}` endpoint now also has an iterable set of transaction hashes included in the block. The default `limit` is `100`. The maximum `limit` is `10000`. The default offset is `0`. The maximum offset is `1000000`. This feature implements https://github.com/Blockchair/Blockchair.Support/issues/189 -* v.2.0.25 - Jun 19th, 2019 - * Added Groestlcoin support (it has SegWit support, so all API functionality available for Bitcoin and Litecoin is available for Groestlcoin as well). - * Added `suggested_transaction_fee_per_byte_sat` key to `{:chain}/stats` calls. This value shows a good enough approximation of an optimal fee value suggested by our engine based on the current mempool state (in satoshi per byte) to get into the next block. Please note that for transactions less important for you this fee suggestion may be too high, while for very important transactions it may not be enough if you'll get unlucky because of the lack of new blocks. Supported for all coins except for Ripple and Ethereum for which we'll have a separate value suggesting an appropriate gas price value. - * Updated xpub support to v.b5 (see `xpub support` in the docs: two bugs have been fixed); -* v.2.0.24 - Jun 6th, 2019 - * Added an optional `countdowns` array to `{:chain}/stats` calls. If present, this array contains information about various upcoming events such as hard forks or reward halvings. There are two keys for each event: `event` which contains event description, and `time_left` showing how many seconds are left until the event occurs. Please note that the number of seconds is an approximate value because most events are triggered after a block at a specific height is mined, and since it's not possible to know for sure when a block becomes mined, we can only approximate that. -* v.2.0.23 - May 24th, 2019 - * Added support for Dash nodes. The endpoint is `https://api.blockchair.com/dash/nodes`. The `stats` endpoint (`https://api.blockchair.com/dash/stats`) now also shows the node count. - * It's now possible to query Dash xpubs (see `xpub support` in the docs) - * Dash is now out of beta on our platform -* v.2.0.22 - May 23rd, 2019 - * The state changes feature introduced in v.2.0.20 is now available for Ethereum. The endpoint is `https://api.blockchair.com/ethereum/state/changes/block/{:block_id}`. Please note that it shows only the balance changes caused by a block. Values are returned as strings because some wei values don't fit into int64. - * Some optimizations to the Ethereum mempool processing - we now show a lot more unconfirmed transactions -* v.2.0.21 - Apr 22nd, 2019 - * We've added an ability to query multiple addresses at once. The endpoint is `https://api.blockchair.com/{:chain}/dashboards/addresses/{:addr1},{:addr2},...` (supported for BTC, BCH, LTC, DASH, BSV, and DOGE). E.g., now, if you need to retrieve information about 3 different addresses, you wouldn't need to make 3 separate queries, you'd need to query just `https://api.blockchair.com/bitcoin/dashboards/addresses/1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa,12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX,1HLoD9E4SDFFPDiYfNYnkBLQ85Y51J3Zb1`. The response contains information on the set of addresses (total balance, total transaction count, etc.), information about each address, and the list of the latest 100 transactions for this set (iterable with `&offset=N`). The maximum number of addresses in one query is 100 (higher limits are available for our premium users). Querying multiple addresses at once works much faster (e.g. it's almost 95 times faster to query 100 addresses via the new endpoint compared to making separate requests). -* v.2.0.20 - Apr 19th, 2019 - * Now it's possible to query state changes caused by a block for all chains we support except for ETH. The endpoint is `https://api.blockchair.com/{:chain}/state/changes/block/{:block_id}`. The response contains an array where the keys are addresses which were affected by the block, and the values are balance changes. Example: `https://api.blockchair.com/bitcoin/state/changes/block/1` returns `12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX => 5000000000` which means that the only state change caused by this block was rewarding the miner with 50 bitcoins. This is useful if you need to track balance changes for a lot of addresses - you can now simply track state changes and find the needed addresses there instead of constantly retrieving information about the balances. -* v.2.0.19 - Apr 17th, 2019 - * Added alpha support for Ripple (see `Ripple support` in the docs) - * Introducing Graph API for Ethereum (a possibility to find connections between two Ethereum addresses), see `Ethereum graph` in the docs) - it's in private alpha test mode - * If you're constantly hitting Error 402 (i.e. by making too many requests per minute to our free API), you'll now receive Error 429 which means that your IP is banned for an hour. Not honoring our limits may result in a permanent ban - * Fixed a couple of minor bugs in our Ethereum engine. We'll be rolling out an updated engine the next week, there shouldn't be any compatibility breaking changes -* v.2.0.18 - Apr 2nd, 2019 - * Added biggest transactions over the last 24h to `https://api.blockchair.com/{chain}/stats` calls (`largest_transaction_24h` key); - * Updated xpub support to v.b3 (see `xpub support` in the docs, there are some breaking changes); - * Updated aggregation support to v.b4 (see `Data aggregation support` in the docs) - * We're **DEPRECATING** usage of unsupported parameters in GET and POST requests to our API endpoints (e.g. `https://api.blockchair.com/stats?myarbitrarykey=1234` might result in a `400 Bad Request` error); - * Previously DEPRECATED API v.1 has been shut down - * Previously DEPRECATED undocumented `?export=` functionality now requires an API key (apply at <`info@blockchair.com`>) for everything except: - * Aggregated results - * `blocks` and `mempool/*` tables across all blockchains we support -* v.2.0.17 - Mar 14th, 2019 - * Added support for Bitcoin SV nodes, they are now separate from Bitcoin Cash nodes. Endpoint: `https://api.blockchair.com/bitcoin-sv/nodes`. -* v.2.0.16 - Mar 13th, 2019 - * Added support for ypub and zpub for Bitcoin and Litecoin in test mode. See `xpub support` in the docs. -* v.2.0.15 - Mar 12th, 2019 - * Added Dash support in test mode. We're supporting all the features for DASH as we support for other Satoshi-like coins. Additional columns: `blocks.cbtx`, `transactions.type` (possible types: `simple`, `proregtx`, `proupservtx`, `proupregtx`, `prouprevtx`, `cbtx`, `qctx`, `subtxregister`, `subtxtopup`, `subtxresetkey`, `subtxcloseaccount`), `transactions.is_instant_lock`, `transactions.is_special` (`true` for all transaction types except `simple`), `transactions.special_json` (contains special transaction data encoded in json). E.g.: `https://api.blockchair.com/dash/blocks` -* v.2.0.14 - Mar 6th, 2019 - * Added xpub support in test mode. There's now support for retrieving info about multiple addresses using xpub keys. Use `https://api.blockchair.com/{chain}/dashboards/xpub/{xpub}`. See `xpub support` in the docs. - * Extended data aggregation abilities (still in test mode), see `Data aggregation support` in the docs. Now it's possbile to find correlations with price, and use special functions (e.g. to calculate SegWit adoption). - * We're **DEPRECATING** API v.1 and will be shutting it down on April 1st, 2019. - * We're **DEPRECATING** undocumented `?export=` functionality when exporting large datasets without an API key. This feature will be documented in one of the next updates. - * Full support for `CREATE2` in Ethereum (see `https://blockchair.com/ethereum/calls?q=type(create2)#`) - * When using CSV/TSV API (undocumented `?export=` functionality) amounts in USD are now shown as in the JSON API version (previously you had to divide them by 10000). `bitcoin.outputs.type`, `ethereum.transaction.type`, and `ethereum.calls.type` now yield strings (e.g. `pubkeyhash` instead of `2`). -* v.2.0.13 - Feb 13th, 2019 - * Added support for Cyrillic characters in fulltext search, e.g. `https://api.blockchair.com/bitcoin/outputs?q=script_bin(~привет)` -* v.2.0.12 - Feb 12th, 2019 - * Fixed a bug in Ethereum where some contract creations were erroneously shown as failed (thanks Daniel Luca for noticing) -* v.2.0.11 - Feb 5th, 2019 - * We're changing behavior of our `mempool` tables (for all supported coins except for Ethereum): now they don't contain the contents of the latest block (it was quite a clumsy thing to have both mempool transactions and transactions from the latest block in this table, but we've rebuilt our engine, so now `mempool` tables contain mempool content only, and it finally makes sense!). That means: - * `{chain}/mempool/blocks` is deprecated. Hint: if you used `mempool/blocks` to get info about the latest block you can simply switch to using `blocks?limit=1`, e.g. `https://api.blockchair.com/bitcoin/blocks?limit=1` - * `{chain}/mempool/transactions` and `{chain}/mempool/outputs` now don't contain info from the latest block, while `{chain}/transactions` and `{chain}/outputs` do - * Before this update when using (undocumented) `export` functionality there was no information about the latest block at all, now there is - * The same change to Ethereum will come in one of the next updates - * Dogecoin is out of beta. - * Bitcoin SV is out of beta. Please note there's still a possibility that we won't be able to offer some functionality in the long term if blocks suddenly become larger than 1 exabyte, we're still waiting for a more clear development roadmap. -* v.2.0.10 - Jan 29th, 2019 - * Added Dogecoin support in test mode -* v.2.0.9 - Dec 13th, 2018 - * Added Bitcoin SV support in test mode; updated [aggregation abilities](#data-aggregation-support-since-oct-8th) -* v.2.0.8 - Nov 26th, 2018 - * Added the ability to retrieve raw transaction data in hex, see [Retrieving raw transactions](#retrieving-raw-transactions) -* v.2.0.7 - Nov 22th, 2018 - * Now it's possible to broadcast transactions using our API, see [Broadcasting transactions](#broadcasting-transactions) -* v.2.0.6 - Oct 8th, 2018 - * Added data aggregation of blockchain data in beta mode, see `Data aggregation support` below -* v.2.0.5 - Oct 8th, 2018 - * Fixed bug where `balance` and `received` for bitcoin[-cash]|litecoin addresses in the `{chain}/dashboards/address/{address}` call were calculated wrong if there were specific unconfirmed transactions -* v.2.0.4 - Oct 3rd, 2018 - * Added some new useful fields to `{chain}/stats` calls -* v.2.0.3 - Sep 18th, 2018 - * Added `context.api.tested_features` with the list of features our API supports, but with no guarantee for backward compatibility if updated. Added Omni Layer and Wormhole support in testing mode (see the "Tested features changelog" below) -* v.2.0.2 - Sep 9th, 2018 - * Added `address.contract_created` to the `ethereum/dashboards/address/{A}` call -* v.2.0.1 - Sep 1st, 2018 - * Added Litecoin support - -### Tested features changelog - -##### ERC-20 support (since Sep 13th 2019) - -* v.a1 - Sep 13th - See the changelog for v.2.0.36 - -##### Ripple support (since Apr 17th 2019) - -* v.a1 - Apr 17th - Added alpha support for Ripple. We're not releasing the documentation for API yet, but we begin using it in our front end ourselves. If you're interested in participating in alpha test, drop us a line at <`info@blockchair.com`> - -##### Ethereum graph (since Apr 17th 2019) - -* v.a1 - Apr 17th - It's now possible to find connections between two Ethereum addresses using our API. Please note that since it's a resource consuming feature, it's available to our Private API users only (if you're interested in participating in alpha test, drop us a line at <`info@blockchair.com`>) - -##### xpub support (since Mar 6th 2019) - -* v.b5 - Jun 19th - * Added support for Groestlcoin - * Fixed a bug where some addresses were missing if there were huge gaps between used address (according the BIP44 / BIP32 standards the maximum gap is currently set to 20). Thanks to the Groestlcoin team for providing us with some great xpub examples. - * Fixed a bug where some of xpubs containing a very large set of addresses (>100) returned a 500 error. -* v.b4 - May 24th - * Added support for Dash -* v.b3 - Apr 2nd - * Fixed a bug where unconfirmed balance didn't show up for xpubs - * Some optimizations to the address calculation process have been made, now response is generated 2.5-3x times faster - * Breaking change: paths for ypub, zpub (and possibly in the future for ltub, etc.) now all start with `https://api.blockchair.com/{chain}/dashboards/xpub/`, i.e. to use ypub functionality you'll need to use `https://api.blockchair.com/{chain}/dashboards/xpub/{ypub}` instead of `https://api.blockchair.com/{chain}/dashboards/ypub/{ypub}` -* v.b2 - Mar 13th - We're bringing support for ypub and zpub as well (for Bitcoin and Litecoin). The endpoints are `https://api.blockchair.com/{chain}/dashboards/ypub/{ypub}` and `https://api.blockchair.com/{chain}/dashboards/zpub/{zpub}` (where `{chain}` is one of these: `bitcoin`, `litecoin`) -* v.b1 - Mar 6th - There's now support for retrieving info about multiple addresses using xpub keys. Use `https://api.blockchair.com/{chain}/dashboards/xpub/{xpub}` (where `{chain}` is one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, e.g. `https://api.blockchair.com/bitcoin/dashboards/xpub/xpub6CUGRUonZSQ4TWtTMmzXdrXDtypWKiKrhko4egpiMZbpiaQL2jkwSB1icqYh2cfDfVxdx4df189oLKnC5fSwqPfgyP3hooxujYzAu3fDVmz`). The response contains following keys: - * `xpub` - information about group of addresses, including its current balance (`xpub.balance`) - * `addresses` - array of addresses (returns the same schema as `https://api.blockchair.com/{chain}/dashboards/address/{addr}` with two exceptions: there's no `transaction_count` key, and there's `path key` showing xpub path) - * `transactions` - hashes of the latest transactions, iterable using `?offset=N` - -##### Data aggregation support (since Oct 8th 2018) - -* v.b5 - Jul 4th - Added an ability to aggregate over the `addresses table`. -* v.b4 - Apr 2nd - Fixed a bug where some usd values under functions when exporting to TSV/CSV were multiplied by 10000. Use `&export=tsv` or `&export=csv` to export the dataset into the corresponding format, e.g.: `https://api.blockchair.com/bitcoin/transactions?a=date,avg(fee_usd)&q=time(2019-01-01..2019-04-01)&export=tsv` -* v.b3 - Mar 6th - * New function `price({ticker1}_{ticker2})` which shows the price if `date` (or one of: `week`, `month`, `year`) is also applied. E.g. it's now possible to build a chart showing correlation between price and transaction count: `https://api.blockchair.com/bitcoin/blocks?a=month,sum(transaction_count),price(btc_usd)`. Supported tickers: usd, btc, bch, bsv, eth, ltc, doge. - * Output values now have correct types (e.g. `sum(transaction_count)` is now integer instead of string). - * Now it's possible to use special functions and applying special filters to them. Two examples: - * `https://api.blockchair.com/bitcoin/blocks?a=date,f(sum(witness_count)/sum(transaction_count))&q=time(2017-08-24..)` - calculate SegWit adoption - * `https://api.blockchair.com/bitcoin/outputs?a=date,f(count()/count())&q=type(nulldata),time(2019-02)&aq=0:0` - calculate the percentage of nulldata outputs: the `?aq=0:0` section applies 0th condition to 0th function (NB: after that 0th condition isn't used in the `WHERE` clause) -* v.b2 - Dec 12th - Now it's possible to apply `?limit=` and `?offset=` sections to aggregated queries. `context.total_rows` now shows how many aggregated results are there, and `context.rows` shows how many are shown. -* v.b1 - Oct 8th - Bringing the ability to obtain aggregated data. Now you can use Blockchair not only to filter and sort blockchain data, but also to aggregate it. - -Please don't use this in production yet, there could be massive changes! - -See the examples: -* https://api.blockchair.com/bitcoin/blocks?a=year,count()# - get the total number of Bitcoin blocks by year -* https://api.blockchair.com/bitcoin/transactions?a=month,median(fee_usd)# - get the median Bitcoin transaction fees by month -* https://api.blockchair.com/ethereum/blocks?a=miner,sum(generation)&s=sum(generation)(desc)# - get the list of Ethereum miners (except uncle miners) and sort it by the total amount minted -* https://api.blockchair.com/bitcoin-cash/blocks?a=sum(fee_total_usd)&q=id(478559..)# - calculate how much miners have collected in fees since the fork +## [Blockchair.com](https://blockchair.com/) API v.2.0.38 Documentation + +``` + ____ __ __ __ _ + / __ )/ /___ _____/ /_______/ /_ ____ _(_)____ + / __ / / __ \/ ___/ //_/ ___/ __ \/ __ `/ / ___/ + / /_/ / / /_/ / /__/ ,< / /__/ / / / /_/ / / / +/_____/_/\____/\___/_/|_|\___/_/ /_/\__,_/_/_/ + +``` + +## Table of contents + ++ [Introduction](#link_M0) + + [Supported blockchains and second layers](#link_M01) + + [Quick endpoint reference](#link_M02) + + [Basic API request](#link_M03) + + [Basic API response](#link_M04) + + [API rate limits, API keys, and Premium API](#link_M05) + + [API versioning](#link_M06) ++ [General stats endpoints](#link_M1) (Retrieve overall information about blockchains and tokens) + + [Stats on multiple blockchains at once](#link_000) + + [Bitcoin-like blockchain stats](#link_001) + + [Ethereum-like blockchain stats](#link_002) + + [Ripple-like blockchain stats](#link_003) + + [Omni Layer stats](#link_500) + + [Wormhole stats](#link_500) + + [ERC-20 stats](#link_509) ++ [Dashboard endpoints](#link_M2) (Retrieve information about various entities in a neat format from our databases) + + [Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin, and Bitcoin Testnet](#link_M21) + + [Block](#link_100) + + [Transaction](#link_200) + + [Address and extended public key (xpub)](#link_300) + + [Ethereum](#link_M22) + - [Block](#link_103) + - [Uncle](#link_401) + - [Transaction](#link_204) + - [Address](#link_302) + + [Second layers](#link_M23) + - [Omni Layer property](#link_501) + - [Wormhole property](#link_501) + - [ERC-20 token](#link_503) + - [ERC-20 token holder](#link_504) ++ [Raw data endpoints](#link_M3) (Retrieve raw information about various entities directly from our full nodes) + - [Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin, and Bitcoin Testnet](#link_M31) + - [Block](#link_101) + - [Transaction](#link_201) + - [Ethereum](#link_M32) + - [Block](#link_104) + - [Transaction](#link_205) + - [Ripple](#link_M33) + - [Ledger](#link_106) + - [Transaction](#link_207) + - [Account](#link_303) ++ [Infinitable endpoints (blockchain tables)](#link_05) (Filter, sort, and aggregate blockchain data) + + [Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin, and Bitcoin Testnet](#link_M41) + + [Blocks](#link_102) (table) + + [Transactions](#link_203) (table) + + [Outputs](#link_400) (table) + + [Addresses](#link_301) (view) + + [Ethereum](#link_M42) + + [Blocks](#link_102) (table) + + [Uncles](#link_402) (table) + + [Transactions](#link_206) (table) + + [Calls](#link_403) (table) + + [Second layers](#link_M43) + + [Omni Layer properties](#link_502) (table) + + [Wormhole properties](#link_502) (table) + + [ERC-20 tokens](#link_505) (table) + + [ERC-20 transactions](#link_506) (table) ++ [Misc endpoints](#link_M5) + + [Broadcasting transactions](#link_202) + + [Nodes](#link_508) + + [State changes](#link_507) + + [Premium API endpoints](#link_M51) + + [Premium API usage stats](#link_600) ++ [Support](#link_M7) + + + +## Introduction + +Blockchair API provides developers with access to data contained in [9 different blockchains](#link_M01). Unlike other APIs, Blockchair also support numerous analytical queries like filtering, sorting, and aggregating blockchain data. + +Here are some examples of what you can build using our API: + +* A wallet supporting multiple blockchains (request transaction, address, xpub data, and also broadcast transactions) +* An analytical service showing some blockchain stats and visualizations +* A service tracking the integrity of your or your customers' cold wallets +* A solid academic research +* Some fun stuff like finding the first Bitcoin block over 1 megabyte in size + +For some tasks like extracting lots of blockchain data (e.g. all transactions over a 2 month period) it's better to use our Database dumps feature instead (see https://blockchair.com/dumps for documentation) — it's possible to download the entire database dumps in TSV format and insert the data onto your own database server (like Postgresql or whatever) to further analyze it. + +Almost every API endpoint description is accompanied with an example visualization of the data on our website (https://blockchair.com), and it's also worth it to note that the website is working completely using our API (yes, even the data for charts is pulled from one of our endpoints, and it's fully customizable). + +Blockchair cares about user privacy, we neither collect nor share with anyone your personal data rather than for statistical purposes. That includes using the API as well. Please refer to our Privacy policy: https://blockchair.com/privacy. Please also check out our Terms of service available here: https://blockchair.com/terms — by using our API, you are agreeing to these terms. + +We have a public tracker for bugs, issues, and questions available on GitHub: https://github.com/Blockchair/Blockchair.Support/issues — please use it or contact us by [any other means available](#M7). + +Our API is free to try under some limitations, and we have a variety of premium plans. Please check out the information about [the limits and plans](#M05). + + + +### Supported blockchains and second layers + +As of today, our API supports **9 blockchains** divided into 3 groups: +* Bitcoin-like blockchains (Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin), also known as UTXO-based blockchains +* Ethereum-like blockchains (Ethereum) +* Ripple-like blockchains (Ripple) + +Within a group, there's no or little difference between the set of available endpoints and their output. + +| Blokchain | Group | API path prefix | Support status | +|-----------|------|----------|-------------| +| Bitcoin | Bitcoin-like | `https://api.blockchair.com/bitcoin` | Full support | +| Bitcoin Cash | Bitcoin-like | `https://api.blockchair.com/bitcoin-cash` | Full support | +| Ethereum | Ethereum-like | `https://api.blockchair.com/ethereum` | Full support | +| Litecoin | Bitcoin-like | `https://api.blockchair.com/litecoin` | Full support | +| Bitcoin SV | Bitcoin-like | `https://api.blockchair.com/bitcoin-sv` | Full support | +| Dogecoin | Bitcoin-like | `https://api.blockchair.com/dogecoin` | Full support | +| Dash | Bitcoin-like | `https://api.blockchair.com/dash` | Full support | +| Ripple | Ripple-like | `https://api.blockchair.com/ripple` | Alpha mode, possible compatibility-breaking changes | +| Groestlcoin | Bitcoin-like | `https://api.blockchair.com/groestlcoin` | Full support, community-backed till June 18th, 2020 | + +There are also following testnets supported which are technically considered as separate blockchains: + +| Blokchain | Group | API path prefix | Support status | +|-----------|------|----------|-------------| +| Bitcoin Testnet | Bitcoin-like | `https://api.blockchair.com/bitcoin/testnet` | Full support | + +We aim to support more blockchains (and their testnets) in future to cover as many users as possible. We don't disclose which blockchains we'll add next and how we choose them, but our main markers are daily number of real transactions and market capitalization. If you're representing a coin community which would like to add its blockchain to our platform, we'd be happy to talk. + +As a general rule, if we add a blockchain to our platform, it means we'll support it and related functions indefinitely. However, there are some exceptions: + +* Since a blockchain system can be an unstable product, we may cease support in case the blockchain itself (or the node software we're using) stops to function or starts to function improperly; +* If a blockchain hard-forks and that results in a new ruleset we can't support for technical or other reasons, we may either drop support for this blockchain, or don't accept the new ruleset; +* If a blockchain is community-backed, we guarantee support till some specified date (this is reflected in the tables above). If its community decides not to prolong the agreement with Blockchair after that date, we may either continue to support that blockchain for free, or drop support for it; +* If we see that a particular blockchain became unpopular on our platform, we may terminate its support with a 3 month notice. + +Blockchair API also supports **3 layer 2 solutions** (tokens) divided into 2 groups: + +* Omni-like tokens (Omni Layer on top of Bitcoin, Wormhole on top of Bitcoin Cash) +* ERC-20-like tokens (ERC-20's on top of Ethereum) + +Like with blockchains, within a group, there's no or little difference between the available endpoints. + +| Layer 2 | Group | Parent blockchain | API path prefix | Support status | +| ---------- | ----------- | ----------------- | -------------------------------------------------- | ------------------------------------------------ | +| Omni Layer | Omni-like | Bitcoin | `https://api.blockchair.com/bitcoin/omni` | Alpha support | +| Wormhole | Omni-like | Bitcoin Cash | `https://api.blockchair.com/bitcoin-cash/wormhole` | Deprecated, alpha support till January 1st, 2020 | +| ERC-20 | ERC-20-like | Ethereum | `https://api.blockchair.com/ethereum/erc-20` | Beta support | + +We also plan to bring ERC-721 support in the near future. Please note that we'll be dropping support for Wormhole on January 1st, 2020 as it's not used by anyone anymore. + + + +### Quick endpoint reference + +This is the full list of available API endpoints. + +- `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, or `bitcoin/testnet` +- `{:eth_chain}` can be only `ethereum` +- `{:xrp_chain}` can be only `ripple` + +| API path | Docs | Base request cost | Status | +| ----------------------------------------------- | :----------------: | -----------------------------: | :---------------------------------------------: | +| **General stats** | — | — | — | +| `https://api.blockchair.com/stats` | [👉](#link_000) | `1` | Stable | +| `https://api.blockchair.com/{:btc_chain}/stats` | [👉](#link_001) | `1` | Stable | +| `https://api.blockchair.com/{:eth_chain}/stats` | [👉](#link_002) | `1` | Stable | +| `https://api.blockchair.com/{:xrp_chain}/stats` | [👉](#link_003) | `1` | Alpha | +| **Block-related information** | — | — | — | +| `https://api.blockchair.com/{:btc_chain}/dashboards/block/{:height}₀` | [👉](#link_100) | `1` | Stable | +| `https://api.blockchair.com/{:btc_chain}/dashboards/block/{:hash}₀` | [👉](#link_100) | `1` | Stable | +| `https://api.blockchair.com/{:btc_chain}/dashboards/blocks/{:height}₀,...,{:height}ᵩ` | [👉](#link_100) | `1 + 0.1*c` | Stable | +| `https://api.blockchair.com/{:btc_chain}/dashboards/blocks/{:hash}₀,...,{:hash}ᵩ` | [👉](#link_100) | `1 + 0.1*c` | Stable | +| `https://api.blockchair.com/{:btc_chain}/raw/block/{:height}₀` | [👉](#link_101) | `1` | Unstable | +| `https://api.blockchair.com/{:btc_chain}/raw/block/{:hash}₀` | [👉](#link_101) | `1` | Unstable | +| `https://api.blockchair.com/{:btc_chain}/blocks?{:query}` | [👉](#link_102) | `2` | Stable | +| `https://api.blockchair.com/{:eth_chain}/dashboards/block/{:height}₀` | [👉](#link_103) | `1` | Stable | +| `https://api.blockchair.com/{:eth_chain}/dashboards/block/{:hash}₀` | [👉](#link_103) | `1` | Stable | +| `https://api.blockchair.com/{:eth_chain}/dashboards/blocks/{:height}₀,...,{:height}ᵩ` | [👉](#link_103) | `1 + 0.1*c` | Stable | +| `https://api.blockchair.com/{:eth_chain}/dashboards/blocks/{:hash}₀,...,{:hash}ᵩ` | [👉](#link_103) | `1 + 0.1*c` | Stable | +| `https://api.blockchair.com/{:eth_chain}/raw/block/{:height}₀` | [👉](#link_104) | `1` | Unstable | +| `https://api.blockchair.com/{:eth_chain}/raw/block/{:hash}₀` | [👉](#link_104) | `1` | Unstable | +| `https://api.blockchair.com/{:eth_chain}/blocks?{:query}` | [👉](#link_105) | `2` | Stable | +| `https://api.blockchair.com/{:xrp_chain}/raw/ledger/{:height}₀` | [👉](#link_106) | `1` | Alpha | +| `https://api.blockchair.com/{:xrp_chain}/raw/ledger/{:hash}₀` | [👉](#link_106) | `1` | Alpha | +| **Transaction-related information and actions** | — | — | — | +| `https://api.blockchair.com/{:btc_chain}/dashboards/transaction/{:hash}₀` | [👉](#link_200) | `1` | Stable | +| `https://api.blockchair.com/{:btc_chain}/dashboards/transactions/{:hash}₀,...,{:hash}ᵩ` | [👉](#link_200) | `1 + 0.1*c` | Stable | +| `https://api.blockchair.com/{:btc_chain}/raw/transaction/{:hash}₀` | [👉](#link_201) | `1` | Unstable | +| `https://api.blockchair.com/{:btc_chain}/push/transaction` (`POST`) | [👉](#link_202) | `1` | Stable | +| `https://api.blockchair.com/{:btc_chain}/transactions?{:query}` | [👉](#link_203) | `5` | Stable | +| `https://api.blockchair.com/{:btc_chain}/mempool/transactions?{:query}` | [👉](#link_203) | `2` | Stable | +| `https://api.blockchair.com/{:eth_chain}/dashboards/transaction/{:hash}₀` | [👉](#link_204) | `1` | Stable | +| `https://api.blockchair.com/{:eth_chain}/dashboards/transactions/{:hash}₀,...,{:hash}ᵩ` | [👉](#link_204) | `1 + 0.1*c` | Stable | +| `https://api.blockchair.com/{:eth_chain}/raw/transaction/{:hash}₀` | [👉](#link_205) | `1` | Unstable | +| `https://api.blockchair.com/{:eth_chain}/push/transaction` (`POST`) | [👉](#link_202) | `1` | Stable | +| `https://api.blockchair.com/{:eth_chain}/transactions?{:query}` | [👉](#link_206) | `5` | Stable | +| `https://api.blockchair.com/{:eth_chain}/mempool/transactions?{:query}` | [👉](#link_206) | `2` | Stable | +| `https://api.blockchair.com/{:xrp_chain}/raw/transaction/{:hash}₀` | [👉](#link_207) | `1` | Alpha | +| **Address-related information** | — | — | — | +| `https://api.blockchair.com/{:btc_chain}/dashboards/address/{:address}₀` | [👉](#link_300) | `1` | Stable | +| `https://api.blockchair.com/{:btc_chain}/dashboards/addresses/{:address}₀,...,{:address}ᵩ` | [👉](#link_300) | `1 + 0.1*c` | Stable | +| `https://api.blockchair.com/{:btc_chain}/dashboards/xpub/{:extended_key}` | [👉](#link_300) | `1 + 0.1*d` | Beta | +| `https://api.blockchair.com/{:btc_chain}/addresses?{:query}` | [👉](#link_301) | `2` | Stable | +| `https://api.blockchair.com/{:eth_chain}/dashboards/address/{:address}₀` | [👉](#link_302) | `1` | Stable | +| `https://api.blockchair.com/{:xrp_chain}/raw/account/{:address}₀` | [👉](#link_303) | `1` | Alpha | +| **Special entities** | — | — | — | +| `https://api.blockchair.com/{:btc_chain}/outputs?{:query}` | [👉](#link_400) | `10` | Beta | +| `https://api.blockchair.com/{:btc_chain}/mempool/outputs?{:query}` | [👉](#link_400) | `2` | Stable | +| `https://api.blockchair.com/{:eth_chain}/dashboards/uncle/{:hash}₀` | [👉](#link_401) | `1` | Stable | +| `https://api.blockchair.com/{:eth_chain}/dashboards/uncles/{:hash}₀,...,{:hash}ᵩ` | [👉](#link_401) | `1 + 0.1*c` | Stable | +| `https://api.blockchair.com/{:eth_chain}/uncles?{:query}` | [👉](#link_402) | `2` | Stable | +| `https://api.blockchair.com/{:eth_chain}/calls?{:query}` | [👉](#link_403) | `10` | Stable | +| **Special second layer protocol endpoints (Omni Layer, Wormhole, ERC-20 tokens)** | — | — | — | +| `https://api.blockchair.com/bitcoin/omni/stats` | [👉](#link_500) | `1` | Alpha | +| `https://api.blockchair.com/bitcoin/omni/dashboards/property/{:prorerty_id}` | [👉](#link_501) | `1` | Alpha | +| `https://api.blockchair.com/bitcoin/omni/properties` | [👉](#link_502) | `10` | Alpha | +| `https://api.blockchair.com/bitcoin-cash/wormhole/stats` | [👉](#link_500) | `1` | Alpha | +| `https://api.blockchair.com/bitcoin-cash/wormhole/dashboards/property/{:prorerty_id}` | [👉](#link_501) | `1` | Alpha | +| `https://api.blockchair.com/bitcoin-cash/wormhole/properties` | [👉](#link_502) | `10` | Alpha | +| `https://api.blockchair.com/ethereum/erc-20/{:token_address}/stats` | [👉](#link_503) | `1` | Beta | +| `https://api.blockchair.com/ethereum/erc-20/{:token_address}/dashboards/address/{:address}` | [👉](#link_504) | `1` | Beta | +| `https://api.blockchair.com/ethereum/erc-20/tokens?{:query}` | [👉](#link_505) | `2` | Beta | +| `https://api.blockchair.com/ethereum/erc-20/transactions?{:query}` | [👉](#link_506) | `5` | Beta | +| **State changes** | — | — | — | +| `https://api.blockchair.com/{:btc_chain}/state/changes/block/{:block_id}` | [👉](#link_507) | `5` | Stable | +| `https://api.blockchair.com/{:btc_chain}/state/changes/mempool` | [👉](#link_507) | `10` | Stable | +| `https://api.blockchair.com/{:eth_chain}/state/changes/block/{:block_id}` | [👉](#link_507) | `5` | Stable | +| **Network nodes** | — | — | — | +| `https://api.blockchair.com/nodes` | [👉](#link_508) | `1` | Stable | +| `https://api.blockchair.com/{:btc_chain}/nodes` | [👉](#link_508) | `1` | Stable | +| **Special Premium API endpoints** | — | — | — | +| `https://api.blockchair.com/premium/stats?key={:api_key}` | [👉](#link_600) | `0` | Stable | + +Please note there are some endpoints which aren't listed here (most of the times they have the `https://api.blockchair.com/internal` prefix), but used by our web interface — these endpoints aren't meant to be used by 3rd parties. + +The base request cost is used only if there are no additional parameters included in the request, and the default limits on the number of results are used. For example, if you're requesting info on ERC-20 tokens while getting data on an Ethereum address using a special parameter or increasing the number of latest transactions for this address, you may be charged additional request points. `c` in formulas means "number of requested entities". `d` means "depth" (applied to xpub lookups). Detailed cost formulas are available in the corresponding documentation sections. + + + +### Basic API request + +Requests to the API should be made through the HTTPS protocol by GET requests to the domain `api.blockchair.com`. Here's an example request URL: `https://api.blockchair.com/bitcoin/blocks?a=sum(generation)` + +```bash +> curl 'https://api.blockchair.com/bitcoin/blocks?a=sum(generation)' +{"data":[{"sum(generation)":1800957104497237}],"context":{"code":200,"source":"A","time":0.007825851440429688,"limit":10000,"offset":null,"rows":1,"pre_rows":1,"total_rows":1,"state":600767,"cache":{"live":true,"duration":60,"since":"2019-10-23 21:33:00","until":"2019-10-23 21:34:00","time":null},"api":{"version":"2.0.38","last_major_update":"2019-07-19 18:07:19","next_major_update":null,"tested_features":"omni-v.a1,whc-v.a1,aggregate-v.b5,xpub-v.b5,ripple-v.a1,ethgraph-v.a1,erc_20-v.a1","documentation":"https:\/\/github.com\/Blockchair\/Blockchair.Support\/blob\/master\/API.md","notice":"Beginning July 19th, 2019 all applications using Blockchair API on a constant basis should apply for an API key (mailto:info@blockchair.com)"}}} +``` + +Here are some considerations: + +* If you're building a web app, your users shouldn't make direct API requests from there. While we don't have any limitations in our CORS policy (API currently responds with a `Access-Control-Allow-Origin: *` header), that policy may be changed in the future without any warnings +* Please don't use some random keys in your requests (e.g. `?random_key=random_value`) as this can result in a `400` error (though we don't force this rule at the moment for most of our endpoints) +* If you're using the API with an API key, you should keep it in secret. In order to build an app for public use using our API, you should build a proxy, so the requrst flow will look like the following: `user → https://your-proxy/{:request_string} → http://api.blockchair.com/{:request_string}?key={:api_key}` — that way you won't disclose the key to your users +* The only exception to the "requests should be made using GET" rule is the [Broadcasting transactions](#link_202) endpoint accepting POST requests + + + +### Basic API response + +API returns JSON-encoded data. Typically, the response is an array consisting of two subarrays: + +* `data` — contains the data you requested + +* `context` — contains some metadata, e.g. a status code, query execution time, used options, etc. Here are some of it (note that not all endpoints return all of the keys listed here): + * `context.code` — server response code (also included in HTTP headers), can return: + * `200` if the request succeeded + * `400` if there is a user error in the request + * `404` for some endpoints in case there's no results (this behavior is deprecated), also if you're requesting non-existing endpoint + * `402`, `429`, or `435` if any limit on the number or complexity of requests is exceeded (see [the list of limits](#link_M05), and please [contact us](#link_M05) if you'd like to increase them) + * `430`, `434`, or `503` if your IP address is temporarily blocked + * `500` or` 503` in case of a server error (it makes sense to wait and repeat the same request or open a ticket at https://github.com/Blockchair/Blockchair.Support/issues/new or write to ) + * `context.error` — error description in the case there's an error + * `context.state` — number of the latest known block (e.g., for all requests to endpoints connected to the Bitcoin blockchain this will yield the latest block number for Bitcoin). For example, it may be useful to calculate the number of network сonfirmations, or correctly iterate trough the results using `?offset=`. Not returned if the request has failed. + * `context.state_layer_2` — the latest block number for which our engine has processed second layer (e.g. ERC-20) transactions. If it's less than the block id in your current environment (e.g. block id of a transaction you requested), it makes sense to repeat the request after some time to retrieve second layer data + * `context.results` — contains the number of found results (dashboard and raw endpoints) + * `context.limit` — applied limit to the number of results (the default one or user set in the `?limit=` query section) + * `context.offset` — applied offset (the default one or user set in the `?offset=` query section) + * `context.rows` — contains the number of shown rows returned from the database (infinitable endpoints) + * `context.total_rows` — total number of rows meeting the request (infinitable endpoints) + * `context.api` — array of data on the status of the API: + * `context.api.version` — version of API + * `context.api.last_major_update` — timestamp of the last update, that somehow has broken backward compatibility for "stable" endpoints + * `context.api.next_major_update` — timestamp of the next scheduled update, that can break compatibility, or` null`, if there are no updates scheduled + * `context.api.documentation` — an URL to the latest version of documentation + * `context.api.notice` — just a text notice which, for example, may describe upcoming changes (this is an optional field) + * `context.cache` — array of info on whether the response comes from the cache or not + * `context.cache.live` — `false` if the response comes from the cache, `true` otherwise + * `context.cache.until` — cache expiry timestamp + +There are also some things which are the same across all endpoints: + +* All timestamps are in the UTC timezone, and have the following format: `YYYY-MM-DD hh:ii:ss` . If you require an ISO 8601 timestamp with the timezone, just replace the space with a `T`, and append `Z` to the timestamp (e.g. `2009-01-03 18:15:05` will then become `2009-01-03T18:15:05Z`) +* There are some endpoints allowing you to request data in formats other than JSON (e.g. TSV or CSV). In that case, the API returns plain output data in the desired format without metadata +* Most of the responses are cached for some amount of time. Bypassing cache is allowed in some of our [Premium API plans](#link_M05) (see the next documentation section) + + + +### API rate limits, API keys, and Premium API + +While we do allow to perform some amount of requests free of charge, generally our API is not free to use. + +Here's our policy: + +- If you use our API occasionally for personal use or testing up to 1440 requests a day (1 request a minute in average) — a key is not required +- Non-commercial and academic projects which require up to 1440 requests a day — a key is not required +- Non-commercial and academic projects requiring more than 1440 requests a day should apply for a Premium API key, and are a subject to a discount up to 50% +- Non-commercial and academic projects requiring more than 1440 requests a day which are also Blockchair partners are a subject to a discount up to 100% +- Commercial projects should apply for a key to Premium API not depending on the required number of requests +- Commercial projects which are also Blockchair partners (e.g. linking to Blockchair from the app's interface) are a subject to a discount up to 10% + +| | Up to 1440 requests a day | More than 1440 requests a day | +| ------------------------------ | ------------------------- | ------------------------------------ | +| **Personal or testing** | Key is not needed | Key is required | +| **Non-commercial or academic** | Key is not needed | Key is required, up to 100% discount | +| **Commercial** | Key is required | Key is required, up to 10% discount | + +**Our Premium API plans are available here: https://blockchair.com/api/plans, please [contact us](#link_M7) if you're interested.** + +The daily request counter is reset at 00:00 UTC every day. + +There's an additional hard limit of 30 requests per minute on the free plan. + +If you exceed the limit, an error `402` or `429` will be returned. On some of our Premium API plans it's possible to "borrow" requests from the next day if you hit the limit (if your daily limit is `n` and you hit it, `n` more requests will be added to the limit for 1 day, you will be notified, and your subscription period will shrink by 1 day) — this behavior is turned off by default. + +There's an additional soft limit of 5 requests per second on both free and paid plans. This limit is applied only if we experience a very high load on our servers, and it's turned on and off manually by our admins. In case you hit this limit, an error `435` will be returned. + +If you have exceeded the limit multiple times without using a key, an error `430`, `434`, or `503` may be returned meaning that you've been blocked. It's also possible to get automatically blocked without exceeding the limit in case we're seeing botnet usage in order to bypass the limit. If you've been blocked and you believe you haven't abused our API above the limit, please [contact us](#link_M7). If you're using a valid API key it's not possible to get blocked; if you've been previously blocked and starting to use a key, you'll get automatically unblocked. + +**Please note that some of API requests may "cost" more than 1 request.** Here's an example: + +* `https://api.blockchair.com/bitcoin/dashboard/block/0` — requesting information about one block via one request "costs" 1 request +* `https://api.blockchair.com/bitcoin/dashboard/blocks/0,1,2,3,4,5,6,7,8,9` — requesting information about ten blocks via one request "costs" 1.9 requests + +Every API endpoint documentation has the "Request cost formula" section describing how the "cost" is calculated. For most API requests it's always 1. It's more than 1 in cases when you're requiring additional data (e.g. when you're requesting data on an Ethereum address, and you're also requesting its ERC-20 token balances). + +As a kindly reminder, there are tasks such as extracting lots of blockchain data (e.g. all transactions over a 2 month period) which require lots of requests done — it may be better to use our Database dumps feature instead of the API (see https://blockchair.com/dumps for documentation) + +**In order to use an API key, you need to append `?key={:api_key}` or `&key={:api_key}` to the end of request URLs.** You should use `?` if there are no other parameters in the URL, and `&` otherwise. Here are three examples of correct URLs with a key: + +* `https://api.blockchair.com/bitcoin/dashboard/block/0?key=myfirstpasswordwas4321andifeltsmartaboutit` + +* `https://api.blockchair.com/bitcoin/dashboard/block/0?limit=0&key=myfirstpasswordwas4321andifeltsmartaboutit` + +* `https://api.blockchair.com/bitcoin/dashboard/block/0?key=myfirstpasswordwas4321andifeltsmartaboutit&limit=0` + +There's an extra API endpoint for those who have an API key allowing to [track the number of request made](#link_600). + + + +### API versioning + +As a reminder, there's the `context.api` array in every API response which contains the following data: + +- `context.api.version` — version of API +- `context.api.last_major_update` — timestamp of the last update, that somehow has broken backward compatibility for "stable" endpoints +- `context.api.next_major_update` — timestamp of the next scheduled update, that can break compatibility, or` null`, if there are no updates scheduled +- `context.api.documentation` — an URL to the latest version of documentation +- `context.api.notice` — just a text notice which, for example, may describe upcoming changes (this is an optional field) + +When we change something, or add new functions, we bump the API version number. Generally, we try as hard as possible not to bring any compatibility-breaking changes in API updates, but sometimes this is needed as some blockchains change their features themselves, we're fixing various bugs, etc. This doesn't apply, however, to changes to endpoints which are either marked as alpha- or beta-stage functions, or unstable in nature (e.g. all raw endpoints where the API returns data directly from our nodes, and the response may change as we upgrade the nodes). These marks are reflected in the [Quick endpoint reference](#link_M02). + +The changelog is available here: https://github.com/Blockchair/Blockchair.Support/blob/master/API.md + +It makes sense to check if `context.api.version` has increased and/or just whether `context.api.next_major_update` is not `null` or larger than the latest update date known to you. If that's the case — you can send yourself a notification and review the changelog to make your application compatible with the changes starting from `context.api.next_major_update`. + + + +## General stats endpoints + + + +### Stats on multiple blockchains at once + +Allows to retrieve the most important stats on all blockchains we support via just one API request. + +**Endpoint:** + +- `https://api.blockchair.com/stats` + +If you require data on just one blockchain, please use `https://api.blockchair.com/{:chain}/stats` instead. + +**Output:** + +`data` contains an array with stats on all 9 blockchains we support at once: + +- Bitcoin +- Bitcoin Cash +- Ethereum +- Litecoin +- Bitcoin SV +- Dogecoin +- Dash +- Ripple +- Groestlcoin + +Note that Bitcoin Testnet stats are not included in this output. + +Description of the fields is available in the next three sections of documentation. + +**Example output:** + +`https://api.blockchair.com/stats`: + +```json +{ + "data": { + "bitcoin": { + "data": { + "blocks": 599952, + ... + } + }, + "bitcoin-cash": { + "data": { + "blocks": 605134, + ... + } + }, + "bitcoin-sv": { + "data": { + "blocks": 604886, + ... + } + }, + "ethereum": { + "data": { + "blocks": 8766052, + ... + } + }, + "litecoin": { + "data": { + "blocks": 1721519, + ... + } + }, + "dogecoin": { + "data": { + "blocks": 2941267, + ... + } + }, + "dash": { + "data": { + "blocks": 1156197, + ... + } + }, + "ripple": { + "data": { + "ledgers": 50795982, + ... + } + }, + "groestlcoin": { + "data": { + "blocks": 2801282, + ... + } + } + }, + "context": { + "code": 200, + ... + } + } +} +``` + +**Request cost formula:** + +Always `1`. + +**Explore visualizations on our front-end:** + +- https://blockchair.com/ +- https://blockchair.com/compare + + + +### Bitcoin-like blockchain stats + +**Endpoints:** + +* `https://api.blockchair.com/bitcoin/stats` +* `https://api.blockchair.com/bitcoin-cash/stats` +* `https://api.blockchair.com/litecoin/stats` +* `https://api.blockchair.com/bitcoin-sv/stats` +* `https://api.blockchair.com/dogecoin/stats` +* `https://api.blockchair.com/dash/stats` +* `https://api.blockchair.com/groestlcoin/stats` +* `https://api.blockchair.com/bitcoin/testnet/stats` + +**Output:** + +`data` contains an array with blockchain statistics: + +* `blocks` — total number of blocks (note that it's 1 more than the latest block number as there is block #0) +* `transactions` — total number of transactions +* `outputs` — total number of outputs (including spent) +* `circulation` — number of coins in circulation (in satoshi) +* `blockchain_size` — total size of all blocks in bytes (note: it's not the size of a full node, it's just bare blocks; nodes are bigger in size as they use database indexing, etc) +* `nodes`— number of full network nodes (it's an approximate number and actually not a blockchain metric) +* `difficulty` — current mining difficulty +* `hashrate_24h` — approximated hashrate over the last 24 hours (returned as a string as it doesn't fit into an integer) +* `next_retarget_time_estimate` — approximate timestamp of the next difficulty retarget +* `next_difficulty_estimate` — approximate next difficulty value +* `best_block_height` — the latest block height +* `best_block_hash` — the latest block hash +* `best_block_time` — the latest block time +* `mempool_transactions` — number of transactions in the mempool +* `mempool_size` — mempool size in bytes +* `mempool_tps` — number of transactions per second added to the mempool +* `mempool_total_fee_usd` — sum of transaction fees in the mempool, in USD +* `blocks_24h` — number of blocks mined over the last 24 hours +* `transactions_24h` — number of transactions confirmed over the last 24 hours +* `volume_24h` — total monetary volume of transactions over the last 24 hours +* `average_transaction_fee_24h` — average transaction fee over the last 24 hours +* `average_transaction_fee_usd_24h` — the same in USD +* `median_transaction_fee_24h`— median transaction fee over the last 24 hours +* `median_transaction_fee_usd_24h `— the same in USD +* `inflation_24h`— number of new coins mined over the last 24 hours (in satoshi), this can be considered as the daily inflation +* `inflation_usd_24h` — the same in USD +* `cdd_24h`— total coindays destroyed over the last 24 hours +* `largest_transaction_24h`: array of `hash` and `value_usd` — biggest payment over the last 24 hours +* `market_price_usd` — average market price of 1 coin in USD (market data source: CoinGecko) +* `market_price_btc` — average market price of 1 coin in BTC (for Bitcoin it always returns 1) +* `market_price_usd_change_24h_percentage` — market price change in percent for 24 hours +* `market_cap_usd` — market capitalization (coins in circulation * price per coin in USD) +* `market_dominance_percentage` — dominance index (how much % of the total cryptocurrency market is the market capitalization of the coin) +* `countdowns` (optional) — an optional array of events ([`event`, `time_left`] format), where `time_left` is the number of seconds till the `event` +* `suggested_transaction_fee_per_byte_sat` — suggests a proper transaction fee in satoshi per byte based on the latest block + +**Example output:** + +`https://api.blockchair.com/bitcoin/stats`: + +```json +{ + "data": { + "blocks": 586962, + "transactions": 438436033, + "outputs": 1175789668, + "circulation": 1783699604497237, + "blocks_24h": 133, + "transactions_24h": 302792, + "difficulty": 9013786945891.7, + "volume_24h": 203868415027354, + "mempool_transactions": 11206, + "mempool_size": 9700111, + "mempool_tps": 3.183333333333333, + "mempool_total_fee_usd": 17385.9233, + "best_block_height": 586961, + "best_block_hash": "0000000000000000000c0f21dffb88b43aaa38dc561c1744f8964c010ddeed5e", + "best_block_time": "2019-07-25 13:40:20", + "blockchain_size": 231910648585, + "average_transaction_fee_24h": 18150, + "inflation_24h": 166250000000, + "median_transaction_fee_24h": 9812, + "cdd_24h": 53734025.51903, + "largest_transaction_24h": { + "hash": "89037b97c0e8b7762c05c64ff89349e55433c7f2aaa5829dcf401774ad36d171", + "value_usd": 323700000 + }, + "nodes": 9287, + "hashrate_24h": "59651648914812891495", + "inflation_usd_24h": 16578450, + "average_transaction_fee_usd_24h": 1.8099929306260403, + "median_transaction_fee_usd_24h": 0.97845264, + "market_price_usd": 9972, + "market_price_btc": 1, + "market_price_usd_change_24h_percentage": 2.77893, + "market_cap_usd": 177983139916, + "market_dominance_percentage": 64.48, + "next_retarget_time_estimate": "2019-08-06 08:06:58", + "next_difficulty_estimate": 9154306812972, + "countdowns": [ + { + "event": "Reward halving", + "time_left": 25822200 + } + ], + "suggested_transaction_fee_per_byte_sat": 49 + }, + "context": { + "code": 200, + ... + } +} +``` + +**Request cost formula:** + +Always `1`. + +**Explore visualizations on our front-end:** + +- https://blockchair.com/bitcoin +- https://blockchair.com/bitcoin-cash +- https://blockchair.com/litecoin +- https://blockchair.com/bitcoin-sv +- https://blockchair.com/dogecoin +- https://blockchair.com/dash +- https://blockchair.com/groestlcoin + + + +### Ethereum-like blockchain stats + +**Endpoint:** + +- `https://api.blockchair.com/ethereum/stats` + +**Output:** + +`data` contains an array with blockchain statistics: + +- `blocks` — total number of blocks (note that it's 1 more than the latest block number as there is block #0) +- `uncles` — total number of uncles +- `transactions` — total number of transactions +- `calls` — total number of internal calls +- `circulation_approximate` — number of coins in circulation (in wei) +- `blockchain_size` — total size of all blocks in bytes (note: it's not the size of a full node, it's just bare blocks; nodes are bigger in size as they use database indexing, etc) +- `difficulty` — current mining difficulty +- `hashrate_24h` — approximated hashrate over the last 24 hours (returned as a string as it doesn't fit into an integer) +- `best_block_height` — the latest block height +- `best_block_hash` — the latest block hash +- `best_block_time` — the latest block time +- `mempool_transactions` — number of transactions in the mempool +- `mempool_median_gas_price` — median gas price of transactions in the mempool +- `mempool_tps` — number of transactions per second added to the mempool +- `mempool_total_value_approximate` — sum of transaction amounts in the mempool, in wei +- `blocks_24h` — number of blocks mined over the last 24 hours +- `uncles_24h` — number of uncles over the last 24 hours +- `transactions_24h` — number of transactions confirmed over the last 24 hours +- `volume_24h_approximate` — total monetary volume of transactions over the last 24 hours +- `average_transaction_fee_24h` — average transaction fee over the last 24 hours +- `average_transaction_fee_usd_24h` — the same in USD +- `median_transaction_fee_24h`— median transaction fee over the last 24 hours +- `median_transaction_fee_usd_24h `— the same in USD +- `average_simple_transaction_fee_24h` — average simple transfer (i.e. just sending ethers for 21.000 gas) fee over the last 24 hours +- `average_simple_transaction_fee_usd_24h` — the same in USD +- `median_simple_transaction_fee_24h`— median simple transfer fee over the last 24 hours +- `median_simple_transaction_fee_usd_24h `— the same in USD +- `inflation_24h`— number of new coins mined over the last 24 hours (in satoshi), this can be considered as the daily inflation +- `inflation_usd_24h` — the same in USD +- `largest_transaction_24h`: array of `hash` and `value_usd` — biggest payment over the last 24 hours +- `market_price_usd` — average market price of 1 coin in USD (market data source: CoinGecko) +- `market_price_btc` — average market price of 1 coin in BTC (for Bitcoin it always returns 1) +- `market_price_usd_change_24h_percentage` — market price change in percent for 24 hours +- `market_cap_usd` — market capitalization (coins in circulation * price per coin in USD) +- `market_dominance_percentage` — dominance index (how much % of the total cryptocurrency market is the market capitalization of the coin) +- `countdowns` (optional) — an optional array of events ([`event`, `time_left`] format), where `time_left` is the number of seconds till the `event` +- `layer_2.erc_20` — an array of stats on the ERC-20 token layer consisting of the following elements: + - `tokens` — total number of created ERC-20 tokens (which have at least 1 transaction) + - `transactions` — total number of ERC-20 transfers + - `tokens_24h` — number of tokens created over the last 24 hours + - `transactions_24h` — total number of ERC-20 transfers over the last 24 hours + +**Example output:** + +`https://api.blockchair.com/ethereum/stats`: + +```json +{ + "data": { + "blocks": 8765932, + "transactions": 563679664, + "blocks_24h": 6345, + "circulation_approximate": "108198544155730000000000000", + "transactions_24h": 732332, + "difficulty": 2384281079680802, + "volume_24h_approximate": "1942030242954258000000000", + "mempool_transactions": 34803, + "mempool_median_gas_price": 100000000, + "mempool_tps": 1.8333333333333333, + "mempool_total_value_approximate": "890993462756481300000", + "best_block_height": 8765929, + "best_block_hash": "18164bed364f1ceef954e98f2d0ee8af4b45ba2144baa74e203e882dbf4a32f6", + "best_block_time": "2019-10-18 16:27:20", + "uncles": 943033, + "uncles_24h": 353, + "blockchain_size": 106821332817, + "calls": 1416512303, + "average_transaction_fee_24h": "631689895242411", + "median_transaction_fee_24h": "315000000000000", + "inflation_24h": 13293.0625, + "average_simple_transaction_fee_24h": "319074939493396", + "median_simple_transaction_fee_24h": "210000000000000", + "largest_transaction_24h": { + "hash": "0x8cdda43621c13cd6f6f5001c39792aec8602c1bb1fe406558224201b0a79f465", + "value_usd": 17709550.4761 + }, + "hashrate_24h": "198690089973400", + "inflation_usd_24h": 2302358.425, + "average_transaction_fee_usd_24h": 0.10940868985598558, + "median_transaction_fee_usd_24h": 0.054557999999999995, + "average_simple_transaction_fee_usd_24h": 0.05526377952025618, + "median_simple_transaction_fee_usd_24h": 0.036372, + "market_price_usd": 173.2, + "market_price_btc": 0.021793263465708, + "market_price_usd_change_24h_percentage": -3.30365, + "market_cap_usd": 18739592599, + "market_dominance_percentage": 8.63, + "layer_2": { + "erc_20": { + "tokens": 120889, + "transactions": 273663782, + "tokens_24h": 164, + "transactions_24h": 495265 + } + } + }, + "context": { + "code": 200, + ... + } +} +``` + +**Request cost formula:** + +Always `1`. + +**Explore visualization on our front-end:** + +- https://blockchair.com/ethereum + + + +### Ripple-like blockchain stats + +**Endpoint:** + +- `https://api.blockchair.com/ripple/stats` + +**Output:** + +`data` contains an array with blockchain statistics: + +- `ledgers` — total number of ledgers +- `circulation` — number of coins in circulation (in XRP) +- `best_ledger_height` — the latest ledger number +- `best_ledger_hash` — the latest ledger hash +- `best_ledger_time` — the latest ledger time +- `mempool_transactions` — number of unconfirmed transactions +- `mempool_tps` — number of transactions per second added to the mempool +- `mempool_total_fee_usd` — sum of transaction fees in the mempool, in USD +- `ledgers_24h` — number of ledgers closed over the last 24 hours +- `transactions_24h` — number of transactions confirmed over the last 24 hours +- `volume_24h` — total monetary volume of transactions over the last 24 hours +- `average_transaction_fee_24h` — average transaction fee over the last 24 hours +- `average_transaction_fee_usd_24h` — the same in USD +- `median_transaction_fee_24h`— median transaction fee over the last 24 hours +- `median_transaction_fee_usd_24h `— the same in USD +- `inflation_24h`— number of new coins issued over the last 24 hours (can be negative in case more coins are destroyed than issued) +- `inflation_usd_24h` — the same in USD +- `largest_transaction_24h`: array of `hash` and `value_usd` — biggest payment over the last 24 hours +- `market_price_usd` — average market price of 1 coin in USD (market data source: CoinGecko) +- `market_price_btc` — average market price of 1 coin in BTC (for Bitcoin it always returns 1) +- `market_price_usd_change_24h_percentage` — market price change in percent for 24 hours +- `market_cap_usd` — market capitalization (coins in circulation * price per coin in USD) +- `market_dominance_percentage` — dominance index (how much % of the total cryptocurrency market is the market capitalization of the coin) +- `countdowns` (optional) — an optional array of events ([`event`, `time_left`] format), where `time_left` is the number of seconds till the `event` + +**Example output:** + +`https://api.blockchair.com/ripple/stats`: + +```json +{ + "data": { + "market_price_usd": 0.290587, + "market_price_btc": 0.0000365637358586, + "market_price_usd_change_24h_percentage": -3.31938, + "market_cap_usd": 12543700763, + "market_dominance_percentage": 5.78, + "ledgers": 50795576, + "best_ledger_height": 50795575, + "best_ledger_hash": "07AFA06C63D6C24C31CBD83938A711C098D6C251EEAFC7AE65733CEA3D5EE32A", + "best_ledger_time": "2019-10-18 16:28:41", + "mempool_transactions": 43, + "mempool_total_fee_usd": 0.00024496484099999997, + "circulation": 99991318056632960, + "average_transaction_fee_24h": 874.9259920487995, + "median_transaction_fee_24h": 12, + "average_transaction_fee_usd_24h": 0.00025366991765268457, + "median_transaction_fee_usd_24h": 0.000003479196, + "ledgers_24h": 22359, + "transactions_24h": 864272, + "mempool_tps": 10.003148148148147, + "inflation_24h": -756174037, + "inflation_usd_24h": -219.239807069521, + "volume_24h": 712237245463407, + "largest_transaction_24h": { + "hash": "A773E7C3D07D76834280766AF7F90FE7E773E8D5AD77327A603BD6A5B1083611", + "value_usd": 14496650 + } + }, + "context": { + "code": 200, + ... + } +} +``` + +**Request cost formula:** + +Always `1`. + +**Explore visualization on our front-end:** + +- https://blockchair.com/ripple + + + +### Omni Layer and Wormhole stats + +Allows to retrieve the some basic stats on Omni Layer (Bitcoin) and Wormhole (Bitcoin Cash). Since Wormhole is based on Omni Layer, the output is the same for both. Note that this endpoint is in the Alpha stage, and Wormhole is deprecated on our platform. + +**Endpoints:** + +- `https://api.blockchair.com/bitcoin/omni/stats` +- `https://api.blockchair.com/bitcoin-cash/wormhole/stats` + +**Output:** + +`data` contains an array with second layer statistics: + +- `properties` — total number of created properties +- `properties_mainnet` — total number of "mainnet" properties +- `properties_testnet` — total number of "testnet" properties +- `transactions_approximate` — approximate number of transactions +- `latest_transactions` — array of 10 latest transactions + +Note that the "mainnet" and "testnet" terms don't imply using Bitcoin Testnet (or Bitcoin Cash Testnet), the idea behind that is "testnet" properties still live on the Bitcoin Mainnet (or Bitcoin Cash Mainnet), but they have should have no monetary value, and their purpose is for testing only. + +**Example requests:** + +- `https://api.blockchair.com/bitcoin/omni/stats` +- `https://api.blockchair.com/bitcoin-cash/wormhole/stats` + +**Example output:** + +`https://api.blockchair.com/bitcoin/omni/stats`: + +```json +{ + "data": { + "properties": 1187, + "properties_mainnet": 751, + "properties_testnet": 436, + "transactions_approximate": 14406305, + "latest_transactions": [ + { + "property_id": 31, + "property_name": "TetherUS", + "type_id": 0, + "type": "Simple Send", + "sender": "1B4dCsH6MC9XoZ6ob2nngvJesYEfNNtMQS", + "recipient": "1FoWyxwPXuj4C6abqwhjDWdz6D4PZgYRjA", + "valid": false, + "amount": 960000, + "transaction_hash": "ee1f0401cae15e5ad35cc760c99aacc8c25f21814f234bd80038b99d0ec83d9c", + "time": "2019-10-18 19:34:28" + }, + ... + ] + }, + "context": { + "code": 200, + "state": 599972, + ... + } +} +``` + +**Request cost formula:** + +Always `1`. + +**Explore visualizations on our front-end:** + +- https://blockchair.com/bitcoin/omni +- https://blockchair.com/bitcoin-cash/wormhole + + + + +### ERC-20 stats + +There's no separate endpoint to get ERC-20 stats, use `https://api.blockchair.com/ethereum/stats` instead which includes ERC-20 info. Description is available [here](#link_002) + + + + +## Dashboard endpoints + +Retrieve information about various entities in a neat format from our databases + +The API supports a number of calls that produce some aggregated data, or data in a more convenient form for certain entities. + + + +### Dashboard endpoints for Bitcoin-like blockchains (Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin, Bitcoin Testnet) + + + +#### Block info + +**Endpoints:** + +* `https://api.blockchair.com/{:btc_chain}/dashboards/block/{:height}₀` +* `https://api.blockchair.com/{:btc_chain}/dashboards/block/{:hash}₀` +* `https://api.blockchair.com/{:btc_chain}/dashboards/blocks/{:height}₀,...,{:height}ᵩ` (up to 10 blocks, comma-separated) +* `https://api.blockchair.com/{:btc_chain}/dashboards/blocks/{:hash}₀,...,{:hash}ᵩ` (up to 10 blocks, comma-separated) + +**Where:** + +* `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `bitcoin/testnet` +* `{:height}ᵢ` is the block height (integer value), also known as block id +* `{:hash}ᵢ` is the block hash (regex: `/^[0-9a-f]{64}$/i`) + +**Possible options:** + +* `?limit={:limit}` limits the number of returned transaction hashes contained in the block. Default is `100`. Maximum is `10000`. In case of `0` returns an empty transaction hashes array +* `?offset={:offset}` allows to paginate transaction hashes. Default is `0`. Maximum is `1000000`. + +**Output:** + +`data` contains an associative array where found block heights or block hashes used as keys: +* `data.{:id}ᵢ.block` - information about the block (see [Bitcoin-like block object](#link_102) for the field descriptions) +* `data.{:id}ᵢ.transactions` - the array of transaction hashes (sorted by position in the block ascending) included in the block (respecting the set limit and offset) + +Where `{:id}ᵢ` is either `{:height}ᵢ` or `{:hash}ᵢ` from the query string. If there's no `{:id}ᵢ` has been found in the database, there won't be such key. + +Note that the total number of transactions in the block is contained in `data.{:id}ᵢ.block.transaction_count` + +**Context keys:** + +* `context.results` — number of found blocks +* `context.limit` — applied limit +* `context.offset` — applied offset +* `context.state` — best block height on the `{:btc_chain}` chain (tip: it's possible to calculate the number of confirmation block received using this formula: `confirmations = data.{:id}ᵢ.block.id - context.state + 1`) + +**Example requests:** + +* `https://api.blockchair.com/bitcoin/dashboards/block/0` +* `https://api.blockchair.com/bitcoin/dashboards/block/000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f` +* `https://api.blockchair.com/bitcoin/dashboards/blocks/0,1,2,3,4,5,6,7,8,9` +* `https://api.blockchair.com/bitcoin-cash/dashboards/block/556045?limit=10000` +* `https://api.blockchair.com/bitcoin-cash/dashboards/block/556045?limit=10000&offset=10000` +* `https://api.blockchair.com/bitcoin/dashboards/block/9999999` + +**Example output:** + +`https://api.blockchair.com/bitcoin/dashboards/block/0`: + +```json +{ + "data": { + 0: { + "block": { + "id": 0, + "hash": "000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f", + "date": "2009-01-03", + "time": "2009-01-03 18:15:05", + "median_time": "2009-01-03 18:15:05", + "size": 285, + "version": 1, + "version_hex": "1", + "version_bits": "000000000000000000000000000001", + "merkle_root": "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b", + "nonce": 2083236893, + "bits": 486604799, + "difficulty": 1, + "chainwork": "0000000000000000000000000000000000000000000000000000000100010001", + "coinbase_data_hex": "04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73", + "transaction_count": 1, + "input_count": 1, + "output_count": 1, + "input_total": 0, + "input_total_usd": 0, + "output_total": 5000000000, + "output_total_usd": 0, + "fee_total": 0, + "fee_total_usd": 0, + "fee_per_kb": 0, + "fee_per_kb_usd": 0, + "cdd_total": 0, + "generation": 5000000000, + "generation_usd": 0, + "reward": 5000000000, + "reward_usd": 0, + "guessed_miner": "Unknown" + }, + "transactions": [ + "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b" + ] + } + ], + "context": { + "code": 200, + "limit": 100, + "offset": 0, + "results": 1, + "state": 555555, + ... + } + } +} +``` + +**Request cost formula:** + +* `1` for `https://api.blockchair.com/{:btc_chain}/dashboards/block/{:height}₀` and `https://api.blockchair.com/{:btc_chain}/dashboards/block/{:hash}₀ `endpoints +* `1 + (0.1 * (entity count - 1))` for `https://api.blockchair.com/{:btc_chain}/dashboards/blocks/{:height}₀,...,{:height}ᵩ` and `https://api.blockchair.com/{:btc_chain}/dashboards/blocks/{:hash}₀,...,{:hash}ᵩ` endpoints (e.g. it's `1 + (0.1 * (10 - 1)) = 1.9` for requesting 10 blocks) + +**Explore visualizations on our front-end:** + +- https://blockchair.com/bitcoin/block/0 +- https://blockchair.com/bitcoin-cash/block/0 +- https://blockchair.com/litecoin/block/0 +- https://blockchair.com/bitcoin-sv/block/0 +- https://blockchair.com/dogecoin/block/0 +- https://blockchair.com/dash/block/0 +- https://blockchair.com/groestlcoin/block/0 + + + +#### Transaction info + +**Endpoints:** + +* `https://api.blockchair.com/{:chain}/dashboards/transaction/{:hash}₀` +* `https://api.blockchair.com/{:chain}/dashboards/transactions/{:hash}₀,...,{:hash}ᵩ` (up to 10 transactions, comma-separated) + +**Where:** + +* `{:chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `bitcoin/testnet` +* `{:hashᵢ}` is the transaction hash (regex: `/^[0-9a-f]{64}$/i`), also known as txid + +**Possible options:** + +- `?omni=true` (for `bitcoin` only; in alpha test mode) — shows information about Omni Layer token transfers in this transaction +- `?wormhole=true` (for `bitcoin-cash` only; in alpha test mode) — shows information about Wormhole token transfers in this transaction + +**Output:** + +`data` contains an associative array where found transaction hashes are used as keys: + +* `data.{:hash}ᵢ.transaction` — information about the transaction (see [Bitcoin-like transaction object](#link_bitcointransaction)) +* `data.{:hash}ᵢ.inputs` — the array of transaction inputs (sorted by `spending_index` ascending), where each element is a [Bitcoin-like output object](#link_bitcointransaction) (inputs represented as spent outputs), or an empty array in case of coinbase transaction +* `data.{:hash}ᵢ.outputs` — the array of transaction outputs (sorted by `index` ascending), where each element is a [Bitcoin-like output object](#link_bitcointransaction) + +Additional data: +* `data.{:hash}ᵢ.layer_2.omni` (for `bitcoin` only; in alpha test mode) — Omni layer transaction data in case there's any +* `data.{:hash}ᵢ.layer_2.wormhole` (for `bitcoin-cash` only; in alpha test mode) — Wormhole layer transaction data in case there's any + +In case transaction is confirmed on the blockchain, `data.{:hash}ᵢ.transaction.block_id` contains the block number it's included in. If the transaction is in the mempool, `data.{:hash}ᵢ.transaction.block_id` yields `-1`. If the transaction is neither present in the blockchain, nor in the mempool, there won't be `data.{:hash}ᵢ` key with data. + +**Context keys:** + +* `context.results` — number of found transactions +* `context.state` — best block height on the `{:chain}` chain (tip: it's possible to calculate the number of confirmation transaction received using this formula: `confirmations = data.{:id}ᵢ.transaction.block_id - context.state + 1`, or if `data.{:id}ᵢ.transaction.block_id` is `-1` it's an unconfirmed transaction) + +**Example requests:** + +* `https://api.blockchair.com/bitcoin/dashboards/block/0` +* `https://api.blockchair.com/bitcoin/dashboards/blocks/0,1,2,3,4,5,6,7,8,9` +* `https://api.blockchair.com/bitcoin-cash/dashboards/block/556045?limit=10000` +* `https://api.blockchair.com/bitcoin-cash/dashboards/block/556045?limit=10000&offset=10000` +* `https://api.blockchair.com/bitcoin/dashboards/block/9999999` + +**Example output:** + +`https://api.blockchair.com/bitcoin/dashboards/transaction/f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16`: + +```json +{ + "data": { + "f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16": { + "transaction": { + "block_id": 170, + "id": 171, + "hash": "f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16", + "date": "2009-01-12", + "time": "2009-01-12 03:30:25", + "size": 275, + "weight": 1100, + "version": 1, + "lock_time": 0, + "is_coinbase": false, + "has_witness": false, + "input_count": 1, + "output_count": 2, + "input_total": 5000000000, + "input_total_usd": 0.5, + "output_total": 5000000000, + "output_total_usd": 0.5, + "fee": 0, + "fee_usd": 0, + "fee_per_kb": 0, + "fee_per_kb_usd": 0, + "fee_per_kwu": 0, + "fee_per_kwu_usd": 0, + "cdd_total": 149.15856481481 + }, + "inputs": [ + { + "block_id": 9, + "transaction_id": 9, + "index": 0, + "transaction_hash": "0437cd7f8525ceed2324359c2d0ba26006d92d856a9c20fa0241106ee5a597c9", + "date": "2009-01-09", + "time": "2009-01-09 03:54:39", + "value": 5000000000, + "value_usd": 0.5, + "recipient": "12cbQLTFMXRnSzktFkuoG3eHoMeFtpTu3S", + "type": "pubkey", + "script_hex": "410411db93e1dcdb8a016b49840f8c53bc1eb68a382e97b1482ecad7b148a6909a5cb2e0eaddfb84ccf9744464f82e160bfa9b8b64f9d4c03f999b8643f656b412a3ac", + "is_from_coinbase": true, + "is_spendable": true, + "is_spent": true, + "spending_block_id": 170, + "spending_transaction_id": 171, + "spending_index": 0, + "spending_transaction_hash": "f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16", + "spending_date": "2009-01-12", + "spending_time": "2009-01-12 03:30:25", + "spending_value_usd": 0.5, + "spending_sequence": 4294967295, + "spending_signature_hex": "47304402204e45e16932b8af514961a1d3a1a25fdf3f4f7732e9d624c6c61548ab5fb8cd410220181522ec8eca07de4860a4acdd12909d831cc56cbbac4622082221a8768d1d0901", + "spending_witness": "", + "lifespan": 257746, + "cdd": 149.158564814815 + } + ], + "outputs": [ + { + "block_id": 170, + "transaction_id": 171, + "index": 0, + "transaction_hash": "f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16", + "date": "2009-01-12", + "time": "2009-01-12 03:30:25", + "value": 1000000000, + "value_usd": 0.1, + "recipient": "1Q2TWHE3GMdB6BZKafqwxXtWAWgFt5Jvm3", + "type": "pubkey", + "script_hex": "4104ae1a62fe09c5f51b13905f07f06b99a2f7159b2225f374cd378d71302fa28414e7aab37397f554a7df5f142c21c1b7303b8a0626f1baded5c72a704f7e6cd84cac", + "is_from_coinbase": false, + "is_spendable": true, + "is_spent": true, + "spending_block_id": 92240, + "spending_transaction_id": 156741, + "spending_index": 0, + "spending_transaction_hash": "ea44e97271691990157559d0bdd9959e02790c34db6c006d779e82fa5aee708e", + "spending_date": "2010-11-16", + "spending_time": "2010-11-16 20:39:27", + "spending_value_usd": 2.7, + "spending_sequence": 4294967295, + "spending_signature_hex": "4730440220576497b7e6f9b553c0aba0d8929432550e092db9c130aae37b84b545e7f4a36c022066cb982ed80608372c139d7bb9af335423d5280350fe3e06bd510e695480914f01", + "spending_witness": "", + "lifespan": 58208942, + "cdd": 6737.14606481481 + }, + { + "block_id": 170, + "transaction_id": 171, + "index": 1, + "transaction_hash": "f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16", + "date": "2009-01-12", + "time": "2009-01-12 03:30:25", + "value": 4000000000, + "value_usd": 0.4, + "recipient": "12cbQLTFMXRnSzktFkuoG3eHoMeFtpTu3S", + "type": "pubkey", + "script_hex": "410411db93e1dcdb8a016b49840f8c53bc1eb68a382e97b1482ecad7b148a6909a5cb2e0eaddfb84ccf9744464f82e160bfa9b8b64f9d4c03f999b8643f656b412a3ac", + "is_from_coinbase": false, + "is_spendable": true, + "is_spent": true, + "spending_block_id": 181, + "spending_transaction_id": 183, + "spending_index": 0, + "spending_transaction_hash": "a16f3ce4dd5deb92d98ef5cf8afeaf0775ebca408f708b2146c4fb42b41e14be", + "spending_date": "2009-01-12", + "spending_time": "2009-01-12 06:02:13", + "spending_value_usd": 0.4, + "spending_sequence": 4294967295, + "spending_signature_hex": "473044022027542a94d6646c51240f23a76d33088d3dd8815b25e9ea18cac67d1171a3212e02203baf203c6e7b80ebd3e588628466ea28be572fe1aaa3f30947da4763dd3b3d2b01", + "spending_witness": "", + "lifespan": 9108, + "cdd": 4.21666666666667 + } + ] + } + }, + "context": { + "code": 200, + "results": 1, + "state": 555555, + ... + } +} +``` + +**Bonus endpoint:** + +- `https://api.blockchair.com/{:btc_chain}/dashboards/transaction/{:hash}₀/priority` + +For mempool transactions shows priority (`position`) — for chains supporting SegWit by `fee_per_kwu`, for others by `fee_per_kb`— over other transactions (`out_of` mempool transactions). `position` is `null` if the transaction is not in the mempool. Cost: `1`. + +**Request cost formula:** + +- `1` for `https://api.blockchair.com/{:btc_chain}/dashboards/transaction/{:hash}₀` endpoint +- `1 + (0.1 * (entity count - 1))` for `https://api.blockchair.com/{:btc_chain}/dashboards/transactions/{:hash}₀,...,{:hash}ᵩ` endpoint (e.g. it's `1 + (0.1 * (10 - 1)) = 1.9` for requesting 10 transactions) +- Using `?omni=true` or `?wormhole=true` adds `1` for each requested transaction + +**Explore visualization on our front-end:** + +- https://blockchair.com/bitcoin/transaction/4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b + + + +#### Address and extended public key (xpub) info + +**Endpoints:** + +* `https://api.blockchair.com/{:btc_chain}/dashboards/address/{:address}₀` (for a single address; further referred to as the `address` dashboard) +* `https://api.blockchair.com/{:btc_chain}/dashboards/addresses/{:address}₀,...,{:address}ᵩ` (for a set of up to 100 addresses, comma-separated, further referred to as the `addresses` dashboard) +* `https://api.blockchair.com/{:btc_chain}/dashboards/xpub/{:extended_key}` (info on `xpub`, `ypub`, or `zpub` extended key; further referred to as the `xpub` dashboard) + +**Where:** + +* `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `bitcoin/testnet` +* `{:address}ᵢ` is the address, possible formats are: + + * `p2pk`/`p2pkh` format (supported for all blockchains, example for Bitcoin: `1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa`) + * `p2sh` format (supported for all blockchains, example for Bitcoin: `342ftSRCvFHfCeFFBuz4xwbeqnDw6BGUey`) + * Only for the `dashboards/address` endpoint Bitcoin Cash also supports `Legacy` address variant, and Bitcoin SV supports `CashAddr` variant for `p2pkh` and `p2sh` formats. It's also possible to use `bitcoincash:` prefix (examples: `qzyl04w3m99ddpqahzwghn3erallm3e7z5le4aqqmh` or `bitcoincash:qzyl04w3m99ddpqahzwghn3erallm3e7z5le4aqqmh` for both Bitcoin Cash and Bitcoin SV. + * `bech32` format (`witness_v0_keyhash`, `witness_v0_scripthash`, or `witness_unknown` — supported for Bitcoin, Litecoin, Groestlcoin, and Bitcoin Testnet only; example for Bitcoin: `bc1q34aq5drpuwy3wgl9lhup9892qp6svr8ldzyy7c`) + * Internal Blockchair format (for `multisig`. `nulldata`, and `nonstandard` output types) +* `{:extended_key}` is the extended public key, possible formats are: + * `xpub` (supported for all blockchains, example for Bitcoin: `xpub6CUGRUonZSQ4TWtTMmzXdrXDtypWKiKrhko4egpiMZbpiaQL2jkwSB1icqYh2cfDfVxdx4df189oLKnC5fSwqPfgyP3hooxujYzAu3fDVmz`, yields `p2pkh` addresses) + * `ypub` (supported for Bitcoin, Litecoin, Groestlcoin, and Bitcoin Testnet only, example for Bitcoin: `ypub6XiW9nhToS1gjVsFKzgmtWZuqo6V1YY7xaCns37aR3oYhFyAsTehAqV1iW2UCNtgWFQFkz3aNSZZbkfe5d1tD8MzjZuFJQn2XnczsxtjoXr`, yields `p2sh` addresses) + * `zpub` (supported for Bitcoin, Litecoin, Groestlcoin, and Bitcoin Testnet only, example for Bitcoin: `ypub6XiW9nhToS1gjVsFKzgmtWZuqo6V1YY7xaCns37aR3oYhFyAsTehAqV1iW2UCNtgWFQFkz3aNSZZbkfe5d1tD8MzjZuFJQn2XnczsxtjoXr`, yields `witness_v0_keyhash` addresses) -To use aggregation, put the fields by which you'd like to group by (zero, one, or several), and fields (at least one) which you'd like to calculate using some aggregate function under the `?a=` section. You can also sort the results by one of the fields included in the `?a=` section (`asc` or `desc`) using the `?s=` section, and apply additional filters (see the documentation for the `?q=` section). - -Possible fields: -* Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin: - * Blocks table - * Group by: date (or week, month, year), version, guessed_miner - * To calculate: size, stripped_size (except BCH), weight (except BCH), transaction_count, witness_count, input_count, output_count, input_total, input_total_usd, output_total, output_total_usd, fee_total, fee_total_usd, fee_per_kb, fee_per_kb_usd, fee_per_kwu (except BCH), fee_per_kwu_usd (except BCH), cdd_total, generation, generation_usd, reward, reward_usd — possible functions: avg(field), median(field), min(field), max(field), sum(field), count() - * Transactions table - * Group by: block_id, date (or week, month, year), version, is_coinbase, has_witness (except BCH), input_count, output_count - * To calculate: size, weight (except BCH), input_count, output_count, input_total, input_total_usd, output_total, output_total_usd, fee, fee_usd, fee_per_kb, fee_per_kb_usd, fee_per_kwu (except BCH), fee_per_kwu_usd (except BCH), cdd_total — possible functions: avg(field), median(field), min(field), max(field), sum(field), count() - * Outputs table - * Group by: block_id, date (or week, month, year), type, is_from_coinbase, is_spendable, is_spent, spending_block_id, spending_date (no support for spending_week, spending_month, spending_year yet) - * To calculate: value, value_usd, spending_value_usd, lifespan, cdd — possible functions: avg(field), median(field), min(field), max(field), sum(field), count() - * Addresses view - * Group by: - - * To calculate: balance — possible functions: avg(field), median(field), min(field), max(field), sum(field), count() -* Ethereum: - * Blocks table - * Group by: date (or week, month, year), miner - * To calculate: size, difficulty, gas_used, gas_limit, uncle_count, transaction_count, synthetic_transaction_count, call_count, synthetic_call_count, value_total, value_total_usd, internal_value_total, internal_value_total_usd, generation, generation_usd, uncle_generation, uncle_generation_usd, fee_total, fee_total_usd, reward, reward_usd — possible functions: avg(field), median(field), min(field), max(field), sum(field), count() - * Uncles table - * Group by: parent_block_id, date (or week, month, year), miner - * To calculate: size, difficulty, gas_used, gas_limit, generation, generation_usd — possible functions: avg(field), median(field), min(field), max(field), sum(field), count() - * Transactions table - * Group by: block_id, date (or week, month, year), failed, type - * To calculate: call_count, value, value_usd, internal_value, internal_value_usd, fee, fee_usd, gas_used, gas_limit, gas_price — possible functions: avg(field), median(field), min(field), max(field), sum(field), count() - * Calls table - * Group by: block_id, date (or week, month, year), failed, fail_reason, type, transferred - * To calculate: child_call_count, value, value_usd — possible functions: avg(field), median(field), min(field), max(field), sum(field), count() - -##### Omni Layer and Wormhole support (since Sep 18th 2018) - -* v.a1 - Sep 18th - Added alpha support for Omni Layer in Bitcoin (`bitcoin/omni/properties`, `bitcoin/omni/dashboards/property/{id}` calls, plus `_omni` key in the `bitcoin/dashboards/transaction` call and `_omni` key in the `bitcoin/dashboards/address` call), and support for Wormhole in Bitcoin Cash (`bitcoin-cash/wormhole/properties`, `bitcoin-cash/wormhole/dashboards/property/{id}` calls, plus `_wormhole` key in the `bitcoin-cash/dashboards/transaction` call and `_wormhole` key in the `bitcoin-cash/dashboards/address` call). Please don't use this in production yet, there will be massive changes! - -### General Provisions - -* Requests to our server should be made through the HTTPS protocol by GET requests to the domain `api.blockchair.com` - -* The server response returns a JSON array always consisting of two subarrays: - * `data` - contains some data - * `context` - contains metadata, e.g., a status code, a query execution time, and so on. - -* `data` can contain either an associative array (e.g., for `bitcoin/stats`), or for infinitable-queries (see below) - an unnumbered array (for example, `bitcoin/blocks`), or for dashboard-queries (see below) - an associative array with keys which are parts of the query (e.g., for `bitcoin/dashboards/transactions/A,B`, the keys are `A` and `B`), and with values - arrays of data. -* `context`, depending on the call type, can contain the following useful values: - * `context.code` - server response code, can return: - * `200` if the request succeeds - * `400` if there is a user error in the request - * `402` if any limit on the number or complexity of requests is exceeded (see the restrictions below, please contact us at for private API access) - * `500` or` 503` in case of a server error (it makes sense to wait and repeat the same request or open a ticket at https://github.com/Blockchair/Blockchair.Support/issues/new or write to ) - * There is a field `context.error` with an error description in the case of` 40x` and `50x` errors - * `context.state` contains the number of the latest block in case of requests to the blockchains (for example, for all requests beginning with `bitcoin` there will be the latest block number for Bitcoin). It is useful in order, e.g., to calculate the number of network сonfirmations, or correctly iterate trough the results using `offset` - * `context.results` - contains the number of found results for dashboard-calls - * `context.limit` - applied limit to the number of results - * `context.offset` - applied offset - * `context.rows` - contains the number of returned rows for infinitable-calls - * `context.pre_rows` - for some infinitable-calls contains the number of rows that should've been returned before duplicate removal (note: this architecture is used for the `bitcoin[-cash].outputs` tables only) - * `context.total_rows` - number of rows that a query returns - * `context.api` - an array of data on the status of the API: - * `context.api.version` - version of API - * `context.api.last_major_update` - time of the last update, that somehow broke backward compatibility - * `context.api.next_major_update` - time of the next scheduled update, that can break compatibility, or` null`, if no updates are scheduled - * `context.api.tested_features` - the list (comma-separated) of features with version numbers our API supports, but with no guarantee for backward compatibility if updated (in this case there will be no changes to `context.api.next_major_update` as well) - * `context.api.documentation` - an URL to the latest version of documentation - -Note: it makes sense to check `context.api.version` and, if `context.api.next_major_update` is not `null`, notify yourself and review the changelog. If there are no changes in the changelog that violate the compatibility of your application, make sure that the value of `context.api.next_major_update` won't exceed the current one. If there are changes, adjust the application logic so, that after the specified time a new logic is applied. Additional note: in case the backward compatibility is violated only for one API call, then `context.api.next_major_update` won't be `null` just for this call. - -* Request limits: as of now, we allow up to 30 requests per minute to our API. If this limit is exceeded, an error `402` will be returned. In case of abuse, your IP address can be blocked. If your application needs more requests, please contact us at . If you need to unload a large amount of information once, please contact us at and, in case the academic or research unloading goal - you will receive the data for free in a convenient format. - -* Disclaimer: we do not guarantee the reliability or integrity of the provided information. Information provided by our API should not be used for making critical decisions. We do not guarantee an uptime for our free API. - -#### Please apply for an API key first - -tl;dr: -* If you use our API occasionally a key is not required -* Non-commercial and academic projects constantly using our API should apply for a free Public API key -* Commercial projects should apply for a key to Premium API - -Since the introduction of our API more than two years ago it has been free to use in both non-commercial and commercial cases with a limit of 30 requests per minute. Obtaining an API key has been required only for those who were hitting this limit. - -**Beginning July 19th, 2019 we require all applications using our API to obtain an API key.** - -If you develop a non-commercial project (e.g. a website showing some stats) or conducting academic research, please apply for a free key to our Public API (). - -If you develop a commercial project (e.g. a web wallet showing ads), please apply for a key to our Premium API (). - -While we still allow making requests without a key, services which make too many resource-consuming requests may automatically be banned (the API will return HTTP Error 430 in this case). - -The key is applied to the end of the request string like this: `api.blockchair.com/bitcoin/blocks?key=MYSECRETKEY`. Please remember that your key is a secret -- don't disclose it to client-side applications as unauthorized users may start to use your key. - -### Infinitable Calls (blockhain tables) - -Return data from the tables according to the filters (`q`), sorting (`s`), limit (`limit`), and offset (`offset`). - -A request should be construced like this: `https://api.blockchair.com/{chain}/[/mempool]{table}[?q={query}][&s={sorting}][&limit={limit}][&offset={offset}]` - -E.g. `https://api.blockchair.com/bitcoin/blocks?q=size(1000000..)` - -**Possible combinations of blockchains and tables:** -* Bitcoin: - * `bitcoin/blocks` - contains all Bitcoin blocks, including the latest one - * `bitcoin/transactions` - contains all Bitcoin transactions, excluding mempool transactions and transactions from the latest block - * `bitcoin/outputs` - contains all Bitcoin outputs, excluding the outputs contained in the mempool transactions as well as in the transactions from the latest block - * `bitcoin/mempool/transactions` - contains Bitcoin mempool transactions - * `bitcoin/mempool/outputs` - contains Bitcoin outputs included in mempool transactions -* Bitcoin Cash, Bitcoin SV, Litecoin, Dogecoin, Dash, Groestlcoin - the same as for Bitcoin -* Ethereum: - * `ethereum/blocks` - contains all Ethereum blocks, except the last 6 - * `ethereum/uncles` - contains all Ethereum uncles, except those that belong to the last 6 blocks - * `ethereum/transactions` - contains all Ethereum transactions, except transactions from the last 6 blocks - * `ethereum/calls` - contains all transaction calls, except calls for the last 6 blocks - * `ethereum/mempool/blocks` - contains the last 6 Ethereum blocks, some columns contain nulls - * `ethereum/mempool/transactions` - contains all Ethereum transactions from the last 6 blocks as well as mempool transactions - -Notes: to speed up the process, our architecture contains separate tables (`mempool*`) for unconfirmed transactions, as well as for blocks that with a certain probability can be forked off from the main chain. For Ethereum, that's the latest 6 blocks plus the mempool. For Ethereum, we do not "replay" transactions entirely (i.e. not looking for internal calls) for the last 6 blocks, so there is no `mempool/calls` table. - -**You can use filters** as follows: `?q=field(value)[,field(value)...]`, where `field` is the column by which a filter is needed, and `value` is a value, special value, or a range of values. The possible columns are listed in the tables below. Possible expressions for values: -* `value` - e.g., ` bitcoin/blocks?q=id(0)` finds information about block 0 -* `left..` - non-strict inequality - e.g., `bitcoin/blocks?q=id(1..)` finds information about block 1 and above -* `left...` - strict inequality - e.g., `bitcoin/blocks?q=id(1...)` finds information about block 2 and above -* `..right` - non-strict inequality - e.g., `bitcoin/blocks?q=id(..1)` finds information about blocks 0 and 1 -* `...right` - strict inequality - e.g.,` bitcoin/blocks?q=id(...1)` finds information only about block 0 -* `left..right` - non-strict inequality - e.g., `bitcoin/blocks?q=id(1..3)` finds information about blocks 1, 2 and 3 -* `left...right` - strict inequality - e.g., `bitcoin/blocks?q=id(1...3)` finds information only about block 2 -* `~like` - occurrence in a string (`LIKE` operator), e.g., `bitcoin/blocks?q=coinbase_data_bin(~hello)` finds all blocks which contain `hello` in `coinbase_data_bin` -* `^like` - occurrence at the beginning of a string (`STARTS WITH` operator), e.g., `bitcoin/blocks?q=coinbase_data_hex(^00)` finds all blocks for which` coinbase_data_hex` begins with `00` + Note that custom xpub formats (e.g. `ltub` for Litecoin) are not supported. + + +**Possible options:** + +* `?limit={:transaction_limit},{:utxo_limit}` or a shorthand `?limit={:limit}`. `{:transaction_limit}` limits the number of returned latest transaction hashes (in the `transactions` array) for an address or an address set. Default is `100`. Maximum is `10000`. In case of `0` returns an empty transaction hashes array. `{:utxo_limit}` limits the number of returned latest UTXOs (in the `utxo` array) for an address or an address set. Default is `100`. Maximum is `10000`. In case of `0` returns an empty UTXO array. If only one limit is set, it applies to both `{:transaction_limit}` and `{:utxo_limit}` (e.g. `?limit=100` is an equivalent of `?limit=100,100`). +* `?offset={:transaction_offset},{:utxo_offest}` or a shorthand `?offset={:offset}` allows to paginate transaction hashes and the UTXO array. The behaviour is similar to the `?limit=` section. Default for both offset is `0`, and the maximum is `1000000`. +* `?transaction_details=true` — returns detailed info on transactions instead of just hashes in the `transactions` array. Each element contains `block_id`, `transaction_hash`, `time`, and `balance_change` (shows how the transactions affected the balance of `{:address}`, i.e. it can be a negative value). At the moment, this option is available for the `address` endpoint only. +* `?omni=true` (for `bitcoin` only; in alpha test mode) — shows information about Omni Layer token transfers in this transaction. At the moment, this option is available for the `address` endpoint only. The data is returned in the `layer_2.omni` array. +* `?wormhole=true` (for `bitcoin-cash` only; in alpha test mode) — shows information about Wormhole token transfers in this transaction. At the moment, this option is available for the `address` endpoint only. The data is returned in the `layer_2.wormhole` array. + +**Output:** + +Please note that while the only difference between for example `transaction` and `transactions` dashboards is the number of elements in the `data` array, `address` and `addresses` differ semantically. `address` returns info on a single address with its recent transaction hashes and its UTXO set, while `addresses` and `xpub` return info on an address set (as well as some stats on separate addresses) where transaction hashes and the UTXO set are returned for the entire set (that's more useful for wallets as in most cases the task is, for example, to retrieve latest 10 transaction hashes for a set of addresses sorted by time descending, but not 10 transactions for each address as it's not clear how to sort them). + +Here's how these three dashboard calls structured (see more detailed examples below): + +`address` endpoint (single address): +* `data` + * `{:address}₀` + * `address` — an associative array with address info (`balance`, `script_hex`, `transaction_count`, etc.) + * `transactions` — an array of latest transaction hashes where the address is a participant (either sender or recipient) + * `utxo` — the UTXO set for the address +* `context` — some context info + +`addresses` endpoint (2 addresses for example): +* `data` + * `set` — an associative array with info on the address set (`balance` yields the total balance of 2 addresses, `transaction_count` is for both, etc.) + * `addresses` + * `{:address}₀` — an associative array with the first address info (`balance`, `script_hex`, `output_count`, etc.) + * `{:address}₁` — an associative array with the second address info (`balance`, `script_hex`, `output_count`, etc.) + * `transactions` — an array of latest transaction hashes for the entire set + * `utxo` — the UTXO set for the address set +* `context` — some context info + +`xpub` endpoint: +* `data` + * `{:extended_key}` + * `xpub` — an associative array with xpub info (`balance` yields the total balance of all addresses derived from the xpub, `transaction_count`, etc.) + * `addresses` + * `{:address}₀` — an associative array with the first address info (`balance`, `script_hex`, `output_count`, etc.) + * `{:address}₁` — an associative array with the second address info (`balance`, `script_hex`, `output_count`, etc.) + * `transactions` — an array of latest transaction hashes for the entire set + * `utxo` — the UTXO set for the address set +* `context` — some context info + +Note that currently the maximum depth for xpub address discovery is 250 (larger limits are available on Premium plans). According to BIP 32, our engine looks for 20 addresses at once, and if there's no transactions associated with this set, it stops looking. + +`data.addresses` for both the `addresses` and the `xpub` endpoints don't include addresses which don't participate in transactions. + +Address object specification: + +* `type` — address type (the same as `type` [here](#link_400), can be one of these: `pubkey`, `pubkeyhash`, `scripthash`, `multisig`, `nulldata`, `nonstandard`, `witness_v0_scripthash`, `witness_v0_keyhash`, `witness_unknown`) +* `script_hex` — output script (in hex) corresponding to the address +* `balance` — address balance in satoshi (hereinafter - including unconfirmed outputs) +* `balance_usd` — address balance in USD +* `received` — total received in satoshi +* `received_usd` — total received in USD +* `spent` — total spent in satoshi +* `spent_usd` — total spent in USD +* `output_count` — the number of outputs this address received +* `unspent_output_count` — number of unspent outputs for this address (i.e. the number of inputs for an address can be calculated as `output_count`-`unspent_output_count`) +* `first_seen_receiving` — timestamp (UTC) when the first time this address received coins +* `last_seen_receiving` — timestamp (UTC) when the last time this address received coins +* `first_seen_spending` — timestamp (UTC) when the first time this address sent coins +* `last_seen_spending` — timestamp (UTC) when the last time this address sent coins +* `transaction_count` — number of unique transactions this address participating in (available only in the `address` endpoint) +* `path` — derived address path (available only in the `xpub` endpoint) + +**Context keys:** + +* `context.results` — number of found addresses +* `context.limit` — applied limit +* `context.offset` — applied offset +* `context.state` — best block height on the `{:btc_chain}` chain (tip: it's possible to calculate the number of confirmation block received using this formula: `confirmations = data.{:id}ᵢ.block.id - context.state + 1`) +* `context.checked` (for the `xpub` endpoint only) — lists the addresses checked by our engine with their paths + +**Example requests:** + +* `https://api.blockchair.com/bitcoin/dashboards/address/1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa` +* `https://api.blockchair.com/bitcoin/dashboards/addresses/1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa,12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX` +* `https://api.blockchair.com/bitcoin/dashboards/xpub/xpub6CUGRUonZSQ4TWtTMmzXdrXDtypWKiKrhko4egpiMZbpiaQL2jkwSB1icqYh2cfDfVxdx4df189oLKnC5fSwqPfgyP3hooxujYzAu3fDVmz` +* `https://api.blockchair.com/bitcoin/dashboards/address/12cbQLTFMXRnSzktFkuoG3eHoMeFtpTu3S?transaction_details=true` +* `https://api.blockchair.com/bitcoin/dashboards/address/1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa?limit=1&offset=1&transaction_details=true` + +**Example outputs:** + +`https://api.blockchair.com/bitcoin/dashboards/address/1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa?limit=1&offset=1&transaction_details=true`: + +```json +{ + "data": { + "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa": { + "address": { + "type": "pubkey", + "script_hex": "4104678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5fac", + "balance": 6812392291, + "balance_usd": 508913.63494609314, + "received": 6812392291, + "received_usd": 15293.3019, + "spent": 0, + "spent_usd": 0, + "output_count": 1820, + "unspent_output_count": 1820, + "first_seen_receiving": "2009-01-03 18:15:05", + "last_seen_receiving": "2019-10-24 18:47:23", + "first_seen_spending": null, + "last_seen_spending": null, + "transaction_count": 1820 + }, + "transactions": [ + { + "block_id": 600890, + "hash": "4db4d68b13bf667ad9a44f4222bad2239de318fa75555ef966e84315056374b5", + "time": "2019-10-24 18:47:23", + "balance_change": 267582 + } + ], + "utxo": [ + { + "block_id": 600890, + "transaction_hash": "4db4d68b13bf667ad9a44f4222bad2239de318fa75555ef966e84315056374b5", + "index": 1, + "value": 267582 + } + ] + } + }, + "context": { + "code": 200, + "limit": "1,1", + "offset": "1,1", + "results": 1, + "state": 600897, + ... + } +} +``` + +`https://api.blockchair.com/bitcoin/dashboards/addresses/1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa,12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX?limit=1`: + +```json +{ + "data": { + "set": { + "address_count": 2, + "balance": 11846862777, + "balance_usd": 885009.2215792858, + "received": 11846862777, + "spent": 0, + "output_count": 1915, + "unspent_output_count": 1915, + "first_seen_receiving": "2009-01-03 18:15:05", + "last_seen_receiving": "2019-10-24 18:47:23", + "first_seen_spending": null, + "last_seen_spending": null, + "transaction_count": 1912 + }, + "addresses": { + "12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX": { + "type": "pubkeyhash", + "script_hex": "76a914119b098e2e980a229e139a9ed01a469e518e6f2688ac", + "balance": 5034470486, + "balance_usd": 376095.5866331926, + "received": 5034470486, + "received_usd": 1216.4402, + "spent": 0, + "spent_usd": 0, + "output_count": 95, + "unspent_output_count": 95, + "first_seen_receiving": "2009-01-09 02:54:25", + "last_seen_receiving": "2019-09-18 18:29:01", + "first_seen_spending": null, + "last_seen_spending": null + }, + "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa": { + "type": "pubkeyhash", + "script_hex": "76a91462e907b15cbf27d5425399ebf6f0fb50ebb88f1888ac", + "balance": 6812392291, + "balance_usd": 508913.63494609314, + "received": 6812392291, + "received_usd": 15293.3019, + "spent": 0, + "spent_usd": 0, + "output_count": 1820, + "unspent_output_count": 1820, + "first_seen_receiving": "2009-01-03 18:15:05", + "last_seen_receiving": "2019-10-24 18:47:23", + "first_seen_spending": null, + "last_seen_spending": null + } + }, + "transactions": [ + "f16bcc481a8939bc1c2f1b7df061f89958e265894dc71df248dabaad8e0815ed" + ], + "utxo": [ + { + "block_id": -1, + "transaction_hash": "f16bcc481a8939bc1c2f1b7df061f89958e265894dc71df248dabaad8e0815ed", + "index": 0, + "value": 558, + "address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa" + } + ] + }, + "context": { + "code": 200, + "limit": "1,1", + "offset": "0,0", + "results": 2, + "state": 600898, + ... + } +} +``` + +`https://api.blockchair.com/bitcoin/dashboards/xpub/xpub6CUGRUonZSQ4TWtTMmzXdrXDtypWKiKrhko4egpiMZbpiaQL2jkwSB1icqYh2cfDfVxdx4df189oLKnC5fSwqPfgyP3hooxujYzAu3fDVmz?limit=1,2`: + +```json +{ + "data": { + "xpub6CUGRUonZSQ4TWtTMmzXdrXDtypWKiKrhko4egpiMZbpiaQL2jkwSB1icqYh2cfDfVxdx4df189oLKnC5fSwqPfgyP3hooxujYzAu3fDVmz": { + "xpub": { + "address_count": 11, + "balance": 491868, + "balance_usd": 36.744556258799996, + "received": 711868, + "spent": 220000, + "output_count": 11, + "unspent_output_count": 9, + "first_seen_receiving": "2014-12-22 17:42:10", + "last_seen_receiving": "2019-09-25 16:12:10", + "first_seen_spending": "2014-12-22 21:32:22", + "last_seen_spending": "2014-12-23 17:26:21", + "transaction_count": 13 + }, + "addresses": { + "1EfgV2Hr5CDjXPavHDpDMjmU33BA2veHy6": { + "path": "0/0", + "type": "pubkeyhash", + "script_hex": "76a91495ea668e0322bd99dac54ffdc9089d68e56c3aa188ac", + "balance": 0, + "balance_usd": 0, + "received": 100000, + "received_usd": 0.3255, + "spent": 100000, + "spent_usd": 0.3292, + "output_count": 1, + "unspent_output_count": 0, + "first_seen_receiving": "2014-12-22 17:42:10", + "last_seen_receiving": "2014-12-22 17:42:10", + "first_seen_spending": "2014-12-23 17:26:21", + "last_seen_spending": "2014-12-23 17:26:21" + }, + "12iNxzdF6KFZ14UyRTYCRuptxkKSSVHzqF": { + "path": "0/1", + "type": "pubkeyhash", + "script_hex": "76a91412cb841986033f5ec9a4a1babe3a47339beac81c88ac", + "balance": 0, + "balance_usd": 0, + "received": 120000, + "received_usd": 0.3906, + "spent": 120000, + "spent_usd": 0.3906, + "output_count": 1, + "unspent_output_count": 0, + "first_seen_receiving": "2014-12-22 17:42:10", + "last_seen_receiving": "2014-12-22 17:42:10", + "first_seen_spending": "2014-12-22 21:32:22", + "last_seen_spending": "2014-12-22 21:32:22" + }, + "1CcEugXu9Yf9Qw5cpB8gHUK4X9683WyghM": { + "path": "0/2", + "type": "pubkeyhash", + "script_hex": "76a9147f538d66e3745866949f1b98c72c00638f16c7a088ac", + "balance": 8747, + "balance_usd": 0.6534367627, + "received": 8747, + "received_usd": 0.0506, + "spent": 0, + "spent_usd": 0, + "output_count": 1, + "unspent_output_count": 1, + "first_seen_receiving": "2016-08-18 04:07:11", + "last_seen_receiving": "2016-08-18 04:07:11", + "first_seen_spending": null, + "last_seen_spending": null + }, + "15xANZb5vJv5RGL263NFuh8UGgHT7noXeZ": { + "path": "0/3", + "type": "pubkeyhash", + "script_hex": "76a914364f34453e722af26f5f861aafbb7105176edcee88ac", + "balance": 100000, + "balance_usd": 7.47041, + "received": 100000, + "received_usd": 2.6486, + "spent": 0, + "spent_usd": 0, + "output_count": 1, + "unspent_output_count": 1, + "first_seen_receiving": "2017-06-21 03:01:22", + "last_seen_receiving": "2017-06-21 03:01:22", + "first_seen_spending": null, + "last_seen_spending": null + }, + "1PJMBXKBYEBMRDmpAoBRbDff26gHJrawSp": { + "path": "0/4", + "type": "pubkeyhash", + "script_hex": "76a914f49aaf692e1aca7d9de273d5b5538ad69677c74d88ac", + "balance": 100000, + "balance_usd": 7.47041, + "received": 100000, + "received_usd": 2.4581, + "spent": 0, + "spent_usd": 0, + "output_count": 1, + "unspent_output_count": 1, + "first_seen_receiving": "2017-07-02 17:12:03", + "last_seen_receiving": "2017-07-02 17:12:03", + "first_seen_spending": null, + "last_seen_spending": null + }, + "16ZBYSHkLkRFHAuZvyzosXYgU1UDJxRV1R": { + "path": "0/5", + "type": "pubkeyhash", + "script_hex": "76a9143ceebd5df25f739b5025d61fa4be2346fada97fd88ac", + "balance": 100000, + "balance_usd": 7.47041, + "received": 100000, + "received_usd": 2.4581, + "spent": 0, + "spent_usd": 0, + "output_count": 1, + "unspent_output_count": 1, + "first_seen_receiving": "2017-07-02 17:26:49", + "last_seen_receiving": "2017-07-02 17:26:49", + "first_seen_spending": null, + "last_seen_spending": null + }, + "1EHeVKfjjq6FJpix86G2yzFeRbZ6RNg2Zm": { + "path": "0/6", + "type": "pubkeyhash", + "script_hex": "76a91491bf9590d5cf0412d5b3fec1284d7164b161c65088ac", + "balance": 100000, + "balance_usd": 7.47041, + "received": 100000, + "received_usd": 2.4581, + "spent": 0, + "spent_usd": 0, + "output_count": 1, + "unspent_output_count": 1, + "first_seen_receiving": "2017-07-02 18:11:17", + "last_seen_receiving": "2017-07-02 18:11:17", + "first_seen_spending": null, + "last_seen_spending": null + }, + "1HqsYkwczwvkMXCobk5WPZmhj2S2TK613Z": { + "path": "0/8", + "type": "pubkeyhash", + "script_hex": "76a914b8c02c75c59f6320b729af2b0a5e0bff7efab95388ac", + "balance": 40161, + "balance_usd": 3.0001913601, + "received": 40161, + "received_usd": 2.6369, + "spent": 0, + "spent_usd": 0, + "output_count": 1, + "unspent_output_count": 1, + "first_seen_receiving": "2018-10-08 00:43:16", + "last_seen_receiving": "2018-10-08 00:43:16", + "first_seen_spending": null, + "last_seen_spending": null + }, + "1687EJf5YEmeEtcscnuJPiV5b8HkM1o98q": { + "path": "0/9", + "type": "pubkeyhash", + "script_hex": "76a9143830bd9d4d16ecbfc7456c2668a5dfa2954ab64088ac", + "balance": 40160, + "balance_usd": 3.000116656, + "received": 40160, + "received_usd": 2.6369, + "spent": 0, + "spent_usd": 0, + "output_count": 1, + "unspent_output_count": 1, + "first_seen_receiving": "2018-10-08 00:43:16", + "last_seen_receiving": "2018-10-08 00:43:16", + "first_seen_spending": null, + "last_seen_spending": null + }, + "1MS6eGqD4iUGyJPbEsjqmoNaRhApgtmF8J": { + "path": "0/10", + "type": "pubkeyhash", + "script_hex": "76a914e0219ffd268cf0a459d69c85557c68261b21026488ac", + "balance": 1800, + "balance_usd": 0.13446738, + "received": 1800, + "received_usd": 0.1157, + "spent": 0, + "spent_usd": 0, + "output_count": 1, + "unspent_output_count": 1, + "first_seen_receiving": "2018-11-07 17:26:45", + "last_seen_receiving": "2018-11-07 17:26:45", + "first_seen_spending": null, + "last_seen_spending": null + }, + "1LDPJCMZhYZjTvTGYahdhMXLuMfjfi6Kua": { + "path": "0/29", + "type": "pubkeyhash", + "script_hex": "76a914d2c1fe5c55a1e9d818149750f2662ba57748247088ac", + "balance": 1000, + "balance_usd": 0.07470410000000001, + "received": 1000, + "received_usd": 0.0868, + "spent": 0, + "spent_usd": 0, + "output_count": 1, + "unspent_output_count": 1, + "first_seen_receiving": "2019-09-25 16:12:10", + "last_seen_receiving": "2019-09-25 16:12:10", + "first_seen_spending": null, + "last_seen_spending": null + } + }, + "transactions": [ + "a24445474a9a7c0698e8db221ad2cae06792a899e9bc7f5a590687c3c810c480" + ], + "utxo": [ + { + "block_id": 596536, + "transaction_hash": "a24445474a9a7c0698e8db221ad2cae06792a899e9bc7f5a590687c3c810c480", + "index": 0, + "value": 1000, + "address": "1LDPJCMZhYZjTvTGYahdhMXLuMfjfi6Kua" + }, + { + "block_id": 549163, + "transaction_hash": "0c9a0219a8f3ef4a7d00483a755a9a18a674340c547bdf573481c1c613898746", + "index": 0, + "value": 1800, + "address": "1MS6eGqD4iUGyJPbEsjqmoNaRhApgtmF8J" + } + ] + } + }, + "context": { + "code": 200, + "limit": "1,2", + "offset": "0,0", + "results": 1, + "checked": [ + "0/0: 1EfgV2Hr5CDjXPavHDpDMjmU33BA2veHy6", + "0/1: 12iNxzdF6KFZ14UyRTYCRuptxkKSSVHzqF", + "0/2: 1CcEugXu9Yf9Qw5cpB8gHUK4X9683WyghM", + "0/3: 15xANZb5vJv5RGL263NFuh8UGgHT7noXeZ", + "0/4: 1PJMBXKBYEBMRDmpAoBRbDff26gHJrawSp", + "0/5: 16ZBYSHkLkRFHAuZvyzosXYgU1UDJxRV1R", + "0/6: 1EHeVKfjjq6FJpix86G2yzFeRbZ6RNg2Zm", + "0/7: 17BvBPGypT4nt1xc5QpdSDkQb54xoUuQkD", + "0/8: 1HqsYkwczwvkMXCobk5WPZmhj2S2TK613Z", + "0/9: 1687EJf5YEmeEtcscnuJPiV5b8HkM1o98q", + "0/10: 1MS6eGqD4iUGyJPbEsjqmoNaRhApgtmF8J", + "0/11: 1JSAD9Z8cpcMkwv98eFNWRciAMDqrPYJTE", + "0/12: 18zBZa3GWoqxuJK9qgJnoVoYEJSpFGDn6x", + "0/13: 17DcBkPv4VwdzC4837535XyyoUPZDkKArf", + "0/14: 1DMZDJV5XgnTswpuP85Gnfk7p1473QmxuF", + "0/15: 1AWhq6hMWzwxEG1wGeR7Y9aTyoxEjw7Rjj", + "0/16: 1HxhnLyFE3b7CWxtcxRKjKQ9fcjHeweq8R", + "0/17: 1H4J9nwbyUTvZ527K9fqaTeT3vd7Q4fVNC", + "0/18: 1KWLBZNwdGVxWyVhSSYjScLNevvxrSm1ww", + "0/19: 1J3BmEZTgHSgPcZptEP9grBVg8crvYYPSk", + "0/20: 1deZJSgLcwqUm9gBoo7TMzC6CEBpeweJS", + "0/21: 14hLE4kcxsL2E9VHwiztVokubR2rFkDnVr", + "0/22: 17THvVGQF1kFyjQHWcW5AiwBxDvx7GRcLm", + "0/23: 15RE6yBUX351VyAAht4SESXdgqEFAgwLdS", + "0/24: 1DzbL4hx1BTKpuDKjeA2JxD598kDe1BVGz", + "0/25: 1JwMtErm8siMrGM2LXBUrWTy1aBRkku79t", + "0/26: 189tJnNzz9RP8ZRdrB8UTAoVkeNt7yJrGb", + "0/27: 14S1fPp686HvwcuG4oBPHvn1HXeDZSAwjD", + "0/28: 17JspALUGU9Kw5Ui3xX8VFnCx8JVjUj4zr", + "0/29: 1LDPJCMZhYZjTvTGYahdhMXLuMfjfi6Kua", + "0/30: 1AKP5BtANmebif9vNwYGNx5qcSxASJWSP9", + "0/31: 1PqivQQbGwMmmDypaqoNLbE8vpKppihavk", + "0/32: 1M1mGGEgtFZtcEjnmWzkWEJmTpr8dCLpaX", + "0/33: 13srT2gVpj4G8kDNJJicsw28Ecxt3gvz6E", + "0/34: 1NyEZ7zU8C2nEysVgHTYBjBgeCdmz4XSMX", + "0/35: 1PtAfTFFtJUvQJRsY6v8gyjNyH3cu4ueyJ", + "0/36: 1PLYcCvCkZCwgK9kq5T53fG5SRGkjieZve", + "0/37: 1DFaATuBZXs9nYwEsihBpadnN1oYXPCwsn", + "0/38: 1FnHfiGBb2ND6q8Q1Be5Sc9jwwFGsZzYcE", + "0/39: 1GFjXEtmkV9XpC2D4Lbjvrk2NYFjHQRfnr", + "0/40: 1MGAnDNvkDQvTGdJ9oZdSBtiTc9vuwRN2A", + "0/41: 1Hrf1TUUSNnhgCFsywvA9BX9YaTABo4zsP", + "0/42: 1CK4cQ85AAyB8s7FtENx3q7cCKTHqsCpD8", + "0/43: 1Md5gRHwHUkUUbaeGB2EoWgfPBg1ERUc9C", + "0/44: 16ubuUFzMQWzRpDFU39p9jBnJUqQBmq9hC", + "0/45: 1CrBcrqv4p9mC6Am9Zc5WmzDW9h4B7yifL", + "0/46: 14C3hQ3pHbg3mZw9cUsKVfVXkS5tYbx82i", + "0/47: 1EM5gi9sURngbxXszMhXweqDm7vW8fFHvY", + "0/48: 15NvG6YpVh2aUc3DroVttEcWa1Z99qhACP", + "0/49: 18UXoW2caqHyTpDueSDtFrJyekg7VBzRzt", + "0/50: 1P5chLKDSFVUJaf4ahwpZ1sJxUFoY2Ph1E", + "0/51: 1CnsHtMDDPpwwjDX1idaVmXoAkn5w5DUFo", + "0/52: 1DCP8fg3pCcTY3Voi5zf1em9ZFpjC8TZdE", + "0/53: 1CiDp9n9G5Jw4mrqEYeZf2hGou3Qxbubfd", + "0/54: 1DYMSL8EusREgBaSjuZ5BXyLgwsGFjQK4z", + "0/55: 18Zwy9C8qwzr1WNqETs7ghQbbP1GaY2o4F", + "0/56: 1GVFgnLwgEbxLi2gZXoScnGvnzefZNtvHw", + "0/57: 1JeTm8ps2mnZMnzhrxMz3N26jk9pnxWjWk", + "0/58: 14VecjHW9Mz7dwofxox1hRhBgitoXGvdtb", + "0/59: 13n3no297bTMqnYPmtHgMaE7dtmsEXDPAT", + "1/0: 1muF2Eq9iR4ttJKpc4zZkoTmu3E41Ab9v", + "1/1: 18RtYUqcNDRjvbB8gg2hwxCYkWwuFcURJp", + "1/2: 15LE2wxPfw54p3RYWtd7TiduPVqNWiRdFv", + "1/3: 1CjYeTqk2M4qfnJWyYmLiGmm9BrX9Vdn7f", + "1/4: 1NWaSHQZsedx3X5ySwkesL7SfDrfQ38TwZ", + "1/5: 1HwVbcCNyoej8oyRn5ayTaMJbUbh1XH17D", + "1/6: 1M2R4jSZHiJebjMZ6FEkE9kAFAF55SsNuf", + "1/7: 1N2PNkgCAfkshYL1R533Q7nsEdUBiu69ou", + "1/8: 1KaYtjPYwUaXKswMT6dVkjU1i3AaGRbwgc", + "1/9: 16C6Dns9gfUAJ9PXPQj9hxcLmJaUgvCztg", + "1/10: 14fXx1jkGk85izCGnhFUL1PfwNSEP5hrLj", + "1/11: 1LGf9DzHTQd1BwakvcrQnQbKom7mZRmTnX", + "1/12: 1Npzk7S3FdBqZUmCUFnpVAkbPZKcHEakd9", + "1/13: 154Xhii1fs4qqPJWFSgV7NoQqheKj24zB6", + "1/14: 16K7tqjnVEKqn9bS4mqmAv2ra4JnwoWFU3", + "1/15: 1CN1oU8YF9udAKratV33EHGxmgR54d4CwY", + "1/16: 1Ry5PG7hKm7H1Kvf7FTfoRt8n4kPtY6hL", + "1/17: 1PNKjpz35PaWyeJrinQab2E1a1vtWcfRdy", + "1/18: 16VwyBxQyJT5DUswUoyq7Ga6t6sY7Ua8aA", + "1/19: 1GMdnCiw1dgGjaMAWyWssToYvtcGA5ERaH" + ], + "state": 600898, + ... + } +} +``` + +**Request cost formula:** + +- `1` for the `address` endpoint (add `1` for every of these options used: `?transaction_details=true`, `?omni=true`, `?wormhole=true`) +- `1 + (0.1 * (entity count - 1))` for the `addresses` endpoint (e.g. it's `1 + (0.1 * (100 - 1)) = 10.9` for requesting 100 addresses) +- `1 + 2 * depth - 0.1` for the `xpub` endpoint, where `depth` is the number of 20-addresses iterations (BIP 32 standard). The minimum number of iterations is 1 (the cost would be `2.9` in that case), if there are 5 iterations required, 100 addresses will be checked in total (the cost would be `10.9`) + +**Explore visualizations on our front-end:** + +- https://blockchair.com/bitcoin/address/1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa +- https://blockchair.com/bitcoin/xpub/xpub6CUGRUonZSQ4TWtTMmzXdrXDtypWKiKrhko4egpiMZbpiaQL2jkwSB1icqYh2cfDfVxdx4df189oLKnC5fSwqPfgyP3hooxujYzAu3fDVmz + + + +### Dashboard endpoints for Ethereum + + + +#### Block info + +**Endpoints:** + +- `https://api.blockchair.com/{:eth_chain}/dashboards/block/{:height}₀` +- `https://api.blockchair.com/{:eth_chain}/dashboards/block/{:hash}₀` +- `https://api.blockchair.com/{:eth_chain}/dashboards/blocks/{:height}₀,...,{:height}ᵩ` (up to 10 blocks, comma-separated) +- `https://api.blockchair.com/{:eth_chain}/dashboards/blocks/{:hash}₀,...,{:hash}ᵩ` (up to 10 blocks, comma-separated) + +**Where:** + +- `{:eth_chain}` can only be: `ethereum` +- `{:height}ᵢ` is the block height (integer value), also known as block id +- `{:hash}ᵢ` is the block hash (regex: `/^0x[0-9a-f]{64}$/i`) + +**Possible options:** + +- `?limit={:limit}` limits the number of returned transaction hashes contained in the block. Default is `100`. Maximum is `10000`. In case of `0` returns an empty transaction hashes array +- `?offset={:offset}` allows to paginate transaction hashes. Default is `0`. Maximum is `1000000`. + +**Output:** + +`data` contains an associative array where found block heights or block hashes used as keys: + +- `data.{:id}ᵢ.block` — information about the block (see [Ethereum-like block object](#link_105) for the field descriptions) +- `data.{:id}ᵢ.transactions` — the array of transaction hashes (sorted by position in the block ascending) included in the block (respecting the set limit and offset) +- `data.{:id}ᵢ.synthetic_transactions` — array of internal Blockchair ids of synthetic transactions. By synthetic transactions we understand state changes in the blockchain which don't have parental transaction entities, i.e. transferring miner reward (for blocks and uncles), coin generation in the genesis block, etc. This array is not iterable, and always yields the entire result set. +- `data.{:id}ᵢ.uncles` — the array of hashes of the block's uncles (in case there are no uncles — an empty array). This array is not iterable as well, and always yields the entire result set. + +Where `{:id}ᵢ` is either `{:height}ᵢ` or `{:hash}ᵢ` from the query string. + +If there's no `{:id}ᵢ` has been found in the database, there won't be such key. + +Note that the total number of transactions in the block is contained in `data.{:id}ᵢ.block.transaction_count`, but that doesn't take synthetic transactions into account (use `data.{:id}ᵢ.block.synthetic_transaction_count` instead) + +**Context keys:** + +- `context.results` — number of found blocks +- `context.limit` — applied limit +- `context.offset` — applied offset +- `context.state` — best block height on the `{:eth_chain}` chain (tip: it's possible to calculate the number of confirmation block received using this formula: `confirmations = data.{:id}ᵢ.block.id - context.state + 1`) + +**Example requests:** + +- `https://api.blockchair.com/ethereum/dashboards/block/2345678` +- `https://api.blockchair.com/ethereum/dashboards/block/0xda214d1b1d458e7ae0e626b69a52a59d19762c51a53ff64813c4d31256282fdf` +- `context.state`: best block height on the `{:eth_chain}` chain (tip: it's possible to calculate the number of confirmation transaction received using this formula: `confirmations = data.{:id}ᵢ.transaction.block_id - context.state + 1`, or if `data.{:id}ᵢ.transaction.block_id` is `-1` it's an unconfirmed transaction) +- `https://api.blockchair.com/ethereum/dashboards/block/2345678?limit=2` +- `https://api.blockchair.com/ethereum/dashboards/block/2345678?limit=2&offset=2` + +**Example output:** + +`https://api.blockchair.com/ethereum/dashboards/block/2345678`: + +```json +{ + "data": { + "2345678": { + "block": { + "id": 2345678, + "hash": "0xda214d1b1d458e7ae0e626b69a52a59d19762c51a53ff64813c4d31256282fdf", + "date": "2016-09-29", + "time": "2016-09-29 01:39:41", + "size": 1109, + "miner": "0x4bb96091ee9d802ed039c4d1a5f6216f90f81b01", + "extra_data_hex": "657468706f6f6c2e6f7267202845553129", + "difficulty": 81923183857781, + "gas_used": 105000, + "gas_limit": 1500000, + "logs_bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "mix_hash": "f5b95f5b79cd8425db7f04d200d78d16c104c28d078d0b653ae1c24f31759662", + "nonce": "681508643254209570", + "receipts_root": "51a6952987f2c7ebf74fc1a4f644265aebb660b1d86a12c0f6e3001a2866331f", + "sha3_uncles": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "state_root": "4f6b1af13d99c75e0d644b226d57767a0d2f22921c529dfe3455bc63154b01e5", + "total_difficulty": "66939257372572274863", + "transactions_root": "dde4d2ce7556effca10c868f500f0e47fb09b5cb4a003d781080f1a06e582352", + "uncle_count": 0, + "transaction_count": 5, + "synthetic_transaction_count": 1, + "call_count": 5, + "synthetic_call_count": 1, + "value_total": "17966223975031638280", + "value_total_usd": 238.950782294711, + "internal_value_total": "17963073975031638280", + "internal_value_total_usd": 238.90888729411, + "generation": "5000000000000000000", + "generation_usd": 66.5000009536743, + "uncle_generation": "0", + "uncle_generation_usd": 0, + "fee_total": "3150000000000000", + "fee_total_usd": 0.0418950006008148, + "reward": "5003150000000000000", + "reward_usd": 66.5418959542751 + }, + "uncles": [], + "transactions": [ + "0x4052841e7ff856e08e73245ed1fab5f41021d4bfe83202b6581870cb559b44c4", + "0xa1ed63865958a1b3abc8e259dc980bd76dd3f989f14577cce18b7e265cf9528e", + "0x1d6713c7e6be2a45e6b3d2a7dfc1af96443cfb65d4b51cd41ac21b7b840e77e0", + "0xffbcdcbef6c5341dd60a9b7f182b61cf0c468d63defcc2fa8c56e292d4bfc8d6", + "0x0c79e3ae36150eb36d6a631cc8d6250db4b9b832a82ac58ea356357f5987debe" + ], + "synthetic_transactions": [ + 2345678000005 + ] + } + }, + "context": { + "code": 200, + "limit": 100, + "offset": 0, + "results": 1, + "state": 8766187, + "state_layer_2": 8766186, + ... + } +} +``` + +**Request cost formula:** + +- `1` for `https://api.blockchair.com/{:eth_chain}/dashboards/block/{:height}₀` and `https://api.blockchair.com/{:eth_chain}/dashboards/block/{:hash}₀ `endpoints +- `1 + (0.1 * (entity count - 1))` for `https://api.blockchair.com/{:eth_chain}/dashboards/blocks/{:height}₀,...,{:height}ᵩ` and `https://api.blockchair.com/{:eth_chain}/dashboards/blocks/{:hash}₀,...,{:hash}ᵩ` endpoints (e.g. it's `1 + (0.1 * (10 - 1)) = 1.9` for requesting 10 blocks) + +**Explore visualizations on our front-end:** + +- https://blockchair.com/ethereum/block/2345678 + + + +#### Uncle info + +**Endpoints:** + +- `https://api.blockchair.com/{:eth_chain}/dashboards/uncle/{:hash}₀` +- `https://api.blockchair.com/{:eth_chain}/dashboards/uncle/{:hash}₀,...,{:hash}ᵩ` (up to 10 uncles, comma-separated) + +**Where:** + +- `{:eth_chain}` can only be: `ethereum` +- `{:hash}ᵢ` is the uncle hash (regex: `/^0x[0-9a-f]{64}$/i`) + +**Output:** + +`data` contains an associative array where uncle hashes used as keys: + +- `data.{:hash}ᵢ.uncle` — information about the block (see [Ethereum-like uncle object](#link_402) for the field descriptions) + +If there's no `{:hash}ᵢ` has been found in the database, there won't be such key. + +**Context keys:** + +- `context.results`: number of found uncles +- `context.limit`: applied limit +- `context.offset`: applied offset +- `context.state`: best block height on the `{:eth_chain}` chain + +**Example requests:** + +- `https://api.blockchair.com/ethereum/dashboards/uncle/0x5cd50096dbb856a6d1befa6de8f9c20decb299f375154427d90761dc0b101109` +- ``https://api.blockchair.com/ethereum/dashboards/uncles/0x5cd50096dbb856a6d1befa6de8f9c20decb299f375154427d90761dc0b101109,0xedc7a92c2a8aa140b0afa26db4ce8e05994a67d6fc3d736ddd77210b0ba565bb` + +**Example output:** + +`https://api.blockchair.com/ethereum/dashboards/uncle/0x5cd50096dbb856a6d1befa6de8f9c20decb299f375154427d90761dc0b101109`: + +```json +{ + "data": { + "0x5cd50096dbb856a6d1befa6de8f9c20decb299f375154427d90761dc0b101109": { + "uncle": { + "parent_block_id": 3, + "index": 0, + "id": 1, + "hash": "0x5cd50096dbb856a6d1befa6de8f9c20decb299f375154427d90761dc0b101109", + "date": "2015-07-30", + "time": "2015-07-30 15:26:58", + "size": 538, + "miner": "0xc8ebccc5f5689fa8659d83713341e5ad19349448", + "extra_data_hex": "59617465732052616e64616c6c202d2045746865724e696e6a61", + "difficulty": 17171480576, + "gas_used": 0, + "gas_limit": 5000, + "logs_bloom": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "mix_hash": "f8c94dfe61cf26dcdf8cffeda337cf6a903d65c449d7691a022837f6e2d99459", + "nonce": "7545615996671392490", + "receipts_root": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "sha3_uncles": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "state_root": "1e6e030581fd1873b4784280859cd3b3c04aa85520f08c304cf5ee63d3935add", + "transactions_root": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "generation": "3750000000000000000", + "generation_usd": 3.75 + } + } + }, + "context": { + "code": 200, + "results": 1, + "state": 8792290, + "state_layer_2": 8792279, + ... + } +} +``` + +**Request cost formula:** + +- `1` for `https://api.blockchair.com/{:eth_chain}/dashboards/uncle/{:hash}₀ ` endpoint +- `1 + (0.1 * (entity count - 1))` for `https://api.blockchair.com/{:eth_chain}/dashboards/uncles/{:hash}₀,...,{:hash}ᵩ` endpoint (e.g. it's `1 + (0.1 * (10 - 1)) = 1.9` for requesting 10 uncles) + +**Explore visualizations on our front-end:** + +- https://blockchair.com/ethereum/uncle/0x5cd50096dbb856a6d1befa6de8f9c20decb299f375154427d90761dc0b101109 + + + +#### Transaction info + +**Endpoints:** + +- `https://api.blockchair.com/{:eth_chain}/dashboards/transaction/{:hash}₀` +- `https://api.blockchair.com/{:eth_chain}/dashboards/transactions/{:hash}₀,...,{:hash}ᵩ` (up to 10 transactions, comma-separated) + +**Where:** + +- `{:eth_chain}` can only be: `ethereum` +- `{:hashᵢ}` is the transaction hash (regex: `/^0x[0-9a-f]{64}$/i`), also known as txid + +**Possible options:** + +- `?erc_20=true` shows information about ERC-20 token transfers in this transaction + +**Output:** + +`data` contains an associative array where found transaction hashes are used as keys: + +- `data.{:hash}ᵢ.transaction` — information about the transaction (see [Ethereum-like transaction object](#link_206)) +- `data.{:hash}ᵢ.calls` — the array of all calls made during the execution of the transaction (always `null` for mempool transactions and the last 6 blocks) + +Additional data: + +- `data.{:hash}ᵢ.layer_2.erc_20` (only if `?erc_20=true` is set) — the array of ERC-20 transfers (or an empty array if there are none), Each array element contains the following keys: `token_address`, `token_name`, `token_symbol`, `token_decimals`, `sender`, `recipient`, `value` — field descriptions are available [here](#link_506). + +In case transaction is confirmed on the blockchain, `data.{:hash}ᵢ.transaction.block_id` contains the block number it's included in. If the transaction is in the mempool, `data.{:hash}ᵢ.transaction.block_id` yields `-1`. If the transaction is neither present in the blockchain, nor in the mempool, there won't be `data.{:hash}ᵢ` key with data. + +**Context keys:** + +- `context.results` — number of found transactions +- `context.state` — best block height on the `{:eth_chain}` chain (tip: it's possible to calculate the number of confirmation transaction received using this formula: `confirmations = data.{:id}ᵢ.transaction.block_id - context.state + 1`, or if `data.{:id}ᵢ.transaction.block_id` is `-1` it's an unconfirmed transaction) +- `context.state_layer_2` — the latest block number for which our engine has processed second layer (e.g. ERC-20) transactions. If it's less than the block id in your current environment (e.g. block id of a transaction you requested), it makes sense to repeat the request after some time to retrieve second layer data + +**Example requests:** + +- `https://api.blockchair.com/ethereum/dashboards/transaction/0xc132a422513e39038269e091847319a14029feb42c66bd1424c57dfc0e4f8d08` +- `https://api.blockchair.com/ethereum/dashboards/transactions/0xc132a422513e39038269e091847319a14029feb42c66bd1424c57dfc0e4f8d08,0x502bc6fe1f39738f0fd3223a2f125433b8ec7e80acd11ef514f6909536cc9e66` +- `https://api.blockchair.com/ethereum/dashboards/transaction/0xc132a422513e39038269e091847319a14029feb42c66bd1424c57dfc0e4f8d08?erc_20=true` + +**Example output:** + +`https://api.blockchair.com/ethereum/dashboards/transaction/0xc132a422513e39038269e091847319a14029feb42c66bd1424c57dfc0e4f8d08?erc_20=true`: + +```json +{ + "data": { + "0xc132a422513e39038269e091847319a14029feb42c66bd1424c57dfc0e4f8d08": { + "transaction": { + "block_id": 5678901, + "id": 5678901000028, + "index": 28, + "hash": "0xc132a422513e39038269e091847319a14029feb42c66bd1424c57dfc0e4f8d08", + "date": "2018-05-26", + "time": "2018-05-26 08:06:16", + "failed": false, + "type": "call_tree", + "sender": "0xcd36cfb41b81cfbc97772e43fda1fab39e718869", + "recipient": "0x0ebe7487f60d3a4eb084a23152890a1a65b2ad65", + "call_count": 101, + "value": "0", + "value_usd": 0, + "internal_value": "0", + "internal_value_usd": 0, + "fee": "16821205000000000", + "fee_usd": 9.84774982859924, + "gas_used": 3364241, + "gas_limit": 4000000, + "gas_price": 5000000000, + "input_hex": "bb0a64b600000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000d00000000000000000000000000a68920f6d3c996ac3c232e4e93914e9d7615073500000000000000000000000000000000000000000000000000000000000000640000000000000000000000004cb04ab4dfc1963814cb2b1da8475e5ada6065f3000000000000000000000000459ed852d2f296942d82e0b88f678c01d3dda946000000000000000000000000c00dbc71bce389816763773fc4e5b757fce9b184...", + "nonce": "9092", + "v": "1c", + "r": "9b9a4da4aa5f0dfe141b6dad2ae6e41bcd63cab7f0ae9aef4f1752037b698526", + "s": "20acc42c4941a1077fa4bb8ccd707e6865a61c60f4a77d1b19f86d2e0525fcde" + }, + "calls": [ + { + "block_id": 5678901, + "transaction_id": 5678901000028, + "transaction_hash": "0xc132a422513e39038269e091847319a14029feb42c66bd1424c57dfc0e4f8d08", + "index": "0", + "depth": 0, + "date": "2018-05-26", + "time": "2018-05-26 08:06:16", + "failed": false, + "fail_reason": null, + "type": "call", + "sender": "0xcd36cfb41b81cfbc97772e43fda1fab39e718869", + "recipient": "0x0ebe7487f60d3a4eb084a23152890a1a65b2ad65", + "child_call_count": 100, + "value": "0", + "value_usd": 0, + "transferred": true, + "input_hex": "bb0a64b600000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000d00000000000000000000000000a68920f6d3c996ac3c232e4e93914e9d7615073500000000000000000000000000000000000000000000000000000000000000640000000000000000000000004cb04ab4dfc1963814cb2b1da8475e5ada6065f300...", + "output_hex": "0000000000000000000000000000000000000000000000000000000000000001" + }, + { + "block_id": 5678901, + "transaction_id": 5678901000028, + "transaction_hash": "0xc132a422513e39038269e091847319a14029feb42c66bd1424c57dfc0e4f8d08", + "index": "0.0", + "depth": 1, + "date": "2018-05-26", + "time": "2018-05-26 08:06:16", + "failed": false, + "fail_reason": null, + "type": "call", + "sender": "0x0ebe7487f60d3a4eb084a23152890a1a65b2ad65", + "recipient": "0xa68920f6d3c996ac3c232e4e93914e9d76150735", + "child_call_count": 0, + "value": "0", + "value_usd": 0, + "transferred": true, + "input_hex": "a9059cbb0000000000000000000000004cb04ab4dfc1963814cb2b1da8475e5ada6065f30000000000000000000000000000000000000000000000056bc75e2d63100000", + "output_hex": "" + }, + ... + ], + "layer_2": { + "erc_20": [ + { + "token_address": "0xa68920f6d3c996ac3c232e4e93914e9d76150735", + "token_name": "", + "token_symbol": "MST", + "token_decimals": 18, + "sender": "0x0ebe7487f60d3a4eb084a23152890a1a65b2ad65", + "recipient": "0xa488cf9adcac170f28a046ba34a9885eb9f67033", + "value": "100000000000000000000" + }, + { + "token_address": "0xa68920f6d3c996ac3c232e4e93914e9d76150735", + "token_name": "", + "token_symbol": "MST", + "token_decimals": 18, + "sender": "0x0ebe7487f60d3a4eb084a23152890a1a65b2ad65", + "recipient": "0x8cc1e8ffc3bf19c67c244e2bd8126fd29ec50e58", + "value": "100000000000000000000" + }, + ... + ] + } + } + }, + "context": { + "code": 200 + "results": 1, + "state": 8791761, + "state_layer_2": 8791746, + ... + } +} +``` + +**Bonus endpoint:** + +* `https://api.blockchair.com/{:eth_chain}/dashboards/transaction/{:hash}₀/priority` + +For mempool transactions shows priority (`position`) by `gas_price` over other transactions (`out_of` mempool transactions). `position` is `null` if the transaction is not in the mempool. Cost: `1`. + +**Request cost formula:** + +- `1` for `https://api.blockchair.com/{:eth_chain}/dashboards/transaction/{:hash}₀` endpoint +- `1 + (0.1 * (entity count - 1))` for `https://api.blockchair.com/{:eth_chain}/dashboards/transactions/{:hash}₀,...,{:hash}ᵩ` endpoint (e.g. it's `1 + (0.1 * (10 - 1)) = 1.9` for requesting 10 transactions) +- Using `?erc_20=true` adds `1` for each requested transaction + +**Explore visualization on our front-end:** + +- https://blockchair.com/ethereum/transaction/0xd628780ba231cefe6a4f6c3da3b683b16f6151dc9753afd8773d3c2d74ac10c8 + + + +#### Address info + +**Endpoint:** + +- `https://api.blockchair.com/{:eth_chain}/dashboards/address/{:address}₀` + +**Where:** + +- `{:eth_chain}` can only be: `ethereum` +- `{:address}ᵢ` is an Ethereum address (either an account or a contract, the address should start with `0x`) + +**Possible options:** + +- `?limit={:call_limit}` — limits the number of returned latest calls associated with the address. Default is `100`. Maximum is `10000`. +- `?offset={:call_offset}` — allows to paginate calls. Default is `0`, and the maximum is `1000000`. +- `?erc_20=true` — returns detailed info on transactions instead of just hashes in the `transactions` array. Each element contains `block_id`, `transaction_hash`, `time`, and `balance_change` (shows how the transactions affected the balance of `{:address}`, i.e. it can be a negative value). At the moment, this option is available for the `address` endpoint only. + +**Output:** + +In case the address has been found, `data.{:address}₀` returns an array consisting of the following elements: + +- `address` + - `address.type` — address type (`account` — for a simple address, `contract` — for a contract) + - `address.contract_code_hex` — hex code of the contract at the moment of creation (for a contract), or `null` for an address + - `address.contract_created` — for contracts only — if the contact was indeed created then `true`, if not (i.e. with a failed `create` call) — `false`, for a simple address yields `null` + - `address.contract_destroyed` — for contracts only — if the contact was successfully destroyed (`SELFDESCTRUCT`) then `true`, if not — `false`; for a simple address yields `null` + - `address.balance` — exact address balance in wei (here and below values in wei returned as strings as they don't fit into integers) + - `address.balance_usd` — address balance in USD (float) + - `address.received_approximate` — total received in wei (approximately) † + - `address.received_usd` — total received in USD (approximately) † + - `address.spent_approximate` — total spent in wei (approximately) † + - `address.spent_usd` — total spent in USD (approximately) † + - `address.fees_approximate` — total spent in transaction fees in wei (approximately) † + - `address.fees_usd` — total spent in transaction fees in USD (approximately) † + - `address.receiving_call_count` — number of calls the address has received, where value transfer occured ‡ + - `address.spending_call_count` — number of calls that has been made by this address where value transfer occured ‡ + - `address.call_count` — total number of calls the address participated in (may be greater than` receiving_call_count` + `spending_call_count`, because it also takes failed calls into account) + - `address.transaction_count` — number of transactions the address participated in + - `address.first_seen_receiving` — timestamp (UTC) when the address received a successful incoming call for the first time + - `address.last_seen_receiving` — timestamp (UTC) when the address received a successful incoming call for the last time + - `address.first_seen_spending` — timestamp (UTC) when the address sent a successful call for the first time + - `address.last_seen_spending` — timestamp (UTC) when the address sent a successful call for the last time +- `calls` — an array of the latest address call, each element of an array containing the following elements: `block_id`, `transaction_hash`,` index`, `time`,` sender`, `recipient`, `value`,` value_usd`, `transferred` (see the description [here](#link_403)) +- `layer_2.erc_20` (only if `?erc_20=true` is set) — the array of ERC-20 token balances of the address, each element contains the following fields: `token_address`, `token_name`, `token_symbol`, `token_decimals`, `balance_approximate` (number of tokens), `balance` (exact number of tokens in the smallest denomination). Note that `balance ≈ balance_approximate * 10 ^ token_decimals`. + +Additional data: + +- `data.{:hash}ᵢ.layer_2.erc_20` (or an empty array if there are none), Each array element contains the following keys: `token_address`, `token_name`, `token_symbol`, `token_decimals`, `sender`, `recipient`, `value` — field descriptions are available [here](#link_506). + +`context.results` contains the number of found addresses (0 or 1). + +Notes: + +- † — for these fields the wei value can be rounded. For a million of calls, the rounding error can be more than 1 ether. +- ‡ — only those calls are counted that fit the following condition: `transferred = true`, i.e. calls that do not change state (including `staticcall`, failed calls, etc.) are not taken into account + +**Context keys:** + +- `context.results` — number of found addresses +- `context.limit` — applied limit +- `context.offset` — applied offset +- `context.state` — best block height on the `{:eth_chain}` chain (tip: it's possible to calculate the number of confirmation block received using this formula: `confirmations = block_id - context.state + 1`) +- `context.state_layer_2` — the latest block number for which our engine has processed second layer (e.g. ERC-20) transactions. If it's less than the block id in your current environment (e.g. block id of a transaction you requested), it makes sense to repeat the request after some time to retrieve second layer data + +**Example requests:** + +- `https://api.blockchair.com/ethereum/dashboards/address/0x3282791d6fd713f1e94f4bfd565eaa78b3a0599d` +- `https://api.blockchair.com/ethereum/dashboards/address/0x3282791d6fd713f1e94f4bfd565eaa78b3a0599d?limit=1&offset=0` +- `https://api.blockchair.com/ethereum/dashboards/address/0x3282791d6fd713f1e94f4bfd565eaa78b3a0599d?erc_20=true` + +**Example output:** + +`https://api.blockchair.com/ethereum/dashboards/address/0x3282791d6fd713f1e94f4bfd565eaa78b3a0599d?erc_20=true`: + +```json +{ + "data": { + "0x3282791d6fd713f1e94f4bfd565eaa78b3a0599d": { + "address": { + "type": "account", + "contract_code_hex": null, + "contract_created": null, + "contract_destroyed": null, + "balance": "1337000000000000001337", + "balance_usd": 217088.92828369106, + "received_approximate": "1337000000000000000000", + "received_usd": 1337, + "spent_approximate": "0", + "spent_usd": 0, + "fees_approximate": "0", + "fees_usd": 0, + "receiving_call_count": 2, + "spending_call_count": 0, + "call_count": 2, + "transaction_count": 2, + "first_seen_receiving": "2015-07-30 00:00:00", + "last_seen_receiving": "2018-11-16 00:52:45", + "first_seen_spending": null, + "last_seen_spending": null + }, + "calls": [ + { + "block_id": 6712155, + "transaction_hash": "0x0357352473d64df14fb987f33bbc9c3cd317fafe7c9498139c6a0529b551a017", + "index": "0", + "time": "2018-11-16 00:52:45", + "sender": "0x0f4b92e13cc618bb9ff2120aec2ccd19f0d97b68", + "recipient": "0x3282791d6fd713f1e94f4bfd565eaa78b3a0599d", + "value": 1337, + "value_usd": 0, + "transferred": true + }, + { + "block_id": 0, + "transaction_hash": null, + "index": "0", + "time": "2015-07-30 00:00:00", + "sender": null, + "recipient": "0x3282791d6fd713f1e94f4bfd565eaa78b3a0599d", + "value": 1.337e+21, + "value_usd": 1337, + "transferred": true + } + ], + "layer_2": { + "erc_20": [ + { + "token_address": "0x68e14bb5a45b9681327e16e528084b9d962c1a39", + "token_name": "en", + "token_symbol": "CAT", + "token_decimals": 18, + "balance_approximate": 5, + "balance": "5000000000000000000" + }, + { + "token_address": "0xd49ff13661451313ca1553fd6954bd1d9b6e02b9", + "token_name": "ElectrifyAsia", + "token_symbol": "ELEC", + "token_decimals": 18, + "balance_approximate": 13.6553835383397, + "balance": "13655383538340000000" + }, + ... + ] + } + } + }, + "context": { + "code": 200, + "limit": 100, + "offset": 0, + "results": 1, + "state": 8805160, + "state_layer_2": 8805148, + ... + } +} +``` + +**Request cost formula:** + +- `1` or `2` if the `?erc_20=true` option is used + +**Explore visualizations on our front-end:** + +- https://blockchair.com/ethereum/address/0x3282791d6fd713f1e94f4bfd565eaa78b3a0599d + + + +### Dashboard endpoints for second layers + + + +#### Omni Layer and Wormhole property info + +Allows to retrieve the some basic information on an Omni Layer (Bitcoin) or Wormhole (Bitcoin Cash) property (token). Since Wormhole is based on Omni Layer, the output is the same for both. Note that this endpoint is in the Alpha stage, and Wormhole is deprecated on our platform. + +**Endpoints:** + +* `https://api.blockchair.com/bitcoin/omni/dashboards/property/{:prorerty_id}` +* `https://api.blockchair.com/bitcoin-cash/wormhole/dashboards/property/{:prorerty_id}` + +**Where:** + +- `{:prorerty_id}` is the property identifier (integer) + +**Output:** + +`data` contains information about the property, fields accord with Omni Layer specification (https://github.com/OmniLayer/spec) + +**Example requests:** + +- `https://api.blockchair.com/bitcoin/omni/dashboards/property/31` +- `https://api.blockchair.com/bitcoin-cash/wormhole/stats/property/1` + +**Example output:** + +`https://api.blockchair.com/bitcoin/omni/dashboards/property/31`: + +```json +{ + "data": { + "id": 31, + "name": "TetherUS", + "category": "Financial and insurance activities", + "subcategory": "Activities auxiliary to financial service and insurance activities", + "description": "The next paradigm of money.", + "url": "https://tether.to", + "is_divisible": false, + "issuer": "32TLn1WLcu8LtfvweLzYUYU6ubc2YV9eZs", + "creation_transaction_hash": "5ed3694e8a4fa8d3ec5c75eb6789492c69e65511522b220e94ab51da2b6dd53f", + "creation_time": "2014-10-06 16:39:15", + "creation_block_id": 324140, + "is_issuance_fixed": false, + "is_issuance_managed": false, + "circulation": 2145000000, + "ecosystem": 1 + }, + "context": { + "code": 200, + "results": 1, + "state": 599974, + ... + } +} +``` + +**Request cost formula:** + +Always `1`. + +**Explore visualizations on our front-end:** + +- https://blockchair.com/bitcoin/omni/property/31 +- https://blockchair.com/bitcoin-cash/wormhole/property/1 + + + +#### ERC-20 token info + +Allows to retrieve the some basic information on an ERC-20 token. Note that this endpoint is in the Beta stage. + +**Endpoint:** + +- `https://api.blockchair.com/ethereum/erc-20/{:token_address}/stats` + +**Where:** + +- `{:token_address}` is the token contract address (starting with `0x`) + +**Output:** + +`data` contains information about the token: + +* `name` — token name +* `symbol` — token symbol (short name) +* `decimals` — the number of decimal the token uses +* `time` — timestamp (UTC) when the contract was created +* `creating_block_id` — block id in which the token was created +* `creating_transaction_hash` — transaction hash in which the token was created +* `transactions` — total number of transfers associated with the token +* `transactions_24h` — the same over the last 24 hours +* `volume_24h_approximate` — transacted monetary volume in the number of tokens +* `volume_24h` — the same in the token's smallest denomination (`volume_24h ≈ volume_24h_approximate * (10 ^ decimals )`) + +**Example requests:** + +- `https://api.blockchair.com/ethereum/erc-20/0xdac17f958d2ee523a2206206994597c13d831ec7/stats` + +**Example output:** + +`https://api.blockchair.com/ethereum/erc-20/0xdac17f958d2ee523a2206206994597c13d831ec7/stats`: + +```json +{ + "data": { + "name": "Tether USD", + "symbol": "USDT", + "decimals": 6, + "time": "2017-11-28 00:41:21", + "creating_block_id": 4634748, + "creating_transaction_hash": "0x2f1c5c2b44f771e942a8506148e256f94f1a464babc938ae0690c6e34cd79190", + "transactions": 8898558, + "transactions_24h": 95437, + "volume_24h_approximate": 507067165.4109063, + "volume_24h": "507067165410910" + }, + "context": { + "code": 200, + "results": 1, + "state": 8766954, + "state_layer_2": 8766944, + ... + } +} +``` + +**Request cost formula:** + +Always `1`. + +**Explore visualizations on our front-end:** + +- https://blockchair.com/ethereum/erc-20/token/0xdac17f958d2ee523a2206206994597c13d831ec7 + + + +#### ERC-20 token holder info + +**Endpoint:** + +- `https://api.blockchair.com/ethereum/erc-20/{:token_address}/dashboards/address/{:address}` + +**Where:** + +- `{:token_address}` is the token contract address (should start with `0x`) +- `{:address}` is an Ethereum address (either an account or a contract, the address should start with `0x`) + +**Possible options:** + +- `?limit={:transaction_limit}` — limits the number of returned latest transactions associated with the address. Default is `100`. Maximum is `10000`. +- `?offset={:transaction_offset}` — allows to paginate transactions. Default is `0`, and the maximum is `1000000`. + +**Output:** + +The structure is similar to the [Ethereum address](#link_302) endpoint with the following differences: + +* It shows balances in tokens instead of ethers +* Fields like `first_seen_receiving` mean "first seen receiving tokens" instead of "ethers" +* Instead of the `calls` array, there's the `transactions` array with the latest token transactions (see [this](#link_506) for field descriptions). It's iterable using the `?offset=` section. + +**Context keys:** + +- `context.results` — number of found addresses +- `context.limit` — applied limit +- `context.offset` — applied offset +- `context.state` — best block height on the `{:eth_chain}` chain (tip: it's possible to calculate the number of confirmation block received using this formula: `confirmations = block_id - context.state + 1`) +- `context.state_layer_2` — the latest block number for which our engine has processed second layer (e.g. ERC-20) transactions. If it's less than the block id in your current environment (e.g. block id of a transaction you requested), it makes sense to repeat the request after some time to retrieve second layer data + +**Example request:** + +- `https://api.blockchair.com/ethereum/erc-20/0x68e14bb5a45b9681327e16e528084b9d962c1a39/dashboards/address/0x3282791d6fd713f1e94f4bfd565eaa78b3a0599d` + +**Example output:** + +`https://api.blockchair.com/ethereum/erc-20/0x68e14bb5a45b9681327e16e528084b9d962c1a39/dashboards/address/0x3282791d6fd713f1e94f4bfd565eaa78b3a0599d`: + +```json +{ + "data": { + "0x3282791d6fd713f1e94f4bfd565eaa78b3a0599d": { + "address": { + "balance": "5000000000000000000", + "balance_approximate": 5, + "received": "5000000000000000000", + "received_approximate": 5, + "spent": "0", + "spent_approximate": 0, + "receiving_transaction_count": 1, + "spending_transaction_count": 0, + "transaction_count": 1, + "first_seen_receiving": "2017-11-26 23:17:02", + "last_seen_receiving": "2017-11-26 23:17:02", + "first_seen_spending": null, + "last_seen_spending": null + }, + "transactions": [ + { + "block_id": 4628318, + "id": 17166097, + "transaction_hash": "0xd3aeac286c429f581f056388e523726e7b42caeba1d6a8df591ea2ec30daad48", + "time": "2017-11-26 23:17:02", + "token_address": "0x68e14bb5a45b9681327e16e528084b9d962c1a39", + "token_name": "en", + "token_symbol": "CAT", + "token_decimals": 18, + "sender": "0x9f89388141c632c4c6f36d1060d5f50604ee3abc", + "recipient": "0x3282791d6fd713f1e94f4bfd565eaa78b3a0599d", + "value": "5000000000000000000", + "value_approximate": 5 + } + ] + } + }, + "context": { + "code": 200, + "limit": 100, + "offset": 0, + "results": 1, + "state": 8805315, + "state_layer_2": 8805304, + ... + } +} +``` + +**Request cost formula:** + +- Always `1` + + + +## Raw data endpoints + +Retrieve raw information about various entities directly from our full nodes + + + +### Raw data endpoints for Bitcoin-like blockchains (Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin, Bitcoin Testnet) + + + +#### Raw block data + +Returns raw block data directly from our full node. If the block is larger than 10 megabytes in size, returns a `402` error. + +**Endpoints:** + +- `https://api.blockchair.com/{:btc_chain}/raw/block/{:height}₀` +- `https://api.blockchair.com/{:btc_chain}/raw/block/{:hash}₀` + +**Where:** + +- `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `bitcoin/testnet` +- `{:height}ᵢ` is the block height (integer value), also known as block id +- `{:hash}ᵢ` is the block hash (regex: `/^[0-9a-f]{64}$/i`) + +**Output:** + +`data` contains an associative array: + +- `data.{:id}ᵢ.raw_block` — raw block represented as a hex string +- `data.{:id}ᵢ.decoded_raw_block` — raw block encoded in JSON by our node. 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. We don't provide field descriptions for raw endpoints, that information can be found on the Bitcoin Core website (all Bitcoin-like blockchains the same output structure). + +Where `{:id}ᵢ` is either `{:height}ᵢ` or `{:hash}ᵢ` from the query string. If there's no `{:id}ᵢ` has been found on the blockchain, returns an empty array. + +**Context keys:** + +- `context.state`: best block height on the `{:btc_chain}` chain (tip: it's possible to calculate the number of confirmation block received using this formula: `confirmations = data.{:id}ᵢ.block.id - context.state + 1`) + +**Example requests:** + +- `https://api.blockchair.com/bitcoin/raw/block/0` +- `https://api.blockchair.com/bitcoin/raw/block/000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f` + +**Example output:** + +`https://api.blockchair.com/bitcoin/raw/block/000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f`: + +```json + +{ + "data": { + "000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f": { + "raw_block": "0100000000000000000000000000000000000000000000000000000000000000000000003ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4a29ab5f49ffff001d1dac2b7c0101000000010000000000000000000000000000000000000000000000000000000000000000ffffffff4d04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73ffffffff0100f2052a01000000434104678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5fac00000000", + "decoded_raw_block": { + "hash": "000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f", + "confirmations": 599952, + "strippedsize": 285, + "size": 285, + "weight": 1140, + "height": 0, + "version": 1, + "versionHex": "00000001", + "merkleroot": "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b", + "tx": [ + "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b" + ], + "time": 1231006505, + "mediantime": 1231006505, + "nonce": 2083236893, + "bits": "1d00ffff", + "difficulty": 1, + "chainwork": "0000000000000000000000000000000000000000000000000000000100010001", + "nTx": 1, + "nextblockhash": "00000000839a8e6886ab5951d76f411475428afc90947ee320161bbf18eb6048" + } + } + }, + "context": { + "code": 200, + ... + } +} +``` + +**Request cost formula:** + +Always `1`. + + + +#### Raw transaction data + +Returns raw transaction data directly from our full node. + +**Endpoint:** + +- `https://api.blockchair.com/{:btc_chain}/raw/transaction/{:hash}₀` + +**Where:** + +- `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `bitcoin/testnet` +- `{:hash}ᵢ` is the transaction hash (regex: `/^[0-9a-f]{64}$/i`) + +**Output:** + +`data` contains an associative array: + +- `data.{:hash}ᵢ.raw_transaction` — raw transaction represented as a hex string +- `data.{:hash}ᵢ.decoded_raw_transaction` — raw transaction encoded in JSON by our node. 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. We don't provide field descriptions for raw endpoints, that information can be found on the Bitcoin Core website (all Bitcoin-like blockchains the same output structure). + +If there's no `{:hash}ᵢ` has been found on the blockchain, returns an empty array. + +**Context keys:** + +- `context.state`: best block height on the `{:btc_chain}` chain (tip: it's possible to calculate the number of confirmation block received using this formula: `confirmations = data.{:id}ᵢ.block.id - context.state + 1`) + +**Example requests:** + +- `https://api.blockchair.com/bitcoin/raw/transaction/f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16` + +**Example output:** + +`https://api.blockchair.com/bitcoin/raw/transaction/f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16`: + +```json +{ + "data": { + "f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16": { + "raw_transaction": "0100000001c997a5e56e104102fa209c6a852dd90660a20b2d9c352423edce25857fcd3704000000004847304402204e45e16932b8af514961a1d3a1a25fdf3f4f7732e9d624c6c61548ab5fb8cd410220181522ec8eca07de4860a4acdd12909d831cc56cbbac4622082221a8768d1d0901ffffffff0200ca9a3b00000000434104ae1a62fe09c5f51b13905f07f06b99a2f7159b2225f374cd378d71302fa28414e7aab37397f554a7df5f142c21c1b7303b8a0626f1baded5c72a704f7e6cd84cac00286bee0000000043410411db93e1dcdb8a016b49840f8c53bc1eb68a382e97b1482ecad7b148a6909a5cb2e0eaddfb84ccf9744464f82e160bfa9b8b64f9d4c03f999b8643f656b412a3ac00000000", + "decoded_raw_transaction": { + "txid": "f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16", + "hash": "f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16", + "version": 1, + "size": 275, + "vsize": 275, + "weight": 1100, + "locktime": 0, + "vin": [ + { + "txid": "0437cd7f8525ceed2324359c2d0ba26006d92d856a9c20fa0241106ee5a597c9", + "vout": 0, + "scriptSig": { + "asm": "304402204e45e16932b8af514961a1d3a1a25fdf3f4f7732e9d624c6c61548ab5fb8cd410220181522ec8eca07de4860a4acdd12909d831cc56cbbac4622082221a8768d1d09[ALL]", + "hex": "47304402204e45e16932b8af514961a1d3a1a25fdf3f4f7732e9d624c6c61548ab5fb8cd410220181522ec8eca07de4860a4acdd12909d831cc56cbbac4622082221a8768d1d0901" + }, + "sequence": 4294967295 + } + ], + "vout": [ + { + "value": 10, + "n": 0, + "scriptPubKey": { + "asm": "04ae1a62fe09c5f51b13905f07f06b99a2f7159b2225f374cd378d71302fa28414e7aab37397f554a7df5f142c21c1b7303b8a0626f1baded5c72a704f7e6cd84c OP_CHECKSIG", + "hex": "4104ae1a62fe09c5f51b13905f07f06b99a2f7159b2225f374cd378d71302fa28414e7aab37397f554a7df5f142c21c1b7303b8a0626f1baded5c72a704f7e6cd84cac", + "reqSigs": 1, + "type": "pubkey", + "addresses": [ + "1Q2TWHE3GMdB6BZKafqwxXtWAWgFt5Jvm3" + ] + } + }, + { + "value": 40, + "n": 1, + "scriptPubKey": { + "asm": "0411db93e1dcdb8a016b49840f8c53bc1eb68a382e97b1482ecad7b148a6909a5cb2e0eaddfb84ccf9744464f82e160bfa9b8b64f9d4c03f999b8643f656b412a3 OP_CHECKSIG", + "hex": "410411db93e1dcdb8a016b49840f8c53bc1eb68a382e97b1482ecad7b148a6909a5cb2e0eaddfb84ccf9744464f82e160bfa9b8b64f9d4c03f999b8643f656b412a3ac", + "reqSigs": 1, + "type": "pubkey", + "addresses": [ + "12cbQLTFMXRnSzktFkuoG3eHoMeFtpTu3S" + ] + } + } + ] + } + } + }, + "context": { + "code": 200, + "results": 1, + "state": 599962, + ... + } +} +``` + +**Request cost formula:** + +Always `1`. + + + +### Dashboard endpoints for Ethereum + + + +#### Raw block data + +Returns raw block data directly from our full node. + +**Endpoints:** + +- `https://api.blockchair.com/{:eth_chain}/raw/block/{:height}₀` +- `https://api.blockchair.com/{:eth_chain}/raw/block/{:hash}₀` + +**Where:** + +- `{:eth_chain}` can only be `ethereum` +- `{:height}ᵢ` is the block height (integer value), also known as block id +- `{:hash}ᵢ` is the block hash (regex: `/^0x[0-9a-f]{64}$/i`) + +**Output:** + +`data` contains an associative array: + +- `data.{:id}ᵢ.decoded_raw_block` — raw block encoded in JSON by our node. 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. We don't provide field descriptions for raw endpoints, that information can be found on the geth implementation website. + +Where `{:id}ᵢ` is either `{:height}ᵢ` or `{:hash}ᵢ` from the query string. If there's no `{:id}ᵢ` has been found on the blockchain, returns an empty array. + +**Context keys:** + +- `context.state`: best block height on the `{:eth_chain}` chain (tip: it's possible to calculate the number of confirmation block received using this formula: `confirmations = data.{:id}ᵢ.block.id - context.state + 1`) + +**Example requests:** + +- `https://api.blockchair.com/ethereum/raw/block/2345678` +- `https://api.blockchair.com/ethereum/raw/block/0xda214d1b1d458e7ae0e626b69a52a59d19762c51a53ff64813c4d31256282fdf` + +**Example output:** + +`https://api.blockchair.com/ethereum/raw/block/2345678`: + +```json +{ + "data": { + "2345678": { + "decoded_raw_block": { + "difficulty": "0x4a823a45d075", + "extraData": "0x657468706f6f6c2e6f7267202845553129", + "gasLimit": "0x16e360", + "gasUsed": "0x19a28", + "hash": "0xda214d1b1d458e7ae0e626b69a52a59d19762c51a53ff64813c4d31256282fdf", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "miner": "0x4bb96091ee9d802ed039c4d1a5f6216f90f81b01", + "mixHash": "0xf5b95f5b79cd8425db7f04d200d78d16c104c28d078d0b653ae1c24f31759662", + "nonce": "0x0975348010868c22", + "number": "0x23cace", + "parentHash": "0x4578cd622e7e738bfd8f2675aa58337b60cf337a59347c76f61f4ed74a9811f8", + "receiptsRoot": "0x51a6952987f2c7ebf74fc1a4f644265aebb660b1d86a12c0f6e3001a2866331f", + "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "size": "0x455", + "stateRoot": "0x4f6b1af13d99c75e0d644b226d57767a0d2f22921c529dfe3455bc63154b01e5", + "timestamp": "0x57ec70dd", + "totalDifficulty": "0x3a0f803ebc49e50af", + "transactions": [ + "0x4052841e7ff856e08e73245ed1fab5f41021d4bfe83202b6581870cb559b44c4", + "0xa1ed63865958a1b3abc8e259dc980bd76dd3f989f14577cce18b7e265cf9528e", + "0x1d6713c7e6be2a45e6b3d2a7dfc1af96443cfb65d4b51cd41ac21b7b840e77e0", + "0xffbcdcbef6c5341dd60a9b7f182b61cf0c468d63defcc2fa8c56e292d4bfc8d6", + "0x0c79e3ae36150eb36d6a631cc8d6250db4b9b832a82ac58ea356357f5987debe" + ], + "transactionsRoot": "0xdde4d2ce7556effca10c868f500f0e47fb09b5cb4a003d781080f1a06e582352", + "uncles": [] + } + } + }, + "context": { + "code": 200, + "results": 1, + "state": 8766206, + "state_layer_2": 8766195, + ... + } +} +``` + +**Request cost formula:** + +Always `1`. + + + +#### Raw transaction data + +Returns raw transaction data directly from our full node. + +**Endpoint:** + +- `https://api.blockchair.com/{:eth_chain}/raw/transaction/{:hash}₀` + +**Where:** + +- `{:eth_chain}` can only be 'ethereum' +- `{:hash}ᵢ` is the transaction hash (regex: `/^0x[0-9a-f]{64}$/i`) + +**Output:** + +`data` contains an associative array: + +- `data.{:hash}ᵢ.raw_transaction` — raw transaction represented as a hex string starting with `0x` + +If there's no `{:hash}ᵢ` has been found on the blockchain, returns an empty array. + +**Context keys:** + +- `context.state`: best block height on the `{:btc_chain}` chain (tip: it's possible to calculate the number of confirmation block received using this formula: `confirmations = data.{:id}ᵢ.block.id - context.state + 1`) + +**Example requests:** + +- `https://api.blockchair.com/ethereum/raw/transaction/0x93fa9a3ac6190022adc75d1d83e3d86e0a99ac1eb88f80fec59599f55931766e` + +**Example output:** + +`https://api.blockchair.com/ethereum/raw/transaction/0x93fa9a3ac6190022adc75d1d83e3d86e0a99ac1eb88f80fec59599f55931766e`: + +```json +{ + "data": { + "0x93fa9a3ac6190022adc75d1d83e3d86e0a99ac1eb88f80fec59599f55931766e": { + "raw_transaction": "0xf8697b843b9aca0082520894536a0a5293a4575dd351563c63774a623bf2b46b866eaddc096200801ca01bd6971ae88c70ab930b3405b6f14da553f8515dced42e080ddca5f968c5bd6ca06e3a623453d5e4d91b8785ef8066f2cf82ef299e987a595ec66b5917deeb7d38" + } + }, + "context": { + "code": 200, + "results": 1, + "state": 8767087, + "state_layer_2": 8767077, + ... + } +} +``` + +**Request cost formula:** + +Always `1`. + + + +### Dashboard endpoints for Ripple + + + +#### Raw ledger data + +Returns raw ledger data directly from our full node. + +**Endpoints:** + +- `https://api.blockchair.com/{:xrp_chain}/raw/ledger/{:height}₀` +- `https://api.blockchair.com/{:xrp_chain}/raw/ledger/{:hash}₀` + +**Where:** + +- `{:xrp_chain}` can only be `ripple` +- `{:height}ᵢ` is the ledger number (integer value) +- `{:hash}ᵢ` is the ledger hash (regex: `/^[0-9a-f]{64}$/i`) + +**Possible options:** + +* `?transactions=true` displays transaction data + +**Output:** + +`data` contains an associative array: + +- `data.{:id}ᵢ.decoded_raw_ledger` — raw ledger encoded in JSON by our node. 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. We don't provide field descriptions for raw endpoints, that information can be found on the Ripple website. + +Where `{:id}ᵢ` is either `{:height}ᵢ` or `{:hash}ᵢ` from the query string. If there's no `{:id}ᵢ` has been found on the blockchain, returns an empty array. + +**Context keys:** + +- `context.state`: best block height on the `{:btc_chain}` chain (tip: it's possible to calculate the number of confirmation block received using this formula: `confirmations = data.{:id}ᵢ.block.id - context.state + 1`) + +**Example requests:** + +- `https://api.blockchair.com/ripple/raw/ledger/50000000` +- `https://api.blockchair.com/ripple/raw/ledger/0C073A753670E99C210264F7783FE5F7C3DEAEE3B1237C10B1584E6FBD2A6505` +- `https://api.blockchair.com/ripple/raw/ledger/50000000?transactions=true` + +**Example output:** + +`https://api.blockchair.com/ripple/raw/ledger/50000000`: + +```json +{ + "data": { + "50000000": { + "decoded_raw_ledger": { + "accepted": true, + "account_hash": "191EA9DD67A3FDAA40293D762EB4F96AB852ACA499AA37F3851616EF449A63E1", + "close_flags": 0, + "close_time": 621665931, + "close_time_human": "2019-Sep-13 04:58:51.000000000", + "close_time_resolution": 10, + "closed": true, + "hash": "0C073A753670E99C210264F7783FE5F7C3DEAEE3B1237C10B1584E6FBD2A6505", + "ledger_hash": "0C073A753670E99C210264F7783FE5F7C3DEAEE3B1237C10B1584E6FBD2A6505", + "ledger_index": "50000000", + "parent_close_time": 621665930, + "parent_hash": "3B4431099292FC6DBF3875FB2FA1022B2FF06B765ABA163B09DF4F1383A3E30B", + "seqNum": "50000000", + "totalCoins": "99991346321080101", + "total_coins": "99991346321080101", + "transaction_hash": "8FD966C7D8DEAE695655B65E968FFE36521869D5278C4115BBDEB697D084A8AC" + }, + "ledger_hash": "0C073A753670E99C210264F7783FE5F7C3DEAEE3B1237C10B1584E6FBD2A6505", + "ledger_index": 50000000, + "marker": "000003E6AFED1AADCC39AAE0727B354C2286F1503274F345FE661748F24366CE", + "state": null, + "status": "success", + "validated": true + } + }, + "context": { + "code": 200, + "results": 1, + "state": 50797264, + ... + } +} +``` + +**Request cost formula:** + +Always `1`. + +**Explore visualization on our front-end:** + +- https://blockchair.com/ripple/ledger/50000000 + + + +#### Raw transaction data + +Returns raw transaction data directly from our full node. + +**Endpoint:** + +- `https://api.blockchair.com/{:xrp_chain}/raw/transaction/{:hash}₀` + +**Where:** + +- `{:xrp_chain}` can only be 'ripple' +- `{:hash}ᵢ` is the transaction hash (regex: `/^[0-9a-f]{64}$/i`) + +**Output:** + +`data` contains an associative array: + +- `data.{:hash}ᵢ.decoded_raw_transaction` — raw transaction encoded in JSON by our node. 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. We don't provide field descriptions for raw endpoints, that information can be found on the Ripple website` + +If there's no `{:hash}ᵢ` has been found on the blockchain, returns an empty array. + +**Context keys:** + +- `context.state`: best ledger height on the `{:xrp_chain}` chain + +**Example requests:** + +- `https://api.blockchair.com/ripple/raw/transaction/0847A0062757E3490389069DBB3FBA8626EEEE07C126123660248CE1B32D34E3` + +**Example output:** + +`https://api.blockchair.com/ripple/raw/transaction/0847A0062757E3490389069DBB3FBA8626EEEE07C126123660248CE1B32D34E3`: + +```json +{ + "data": { + "0847A0062757E3490389069DBB3FBA8626EEEE07C126123660248CE1B32D34E3": { + "Account": "rKLpjpCoXgLQQYQyj13zgay73rsgmzNH13", + "Amount": { + "currency": "XCN", + "issuer": "rPFLkxQk6xUGdGYEykqe7PR25Gr7mLHDc8", + "value": "10000" + }, + "Destination": "rKLpjpCoXgLQQYQyj13zgay73rsgmzNH13", + "Fee": "11", + "Flags": 2147942400, + "LastLedgerSequence": 50000001, + "Paths": [ + [ + { + "currency": "CNY", + "issuer": "rKiCet8SdvWxPXnAgYarFUXMh1zCPz432Y", + "type": 48, + "type_hex": "0000000000000030" + }, + { + "currency": "USD", + "issuer": "rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq", + "type": 48, + "type_hex": "0000000000000030" + }, + { + "currency": "XRP", + "type": 16, + "type_hex": "0000000000000010" + }, + { + "currency": "XCN", + "issuer": "rPFLkxQk6xUGdGYEykqe7PR25Gr7mLHDc8", + "type": 48, + "type_hex": "0000000000000030" + } + ], + ... + ], + "SendMax": "10000000000", + "Sequence": 5435383, + "SigningPubKey": "030AC4F2BA6E1FF86BEB234B639918DAFDF0675032AE264D2B39641503822373FE", + "TransactionType": "Payment", + "TxnSignature": "30450221009533287ED1277DD0E8EDC49A75A6E1B2ADE5F4282915EF91C4466B7D21175E380220424535BDFB12F040516FC3E947BAEA5F40C5F03CA3B63C0375F1773C9FFC793E", + "date": 621665931, + "hash": "0847A0062757E3490389069DBB3FBA8626EEEE07C126123660248CE1B32D34E3", + "inLedger": 50000000, + "ledger_index": 50000000, + "status": "success" + } + }, + "context": { + "code": 200, + "results": 1, + "state": 50799948, + ... + } +} +``` + +**Request cost formula:** + +Always `1`. + +**Explore visualization on our front-end:** + +- https://blockchair.com/ripple/transaction/18BC01124BC4FBA1D4CF8EAA934EBCDC9136FE987D0F7E1505A94C767465500C + + + +#### Raw account data + +Returns raw account data directly from our full node. + +**Endpoint:** + +- `https://api.blockchair.com/{:xrp_chain}/raw/account/{:account}` + +**Where:** + +- `{:xrp_chain}` can only be 'ripple' +- `{:account}ᵢ` is the account address + +**Possible options:** + +- `?assets=true` returns information about account's assets +- `?transactions=true` returns information about latest 10 transactions + +**Output:** + +`data` contains an associative array: + +- `data.{:account}ᵢ` — raw account data encoded in JSON by our node. 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. We don't provide field descriptions for raw endpoints, that information can be found on the Ripple website + +If there's no `{:account}ᵢ` has been found on the blockchain, returns an empty array. + +**Context keys:** + +- `context.state`: best ledger height on the `{:xrp_chain}` chain + +**Example requests:** + +- `https://api.blockchair.com/ripple/dashboards/account/rh3VLyj1GbQjX7eA15BwUagEhSrPHmLkSR?assets=true&transactions=true` +- `https://api.blockchair.com/ripple/dashboards/account/rh3VLyj1GbQjX7eA15BwUagEhSrPHmLkSR?assets=true&transactions=true` + +**Example output:** + +`https://api.blockchair.com/ripple/dashboards/account/rh3VLyj1GbQjX7eA15BwUagEhSrPHmLkSR?assets=true&transactions=true`: + +```json +{ + "data": { + "rh3VLyj1GbQjX7eA15BwUagEhSrPHmLkSR": { + "account": { + "account_data": { + "Account": "rh3VLyj1GbQjX7eA15BwUagEhSrPHmLkSR", + "Balance": "97894917", + "Flags": 0, + "LedgerEntryType": "AccountRoot", + "OwnerCount": 5, + "PreviousTxnID": "7F358F814D4E9FD7FB9E3E00CD00D1616458E7DBEC7F764C0E5F63949398B414", + "PreviousTxnLgrSeq": 50803417, + "Sequence": 14884800, + "index": "E0311EB450B6177F969B94DBDDA83E99B7A0576ACD9079573876F16C0C004F06" + }, + "ledger_current_index": 50803418, + "status": "success", + "validated": false + }, + "assets": { + "account": "rh3VLyj1GbQjX7eA15BwUagEhSrPHmLkSR", + "ledger_current_index": 50803418, + "lines": [ + { + "account": "rJ1adrpGS3xsnQMb9Cw54tWJVFPuSdZHK", + "balance": "573982.6565030623", + "currency": "CNY", + "limit": "1000000000", + "limit_peer": "0", + "no_ripple": true, + "no_ripple_peer": true, + "quality_in": 0, + "quality_out": 0 + } + ], + "status": "success", + "validated": false + }, + "transactions": { + "account": "rh3VLyj1GbQjX7eA15BwUagEhSrPHmLkSR", + "ledger_index_max": 50803417, + "ledger_index_min": 50226369, + "limit": 10, + "marker": { + "ledger": 50803415, + "seq": 25 + }, + "status": "success", + "transactions": [ + { + "meta": { + "AffectedNodes": [ + { + "CreatedNode": { + "LedgerEntryType": "DirectoryNode", + "LedgerIndex": "1AC09600F4B502C8F7F830F80B616DCB6F3970CB79AB70975A128D7E42783345", + "NewFields": { + "ExchangeRate": "5A128D7E42783345", + "RootIndex": "1AC09600F4B502C8F7F830F80B616DCB6F3970CB79AB70975A128D7E42783345", + "TakerGetsCurrency": "000000000000000000000000434E590000000000", + "TakerGetsIssuer": "0360E3E0751BD9A566CD03FA6CAFC78118B82BA0" + } + } + }, + { + "DeletedNode": { + "FinalFields": { + "ExchangeRate": "5A128D7E427D2AA7", + "Flags": 0, + "RootIndex": "1AC09600F4B502C8F7F830F80B616DCB6F3970CB79AB70975A128D7E427D2AA7", + "TakerGetsCurrency": "000000000000000000000000434E590000000000", + "TakerGetsIssuer": "0360E3E0751BD9A566CD03FA6CAFC78118B82BA0", + "TakerPaysCurrency": "0000000000000000000000000000000000000000", + "TakerPaysIssuer": "0000000000000000000000000000000000000000" + }, + "LedgerEntryType": "DirectoryNode", + "LedgerIndex": "1AC09600F4B502C8F7F830F80B616DCB6F3970CB79AB70975A128D7E427D2AA7" + } + }, + { + "CreatedNode": { + "LedgerEntryType": "Offer", + "LedgerIndex": "2E113BC264A73193A08038293E32D7D6474D0035EC21B5F9B559360046106385", + "NewFields": { + "Account": "rh3VLyj1GbQjX7eA15BwUagEhSrPHmLkSR", + "BookDirectory": "1AC09600F4B502C8F7F830F80B616DCB6F3970CB79AB70975A128D7E42783345", + "Sequence": 14884795, + "TakerGets": { + "currency": "CNY", + "issuer": "rJ1adrpGS3xsnQMb9Cw54tWJVFPuSdZHK", + "value": "13873.74225408225" + }, + "TakerPays": "7245038854" + } + } + }, + { + "DeletedNode": { + "FinalFields": { + "Account": "rh3VLyj1GbQjX7eA15BwUagEhSrPHmLkSR", + "BookDirectory": "1AC09600F4B502C8F7F830F80B616DCB6F3970CB79AB70975A128D7E427D2AA7", + "BookNode": "0000000000000000", + "Flags": 0, + "OwnerNode": "0000000000000000", + "PreviousTxnID": "9CD2DE1FDC90C8CC23687B7125CD9142B0404BD08E7D346A350C7DCB6DAECC0E", + "PreviousTxnLgrSeq": 50803416, + "Sequence": 14884791, + "TakerGets": { + "currency": "CNY", + "issuer": "rJ1adrpGS3xsnQMb9Cw54tWJVFPuSdZHK", + "value": "29217.47535833971" + }, + "TakerPays": "15257725012" + }, + "LedgerEntryType": "Offer", + "LedgerIndex": "82729E243E07C4A691D01DEFC94BD86B3C5A4634A58054B479226E11C427ABCC" + } + }, + { + "ModifiedNode": { + "FinalFields": { + "Flags": 0, + "IndexNext": "0000000000000000", + "IndexPrevious": "0000000000000000", + "Owner": "rh3VLyj1GbQjX7eA15BwUagEhSrPHmLkSR", + "RootIndex": "AEA3074F10FE15DAC592F8A0405C61FB7D4C98F588C2D55C84718FAFBBD2604A" + }, + "LedgerEntryType": "DirectoryNode", + "LedgerIndex": "AEA3074F10FE15DAC592F8A0405C61FB7D4C98F588C2D55C84718FAFBBD2604A" + } + }, + { + "ModifiedNode": { + "FinalFields": { + "Account": "rh3VLyj1GbQjX7eA15BwUagEhSrPHmLkSR", + "Balance": "97894965", + "Flags": 0, + "OwnerCount": 5, + "Sequence": 14884796 + }, + "LedgerEntryType": "AccountRoot", + "LedgerIndex": "E0311EB450B6177F969B94DBDDA83E99B7A0576ACD9079573876F16C0C004F06", + "PreviousFields": { + "Balance": "97894977", + "Sequence": 14884795 + }, + "PreviousTxnID": "C8EE48118ACB84DF41168BEB7D991CD07C7D21EDB52F798AA0ED1C296EE7C4C0", + "PreviousTxnLgrSeq": 50803417 + } + } + ], + "TransactionIndex": 8, + "TransactionResult": "tesSUCCESS" + }, + "tx": { + "Account": "rh3VLyj1GbQjX7eA15BwUagEhSrPHmLkSR", + "Fee": "12", + "Flags": 0, + "LastLedgerSequence": 50803419, + "OfferSequence": 14884791, + "Sequence": 14884795, + "SigningPubKey": "022D40673B44C82DEE1DDB8B9BB53DCCE4F97B27404DB850F068DD91D685E337EA", + "TakerGets": { + "currency": "CNY", + "issuer": "rJ1adrpGS3xsnQMb9Cw54tWJVFPuSdZHK", + "value": "13873.74225408225" + }, + "TakerPays": "7245038854", + "TransactionType": "OfferCreate", + "TxnSignature": "3044022032CDB56EB073D2BABAB4646F494478A6CAEE4B94BACB6D15124261FA04BFF80C022077D11F8EB991954F71F7712F92240F8D1DD393369E7DC37E855E00778ADAD64D", + "date": 624761581, + "hash": "7F358F814D4E9FD7FB9E3E00CD00D1616458E7DBEC7F764C0E5F63949398B414", + "inLedger": 50803417, + "ledger_index": 50803417 + }, + "validated": true + }, + ... + ] + } + } + }, + "context": { + "code": 200, + "results": 1, + "state": 50803416, + ... + } +} +``` + +**Request cost formula:** + +Always `1`. + +**Explore visualizations on our front-end:** + +- https://blockchair.com/ripple/account/rKLpjpCoXgLQQYQyj13zgay73rsgmzNH13 + + + +## Infinitable endpoints (blockchain tables) + +These endpoints allow you to filter, sort, and aggregate blockchain data. The output is database rows. Unlike dashboard and raw endpoints, all infinitable endpoints listed in this section can be considered as just one endpoint as it has the same options and the same output structure across different blockchains and entities. Here it is: `https://api.blockchair.com/{:table}{:query}`. + +Just don't ask why do we call that `infinitables`… Infinite tables? Maybe. + +**List of tables (`{:table}`) our engine supports:** + +* `{:btc_chain}/blocks` +* `{:btc_chain}/transactions` +* `{:btc_chain}/mempool/transactions` +* `{:btc_chain}/outputs` +* `{:btc_chain}/mempool/outputs` +* `{:btc_chain}/addresses` +* `{:eth_chain}/blocks` +* `{:eth_chain}/uncles` +* `{:eth_chain}/transactions` +* `{:eth_chain}/mempool/transactions` +* `{:eth_chain}/calls` +* `bitcoin/omni/properties` +* `bitcoin-cash/wormhole/properties` +* `ethereum/erc-20/tokens` +* `ethereum/erc-20/transactions` + +Where: + +* `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, or `bitcoin/testnet` +* `{:eth_chain}` can be only `ethereum` + +Note on mempool tables: to speed up some requests, our architecture have separate tables (`{:chain}/mempool/{:entity}`) for unconfirmed transactions. Unlike with dashboard endpoints which search entities like transactions in both the blockchain and the mempool, infinitable endpoints don't do that. + +The `{:query}` is optional; in case it's not included in the request, the default sorting applied to the table (for most of the tables it's descending by some id) and the 10 top results are returned. + +Here are some example queries without using `{:query}`: + +* `https://api.blockchair.com/bitcoin/blocks` +* `https://api.blockchair.com/bitcoin-cash/mempool/transactions` + +**The output skeleton is the following:** + +```json +{ + "data": [ + { + ... // row 1 data + }, + ... + { + ... // row 10 data + }, + ], + "context": { + "limit": 10, // the default limit of 10 is applied + "offset": 0, // no offset has been set + "rows": 10, // the response contains 10 rows + "total_rows": N, // but there are N rows in the table matching {:query} (total number of rows if it's not set) + "state": S, // the latest block number on the blockchain + ... + } +} +``` + +Further documentation sections describe fields returned for different tables. Some of the dashboard endpoints are using the same fields as well. + +**How to build a query** + +The process is somewhat similar to constructing an SQL query, but there are less possibilities of course. + +Here are the possible options: + +* Setting filters — the `?q=` section — allows you to set a number of filters (SQL "`WHERE`") +* Setting sortings — the `?s=` section — allows you to sort the table (SQL "`ORDER BY` ") +* Setting the limit — the `?limit=` section — limits the number of output results (SQL "`LIMIT`") +* Setting the offset — the `?offset=` section — offsets the result set (SQL "`OFFSET`") +* Aggregating data — the `?a=` sections — allows to group by some columns and calculate using function (SQL "`GROUP BY`" and functions such as `count`, `max`, etc.) +* The table (SQL "`FROM`") is set in the `{:table}` section of the API request + +The order of applying various sections is irrelevant. + +A quick example: `https://api.blockchair.com/bitcoin/blocks?q=time(2019-01),guessed_miner(AntPool)&s=size(desc)&limit=1`. This request: + +* Makes a query to the `bitcoin/blocks` table +* Filters the table by time (finds all blocks mined in January 2019) and miner (AntPool) +* Sorts the table by block size descending +* Limits the number of results to 1 + +What this example does is finding the largest block mined by AntPool in January 2019. + +Another example using aggregation: `https://api.blockchair.com/bitcoin/blocks?q=time(2019-01-01..2019-01-31)&a=guessed_miner,count()&s=count()(desc)`. This request: + +* As the previous one, makes a query to the `bitcoin/blocks` table +* Filters the table by time (in a bit different way, but it's an invariant of `time(2019-01)`) +* Groups the table by miner, and calculating the number of rows for each miner using the `count()` function +* Sorts the result set by the number of blocks each miner has found + +**The `?q=` section (filters)** + +You can use filters as follows: `?q=field(expression)[,field(expression)]...`, where `field` is the column which is going to be filtered, and `expression` is a filtering expression. These are possilble filtering expressions: + +- `equals` — equality — example: ` https://api.blockchair.com/bitcoin/blocks?q=id(0)` finds information about block 0 +- `left..` — non-strict inequality — example: `https://api.blockchair.com/bitcoin/blocks?q=id(1..)` finds information about block 1 and above +- `left...` — strict inequality — example: `https://api.blockchair.com/bitcoin/blocks?q=id(1...)` finds information about block 2 and above +- `..right` — non-strict inequality — example: `https://api.blockchair.com/bitcoin/blocks?q=id(..1)` finds information about blocks 0 and 1 +- `...right` — strict inequality — example: `https://api.blockchair.com/ bitcoin/blocks?q=id(...1)` finds information only about block 0 +- `left..right` — non-strict inequality — example: `https://api.blockchair.com/bitcoin/blocks?q=id(1..3)` finds information about blocks 1, 2 and 3 +- `left...right` — strict inequality — example: `https://api.blockchair.com/bitcoin/blocks?q=id(1...3)` finds information about block 2 only +- `~like` — occurrence in a string (SQL `LIKE '%str%'` operator) — example: `https://api.blockchair.com/bitcoin/blocks?q=coinbase_data_bin(~hello)` finds all blocks which contain `hello` in `coinbase_data_bin` +- `^like` — occurrence at the beginning of a string (SQL `LIKE 'str%'` operator, also further mentioned as the `STARTS WITH` operator) — example: `https://api.blockchair.com/bitcoin/blocks?q=coinbase_data_hex(^00)` finds all blocks for which` coinbase_data_hex` begins with `00` + +For timestamp type fields, values can be specified in the following formats: + +- `YYYY-MM-DD HH:ii:ss` +- `YYYY-MM-DD` (converted to the `YYYY-MM-DD 00:00:00..YYYY-MM-DD 23:59:59` range) +- `YYYY-MM` (converted to the `YYYY-MM-01 00:00:00..YYYY-MM-31 23:59:59` range) + +Inequalities are also supported for timestamps, the left and right values must be in the same format, e.g.: `https://api.blockchair.com/bitcoin/blocks?q=time(2009-01-03..2009-01-31)`. + +Ordinarilly if there's `time` column in the table, there should also be `date`, but there won't be possible to search over the `date` column directly, but you can search by date using the `time` column as follows: `?q=time(YYYY-MM-DD)` + +If the left value in an inequality is larger than the right, they switch places. + +If you want to list several filters, you need to separate them using commas like this: `https://api.blockchair.com/bitcoin/blocks?q=id(500000..),coinbase_data_bin(~hello)` + +We're currently testing support for `NOT` and `OR` operators (this is an alpha test feature, so we don't guarantee there won't be sudden changes): + +* The `NOT` operator is added before the expression for it to be inverted, e.g., `https://api.blockchair.com/bitcoin/blocks?q=not,id(1..)` returns the block `0` +* The `OR` operator can be put between two expressions and takes precedence (like it's when two expressions around `OR` are wrapped in parentheses), e.g., `https://api.blockchair.com/bitcoin/blocks?q=id(1),or,id(2)` returns information about blocks 1 and 2. + +Maximum guaranteed supported number of filters in one query: 5. + +**The `?s=` section (sortings)** + +Sorting can be used as follows: `?s=field(direction)[,field(direction)]...`, where `direction` can be either `asc` for sorting in ascending order, or `desc` for sorting in descending order. + +Here's a basic example: `https://api.blockchair.com/bitcoin/blocks?s=id(asc)` — sorts blocks by id ascending + +If you need to apply several sortings, you can list them separating with commas. The maximum guaranteed number of sortings is 2. + +**The `?limit=` section (limit)** + +Limit is used like this: `?limit=N`, where N is a natural number from 1 to 100. The default is 10. `context.limit` takes the value of the set limit. In some cases (when using some specific "increased efficiency" filters described below) `LIMIT` may be ignored, and in such cases the API returns the entire result set, and `context.limit` will be set to `NULL`. + +A basic example: `https://api.blockchair.com/bitcoin/blocks?limit=1` — returns the latest block data (as the default sorting for this table is by block height descending) + +Note that increasing the limit leads to an increase in the request cost (see the formula below). + +**The `?offset=` section (offset)** + +Offset can be used as a paginator, e.g., `?offset=10` returns the next 10 rows. `context.offset` takes the value of the set offset. The maximum value is 10000. If you need just the last page, it's easier and quicker to change the direction of the sorting to the opposite. + +**Important**: while iterating through the results, it is quite likely that the number of rows in the database will increase because new blocks had found while you were paginating. To avoid that, you may, for example, add an additional condition that limits the block id to the value obtained in `context.state` in the first query. + +Here's an example. Suppose we would like to receive all the latest transactions from the Bitcoin blockchain with amount more than $1M USD. The following request should be perfomed for this: + +- `https://api.blockchair.com/bitcoin/transactions?q=output_total_usd(10000000..)&s=id(desc)` + +Now, the script with this request to the API for some reason did not work for a while, or a huge amount of transactions worth more than $1 million appeared. With the standard limit of 10 results, the script skipped some transactions. Then firstly we should make the same request once again: + +- `https://api.blockchair.com/bitcoin/transactions?q=output_total_usd(10000000..)&s=id(desc)` + +From the response we put `context.state` in a variable `{:state}`, and further to obtain next results we apply `offset` and set a filter to "fix" the blockchain state: + +- `https://api.blockchair.com/bitcoin/transactions?q=output_total_usd(10000000..),block_id(..{:state})&s=id(desc)&offset=10` + +Next we increase the offset value until getting a data set with the transaction that we already knew about. + +**The `?a=` section (data aggregation)** + +*Warning*: data aggregation is currently in beta stage on our platform. -For `time*`-fields, the value can be specified in the following formats: -* `YYYY-MM-DD HH:ii:ss` -* `YYYY-MM-DD` -* `YYYY-MM` +To use aggregation, put the fields by which you'd like to group by (zero, one, or several), and fields (at least one) which you'd like to calculate using some aggregate function under the `?a=` section. You can also sort the results by one of the fields included in the `?a=` section (`asc` or `desc`) using the `?s=` section, and apply additional filters using the `?q=` section. -Inequalities are also supported for such values, but the left and right values must be in the same format, e.g.: `bitcoin/blocks?q=time(2009-01-03..2009-01-31)`. +Let's start with some examples: -If you need to list several filters, you need to sepatate them by commas in the `?q=` section, e.g., `bitcoin/blocks?q=id(500000..),coinbase_data_bin(~hello)` +- `https://api.blockchair.com/bitcoin/blocks?a=year,count()` — get the total number of Bitcoin blocks by year +- `https://api.blockchair.com/bitcoin/transactions?a=month,median(fee_usd)` — get the median Bitcoin transaction fees by month +- `https://api.blockchair.com/ethereum/blocks?a=miner,sum(generation)&s=sum(generation)(desc)` — get the list of Ethereum miners (except uncle miners) and sort it by the total amount of coins minted +- `https://api.blockchair.com/bitcoin-cash/blocks?a=sum(fee_total_usd)&q=id(478559..)` — calculate how much miners have collected in fees since the fork -We're currently testing support for `NOT` and `OR` operators (this may change in the future, including possible removal of these operators). +In case the table you're aggregating over has a `time` column, it's always possible to group by the following virtual columns: -The operator `NOT` is comma-separated before the expression to be inverted, e.g., `bitcoin/blocks?q=not,id(1..)` returns the block `0`. +- `date` +- `week` (yields `YYYY-MM-DD` corresponding to Mondays) +- `month` (yields `YYYY-MM` ) +- `year` (yields `YYYY` ) -The `OR` operator is specified between the expressions and takes precedence (like it's when two expressions around `OR` are wrapped in parentheses), e.g., `bitcoin/blocks?q=id(1),or,id(2)` returns information about blocks 1 and 2. +Supported functions: -Maximum guaranteed supported number of filters in one query: 5. +* `avg({:field})` +* `median({:field})` +* `min({:field})` +* `max({:field})` +* `sum({:field})` +* `count()` + +There are also two special functions: + +* `price({:ticker1}_{:ticker2})`— yields the price; works only if you group by `date` (or one of: `week`, `month`, `year`). For example, it makes it possible to build a chart showing correlation between price and transaction count: `https://api.blockchair.com/bitcoin/blocks?a=month,sum(transaction_count),price(btc_usd)`. Supported tickers: `usd`, `btc`, `bch`, `eth`, `ltc`, `bsv`, `doge`, `dash`, `grs` +* `f({:expression})` where `{:expression}` is `{:function_1}{:operator}{:function_2}`, where `{:function_1}` and `{:function_2}` are the supported functions from the above list, and `{:operator}` is one of the following: `+`, `-`, `/`, `*` (basic math operators). It's useful to calculate percentages. Example: `https://api.blockchair.com/bitcoin/blocks?a=date,f(sum(witness_count)/sum(transaction_count))&q=time(2017-08-24..)` — calculates SegWit adoption (by dividing the SegWit transaction count by the total transaction count) + +There's also a special `?aq=` section which have the following format: `?aq={:i}:{:j}` — it applies `i`th filter to `j`th function (special functions don't count); after that `i`th filter has no effect on filtering the table. It's possible to have multiple conditions by separating them with a `;`. Here's an example: `https://api.blockchair.com/bitcoin/outputs?a=date,f(count()/count())&q=type(nulldata),time(2019-01)&aq=0:0` — calculates the percentage of nulldata outputs in January 2019 by day. The 0th condition (`type(nulldata)`) is applied to the 0th function (`count()`) and removed afterwards. + +If you use the `?a=` section, the default limit is 10000 instead of 10. + +It's possible to export aggregated data to TSV or CSV format using `&export=tsv` or `&export=csv` accordingly. Example: `https://api.blockchair.com/bitcoin/transactions?a=date,avg(fee_usd)&q=time(2019-01-01..2019-04-01)&export=tsv`. This feature is available on Premium API plans with export functions only. Unlike when not using aggragating, this doesn't require listing the fields to export. + +*Warning*: the `f({:expression})` special function, the `?aq=` section, and TSV/CSV export are currently in alpha stage on our platform. Special function `price({:ticker1}_{:ticker2})` can't be used within special function `f({:expression})`. There are some known issues when sorting if `f({:expression})` is present. There are some known issues when applying the `?aq=` section to inequality filters. + +**Fun example** + +The following requests return the same result: + +* `https://api.blockchair.com/bitcoin/blocks?a=sum(reward)` +* `https://api.blockchair.com/bitcoin/transactions?a=sum(output_total)&q=is_coinbase(true)` +* `https://api.blockchair.com/bitcoin/outputs?a=sum(value)&q=is_from_coinbase(true)` + +**Export data to TSV or CSV** + +Some of our Premium API plans support export to TSV and CSV formats ignoring `?limit=` and `?offset=` sections (along with the max limit of 100 rows). In order to export, you should + +* Apply `&export=tsv` or `&export=csv` to the request +* List the necessary fields in `&fields=` separating them with commas + +Here's an example: `https://api.blockchair.com/bitcoin/blocks?q=time(2019-01)&export=tsv&fields=id,hash` — responds with a TSV file containing ids and hashes for blocks mined in January 2019 (4525 rows in total) + +To test this functionality, on the free plan we allow to export from `blocks` tables across the blockchains we support up to 1 million cells (rows * columns) at once. + +If you'd like to export entire tables without using filters — it's better to use our Database dumps feature instead of the API (see https://blockchair.com/dumps for documentation) + +*Warning*: this functionality is in beta stage. + +**Request cost formula for infinitables** + +Cost is calculated by summing up the following values: + +* The base cost for the table (see the table below): `2`, `5`, or `10` +* Applying a filter costs `1` +* Applying a sorting costs `0` +* Applying an offset costs `0` +* Applying an aggregation costs `10` + +Applying a limit over the default multiplies the summed cost by `1 + 0.01 * number_of_rows_over_the_default_limit`. If the defaut limit is 10 and the base cost is 2, requesting 100 rows will cost `2 * (1 + 0.01 * 90) = 3.8`. + +| Table | Base cost | +| ----------------------------------- | --------- | +| `{:btc_chain}/blocks` | `2` | +| `{:btc_chain}/transactions` | `5` | +| `{:btc_chain}/mempool/transactions` | `2` | +| `{:btc_chain}/outputs` | `10` | +| `{:btc_chain}/mempool/outputs` | `2` | +| `{:btc_chain}/addresses` | `2` | +| `{:eth_chain}/blocks` | `2` | +| `{:eth_chain}/uncles` | `2` | +| `{:eth_chain}/transactions` | `5` | +| `{:eth_chain}/mempool/transactions` | `2` | +| `{:eth_chain}/calls` | `10` | +| `bitcoin/omni/properties` | `10` | +| `bitcoin-cash/wormhole/properties` | `10` | +| `ethereum/erc-20/tokens` | `2` | +| `ethereum/erc-20/transactions` | `5` | + +**Table descriptions** + +Further in documentations are table descriptions. Each documentation section contains a general description, and a table describing the table columns (fields) in the following format: + +| Column | Type | Description | Q? | S? | A? | C? | +| ------------- | ------------- | -------------------- | ------------------------------------------ | ---------------------------------------- | ----------------------------------------- | ------------------------------------------------------------ | +| *Column name* | *Column type* | *Column description* | *Is it possible to filter by this column?* | *Is it possible to sort by this column?* | *Is it possible to group by this column?* | *Is it possible to apply aggregation functions (like `sum` to this column)?* | + +The following marks are possible for the `Q?` column: + +* `=` — possible to use equalities only +* `*` — possible to use both equalities and inequalities +* `⌘` — possible to use special format (applies to timestamp fields) +* `~` — possible to use the `LIKE` operator +* `^` — possible to use the `STARTS WITH` operator +* `*≈` — possible to use both equalities and inequalities, may return some results which are a bit out of the set range (this is used to swiftly search over the Ethereum blockchain that uses too long wei numbers for transfer amounts) + +For the `S?`, `A?`, and `C?` columns it's either `+` (which means "yes") or nothing. `⌘` means some additional options may be available (in case of aggregation it may either mean additional fields like `year` are available, or in case of functions — only `min` and `max` are available). + +There can also be synthetic columns which aren't shown in the response, but you can still filter or sort by them. If there are any, they will be listed in a separate table. + + + +### Inifinitable endpoints for Bitcoin-like blockchains (Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin, Bitcoin Testnet) -**Sorting** can be used as follows: `?s=field(direction)`, where `direction` can be either `asc` for sorting in ascending order, or `desc` for sorting in descending order, e.g. `bitcoin/blocks?s=id(asc)` - -If you need to apply several sorts, you can list them by commas, similar to filters. The maximum guaranteed number of sorts is 2. - -**Limit** is used like this: `?limit=N`, where N is a natural number from 1 to 100. The default is 10. In some cases `LIMIT` is ignored, and in such cases `context.limit` will be set to `NULL`. - -**Offset** can be used as a paginator, e.g., `?offset=10` returns the next 10 results. `context.offset` takes the value of the set `OFFSET`. The maximum value is 10000. If you need just the last page, it's easier and quicker to change the direction of the sorting to the opposite. Important: when iterating through the results, it is extremely likely that the number of rows in the database will increase because new blocks were found. To avoid that, you may add an additional condition that limits the block id to the value obtained in `context.state` in the first query. - -#### bitcoin/blocks, bitcoin-cash/blocks, bitcoin-sv/blocks, litecoin/blocks, dogecoin/blocks, dash/blocks, groestlcoin/blocks - -E.g. `https://api.blockchair.com/bitcoin/blocks` - -Returns data about blocks - -| Column | Type | Description | Q? | S? | -|--------|------|-------------|----|----| -| id | int | Block height | + | + | -| hash | string `[0-9a-f]{64}` | Block hash | + | + | -| date | string `YYYY-MM-DD` | Block date (UTC) | | | -| time | string `YYYY-MM-DD HH:ii:ss` | Block time (UTC) | + | + | -| median_time | string `YYYY-MM-DD HH:ii:ss` | Block median time (UTC) | | | + | -| size | int | Block size, in bytes (may be more than 1 MB for Bitcoin, up to 32 MB for Bitcoin Cash) | + | + | -| stripped_size(\*) | int | Block size in bytes without taking witness information into account (up to 1 MB for Bitcoin) | + | + | -| weight (\*) | int | Block weight in weight units (up to 4 MWU) | + | + | -| version | int | Version field | + | + | -| version_hex | string `[0-9a-f]*` | Version field in hex | | | -| version_bits | string `[01]{30}` | Version field in binary form | | | -| merkle_root | `[0-9a-f]{64}` | Merkle root hash | | | -| nonce | int | Nonce value | + | + | -| bits | int | Bits field | + | + | -| difficulty | float | Difficulty | + | + | -| chainwork | string `[0-9a-f]{64}` | Chainwork field | | | -| coinbase_data_hex | string `[0-9a-f]*` | Hex information contained in the input of the coinbase transaction | + | | -| transaction_count | int | Number of transactions in the block | + | + | -| witness_count (\*) | int | Number of transactions in the block containing witness information | + | + | -| input_count | int | Number of inputs in all block transactions | + | + | -| output_count | int | Number of outputs in all block transactions | + | + | -| input_total | int | Sum of inputs in satoshi | + | + | -| input_total_usd | float | Sum of outputs in USD (hereinafter for USD - at the moment `date`) | + | + | -| output_total | int | Sum of outputs in Satoshi | + | + | -| output_total_usd | float | Sum of outputs in USD | + | + | -| fee_total | int | Total fee in Satoshi | + | + | -| fee_total_usd | float | Total fee in USD | + | + | -| fee_per_kb | float | Fee per kilobyte (1000 bytes of data) in satoshi | + | + | -| fee_per_kb_usd | float | Fee for kilobyte of data in USD | + | + | -| fee_per_kwu (\*) | float | Fee for 1000 weight units of data in Satoshi | + | + | -| fee_per_kwu_usd (\*) | float | Fee for 1000 weight units of data in USD | + | + | -| cdd_total | float | Number of coindays destroyed by all transactions of the block | + | + | -| generation | int | Miner reward for the block in Satoshi | + | + | -| generation_usd | float | Miner reward for the block in USD | + | + | -| reward | int | Miner total reward (reward + total fee) in Satoshi | + | + | -| reward_usd | float | Miner total reward (reward + total fee) in USD | + | + | -| guessed_miner | string `.*` | The supposed name of the miner who found the block (the heuristic is based on `coinbase_data_bin` and the addresses to which the reward goes) | + | + | -| is_aux (\*\*) | boolean | Whether a block was mined using AuxPoW | | + | | -| cbtx (\*\*\*) | string `.*` | Coinbase transaction data (encoded JSON) | | | | - - -Additional synthetic columns (you can search over them and / or sort them, but they are not shown) - -| Column | Type | Description | Q? | S? | -|--------|------|-------------|----|----| -| coinbase_data_bin | string `.*` | Text representation of coinbase data. Allows you to use the `LIKE` operator: `?q=coinbase_data_bin(~hello)` | + | | + + +#### `blocks` table + +**Endpoint:** + +- `https://api.blockchair.com/{:btc_chain}/blocks?{:query}` + +**Where:** + +- `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `bitcoin/testnet` +- `{:query}` is the query against the table ([how to build a query](#link_05)) + +**Output:** + +`data` contains an array of database rows. Each row is in the following format: + +| Column | Type | Description | Q? | S? | A? | C? | +| ----------------- | ---------------------------- | ------------------------------------------------------------ | ---- | ---- | ---- | ---- | +| id | int | Block height | `*` | `+` | | `⌘` | +| hash | string `[0-9a-f]{64}` | Block hash | `=` | `+` | | | +| date | string `YYYY-MM-DD` | Block date (UTC) | | | `⌘` | | +| time | string `YYYY-MM-DD HH:ii:ss` | Block time (UTC) | `⌘` | `+` | | | +| median_time | string `YYYY-MM-DD HH:ii:ss` | Block median time (UTC) | | `+` | | | +| size | int | Block size in bytes | `*` | `+` | | `+` | +| stripped_size † | int | Block size in bytes without taking witness information into account | `*` | `+` | | `+` | +| weight † | int | Block weight in weight units | `*` | `+` | | `+` | +| version | int | Version field | `*` | `+` | `+` | | +| version_hex | string `[0-9a-f]*` | Version field in hex | | | | | +| version_bits | string `[01]{30}` | Version field in binary format | | | | | +| merkle_root | `[0-9a-f]{64}` | Merkle root hash | | | | | +| nonce | int | Nonce value | `*` | `+` | | | +| bits | int | Bits field | `*` | `+` | | | +| difficulty | float | Difficulty | `*` | `+` | | `+` | +| chainwork | string `[0-9a-f]{64}` | Chainwork field | | | | | +| coinbase_data_hex | string `[0-9a-f]*` | Hex information contained in the input of the coinbase transaction | `^` | | | | +| transaction_count | int | Number of transactions in the block | `*` | `+` | | `+` | +| witness_count † | int | Number of transactions in the block containing witness information | `*` | `+` | | `+` | +| input_count | int | Number of inputs in all block transactions | `*` | `+` | | `+` | +| output_count | int | Number of outputs in all block transactions | `*` | `+` | | `+` | +| input_total | int | Sum of inputs in satoshi | `*` | `+` | | `+` | +| input_total_usd | float | Sum of outputs in USD | `*` | `+` | | `+` | +| output_total | int | Sum of outputs in satoshi | `*` | `+` | | `+` | +| output_total_usd | float | Sum of outputs in USD | `*` | `+` | | `+` | +| fee_total | int | Total fee in Satoshi | `*` | `+` | | `+` | +| fee_total_usd | float | Total fee in USD | `*` | `+` | | `+` | +| fee_per_kb | float | Fee per kilobyte (1000 bytes of data) in satoshi | `*` | `+` | | `+` | +| fee_per_kb_usd | float | Fee for kilobyte of data in USD | `*` | `+` | | `+` | +| fee_per_kwu † | float | Fee for 1000 weight units of data in satoshi | `*` | `+` | | `+` | +| fee_per_kwu_usd † | float | Fee for 1000 weight units of data in USD | `*` | `+` | | `+` | +| cdd_total | float | Number of coindays destroyed by all transactions of the block | `*` | `+` | | `+` | +| generation | int | Miner reward for the block in satoshi | `*` | `+` | | `+` | +| generation_usd | float | Miner reward for the block in USD | `*` | `+` | | `+` | +| reward | int | Miner total reward (reward + total fee) in satoshi | `*` | `+` | | `+` | +| reward_usd | float | Miner total reward (reward + total fee) in USD | `*` | `+` | | `+` | +| guessed_miner | string `.*` | The supposed name of the miner who found the block (the heuristic is based on `coinbase_data_bin` and the addresses to which the reward goes) | `=` | `+` | `+` | | +| is_aux ‡ | boolean | Whether a block was mined using AuxPoW | `=` | | `+` | | +| cbtx ※ | string `.*` | Coinbase transaction data (encoded JSON) | | | | | + +Additional synthetic columns + +| Column | Type | Description | Q? | S? | A? | C? | +| ----------------- | ----------- | ------------------------------------------------------------ | ---- | ---- | ---- | ---- | +| coinbase_data_bin | string `.*` | Text (UTF-8) representation of coinbase data. Allows you to use the `LIKE` operator: `?q=coinbase_data_bin(~hello)` | `~` | | | | Notes: -- for the columns `id` and` hash` the increased efficiency at unloading of one record is applied -- there is no possibility to search over the `date` column directly, you can search like `?q=time(YYYY-MM-DD)` -- the search over the column `coinbase_data_hex` is done by the operator `^`, you can also use `~` for `coinbase_data_bin` (however, the field `coinbase_data_bin` will not be shown anyway) -- (\*) - only for Bitcoin, Litecoin, and Groestlcoin (SegWit data) -- (\*\*) - only for Dogecoin -- (\*\*\*) - only for Dash -- the default sorting - id DESC - -#### bitcoin/transactions, bitcoin/mempool/transactions, bitcoin-cash/transactions, bitcoin-cash/mempool/transactions, litecoin/transactions, litecoin/mempool/transactions, dogecoin/transactions, dogecoin/mempool/transactions, dash/transactions, dash/mempool/transactions, bitcoin-sv/transactions, bitcoin-sv/mempool/transactions, groestlcoin/transaction, groestlcoin/mempool/transactions - -E.g. `https://api.blockchair.com/dogecoin/mempool/transactions` - -Returns transaction data - -| Column | Type | Description | Q? | S? | -|--------|------|-------------|----|----| -| block_id | int | The height (id) of the block containing the transaction | + | + | -| id | int | Internal transaction id (not related to the blockchain, used for internal purposes) | + | + | -| hash | string `[0-9a-f]{64}` | Transaction hash | + | | -| date | string `YYYY-MM-DD` | The date of the block containing the transaction (UTC) | | | -| time | string `YYYY-MM-DD HH:ii:ss` | Time of the block containing the transaction (UTC) | + | + | -| size | int | Transaction size in bytes | + | + | -| weight (\*) | int | Weight of transaction in weight units | + | + | -| version | int | Transaction version field | + | + | -| lock_time | int | Lock time - can be either a block height, or a unix timestamp | + | + | -| is_coinbase | boolean | Is it a coinbase (generating new coins) transaction? (For such a transaction `input_count` is equal to` 1` and means a synthetic coinbase input) | | + | | -| has_witness (\*) | boolean | Is there a witness part in the transaction (using SegWit)? | | + | | -| input_count | int | Number of inputs | + | + | -| output_count | int | Number of outputs | + | + | -| input_total | int | Input value in satoshi | + | + | -| input_total_usd | float | Input value in USD | + | + | -| output_total | int | Output value in Satoshi | + | + | -| output_total_usd | float | Total output value in USD | + | + | -| fee | int | Fee in Satoshi | + | + | -| fee_usd | float | Fee in USD | + | + | -| fee_per_kb | float | Fee per kilobyte (1000 bytes) of data in Satoshi | + | + | -| fee_per_kb_usd | float | Fee for kilobyte of data in USD | + | + | -| fee_per_kwu (\*) | float | Fee for 1000 weight units of data in Satoshi | + | + | -| fee_per_kwu_usd (\*) | float | Fee for 1000 weight units of data in USD | + | + | -| cdd_total | float | The number of destroyed coindays | + | + | + +- `increased efficiency` method applies if querying `id` and ` hash` columns using the `equals` operator +- † — only for Bitcoin, Litecoin, Groestlcoin, and Bitcoin Testnet (SegWit data) +- ‡ — only for Dogecoin +- ※ — only for Dash +- The default sorting — `id DESC` + +**Example output:** + +`https://api.blockchair.com/bitcoin/blocks?limit=1`: + +```json +{ + "data": [ + { + "id": 599954, + "hash": "0000000000000000000a405e0eb599136580eed78682bfe6648c5f7b6f81a9cb", + "date": "2019-10-18", + "time": "2019-10-18 17:16:18", + "median_time": "2019-10-18 16:41:08", + "size": 1291891, + "stripped_size": 900520, + "weight": 3993451, + "version": 536870912, + "version_hex": "20000000", + "version_bits": "100000000000000000000000000000", + "merkle_root": "800c37c217eb0b53f8e5144602b8605876e12939f85d350e3d677fe89b8da476", + "nonce": 318379413, + "bits": 387294044, + "difficulty": 13008091666972, + "chainwork": "0000000000000000000000000000000000000000096007e2e467d315afd86f91", + "coinbase_data_hex": "039227090452f3a95d2f706f6f6c696e2e636f6d2ffabe6d6d95254907ac051f810232ebdb4865ce204353bc59bbd533e40fb1cd3d29b8e06701000000000000007570ce1586aa43da2aabdab74791c8cd10d4473db1006158555400000000", + "transaction_count": 2157, + "witness_count": 1320, + "input_count": 6564, + "output_count": 4969, + "input_total": 255590274198, + "input_total_usd": 20610300, + "output_total": 256840274198, + "output_total_usd": 20711100, + "fee_total": 14959404, + "fee_total_usd": 1206.3, + "fee_per_kb": 11583, + "fee_per_kb_usd": 0.93403, + "fee_per_kwu": 3744.56, + "fee_per_kwu_usd": 0.301955, + "cdd_total": 7884.6687017888, + "generation": 1250000000, + "generation_usd": 100798, + "reward": 1264959404, + "reward_usd": 102004, + "guessed_miner": "Poolin" + } + ], + "context": { + "code": 200, + "limit": 1, + "offset": 0, + "rows": 1, + "total_rows": 599955, + "state": 599954, + ... + } +} +``` + +**Request cost formula:** + +See [request costs for infinitables](#link_05) + +**Explore visualizations on our front-end:** + +- https://blockchair.com/bitcoin/blocks +- https://blockchair.com/bitcoin-cash/blocks +- https://blockchair.com/litecoin/blocks +- https://blockchair.com/bitcoin-sv/blocks +- https://blockchair.com/dogecoin/blocks +- https://blockchair.com/dash/blocks +- https://blockchair.com/groestlcoin/blocks +- https://blockchair.com/bitcoin/testnet/blocks + + + +#### `transactions` table + +**Endpoints:** + +- `https://api.blockchair.com/{:btc_chain}/transactions?{:query}` (for blockchain transactions) +- `https://api.blockchair.com/{:btc_chain}/mempool/transactions?{:query}` (for mempool transactions) + +**Where:** + +- `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `bitcoin/testnet` +- `{:query}` is the query against the table ([how to build a query](#link_05)) + +**Output:** + +`data` contains an array of database rows. Each row is in the following format: + +| Column | Type | Description | Q? | S? | A? | C? | +| ----------------- | ---------------------------- | ------------------------------------------------------------ | ---- | ---- | ---- | ---- | +| block_id | int | The height (id) of the block containing the transaction | `*` | `+` | `+` | | +| id | int | Internal Blockchair transaction id (not related to the blockchain, used for internal purposes) | `*` | `+` | | | +| hash | string `[0-9a-f]{64}` | Transaction hash | `=` | | | | +| date | string `YYYY-MM-DD` | The date of the block containing the transaction (UTC) | | | `⌘` | | +| time | string `YYYY-MM-DD HH:ii:ss` | Timestamp of the block containing the transaction (UTC) | `⌘` | `+` | | | +| size | int | Transaction size in bytes | `*` | `+` | | `+` | +| weight † | int | Weight of transaction in weight units | `*` | `+` | | `+` | +| version | int | Transaction version field | `*` | `+` | `+` | | +| lock_time | int | Lock time — can be either a block height, or a unix timestamp | `*` | `+` | | | +| is_coinbase | boolean | Is it a coinbase (generating new coins) transaction? (For such a transaction `input_count` is equal to` 1` and means there's a synthetic coinbase input) | `=` | | `+` | | +| has_witness † | boolean | Is there a witness part in the transaction (using SegWit)? | `=` | | `+` | | +| input_count | int | Number of inputs | `*` | `+` | `+` | `+` | +| output_count | int | Number of outputs | `*` | `+` | `+` | `+` | +| input_total | int | Input value in satoshi | `*` | `+` | | `+` | +| input_total_usd | float | Input value in USD | `*` | `+` | | `+` | +| output_total | int | Output value in satoshi | `*` | `+` | | `+` | +| output_total_usd | float | Total output value in USD | `*` | `+` | | `+` | +| fee | int | Fee in satoshi | `*` | `+` | | `+` | +| fee_usd | float | Fee in USD | `*` | `+` | | `+` | +| fee_per_kb | float | Fee per kilobyte (1000 bytes) of data in satoshi | `*` | `+` | | `+` | +| fee_per_kb_usd | float | Fee for kilobyte of data in USD | `*` | `+` | | `+` | +| fee_per_kwu † | float | Fee for 1000 weight units of data in satoshi | `*` | `+` | | `+` | +| fee_per_kwu_usd † | float | Fee for 1000 weight units of data in USD | `*` | `+` | | `+` | +| cdd_total | float | The number of destroyed coindays | `*` | `+` | | `+` | + +Additional Dash-specific columns: + +| Column | Type | Description | Q? | S? | A? | C? | +| ----------------- | ------------- | ------------------------------------------------------------ | ---- | ---- | ---- | ---- | +| type ※ | string (enum) | Transaction type, one of the following: `simple`, `proregtx`, `proupservtx`, `proupregtx`, `prouprevtx`, `cbtx`, `qctx`, `subtxregister`, `subtxtopup`, `subtxresetkey`, `subtxcloseaccount` | `=` | | `+` | | +| is_instant_lock ※ | boolean | Is instant lock? | `=` | | | | +| is_special ※ | boolean | `true` for all transaction types except `simple` | `=` | | | | +| special_json ※ | string `.*` | Special transaction data (encoded JSON string) | | | | | Notes: -- for the columns `id` and` hash` the increased efficiency at unloading of one record is applied -- there is no possibility to search over `date` column, you can use `?q=time(YYYY-MM-DD instead -- (\*) - only for Bitcoin, Litecoin, and Groestlcoin (SegWit data) -- the default sort is id DESC + +- `increased efficiency` method applies if querying `id` and ` hash` columns using the `equals` operator +- † — only for Bitcoin, Litecoin, Groestlcoin, and Bitcoin Testnet (SegWit data) +- ※ — only for Dash +- The default sorting — `id DESC` - `block_id` for mempool transactions is `-1` -Additional Dash-specific columns: +**Example output:** + +`https://api.blockchair.com/bitcoin/transactions?limit=1`: + +```json +{ + "data": [ + { + "block_id": 600573, + "id": 467508697, + "hash": "ee13104d4331cad2fff5ab6cd249a9fec940d64df442a6de5f51ea63c34ef8ff", + "date": "2019-10-22", + "time": "2019-10-22 19:09:34", + "size": 250, + "weight": 672, + "version": 1, + "lock_time": 0, + "is_coinbase": false, + "has_witness": true, + "input_count": 1, + "output_count": 2, + "input_total": 29340442, + "input_total_usd": 2408.9, + "output_total": 29340274, + "output_total_usd": 2408.89, + "fee": 168, + "fee_usd": 0.0137931, + "fee_per_kb": 672, + "fee_per_kb_usd": 0.0551723, + "fee_per_kwu": 250, + "fee_per_kwu_usd": 0.0205254, + "cdd_total": 29.154456198211 + } + ], + "context": { + "code": 200, + "limit": 1, + "offset": 0, + "rows": 1, + "total_rows": 467508698, + "state": 600573, + ... + } +} +``` -| Column | Type | Description | Q? | S? | -|--------|------|-------------|----|----| -| type | string (enum) | Transaction type, one of the following: `simple`, `proregtx`, `proupservtx`, `proupregtx`, `prouprevtx`, `cbtx`, `qctx`, `subtxregister`, `subtxtopup`, `subtxresetkey`, `subtxcloseaccount` | + | + | -| is_instant_lock | boolean | | + | | -| is_special | boolean | | + | `true` for all transaction types except `simple` | -| special_json | string `.*` | Special transaction data (encoded JSON) | | | | - -#### bitcoin/outputs, bitcoin/mempool/outputs, bitcoin-cash/outputs, bitcoin-cash/mempool/outputs, litecoin/outputs, litecoin/mempool/outputs, dogecoin/outputs, dogecoin/mempool/outputs, dash/outputs, dash/mempool/outputs, bitcoin-sv/outputs, bitcoin-sv/mempool/outputs, groestlcoin/outputs, groestlcoin/mempool/outputs - -E.g. `https://api.blockchair.com/litecoin/mempool/outputs` - -Returns information about the outputs (that become inputs when they are spent, and then `spending*` information appears) - -| Column | Type | Description | Q? | S? | -|--------|------|-------------|----|----| -| block_id | int | Id of a block containing the transaction cointaining the output | + | + | -| transaction_id | int | The internal transaction id containing the output | + | + | -| index | int | Output index in a transaction (from 0) | + | + | -| transaction_hash | string `[0-9a-f]{64}` | Transaction hash | | | -| date | string `YYYY-MM-DD` | Date of a block containing the output (UTC) | | | -| time | string `YYYY-MM-DD HH:ii:ss` | Time of a block containing the output (UTC) | + | + | -| value | int | Monetary value of output | + | + | -| value_usd | float | Monetary value of output in USD at the moment `date` | + | + | -| recipient | string `[0-9a-zA-Z\-]*` | Bitcoin address or synthetic address of an output recipient | + | + | -| type | string (enum) | Output type, one of the following: `pubkey/pubkeyhash/scripthash/multisig/nulldata/nonstandard/witness_v0_scripthash/witness_v0_keyhash/witness_unknown` | + | + | -| script_hex | string `[0-9a-f]*` | Hex of the output script | + | | -| is_from_coinbase | boolean | Is it a coinbase transaction output? | | + | | -| is_spendable | null or boolean | Is it theoretically possible to spend this output? For `pubkey` and` multisig` outputs, the existence of the corresponding private key is tested, in that case `true` and `false` are the possible values, depending on the result of the check. For `nulldata` outputs, it is always `false`. For other types it is impossible to check trivially, in this case `null` is shown | + | | -| is_spent | boolean | Is this output spent? (Each field further contains `null` if it is not spent | + | | -| spending_block_id | null or int | Id of the block containing the spending transaction. `null` if the output is not yet spent. | | + | + | -| spending_transaction_id | null or int | Internal transaction id where the output is spent | + | + | -| spending_index | null or int | Input index in the spending transaction (from 0) | + | + | -| spending_transaction_hash | null or string `[0-9a-f]{64}` | Spending transaction hash | | | -| spending_date | null or string `YYYY-MM-DD` | Date of the block, in which the output is spent | | | -| spending_time | null or string `YYYY-MM-DD HH:ii:ss` | Time of the block in which the output is spent | + | + | -| spending_value_usd | null or float | Monetary value of output in USD at the time of `spending_date` | + | + | -| spending_sequence | null or int | The technical sequence value | + | + | -| spending_signature_hex | null or string `[0-9a-f]*` | Hex of the spending script (signature) | | | -| spending_witness (\*) | null or string (JSONB) | Witness information in the escaped JSONB format | | | -| lifespan | null or int | The number of seconds from the time of the output creation (`time`) to its spending (`spending_time`), `null` if the output is not spent | + | + | -| cdd | null or float | The number of coindays destroyed spending the output | + | + | - -Additional synthetic columns (you can search over them and / or sort them, but they are not shown) - -| Column | Type | Description | Q? | S? | -|--------|------|-------------|----|----| -| script_bin | string `.*` | Text representation of script_hex. Allows you to use the `LIKE` operator: `?q=script_bin(~hello)`| + | | +**Request cost formula:** + +See [request costs for infinitables](#link_05) + +**Explore visualizations on our front-end:** + +- https://blockchair.com/bitcoin/transactions +- https://blockchair.com/bitcoin-cash/transactions +- https://blockchair.com/litecoin/transactions +- https://blockchair.com/bitcoin-sv/transactions +- https://blockchair.com/dogecoin/transactions +- https://blockchair.com/dash/transactions +- https://blockchair.com/groestlcoin/transactions +- https://blockchair.com/bitcoin/testnet/transactions +- https://blockchair.com/bitcoin/mempool/transactions +- https://blockchair.com/bitcoin-cash/mempool/transactions +- https://blockchair.com/litecoin/mempool/transactions +- https://blockchair.com/bitcoin-sv/mempool/transactions +- https://blockchair.com/dogecoin/mempool/transactions +- https://blockchair.com/dash/mempool/transactions +- https://blockchair.com/groestlcoin/mempool/transactions +- https://blockchair.com/bitcoin/testnet/mempool/transactions + + + + +#### `outputs` table + +**Endpoints:** + +- `https://api.blockchair.com/{:btc_chain}/outputs?{:query}` (input and output data for blockchain transactions) +- `https://api.blockchair.com/{:btc_chain}/mempool/outputs?{:query}` (input and output data for mempool transactions) + +**Where:** + +- `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `bitcoin/testnet` +- `{:query}` is the query against the table ([how to build a query](#link_05)) + +**Output:** + +`data` contains an array of database rows. Rows represent transaction outputs (that also become transaction inputs when they are spent). Each row is in the following format: + +| Column | Type | Description | Q? | S? | A? | C? | +| ------------------------- | ------------------------------------ | ------------------------------------------------------------ | ---- | ---- | ---- | ---- | +| block_id | int | Id of the block containing the transaction cointaining the output | `*` | `+` | `+` | | +| transaction_id | int | Internal Blockchair transaction id (not related to the blockchain, used for internal purposes) | `*` | `+` | | | +| index | int | Output index in the transaction (from 0) | `*` | `+` | | | +| transaction_hash | string `[0-9a-f]{64}` | Transaction hash | | | | | +| date | string `YYYY-MM-DD` | Date of the block containing the output (UTC) | | | | | +| time | string `YYYY-MM-DD HH:ii:ss` | Timestamp of the block containing the output (UTC) | `⌘` | `+` | | | +| value | int | Monetary value of the output | `*` | `+` | | `+` | +| value_usd | float | Monetary value of the output in USD | `*` | `+` | | `+` | +| recipient | string `[0-9a-zA-Z\-]*` | Address or synthetic address of the output recipient (see [address types description](#link_300)) | `=` | `+` | `+` | | +| type | string (enum) | Output type, one of the following: `pubkey`, `pubkeyhash`, `scripthash`, `multisig`, `nulldata`, `nonstandard`, `witness_v0_scripthash`, `witness_v0_keyhash`, `witness_unknown` | `=` | `+` | `+` | | +| script_hex | string `[0-9a-f]*` | Hex value of the output script. Filtering using the `STARTS WITH` operator is performed for `nulldata` outputs only. | `^` | | | | +| is_from_coinbase | boolean | Is it a coinbase transaction output? | `=` | | `+` | | +| is_spendable | null or boolean | Is it theoretically possible to spend this output? For `pubkey` and` multisig` outputs, the existence of the corresponding private key is tested, in that case `true` and `false` are the possible values depending on the result of the check. For `nulldata` outputs it is always `false`. For other types it is impossible to check trivially, in that case `null` is yielded. | `=` | | `+` | | +| is_spent | boolean | Has this output been spent? **(`spending_*` fields below yield `null` if it is not)** | `=` | | `+` | | +| spending_block_id | null or int | Id of the block containing the spending transaction | `*` | `+` | `+` | | +| spending_transaction_id | null or int | Internal Blockchair transaction id where the output was spent | `*` | `+` | | | +| spending_index | null or int | Input index in the spending transaction (from 0) | `*` | `+` | | | +| spending_transaction_hash | null or string `[0-9a-f]{64}` | Spending transaction hash | | | | | +| spending_date | null or string `YYYY-MM-DD` | Date of the block, in which the output was spent | | | `⌘` | | +| spending_time | null or string `YYYY-MM-DD HH:ii:ss` | Timestamp of the block in which the output was spent | `⌘` | `+` | | | +| spending_value_usd | null or float | Monetary value of the output in USD at the time of `spending_date` | `*` | `+` | | `+` | +| spending_sequence | null or int | Sequence field | `*` | `+` | | | +| spending_signature_hex | null or string `[0-9a-f]*` | Hex value of the spending script (signature) | | | | | +| spending_witness † | null or string (JSONB) | Witness information in the escaped JSONB format | | | | | +| lifespan | null or int | The number of seconds from the time of the output creation (`time`) to its spending (`spending_time`), `null` if the output hasn't been spent | `*` | `+` | | `+` | +| cdd | null or float | The number of coindays destroyed spending the output, `null` if the output hasn't been spent | `*` | `+` | | `+` | + +Additional synthetic columns + +| Column | Type | Description | Q? | S? | A? | C? | +| ---------- | ----------- | ------------------------------------------------------------ | ---- | ---- | ---- | ---- | +| script_bin | string `.*` | Text (UTF-8) representation of `script_hex`. Allows you to use the `LIKE` operator: `?q=script_bin(~hello)`. Filtering using the `LIKE` operator is performed for `nulldata` outputs only. | `~` | | | | Notes: -- for columns `transaction_id` and `spending_transaction_id`, the increased efficiency at unloading records if one specific transaction is specified (and not the range), is applied -- there is no possibility to search over the `date` and `spending_date` columns, you can use `?q=time(YYYY-MM-DD)` and `?q=spending_time(YYYY-MM-DD)` instead -- the search over `script_hex` column can be done by the operator `^`, you can also use `~` for `script_bin` (however, the field `script_bin` will still not be shown) -- (\*) - only for Bitcoin, Litecoin, and Groestlcoin (SegWit data) -- the default sort is - transaction_id DESC -#### bitcoin/addresses, bitcoin-cash/addresses, litecoin/addresses, dogecoin/addresses, dash/addresses, bitcoin-sv/addresses, groestlcoin/addresses +- `increased efficiency` method applies if querying `transaction_id` and `spending_transaction_id` columns using the `equals` operator +- † — only for Bitcoin, Litecoin, Groestlcoin, and Bitcoin Testnet (SegWit data) +- The default sorting — `transaction_id DESC` +- `spending_*` columns yield `null` for outputs that haven't been spent yet +- `block_id` for mempool transactions is `-1` +- `spending_block_id` is `-1` for outputs being spent by an unconfirmed transaction +- This particular table is in beta test mode on our platform. It's possible to receive duplicate rows for outputs which have just been spent. Sometimes duplicates are removed automatically, but in that case the number of rows may be less than the set limit on the number of rows. There's an additional context key `context.pre_rows` which contains the number of rows that should've been returned before the duplicate removal process. + +**Example outputs:** + +`https://api.blockchair.com/bitcoin/outputs?q=is_spent(true)&limit=1` (example of a spent output created in `transaction_hash` transaction and spent in `spending_transaction_hash` transaction : + +```json +{ + "data": [ + { + "block_id": 600573, + "transaction_id": 467508619, + "index": 1, + "transaction_hash": "a3c43b4bdc245e0675812e2779703ef5cf2c0e15df8b46d99e6e085a6bbedbe7", + "date": "2019-10-22", + "time": "2019-10-22 19:09:34", + "value": 14638337, + "value_usd": 1201.83, + "recipient": "3FdhDDr42mMXX4tpG6dPkHuoCrPTJk3yjH", + "type": "scripthash", + "script_hex": "a91498f0e489f60c3971fa304290257374d7ea92292b87", + "is_from_coinbase": false, + "is_spendable": null, + "is_spent": true, + "spending_block_id": 600573, + "spending_transaction_id": 467508620, + "spending_index": 0, + "spending_transaction_hash": "6350ac986bd8974fafbf3fc8c498a923dc1b8c6fa40f6569227f343aa6a50ce1", + "spending_date": "2019-10-22", + "spending_time": "2019-10-22 19:09:34", + "spending_value_usd": 1201.83, + "spending_sequence": 4294967294, + "spending_signature_hex": "16001433f44aa318c7cac6703f0d09f2dc4314dd68d769", + "spending_witness": "304402204fe6a8c36d400f64975f7a08119f7e311b75d32b358a48bfe65fb355a40fd1230220122ed99fc4024290a82efd0d94707f23eeac513978a211f6f4893e11af3b9c3301,027f502e7a018afa8d50dd17c459d987e7754486b46f131bfe1b0e2841f3afbb64", + "lifespan": 0, + "cdd": 0 + } + ], + "context": { + "code": 200, + "limit": 1, + "offset": 0, + "rows": 1, + "pre_rows": 1, + "total_rows": 1150457958, + "state": 600573, + ... + } +} +``` + +`https://api.blockchair.com/bitcoin/outputs?q=is_spent(false)&limit=1` (example of an uspent output): + +```json +{ + "data": [ + { + "block_id": 600573, + "transaction_id": 467508697, + "index": 1, + "transaction_hash": "ee13104d4331cad2fff5ab6cd249a9fec940d64df442a6de5f51ea63c34ef8ff", + "date": "2019-10-22", + "time": "2019-10-22 19:09:34", + "value": 23725010, + "value_usd": 1947.86, + "recipient": "3P8771VCWU2tyFj7gPS1ZuV4JzJrJWjn3K", + "type": "scripthash", + "script_hex": "a914eb195d6b2b50fc134078f65b72741d4c37e821de87", + "is_from_coinbase": false, + "is_spendable": null, + "is_spent": false, + "spending_block_id": null, + "spending_transaction_id": null, + "spending_index": null, + "spending_transaction_hash": null, + "spending_date": null, + "spending_time": null, + "spending_value_usd": null, + "spending_sequence": null, + "spending_signature_hex": null, + "spending_witness": null, + "lifespan": null, + "cdd": null + } + ], + "context": { + "code": 200, + "limit": 1, + "offset": 0, + "rows": 1, + "pre_rows": 1, + "total_rows": 99482704, + "state": 600573, + ... + } +} +``` + +**Request cost formula:** + +See [request costs for infinitables](#link_05) + +**Explore visualizations on our front-end:** + +- https://blockchair.com/bitcoin/transactions +- https://blockchair.com/bitcoin-cash/transactions +- https://blockchair.com/litecoin/transactions +- https://blockchair.com/bitcoin-sv/transactions +- https://blockchair.com/dogecoin/transactions +- https://blockchair.com/dash/transactions +- https://blockchair.com/groestlcoin/transactions +- https://blockchair.com/bitcoin/testnet/transactions +- https://blockchair.com/bitcoin/mempool/transactions +- https://blockchair.com/bitcoin-cash/mempool/transactions +- https://blockchair.com/litecoin/mempool/transactions +- https://blockchair.com/bitcoin-sv/mempool/transactions +- https://blockchair.com/dogecoin/mempool/transactions +- https://blockchair.com/dash/mempool/transactions +- https://blockchair.com/groestlcoin/mempool/transactions +- https://blockchair.com/bitcoin/testnet/mempool/transactions + -E.g. `https://api.blockchair.com/bitcoin/addresses` -The `addresses` view contains the list of all addresses and their confirmed balances. Unlike other infinitables (`blocks`, `transactions`, `outputs`) this table isn't live, it's automatically updated every 5 minutes, thus we classify it as a "view". -| Column | Type | Description | Q? | S? | -|--------|------|-------------|----|----| -| address | string `[0-9a-zA-Z\-]*` | Bitcoin address or synthetic address | | | -| balance | int | Its confirmed balance | + | + | +#### `addresses` view + +**Endpoints:** + +- `https://api.blockchair.com/{:btc_chain}/addresses?{:query}` + +**Where:** + +- `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `bitcoin/testnet` +- `{:query}` is the query against the table ([how to build a query](#link_05)) + +**Output:** + +The `addresses` view contains the list of all addresses and their confirmed balances. Unlike other infinitables (`blocks`, `transactions`, `outputs`) this table isn't live, it's automatically updated every 5 minutes with new data, thus we classify it as a "view". `data` contains an array of database rows. Each row is in the following format: + +| Column | Type | Description | Q? | S? | A? | C? | +| ------- | ----------------------- | ------------------------------------ | ---- | ---- | ---- | ---- | +| address | string `[0-9a-zA-Z\-]*` | Bitcoin address or synthetic address | | | | | +| balance | int | Its confirmed balance | `*` | `+` | | `+` | Notes: -- the default sort is - `balance DESC` - -#### ethereum/blocks, ethereum/mempool/blocks - -Returns block data (`mempool` contains the latest 6 blocks) - -| Column | Type | Description | Q? | S? | -|--------|------|-------------|----|----| -| id | int | Block id | + | + | -| hash | string `0x[0-9a-f]{64}` | Block hash (with 0x) | + | | -| date | string `YYYY-MM-DD` | Block date (UTC) | | | -| time | string `YYYY-MM-DD HH:ii:ss` | Block time (UTC) | + | + | -| size | int | Block size in bytes | + | + | -| miner | string `0x[0-9a-f]{40}` | Address of a rewarded miner (from 0x) | + | | -| extra_data_hex | string `[0-9a-f]*` | Additional data included by the miner | + | | -| difficulty | int | Difficulty | + | + | -| gas_used | int | Gas amount used by block transactions | + | + | -| gas_limit | int | Gas limit for a block set up by the miner | + | + | -| logs_bloom | string `[0-9a-f]*` | Logs Bloom | | | -| mix_hash | string `[0-9a-f] {64}` | Hash Mix hash | | | -| nonce | string `[0-9a-f]*` | Nonce value | | | -| receipts_root | string `[0-9a-f] {64}` | Receipts Root hash | | | -| sha3_uncles | string `[0-9a-f] {64}` | SHA3 Uncles hash | | | -| state_root | string `[0-9a-f] {64}` | State Root hash | | | -| total_difficulty | numeric string | Total difficulty | | | -| transactions_root | string `[0-9a-f] {64}` | Transactions Root hash | | | -| uncle_count | int | Number of uncles | + | + | -| transaction_count | int | Number of transactions in the block | + | + | -| synthetic_transaction_count | int | The number of synthetic transactions (they do not exist as separate transactions, but they change the state, e.g., genesis block transactions, miner rewards, DAO-fork transactions) | + | + | -| call_count (\*) | int | Total number of calls spawned by transactions | + | + | -| synthetic_call_count | int | Number of synthetic calls (same as synthetic transactions) | + | + | -| value_total | numeric string | Monetary value of all block transactions in wei, hereinafter `numeric string` - numeric value passed as a string, because wei-values do not fit into uint64 | + | + | -| value_total_usd | float | Monetary value of all block transactions in USD | + | + | -| internal_value_total (\*) | numeric string | Monetary value of all internal calls in the block (see note below) in wei | + | + | -| internal_value_total_usd (\*) | float | Monetary value of all internal calls in a block in USD | + | + | -| generation | numeric string | The reward of a miner for the block generation in wei (3 or 5 ether + reward for uncle inclusion) | + | + | -| generation_usd | float | The reward of a miner for the block generation in USD | + | + | -| uncle_generation (\*) | numeric string | Total reward of uncle miners in wei | + | + | -| uncle_generation_usd (\*) | float | Total reward of uncle miners in USD | + | + | -| fee_total (\*) | numeric string | Total fee in wei | + | + | -| fee_total_usd (\*) | float | Total fee in USD | + | + | -| reward (\*) | numeric string | Total reward of the miner in the wei (reward for finding the block + fees) | + | + | -| reward_usd (\*) | float | Total reward of the miner in USD | + | + | - -Additional synthetic columns (you can search over them and / or sort them, but they are not shown) - -| Column | Type | Description | Q? | S? | -|--------|------|-------------|----|----| -| extra_data_bin | string `.*` | Text representation of extra data. Allows you to use the `LIKE` operator: `?q=extra_data_bin(~hello)`| + | | + +- the default sorting — `balance DESC` + +**Example outputs:** + +`https://api.blockchair.com/bitcoin/addresses`: + +```json +{ + "data": [ + { + "address": "34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo", + "balance": 16625913046297 + }, + { + "address": "35hK24tcLEWcgNA4JxpvbkNkoAcDGqQPsP", + "balance": 15100013129630 + }, + { + "address": "385cR5DM96n1HvBDMzLHPYcw89fZAXULJP", + "balance": 11730490887099 + }, + { + "address": "3CgKHXR17eh2xCj2RGnHJHTDjPpqaNDgyT", + "balance": 11185824580401 + }, + { + "address": "37XuVSEpWW4trkfmvWzegTHQt7BdktSKUs", + "balance": 9450576862072 + }, + { + "address": "183hmJGRuTEi2YDCWy5iozY8rZtFwVgahM", + "balance": 8594734898577 + }, + { + "address": "1FeexV6bAHb8ybZjqQMjJrcCrHGW9sb6uF", + "balance": 7995720088144 + }, + { + "address": "3D2oetdNuZUqQHPJmcMDDHYoqkyNVsFk9r", + "balance": 7689310178244 + }, + { + "address": "1HQ3Go3ggs8pFnXuHVHRytPCq5fGG8Hbhx", + "balance": 6937013094817 + }, + { + "address": "3E35SFZkfLMGo4qX5aVs1bBDSnAuGgBH33", + "balance": 6507708194519 + } + ], + "context": { + "code": 200, + "limit": 10, + "offset": 0, + "rows": 10, + "total_rows": 27908261, + "state": 600568, + ... + } +} +``` + +`https://api.blockchair.com/bitcoin/addresses?a=sum(balance)` (total balance of all addresses should be the same as the total number of coins minted): + +```json +{ + "data": [ + { + "sum(balance)": 1800708303344571 + } + ], + "context": { + "code": 200, + "limit": 10000, + "offset": null, + "rows": 1, + "total_rows": 1, + "state": 600568, + ... + } +} +``` + +`https://api.blockchair.com/bitcoin/addresses?a=count()&q=balance(1..10)` (shows the number of addresses holding [1..10] satoshi): + +```json +{ + "data": [ + { + "count()": 574591 + } + ], + "context": { + "code": 200, + "limit": 10000, + "offset": null, + "rows": 1, + "total_rows": 1, + "state": 600568, + ... + } +} +``` + +**Request cost formula:** + +See [request costs for infinitables](#link_05) + +**Explore visualizations on our front-end:** + +- https://blockchair.com/bitcoin/addresses +- https://blockchair.com/bitcoin-cash/addresses +- https://blockchair.com/litecoin/addresses +- https://blockchair.com/bitcoin-sv/addresses +- https://blockchair.com/dogecoin/addresses +- https://blockchair.com/dash/addresses +- https://blockchair.com/groestlcoin/addresses +- https://blockchair.com/bitcoin/testnet/addresses + + + +### Inifinitable endpoints for Ethereum + +Please note that unlike with Bitcoin-like chains, where we populate our databases synchronically (block after block as there's the UTXO model used), for Ethereum we use asynchronous process, thus it's possible that for some brief period of time there will be information about block `n`, but there may not be for block `n-1` and further. + + + +#### `blocks` table + +**Endpoint:** + +- `https://api.blockchair.com/{:eth_chain}/blocks?{:query}` + +**Where:** + +- `{:eth_chain}` can only be `ethereum` +- `{:query}` is the query against the table ([how to build a query](#link_05)) + +**Output:** + +`data` contains an array of database rows. Each row is in the following format: + +| Column | Type | Description | Q? | S? | A? | C? | +| --------------------------- | ---------------------------- | ------------------------------------------------------------ | ---- | ---- | ---- | ---- | +| id | int | Block id | `*` | `+` | | `⌘` | +| hash | string `0x[0-9a-f]{64}` | Block hash | `=` | | | | +| date | string `YYYY-MM-DD` | Block date (UTC) | | | `⌘` | | +| time | string `YYYY-MM-DD HH:ii:ss` | Block time (UTC) | `⌘` | `+` | | | +| size | int | Block size in bytes | `*` | `+` | | `+` | +| miner | string `0x[0-9a-f]{40}` | Address the miner who found the block | `=` | | `+` | | +| extra_data_hex | string `[0-9a-f]*` | Additional data included by the miner | `^` | | | | +| difficulty | int | Difficulty | `*` | `+` | | `+` | +| gas_used | int | Gas amount used by block transactions | `*` | `+` | | `+` | +| gas_limit | int | Gas limit for the block set by the miner | `*` | `+` | | `+` | +| logs_bloom | string `[0-9a-f]*` | Logs bloom field | | | | | +| mix_hash | string `[0-9a-f] {64}` | Mix hash | | | | | +| nonce | string `[0-9a-f]*` | Nonce value | | | | | +| receipts_root | string `[0-9a-f] {64}` | Receipts root | | | | | +| sha3_uncles | string `[0-9a-f] {64}` | SHA3 Uncles | | | | | +| state_root | string `[0-9a-f] {64}` | State root | | | | | +| total_difficulty | numeric string | Total difficulty at the `id` point | | | | | +| transactions_root | string `[0-9a-f] {64}` | Transactions root | | | | | +| uncle_count | int | Number of block uncles | `*` | `+` | | `+` | +| transaction_count | int | Number of transactions in the block | `*` | `+` | | `+` | +| synthetic_transaction_count | int | Number of synthetic transactions (they do not exist as separate transactions on the blockchain, but they change the state, e.g., genesis block transactions, miner rewards, DAO-fork transactions, etc.) | `*` | `+` | | `+` | +| call_count | int | Total number of calls spawned by transactions | `*` | `+` | | `+` | +| synthetic_call_count | int | Number of synthetic calls (same as synthetic transactions) | `*` | `+` | | `+` | +| value_total | numeric string | Monetary value of all block transactions in wei, hereinafter `numeric string` - numeric (integer or float in some cases) value passed as a string, as values in wei do not fit into integer | `*≈` | `+` | | `+` | +| value_total_usd | float | Monetary value of all block transactions in USD | `*` | `+` | | `+` | +| internal_value_total | numeric string | Monetary value of all internal calls in the block in wei | `*≈` | `+` | | `+` | +| internal_value_total_usd | float | Monetary value of all internal calls in a block in USD | `*` | `+` | | `+` | +| generation | numeric string | The reward of a miner for the block generation in wei | `*≈` | `+` | | `+` | +| generation_usd | float | The reward of a miner for the block generation in USD | `*` | `+` | | `+` | +| uncle_generation | numeric string | Total reward of uncle miners in wei | `*≈` | `+` | | `+` | +| uncle_generation_usd | float | Total reward of uncle miners in USD | `*` | `+` | | `+` | +| fee_total | numeric string | Total fee in wei | `*≈` | `+` | | `+` | +| fee_total_usd | float | Total fee in USD | `*` | `+` | | `+` | +| reward | numeric string | Total reward of the miner in the wei (reward for finding the block + fees) | `*≈` | `+` | | `+` | +| reward_usd | float | Total reward of the miner in USD | `*` | `+` | | `+` | + +Additional synthetic columns + +| Column | Type | Description | Q? | S? | A? | C? | +| -------------- | ----------- | ------------------------------------------------------------ | ---- | ---- | ---- | ---- | +| extra_data_bin | string `.*` | Text representation (UTF-8) of extra data. Allows you to use the `LIKE` operator: `?q=extra_data_bin(~hello)` | `~` | | | | Notes: -- (\*) - always `null` for `mempool/blocks` -- for `id` and` hash` columns the increased efficiency at unloading of one record is applied -- there is no possibility to search the `date` column, but you can use `?q=time(YYYY-MM-DD)` instead -- search by fields that contain values in wei (`value_total`,` internal_value_total`, `generation`,` uncle_generation`, `fee_total`,` reward`) can be with some inaccuracies -- the search over `extra_data_hex` column can be done by the operator `^`, you can also use `~`for `extra_data_bin` (however, the field `extra_data_bin` will still not be shown) -- the difference between `value_total` and `internal_value_total`: e.g., a transaction itself sends 0 eth, but this transaction is a call of a contract that sends someone, let's say, 10 eth. Then `value` will be 0 eth, and `internal_value` - 10 eth -- the default sort is id DESC - -#### ethereum/uncles - -Returns information about uncles - -| Column | Type | Description | Q? | S? | -|--------|------|-------------|----|----| -| parent_block_id | int | Parent block id | + | + | -| index | int | Uncle index in the block | + | + | -| id | int | Uncle id | + | + | -| hash | string `0x[0-9a-f]{64}` | Uncle hash (with 0x) | + | | -| date | string `YYYY-MM-DD` | Date of generation (UTC) | | | -| time | string `YYYY-MM-DD HH:ii:ss` | Time of generation (UTC) | + | + | -| size | int | Uncle size in bytes | + | + | -| miner | string `0x[0-9a-f]{40}` | Address of the rewarded miner (with 0x) | + | | -| extra_data_hex | string `[0-9a-f]*` | Additional data included by the miner | + | | -| difficulty | int | Difficulty | + | + | -| gas_used | int | Amount of gas used by transactions | + | + | -| gas_limit | int | Gas limit for the block set up by the miner | + | + | -| logs_bloom | string `[0-9a-f]*` | Logs Bloom | | | -| mix_hash | string `[0-9a-f]{64}` | Hash Mix hash | | | -| nonce | string `[0-9a-f]*` | Nonce value | | | -| receipts_root | string `[0-9a-f]{64}` | Receipts Root hash | | | -| sha3_uncles | string `[0-9a-f]{64}` | Uncles hash | | | -| state_root | string `[0-9a-f]{64}` | State Root hash | | | -| total_difficulty | numeric string | Total difficulty | | | -| transactions_root | string `[0-9a-f]{64}` | Transactions Root hash | | | -| generation | numeric string | The reward of the miner who generated the uncle, in wei | + | + | -| generation_usd | float | The award of the miner who generated uncle, in USD | + | + | - -Additional synthetic columns (you can search over them and / or sort them, but they are not shown) - -| Column | Type | Description | Q? | S? | -|--------|------|-------------|----|----| -| extra_data_bin | string `.*` | Text representation of extra data. Allows you to use the `LIKE` operator:`?Q=extra_data_bin(~hello)` | + | | + +- `increased efficiency` method applies if querying `id` and ` hash` columns using the `equals` operator +- Search by fields that contain values in wei (`value_total`,` internal_value_total`, `generation`,` uncle_generation`, `fee_total`,` reward`) may be with some inaccuracies +- The difference between `value_total` and `internal_value_total`: e.g., a transaction itself sends 0 eth, but this transaction is a call of a contract that sends someone, let's say, 10 eth. Then `value` will be 0 eth, and `internal_value` - 10 eth +- The default sorting is `id DESC` + +**Example output:** + +`https://api.blockchair.com/ethereum/blocks?limit=1`: + +```json +{ + "data": [ + { + "id": 8766253, + "hash": "0xf36522b1f6ee2350c322a309ebdffe9afadc7d68713ad5b3a064657c81607ab7", + "date": "2019-10-18", + "time": "2019-10-18 17:39:40", + "size": 32170, + "miner": "0x52bc44d5378309ee2abf1539bf71de1b7d7be3b5", + "extra_data_hex": "50505945206e616e6f706f6f6c2e6f7267", + "difficulty": 2408192424049377, + "gas_used": 9895313, + "gas_limit": 9920736, + "logs_bloom": "2e8e09c1046d3063207c00c2440098ac0824d0ca0818d201500a1987588a284b001315981c227c86010880300083629c802895bb1608860a02a818a2202d405002a6140281390b00d880610822005011440244527f24b80e3200a405848034043c3028c99218304b8040180210401c005008924d1925c11a004100b14e1270980d21146d4c1a1029130024a0801400350858088c03000061421007b866a8d60c0a0cb142100028e0c39002b010c0320082a49000040fe870022c0080024e1120a0d21ac23289060221c390080800ab442c244130cea8102c2c20404e188468430c52aa20143110200706e642c52f4008080ac71910932415a02108020d910780", + "mix_hash": "65f9fe3204d652ce2f82adface45e8c32cfacb0b80a3d1acaff8969457911342", + "nonce": "13915815879145322367", + "receipts_root": "cfba6974cf3257f2c2cf674a4e2f422b9623646120364ce7be84040d7d2b9578", + "sha3_uncles": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "state_root": "270dca9a521aa1b900cd0749a1a1c1413328cdaff1ccc7f9bcfe6e06751f0781", + "total_difficulty": "12439420564755992111056", + "transactions_root": "62523508847380a506452289abe504fdef7b5e9e96cbfd166f0fd359a4837f92", + "uncle_count": 0, + "transaction_count": 172, + "synthetic_transaction_count": 1, + "call_count": 333, + "synthetic_call_count": 1, + "value_total": "14324135521180578322", + "value_total_usd": 2536.74001038483, + "internal_value_total": "15524135521180578322", + "internal_value_total_usd": 2749.25461609772, + "generation": "2000000000000000000", + "generation_usd": 354.191009521484, + "uncle_generation": "0", + "uncle_generation_usd": 0, + "fee_total": "29252299880000000", + "fee_total_usd": 5.1804508126612, + "reward": "2029252299880000000", + "reward_usd": 359.371460334146 + } + ], + "context": { + "code": 200, + "limit": 1, + "offset": 0, + "rows": 1, + "total_rows": 8766254, + "state": 8766260, + "state_layer_2": 8766249, + ... + } +} +``` + +**Request cost formula:** + +See [request costs for infinitables](#link_05) + +**Explore visualizations on our front-end:** + +- https://blockchair.com/ethereum/blocks + + + +#### `uncles` table + +**Endpoint:** + +- `https://api.blockchair.com/{:eth_chain}/uncles?{:query}` + +**Where:** + +- `{:eth_chain}` can only be `ethereum` +- `{:query}` is the query against the table ([how to build a query](#link_05)) + +**Output:** + +Returns information about uncles. `data` contains an array of database rows. Each row is in the following format: + +| Column | Type | Description | Q? | S? | A? | C? | +| ----------------- | ---------------------------- | ------------------------------------------------------- | ---- | ---- | ---- | ---- | +| parent_block_id | int | Parent block id | `*` | `+` | `+` | | +| index | int | Uncle index in the block | `*` | `+` | | | +| id | int | Uncle id | `*` | `+` | | | +| hash | string `0x[0-9a-f]{64}` | Uncle hash (with 0x) | `=` | | | | +| date | string `YYYY-MM-DD` | Date of generation (UTC) | | | `⌘` | | +| time | string `YYYY-MM-DD HH:ii:ss` | Timestamp of generation (UTC) | `⌘` | `+` | | | +| size | int | Uncle size in bytes | `*` | `+` | | `+` | +| miner | string `0x[0-9a-f]{40}` | Address of the rewarded miner (with 0x) | `=` | | `+` | | +| extra_data_hex | string `[0-9a-f]*` | Additional data included by the miner | `^` | | | | +| difficulty | int | Difficulty | `*` | `+` | | `+` | +| gas_used | int | Amount of gas used by transactions | `*` | `+` | | `+` | +| gas_limit | int | Gas limit for the block set up by the miner | `*` | `+` | | `+` | +| logs_bloom | string `[0-9a-f]*` | Logs bloom field | | | | | +| mix_hash | string `[0-9a-f]{64}` | Hash mix | | | | | +| nonce | string `[0-9a-f]*` | Nonce value | | | | | +| receipts_root | string `[0-9a-f]{64}` | Receipts root | | | | | +| sha3_uncles | string `[0-9a-f]{64}` | Uncles hash | | | | | +| state_root | string `[0-9a-f]{64}` | State root | | | | | +| transactions_root | string `[0-9a-f]{64}` | Transactions root | | | | | +| generation | numeric string | The reward of the miner who generated the uncle, in wei | `*≈` | `+` | | `+` | +| generation_usd | float | The award of the miner who generated uncle, in USD | `*` | `+` | | `+` | + +Additional synthetic columns + +| Column | Type | Description | Q? | S? | A? | C? | +| -------------- | ----------- | ------------------------------------------------------------ | ---- | ---- | ---- | ---- | +| extra_data_bin | string `.*` | Text (UTF-8) representation of extra data. Allows you to use the `LIKE` operator:`?Q=extra_data_bin(~hello)` | `~` | | | | Notes: -- for the columns `parent_block_id` and `hash` increased efficiency when uploading one or more records is applied -- there is no possibility to search the `date` column directly, but you can use `?q=time(YYYY-MM-DD)` instead -- search by fields that contain values in wei (`generation`) can be with some inaccuracies -- the search over `extra_data_hex` column can be done by the operator `^`, you can also use `~` for `extra_data_bin` (however, the field `extra_data_bin` will still not be shown) -- sort by default - parent_block_id DESC - -#### ethereum/transactions, ethereum/mempool/transactions - -Returns transaction information - -| Column | Type | Description | Q? | S? | -|--------|------|-------------|----|----| -| block_id | int | Id of the block containing the transaction | + | + | -| id | int | Transaction id (not related to the blockchain, used for internal purposes) | + | + | -| index (\*) (\*\*) | int | The transaction index number in the block | + | + | -| hash (\*\*) | string `0x[0-9a-f]{64}` | Transaction hash (with 0x) | + | | -| date | string `YYYY-MM-DD` | Date of the block containing the transaction (UTC) | | | -| time | string `YYYY-MM-DD HH:ii:ss` | Time of the block containing the transaction (UTC) | + | + | -| size | int | Transaction size in bytes | + | + | -| failed (\*) | bool | Failed transaction or not? + | | | -| type (\*) | string (enum) | Transaction type with one of the following values: `call/create/call_tree/create_tree/synthetic_coinbase`. Description in the note. | | + | | -| sender (\*\*) | string `0x[0-9a-f]{40}` | Address of the transaction sender (with 0x) | + | | -| recipient | string `0x[0-9a-f]{40}` | Address of the transaction recipient (with 0x) | + | | -| call_count (\*) | int | Number of calls in the transaction | + | + | -| value | numeric string | Monetary value of transaction in wei, here and below `numeric string` - is a numeric value passed as a string, because wei-values do not fit into uint64 | + | + | -| value_usd | float | Value of transaction in USD | + | + | -| internal_value (\*) | numeric string | Value of all inner calls in the transaction in wei | + | + | -| internal_value_usd (\*) | float | Value of all internal calls in the transaction in USD | + | + | -| fee (\*) (\*\*) | numeric string | Fee in wei | + | + | -| fee_usd (\*) (\*\*) | float | Fee in USD | + | + | -| gas_used (\*) (\*\*) | int | Amount of gas used by a transaction | + | + | -| gas_limit (\*\*) | int | Gas limit for transaction set by the sender | + | + | -| gas_price (\*\*) | int | Price for gas set by the sender | + | + | -| input_hex (\*\*) | string `[0-9a-f]*` | Transaction input data | + | | -| nonce (\*\*) | string `[0-9a-f]*` | Nonce value | | | -| v (\*\*) | string `[0-9a-f]*` | V value | | | -| r (\*\*) | string `[0-9a-f]*` | R value | | | -| s (\*\*) | string `[0-9a-f]*` | S value | | | - -Additional synthetic columns (you can search over them and / or sort them, but they are not shown) - -| Column | Type | Description | Q? | S? | -|--------|------|-------------|----|----| -| input_bin | string `.*` | Text representation of input data. Allows you to use the `LIKE` operator: `?q=input_bin(~hello)` | + | | +- `increased efficiency` method applies if querying `parent_block_id` and ` hash` columns using the `equals` operator +- Search by fields that contain values in wei (`generation`) may be with some inaccuracies +- The difference between `value_total` and `internal_value_total`: a transaction itself may send, say, 0 eth, but this transaction may call a contract which sends someone 10 eth. In that case `value` will be 0 eth, and `internal_value` will be 10 eth +- The default sorting is `parent_block_id DESC` + +**Example output:** + +`https://api.blockchair.com/ethereum/uncles?limit=1`: + +```json +{ + "data": [ + { + "parent_block_id": 8792054, + "index": 0, + "id": 8792051, + "hash": "0x41a4d3a79644ada10207cd41f8027a3d4e506d4cbde58750a98d3ec2afce402d", + "date": "2019-10-22", + "time": "2019-10-22 19:10:41", + "size": 526, + "miner": "0xb2930b35844a230f00e51431acae96fe543a0347", + "extra_data_hex": "73696e6733", + "difficulty": 2374634862657186, + "gas_used": 9979194, + "gas_limit": 9989371, + "logs_bloom": "945c08608049b629008740f22070128c0602c50010d012952a08280b22022b608cc4507918e00962a4a049440320251192429006194812fb587ad87421e4a8002a0401c405658b208898920f828646517f206444b10ec162024807418380a10ac510840006258023002c008c66c52d220e683a2400c643600101a2720a0108446102112d41a0900105000005a212240e1012e1c17502492000c00a84823d1404030894051690f2304e484190028201b280840044a50c0830205403801835151110e354e2288184002073d908070a44e03cb809019308738c211b4100118064a080f1a60003881a880d1144c02100c00c1200488230d91841c02e5884d4b00401", + "mix_hash": "3e26a6c8520bdb3afc6ff13d46f8906a508787fc3c8021656f0fe74834728538", + "nonce": "2551618406869966062", + "receipts_root": "fdcb14f98b77953add5ad2115b74291c1aeeab91e5027e30a888db72ac55d2c1", + "sha3_uncles": "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "state_root": "8aab503534b41e0fa32d242829fb5ac1cae3e034db1c22a61cf15be2e2b8ca3f", + "transactions_root": "f47354e86bd38e6d7cbd54cd2556fce97221a0f760c518ee226f3f5472432950", + "generation": "1250000000000000000", + "generation_usd": 217.484378814697 + } + ], + "context": { + "code": 200, + "limit": 1, + "offset": 0, + "rows": 1, + "total_rows": 944557, + "state": 8792093, + "state_layer_2": 8792080, + ... + } +} +``` + +**Request cost formula:** + +See [request costs for infinitables](#link_05) + +**Explore visualizations on our front-end:** + +- https://blockchair.com/ethereum/uncles + + + +#### `transactions` table + +**Endpoint:** + +- `https://api.blockchair.com/{:eth_chain}/transactions?{:query}` (for blockchain transactions) +- `https://api.blockchair.com/{:eth_chain}/mempool/transactions?{:query}` (for mempool transactions) + +**Where:** + +- `{:eth_chain}` can only be `ethereum` +- `{:query}` is the query against the table ([how to build a query](#link_05)) + +**Output:** + +`data` contains an array of database rows. Each row is in the following format: + +| Column | Type | Description | Q? | S? | A? | C? | +| -------------------- | ---------------------------- | ------------------------------------------------------------ | ---- | ---- | ---- | ---- | +| block_id | int | Id of the block containing the transaction | `*` | `+` | `+` | | +| id | int | Internal Blockchair transaction id (not related to the blockchain, used for internal purposes) | `*` | `+` | | | +| index †‡ | int | The transaction index number in the block | `*` | `+` | | | +| hash ‡ | string `0x[0-9a-f]{64}` | Transaction hash | `=` | | | | +| date | string `YYYY-MM-DD` | Date of the block containing the transaction (UTC) | | | `⌘` | | +| time | string `YYYY-MM-DD HH:ii:ss` | Time of the block containing the transaction (UTC) | `⌘` | `+` | | | +| failed † | bool | Failed transaction or not? | `=` | | `+` | | +| type † | string (enum) | Transaction type with one of the following values: `call`, `create`, `call_tree`, `create_tree`, `synthetic_coinbase`. Description in the note below. | `=` | `+` | `+` | | +| sender ‡ | string `0x[0-9a-f]{40}` | Address of the transaction sender | `=` | | | | +| recipient | string `0x[0-9a-f]{40}` | Address of the transaction recipient | `=` | | | | +| call_count † | int | Number of calls in the transaction | `*` | `+` | | `+` | +| value | numeric string | Monetary value of transaction in wei | `*≈` | `+` | | `+` | +| value_usd | float | Value of transaction in USD | `*` | `+` | | `+` | +| internal_value † | numeric string | Value of all internal calls in the transaction in wei | `*≈` | `+` | | `+` | +| internal_value_usd † | float | Value of all internal calls in the transaction in USD | `*` | `+` | | `+` | +| fee †‡ | numeric string | Fee in wei | `*≈` | `+` | | `+` | +| fee_usd †‡ | float | Fee in USD | `*` | `+` | | `+` | +| gas_used †‡ | int | Amount of gas used by a transaction | `*` | `+` | | `+` | +| gas_limit ‡ | int | Gas limit for transaction set by the sender | `*` | `+` | | `+` | +| gas_price ‡ | int | Price for gas set by the sender | `*` | `+` | | `+` | +| input_hex ‡ | string `[0-9a-f]*` | Transaction input data (hex) | `^` | | | | +| nonce ‡ | string `[0-9a-f]*` | Nonce value | | | | | +| v ‡ | string `[0-9a-f]*` | V value | | | | | +| r ‡ | string `[0-9a-f]*` | R value | | | | | +| s ‡ | string `[0-9a-f]*` | S value | | | | | + +Additional synthetic columns + +| Column | Type | Description | Q? | S? | A? | C? | +| --------- | ----------- | ------------------------------------------------------------ | ---- | ---- | ---- | ---- | +| input_bin | string `.*` | Text (UTF-8) representation of input data. Allows you to use the `LIKE` operator: `?q=input_bin(~hello)` | `~` | | | | + +Possible types (`type`) of transactions: +- `call` — the transaction transfers the value, but there are no more calls (a simple ether sending, not in favor of a contract, or the call to a contract that does nothing) +- `create` — create a new contract +- `call_tree` — the transaction calls a contract that makes some other calls +- `create_tree` — create a new contract that create contracts or starts making calls +- `synthetic_coinbase` — a synthetic transaction for awarding a reward to the miner (block or uncle) Notes: -- (\*) - is always `null` for `mempool/transactions` -- (\*\*) - is always equal to `null` if `type` = `synthetic_coinbase` -- for the columns `id` and` hash` the increased efficiency at unloading of one record is applied -- there is no possibility to search over `date` column, you can search like `?q=time(YYYY-MM-DD)` instead -- search by fields that contain values in wei (`value`,` internal_value`) can be with some inaccuracies -- the search over `input_hex` column can be done by the operator `^`, you can also use `~` for `input_bin` (however, the field `input_bin` will still not be included in output) -- the difference between `value_total` and `internal_value_total`: e.g., a transaction itself sends 0 eth, but this transaction is a call of a contract that sends someone, let's say, 10 eth. Then `value` will be 0 eth, and `internal_value` - 10 eth -- the default sort is - id DESC -- possible types (`type`) of transactions: - * call - the transaction transfers the value, but there are no more calls (a simple ether sending, not in favor of a contract, or the call to a contract that does nothing) - * create - create a new contract - * call_tree - the transaction calls a contract that makes some other calls - * create_tree - create a new contract that create contracts or starts making calls - * synthetic_coinbase - a synthetic transaction for awarding a reward to the miner (block or uncle) - -#### ethereum/calls - -Returns information about internal calls - -| Column | Type | Description | Q? | S? | -|--------|------|-------------|----|----| -| block_id | int | Block id containing a call | + | + | -| transaction_id | int | Transaction id containing the call | + | + | -| transaction_hash (\*\*) | string `0x[0-9a-f]{64}` | Transaction hash (with 0x) containing the call | | | -| index | string | Call index within the transaction (tree-like, e.g., "0.8.1") | + | + | -| depth | int | Call depth within the call tree (starting at 0) | + | + | -| date | string `YYYY-MM-DD` | Date of the block that contains the call (UTC) | | | -| time | string `YYYY-MM-DD HH:ii:ss` | Time of the block that contains the call (UTC) | + | + | -| failed | bool | Failed call or not | + | | -| fail_reason | string `.*` or null | If failed, then the failure description, if not, then `null` | + | | -| type | string (enum) | The call type, one of the following values: `call/delegatecall/staticcall/callcode/selfdesctruct/create/synthetic_coinbase` | + | | -| sender (\*\*) | string `0x[0-9a-f]{40}` | Sender's address (with 0x) | + | | -| recipient | string `0x[0-9a-f]{40}` | Recipient's address (with 0x) | + | | -| child_call_count | int | Number of child calls | + | + | -| value | numeric string | Call value in wei, hereinafter `numeric string` - is a numeric string passed as a string, because wei-values do not fit into uint64 | + | + | -| value_usd | float | Call value in USD | + | + | -| transferred | bool | Has ether been transferred? (`false` if `failed`, or if the type of transaction does not change the state, e.g., `staticcall` | + | | -| input_hex (\*\*) | string `[0-9a-f]*` | Input call data | | | -| output_hex (\*\*) | string `[0-9a-f]*` | Output call data | | | +- `increased efficiency` method applies if querying `id` and ` hash` columns using the `equals` operator +- † — value is `null` for transactions in the mempool +- ‡ — value is `null` if `type` is `synthetic_coinbase` +- Search by fields that contain values in wei (`value_total`,` internal_value_total`, `generation`,` uncle_generation`, `fee_total`,` reward`) may be with some inaccuracies +- The difference between `value_total` and `internal_value_total`: e.g., a transaction itself sends 0 eth, but this transaction is a call of a contract that sends someone, let's say, 10 eth. Then `value` will be 0 eth, and `internal_value` - 10 eth +- The default sorting — `id DESC` +- `block_id` for mempool transactions is `-1` + +**Example output:** + +`https://api.blockchair.com/ethereum/transactions?q=block_id(46147)`: + +```json +{ + "data": [ + { + "block_id": 46147, + "id": 46147000001, + "index": null, + "hash": null, + "date": "2015-08-07", + "time": "2015-08-07 03:30:33", + "failed": false, + "type": "synthetic_coinbase", + "sender": null, + "recipient": "0xe6a7a1d47ff21b6321162aea7c6cb457d5476bca", + "call_count": 1, + "value": "6050000000000000000", + "value_usd": 6.05, + "internal_value": "6050000000000000000", + "internal_value_usd": 6.05, + "fee": null, + "fee_usd": null, + "gas_used": null, + "gas_limit": null, + "gas_price": null, + "input_hex": null, + "nonce": null, + "v": null, + "r": null, + "s": null + }, + { + "block_id": 46147, + "id": 46147000000, + "index": 0, + "hash": "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060", + "date": "2015-08-07", + "time": "2015-08-07 03:30:33", + "failed": false, + "type": "call", + "sender": "0xa1e4380a3b1f749673e270229993ee55f35663b4", + "recipient": "0x5df9b87991262f6ba471f09758cde1c0fc1de734", + "call_count": 1, + "value": "31337", + "value_usd": 3.1337e-14, + "internal_value": "31337", + "internal_value_usd": 3.1337e-14, + "fee": "1050000000000000000", + "fee_usd": 1.05, + "gas_used": 21000, + "gas_limit": 21000, + "gas_price": 50000000000000, + "input_hex": "", + "nonce": "0", + "v": "1c", + "r": "88ff6cf0fefd94db46111149ae4bfc179e9b94721fffd821d38d16464b3f71d0", + "s": "45e0aff800961cfce805daef7016b9b675c137a6a41a548f7b60a3484c06a33a" + } + ], + "context": { + "code": 200, + "limit": 10, + "offset": 0, + "rows": 2, + "total_rows": 2, + "state": 8791945, + "state_layer_2": 8791935, + ... + } +} +``` + +**Request cost formula:** + +See [request costs for infinitables](#link_05) + +**Explore visualizations on our front-end:** + +- https://blockchair.com/ethereum/transactions +- https://blockchair.com/ethereum/mempool/transactions + + + +#### `calls` table + +**Endpoint:** + +- `https://api.blockchair.com/{:eth_chain}/calls?{:query}` + +**Where:** + +- `{:eth_chain}` can only be `ethereum` +- `{:query}` is the query against the table ([how to build a query](#link_05)) + +**Output:** + +Returns information about internal transaction calls. `data` contains an array of database rows. Each row is in the following format: + +| Column | Type | Description | Q? | S? | A? | C? | +| ------------------ | ---------------------------- | ------------------------------------------------------------ | ---- | ---- | ---- | ---- | +| block_id | int | Block id containing a call | `*` | `+` | `+` | | +| transaction_id | int | Transaction id containing the call | `*` | `+` | | | +| transaction_hash † | string `0x[0-9a-f]{64}` | Transaction hash (with 0x) containing the call | `=` | | | | +| index | string | Call index within the transaction (tree-like, e.g., "0.8.1") | `=` | `+` | | | +| depth | int | Call depth within the call tree (starting at 0) | `*` | `+` | | | +| date | string `YYYY-MM-DD` | Date of the block that contains the call (UTC) | | | `⌘` | | +| time | string `YYYY-MM-DD HH:ii:ss` | Time of the block that contains the call (UTC) | `⌘` | `+` | | | +| failed | bool | Failed call or not | `=` | | `+` | | +| fail_reason | string `.*` or null | If failed, then the failure description, if not, then `null` | `~` | | `+` | | +| type | string (enum) | The call type, one of the following values: `call`, `delegatecall`, `staticcall`, `callcode`, `selfdestruct`, `create`, `synthetic_coinbase`, `create2` | `=` | `+` | `+` | | +| sender † | string `0x[0-9a-f]{40}` | Sender's address (with 0x) | `=` | | | | +| recipient | string `0x[0-9a-f]{40}` | Recipient's address (with 0x) | `=` | | | | +| child_call_count | int | Number of child calls | `*` | `+` | | `+` | +| value | numeric string | Call value in wei, hereinafter `numeric string` - is a numeric string passed as a string, because wei-values do not fit into uint64 | `*≈` | `+` | | `+` | +| value_usd | float | Call value in USD | `*` | `+` | | `+` | +| transferred | bool | Has ether been transferred? (`false` if `failed`, or if the type of transaction does not change the state, e.g., `staticcall` | `=` | | `+` | | +| input_hex † | string `[0-9a-f]*` | Input call data | | | | | +| output_hex † | string `[0-9a-f]*` | Output call data | | | | | Notes: -- (\*\*) - is always `null` if` type` = `synthetic_coinbase` -- for the column `transaction_id` increased efficiency when uploading one record is applied -- there is no possibility to search over `date` column, use searching `?q=time(YYYY-MM-DD)` instead -- search by fields that contain values in wei (`value`,` internal_value`) can be with some inaccuracies -- the default sort is transaction_id DESC -- sorting by `index` is alphabetical (ie "0.2" goes after "0.11"), in some cases a switch to natural sorting is used (for example, when there is a filter for `transaction_id`) +- `increased efficiency` method applies if querying `transction_id` column using the `equals` operator +- † — value is `null` if `type` is `synthetic_coinbase` +- Search by fields that contain values in wei (`value`) may be with some inaccuracies +- The default sorting is `transaction_id DESC` +- sorting by `index` respects the tree structure (i.e. "0.2" comes before "0.11") instead of being alphabetical + +**Example output:** + +`https://api.blockchair.com/ethereum/calls?q=not,type(synthetic_coinbase)&limit=1`: + +```json +{ + "data": [ + { + "block_id": 8792132, + "transaction_id": 8792132000050, + "transaction_hash": "0x9e3a13bfc5313245de7142b7ec13b80123188d9ae4cce797a44b9b426864d1ca", + "index": "0", + "depth": 0, + "date": "2019-10-22", + "time": "2019-10-22 19:30:03", + "failed": false, + "fail_reason": null, + "type": "call", + "sender": "0xe475e906b74806c333fbb1b087e523496d8c4cb7", + "recipient": "0x3143ec5a285adfb248c9e4de934ee735d4b7d734", + "child_call_count": 0, + "value": "0", + "value_usd": 0, + "transferred": true, + "input_hex": "a9059cbb00000000000000000000000023ea8008420c4355570f9915b5fe39dc278540d3000000000000000000000000000000000000000000000000000000003b9aca00", + "output_hex": "0000000000000000000000000000000000000000000000000000000000000001" + } + ], + "context": { + "code": 200, + "limit": 1, + "offset": 0, + "rows": 1, + "total_rows": 1422927649, + "state": 8792138, + "state_layer_2": 8792127, + ... + } +} +``` -#### Notes +**Request cost formula:** -- for unconfirmed transactions (and outputs in the case of bitcoin[-cash]), the following rules are applied: - - their `block_id` is equal to `-1` - - `date` and` time` indicate the time when the transaction was received by our node -- when using `offset`, it is reasonable to add to the filters the maximum block number (`?q=block_id(..N)`), since it is very likely that during the iteration new rows will be added to the table. For convenience, you can take the value of `context.state` from the first result of any query containing the number of the latest block at the query time and use this result later on. +See [request costs for infinitables](#link_05) -### Dashboard calls +**Explore visualizations on our front-end:** -The API supports a number of calls that produce some aggregated data, or data in a more convenient form for certain entities. +- https://blockchair.com/ethereum/calls + + + +### Inifinitable endpoints for second layers + + + +#### `properties` table (Omni Layer and Wormhole) -#### {chain}/dashboards/block/{A} and {chain}/dashboards/blocks/{A[,B,...]} +Note: this particular table doesn't support querying. The only query section it supports is `?offset=`. Note that this endpoint is in the Alpha stage, and Wormhole is deprecated on our platform. -`{chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `bitcoin-sv`, `litecoin`, `dogecoin`, `dash`, `ethereum`, `groestlcoin` +**Endpoints:** -As the input data (`{A}`), it takes the height or hash of the block(s). `data` returns an array with block heights or block hashes used as keys, and arrays of elements as values: -* `block` - information about the block in infinitable-format `(bitcoin[-cash]|ethereum)/blocks` -* `transactions` - the array of all hashes of transactions included in the block -* only for Ethereum - `synthetic_transactions` - array of internal ids of synthetic transactions (they do not have a hash) (`null` instead of the array until the block receives 6 confirmations) -* only for Ethereum - `uncles` - the array of hashes of the block's uncles (`null` instead of the array until the block receives 6 confirmations, in case there are no uncles and more than 6 confirmations - an empty array (`[]`)) +- `https://api.blockchair.com/bitcoin/omni/properties?{:query}` +- `https://api.blockchair.com/bitcoin-cash/wormhole/properties?{:query}` -`context.results` contains the number of found blocks. +**Where:** -#### ethereum/dashboards/uncle/{A} and ethereum/dashboards/uncles/{A[,B,...]} +- `{:query}` is the query against the table ([how to build a query](#link_05)), the only supported query section for this table is `?offset=` -As the input data (`{A}`), it takes an uncle hash(es). `data` returns an array with uncle hashes used as keys, and arrays of elements as values: -* `uncle` - information about the block in infinitable-format `ethereum/uncles` +**Output:** -`context.results` contains the number of found uncles. +`data` contains an array of database rows. Each row is in the format which accords with Omni Layer specification (https://github.com/OmniLayer/spec) -#### {chain}/dashboards/transaction/{A} and {chain}/dashboards/transactions/{A[,B,...]} +**Example output:** -`{chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `bitcoin-sv`, `litecoin`, `dogecoin`, `dash`, `ethereum`, `groestlcoin` +`https://api.blockchair.com/bitcoin/omni/properties`: -At the input data, it takes an internal blockchair-id or a hash of a transaction (transactions). `data` returns an array with identifiers or hashes of transactions used as keys, and arrays of elements as keys: -* `transaction` - transaction information in infinitable-format `bitcoin[-cash]/transactions` -* (except ethereum) `inputs` - array of all transaction inputs, sorted by `spending_index` in infinitable-format `bitcoin[-cash]/outputs` -* (except ethereum) `outputs` - array of all transaction outputs, sorted by `index` in infinitable-format `bitcoin[-cash]/outputs` -* (only ethereum) `calls` - the array of all calls made during the execution of the transaction (always `null` for mempool transactions and the last 6 blocks) +```json +{ + "data": [ + { + "id": 412, + "name": "ENO", + "category": "", + "subcategory": "", + "description": "", + "url": "", + "is_divisible": false, + "issuer": "1JcfUyi9BkXCTXHdeUusmYrsHXvnnLvTxB", + "creation_transaction_hash": "ea5b914ba4e80931c8d46e551f6010113ab2cba82186d2497f2b2f0c6d53953b", + "creation_time": "2018-11-25 21:34:08", + "creation_block_id": 551501, + "is_issuance_fixed": false, + "is_issuance_managed": false, + "circulation": 222222222, + "ecosystem": 1 + }, + ... + ], + "context": { + "code": 200, + "limit": 10, + "offset": 0, + "rows": 10, + "total_rows": 412, + "state": 599976, + ... + } +} +``` + +**Request cost formula:** -`context.results` contains the number of found transactions. +See [request costs for infinitables](#link_05) -#### {chain}/dashboards/transaction/{hash}/priority +**Explore visualizations on our front-end:** -`{chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `bitcoin-sv`, `litecoin`, `dogecoin`, `dash`, `ethereum`, `groestlcoin` +- https://blockchair.com/bitcoin/omni/properties +- https://blockchair.com/bitcoin-cash/wormhole/properties -For mempool transactions shows priority (`position`) (for Bitcoin - by `fee_per_kwu`, for Bitcoin Cash - by `fee_per_kb`, for Ethereum - by `gas_price`) over other transactions (`out_of` mempool transactions). It has the same structure as the `(bitcoin[-cash]|ethereum)/dashboards/transaction/{A}` call -#### {chain}/dashboards/address/{A} -`{chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `bitcoin-sv`, `litecoin`, `dogecoin`, `dash`, `groestlcoin` +#### `tokens` table (ERC-20) -Uses address as the input data. `data` returns an array with one element (if the address is found), in that case the address is the key, and the value is an array consisting of the following elements: -* `address` - * `address.type` - address type (type of output is the same as `bitcoin[-cash].outputs.type`) - * `address.script_hex` - address script - * `address.balance` - address balance in satoshi (hereinafter - including unconfirmed outputs) - int - * `address.balance_usd` - address balance in USD - float - * `address.received` - total received in satoshi - * `address.received_usd` - total received in USD - * `address.spent` - total spent in satoshi - * `address.spent_usd` - total spent in USD - * `address.output_count` - the number of outputs this address received - * `address.unspent_output_count` - number of unspent outputs for this address (i.e. the number of inputs for an address can be calculated as `output_count`-`unspent_output_count`) - * `address.first_seen_receiving` - timestamp (UTC) when the first time this address received coins - * `address.last_seen_receiving` - timestamp (UTC) when the last time this address received coins - * `address.first_seen_spending` - timestamp (UTC) when the first time this address sent coins - * `address.last_seen_spending` - timestamp (UTC) when the last time this address sent coins - * `address.transaction_count` - number of unique transactions this address participating in -* `transactions` - an array of the last 100 hashes the address is participating in +**Endpoint:** -`context.results` contains the number of found addresses (0 or 1, until the `addresses` call is implemented). +- `https://api.blockchair.com/ethereum/erc-20/tokens?{:query}` -To iterate `transactions`, `?offset=N` is supported. +**Where:** -#### ethereum/dashboards/address/{A} +- `{:query}` is the query against the table ([how to build a query](#link_05)) -Uses address as the input data. `data` returns an array with one element (if the address is found), in that case the address is the key, and the value is an array consisting of the following elements: -* `address` - * `address.type` - address type (`account` - for an address, `contract` - for a contract) - * `address.contract_code_hex` - hex code of the contract at the momemt of creation (for a contract), or null (for an address) - * `address.contract_created` - for a contract - if the contact was indeed created then true, if not (i.e. with a failed `create` call) - false, or null (for an address) - * `address.contract_destroyed` - for a contract - if the contact was successfully destroyed (SELFDESCTRUCT) then true, if not - false, or null (for an address) - * `address.balance` - exact address balance in wei (here and below for values in wei - numeric string) - * `address.balance_usd` - address balance in USD - float - * `address.received_approximate` - total received in wei (approximately) (\*) - * `address.received_usd` - total received in USD (approximately) (\*) - * `address.spent_approximate` - total spent in wei (approximately) (\*) - * `address.spent_usd` - total spent in USD (approximately) (\*) - * `address.fees_approximate` - total spent in transaction fees in wei (approximately) (\*) - * `address.fees_usd` - total spent in transaction fees in USD (approximately) (\*) - * `address.receiving_call_count` - number of calls in favor of this address, where value transfer has occured (\*\*) - * `address.spending_call_count` - number of calls that was made by this address, where value transfer has occured (\*\*) - * `address.call_count` - total number of calls this address participating in (may be greater than` receiving_call_count` + `spending_call_count`, because it also takes into account failed calls) - * `address.transaction_count` - number of transactions this address participating in - * `address.first_seen_receiving` - timestamp (UTC) when this address received a successful incoming call for the first time - * `address.last_seen_receiving` - timestamp (UTC) when this address received a successful incoming call for the last time - * `address.first_seen_spending` - timestamp (UTC) when this address sent a successful call for the first time - * `address.last_seen_spending` - timestamp (UTC) when this address sent a successful call for the last time -* `calls` - an array of the last 100 calls with the address, each element of an array containing the following columns of `ethereum/calls`: `block_id`, `transaction_hash`,` index`, `time`,` sender`, `recipient`, `value`,` value_usd`, `transferred` +**Output:** -`context.results` contains the number of found addresses (0 or 1, until the `addresses` call is implemented). +Returns information about ERC-20 tokens indexed by our engine. `data` contains an array of database rows. Each row is in the following format: -To iterate `calls`, `?offset=N` is supported. +| Column | Type | Description | Q? | S? | A? | C? | +| ------------------------- | -------------------------------- | ----------------------------------- | ---- | ---- | ---- | ---- | +| address | string `0x[0-9a-f]{40}` | Address of the token contract | `=` | | | | +| id | int | Internal Blockchair id of the token | `*` | `+` | | | +| date | string `YYYY-MM-DD` | Creation date | | | `⌘` | | +| time | string `YYYY-MM-DD HH:ii:ss` | Creation timestamp | `⌘` | `+` | | | +| name | string `.*` (or an empty string) | Token name (e.g. `My New Token`) | `=` | `+` | | | +| symbol | string `.*` (or an empty string) | Token symbol (e.g. `MNT`) | `=` | `+` | | | +| decimals | int | Number of decimals | `=` | `+` | | | +| creating_block_id | int | Creating block height | `*` | `+` | | | +| creating_transaction_hash | string `0x[0-9a-f]{64}` | Creating transaction hash | | | | | Notes: -- (\*) - in these columns, the value in wei can be rounded. For a million of calls, the error can be more than 1 ether. -- (\*\*) - counted only those calls that fit the following condition: ethereum/calls.transferred = true (see the `ethereum/calls` documentation), i.e. those calls as well as failed calls that do not change state (staticcall, etc.) are not considered - -#### {chain}/stats - -`{chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `bitcoin-sv`, `litecoin`, `dogecoin`, `dash`, `ethereum`, `groestlcoin` - -Returns an array with blockchain statistics: -* `blocks` - total number of blocks -* (only ethereum) `uncles` - total number of uncles -* `transactions` - total number of transactions -* (only ethereum) `calls` - total number of internal calls -* `blocks_24h` - blocks for the last 24 hours -* `circulation` for Bitcoin-like cryptos, `circulation_approximate` for Ethereum - number of coins in circulation (in Satoshi, or in wei for Ethereum - an approximate value) -* `transactions_24h` - transactions for the last 24 hours -* `difficulty` - current difficulty -* `volume_24h` for Bitcoin-like cryptos, `volume_24h_approximate` for Ethereum - monetary volume of transactions for the last 24 hours (for ethereum - an approximate value) -* `mempool_transactions` - number of transactions in the mempool -* (only ethereum) `mempool_median_gas_price` - median gas price in the mempool -* (except ethereum) `mempool_size` - the mempool size in bytes -* `mempool_tps` - number of transactions per second added to the mempool -* (except ethereum) `mempool_total_value_approximate` - mempool monetary value -* (except ethereum) `mempool_total_fee_usd` - total mempool fee, in USD -* `best_block_height` - the latest block height -* `best_block_hash` - the latest block hash -* `best_block_time` - the latest block time -* (only ethereum) `uncles_24h` - number of uncles for the last 24 hours -* (except ethereum) `nodes` - number of full nodes -* `hashrate_24h` - hashrate (hashes per second) in average for the last 24 hours -* `market_price_usd` - average market price of 1 coin in USD (market data source: CoinGecko) -* `market_price_btc` - average market price of 1 coin in BTC (for Bitcoin always returns 1) -* `market_price_usd_change_24h_percentage` - market price change in percent for 24 hours -* `market_cap_usd` - market capitalization (coins in circulation * price per coin in USD) -* `market_dominance_percentage` - dominance index (how much % of the total cryptocurrency market is the market capitalization of the coin) -... there's also some other self-explanatory keys - -#### stats - -https://api.blockchair.com/stats - -Returns data on seven calls: -* `bitcoin/stats` -* `bitcoin-cash/stats` -* `ethereum/stats` -* `litecoin/stats` -* `bitcoin-sv/stats` -* `dogecoin/stats` -* `dash/stats` -* `groestlcoin/stats` - -### 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: -* `https://api.blockchair.com/ethereum/transactions?q=internal_value_usd(10000000..)&s=id(desc)` - -In this request we refer to the blockhain (`ethereum`), a table (`transactions`), set up the amount condition (`q=internal_value_usd(10000000..)`), and sort in descending order (`&s=id(desc)`). - -Suppose, a script with this request to the API for some reason did not work for a while, or a huge amount of transactions worth more than $1 million appeared. With the standard limit of 10 results, the script skipped some transactions. Then firstly we should do the following: -* `https://api.blockchair.com/ethereum/transactions?q=internal_value_usd(10000000..)&s=id(desc)` - -From its result we save `context.state`, put it in a variable `_S_`, and further to obtain the following results we apply `offset`: -* `https://api.blockchair.com/ethereum/transactions?q=internal_value_usd(10000000..),block_id(.._S_)&s=id(desc)&offset=10` - -Increase offset value until getting a data set with the transaction that we already knew about. - -### 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`, `litecoin`, `bitcoin-sv`, `dash`, `dogecoin`, `groestlcoin`) with `data` holding hex represenatation of a transaction (for Ethereum it should start with `0x`). An example: +- for the columns `address`, `id` increased efficiency when uploading one record is applied +- there is no possibility to search over `date` column, use searching `?q=time(YYYY-MM-DD)` instead +- the default sort is `id DESC` +- when using `offset`, it is reasonable to add to the filters the maximum block number (`?q=block_id(..N)`), since it is very likely that during the iteration new rows will be added to the table. For convenience, you can take the value of `context.state` from the first result of any query containing the number of the latest block at the query time and use this result later on. + +**Example output:** + +`https://api.blockchair.com/ethereum/erc-20/tokens?limit=1`: + +```json +{ + "data": [ + { + "address": "0x9b460d404be254d7b2ba89336a8a41807bb1562b", + "id": 121500, + "date": "2019-10-22", + "time": "2019-10-22 19:21:11", + "name": "UGB Token", + "symbol": "UGB", + "decimals": 18, + "creating_block_id": 8792093, + "creating_transaction_hash": "0x58e132a937c3bd60f1d113ecb14db59fd5229ae312a2afdf8f1b365bf8620e5e" + } + ], + "context": { + "code": 200, + "limit": 1, + "offset": 0, + "rows": 1, + "total_rows": 121500, + "state": 8792147, + "state_layer_2": 8792137, + ... + } +} +``` + +`https://api.blockchair.com/ethereum/erc-20/tokens?q=symbol(USDT)&a=count()`: + +```json +{ + "data": [ + { + "count()": 72 + } + ], + "context": { + "code": 200, + "limit": 10000, + "offset": null, + "rows": 1, + "total_rows": 1, + "state": 8792205, + "state_layer_2": 8792192, + ... + } +} ``` -curl -v --data "data=01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0704ffff001d0104ffffffff0100f2052a0100000043410496b538e853519c726a2c91e61ec11600ae1390813a627c66fb8be7947be63c52da7589379515d4e0a604f8141781e62294721166bf621e73a82cbf2342c858eeac00000000" https://api.blockchair.com/bitcoin/push/transaction + +**Request cost formula:** + +See [request costs for infinitables](#link_05) + +**Explore visualization on our front-end:** + +- https://blockchair.com/ethereum/erc-20/tokens + + + +#### `transactions` table (ERC-20) + +**Endpoint:** + +- `https://api.blockchair.com/ethereum/erc-20/transactions?{:query}` + +**Where:** + +- `{:query}` is the query against the table ([how to build a query](#link_05)) + +**Output:** + +Returns information about ERC-20 transfers indexed by our engine. `data` contains an array of database rows. Each row is in the following format: + +| Column | Type | Description | Q? | S? | A? | C? | +| ---------------- | -------------------------------- | ------------------------------------------------- | ---- | ---- | ---- | ---- | +| block_id | int | Block id including the token transfer | `*` | `+` | | | +| id | int | Internal Blockchair id of the token transfer | `*` | `+` | | | +| transaction_hash | string `0x[0-9a-f]{64}` | Transaction hash including the token transfer | | | | | +| date | string `YYYY-MM-DD` | Date of the transfer | | | `⌘` | | +| time | string `YYYY-MM-DD HH:ii:ss` | Timestamp of the transfer | `⌘` | `+` | | | +| token_address | string `0x[0-9a-f]{40}` | Address of the token contract | `=` | | `+` | | +| token_name | string `.*` (or an empty string) | Token name (e.g. `My New Token`) | `=` | `+` | `+` | | +| token_symbol | string `.*` (or an empty string) | Token symbol (e.g. `MNT`) | `=` | `+` | `+` | | +| token_decimals | int | Number of decimals | `=` | `+` | | | +| sender | string `0x[0-9a-f]{40}` | The sender's address | `=` | | | | +| recipient | string `0x[0-9a-f]{40}` | The recipient's address | `=` | | | | +| value | numeric string | Transferred amount (in the smallest denomination) | `*≈` | `=` | | | + +Notes: + +- for the columns `id` increased efficiency when uploading one record is applied +- there is no possibility to search over `date` column, use searching `?q=time(YYYY-MM-DD)` instead +- the default sort is `id DESC` +- when using `offset`, it is reasonable to add to the filters the maximum block number (`?q=block_id(..N)`), since it is very likely that during the iteration new rows will be added to the table. For convenience, you can take the value of `context.state` from the first result of any query containing the number of the latest block at the query time and use this result later on. +- value is approximated when queried + +**Example output:** + +`https://api.blockchair.com/ethereum/erc-20/transactions?limit=1`: + +```json +{ + "data": [ + { + "block_id": 8792197, + "id": 275501753, + "transaction_hash": "0xec32c9b67d3e7088f14bfc17e8ccb0eb06a98eebe81224dc8703f470c62c5a2e", + "date": "2019-10-22", + "time": "2019-10-22 19:45:41", + "token_address": "0xbe59434473c50021b30686b6d34cdd0b1b4f6198", + "token_name": "Mobilio", + "token_symbol": "MOB", + "token_decimals": 18, + "sender": "0x2a68bdc41e98ab0fb60c9610e62d83ab29312d06", + "recipient": "0xfa96009f004428b85a05cfa1233c24f7afe0536a", + "value": "12021696603378832398951" + } + ], + "context": { + "code": 200, + "limit": 1, + "offset": 0, + "rows": 1, + "total_rows": 275501753, + "state": 8792207, + "state_layer_2": 8792197, + ... + } +} ``` -If the transaction has been successfully broadcast to the network, API will return a JSON response (code 200) containing `data` array with `transaction_hash` key holding the hash of the received transaction. In case of any error (wrong transaction format, spending already spent outputs, etc.) API returns status code 400. +**Request cost formula:** + +See [request costs for infinitables](#link_05) + +**Explore visualization on our front-end:** + +- https://blockchair.com/ethereum/erc-20/transactions + + + +## Misc endpoints + + + +### Broadcasting transactions + +Broadcast a transaction to the network + +**Endpoint:** + +- `https://api.blockchair.com/{:chain}/push/transaction` (`POST`request) + +**Where:** + +- `{:chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `ethereum`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `bitcoin/testnet` +- `POST` data should contain `data` parameter with raw transaction represented in hex (for Ethereum it should start with `0x`) + +**Output:** + +If the transaction has been successfully broadcast to the network, API will return a JSON response (code `200`) containing `data` array with `transaction_hash` key holding the hash of the received transaction. In case of any error (wrong transaction format, spending already spent outputs, etc.) API returns status code `400`. Example of a successful response: +```json +{ + "data": { + "transaction_hash": "0e3e2357e806b6cdb1f70b54c3a3a17b6714ee1f0e68bebb44a74b1efd512098" + }, + "context": { + "code": 200, + ... + } +} +``` + +Example of a response to an invalid transaction: + +```json +{ + "data": null, + "context": { + "code": 400, + "error": "Invalid transaction" + ... + } +} ``` -{"data":{"transaction_hash": "0e3e2357e806b6cdb1f70b54c3a3a17b6714ee1f0e68bebb44a74b1efd512098…"},"context":{"code":200,… + +**Example request:** + +```bash +> curl -v --data "data=01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0704ffff001d0104ffffffff0100f2052a0100000043410496b538e853519c726a2c91e61ec11600ae1390813a627c66fb8be7947be63c52da7589379515d4e0a604f8141781e62294721166bf621e73a82cbf2342c858eeac00000000" https://api.blockchair.com/bitcoin/push/transaction +``` + +**Request cost formula:** + +Always `1`. + +**Explore visualization on our front-end:** + +- https://blockchair.com/broadcast + + + +### Nodes + +List of full network nodes + +**Endpoints:** + +- `https://api.blockchair.com/{:btc_chain}/nodes` (agregated data on nodes + node list) +- `https://api.blockchair.com/nodes` (agregated data on nodes for 7 networks at once) + +Please note that the number of nodes is also available in the `https://api.blockchair.com/stats` and `https://api.blockchair.com/{:btc_chain}/stats` endpoints output. + +**Where:** + +- `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin` + +**Output:** + +`data` contains an array of arrays: + +- `data.nodes` — the node list; the key is `{:ip}:{:port}`, each element contains `version` (node version), `country` (2 letter country code derived from the IP address based on geolocation), `height` (node reports this number as the best block number it has, `flags` (special field with node options) +- `data.count` — total number of nodes +- `data.countries` — number of nodes grouped by country codes +- `data.versions` — number of nodes grouped by node version +- `data.heights` — number of nodes grouped by their best block height + +`https://api.blockchair.com/nodes` endpoint shows this data for 7 coins at once (`bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`), but it doesn't have the `data.nodes` array, i.e. there's only aggregated data. + +**Example output:** + +`https://api.blockchair.com/bitcoin/nodes`: + +```json +{ + "data": { + "nodes": { + "1.171.38.197:8333": { + "version": "/Satoshi:0.18.1/", + "country": "TW", + "height": 599960, + "flags": 1036 + }, + "1.172.110.250:8333": { + "version": "/Satoshi:0.18.0/", + "country": "TW", + "height": 599895, + "flags": 1037 + }, + ... + }, + "count": 8923, + "countries": { + "US": 2745, + "DE": 1589, + ... + }, + "versions": { + "/Satoshi:0.18.0/": 2974, + "/Satoshi:0.18.1/": 1753, + ... + }, + "heights": { + ... + "599960": 414, + "599961": 4684, + "599962": 982, + "599963": 1738, + ... + } + }, + "context": { + "code": 200, + "state": 599963, + ... + } +} ``` -### Retrieving raw transactions +**Request cost formula:** -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 these: `bitcoin`, `bitcoin-cash`, `bitcoin-sv`, `litecoin`, `dogecoin`, `dash`, `ethereum`, `groestlcoin`) +Always `1`. -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 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. +**Explore visualizations on our front-end:** -### Node list: {:chain}/nodes +* https://blockchair.com/nodes +* https://blockchair.com/bitcoin/nodes +* https://blockchair.com/bitcoin-cash/nodes +* https://blockchair.com/litecoin/nodes +* https://blockchair.com/bitcoin-sv/nodes +* https://blockchair.com/dogecoin/nodes +* https://blockchair.com/dash/nodes +* https://blockchair.com/groestlcoin/nodes -Returns a list of full network nodes (except for Ethereum) -### State changes -It's possible to query state changes caused by a block for all chains we support (except for Ripple). +### State changes -The endpoint is `https://api.blockchair.com/{:chain}/state/changes/block/{:block_id)`. +Allows to query state changes caused by a block and potential state changes caused by mempool transactions in case they get confirmed. -The response contains an array where the keys are addresses which were affected by the block, and the values are balance changes. +**Endpoints:** -Example: `https://api.blockchair.com/bitcoin/state/changes/block/1` returns `12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX => 5000000000` which means that the only state change caused by this block was rewarding the miner with 50 bitcoins. +- `https://api.blockchair.com/{:chain}/state/changes/block/{:height}` (state changes caused by a block) +- `https://api.blockchair.com/{:chain}/state/changes/mempool` (potential state changes caused by mempool transactions) -This is useful if you need to track balance changes for a lot of addresses - you can now simply track state changes and find the needed addresses there instead of constantly retrieving information about the balances. +**Where:** + +- `{:chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `bitcoin/testnet`. The first endpoint also supports `ethereum` +- `{:height}` is the block height (integer value), also known as block id + +**Output:** + +The response contains an array where the keys are addresses which were affected by the block (or the mempool), and the values are balance changes. Note: values are returned as strings for Ethereum. -It's also possible to query potential state changes caused by mempool transactions (this is not supported for Ethereum yet). +No iteration required, this endpoint outputs all state changes at once. + +**Example requests:** + +- `https://api.blockchair.com/bitcoin/state/changes/block/170` +- `https://api.blockchair.com/bitcoin/state/changes/mempool` +- `https://api.blockchair.com/ethereum/state/changes/block/46147` + +**Example output:** + +`https://api.blockchair.com/bitcoin/state/changes/block/170`: + +```json +{ + "data": { + "1PSSGeFHDnKNxiEyFrD1wcEaHr9hrQDDWc": 5000000000, + "1Q2TWHE3GMdB6BZKafqwxXtWAWgFt5Jvm3": 1000000000, + "12cbQLTFMXRnSzktFkuoG3eHoMeFtpTu3S": -1000000000 + }, + "context": { + ... + "results": 3, + ... + } +} +``` + +The block in this example was the first Bitcoin block which contained a non-coinbase transaction. We can see the coinbase reward here (50 BTC) sent to the miner, and two state changes caused by a 10 BTC transaction. -The endpoint for mempool state changes is `https://api.blockchair.com/{:chain}/state/changes/mempool`. +**Example usage:** -Here's an example logic for an application watching for Bitcoin transactions incoming/outgoing to/from 1 million addresses: +This endpoint may be useful if you need to track balance changes for a lot of addresses — you can simply track state changes and find the needed addresses there instead of constantly retrieving information about the balances. Here's an example logic for an application watching for Bitcoin transactions incoming/outgoing to/from 1 million addresses: ``` latest_known_block_height = 0 @@ -1024,8 +5241,74 @@ while (true) sleep(10) // The mempool data is cached for 10 seconds on our servers by default ``` -### Support +Note that this example doesn't account for cases like new multiple blocks have been found while you were requesting the latest one, etc. See this example as a possible workaround: https://github.com/Blockchair/Blockchair.Support/pull/207/files + +**Request cost formula:** + +`5` for changes caused by a block, `10` for changes caused by mempool transactions. + + + +### Premium API endpoints + + + +#### Premium API usage stats + +This is a special endpoint for Premium API users showing some stats on your API key usage. + +**Endpoint:** + +- `https://api.blockchair.com/premium/stats?key={:api_key}` + +**Where:** + +- `{:api_key}` is your secret API key + +**Output:** + +An array with stats: + +- `valid_until` — timestamp when the key expires; after that point the key will be invalid +- `max_requests_per_day` or `max_requests_in_parallel` (depending on the API plan) — your limit on the number of requests +- `requests_today` — number of requests you made today + +Please be advised that + +* `requests_today` shows not the number of HTTPS requests you made to the API, but the total number of used "request points" (as some requests "cost" more than 1) +* The request counter is reset daily at 00:00 UTC + +**Example request:** + +- `https://api.blockchair.com/premium/stats?key=myfirstpasswordwas4321andifeltsmartaboutit` + +**Example output:** + +`https://api.blockchair.com/premium/stats?key=myfirstpasswordwas4321andifeltsmartaboutit`: + +```json +{ + "data": { + "valid_until": "2020-01-01 00:00:00", + "max_requests_per_day": 100000, + "requests_today": 50000 + }, + "context": { + ... + } +} +``` + +**Request cost formula:** + +Always `0`. This request is free to use. + + + + +## Support * E-mail: [info@blockchair.com](mailto:info@blockchair.com) * Telegram chat: [@Blockchair](https://telegram.me/Blockchair) * Twitter: [@Blockchair](https://twitter.com/Blockchair) +* Github issue tracker: https://github.com/Blockchair/Blockchair.Support/issues From 2222c02fd9adeb58fe2a50a057d4f95287f5fee6 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Sat, 26 Oct 2019 23:13:03 +0300 Subject: [PATCH 095/180] v.2.0.38 & revamped docs --- API_DOCUMENTATION_EN.md | 126 ++++++++++++++++++++-------------------- 1 file changed, 63 insertions(+), 63 deletions(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index 444cf07b..6b45fb0d 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,4 +1,4 @@ -## [Blockchair.com](https://blockchair.com/) API v.2.0.38 Documentation +# [Blockchair.com](https://blockchair.com/) API v.2.0.38 Documentation ``` ____ __ __ __ _ @@ -9,7 +9,7 @@ ``` -## Table of contents +# Table of contents + [Introduction](#link_M0) + [Supported blockchains and second layers](#link_M01) @@ -78,7 +78,7 @@ -## Introduction +# Introduction Blockchair API provides developers with access to data contained in [9 different blockchains](#link_M01). Unlike other APIs, Blockchair also support numerous analytical queries like filtering, sorting, and aggregating blockchain data. @@ -102,7 +102,7 @@ Our API is free to try under some limitations, and we have a variety of premium -### Supported blockchains and second layers +## Supported blockchains and second layers As of today, our API supports **9 blockchains** divided into 3 groups: * Bitcoin-like blockchains (Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin), also known as UTXO-based blockchains @@ -155,7 +155,7 @@ We also plan to bring ERC-721 support in the near future. Please note that we'll -### Quick endpoint reference +## Quick endpoint reference This is the full list of available API endpoints. @@ -242,7 +242,7 @@ The base request cost is used only if there are no additional parameters include -### Basic API request +## Basic API request Requests to the API should be made through the HTTPS protocol by GET requests to the domain `api.blockchair.com`. Here's an example request URL: `https://api.blockchair.com/bitcoin/blocks?a=sum(generation)` @@ -260,7 +260,7 @@ Here are some considerations: -### Basic API response +## Basic API response API returns JSON-encoded data. Typically, the response is an array consisting of two subarrays: @@ -300,7 +300,7 @@ There are also some things which are the same across all endpoints: -### API rate limits, API keys, and Premium API +## API rate limits, API keys, and Premium API While we do allow to perform some amount of requests free of charge, generally our API is not free to use. @@ -352,7 +352,7 @@ There's an extra API endpoint for those who have an API key allowing to [track t -### API versioning +## API versioning As a reminder, there's the `context.api` array in every API response which contains the following data: @@ -370,11 +370,11 @@ It makes sense to check if `context.api.version` has increased and/or just wheth -## General stats endpoints +# General stats endpoints -### Stats on multiple blockchains at once +## Stats on multiple blockchains at once Allows to retrieve the most important stats on all blockchains we support via just one API request. @@ -483,7 +483,7 @@ Always `1`. -### Bitcoin-like blockchain stats +## Bitcoin-like blockchain stats **Endpoints:** @@ -610,7 +610,7 @@ Always `1`. -### Ethereum-like blockchain stats +## Ethereum-like blockchain stats **Endpoint:** @@ -733,7 +733,7 @@ Always `1`. -### Ripple-like blockchain stats +## Ripple-like blockchain stats **Endpoint:** @@ -819,7 +819,7 @@ Always `1`. -### Omni Layer and Wormhole stats +## Omni Layer and Wormhole stats Allows to retrieve the some basic stats on Omni Layer (Bitcoin) and Wormhole (Bitcoin Cash). Since Wormhole is based on Omni Layer, the output is the same for both. Note that this endpoint is in the Alpha stage, and Wormhole is deprecated on our platform. @@ -892,14 +892,14 @@ Always `1`. -### ERC-20 stats +## ERC-20 stats There's no separate endpoint to get ERC-20 stats, use `https://api.blockchair.com/ethereum/stats` instead which includes ERC-20 info. Description is available [here](#link_002) -## Dashboard endpoints +# Dashboard endpoints Retrieve information about various entities in a neat format from our databases @@ -907,11 +907,11 @@ The API supports a number of calls that produce some aggregated data, or data in -### Dashboard endpoints for Bitcoin-like blockchains (Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin, Bitcoin Testnet) +## Dashboard endpoints for Bitcoin-like blockchains (Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin, Bitcoin Testnet) -#### Block info +### Block info **Endpoints:** @@ -1033,7 +1033,7 @@ Note that the total number of transactions in the block is contained in `data.{: -#### Transaction info +### Transaction info **Endpoints:** @@ -1228,7 +1228,7 @@ For mempool transactions shows priority (`position`) — for chains supporting S -#### Address and extended public key (xpub) info +### Address and extended public key (xpub) info **Endpoints:** @@ -1803,11 +1803,11 @@ Address object specification: -### Dashboard endpoints for Ethereum +## Dashboard endpoints for Ethereum -#### Block info +### Block info **Endpoints:** @@ -1938,7 +1938,7 @@ Note that the total number of transactions in the block is contained in `data.{: -#### Uncle info +### Uncle info **Endpoints:** @@ -2024,7 +2024,7 @@ If there's no `{:hash}ᵢ` has been found in the database, there won't be such k -#### Transaction info +### Transaction info **Endpoints:** @@ -2196,7 +2196,7 @@ For mempool transactions shows priority (`position`) by `gas_price` over other t -#### Address info +### Address info **Endpoint:** @@ -2365,11 +2365,11 @@ Notes: -### Dashboard endpoints for second layers +## Dashboard endpoints for second layers -#### Omni Layer and Wormhole property info +### Omni Layer and Wormhole property info Allows to retrieve the some basic information on an Omni Layer (Bitcoin) or Wormhole (Bitcoin Cash) property (token). Since Wormhole is based on Omni Layer, the output is the same for both. Note that this endpoint is in the Alpha stage, and Wormhole is deprecated on our platform. @@ -2434,7 +2434,7 @@ Always `1`. -#### ERC-20 token info +### ERC-20 token info Allows to retrieve the some basic information on an ERC-20 token. Note that this endpoint is in the Beta stage. @@ -2503,7 +2503,7 @@ Always `1`. -#### ERC-20 token holder info +### ERC-20 token holder info **Endpoint:** @@ -2598,17 +2598,17 @@ The structure is similar to the [Ethereum address](#link_302) endpoint with the -## Raw data endpoints +# Raw data endpoints Retrieve raw information about various entities directly from our full nodes -### Raw data endpoints for Bitcoin-like blockchains (Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin, Bitcoin Testnet) +## Raw data endpoints for Bitcoin-like blockchains (Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin, Bitcoin Testnet) -#### Raw block data +### Raw block data Returns raw block data directly from our full node. If the block is larger than 10 megabytes in size, returns a `402` error. @@ -2688,7 +2688,7 @@ Always `1`. -#### Raw transaction data +### Raw transaction data Returns raw transaction data directly from our full node. @@ -2792,11 +2792,11 @@ Always `1`. -### Dashboard endpoints for Ethereum +## Dashboard endpoints for Ethereum -#### Raw block data +### Raw block data Returns raw block data directly from our full node. @@ -2882,7 +2882,7 @@ Always `1`. -#### Raw transaction data +### Raw transaction data Returns raw transaction data directly from our full node. @@ -2938,11 +2938,11 @@ Always `1`. -### Dashboard endpoints for Ripple +## Dashboard endpoints for Ripple -#### Raw ledger data +### Raw ledger data Returns raw ledger data directly from our full node. @@ -3032,7 +3032,7 @@ Always `1`. -#### Raw transaction data +### Raw transaction data Returns raw transaction data directly from our full node. @@ -3138,7 +3138,7 @@ Always `1`. -#### Raw account data +### Raw account data Returns raw account data directly from our full node. @@ -3379,7 +3379,7 @@ Always `1`. -## Infinitable endpoints (blockchain tables) +# Infinitable endpoints (blockchain tables) These endpoints allow you to filter, sort, and aggregate blockchain data. The output is database rows. Unlike dashboard and raw endpoints, all infinitable endpoints listed in this section can be considered as just one endpoint as it has the same options and the same output structure across different blockchains and entities. Here it is: `https://api.blockchair.com/{:table}{:query}`. @@ -3663,11 +3663,11 @@ There can also be synthetic columns which aren't shown in the response, but you -### Inifinitable endpoints for Bitcoin-like blockchains (Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin, Bitcoin Testnet) +## Inifinitable endpoints for Bitcoin-like blockchains (Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin, Bitcoin Testnet) -#### `blocks` table +### `blocks` table **Endpoint:** @@ -3814,7 +3814,7 @@ See [request costs for infinitables](#link_05) -#### `transactions` table +### `transactions` table **Endpoints:** @@ -3946,7 +3946,7 @@ See [request costs for infinitables](#link_05) -#### `outputs` table +### `outputs` table **Endpoints:** @@ -4129,7 +4129,7 @@ See [request costs for infinitables](#link_05) -#### `addresses` view +### `addresses` view **Endpoints:** @@ -4272,13 +4272,13 @@ See [request costs for infinitables](#link_05) -### Inifinitable endpoints for Ethereum +## Inifinitable endpoints for Ethereum Please note that unlike with Bitcoin-like chains, where we populate our databases synchronically (block after block as there's the UTXO model used), for Ethereum we use asynchronous process, thus it's possible that for some brief period of time there will be information about block `n`, but there may not be for block `n-1` and further. -#### `blocks` table +### `blocks` table **Endpoint:** @@ -4412,7 +4412,7 @@ See [request costs for infinitables](#link_05) -#### `uncles` table +### `uncles` table **Endpoint:** @@ -4518,7 +4518,7 @@ See [request costs for infinitables](#link_05) -#### `transactions` table +### `transactions` table **Endpoint:** @@ -4671,7 +4671,7 @@ See [request costs for infinitables](#link_05) -#### `calls` table +### `calls` table **Endpoint:** @@ -4766,11 +4766,11 @@ See [request costs for infinitables](#link_05) -### Inifinitable endpoints for second layers +## Inifinitable endpoints for second layers -#### `properties` table (Omni Layer and Wormhole) +### `properties` table (Omni Layer and Wormhole) Note: this particular table doesn't support querying. The only query section it supports is `?offset=`. Note that this endpoint is in the Alpha stage, and Wormhole is deprecated on our platform. @@ -4836,7 +4836,7 @@ See [request costs for infinitables](#link_05) -#### `tokens` table (ERC-20) +### `tokens` table (ERC-20) **Endpoint:** @@ -4933,7 +4933,7 @@ See [request costs for infinitables](#link_05) -#### `transactions` table (ERC-20) +### `transactions` table (ERC-20) **Endpoint:** @@ -5015,11 +5015,11 @@ See [request costs for infinitables](#link_05) -## Misc endpoints +# Misc endpoints -### Broadcasting transactions +## Broadcasting transactions Broadcast a transaction to the network @@ -5079,7 +5079,7 @@ Always `1`. -### Nodes +## Nodes List of full network nodes @@ -5173,7 +5173,7 @@ Always `1`. -### State changes +## State changes Allows to query state changes caused by a block and potential state changes caused by mempool transactions in case they get confirmed. @@ -5249,11 +5249,11 @@ Note that this example doesn't account for cases like new multiple blocks have b -### Premium API endpoints +## Premium API endpoints -#### Premium API usage stats +### Premium API usage stats This is a special endpoint for Premium API users showing some stats on your API key usage. @@ -5306,7 +5306,7 @@ Always `0`. This request is free to use. -## Support +# Support * E-mail: [info@blockchair.com](mailto:info@blockchair.com) * Telegram chat: [@Blockchair](https://telegram.me/Blockchair) From eee332f3c0cd8c15bdccf271d272b29e8488afa2 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Fri, 1 Nov 2019 22:41:28 +0300 Subject: [PATCH 096/180] =?UTF-8?q?v.2.0.39=20=E2=80=94=20Stellar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- API.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/API.md b/API.md index ceaa8c7c..ba0be54d 100644 --- a/API.md +++ b/API.md @@ -3,7 +3,7 @@ Logo ### API v.2 documentation -* English: [API_DOCUMENTATION_EN.md](API_DOCUMENTATION_EN.md) (up to v.2.0.38) +* English: [API_DOCUMENTATION_EN.md](API_DOCUMENTATION_EN.md) (up to v.2.0.39) ### Please apply for an API key first @@ -26,6 +26,11 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.39 - Nov 1st, 2019 + * Added alpha support for Stellar (XLM). Here's the list of new endpoints (please refer to our documentation for more info: https://blockchair.com/api/docs): + * `https://api.blockchair.com/stellar/raw/ledger/{:id}` + * `https://api.blockchair.com/stellar/raw/transaction/{:hash}` + * `https://api.blockchair.com/stellar/raw/account/{:address}` * v.2.0.38 - Oct 26th, 2019 * We've published new documentation for our API which is lots more clear and describes all the functions we have, it's now available here: https://blockchair.com/api/docs * Changes to the Omni Layer and Wormhole support (as they're in Alpha test mode these are compatibility-breaking changes; we'll be bringing Omni to Stable the next year): From 74a08910df29f3a7fc894dc0a42c2e2b3c507065 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Fri, 1 Nov 2019 22:42:08 +0300 Subject: [PATCH 097/180] =?UTF-8?q?v.2.0.39=20=E2=80=94=20Stellar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- API_DOCUMENTATION_EN.md | 383 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 362 insertions(+), 21 deletions(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index 6b45fb0d..544cf9fd 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,4 +1,4 @@ -# [Blockchair.com](https://blockchair.com/) API v.2.0.38 Documentation +# [Blockchair.com](https://blockchair.com/) API v.2.0.39 Documentation ``` ____ __ __ __ _ @@ -23,6 +23,7 @@ + [Bitcoin-like blockchain stats](#link_001) + [Ethereum-like blockchain stats](#link_002) + [Ripple-like blockchain stats](#link_003) + + [Stellar-like blockchain stats](#link_004) + [Omni Layer stats](#link_500) + [Wormhole stats](#link_500) + [ERC-20 stats](#link_509) @@ -52,7 +53,11 @@ - [Ledger](#link_106) - [Transaction](#link_207) - [Account](#link_303) -+ [Infinitable endpoints (blockchain tables)](#link_05) (Filter, sort, and aggregate blockchain data) + - [Stellar](#link_M34) + - [Ledger](#link_107) + - [Transaction](#link_208) + - [Account](#link_304) ++ [Infinitable endpoints](#link_05) (SQL-like queries: filter, sort, and aggregate blockchain data) + [Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin, and Bitcoin Testnet](#link_M41) + [Blocks](#link_102) (table) + [Transactions](#link_203) (table) @@ -80,7 +85,7 @@ # Introduction -Blockchair API provides developers with access to data contained in [9 different blockchains](#link_M01). Unlike other APIs, Blockchair also support numerous analytical queries like filtering, sorting, and aggregating blockchain data. +Blockchair API provides developers with access to data contained in [10 different blockchains](#link_M01). Unlike other APIs, Blockchair also support numerous analytical queries like filtering, sorting, and aggregating blockchain data. Here are some examples of what you can build using our API: @@ -104,10 +109,11 @@ Our API is free to try under some limitations, and we have a variety of premium ## Supported blockchains and second layers -As of today, our API supports **9 blockchains** divided into 3 groups: +As of today, our API supports **10 blockchains** divided into 4 groups: * Bitcoin-like blockchains (Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin), also known as UTXO-based blockchains * Ethereum-like blockchains (Ethereum) * Ripple-like blockchains (Ripple) +* Stellar-like blockchains (Stellar) Within a group, there's no or little difference between the set of available endpoints and their output. @@ -122,6 +128,7 @@ Within a group, there's no or little difference between the set of available end | Dash | Bitcoin-like | `https://api.blockchair.com/dash` | Full support | | Ripple | Ripple-like | `https://api.blockchair.com/ripple` | Alpha mode, possible compatibility-breaking changes | | Groestlcoin | Bitcoin-like | `https://api.blockchair.com/groestlcoin` | Full support, community-backed till June 18th, 2020 | +| Stellar | Stellar-like | `https://api.blockchair.com/stellar` | Alpha mode, possible compatibility-breaking changes | There are also following testnets supported which are technically considered as separate blockchains: @@ -162,6 +169,7 @@ This is the full list of available API endpoints. - `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, or `bitcoin/testnet` - `{:eth_chain}` can be only `ethereum` - `{:xrp_chain}` can be only `ripple` +- `{:xlm_chain}` can be only `stellar` | API path | Docs | Base request cost | Status | | ----------------------------------------------- | :----------------: | -----------------------------: | :---------------------------------------------: | @@ -170,6 +178,7 @@ This is the full list of available API endpoints. | `https://api.blockchair.com/{:btc_chain}/stats` | [👉](#link_001) | `1` | Stable | | `https://api.blockchair.com/{:eth_chain}/stats` | [👉](#link_002) | `1` | Stable | | `https://api.blockchair.com/{:xrp_chain}/stats` | [👉](#link_003) | `1` | Alpha | +| `https://api.blockchair.com/{:xlm_chain}/stats` | [👉](#link_004) | `1` | Alpha | | **Block-related information** | — | — | — | | `https://api.blockchair.com/{:btc_chain}/dashboards/block/{:height}₀` | [👉](#link_100) | `1` | Stable | | `https://api.blockchair.com/{:btc_chain}/dashboards/block/{:hash}₀` | [👉](#link_100) | `1` | Stable | @@ -187,6 +196,7 @@ This is the full list of available API endpoints. | `https://api.blockchair.com/{:eth_chain}/blocks?{:query}` | [👉](#link_105) | `2` | Stable | | `https://api.blockchair.com/{:xrp_chain}/raw/ledger/{:height}₀` | [👉](#link_106) | `1` | Alpha | | `https://api.blockchair.com/{:xrp_chain}/raw/ledger/{:hash}₀` | [👉](#link_106) | `1` | Alpha | +| `https://api.blockchair.com/{:xlm_chain}/raw/ledger/{:height}₀` | [👉](#link_107) | `1` | Alpha | | **Transaction-related information and actions** | — | — | — | | `https://api.blockchair.com/{:btc_chain}/dashboards/transaction/{:hash}₀` | [👉](#link_200) | `1` | Stable | | `https://api.blockchair.com/{:btc_chain}/dashboards/transactions/{:hash}₀,...,{:hash}ᵩ` | [👉](#link_200) | `1 + 0.1*c` | Stable | @@ -201,6 +211,7 @@ This is the full list of available API endpoints. | `https://api.blockchair.com/{:eth_chain}/transactions?{:query}` | [👉](#link_206) | `5` | Stable | | `https://api.blockchair.com/{:eth_chain}/mempool/transactions?{:query}` | [👉](#link_206) | `2` | Stable | | `https://api.blockchair.com/{:xrp_chain}/raw/transaction/{:hash}₀` | [👉](#link_207) | `1` | Alpha | +| `https://api.blockchair.com/{:xlm_chain}/raw/transaction/{:hash}₀` | [👉](#link_208) | `1` | Alpha | | **Address-related information** | — | — | — | | `https://api.blockchair.com/{:btc_chain}/dashboards/address/{:address}₀` | [👉](#link_300) | `1` | Stable | | `https://api.blockchair.com/{:btc_chain}/dashboards/addresses/{:address}₀,...,{:address}ᵩ` | [👉](#link_300) | `1 + 0.1*c` | Stable | @@ -208,9 +219,10 @@ This is the full list of available API endpoints. | `https://api.blockchair.com/{:btc_chain}/addresses?{:query}` | [👉](#link_301) | `2` | Stable | | `https://api.blockchair.com/{:eth_chain}/dashboards/address/{:address}₀` | [👉](#link_302) | `1` | Stable | | `https://api.blockchair.com/{:xrp_chain}/raw/account/{:address}₀` | [👉](#link_303) | `1` | Alpha | +| `https://api.blockchair.com/{:xlm_chain}/raw/account/{:address}₀` | [👉](#link_304) | `1` | Alpha | | **Special entities** | — | — | — | | `https://api.blockchair.com/{:btc_chain}/outputs?{:query}` | [👉](#link_400) | `10` | Beta | -| `https://api.blockchair.com/{:btc_chain}/mempool/outputs?{:query}` | [👉](#link_400) | `2` | Stable | +| `https://api.blockchair.com/{:btc_chain}/mempool/outputs?{:query}` | [👉](#link_400) | `2` | Beta | | `https://api.blockchair.com/{:eth_chain}/dashboards/uncle/{:hash}₀` | [👉](#link_401) | `1` | Stable | | `https://api.blockchair.com/{:eth_chain}/dashboards/uncles/{:hash}₀,...,{:hash}ᵩ` | [👉](#link_401) | `1 + 0.1*c` | Stable | | `https://api.blockchair.com/{:eth_chain}/uncles?{:query}` | [👉](#link_402) | `2` | Stable | @@ -273,7 +285,7 @@ API returns JSON-encoded data. Typically, the response is an array consisting of * `404` for some endpoints in case there's no results (this behavior is deprecated), also if you're requesting non-existing endpoint * `402`, `429`, or `435` if any limit on the number or complexity of requests is exceeded (see [the list of limits](#link_M05), and please [contact us](#link_M05) if you'd like to increase them) * `430`, `434`, or `503` if your IP address is temporarily blocked - * `500` or` 503` in case of a server error (it makes sense to wait and repeat the same request or open a ticket at https://github.com/Blockchair/Blockchair.Support/issues/new or write to ) + * `500` or `503` in case of a server error (it makes sense to wait and repeat the same request or open a ticket at https://github.com/Blockchair/Blockchair.Support/issues/new or write to ) * `context.error` — error description in the case there's an error * `context.state` — number of the latest known block (e.g., for all requests to endpoints connected to the Bitcoin blockchain this will yield the latest block number for Bitcoin). For example, it may be useful to calculate the number of network сonfirmations, or correctly iterate trough the results using `?offset=`. Not returned if the request has failed. * `context.state_layer_2` — the latest block number for which our engine has processed second layer (e.g. ERC-20) transactions. If it's less than the block id in your current environment (e.g. block id of a transaction you requested), it makes sense to repeat the request after some time to retrieve second layer data @@ -508,8 +520,8 @@ Always `1`. * `nodes`— number of full network nodes (it's an approximate number and actually not a blockchain metric) * `difficulty` — current mining difficulty * `hashrate_24h` — approximated hashrate over the last 24 hours (returned as a string as it doesn't fit into an integer) -* `next_retarget_time_estimate` — approximate timestamp of the next difficulty retarget -* `next_difficulty_estimate` — approximate next difficulty value +* `next_retarget_time_estimate` — approximate timestamp of the next difficulty retarget (this field is available for Bitcoin and Litecoin only) +* `next_difficulty_estimate` — approximate next difficulty value (this field is available for Bitcoin and Litecoin only) * `best_block_height` — the latest block height * `best_block_hash` — the latest block hash * `best_block_time` — the latest block time @@ -527,7 +539,7 @@ Always `1`. * `inflation_24h`— number of new coins mined over the last 24 hours (in satoshi), this can be considered as the daily inflation * `inflation_usd_24h` — the same in USD * `cdd_24h`— total coindays destroyed over the last 24 hours -* `largest_transaction_24h`: array of `hash` and `value_usd` — biggest payment over the last 24 hours +* `largest_transaction_24h` — array of `hash` and `value_usd` — biggest payment over the last 24 hours * `market_price_usd` — average market price of 1 coin in USD (market data source: CoinGecko) * `market_price_btc` — average market price of 1 coin in BTC (for Bitcoin it always returns 1) * `market_price_usd_change_24h_percentage` — market price change in percent for 24 hours @@ -819,6 +831,10 @@ Always `1`. + + + + ## Omni Layer and Wormhole stats Allows to retrieve the some basic stats on Omni Layer (Bitcoin) and Wormhole (Bitcoin Cash). Since Wormhole is based on Omni Layer, the output is the same for both. Note that this endpoint is in the Alpha stage, and Wormhole is deprecated on our platform. @@ -964,7 +980,7 @@ Note that the total number of transactions in the block is contained in `data.{: ```json { "data": { - 0: { + "0": { "block": { "id": 0, "hash": "000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f", @@ -1259,8 +1275,8 @@ For mempool transactions shows priority (`position`) — for chains supporting S * `?limit={:transaction_limit},{:utxo_limit}` or a shorthand `?limit={:limit}`. `{:transaction_limit}` limits the number of returned latest transaction hashes (in the `transactions` array) for an address or an address set. Default is `100`. Maximum is `10000`. In case of `0` returns an empty transaction hashes array. `{:utxo_limit}` limits the number of returned latest UTXOs (in the `utxo` array) for an address or an address set. Default is `100`. Maximum is `10000`. In case of `0` returns an empty UTXO array. If only one limit is set, it applies to both `{:transaction_limit}` and `{:utxo_limit}` (e.g. `?limit=100` is an equivalent of `?limit=100,100`). * `?offset={:transaction_offset},{:utxo_offest}` or a shorthand `?offset={:offset}` allows to paginate transaction hashes and the UTXO array. The behaviour is similar to the `?limit=` section. Default for both offset is `0`, and the maximum is `1000000`. * `?transaction_details=true` — returns detailed info on transactions instead of just hashes in the `transactions` array. Each element contains `block_id`, `transaction_hash`, `time`, and `balance_change` (shows how the transactions affected the balance of `{:address}`, i.e. it can be a negative value). At the moment, this option is available for the `address` endpoint only. -* `?omni=true` (for `bitcoin` only; in alpha test mode) — shows information about Omni Layer token transfers in this transaction. At the moment, this option is available for the `address` endpoint only. The data is returned in the `layer_2.omni` array. -* `?wormhole=true` (for `bitcoin-cash` only; in alpha test mode) — shows information about Wormhole token transfers in this transaction. At the moment, this option is available for the `address` endpoint only. The data is returned in the `layer_2.wormhole` array. +* `?omni=true` (for `bitcoin` only; in alpha test mode) — shows information about Omni Layer tokens belonging to the address. At the moment, this option is available for the `address` endpoint only. The data is returned in the `layer_2.omni` array. +* `?wormhole=true` (for `bitcoin-cash` only; in alpha test mode) — shows information about Wormhole tokens belonging to the address. At the moment, this option is available for the `address` endpoint only. The data is returned in the `layer_2.wormhole` array. **Output:** @@ -1968,7 +1984,7 @@ If there's no `{:hash}ᵢ` has been found in the database, there won't be such k **Example requests:** - `https://api.blockchair.com/ethereum/dashboards/uncle/0x5cd50096dbb856a6d1befa6de8f9c20decb299f375154427d90761dc0b101109` -- ``https://api.blockchair.com/ethereum/dashboards/uncles/0x5cd50096dbb856a6d1befa6de8f9c20decb299f375154427d90761dc0b101109,0xedc7a92c2a8aa140b0afa26db4ce8e05994a67d6fc3d736ddd77210b0ba565bb` +- `https://api.blockchair.com/ethereum/dashboards/uncles/0x5cd50096dbb856a6d1befa6de8f9c20decb299f375154427d90761dc0b101109,0xedc7a92c2a8aa140b0afa26db4ce8e05994a67d6fc3d736ddd77210b0ba565bb` **Example output:** @@ -2211,7 +2227,7 @@ For mempool transactions shows priority (`position`) by `gas_price` over other t - `?limit={:call_limit}` — limits the number of returned latest calls associated with the address. Default is `100`. Maximum is `10000`. - `?offset={:call_offset}` — allows to paginate calls. Default is `0`, and the maximum is `1000000`. -- `?erc_20=true` — returns detailed info on transactions instead of just hashes in the `transactions` array. Each element contains `block_id`, `transaction_hash`, `time`, and `balance_change` (shows how the transactions affected the balance of `{:address}`, i.e. it can be a negative value). At the moment, this option is available for the `address` endpoint only. +- `?erc_20=true` — return information about ERC-20 token balances of the address **Output:** @@ -2965,13 +2981,13 @@ Returns raw ledger data directly from our full node. `data` contains an associative array: -- `data.{:id}ᵢ.decoded_raw_ledger` — raw ledger encoded in JSON by our node. 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. We don't provide field descriptions for raw endpoints, that information can be found on the Ripple website. +- `data.{:id}ᵢ.ledger` — raw ledger encoded in JSON by our node. 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. We don't provide field descriptions for raw endpoints, that information can be found on the Ripple website. Where `{:id}ᵢ` is either `{:height}ᵢ` or `{:hash}ᵢ` from the query string. If there's no `{:id}ᵢ` has been found on the blockchain, returns an empty array. **Context keys:** -- `context.state`: best block height on the `{:btc_chain}` chain (tip: it's possible to calculate the number of confirmation block received using this formula: `confirmations = data.{:id}ᵢ.block.id - context.state + 1`) +- `context.state`: best ledget height on the `{:xrp_chain}` chain (tip: it's possible to calculate the number of confirmation block received using this formula: `confirmations = data.{:id}ᵢ.ledger.id - context.state + 1`) **Example requests:** @@ -2987,7 +3003,7 @@ Where `{:id}ᵢ` is either `{:height}ᵢ` or `{:hash}ᵢ` from the query string. { "data": { "50000000": { - "decoded_raw_ledger": { + "ledger": { "accepted": true, "account_hash": "191EA9DD67A3FDAA40293D762EB4F96AB852ACA499AA37F3851616EF449A63E1", "close_flags": 0, @@ -3024,7 +3040,7 @@ Where `{:id}ᵢ` is either `{:height}ᵢ` or `{:hash}ᵢ` from the query string. **Request cost formula:** -Always `1`. +`1`. If `?transactions=true` option is used then `2`. **Explore visualization on our front-end:** @@ -3042,7 +3058,7 @@ Returns raw transaction data directly from our full node. **Where:** -- `{:xrp_chain}` can only be 'ripple' +- `{:xrp_chain}` can only be `ripple` - `{:hash}ᵢ` is the transaction hash (regex: `/^[0-9a-f]{64}$/i`) **Output:** @@ -3148,7 +3164,7 @@ Returns raw account data directly from our full node. **Where:** -- `{:xrp_chain}` can only be 'ripple' +- `{:xrp_chain}` can only be `ripple` - `{:account}ᵢ` is the account address **Possible options:** @@ -3379,7 +3395,327 @@ Always `1`. -# Infinitable endpoints (blockchain tables) +## Dashboard endpoints for Stellar + + + +### Raw ledger data + +Returns raw ledger data directly from our full node. + +**Endpoint:** + +- `https://api.blockchair.com/{:xlm_chain}/raw/ledger/{:height}₀` + +**Where:** + +- `{:xlm_chain}` can only be `stellar` +- `{:height}ᵢ` is the ledger number (integer value) + +**Possible options:** + +- `?transactions=true` displays transaction data + +**Output:** + +`data` contains an associative array: + +- `data.{:height}ᵢ.ledger` — raw ledger encoded in JSON by our node. 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. We don't provide field descriptions for raw endpoints, that information can be found on the Stellar website. + +**Context keys:** + +- `context.state`: best ledger height on the `{:btc_chain}` chain (tip: it's possible to calculate the number of confirmation block received using this formula: `confirmations = data.{:id}ᵢ.block.id - context.state + 1`) + +**Example requests:** + +- `https://api.blockchair.com/stellar/raw/ledger/26550000` +- `https://api.blockchair.com/stellar/raw/ledger/26550000?transactions=true` + +**Example output:** + +`https://api.blockchair.com/stellar/raw/ledger/26550000`: + +```json +{ + "data": { + "26550000": { + "ledger": { + "id": "fed785dba44cfe2fd295780e7c25f7f07ed45262269a70c4e6bde9e84e3793f8", + "paging_token": "114031381708800000", + "hash": "fed785dba44cfe2fd295780e7c25f7f07ed45262269a70c4e6bde9e84e3793f8", + "prev_hash": "3ea68ed2ee8cdfce550382856ca49ef4144e0cf9c2805b1a020ab4093caa53c6", + "sequence": 26550000, + "successful_transaction_count": 13, + "failed_transaction_count": 2, + "operation_count": 32, + "closed_at": "2019-10-30T07:45:58Z", + "total_coins": "105443902087.3472865", + "fee_pool": "1806770.7383261", + "base_fee_in_stroops": 100, + "base_reserve_in_stroops": 5000000, + "max_tx_set_size": 1000, + "protocol_version": 12, + "header_xdr": "AAAADD6mjtLujN/OVQOChWyknvQUTgz5woBbGgIKtAk8qlPG5z6KZRbEna3gObMFtKI86FhJuQxj5LtF0RdBe2sgpsQAAAAAXbk/tgAAAAAAAAAAKMzxu3Hs9m1o4nZnq+QAjSOZBarLt8M9Feijiot1z8r7LlCHEDaLHsvky0SpheuEPgdvHIHDWN9FqxxLqSeDdAGVHvAOoh6z7HlbYQAAEG63R83dAAABFgAAAAAHjozrAAAAZABMS0AAAAPo+y5QhxA2ix7L5MtEqYXrhD4HbxyBw1jfRascS6kng3SFsbCPVWlIYy5CD3xrfmHW5QVBaCXNxhM66HUv3N/E7yNrXPzOlSLpkylGu0oLplg8ltK+RXCU27vxVw0P+guGyG3+zc/A1cWvfpnr0rXnL/jFwF6AQdjikSSt8tSYeiMAAAAA" + }, + "transactions": null + } + }, + "context": { + "code": 200, + "results": 1, + "state": 26559101, + ... + } +} +``` + +**Request cost formula:** + +`1`. If `?transactions=true` option is used then `2`. + +**Explore visualization on our front-end:** + +- https://blockchair.com/stellar/ledger/26550000 + + + +### Raw transaction data + +Returns raw transaction data directly from our full node. + +**Endpoint:** + +- `https://api.blockchair.com/{:xlm_chain}/raw/transaction/{:hash}₀` + +**Where:** + +- `{:xlm_chain}` can only be `stellar` +- `{:hash}ᵢ` is the transaction hash (regex: `/^[0-9a-f]{64}$/i`) + +**Possible options:** + +- `?operations=true` displays operations data +- `?effects=true` displays effects data + +**Output:** + +`data` contains an associative array: + +- `data.{:hash}ᵢ.transaction` — raw transaction encoded in JSON by our node. 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. We don't provide field descriptions for raw endpoints, that information can be found on the Stellar website` +- `data.{:hash}ᵢ.operations` (optional: if the parameter is not set yields `null`) +- `data.{:hash}ᵢ.effects` (optional: if the parameter is not set yields `null`) + +If there's no `{:hash}ᵢ` has been found on the blockchain, returns an empty array. + +**Context keys:** + +- `context.state`: best ledger height on the `{:xlm_chain}` chain + +**Example requests:** + +- `https://api.blockchair.com/stellar/raw/transaction/0a6bf9370255d1309c93f93b5d35cd5e6f504700dda7d144eece9a127a20afe8` +- `https://api.blockchair.com/stellar/raw/transaction/0a6bf9370255d1309c93f93b5d35cd5e6f504700dda7d144eece9a127a20afe8?operations=true&effects=true` + +**Example output:** + +`https://api.blockchair.com/stellar/raw/transaction/0a6bf9370255d1309c93f93b5d35cd5e6f504700dda7d144eece9a127a20afe8?operations=true&effects=true`: + +```json +{ + "data": { + "0a6bf9370255d1309c93f93b5d35cd5e6f504700dda7d144eece9a127a20afe8": { + "transaction": { + "id": "0a6bf9370255d1309c93f93b5d35cd5e6f504700dda7d144eece9a127a20afe8", + "paging_token": "114031381708804096", + "successful": true, + "hash": "0a6bf9370255d1309c93f93b5d35cd5e6f504700dda7d144eece9a127a20afe8", + "ledger": 26550000, + "created_at": "2019-10-30T07:45:58Z", + "source_account": "GBOLDCYKDFVCG2UG3OLPY6GMZUAQAX445UM3RCXGBVW37RMQEYXZ4HD7", + "source_account_sequence": "113240003919741179", + "fee_paid": 100, + "fee_charged": 100, + "max_fee": 10000, + "operation_count": 1, + "envelope_xdr": "AAAAAFyxiwoZaiNqhtuW/HjMzQEAX5ztGbiK5g1tv8WQJi+eAAAnEAGSTy...", + "result_xdr": "AAAAAAAAAGQAAAAAAAAAAQAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAFyxiwoZ...", + "result_meta_xdr": "AAAAAQAAAAIAAAADAZUe8AAAAAAAAAAAXAAAAAAAAAAAAAAAAAAAAAA...", + "fee_meta_xdr": "AAAAAgAAAAMBlR4aAAAAAAAAAABcsYsKGWojaobblvx4zM0BAF+c7Rm4iu...", + "memo_type": "none", + "signatures": [ + "/tbZWxQaFew0kkO7HNG2jpfCJ9+Bhu/IieCa8CK/pBUx6IX5NyBCbY5cQtC2mnWDCloOsQw6BpDGcPjFJKElCw==" + ] + }, + "operations": [ + { + "id": "114031381708804097", + "paging_token": "114031381708804097", + "transaction_successful": true, + "source_account": "GBOLDCYKDFVCG2UG3OLPY6GMZUAQAX445UM3RCXGBVW37RMQEYXZ4HD7", + "type": "manage_offer", + "type_i": 3, + "created_at": "2019-10-30T07:45:58Z", + "transaction_hash": "0a6bf9370255d1309c93f93b5d35cd5e6f504700dda7d144eece9a127a20afe8", + "amount": "20.9531697", + "price": "41.0000000", + "price_r": { + "n": 41, + "d": 1 + }, + "buying_asset_type": "native", + "selling_asset_type": "credit_alphanum4", + "selling_asset_code": "NRV", + "selling_asset_issuer": "GANRAE2FXMIU4V7CPLXFHWZNGCCSW7WEVBN2P3ZWA7FWWVED6OJSKKX2", + "offer_id": 0 + } + ], + "effects": [] + } + }, + "context": { + "code": 200, + "results": 1, + "state": 26559101, + ... + } +} +``` + +**Request cost formula:** + +`1`. Plus `1` for every of these options used: `?operations=true`, `?effects=true`) + +**Explore visualization on our front-end:** + +- https://blockchair.com/stellar/transaction/0a6bf9370255d1309c93f93b5d35cd5e6f504700dda7d144eece9a127a20afe8 + + + +### Raw account data + +Returns raw account data directly from our full node. + +**Endpoint:** + +- `https://api.blockchair.com/{:xlm_chain}/raw/account/{:account}` + +**Where:** + +- `{:xlm_chain}` can only be `stellar` +- `{:account}ᵢ` is the account address + +**Possible options:** + +- `?transactions=true` returns information about latest account transactions +- `?operations=true` returns information about latest account operations +- `?payments=true` returns information about latest account payments +- `?effects=true` returns information about latest account effects +- `?offers=true` returns information about latest account offers +- `?trades=true` returns information about latest account trades +- `?account=false` doesn't query account data (`true` by default if this option is not applied) + +**Output:** + +`data` contains an associative array: + +- `data.{:account}ᵢ.account` — raw account data encoded in JSON by our node. 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. We don't provide field descriptions for raw endpoints, that information can be found on the Ripple website +- Optional arrays (`transactions`, `operations`, `payments`, `effects`, `offers`, `trades`), yield `null` if the corresponding options aren't used + +If there's no `{:account}ᵢ` has been found on the blockchain, returns an empty array. + +**Context keys:** + +- `context.state`: best ledger height on the `{:xlm_chain}` chain + +**Example requests:** + +- `https://api.blockchair.com/stellar/raw/account/GBOLDCYKDFVCG2UG3OLPY6GMZUAQAX445UM3RCXGBVW37RMQEYXZ4HD7` +- `https://api.blockchair.com/stellar/raw/account/GBOLDCYKDFVCG2UG3OLPY6GMZUAQAX445UM3RCXGBVW37RMQEYXZ4HD7?transactions=true&trades=true` +- `https://api.blockchair.com/stellar/raw/account/GBOLDCYKDFVCG2UG3OLPY6GMZUAQAX445UM3RCXGBVW37RMQEYXZ4HD7?transactions=true&account=false` + +**Example output:** + +`https://api.blockchair.com/stellar/raw/account/GBOLDCYKDFVCG2UG3OLPY6GMZUAQAX445UM3RCXGBVW37RMQEYXZ4HD7`: + +```json +{ + "data": { + "GBOLDCYKDFVCG2UG3OLPY6GMZUAQAX445UM3RCXGBVW37RMQEYXZ4HD7": { + "account": { + "id": "GBOLDCYKDFVCG2UG3OLPY6GMZUAQAX445UM3RCXGBVW37RMQEYXZ4HD7", + "account_id": "GBOLDCYKDFVCG2UG3OLPY6GMZUAQAX445UM3RCXGBVW37RMQEYXZ4HD7", + "sequence": "113240003919741217", + "subentry_count": 16, + "inflation_destination": "GDCHDRSDOBRMSUDKRE2C4U4KDLNEATJPIHHR2ORFL5BSD56G4DQXL4VW", + "home_domain": "lobstr.co", + "last_modified_ledger": 26574812, + "thresholds": { + "low_threshold": 0, + "med_threshold": 0, + "high_threshold": 0 + }, + "flags": { + "auth_required": false, + "auth_revocable": false, + "auth_immutable": false + }, + "balances": [ + { + "balance": "99.9999989", + "limit": "922337203685.4775807", + "buying_liabilities": "0.0000000", + "selling_liabilities": "0.0000000", + "last_modified_ledger": 26369752, + "is_authorized": true, + "asset_type": "credit_alphanum4", + "asset_code": "MOBI", + "asset_issuer": "GA6HCMBLTZS5VYYBCATRBRZ3BZJMAFUDKYYF6AH6MVCMGWMRDNSWJPIH" + }, + ... + { + "balance": "350.2871051", + "buying_liabilities": "105.0000000", + "selling_liabilities": "341.1000000", + "asset_type": "native" + } + ], + "signers": [ + { + "weight": 1, + "key": "GBOLDCYKDFVCG2UG3OLPY6GMZUAQAX445UM3RCXGBVW37RMQEYXZ4HD7", + "type": "ed25519_public_key" + } + ], + "data": [] + }, + "transactions": null, + "operations": null, + "payments": null, + "effects": null, + "offers": null, + "trades": null + } + }, + "context": { + "code": 200, + "results": 1, + "state": 26559101, + ... + } +} +``` + +**Request cost formula:** + +`1`. Plus `1` for every of these options used: `?transactions=true`, `?operations=true`, `?payments=true`, `?effects=true`, `?offers=true`, `?trades=true`). Minus `1` if `?account=false` is used. + +**Explore visualizations on our front-end:** + +- https://blockchair.com/stellar/account/GBOLDCYKDFVCG2UG3OLPY6GMZUAQAX445UM3RCXGBVW37RMQEYXZ4HD7 + + + +# Infinitable endpoints (SQL-like queries) These endpoints allow you to filter, sort, and aggregate blockchain data. The output is database rows. Unlike dashboard and raw endpoints, all infinitable endpoints listed in this section can be considered as just one endpoint as it has the same options and the same output structure across different blockchains and entities. Here it is: `https://api.blockchair.com/{:table}{:query}`. @@ -3610,6 +3946,11 @@ If you'd like to export entire tables without using filters — it's better to u *Warning*: this functionality is in beta stage. +**Front-end visualizations** + +* Filters and sortings: https://blockchair.com/bitcoin/blocks +* Data aggregation: https://blockchair.com/charts + **Request cost formula for infinitables** Cost is calculated by summing up the following values: From aaae868457b641adc03c2328210b9f55761e0d7b Mon Sep 17 00:00:00 2001 From: Yedige Davletgaliyev <25755605+linuxion@users.noreply.github.com> Date: Mon, 16 Dec 2019 18:10:45 +0300 Subject: [PATCH 098/180] Update for first-party logging tools usage --- PRIVACY.md | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/PRIVACY.md b/PRIVACY.md index e193371e..3616f116 100644 --- a/PRIVACY.md +++ b/PRIVACY.md @@ -33,9 +33,9 @@ They might sell this information, publish it, share it with government agencies, ## Why is Blockchair the safer option? * When you connect to Blockchair your browser automatically sends us information about your computer, User Agent, IP address, and the page you want to visit. Since this data may expose your identity, **we do not permanently store information about you**; -* **We do not use cookies that can be used to identify you.** See below for details; +* **We do not use third-party cookies which can be used to identify you.** We may only set our own cookies to improve your user experience and help us to fight botnets and spammers. See below for details; * **Your browser won’t send HTTP referer headers when leaving Blockchair.com. This means you can move to other sites without your browsing activity being traced by those sites;** -* **We do not use CDN-providers, including those used to distribute JavaScript libraries and styles. We do not use hit counters, web analytics tools (such as Google Analytics) or any other third-party site elements. Therefore, other parties do not receive information about you.** +* **We do not use CDN-providers, including those used to distribute JavaScript libraries and styles. We do not use any third-party site elements, web analytics tools (such as Google Analytics) and hit counters. Therefore, other parties do not receive information about you.** * * * @@ -43,17 +43,11 @@ They might sell this information, publish it, share it with government agencies, We only collect anonymous aggregated data that allows us to improve our website features. We count visitors, analyze popular searches, cryptocurrencies, sortings and other queries. -We also store the incoming IP addresses for short periods of 5 to 10 minutes. This is to limit the rate of API requests. +We also store the incoming IP addresses in masked or clear form for short periods of 1 to 2 days. This is to limit the rate of API requests. -Your device may store technical cookies, such as those that keep the night mode on. In this case, only the client part of the site interacts with them. +Your device may store first-party cookies, such as those that keep the night mode on, store referer information, unique visitor and session ID. -Collected data is used to improve user experience and compile website traffic statistics. - -* * * - -## Exceptions - -We might activate logging procedure to safeguard our services since we're not protected from certain types of third-party network attacks. If this happens, we will post a notification in the site header to let you know we're collecting additional information during the attack. Once the attack has been stopped, all logs will be deleted along with the notification. +Collected data is used to improve user experience and compile website traffic statistics. Session data is deleted on a regular basis. * * * From 0ad3b823f98c1667e44c1c984306a223bea62b56 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Sat, 18 Jan 2020 19:27:53 +0300 Subject: [PATCH 099/180] v.2.0.41 --- API.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/API.md b/API.md index ba0be54d..394d0121 100644 --- a/API.md +++ b/API.md @@ -3,7 +3,7 @@ Logo ### API v.2 documentation -* English: [API_DOCUMENTATION_EN.md](API_DOCUMENTATION_EN.md) (up to v.2.0.39) +* English: [https://blockchair.com/api/docs](https://blockchair.com/api/docs) (up to v.2.0.41) ### Please apply for an API key first @@ -26,8 +26,21 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.41 - January 18th, 2020 + * Added alpha support for Monero. Here's the list of new endpoints (please refer to our documentation for more info: https://blockchair.com/api/docs): + * `https://api.blockchair.com/monero/stats` + * `https://api.blockchair.com/monero/raw/block/{:id|hash}` + * `https://api.blockchair.com/monero/raw/transaction/{:hash}` + * `https://api.blockchair.com/monero/raw/outputs?{:query}` +* v.2.0.40 - December 3rd, 2019 + * Added alpha support for Telegram Open Network (TON). Here's the list of new endpoints (please refer to our documentation for more info: https://blockchair.com/api/docs): + * `https://api.blockchair.com/ton/testnet/stats` + * `https://api.blockchair.com/ton/testnet/raw/ledger/{:tuple}` + * `https://api.blockchair.com/ton/testnet/raw/transaction/{:tuple}` + * `https://api.blockchair.com/ton/testnet/raw/account/{:address}` * v.2.0.39 - Nov 1st, 2019 * Added alpha support for Stellar (XLM). Here's the list of new endpoints (please refer to our documentation for more info: https://blockchair.com/api/docs): + * `https://api.blockchair.com/stellar/stats` * `https://api.blockchair.com/stellar/raw/ledger/{:id}` * `https://api.blockchair.com/stellar/raw/transaction/{:hash}` * `https://api.blockchair.com/stellar/raw/account/{:address}` From 47aa469919dc6f08d64f45f06c08d7f9e2948642 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Sat, 18 Jan 2020 19:29:06 +0300 Subject: [PATCH 100/180] v.2.0.41 --- API_DOCUMENTATION_EN.md | 968 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 950 insertions(+), 18 deletions(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index 544cf9fd..f70a5eec 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,4 +1,4 @@ -# [Blockchair.com](https://blockchair.com/) API v.2.0.39 Documentation +# [Blockchair.com](https://blockchair.com/) API v.2.0.41 Documentation ``` ____ __ __ __ _ @@ -24,14 +24,16 @@ + [Ethereum-like blockchain stats](#link_002) + [Ripple-like blockchain stats](#link_003) + [Stellar-like blockchain stats](#link_004) + + [TON-like blockchain stats](#link_005) + + [Monero-like blockchain stats](#link_006) + [Omni Layer stats](#link_500) + [Wormhole stats](#link_500) + [ERC-20 stats](#link_509) + [Dashboard endpoints](#link_M2) (Retrieve information about various entities in a neat format from our databases) + [Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin, and Bitcoin Testnet](#link_M21) - + [Block](#link_100) - + [Transaction](#link_200) - + [Address and extended public key (xpub)](#link_300) + - [Block](#link_100) + - [Transaction](#link_200) + - [Address and extended public key (xpub)](#link_300) + [Ethereum](#link_M22) - [Block](#link_103) - [Uncle](#link_401) @@ -57,6 +59,14 @@ - [Ledger](#link_107) - [Transaction](#link_208) - [Account](#link_304) + - [Telegram Open Network](#link_M35) + - [Ledger](#link_108) + - [Transaction](#link_209) + - [Account](#link_305) + - [Monero](#link_M36) + - [Block](#link_109) + - [Transaction](#link_210) + - [Outputs](#link_306) + [Infinitable endpoints](#link_05) (SQL-like queries: filter, sort, and aggregate blockchain data) + [Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin, and Bitcoin Testnet](#link_M41) + [Blocks](#link_102) (table) @@ -85,7 +95,7 @@ # Introduction -Blockchair API provides developers with access to data contained in [10 different blockchains](#link_M01). Unlike other APIs, Blockchair also support numerous analytical queries like filtering, sorting, and aggregating blockchain data. +Blockchair API provides developers with access to data contained in [13 different blockchains](#link_M01). Unlike other APIs, Blockchair also supports numerous analytical queries like filtering, sorting, and aggregating blockchain data. Here are some examples of what you can build using our API: @@ -109,14 +119,18 @@ Our API is free to try under some limitations, and we have a variety of premium ## Supported blockchains and second layers -As of today, our API supports **10 blockchains** divided into 4 groups: -* Bitcoin-like blockchains (Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin), also known as UTXO-based blockchains +As of today, our API supports **13 blockchains** (11 mainnets and 2 testnets) divided into 5 groups: +* Bitcoin-like blockchains (Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin, Bitcoin Testnet), also known as UTXO-based blockchains * Ethereum-like blockchains (Ethereum) * Ripple-like blockchains (Ripple) * Stellar-like blockchains (Stellar) +* TON-like blockchains (Telegram Open Network Testnet) +* Monero-like blockchains (Monero) Within a group, there's no or little difference between the set of available endpoints and their output. +Here's the list of available mainnets: + | Blokchain | Group | API path prefix | Support status | |-----------|------|----------|-------------| | Bitcoin | Bitcoin-like | `https://api.blockchair.com/bitcoin` | Full support | @@ -129,12 +143,14 @@ Within a group, there's no or little difference between the set of available end | Ripple | Ripple-like | `https://api.blockchair.com/ripple` | Alpha mode, possible compatibility-breaking changes | | Groestlcoin | Bitcoin-like | `https://api.blockchair.com/groestlcoin` | Full support, community-backed till June 18th, 2020 | | Stellar | Stellar-like | `https://api.blockchair.com/stellar` | Alpha mode, possible compatibility-breaking changes | +| Monero | Monero-like | `https://api.blockchair.com/monero` | Alpha mode, possible compatibility-breaking changes | There are also following testnets supported which are technically considered as separate blockchains: | Blokchain | Group | API path prefix | Support status | |-----------|------|----------|-------------| | Bitcoin Testnet | Bitcoin-like | `https://api.blockchair.com/bitcoin/testnet` | Full support | +| Telegram Open Network Testnet | TON-like | `https://api.blockchair.com/ton/testnet` | Alpha mode, possible compatibility-breaking changes | We aim to support more blockchains (and their testnets) in future to cover as many users as possible. We don't disclose which blockchains we'll add next and how we choose them, but our main markers are daily number of real transactions and market capitalization. If you're representing a coin community which would like to add its blockchain to our platform, we'd be happy to talk. @@ -170,8 +186,10 @@ This is the full list of available API endpoints. - `{:eth_chain}` can be only `ethereum` - `{:xrp_chain}` can be only `ripple` - `{:xlm_chain}` can be only `stellar` +- `{:ton_chain}` can be only `ton/testnet` +- `{:xmr_chain}` can be only `monero` -| API path | Docs | Base request cost | Status | +| Endpoint path | Docs | Base request cost | Status | | ----------------------------------------------- | :----------------: | -----------------------------: | :---------------------------------------------: | | **General stats** | — | — | — | | `https://api.blockchair.com/stats` | [👉](#link_000) | `1` | Stable | @@ -179,6 +197,8 @@ This is the full list of available API endpoints. | `https://api.blockchair.com/{:eth_chain}/stats` | [👉](#link_002) | `1` | Stable | | `https://api.blockchair.com/{:xrp_chain}/stats` | [👉](#link_003) | `1` | Alpha | | `https://api.blockchair.com/{:xlm_chain}/stats` | [👉](#link_004) | `1` | Alpha | +| `https://api.blockchair.com/{:ton_chain}/stats` | [👉](#link_005) | `1` | Alpha | +| `https://api.blockchair.com/{:xmr_chain}/stats` | [👉](#link_006) | `1` | Alpha | | **Block-related information** | — | — | — | | `https://api.blockchair.com/{:btc_chain}/dashboards/block/{:height}₀` | [👉](#link_100) | `1` | Stable | | `https://api.blockchair.com/{:btc_chain}/dashboards/block/{:hash}₀` | [👉](#link_100) | `1` | Stable | @@ -197,6 +217,9 @@ This is the full list of available API endpoints. | `https://api.blockchair.com/{:xrp_chain}/raw/ledger/{:height}₀` | [👉](#link_106) | `1` | Alpha | | `https://api.blockchair.com/{:xrp_chain}/raw/ledger/{:hash}₀` | [👉](#link_106) | `1` | Alpha | | `https://api.blockchair.com/{:xlm_chain}/raw/ledger/{:height}₀` | [👉](#link_107) | `1` | Alpha | +| `https://api.blockchair.com/{:ton_chain}/raw/block/{:tuple}₀` | [👉](#link_108) | `1` | Alpha | +| `https://api.blockchair.com/{:xmr_chain}/raw/block/{:height}₀` | [👉](#link_109) | `1` | Alpha | +| `https://api.blockchair.com/{:xmr_chain}/raw/block/{:hash}₀` | [👉](#link_109) | `1` | Alpha | | **Transaction-related information and actions** | — | — | — | | `https://api.blockchair.com/{:btc_chain}/dashboards/transaction/{:hash}₀` | [👉](#link_200) | `1` | Stable | | `https://api.blockchair.com/{:btc_chain}/dashboards/transactions/{:hash}₀,...,{:hash}ᵩ` | [👉](#link_200) | `1 + 0.1*c` | Stable | @@ -212,6 +235,8 @@ This is the full list of available API endpoints. | `https://api.blockchair.com/{:eth_chain}/mempool/transactions?{:query}` | [👉](#link_206) | `2` | Stable | | `https://api.blockchair.com/{:xrp_chain}/raw/transaction/{:hash}₀` | [👉](#link_207) | `1` | Alpha | | `https://api.blockchair.com/{:xlm_chain}/raw/transaction/{:hash}₀` | [👉](#link_208) | `1` | Alpha | +| `https://api.blockchair.com/{:ton_chain}/raw/transaction/{:tuple}₀` | [👉](#link_209) | `1` | Alpha | +| `https://api.blockchair.com/{:xmr_chain}/raw/transaction/{:hash}₀` | [👉](#link_210) | `1` | Alpha | | **Address-related information** | — | — | — | | `https://api.blockchair.com/{:btc_chain}/dashboards/address/{:address}₀` | [👉](#link_300) | `1` | Stable | | `https://api.blockchair.com/{:btc_chain}/dashboards/addresses/{:address}₀,...,{:address}ᵩ` | [👉](#link_300) | `1 + 0.1*c` | Stable | @@ -220,6 +245,7 @@ This is the full list of available API endpoints. | `https://api.blockchair.com/{:eth_chain}/dashboards/address/{:address}₀` | [👉](#link_302) | `1` | Stable | | `https://api.blockchair.com/{:xrp_chain}/raw/account/{:address}₀` | [👉](#link_303) | `1` | Alpha | | `https://api.blockchair.com/{:xlm_chain}/raw/account/{:address}₀` | [👉](#link_304) | `1` | Alpha | +| `https://api.blockchair.com/{:ton_chain}/raw/account/{:address}₀` | [👉](#link_305) | `1` | Alpha | | **Special entities** | — | — | — | | `https://api.blockchair.com/{:btc_chain}/outputs?{:query}` | [👉](#link_400) | `10` | Beta | | `https://api.blockchair.com/{:btc_chain}/mempool/outputs?{:query}` | [👉](#link_400) | `2` | Beta | @@ -227,6 +253,7 @@ This is the full list of available API endpoints. | `https://api.blockchair.com/{:eth_chain}/dashboards/uncles/{:hash}₀,...,{:hash}ᵩ` | [👉](#link_401) | `1 + 0.1*c` | Stable | | `https://api.blockchair.com/{:eth_chain}/uncles?{:query}` | [👉](#link_402) | `2` | Stable | | `https://api.blockchair.com/{:eth_chain}/calls?{:query}` | [👉](#link_403) | `10` | Stable | +| `https://api.blockchair.com/{:xmr_chain}/outputs?{:query}` | [👉](#link_306) | `1` | Alpha | | **Special second layer protocol endpoints (Omni Layer, Wormhole, ERC-20 tokens)** | — | — | — | | `https://api.blockchair.com/bitcoin/omni/stats` | [👉](#link_500) | `1` | Alpha | | `https://api.blockchair.com/bitcoin/omni/dashboards/property/{:prorerty_id}` | [👉](#link_501) | `1` | Alpha | @@ -260,7 +287,7 @@ Requests to the API should be made through the HTTPS protocol by GET requests to ```bash > curl 'https://api.blockchair.com/bitcoin/blocks?a=sum(generation)' -{"data":[{"sum(generation)":1800957104497237}],"context":{"code":200,"source":"A","time":0.007825851440429688,"limit":10000,"offset":null,"rows":1,"pre_rows":1,"total_rows":1,"state":600767,"cache":{"live":true,"duration":60,"since":"2019-10-23 21:33:00","until":"2019-10-23 21:34:00","time":null},"api":{"version":"2.0.38","last_major_update":"2019-07-19 18:07:19","next_major_update":null,"tested_features":"omni-v.a1,whc-v.a1,aggregate-v.b5,xpub-v.b5,ripple-v.a1,ethgraph-v.a1,erc_20-v.a1","documentation":"https:\/\/github.com\/Blockchair\/Blockchair.Support\/blob\/master\/API.md","notice":"Beginning July 19th, 2019 all applications using Blockchair API on a constant basis should apply for an API key (mailto:info@blockchair.com)"}}} +{"data":[{"sum(generation)":1800957104497237}],"context":{"code":200,"source":"A","time":0.007825851440429688,"limit":10000,"offset":null,"rows":1,"pre_rows":1,"total_rows":1,"state":600767,"cache":{"live":true,"duration":60,"since":"2019-10-23 21:33:00","until":"2019-10-23 21:34:00","time":null},"api":{"version":"2.0.38","last_major_update":"2019-07-19 18:07:19","next_major_update":null,"documentation":"https:\/\/github.com\/Blockchair\/Blockchair.Support\/blob\/master\/API.md","notice":"Beginning July 19th, 2019 all applications using Blockchair API on a constant basis should apply for an API key (mailto:info@blockchair.com)"}}} ``` Here are some considerations: @@ -283,7 +310,7 @@ API returns JSON-encoded data. Typically, the response is an array consisting of * `200` if the request succeeded * `400` if there is a user error in the request * `404` for some endpoints in case there's no results (this behavior is deprecated), also if you're requesting non-existing endpoint - * `402`, `429`, or `435` if any limit on the number or complexity of requests is exceeded (see [the list of limits](#link_M05), and please [contact us](#link_M05) if you'd like to increase them) + * `402`, `429`, `435`, `436`, or `437` if any limit on the number or complexity of requests is exceeded (see [the list of limits](#link_M05), and please [contact us](#link_M05) if you'd like to increase them) — your IP address will be unblocked automatically after some time * `430`, `434`, or `503` if your IP address is temporarily blocked * `500` or `503` in case of a server error (it makes sense to wait and repeat the same request or open a ticket at https://github.com/Blockchair/Blockchair.Support/issues/new or write to ) * `context.error` — error description in the case there's an error @@ -398,7 +425,7 @@ If you require data on just one blockchain, please use `https://api.blockchair.c **Output:** -`data` contains an array with stats on all 9 blockchains we support at once: +`data` contains an array with stats on 11 blockchains we support at once: - Bitcoin - Bitcoin Cash @@ -409,8 +436,10 @@ If you require data on just one blockchain, please use `https://api.blockchair.c - Dash - Ripple - Groestlcoin +- Stellar +- Telegram Open Network Testnet -Note that Bitcoin Testnet stats are not included in this output. +Note that Bitcoin Testnet stats are not included in this output, and TON Testnet will be changed to TON Mainnet as soon as it's launched. Description of the fields is available in the next three sections of documentation. @@ -474,6 +503,18 @@ Description of the fields is available in the next three sections of documentati "blocks": 2801282, ... } + }, + "stellar": { + "data": { + "ledgers": 26968006, + ... + } + }, + "ton": { + "data": { + "blocks": 475753, + ... + } } }, "context": { @@ -831,7 +872,194 @@ Always `1`. +## Stellar-like blockchain stats + +**Endpoint:** + +- `https://api.blockchair.com/stellar/stats` + +**Output:** + +`data` contains an array with blockchain statistics: + +- `ledgers` — total number of ledgers +- `circulation` — number of coins in circulation (in stroops) +- `best_ledger_height` — the latest ledger number +- `best_ledger_hash` — the latest ledger hash +- `best_ledger_time` — the latest ledger time +- `ledgers_24h` — number of ledgers closed over the last 24 hours +- `transactions_24h` — number of transactions confirmed over the last 24 hours +- `successful_transactions_24h`— number of successful transactions over the last 24 hours +- `failed_transactions_24h`— number of failed transactions over the last 24 hours +- `operations_24h` — number of operations over the last 24 hours +- `average_transaction_fee_24h` — average transaction fee over the last 24 hours +- `average_transaction_fee_usd_24h` — the same in USD +- `market_price_usd` — average market price of 1 coin in USD (market data source: CoinGecko) +- `market_price_btc` — average market price of 1 coin in BTC (for Bitcoin it always returns 1) +- `market_price_usd_change_24h_percentage` — market price change in percent for 24 hours +- `market_cap_usd` — market capitalization (coins in circulation * price per coin in USD) +- `market_dominance_percentage` — dominance index (how much % of the total cryptocurrency market is the market capitalization of the coin) +- `countdowns` (optional) — an optional array of events ([`event`, `time_left`] format), where `time_left` is the number of seconds till the `event` + +**Example output:** + +`https://api.blockchair.com/stellar/stats`: + +```json +{ + "data": { + "ledgers": 26602978, + "best_ledger_height": 26602978, + "best_ledger_hash": "3151f16e9a6ce9ee43f57a068c83a04c7e864ccc7d1027519d42aab79e13b40f", + "best_ledger_time": "2019-11-02 16:42:01", + "circulation": 1054439020873472900, + "ledgers_24h": 15643, + "transactions_24h": 461072, + "successful_transactions_24h": 285958, + "failed_transactions_24h": 175114, + "operations_24h": 1085466, + "average_transaction_fee_24h": 283.5731513695005, + "average_transaction_fee_usd_24h": 0.000001991250668916633, + "market_price_usd": 0.07022, + "market_price_btc": 0.0000075229454120425, + "market_price_usd_change_24h_percentage": 3.41847, + "market_cap_usd": 1406714595, + "market_dominance_percentage": 0.56 + }, + "context": { + "code": 200, + "results": 1, + "state": 26602978, + ... + } +} +``` + +**Request cost formula:** + +Always `1`. + +**Explore visualization on our front-end:** + +- https://blockchair.com/stellar + + + +## TON-like blockchain stats + +**Endpoint:** + +- `https://api.blockchair.com/ton/testnet/stats` + +**Output:** + +`data` contains an array with blockchain statistics: + +- `blocks` — total number of blocks +- `best_block_height` — the latest block number in the default workchain +- `best_block_file_hash` — its filehash… +- `best_block_root_hash` — … roothash… +- `best_block_time` — … and timestamp +- `fist_block_time` — timestamp of the first block (when the current testnet was launched) +- `blocks_24h` — an approximate (!) number of blocks over the last 24 hours +- `transactions_24h` — an approximate (!) number of transactions over the last 24 hours + +**Example output:** + +`https://api.blockchair.com/ton/testnet/stats`: + +```json +{ + "data": { + "blocks": 475780, + "best_block_height": 475780, + "best_block_file_hash": "106BF11CFA87F20CF3310F200024D98344B3EC318803734857A5C5AEBF037E53", + "best_block_root_hash": "6A6B38C7A29315545271CA0C6FB1F04FB8DB6950EA24CEB3F81C86229FE7F370", + "best_block_time": "2019-12-03 18:36:55", + "first_block_time": "2019-11-15 12:53:05", + "blocks_24h": 26000, + "transactions_24h": 130000 + }, + ... +} +``` + +**Request cost formula:** + +Always `1`. + +**Explore visualization on our front-end:** + +- https://blockchair.com/ton + + + +## Monero-like blockchain stats + +**Endpoint:** + +* `https://api.blockchair.com/monero/stats` + +**Output:** + +`data` contains an array with blockchain statistics: + +* `blocks` — total number of blocks (note that it's 1 more than the latest block number as there is block #0) +* `transactions` — total number of transactions +* `circulation` — number of coins in circulation (in satoshi) +* `blockchain_size` — total size of all blocks in bytes (note: it's not the size of a full node, it's just bare blocks; nodes are bigger in size as they use database indexing, etc) +* `difficulty` — current mining difficulty +* `best_block_height` — the latest block height +* `best_block_hash` — the latest block hash +* `best_block_time` — the latest block time +* `mempool_transactions` — number of transactions in the mempool +* `mempool_size` — mempool size in bytes +* `market_price_usd` — average market price of 1 coin in USD (market data source: CoinGecko) +* `market_price_btc` — average market price of 1 coin in BTC (for Bitcoin it always returns 1) +* `market_price_usd_change_24h_percentage` — market price change in percent for 24 hours +* `market_cap_usd` — market capitalization (coins in circulation * price per coin in USD) +* `market_dominance_percentage` — dominance index (how much % of the total cryptocurrency market is the market capitalization of the coin) +* `countdowns` (optional) — an optional array of events ([`event`, `time_left`] format), where `time_left` is the number of seconds till the `event` +* `suggested_transaction_fee_per_byte_sat` — suggests a proper transaction fee in satoshi per byte based on the latest block + +**Example output:** + +`https://api.blockchair.com/stellar/stats`: + +```json +{ + "data": { + "blocks": 2012711, + "transactions": 6147319, + "circulation": 17402679371662576000, + "difficulty": 127374112357, + "hashrate_24h": 1061450936, + "mempool_transactions": 140, + "mempool_size": 681994000, + "best_block_height": 2012710, + "best_block_hash": "3cfcac0ccd9e058f56158686fd4d7258351071e113feac9c1b10da65ce62cce5", + "best_block_time": "2020-01-16 20:42:47", + "suggested_transaction_fee_per_byte_sat": 13, + "market_price_usd": 79.36, + "market_price_btc": 0.0079091090293004, + "market_price_usd_change_24h_percentage": -0.96449, + "market_cap_usd": 1362957367, + "market_dominance_percentage": 0.52 + }, + "context": { + "code": 200, + ... + } +} +``` + +**Request cost formula:** + +Always `1`. + +**Explore visualizations on our front-end:** +- https://blockchair.com/monero @@ -2808,7 +3036,7 @@ Always `1`. -## Dashboard endpoints for Ethereum +## Raw data endpoints for Ethereum @@ -2954,7 +3182,7 @@ Always `1`. -## Dashboard endpoints for Ripple +## Raw data endpoints for Ripple @@ -3395,7 +3623,7 @@ Always `1`. -## Dashboard endpoints for Stellar +## Raw data endpoints for Stellar @@ -3715,6 +3943,710 @@ If there's no `{:account}ᵢ` has been found on the blockchain, returns an empty +## Raw data endpoints for Telegram Open Network + + + +### Raw block data + +Returns raw block data directly from our back end. Please note that as the TON network is highly unstable at the moment, we don't really provide anyone with any guarantees, and the documentation is limited for this section as many things can change very fast. + +**Endpoint:** + +- `https://api.blockchair.com/{:ton_chain}/raw/block/{:tuple}₀` + +**Where:** + +- `{:ton_chain}` can only be `ton/testnet` +- `{:tuple}ᵢ` is either a block number, or a tuple; possible formats are: + - `id` (e.g. `123456`), this will return info on the block no. 123456 in the default workchain (`-1`) and in the default shard (`8000000000000000`) + - `(workchain, shard, id)` tuple + - `(workchain, shard, id, roothash, filehash)` tuple + +**Output:** + +`data` contains an associative array: + +- `data.{:tuple}ᵢ.block` — block data. We don't provide field descriptions at the moment as they can change at any time. Most of the key names are self-explanatory. + +**Example requests:** + +- `https://api.blockchair.com/ton/testnet/raw/block/357290` +- `https://api.blockchair.com/ton/testnet/raw/block/(357290)` +- `https://api.blockchair.com/ton/testnet/raw/block/(-1,8000000000000000,357290)` +- `https://api.blockchair.com/ton/testnet/raw/block/(-1,8000000000000000,357290,69179AE3C3B5D3A007B397FD2774F4CCA7A43FC467B701469CC6081B55A72239,8645D68C3655493DB1F8B9AB7CFAC5602672012CC8419BF61EF365A7127C78CD)` + +Please note that some of these requests may stop working if the testnet gets reset. + +**Example output:** + +`https://api.blockchair.com/ton/testnet/raw/block/357290`: + +```json +{ + "data": { + "357290": { + "block": { + "end_lt": 483827000004, + "filehash": "8645D68C3655493DB1F8B9AB7CFAC5602672012CC8419BF61EF365A7127C78CD", + "global_id": -239, + "prev_block_info": { + "end_lt": 483825000004, + "filehash": "0x5f8a4eed5c77a717874544292269ada101535cac362ce347f85bea5a441403ef", + "roothash": "0xf8990cf733bad398761ee3337a731cd063a3825a5c21337cfe03a9ebb902bcb0", + "seqno": 357289 + }, + "roothash": "69179AE3C3B5D3A007B397FD2774F4CCA7A43FC467B701469CC6081B55A72239", + "seqno": 357290, + "shard": "8000000000000000", + "shards": [ + { + "filehash": "ECCEDDA9623423B55C711D73A5D33729BB7752AFA5EF5150F9EBF66180B37BED", + "roothash": "5DFABF07E43B23102C316FE2FD761495C511CEEF02805A64E0D50DD72D8BF5DF", + "seqno": 450944, + "shard": "2000000000000000", + "workchain": 0 + }, + { + "filehash": "F7BCEA34AB619443B8401A560F6CC5081B8402600CFE0E21AC97BF3CDD7C2FEB", + "roothash": "1E9C27FA21865B468B131949DF45A7E6BB3CFA206392DDC9BD1EDD825A371B30", + "seqno": 451222, + "shard": "6000000000000000", + "workchain": 0 + }, + { + "filehash": "A5E716AEC2CAC1F02E4C1624179D6A1D32A387E8D189FC77C9E923CDD4BE82F7", + "roothash": "E5FA8F81395ECFC6DA85A81052DCB5BF2E005FFECE693C8E54B45AAD5A594630", + "seqno": 451025, + "shard": "a000000000000000", + "workchain": 0 + }, + { + "filehash": "64307A2B7EC58A85E53F677FC066E577B8A8DF8E4CC8DB8580690939C2BDB846", + "roothash": "BA040777090B248B54B334ADA1A0A499822C8E7F5EBDA411DE5DDE9290AC75CB", + "seqno": 451462, + "shard": "e000000000000000", + "workchain": 0 + } + ], + "start_lt": 483827000000, + "time": "2019-11-29 00:27:17", + "transactions": [ + { + "hash": "045740A8D2400EEBFB6EBB9BDB1EE23AB2EBC0693B718C0AF0E04A3498A2934A", + "lt": 483827000001, + "userfriendly_address": "Ef8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM0vF" + }, + { + "hash": "4533BD6576FD34204B7A6DFB2576FDF3BB395917BC8C17A3208F292CDACE34BC", + "lt": 483827000002, + "userfriendly_address": "Ef8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM0vF" + }, + { + "hash": "6F7A37CF43604381C35153CA07E49140AE33C0A8AB3747439508A64E034F1858", + "lt": 483827000001, + "userfriendly_address": "Ef80UXx731GHxVr0-LYf3DIViMerdo3uJLAG3ykQZFjXz2kW" + }, + { + "hash": "7B4876DB8EA7DF3E06D34DAF287B8D94728CC125A8F7C915911A831EA1C86FCD", + "lt": 483827000003, + "userfriendly_address": "Ef80UXx731GHxVr0-LYf3DIViMerdo3uJLAG3ykQZFjXz2kW" + }, + { + "hash": "70E5BA410D9CCFDA457442661CCED8B42B0587158E130C85D7EC4BBA9335FFCC", + "lt": 483827000003, + "userfriendly_address": "Ef9VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVbxn" + } + ], + "value_flow": { + "created": { + "nanograms": 1700000000 + }, + "exported": { + "nanograms": 0 + }, + "fees_collected": { + "nanograms": 2950000000 + }, + "fees_imported": { + "nanograms": 1250000000 + }, + "from_prev_blk": { + "nanograms": 4990184927132822000 + }, + "imported": { + "nanograms": 0 + }, + "minted": { + "nanograms": 0 + }, + "recovered": { + "nanograms": 2950000000 + }, + "to_next_blk": { + "nanograms": 4990184930082821000 + } + }, + "workchain_id": -1 + } + } + }, + "context": { + "results": 1, + "state": 475783, + ... + } +} +``` + +**Request cost formula:** + +Always `1`. + +**Explore visualization on our front-end:** + +- https://blockchair.com/ton/block/357290 + + + +### Raw transaction data + +Returns raw transaction data directly from our back end. Please note that as the TON network is highly unstable at the moment, we don't really provide anyone with any guarantees, and the documentation is limited for this section as many things can change very fast. + +**Endpoint:** + +- `https://api.blockchair.com/{:ton_chain}/raw/transaction/{:tuple}₀` + +**Where:** + +- `{:ton_chain}` can only be `ton/testnet` +- `{:tuple}ᵢ` is a tuple in the following format: `(account, logical time, transaction hash)`, where `account` can be in two different formats (see the examples) + +**Output:** + +`data` contains an associative array: + +- `data.{:tuple}ᵢ.transaction` — transaction data. We don't provide field descriptions at the moment as they can change at any time. Most of the key names are self-explanatory. + +**Example requests:** + +- `https://api.blockchair.com/ton/testnet/raw/transaction/(Ef8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM0vF,483716000001,809A932E2AD8C307A5E69B427762AA1BE0EC57D9A246A7CE4E7D4CE49F00C4AE)` +- `https://api.blockchair.com/ton/testnet/raw/transaction/(0x3333333333333333333333333333333333333333333333333333333333333333,483716000001,809A932E2AD8C307A5E69B427762AA1BE0EC57D9A246A7CE4E7D4CE49F00C4AE)` + +Please note that some of these requests may stop working if the testnet gets reset. + +**Example output:** + +`https://api.blockchair.com/ton/testnet/raw/transaction/(Ef8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM0vF,483716000001,809A932E2AD8C307A5E69B427762AA1BE0EC57D9A246A7CE4E7D4CE49F00C4AE)`: + +```json +{ + "data": { + "(Ef8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM0vF,483716000001,809A932E2AD8C307A5E69B427762AA1BE0EC57D9A246A7CE4E7D4CE49F00C4AE)": { + "transaction": { + "account": "Ef8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM0vF", + "block": { + "filehash": "B3F4BA8B1C2FDC10F5F04C43B0FB226585E1F0EE170290DD3FC331D95DF5D9B2", + "roothash": "826176479B470808ED6CA721559000DF5E90602E05B5E7A8DBA7994A1C143AEB", + "seqno": 357220, + "shard": "8000000000000000", + "workchain": -1 + }, + "end_status": "acc_state_active", + "lt": 483716000001, + "orig_status": "acc_state_active", + "prev_transaction_hash": "0xc7ab8c6aea7f14c949ccb16230b9d18f12424fcceb9055e1775fc4f654f9b13b", + "prev_transaction_lt": 483714000002, + "raw_account": "0x3333333333333333333333333333333333333333333333333333333333333333", + "state_update": { + "new_hash": "0xfe41f7e87cd0b5df7ce677b4ba8d0939316c8a2968fa7c532d073e131969a60e", + "old_hash": "0x27906825005713fcec1602b4f16d16e29c38aac18623f80d256e177680d72af4" + }, + "time": "2019-11-29 00:22:55", + "total_fee": 0, + "tx_hash": "809A932E2AD8C307A5E69B427762AA1BE0EC57D9A246A7CE4E7D4CE49F00C4AE" + } + } + }, + "context": { + "results": 1, + "state": 475783, + ... + } +} +``` + +**Request cost formula:** + +Always `1`. + +**Explore visualization on our front-end:** + +- https://blockchair.com/ton/transaction/(Ef8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM0vF,483716000001,809A932E2AD8C307A5E69B427762AA1BE0EC57D9A246A7CE4E7D4CE49F00C4AE) + + + +### Raw account data + +Returns raw account data directly from our back end. Please note that as the TON network is highly unstable at the moment, we don't really provide anyone with any guarantees, and the documentation is limited for this section as many things can change very fast. + +**Endpoint:** + +- `https://api.blockchair.com/{:ton_chain}/raw/account/{:address}₀` + +**Where:** + +- `{:ton_chain}` can only be `ton/testnet` +- `{:address}ᵢ` can be an address in two different formats (hex or "user-friendly", see the examples below) + +**Output:** + +`data` contains an associative array: + +- `data.{:tuple}ᵢ.account` — account data. We don't provide field descriptions at the moment as they can change at any time. Most of the key names are self-explanatory. + +**Example requests:** + +- `https://api.blockchair.com/ton/testnet/raw/account/Ef8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM0vF` +- `https://api.blockchair.com/ton/testnet/raw/account/0x3333333333333333333333333333333333333333333333333333333333333333` + +Please note that some of these requests may stop working if the testnet gets reset. + +**Example output:** + +`https://api.blockchair.com/ton/testnet/raw/account/Ef8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM0vF`: + +```json +{ + "data": { + "Ef8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM0vF": { + "account": { + "address": { + "last_trans_hash": "8CC5546C7D770ECF0A0538B5A477D034403A7004124E00A7EE674CFF8ED0CFB8", + "last_trans_lt": 658854000002, + "raw_address": "0x3333333333333333333333333333333333333333333333333333333333333333", + "userfrienly_address": "Ef8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM0vF", + "workchain_id": -1 + }, + "balances": { + "nanograms": 2086443035892730 + }, + "storage_stat": { + "bits": 74434, + "cells": 228, + "due_payment": null, + "last_paid": 0, + "public_cells": 0 + } + } + } + }, + "context": { + "results": 1, + "state": 475783, + ... + } +} +``` + +**Request cost formula:** + +Always `1`. + +**Explore visualization on our front-end:** + +- https://blockchair.com/ton/account/Ef8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM0vF + + + +## Raw data endpoints for Monero + + + +### Raw block data + +Returns raw block data from our `onion-monero-blockchain-explorer` instance. See https://github.com/moneroexamples/onion-monero-blockchain-explorer/blob/master/README.md for field descriptions (`api/block/` section), but mostly they are self-describing. + +**Endpoints:** + +- `https://api.blockchair.com/{:xmr_chain}/raw/block/{:height}₀` +- `https://api.blockchair.com/{:xmr_chain}/raw/block/{:hash}₀` + +**Where:** + +- `{:xmr_chain}` can be only `monero` +- `{:height}ᵢ` is the block height (integer value), also known as block id +- `{:hash}ᵢ` is the block hash (regex: `/^[0-9a-f]{64}$/i`) + +**Output:** + +`data` contains an associative array: + +- `data.{:id}ᵢ.block` — block data. We don't provide field descriptions at the moment as they can change at any time. Most of the key names are self-explanatory. + +**Example requests:** + +- `https://api.blockchair.com/monero/raw/block/1234567` +- `https://api.blockchair.com/monero/raw/block/f093439d0dd48010a22fdb615a659e22738a10991871b5dc2335efa69008a8cd` + +**Example output:** + +`https://api.blockchair.com/monero/raw/block/1234567`: + +```json +{ + "data": { + "1234567": { + "block": { + "block_height": 1234567, + "current_height": 2014051, + "hash": "f093439d0dd48010a22fdb615a659e22738a10991871b5dc2335efa69008a8cd", + "size": 51507, + "timestamp": 1485715365, + "timestamp_utc": "2017-01-29 18:42:45", + "txs": [ + { + "coinbase": true, + "extra": "0125abf5f7f41eeae08c49b48ec8dffcd7aff78d87e808508e3b073105582fd1b6020800000001e75bdb47", + "mixin": 0, + "payment_id": "", + "payment_id8": "", + "rct_type": 0, + "tx_fee": 0, + "tx_hash": "09d132f2c90d0f6726cf7dbbce83114a1e650a098c1e9cf3fc6773bba02c5e13", + "tx_size": 95, + "tx_version": 2, + "xmr_inputs": 0, + "xmr_outputs": 8864856845578 + }, + { + "coinbase": false, + "extra": "018a462e859627da64801ab1a4122717451a4e4f7ab917fcd746c62dd0eeceeba2", + "mixin": 3, + "payment_id": "", + "payment_id8": "", + "rct_type": 2, + "tx_fee": 66692772936, + "tx_hash": "467f1914b3f5f4eb52dda02bfd0b70b89722b88063f40889bfba46d3ec78de80", + "tx_size": 38479, + "tx_version": 2, + "xmr_inputs": 0, + "xmr_outputs": 0 + }, + { + "coinbase": false, + "extra": "01445566c1696160cd602ad2fe7805b12d0efbd2866be04ee8d1c1c00cce399cfe020901cd644f0fe978dc0c", + "mixin": 3, + "payment_id": "", + "payment_id8": "cd644f0fe978dc0c", + "rct_type": 1, + "tx_fee": 22815948636, + "tx_hash": "5eb59639478898cf227cd89aa95303cfb8d392e1151047728a57ec16dc4c1a7e", + "tx_size": 12933, + "tx_version": 2, + "xmr_inputs": 0, + "xmr_outputs": 0 + } + ] + } + } + }, + "context": { + "code": 200, + "results": 1, + "state": 2014050, + ... + } +} +``` + +**Request cost formula:** + +Always `1`. + +**Explore visualization on our front-end:** + +- https://blockchair.com/monero/block/1234567 + + + +### Raw transaction data + +Returns raw block data from our `onion-monero-blockchain-explorer` instance. See https://github.com/moneroexamples/onion-monero-blockchain-explorer/blob/master/README.md for field descriptions (`api/transaction/` section), but mostly they are self-describing. + +**Endpoint:** + +- `https://api.blockchair.com/{:xmr_chain}/raw/transaction/{:hash}₀` + +**Where:** + +- `{:xmr_chain}` can only be `monero` +- `{:hash}ᵢ` is the transaction hash (regex: `/^[0-9a-f]{64}$/i`) + +**Output:** + +`data` contains an associative array: + +- `data.{:hash}ᵢ.transaction` — transaction data + +**Example requests:** + +- `https://api.blockchair.com/monero/raw/transaction/467f1914b3f5f4eb52dda02bfd0b70b89722b88063f40889bfba46d3ec78de80` + +**Example output:** + +`https://api.blockchair.com/monero/raw/transaction/467f1914b3f5f4eb52dda02bfd0b70b89722b88063f40889bfba46d3ec78de80`: + +```json +{ + "data": { + "467f1914b3f5f4eb52dda02bfd0b70b89722b88063f40889bfba46d3ec78de80": { + "transaction": { + "block_height": 1234567, + "coinbase": false, + "confirmations": 779488, + "current_height": 2014055, + "extra": "018a462e859627da64801ab1a4122717451a4e4f7ab917fcd746c62dd0eeceeba2", + "inputs": [ + { + "amount": 0, + "key_image": "03f3a29dd840d08654755771d36c8d39268d215d78214a8f29ac19a98116efe8", + "mixins": [ + { + "block_no": 1230415, + "public_key": "10f4d46bf0bb09fa9ad4208ddbb8fd5fcfa2fb2d964731a5e04071a93288ae5c" + }, + { + "block_no": 1231535, + "public_key": "d7b6f7c37564f647ad33cac3447727b62231d41cd80fd09c6f596a99f97b25e1" + }, + { + "block_no": 1234337, + "public_key": "c4766978af804c3581818a5b8aae54bfb5b7fde8a9482dccf2c75786d7aa0ed6" + } + ] + }, + { + "amount": 0, + "key_image": "661d4484ebc15f7d5d9122c29f282e9b2b3b119ffe71a49440fc3cf0bbc0c642", + "mixins": [ + { + "block_no": 1226106, + "public_key": "5a532e0677a862660fdd9af0f177b83e67d99bf38535f778b107f02c101dabb7" + }, + { + "block_no": 1226709, + "public_key": "6497da459ce91f78461e81c20ca3148e273576bc9008908cb369c9440db251de" + }, + { + "block_no": 1231101, + "public_key": "e907bd174dc7b20ab811c1b99e4fa58990146e242d7d4702c5443e1dc421255f" + } + ] + } + ], + "mixin": 3, + "outputs": [ + { + "amount": 0, + "public_key": "dfce36cfd52cd63ba2c950bd71e0523fee57cb4ddf9e54bc2ceebd8e37597f4a" + }, + { + "amount": 0, + "public_key": "613f4849f2bd27f28b6d85a01cef421dfadd491b9f1b4956e625ddeadefacc1a" + }, + { + "amount": 0, + "public_key": "c0ba1f794159dbd9a35a7118f35f1c3ba8c1d09c2fe51655a32071a966560e62" + }, + { + "amount": 0, + "public_key": "967e2ae67aa85fbd1dc6f2937bf87f70328cf8fb3df8b7d3041768adbf782595" + }, + { + "amount": 0, + "public_key": "977c64e40fd8bc436f4962ad89ed2374a88d766408e18d36f984955212c4344f" + }, + { + "amount": 0, + "public_key": "e796f069bbf7d25b422d384ca08dd9a9d83c7592aa827914c9cba9724111afe3" + } + ], + "payment_id": "", + "payment_id8": "", + "rct_type": 2, + "timestamp": 1485715365, + "timestamp_utc": "2017-01-29 18:42:45", + "tx_fee": 66692772936, + "tx_hash": "467f1914b3f5f4eb52dda02bfd0b70b89722b88063f40889bfba46d3ec78de80", + "tx_size": 38479, + "tx_version": 2, + "xmr_inputs": 0, + "xmr_outputs": 0 + } + } + }, + "context": { + "code": 200 + "results": 1, + "state": 2014050, + ... + } +} +``` + +**Request cost formula:** + +Always `1`. + +**Explore visualization on our front-end:** + +- https://blockchair.com/monero/transaction/467f1914b3f5f4eb52dda02bfd0b70b89722b88063f40889bfba46d3ec78de80 + + + +### Raw outputs + +Returns raw block data from our `onion-monero-blockchain-explorer` instance. See https://github.com/moneroexamples/onion-monero-blockchain-explorer/blob/master/README.md for field descriptions (`api/outputs?txhash=&address=&viewkey=&txprove=<0|1>` section), but mostly they are self-describing. + +**Endpoint:** + +- `https://api.blockchair.com/{:xmr_chain}/raw/outputs?{:query}` + +**Where:** + +- `{:xmr_chain}` can only be `monero` +- `{:query}` is the query string: + - `txprove=0` checks which outputs belong to given address and corresponding viewkey + - `txprove=1` proves the sender sent funds + - `address` is the address + - `viewkey` is the viewkey + +**Output:** + +`data` contains an associative array: + +- `data.outputs` — the list of outputs + +**Example requests:** + +- `https://api.blockchair.com/monero/raw/outputs?txhash=8e6a144dee7537a38e87f30e7c1f2bc1a35e5ef8b5032dfa7cf89a2df3073c41&address=44AFFq5kSiGBoZ4NMDwYtN18obc8AemS33DBLWs3H7otXft3XjrpDtQGv7SqSsaBYBb98uNbr2VBBEt7f2wfn3RVGQBEP3A&viewkey=f359631075708155cc3d92a32b75a7d02a5dcf27756707b47a2b31b21c389501&txprove=0` +- `https://api.blockchair.com/monero/raw/outputs?txhash=8e6a144dee7537a38e87f30e7c1f2bc1a35e5ef8b5032dfa7cf89a2df3073c41&address=44AFFq5kSiGBoZ4NMDwYtN18obc8AemS33DBLWs3H7otXft3XjrpDtQGv7SqSsaBYBb98uNbr2VBBEt7f2wfn3RVGQBEP3A&viewkey=f359631075708155cc3d92a32b75a7d02a5dcf27756707b47a2b31b21c389501&txprove=1` + +**Example responses:** + +`https://api.blockchair.com/monero/raw/outputs?txhash=8e6a144dee7537a38e87f30e7c1f2bc1a35e5ef8b5032dfa7cf89a2df3073c41&address=44AFFq5kSiGBoZ4NMDwYtN18obc8AemS33DBLWs3H7otXft3XjrpDtQGv7SqSsaBYBb98uNbr2VBBEt7f2wfn3RVGQBEP3A&viewkey=f359631075708155cc3d92a32b75a7d02a5dcf27756707b47a2b31b21c389501&txprove=0`: + +```json +{ + "data": { + "address": "42f18fc61586554095b0799b5c4b6f00cdeb26a93b20540d366932c6001617b75db35109fbba7d5f275fef4b9c49e0cc1c84b219ec6ff652fda54f89f7f63c88", + "outputs": [ + { + "amount": 800000000000, + "match": false, + "output_idx": 0, + "output_pubkey": "2b0d6d7573895be2fccb06bf83099a4dddf3f73656f18e2b96eab997571a640d" + }, + { + "amount": 1000000000000, + "match": false, + "output_idx": 1, + "output_pubkey": "543c158062f43c11ac16ff90dea61728a41410ffeccea4cea65a6ba6fb83ccab" + }, + { + "amount": 10000000000000, + "match": true, + "output_idx": 2, + "output_pubkey": "122b7ba237e82ca95d620f286761b8f8102fa346df8d982c6fe48003d3939c60" + }, + { + "amount": 10000000000000, + "match": false, + "output_idx": 3, + "output_pubkey": "7ba5f4dc9acf62c6bca171ac8e81f7757050a480bbe20f2d1836086aa23f004f" + }, + { + "amount": 300000000000000, + "match": true, + "output_idx": 4, + "output_pubkey": "597a3bd3e7a7007fb2bb11cd734731e388ee95f436f6aa07d0d7afe927b7faad" + } + ], + "tx_hash": "8e6a144dee7537a38e87f30e7c1f2bc1a35e5ef8b5032dfa7cf89a2df3073c41", + "tx_prove": false, + "viewkey": "f359631075708155cc3d92a32b75a7d02a5dcf27756707b47a2b31b21c389501" + }, + "context": { + "code": 200, + "results": 1, + "state": 2014050, + ... + } +} +``` + +`https://api.blockchair.com/monero/raw/outputs?txhash=8e6a144dee7537a38e87f30e7c1f2bc1a35e5ef8b5032dfa7cf89a2df3073c41&address=44AFFq5kSiGBoZ4NMDwYtN18obc8AemS33DBLWs3H7otXft3XjrpDtQGv7SqSsaBYBb98uNbr2VBBEt7f2wfn3RVGQBEP3A&viewkey=f359631075708155cc3d92a32b75a7d02a5dcf27756707b47a2b31b21c389501&txprove=1`: + +```json +{ + "data": { + "address": "42f18fc61586554095b0799b5c4b6f00cdeb26a93b20540d366932c6001617b75db35109fbba7d5f275fef4b9c49e0cc1c84b219ec6ff652fda54f89f7f63c88", + "outputs": [ + { + "amount": 800000000000, + "match": false, + "output_idx": 0, + "output_pubkey": "2b0d6d7573895be2fccb06bf83099a4dddf3f73656f18e2b96eab997571a640d" + }, + { + "amount": 1000000000000, + "match": false, + "output_idx": 1, + "output_pubkey": "543c158062f43c11ac16ff90dea61728a41410ffeccea4cea65a6ba6fb83ccab" + }, + { + "amount": 10000000000000, + "match": false, + "output_idx": 2, + "output_pubkey": "122b7ba237e82ca95d620f286761b8f8102fa346df8d982c6fe48003d3939c60" + }, + { + "amount": 10000000000000, + "match": false, + "output_idx": 3, + "output_pubkey": "7ba5f4dc9acf62c6bca171ac8e81f7757050a480bbe20f2d1836086aa23f004f" + }, + { + "amount": 300000000000000, + "match": false, + "output_idx": 4, + "output_pubkey": "597a3bd3e7a7007fb2bb11cd734731e388ee95f436f6aa07d0d7afe927b7faad" + } + ], + "tx_hash": "8e6a144dee7537a38e87f30e7c1f2bc1a35e5ef8b5032dfa7cf89a2df3073c41", + "tx_prove": true, + "viewkey": "f359631075708155cc3d92a32b75a7d02a5dcf27756707b47a2b31b21c389501" + }, + "context": { + "code": 200, + "results": 1, + "state": 2014050, + ... + } +} +``` + +**Request cost formula:** + +Always `1`. + +**Explore visualization on our front-end:** + +- https://blockchair.com/monero/transaction/8e6a144dee7537a38e87f30e7c1f2bc1a35e5ef8b5032dfa7cf89a2df3073c41 (enter the address and the viewkey) + + + # Infinitable endpoints (SQL-like queries) These endpoints allow you to filter, sort, and aggregate blockchain data. The output is database rows. Unlike dashboard and raw endpoints, all infinitable endpoints listed in this section can be considered as just one endpoint as it has the same options and the same output structure across different blockchains and entities. Here it is: `https://api.blockchair.com/{:table}{:query}`. @@ -5366,7 +6298,7 @@ Broadcast a transaction to the network **Endpoint:** -- `https://api.blockchair.com/{:chain}/push/transaction` (`POST`request) +- `https://api.blockchair.com/{:chain}/push/transaction` (`POST` request) **Where:** @@ -5397,9 +6329,9 @@ Example of a response to an invalid transaction: { "data": null, "context": { - "code": 400, + "code": 400, "error": "Invalid transaction" - ... + ... } } ``` From 5123cb17eca22a88ae6b0af241ee6fdab93244da Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Mon, 20 Jan 2020 20:01:01 +0300 Subject: [PATCH 101/180] v.2.0.42 --- API.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/API.md b/API.md index 394d0121..b02bfe03 100644 --- a/API.md +++ b/API.md @@ -3,7 +3,7 @@ Logo ### API v.2 documentation -* English: [https://blockchair.com/api/docs](https://blockchair.com/api/docs) (up to v.2.0.41) +* English: [https://blockchair.com/api/docs](https://blockchair.com/api/docs) (up to v.2.0.42) ### Please apply for an API key first @@ -26,6 +26,8 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.42 - January 20th, 2020 + * New endpoint to query the range of available blocks in blockchains we support: `https://api.blockchair.com/range`. Note that at this moment we don't store full historical data for Ripple and Stellar, so this endpoint is useful when you need to know which blocks can be queried. * v.2.0.41 - January 18th, 2020 * Added alpha support for Monero. Here's the list of new endpoints (please refer to our documentation for more info: https://blockchair.com/api/docs): * `https://api.blockchair.com/monero/stats` From 05327d271754d36425a30059ac1046ba9f81385b Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Mon, 20 Jan 2020 20:01:47 +0300 Subject: [PATCH 102/180] v.2.0.42 --- API_DOCUMENTATION_EN.md | 144 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 142 insertions(+), 2 deletions(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index f70a5eec..034e5ee0 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,4 +1,4 @@ -# [Blockchair.com](https://blockchair.com/) API v.2.0.41 Documentation +# [Blockchair.com](https://blockchair.com/) API v.2.0.42 Documentation ``` ____ __ __ __ _ @@ -87,6 +87,7 @@ + [Broadcasting transactions](#link_202) + [Nodes](#link_508) + [State changes](#link_507) + + [Available block ranges](#link_510) + [Premium API endpoints](#link_M51) + [Premium API usage stats](#link_600) + [Support](#link_M7) @@ -161,6 +162,8 @@ As a general rule, if we add a blockchain to our platform, it means we'll suppor * If a blockchain is community-backed, we guarantee support till some specified date (this is reflected in the tables above). If its community decides not to prolong the agreement with Blockchair after that date, we may either continue to support that blockchain for free, or drop support for it; * If we see that a particular blockchain became unpopular on our platform, we may terminate its support with a 3 month notice. +For some of the blockchains we support we don't store full historical data. These blockchains are: `Ripple`, `Stellar`. That means you won't be able to query some old blocks, and the transaction list for an address may not show some old transactions. See [Available block ranges](#link_510) API endpoint to get data on which blocks are available in these blockchains. All other blockchains have full historical data. It's our intent to have full historical data for all blockchains. + Blockchair API also supports **3 layer 2 solutions** (tokens) divided into 2 groups: * Omni-like tokens (Omni Layer on top of Bitcoin, Wormhole on top of Bitcoin Cash) @@ -425,7 +428,7 @@ If you require data on just one blockchain, please use `https://api.blockchair.c **Output:** -`data` contains an array with stats on 11 blockchains we support at once: +`data` contains an array with stats on 12 blockchains we support at once: - Bitcoin - Bitcoin Cash @@ -438,6 +441,7 @@ If you require data on just one blockchain, please use `https://api.blockchair.c - Groestlcoin - Stellar - Telegram Open Network Testnet +- Monero Note that Bitcoin Testnet stats are not included in this output, and TON Testnet will be changed to TON Mainnet as soon as it's launched. @@ -515,6 +519,12 @@ Description of the fields is available in the next three sections of documentati "blocks": 475753, ... } + }, + "monero": { + "data": { + "blocks": 2014108, + ... + } } }, "context": { @@ -6522,6 +6532,136 @@ Note that this example doesn't account for cases like new multiple blocks have b +## Available block ranges + +As Blockchair doesn't store historical data for some blockchains (at this moment this applies to Ripple and Stellar only) it may be useful to know which blocks can be queried. + +**Endpoint:** + +- `https://api.blockchair.com/range` + +**Output:** + +The response contains an array where the keys are blockchains, and the values are arrays containing: + +* `blockchain_first_entry` — first block (or ledger) id on the blockchain +* `blockchain_first_entry_date` — its date +* `blockchair_first_entry` — first block id Blockchair processes +* `blockchair_first_entry_date` — its date +* `is_full` — whether we have the full history for this blockchain + +**Example output:** + +`https://api.blockchair.com/range`: + +```json +{ + "data": { + "bitcoin": { + "blockchain_first_entry": 0, + "blockchain_first_entry_date": "2009-01-03", + "blockchair_first_entry": 0, + "blockchair_first_entry_date": "2009-01-03", + "is_full": true + }, + "bitcoin-cash": { + "blockchain_first_entry": 0, + "blockchain_first_entry_date": "2009-01-03", + "blockchair_first_entry": 0, + "blockchair_first_entry_date": "2009-01-03", + "is_full": true + }, + "ethereum": { + "blockchain_first_entry": 0, + "blockchain_first_entry_date": "2015-07-30", + "blockchair_first_entry": 0, + "blockchair_first_entry_date": "2015-07-30", + "is_full": true + }, + "litecoin": { + "blockchain_first_entry": 0, + "blockchain_first_entry_date": "2011-10-07", + "blockchair_first_entry": 0, + "blockchair_first_entry_date": "2011-10-07", + "is_full": true + }, + "bitcoin-sv": { + "blockchain_first_entry": 0, + "blockchain_first_entry_date": "2009-01-03", + "blockchair_first_entry": 0, + "blockchair_first_entry_date": "2009-01-03", + "is_full": true + }, + "dogecoin": { + "blockchain_first_entry": 0, + "blockchain_first_entry_date": "2013-12-06", + "blockchair_first_entry": 0, + "blockchair_first_entry_date": "2013-12-06", + "is_full": true + }, + "dash": { + "blockchain_first_entry": 0, + "blockchain_first_entry_date": "2014-01-19", + "blockchair_first_entry": 0, + "blockchair_first_entry_date": "2014-01-19", + "is_full": true + }, + "ripple": { + "blockchain_first_entry": 32570, + "blockchain_first_entry_date": "2013-01-01", + "blockchair_first_entry": 52688390, + "blockchair_first_entry_date": "2020-01-12", + "is_full": false + }, + "groestlcoin": { + "blockchain_first_entry": 0, + "blockchain_first_entry_date": "2014-03-20", + "blockchair_first_entry": 0, + "blockchair_first_entry_date": "2014-03-20", + "is_full": true + }, + "stellar": { + "blockchain_first_entry": 1, + "blockchain_first_entry_date": "2015-09-30", + "blockchair_first_entry": 27225363, + "blockchair_first_entry_date": "2019-12-11", + "is_full": false + }, + "monero": { + "blockchain_first_entry": 0, + "blockchain_first_entry_date": "2014-04-18", + "blockchair_first_entry": 0, + "blockchair_first_entry_date": "2014-04-18", + "is_full": true + }, + "bitcoin/testnet": { + "blockchain_first_entry": 0, + "blockchain_first_entry_date": "2011-02-02", + "blockchair_first_entry": 0, + "blockchair_first_entry_date": "2011-02-02", + "is_full": true + }, + "ton/testnet": { + "blockchain_first_entry": 1, + "blockchain_first_entry_date": "2019-11-15", + "blockchair_first_entry": 1, + "blockchair_first_entry_date": "2019-11-15", + "is_full": true + } + }, + "context": { + "code": 200, + ... + } +} +``` + +**Request cost formula:** + +Always `1`. + + + ## Premium API endpoints From 6a2937af0c519ecca552168975bcadc1412aea9e Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Thu, 23 Jan 2020 17:15:21 +0300 Subject: [PATCH 103/180] v.2.0.43 --- API.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/API.md b/API.md index b02bfe03..bd1c899c 100644 --- a/API.md +++ b/API.md @@ -3,7 +3,7 @@ Logo ### API v.2 documentation -* English: [https://blockchair.com/api/docs](https://blockchair.com/api/docs) (up to v.2.0.42) +* English: [https://blockchair.com/api/docs](https://blockchair.com/api/docs) (up to v.2.0.43) ### Please apply for an API key first @@ -26,6 +26,12 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.43 - January 23rd, 2020 + * Added alpha support for Cardano (ADA). Here's the list of new endpoints (please refer to our documentation for more info: https://blockchair.com/api/docs): + * `https://api.blockchair.com/cardano/stats` + * `https://api.blockchair.com/cardano/raw/block/{:id|hash}` + * `https://api.blockchair.com/cardano/raw/transaction/{:hash}` + * `https://api.blockchair.com/cardano/raw/address/{:address}` * v.2.0.42 - January 20th, 2020 * New endpoint to query the range of available blocks in blockchains we support: `https://api.blockchair.com/range`. Note that at this moment we don't store full historical data for Ripple and Stellar, so this endpoint is useful when you need to know which blocks can be queried. * v.2.0.41 - January 18th, 2020 From 35cf90834bdf06ce4a79a6b8682ca28ab5a13a53 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Thu, 23 Jan 2020 17:15:48 +0300 Subject: [PATCH 104/180] v.2.0.43 --- API_DOCUMENTATION_EN.md | 657 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 624 insertions(+), 33 deletions(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index 034e5ee0..33ecf0ad 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,4 +1,5 @@ -# [Blockchair.com](https://blockchair.com/) API v.2.0.42 Documentation +/usr/bin/php /Users/Alf/PhpstormProjects/Sandbox/mdgluer.php +# [Blockchair.com](https://blockchair.com/) API v.2.0.43 Documentation ``` ____ __ __ __ _ @@ -26,8 +27,8 @@ + [Stellar-like blockchain stats](#link_004) + [TON-like blockchain stats](#link_005) + [Monero-like blockchain stats](#link_006) + + [Cardano-like blockchain stats](#link_007) + [Omni Layer stats](#link_500) - + [Wormhole stats](#link_500) + [ERC-20 stats](#link_509) + [Dashboard endpoints](#link_M2) (Retrieve information about various entities in a neat format from our databases) + [Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin, and Bitcoin Testnet](#link_M21) @@ -67,6 +68,10 @@ - [Block](#link_109) - [Transaction](#link_210) - [Outputs](#link_306) + - [Cardano](#link_M37) + - [Block](#link_110) + - [Transaction](#link_211) + - [Outputs](#link_307) + [Infinitable endpoints](#link_05) (SQL-like queries: filter, sort, and aggregate blockchain data) + [Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin, and Bitcoin Testnet](#link_M41) + [Blocks](#link_102) (table) @@ -96,7 +101,7 @@ # Introduction -Blockchair API provides developers with access to data contained in [13 different blockchains](#link_M01). Unlike other APIs, Blockchair also supports numerous analytical queries like filtering, sorting, and aggregating blockchain data. +Blockchair API provides developers with access to data contained in [14 different blockchains](#link_M01). Unlike other APIs, Blockchair also supports numerous analytical queries like filtering, sorting, and aggregating blockchain data. Here are some examples of what you can build using our API: @@ -120,13 +125,14 @@ Our API is free to try under some limitations, and we have a variety of premium ## Supported blockchains and second layers -As of today, our API supports **13 blockchains** (11 mainnets and 2 testnets) divided into 5 groups: +As of today, our API supports **14 blockchains** (12 mainnets and 2 testnets) divided into 7 groups: * Bitcoin-like blockchains (Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin, Bitcoin Testnet), also known as UTXO-based blockchains * Ethereum-like blockchains (Ethereum) * Ripple-like blockchains (Ripple) * Stellar-like blockchains (Stellar) * TON-like blockchains (Telegram Open Network Testnet) * Monero-like blockchains (Monero) +* Cardano-like blockchains (Cardano) Within a group, there's no or little difference between the set of available endpoints and their output. @@ -145,6 +151,7 @@ Here's the list of available mainnets: | Groestlcoin | Bitcoin-like | `https://api.blockchair.com/groestlcoin` | Full support, community-backed till June 18th, 2020 | | Stellar | Stellar-like | `https://api.blockchair.com/stellar` | Alpha mode, possible compatibility-breaking changes | | Monero | Monero-like | `https://api.blockchair.com/monero` | Alpha mode, possible compatibility-breaking changes | +| Cardano | Cardano-like | `https://api.blockchair.com/cardano` | Alpha mode, possible compatibility-breaking changes | There are also following testnets supported which are technically considered as separate blockchains: @@ -164,9 +171,9 @@ As a general rule, if we add a blockchain to our platform, it means we'll suppor For some of the blockchains we support we don't store full historical data. These blockchains are: `Ripple`, `Stellar`. That means you won't be able to query some old blocks, and the transaction list for an address may not show some old transactions. See [Available block ranges](#link_510) API endpoint to get data on which blocks are available in these blockchains. All other blockchains have full historical data. It's our intent to have full historical data for all blockchains. -Blockchair API also supports **3 layer 2 solutions** (tokens) divided into 2 groups: +Blockchair API also supports **2 layer 2 solutions** (tokens) divided into 2 groups: -* Omni-like tokens (Omni Layer on top of Bitcoin, Wormhole on top of Bitcoin Cash) +* Omni-like tokens (Omni Layer on top of Bitcoin) * ERC-20-like tokens (ERC-20's on top of Ethereum) Like with blockchains, within a group, there's no or little difference between the available endpoints. @@ -174,10 +181,11 @@ Like with blockchains, within a group, there's no or little difference between t | Layer 2 | Group | Parent blockchain | API path prefix | Support status | | ---------- | ----------- | ----------------- | -------------------------------------------------- | ------------------------------------------------ | | Omni Layer | Omni-like | Bitcoin | `https://api.blockchair.com/bitcoin/omni` | Alpha support | -| Wormhole | Omni-like | Bitcoin Cash | `https://api.blockchair.com/bitcoin-cash/wormhole` | Deprecated, alpha support till January 1st, 2020 | | ERC-20 | ERC-20-like | Ethereum | `https://api.blockchair.com/ethereum/erc-20` | Beta support | -We also plan to bring ERC-721 support in the near future. Please note that we'll be dropping support for Wormhole on January 1st, 2020 as it's not used by anyone anymore. +We also plan to bring ERC-721 support in the near future. + +Wormhole support was dropped on January 1st, 2020 with a 3-month notice as it's not used by anyone anymore. @@ -191,6 +199,7 @@ This is the full list of available API endpoints. - `{:xlm_chain}` can be only `stellar` - `{:ton_chain}` can be only `ton/testnet` - `{:xmr_chain}` can be only `monero` +- `{:ada_chain}` can be only `cardano` | Endpoint path | Docs | Base request cost | Status | | ----------------------------------------------- | :----------------: | -----------------------------: | :---------------------------------------------: | @@ -202,6 +211,7 @@ This is the full list of available API endpoints. | `https://api.blockchair.com/{:xlm_chain}/stats` | [👉](#link_004) | `1` | Alpha | | `https://api.blockchair.com/{:ton_chain}/stats` | [👉](#link_005) | `1` | Alpha | | `https://api.blockchair.com/{:xmr_chain}/stats` | [👉](#link_006) | `1` | Alpha | +| `https://api.blockchair.com/{:ada_chain}/stats` | [👉](#link_007) | `1` | Alpha | | **Block-related information** | — | — | — | | `https://api.blockchair.com/{:btc_chain}/dashboards/block/{:height}₀` | [👉](#link_100) | `1` | Stable | | `https://api.blockchair.com/{:btc_chain}/dashboards/block/{:hash}₀` | [👉](#link_100) | `1` | Stable | @@ -223,6 +233,8 @@ This is the full list of available API endpoints. | `https://api.blockchair.com/{:ton_chain}/raw/block/{:tuple}₀` | [👉](#link_108) | `1` | Alpha | | `https://api.blockchair.com/{:xmr_chain}/raw/block/{:height}₀` | [👉](#link_109) | `1` | Alpha | | `https://api.blockchair.com/{:xmr_chain}/raw/block/{:hash}₀` | [👉](#link_109) | `1` | Alpha | +| `https://api.blockchair.com/{:ada_chain}/raw/block/{:height}₀` | [👉](#link_110) | `1` | Alpha | +| `https://api.blockchair.com/{:ada_chain}/raw/block/{:hash}₀` | [👉](#link_110) | `1` | Alpha | | **Transaction-related information and actions** | — | — | — | | `https://api.blockchair.com/{:btc_chain}/dashboards/transaction/{:hash}₀` | [👉](#link_200) | `1` | Stable | | `https://api.blockchair.com/{:btc_chain}/dashboards/transactions/{:hash}₀,...,{:hash}ᵩ` | [👉](#link_200) | `1 + 0.1*c` | Stable | @@ -240,6 +252,7 @@ This is the full list of available API endpoints. | `https://api.blockchair.com/{:xlm_chain}/raw/transaction/{:hash}₀` | [👉](#link_208) | `1` | Alpha | | `https://api.blockchair.com/{:ton_chain}/raw/transaction/{:tuple}₀` | [👉](#link_209) | `1` | Alpha | | `https://api.blockchair.com/{:xmr_chain}/raw/transaction/{:hash}₀` | [👉](#link_210) | `1` | Alpha | +| `https://api.blockchair.com/{:ada_chain}/raw/transaction/{:hash}₀` | [👉](#link_211) | `1` | Alpha | | **Address-related information** | — | — | — | | `https://api.blockchair.com/{:btc_chain}/dashboards/address/{:address}₀` | [👉](#link_300) | `1` | Stable | | `https://api.blockchair.com/{:btc_chain}/dashboards/addresses/{:address}₀,...,{:address}ᵩ` | [👉](#link_300) | `1 + 0.1*c` | Stable | @@ -249,6 +262,7 @@ This is the full list of available API endpoints. | `https://api.blockchair.com/{:xrp_chain}/raw/account/{:address}₀` | [👉](#link_303) | `1` | Alpha | | `https://api.blockchair.com/{:xlm_chain}/raw/account/{:address}₀` | [👉](#link_304) | `1` | Alpha | | `https://api.blockchair.com/{:ton_chain}/raw/account/{:address}₀` | [👉](#link_305) | `1` | Alpha | +| `https://api.blockchair.com/{:ada_chain}/raw/address/{:address}₀` | [👉](#link_307) | `1` | Alpha | | **Special entities** | — | — | — | | `https://api.blockchair.com/{:btc_chain}/outputs?{:query}` | [👉](#link_400) | `10` | Beta | | `https://api.blockchair.com/{:btc_chain}/mempool/outputs?{:query}` | [👉](#link_400) | `2` | Beta | @@ -442,6 +456,7 @@ If you require data on just one blockchain, please use `https://api.blockchair.c - Stellar - Telegram Open Network Testnet - Monero +- Cardano Note that Bitcoin Testnet stats are not included in this output, and TON Testnet will be changed to TON Mainnet as soon as it's launched. @@ -525,6 +540,12 @@ Description of the fields is available in the next three sections of documentati "blocks": 2014108, ... } + }, + "cardano": { + "data": { + "blocks": 3673733, + ... + } } }, "context": { @@ -714,7 +735,7 @@ Always `1`. - `inflation_usd_24h` — the same in USD - `largest_transaction_24h`: array of `hash` and `value_usd` — biggest payment over the last 24 hours - `market_price_usd` — average market price of 1 coin in USD (market data source: CoinGecko) -- `market_price_btc` — average market price of 1 coin in BTC (for Bitcoin it always returns 1) +- `market_price_btc` — average market price of 1 coin in BTC - `market_price_usd_change_24h_percentage` — market price change in percent for 24 hours - `market_cap_usd` — market capitalization (coins in circulation * price per coin in USD) - `market_dominance_percentage` — dominance index (how much % of the total cryptocurrency market is the market capitalization of the coin) @@ -825,7 +846,7 @@ Always `1`. - `inflation_usd_24h` — the same in USD - `largest_transaction_24h`: array of `hash` and `value_usd` — biggest payment over the last 24 hours - `market_price_usd` — average market price of 1 coin in USD (market data source: CoinGecko) -- `market_price_btc` — average market price of 1 coin in BTC (for Bitcoin it always returns 1) +- `market_price_btc` — average market price of 1 coin in BTC - `market_price_usd_change_24h_percentage` — market price change in percent for 24 hours - `market_cap_usd` — market capitalization (coins in circulation * price per coin in USD) - `market_dominance_percentage` — dominance index (how much % of the total cryptocurrency market is the market capitalization of the coin) @@ -905,7 +926,7 @@ Always `1`. - `average_transaction_fee_24h` — average transaction fee over the last 24 hours - `average_transaction_fee_usd_24h` — the same in USD - `market_price_usd` — average market price of 1 coin in USD (market data source: CoinGecko) -- `market_price_btc` — average market price of 1 coin in BTC (for Bitcoin it always returns 1) +- `market_price_btc` — average market price of 1 coin in BTC - `market_price_usd_change_24h_percentage` — market price change in percent for 24 hours - `market_cap_usd` — market capitalization (coins in circulation * price per coin in USD) - `market_dominance_percentage` — dominance index (how much % of the total cryptocurrency market is the market capitalization of the coin) @@ -938,8 +959,6 @@ Always `1`. }, "context": { "code": 200, - "results": 1, - "state": 26602978, ... } } @@ -990,7 +1009,10 @@ Always `1`. "blocks_24h": 26000, "transactions_24h": 130000 }, - ... + "context": { + "code": 200, + ... + } } ``` @@ -1025,7 +1047,7 @@ Always `1`. * `mempool_transactions` — number of transactions in the mempool * `mempool_size` — mempool size in bytes * `market_price_usd` — average market price of 1 coin in USD (market data source: CoinGecko) -* `market_price_btc` — average market price of 1 coin in BTC (for Bitcoin it always returns 1) +* `market_price_btc` — average market price of 1 coin in BTC * `market_price_usd_change_24h_percentage` — market price change in percent for 24 hours * `market_cap_usd` — market capitalization (coins in circulation * price per coin in USD) * `market_dominance_percentage` — dominance index (how much % of the total cryptocurrency market is the market capitalization of the coin) @@ -1073,14 +1095,82 @@ Always `1`. +## Cardano-like blockchain stats + +**Endpoint:** + +* `https://api.blockchair.com/cardano/stats` + +**Output:** + +`data` contains an array with blockchain statistics: + +* `blocks` — total number of blocks +* `transactions` — total number of transactions +* `circulation` — number of coins in circulation (in satoshi) +* `blockchain_size` — total size of all blocks in bytes (note: it's not the size of a full node, it's just bare blocks; nodes are bigger in size as they use database indexing, etc) +* `best_block_epoch` — the latest epoch number +* `best_block_slot` — the latest slot number +* `best_block_height` — the latest block height +* `best_block_hash` — the latest block hash +* `best_block_time` — the latest block time +* `blocks_24h` — number of blocks over the last 24 hours +* `transactions_24h` — number of transactions over the last 24 hours +* `market_price_usd` — average market price of 1 coin in USD (market data source: CoinGecko) +* `market_price_btc` — average market price of 1 coin in BTC +* `market_price_usd_change_24h_percentage` — market price change in percent for 24 hours +* `market_cap_usd` — market capitalization (coins in circulation * price per coin in USD) +* `market_dominance_percentage` — dominance index (how much % of the total cryptocurrency market is the market capitalization of the coin) +* `countdowns` (optional) — an optional array of events ([`event`, `time_left`] format), where `time_left` is the number of seconds till the `event` + +**Example output:** + +`https://api.blockchair.com/cardano/stats`: + +```json +{ + "data": { + "blocks": 3673733, + "transactions": 1725714, + "best_block_epoch": 170, + "best_block_slot": 3790, + "best_block_height": 3673733, + "best_block_hash": "d70406d8707105b333f2107d6d786316f8232fd8c7beb9565b02f134fe1c03f2", + "best_block_time": "2020-01-22 18:48:11", + "blocks_24h": 4320, + "transactions_24h": 1987, + "circulation": 31112169560261348, + "blockchain_size": 3474703715, + "market_price_usd": 0.04703496, + "market_price_btc": 0.000004687558301774, + "market_price_usd_change_24h_percentage": -3.43458, + "market_cap_usd": 1465483381, + "market_dominance_percentage": 0.55 + }, + "context": { + "code": 200, + ... + } +} +``` + +**Request cost formula:** + +Always `1`. + +**Explore visualizations on our front-end:** + +- https://blockchair.com/cardano + + + ## Omni Layer and Wormhole stats -Allows to retrieve the some basic stats on Omni Layer (Bitcoin) and Wormhole (Bitcoin Cash). Since Wormhole is based on Omni Layer, the output is the same for both. Note that this endpoint is in the Alpha stage, and Wormhole is deprecated on our platform. +Allows to retrieve the some basic stats on Omni Layer (Bitcoin). Note that this endpoint is in the Alpha stage, and Wormhole (Bitcoin Cash Omni-like token system) was phased out on January 1st, 2020. -**Endpoints:** +**Endpoint:** - `https://api.blockchair.com/bitcoin/omni/stats` -- `https://api.blockchair.com/bitcoin-cash/wormhole/stats` **Output:** @@ -1092,12 +1182,11 @@ Allows to retrieve the some basic stats on Omni Layer (Bitcoin) and Wormhole (Bi - `transactions_approximate` — approximate number of transactions - `latest_transactions` — array of 10 latest transactions -Note that the "mainnet" and "testnet" terms don't imply using Bitcoin Testnet (or Bitcoin Cash Testnet), the idea behind that is "testnet" properties still live on the Bitcoin Mainnet (or Bitcoin Cash Mainnet), but they have should have no monetary value, and their purpose is for testing only. +Note that the "mainnet" and "testnet" terms don't imply using Bitcoin Testnet, the idea behind that is "testnet" properties still live on the Bitcoin Mainnet, but they have should have no monetary value, and their purpose is for testing only. -**Example requests:** +**Example request:** - `https://api.blockchair.com/bitcoin/omni/stats` -- `https://api.blockchair.com/bitcoin-cash/wormhole/stats` **Example output:** @@ -1138,10 +1227,9 @@ Note that the "mainnet" and "testnet" terms don't imply using Bitcoin Testnet (o Always `1`. -**Explore visualizations on our front-end:** +**Explore visualization on our front-end:** - https://blockchair.com/bitcoin/omni -- https://blockchair.com/bitcoin-cash/wormhole @@ -2625,12 +2713,11 @@ Notes: ### Omni Layer and Wormhole property info -Allows to retrieve the some basic information on an Omni Layer (Bitcoin) or Wormhole (Bitcoin Cash) property (token). Since Wormhole is based on Omni Layer, the output is the same for both. Note that this endpoint is in the Alpha stage, and Wormhole is deprecated on our platform. +Allows to retrieve the some basic information on an Omni Layer (Bitcoin) property (token). **Endpoints:** * `https://api.blockchair.com/bitcoin/omni/dashboards/property/{:prorerty_id}` -* `https://api.blockchair.com/bitcoin-cash/wormhole/dashboards/property/{:prorerty_id}` **Where:** @@ -2640,10 +2727,9 @@ Allows to retrieve the some basic information on an Omni Layer (Bitcoin) or Worm `data` contains information about the property, fields accord with Omni Layer specification (https://github.com/OmniLayer/spec) -**Example requests:** +**Example request:** - `https://api.blockchair.com/bitcoin/omni/dashboards/property/31` -- `https://api.blockchair.com/bitcoin-cash/wormhole/stats/property/1` **Example output:** @@ -2681,10 +2767,9 @@ Allows to retrieve the some basic information on an Omni Layer (Bitcoin) or Worm Always `1`. -**Explore visualizations on our front-end:** +**Explore visualization on our front-end:** - https://blockchair.com/bitcoin/omni/property/31 -- https://blockchair.com/bitcoin-cash/wormhole/property/1 @@ -4529,6 +4614,7 @@ Returns raw block data from our `onion-monero-blockchain-explorer` instance. See - `{:query}` is the query string: - `txprove=0` checks which outputs belong to given address and corresponding viewkey - `txprove=1` proves the sender sent funds + - `txhash` is the transaction hash - `address` is the address - `viewkey` is the viewkey @@ -4657,6 +4743,506 @@ Always `1`. +## Raw data endpoints for Cardano + + + +### Raw block data + +Returns raw block data from our `cardano-explorer-webapi` instance. See https://cardanodocs.com/technical/explorer/api for field descriptions (`/api/blocks/summary/{hash}` section), but mostly they are self-describing. Our API also allows to query by block id. + +**Endpoints:** + +- `https://api.blockchair.com/{:ada_chain}/raw/block/{:height}₀` +- `https://api.blockchair.com/{:ada_chain}/raw/block/{:hash}₀` + +**Where:** + +- `{:ada_chain}` can be only `cardano` +- `{:height}ᵢ` is the block height (integer value), also known as block id +- `{:hash}ᵢ` is the block hash (regex: `/^[0-9a-f]{64}$/i`) + +**Possible options:** + +- `?transactions=true` displays transaction data + +**Output:** + +`data` contains an associative array: + +- `data.{:id}ᵢ.block` — block data +- `data.{:id}ᵢ.block` — block transactions (`null` if `?transactions=true` isn't set, an empty array `[]` if there are no transactions in the block ) + +**Example requests:** + +- `https://api.blockchair.com/cardano/raw/block/1234567` +- `https://api.blockchair.com/monero/raw/block/f093439d0dd48010a22fdb615a659e22738a10991871b5dc2335efa69008a8cd?transactions=true` + +**Example output:** + +`https://api.blockchair.com/cardano/raw/block/321123?transactions=true`: + +```json +{ + "data": { + "321123": { + "block": { + "cbsEntry": { + "cbeEpoch": 14, + "cbeSlot": 18766, + "cbeBlkHeight": 321123, + "cbeBlkHash": "f2568f498ad9d376cb1620ec00555171439fd241b5a66ecb700aeca5310422b1", + "cbeTimeIssued": 1512626411, + "cbeTxNum": 2, + "cbeTotalSent": { + "getCoin": "6428170796567000000" + }, + "cbeSize": 1390, + "cbeBlockLead": "5411c7bf87c252609831a337a713e4859668cba7bba70a9c3ef7c398", + "cbeFees": { + "getCoin": "342492000000" + } + }, + "cbsPrevHash": "7394430cf20bb55270f596106db75abd8dc56a4450f5f18ebc672fc9454389ad", + "cbsNextHash": "eb3dce1bb6ec8a3fcbffca7cd43ca37d27d4f6bcde106b01d6e7ad6ca9c622f1", + "cbsMerkleRoot": "83efc565aa681e5987c1721c1ac918fd246116157a66ca313be00315d10d9829" + }, + "transactions": [ + { + "ctbId": "5641a3c38fd200aa49df75690e9ea48526da874b336913868cd4b7aebfeb4107", + "ctbTimeIssued": 1512626411, + "ctbInputs": [ + { + "ctaAddress": { + "unCAddress": "DdzFFzCqrhsjyGfac6fkMYYCw9Ny5kHpyz48muHKMba4wAvAHT61FBF5JN7KPRuauJZtk41nh8WmDZhQpPVwNejsdk8kW1FZKwbTqgzr" + }, + "ctaAmount": { + "getCoin": "3214070827317" + }, + "ctaTxHash": "c571fa570cc4250bbdead41509fb1d906133c9d206225c77b23759f117ac88a6", + "ctaTxIndex": 0 + } + ], + "ctbOutputs": [ + { + "ctaAddress": { + "unCAddress": "DdzFFzCqrhseaXNVDcCXmbtY7rFbpdMp5dv2Znx7njXkGgAzq8NyAA4T9wfWvBR3wK5H7Q6ARVSnBysnfdY844iMZ4wSyDLkbCoB7W1k" + }, + "ctaAmount": { + "getCoin": "6097360975" + }, + "ctaTxHash": "abb8159acc49c89ed3ce1066884e93d94f4469db1cc5ea76031c8062c37c4348", + "ctaTxIndex": 1 + }, + { + "ctaAddress": { + "unCAddress": "DdzFFzCqrhsgFPX9T4QefXVuRxuAtiXouLbrwa9zGn2PKyCqv7aKqDGHLMBdSTGyCihB17MjTwN7iZq4XeEpAbwqkUKHzyXY6xtLqQyF" + }, + "ctaAmount": { + "getCoin": "3208002779521" + }, + "ctaTxHash": "abb8159acc49c89ed3ce1066884e93d94f4469db1cc5ea76031c8062c37c4348", + "ctaTxIndex": 0 + }, + { + "ctaAddress": { + "unCAddress": "DdzFFzCqrht368NFCQotpKy2mKzJQXPyZUvTZ2Vjx6pMP7jc82T13et6wc6cZJtQTqWxVhY5kwmirWZkQLLszGgcrr2LV9FyPZtq5E3P" + }, + "ctaAmount": { + "getCoin": "165464412631" + }, + "ctaTxHash": "5641a3c38fd200aa49df75690e9ea48526da874b336913868cd4b7aebfeb4107", + "ctaTxIndex": 1 + }, + { + "ctaAddress": { + "unCAddress": "DdzFFzCqrhszNt18zTvCzom5qbtiDaJLPHNYbXfYnD4ScT3ZLXKQe4YC3jLraWeFuzXQ7gqN5cnYDUS3VrqxKGx3E5cz6mdtFuEoXUDs" + }, + "ctaAmount": { + "getCoin": "3048606243440" + }, + "ctaTxHash": "5641a3c38fd200aa49df75690e9ea48526da874b336913868cd4b7aebfeb4107", + "ctaTxIndex": 0 + } + ], + "ctbInputSum": { + "getCoin": "3214070827317" + }, + "ctbOutputSum": { + "getCoin": "6428170796567" + }, + "ctbFees": { + "getCoin": "-3214099969250" + } + }, + { + "ctbId": "abb8159acc49c89ed3ce1066884e93d94f4469db1cc5ea76031c8062c37c4348", + "ctbTimeIssued": 1512626411, + "ctbInputs": [ + { + "ctaAddress": { + "unCAddress": "DdzFFzCqrhsniCkr7dmbXovTkGWbqYLFefc6sLqbJPi6HguiS8J5yCqGdYCPUuPf5HtctdLAiP9AFPQZPW3fprxWNuP1y45UVuRMvpie" + }, + "ctaAmount": { + "getCoin": "3214100311742" + }, + "ctaTxHash": "6b5d6cdfcb0da57430ad80ec18fb9e2ccaf9ae1e4b0d9f1361c267aaf57dfa7d", + "ctaTxIndex": 0 + } + ], + "ctbOutputs": [ + { + "ctaAddress": { + "unCAddress": "DdzFFzCqrhseaXNVDcCXmbtY7rFbpdMp5dv2Znx7njXkGgAzq8NyAA4T9wfWvBR3wK5H7Q6ARVSnBysnfdY844iMZ4wSyDLkbCoB7W1k" + }, + "ctaAmount": { + "getCoin": "6097360975" + }, + "ctaTxHash": "abb8159acc49c89ed3ce1066884e93d94f4469db1cc5ea76031c8062c37c4348", + "ctaTxIndex": 1 + }, + { + "ctaAddress": { + "unCAddress": "DdzFFzCqrhsgFPX9T4QefXVuRxuAtiXouLbrwa9zGn2PKyCqv7aKqDGHLMBdSTGyCihB17MjTwN7iZq4XeEpAbwqkUKHzyXY6xtLqQyF" + }, + "ctaAmount": { + "getCoin": "3208002779521" + }, + "ctaTxHash": "abb8159acc49c89ed3ce1066884e93d94f4469db1cc5ea76031c8062c37c4348", + "ctaTxIndex": 0 + }, + { + "ctaAddress": { + "unCAddress": "DdzFFzCqrht368NFCQotpKy2mKzJQXPyZUvTZ2Vjx6pMP7jc82T13et6wc6cZJtQTqWxVhY5kwmirWZkQLLszGgcrr2LV9FyPZtq5E3P" + }, + "ctaAmount": { + "getCoin": "165464412631" + }, + "ctaTxHash": "5641a3c38fd200aa49df75690e9ea48526da874b336913868cd4b7aebfeb4107", + "ctaTxIndex": 1 + }, + { + "ctaAddress": { + "unCAddress": "DdzFFzCqrhszNt18zTvCzom5qbtiDaJLPHNYbXfYnD4ScT3ZLXKQe4YC3jLraWeFuzXQ7gqN5cnYDUS3VrqxKGx3E5cz6mdtFuEoXUDs" + }, + "ctaAmount": { + "getCoin": "3048606243440" + }, + "ctaTxHash": "5641a3c38fd200aa49df75690e9ea48526da874b336913868cd4b7aebfeb4107", + "ctaTxIndex": 0 + } + ], + "ctbInputSum": { + "getCoin": "3214100311742" + }, + "ctbOutputSum": { + "getCoin": "6428170796567" + }, + "ctbFees": { + "getCoin": "-3214070484825" + } + } + ] + } + }, + "context": { + "code": 200, + "results": 1, + "state": 3677155, + ... + } +} +``` + +**Request cost formula:** + +`1`. If `?transactions=true` option is used then `2`. + +**Explore visualization on our front-end:** + +- https://blockchair.com/cardano/block/321123 + + + +### Raw transaction data + +Returns raw block data from our `cardano-explorer-webapi` instance. See https://cardanodocs.com/technical/explorer/api for field descriptions (`/api/txs/summary/{txid}` section), but mostly they are self-describing. + +**Endpoint:** + +- `https://api.blockchair.com/{:ada_chain}/raw/transaction/{:hash}₀` + +**Where:** + +- `{:ada_chain}` can only be `cardano` +- `{:hash}ᵢ` is the transaction hash (regex: `/^[0-9a-f]{64}$/i`) + +**Output:** + +`data` contains an associative array: + +- `data.{:hash}ᵢ.transaction` — transaction data + +**Example requests:** + +- `https://api.blockchair.com/cardano/raw/transaction/5641a3c38fd200aa49df75690e9ea48526da874b336913868cd4b7aebfeb4107` + +**Example output:** + +`https://api.blockchair.com/cardano/raw/transaction/5641a3c38fd200aa49df75690e9ea48526da874b336913868cd4b7aebfeb4107`: + +```json +{ + "data": { + "5641a3c38fd200aa49df75690e9ea48526da874b336913868cd4b7aebfeb4107": { + "transaction": { + "ctsId": "5641a3c38fd200aa49df75690e9ea48526da874b336913868cd4b7aebfeb4107", + "ctsTxTimeIssued": 1512626411, + "ctsBlockTimeIssued": 1512626411, + "ctsBlockHeight": 321123, + "ctsBlockEpoch": 14, + "ctsBlockSlot": 18766, + "ctsBlockHash": "f2568f498ad9d376cb1620ec00555171439fd241b5a66ecb700aeca5310422b1", + "ctsRelayedBy": null, + "ctsTotalInput": { + "getCoin": "3214070827317" + }, + "ctsTotalOutput": { + "getCoin": "3214070656071" + }, + "ctsFees": { + "getCoin": "171246" + }, + "ctsInputs": [ + { + "ctaAddress": { + "unCAddress": "DdzFFzCqrhsjyGfac6fkMYYCw9Ny5kHpyz48muHKMba4wAvAHT61FBF5JN7KPRuauJZtk41nh8WmDZhQpPVwNejsdk8kW1FZKwbTqgzr" + }, + "ctaAmount": { + "getCoin": "3214070827317" + }, + "ctaTxHash": "c571fa570cc4250bbdead41509fb1d906133c9d206225c77b23759f117ac88a6", + "ctaTxIndex": 0 + } + ], + "ctsOutputs": [ + { + "ctaAddress": { + "unCAddress": "DdzFFzCqrht368NFCQotpKy2mKzJQXPyZUvTZ2Vjx6pMP7jc82T13et6wc6cZJtQTqWxVhY5kwmirWZkQLLszGgcrr2LV9FyPZtq5E3P" + }, + "ctaAmount": { + "getCoin": "165464412631" + }, + "ctaTxHash": "5641a3c38fd200aa49df75690e9ea48526da874b336913868cd4b7aebfeb4107", + "ctaTxIndex": 1 + }, + { + "ctaAddress": { + "unCAddress": "DdzFFzCqrhszNt18zTvCzom5qbtiDaJLPHNYbXfYnD4ScT3ZLXKQe4YC3jLraWeFuzXQ7gqN5cnYDUS3VrqxKGx3E5cz6mdtFuEoXUDs" + }, + "ctaAmount": { + "getCoin": "3048606243440" + }, + "ctaTxHash": "5641a3c38fd200aa49df75690e9ea48526da874b336913868cd4b7aebfeb4107", + "ctaTxIndex": 0 + } + ] + } + } + }, + "context": { + "code": 200, + "source": "D", + "results": 1, + "state": 3677165, + ... + } +} +``` + +**Request cost formula:** + +Always `1`. + +**Explore visualization on our front-end:** + +- https://blockchair.com/cardano/transaction/5641a3c38fd200aa49df75690e9ea48526da874b336913868cd4b7aebfeb4107 + + + +### Raw address data + +Returns raw block data from our `cardano-explorer-webapi` instance. See https://cardanodocs.com/technical/explorer/api for field descriptions (`/api/addresses/summary/{address}` section), but mostly they are self-describing. + +**Endpoint:** + +- `https://api.blockchair.com/{:ada_chain}/raw/address/{:address}₀` + +**Where:** + +- `{:ada_chain}` can only be `cardano` +- `{:address}ᵢ` is the address + +**Output:** + +`data` contains an associative array: + +- `data.{:address}ᵢ.address` — address data + +**Example request:** + +- `https://api.blockchair.com/cardano/raw/address/DdzFFzCqrhsjyGfac6fkMYYCw9Ny5kHpyz48muHKMba4wAvAHT61FBF5JN7KPRuauJZtk41nh8WmDZhQpPVwNejsdk8kW1FZKwbTqgzr` + +**Example output:** + +`https://api.blockchair.com/cardano/raw/address/DdzFFzCqrhsjyGfac6fkMYYCw9Ny5kHpyz48muHKMba4wAvAHT61FBF5JN7KPRuauJZtk41nh8WmDZhQpPVwNejsdk8kW1FZKwbTqgzr`: + +```json +{ + "data": { + "DdzFFzCqrhsjyGfac6fkMYYCw9Ny5kHpyz48muHKMba4wAvAHT61FBF5JN7KPRuauJZtk41nh8WmDZhQpPVwNejsdk8kW1FZKwbTqgzr": { + "address": { + "caAddress": { + "unCAddress": "DdzFFzCqrhsjyGfac6fkMYYCw9Ny5kHpyz48muHKMba4wAvAHT61FBF5JN7KPRuauJZtk41nh8WmDZhQpPVwNejsdk8kW1FZKwbTqgzr" + }, + "caType": "CPubKeyAddress", + "caChainTip": { + "ctBlockNo": 3677186, + "ctSlotNo": 3679243, + "ctBlockHash": "972695ba985f68001bfef72d6c7454e3cc92fd8ac02ff7c00d848cded1e190db" + }, + "caTxNum": 2, + "caBalance": { + "getCoin": "0" + }, + "caTotalInput": { + "getCoin": "3214070827317" + }, + "caTotalOutput": { + "getCoin": "3214070827317" + }, + "caTotalFee": { + "getCoin": "342492" + }, + "caTxList": [ + { + "ctbId": "c571fa570cc4250bbdead41509fb1d906133c9d206225c77b23759f117ac88a6", + "ctbTimeIssued": 1512609191, + "ctbInputs": [ + { + "ctaAddress": { + "unCAddress": "DdzFFzCqrhsvsU8xNsq7eanKQAJVpzFyUzjZqTqsYCQ1wj8STUgvCBGUH5DGjrsuuuNi4as6MQfY3jmqRxPKxmuyPH8T1LMyghxr82Xb" + }, + "ctaAmount": { + "getCoin": "3234070798563" + }, + "ctaTxHash": "fcf9be849290d0228fb339f125fe7c47c71909633e9f93c65f4e4222fb362ded", + "ctaTxIndex": 0 + } + ], + "ctbOutputs": [ + { + "ctaAddress": { + "unCAddress": "DdzFFzCqrhsegE9H92jxSgEHv3W4mSLWq5ELTJiK4DTnZ8frf4squEQmFbvzjTeUsMiLe287qUZSsb8USXhf5i7WR5DTbJuSUfLEFu1q" + }, + "ctaAmount": { + "getCoin": "19999800000" + }, + "ctaTxHash": "c571fa570cc4250bbdead41509fb1d906133c9d206225c77b23759f117ac88a6", + "ctaTxIndex": 1 + }, + { + "ctaAddress": { + "unCAddress": "DdzFFzCqrhsjyGfac6fkMYYCw9Ny5kHpyz48muHKMba4wAvAHT61FBF5JN7KPRuauJZtk41nh8WmDZhQpPVwNejsdk8kW1FZKwbTqgzr" + }, + "ctaAmount": { + "getCoin": "3214070827317" + }, + "ctaTxHash": "c571fa570cc4250bbdead41509fb1d906133c9d206225c77b23759f117ac88a6", + "ctaTxIndex": 0 + } + ], + "ctbInputSum": { + "getCoin": "3234070798563" + }, + "ctbOutputSum": { + "getCoin": "3234070627317" + }, + "ctbFees": { + "getCoin": "171246" + } + }, + { + "ctbId": "5641a3c38fd200aa49df75690e9ea48526da874b336913868cd4b7aebfeb4107", + "ctbTimeIssued": 1512626411, + "ctbInputs": [ + { + "ctaAddress": { + "unCAddress": "DdzFFzCqrhsjyGfac6fkMYYCw9Ny5kHpyz48muHKMba4wAvAHT61FBF5JN7KPRuauJZtk41nh8WmDZhQpPVwNejsdk8kW1FZKwbTqgzr" + }, + "ctaAmount": { + "getCoin": "3214070827317" + }, + "ctaTxHash": "c571fa570cc4250bbdead41509fb1d906133c9d206225c77b23759f117ac88a6", + "ctaTxIndex": 0 + } + ], + "ctbOutputs": [ + { + "ctaAddress": { + "unCAddress": "DdzFFzCqrht368NFCQotpKy2mKzJQXPyZUvTZ2Vjx6pMP7jc82T13et6wc6cZJtQTqWxVhY5kwmirWZkQLLszGgcrr2LV9FyPZtq5E3P" + }, + "ctaAmount": { + "getCoin": "165464412631" + }, + "ctaTxHash": "5641a3c38fd200aa49df75690e9ea48526da874b336913868cd4b7aebfeb4107", + "ctaTxIndex": 1 + }, + { + "ctaAddress": { + "unCAddress": "DdzFFzCqrhszNt18zTvCzom5qbtiDaJLPHNYbXfYnD4ScT3ZLXKQe4YC3jLraWeFuzXQ7gqN5cnYDUS3VrqxKGx3E5cz6mdtFuEoXUDs" + }, + "ctaAmount": { + "getCoin": "3048606243440" + }, + "ctaTxHash": "5641a3c38fd200aa49df75690e9ea48526da874b336913868cd4b7aebfeb4107", + "ctaTxIndex": 0 + } + ], + "ctbInputSum": { + "getCoin": "3214070827317" + }, + "ctbOutputSum": { + "getCoin": "3214070656071" + }, + "ctbFees": { + "getCoin": "171246" + } + } + ] + } + } + }, + "context": { + "code": 200, + "source": "D", + "results": 1, + "state": 3677186, + ... + } +} +``` + +**Request cost formula:** + +Always `1`. + +**Explore visualization on our front-end:** + +- https://blockchair.com/cardano/address/DdzFFzCqrhsjyGfac6fkMYYCw9Ny5kHpyz48muHKMba4wAvAHT61FBF5JN7KPRuauJZtk41nh8WmDZhQpPVwNejsdk8kW1FZKwbTqgzr + + + # Infinitable endpoints (SQL-like queries) These endpoints allow you to filter, sort, and aggregate blockchain data. The output is database rows. Unlike dashboard and raw endpoints, all infinitable endpoints listed in this section can be considered as just one endpoint as it has the same options and the same output structure across different blockchains and entities. Here it is: `https://api.blockchair.com/{:table}{:query}`. @@ -6055,12 +6641,11 @@ See [request costs for infinitables](#link_05) ### `properties` table (Omni Layer and Wormhole) -Note: this particular table doesn't support querying. The only query section it supports is `?offset=`. Note that this endpoint is in the Alpha stage, and Wormhole is deprecated on our platform. +Note: this particular table doesn't support querying. The only query section it supports is `?offset=`. Note that this endpoint is in the Alpha stage. **Endpoints:** - `https://api.blockchair.com/bitcoin/omni/properties?{:query}` -- `https://api.blockchair.com/bitcoin-cash/wormhole/properties?{:query}` **Where:** @@ -6112,10 +6697,9 @@ Note: this particular table doesn't support querying. The only query section it See [request costs for infinitables](#link_05) -**Explore visualizations on our front-end:** +**Explore visualization on our front-end:** - https://blockchair.com/bitcoin/omni/properties -- https://blockchair.com/bitcoin-cash/wormhole/properties @@ -6647,6 +7231,13 @@ The response contains an array where the keys are blockchains, and the values ar "blockchair_first_entry": 1, "blockchair_first_entry_date": "2019-11-15", "is_full": true + }, + "cardano": { + "blockchain_first_entry": 1, + "blockchain_first_entry_date": "2017-09-23", + "blockchair_first_entry": 1, + "blockchair_first_entry_date": "2017-09-23", + "is_full": true } }, "context": { From f4c90bbd2981afd0e36edb3be35087c6ee7de9c6 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Thu, 23 Jan 2020 17:16:26 +0300 Subject: [PATCH 105/180] v.2.0.43 --- API_DOCUMENTATION_EN.md | 1 - 1 file changed, 1 deletion(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index 33ecf0ad..9f34783c 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,4 +1,3 @@ -/usr/bin/php /Users/Alf/PhpstormProjects/Sandbox/mdgluer.php # [Blockchair.com](https://blockchair.com/) API v.2.0.43 Documentation ``` From d2a7154af7deb8cadbf0145152a5afa68ff9971e Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Tue, 28 Jan 2020 17:20:25 +0300 Subject: [PATCH 106/180] v.2.0.44 --- API_DOCUMENTATION_EN.md | 133 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 126 insertions(+), 7 deletions(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index 9f34783c..383c4f85 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,4 +1,4 @@ -# [Blockchair.com](https://blockchair.com/) API v.2.0.43 Documentation +# [Blockchair.com](https://blockchair.com/) API v.2.0.44 Documentation ``` ____ __ __ __ _ @@ -70,7 +70,7 @@ - [Cardano](#link_M37) - [Block](#link_110) - [Transaction](#link_211) - - [Outputs](#link_307) + - [Address](#link_307) + [Infinitable endpoints](#link_05) (SQL-like queries: filter, sort, and aggregate blockchain data) + [Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin, and Bitcoin Testnet](#link_M41) + [Blocks](#link_102) (table) @@ -92,6 +92,7 @@ + [Nodes](#link_508) + [State changes](#link_507) + [Available block ranges](#link_510) + + [Release monitor](#link_511) + [Premium API endpoints](#link_M51) + [Premium API usage stats](#link_600) + [Support](#link_M7) @@ -116,9 +117,9 @@ Almost every API endpoint description is accompanied with an example visualizati Blockchair cares about user privacy, we neither collect nor share with anyone your personal data rather than for statistical purposes. That includes using the API as well. Please refer to our Privacy policy: https://blockchair.com/privacy. Please also check out our Terms of service available here: https://blockchair.com/terms — by using our API, you are agreeing to these terms. -We have a public tracker for bugs, issues, and questions available on GitHub: https://github.com/Blockchair/Blockchair.Support/issues — please use it or contact us by [any other means available](#M7). +We have a public tracker for bugs, issues, and questions available on GitHub: https://github.com/Blockchair/Blockchair.Support/issues — please use it or contact us by [any other means available](#link_M7). -Our API is free to try under some limitations, and we have a variety of premium plans. Please check out the information about [the limits and plans](#M05). +Our API is free to try under some limitations, and we have a variety of premium plans. Please check out the information about [the limits and plans](#link_M05). @@ -285,6 +286,9 @@ This is the full list of available API endpoints. | `https://api.blockchair.com/{:btc_chain}/state/changes/block/{:block_id}` | [👉](#link_507) | `5` | Stable | | `https://api.blockchair.com/{:btc_chain}/state/changes/mempool` | [👉](#link_507) | `10` | Stable | | `https://api.blockchair.com/{:eth_chain}/state/changes/block/{:block_id}` | [👉](#link_507) | `5` | Stable | +| **Misc** | — | — | — | +| `https://api.blockchair.com/range` | [👉](#link_510) | `1` | Stable | +| `https://api.blockchair.com/tools/releases` | [👉](#link_511) | `1` | Stable | | **Network nodes** | — | — | — | | `https://api.blockchair.com/nodes` | [👉](#link_508) | `1` | Stable | | `https://api.blockchair.com/{:btc_chain}/nodes` | [👉](#link_508) | `1` | Stable | @@ -989,8 +993,8 @@ Always `1`. - `best_block_root_hash` — … roothash… - `best_block_time` — … and timestamp - `fist_block_time` — timestamp of the first block (when the current testnet was launched) -- `blocks_24h` — an approximate (!) number of blocks over the last 24 hours -- `transactions_24h` — an approximate (!) number of transactions over the last 24 hours +- `blocks_24h` — number of blocks over the last 24 hours +- `transactions_24h` — number of transactions over the last 24 hours **Example output:** @@ -1051,7 +1055,7 @@ Always `1`. * `market_cap_usd` — market capitalization (coins in circulation * price per coin in USD) * `market_dominance_percentage` — dominance index (how much % of the total cryptocurrency market is the market capitalization of the coin) * `countdowns` (optional) — an optional array of events ([`event`, `time_left`] format), where `time_left` is the number of seconds till the `event` -* `suggested_transaction_fee_per_byte_sat` — suggests a proper transaction fee in satoshi per byte based on the latest block +* `suggested_transaction_fee_per_byte_sat` — suggests a proper transaction fee in piconero per byte **Example output:** @@ -7252,6 +7256,121 @@ Always `1`. +## Release monitor + +This endpoint returns the list of latest software (core clients) releases for blockchains we support. This may be useful for those who want to track blockchain development, new features, and hard forks (especially this is useful for multi-currency blockchain software — wallets or exchanges — developers). Never miss a BSV hard fork anymore! + +**Endpoint:** + +- `https://api.blockchair.com/tools/releases` + +**Possible options:** + +- `?chain={:chain}` displays latest releases for `{:chain}` only + +**Output:** + +`data` contains an array of latest releases sorted by time for all chains we support (or for a specific chain if `?chain` is set). Each element is an array with the following elements: + +* `chain` — chain id +* `version` — tag name +* `time` — release publish time (UTC) +* `link` — link to this release on GitHub + +`context` has two special fields: + +* `latest_update` — latest update time (UTC) +* `supported_chains` — array of chains monitored with their chain ids and software names + +**Example requests:** + +- `https://api.blockchair.com/tools/releases` +- `https://api.blockchair.com/tools/releases?chain=bitcoin` + +**Example output:** + +`https://api.blockchair.com/tools/releases`: + +```json +{ + "data": [ + { + "chain": "bitcoin-sv", + "version": "Bitcoin SV v1.0.1", + "time": "2020-01-28 11:35:26", + "link": "https://github.com/bitcoin-sv/bitcoin-sv/releases/tag/v1.0.1" + }, + { + "chain": "dash", + "version": "Dash Core v0.15.0.0-rc2", + "time": "2020-01-27 20:12:45", + "link": "https://github.com/dashpay/dash/releases/tag/v0.15.0.0-rc2" + }, + { + "chain": "groestlcoin", + "version": "Groestlcoin Core v2.18.2", + "time": "2020-01-25 12:53:41", + "link": "https://github.com/Groestlcoin/groestlcoin/releases/tag/v2.18.2" + }, + { + "chain": "stellar", + "version": "Stellar Core v12.3.0rc2", + "time": "2020-01-24 04:57:51", + "link": "https://github.com/stellar/stellar-core/releases/tag/v12.3.0rc2" + }, + { + "chain": "stellar", + "version": "Stellar Core v12.3.0rc1", + "time": "2020-01-22 23:54:01", + "link": "https://github.com/stellar/stellar-core/releases/tag/v12.3.0rc1" + }, + { + "chain": "bitcoin-cash", + "version": "Bitcoin ABC v0.20.11", + "time": "2020-01-21 21:46:10", + "link": "https://github.com/Bitcoin-ABC/bitcoin-abc/releases/tag/v0.20.11" + }, + { + "chain": "ethereum", + "version": "Geth v1.9.10", + "time": "2020-01-20 10:36:41", + "link": "https://github.com/ethereum/go-ethereum/releases/tag/v1.9.10" + }, + ... + ], + "context": { + "code": 200, + "latest_update": "2020-01-28 13:12:16", + "supported_chains": { + "bitcoin": "Bitcoin Core", + "bitcoin-cash": "Bitcoin ABC", + "ethereum": "Geth", + "litecoin": "Litecoin Core", + "bitcoin-sv": "Bitcoin SV", + "dogecoin": "Dogecoin Core", + "dash": "Dash Core", + "ripple": "rippled", + "groestlcoin": "Groestlcoin Core", + "stellar": "Stellar Core", + "monero": "Monero", + "cardano": "Cardano SL" + }, + ... + } +} +``` + +**Request cost formula:** + +Always `1`. + +**Explore visualization on our front-end:** + +- https://blockchair.com/tools/release-monitor + + + + ## Premium API endpoints From 9f80020b8fc5ca0626b8ad3603d4bfb53a3e96cb Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Tue, 28 Jan 2020 17:21:06 +0300 Subject: [PATCH 107/180] v.2.0.44 --- API.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/API.md b/API.md index bd1c899c..bb1921aa 100644 --- a/API.md +++ b/API.md @@ -3,7 +3,7 @@ Logo ### API v.2 documentation -* English: [https://blockchair.com/api/docs](https://blockchair.com/api/docs) (up to v.2.0.43) +* English: [https://blockchair.com/api/docs](https://blockchair.com/api/docs) (up to v.2.0.44) ### Please apply for an API key first @@ -26,6 +26,8 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.44 - January 28th, 2020 + * New endpoint to track new reference node software releases: `https://api.blockchair.com/tools/releases`. This endpoint returns the list of latest software (core clients) releases for blockchains we support. This may be useful for those who want to track blockchain development, new features, and hard forks (especially this is useful for multi-currency blockchain software — wallets or exchanges — developers). Never miss a BSV hard fork anymore! Documentation: https://blockchair.com/api/docs#link_510 * v.2.0.43 - January 23rd, 2020 * Added alpha support for Cardano (ADA). Here's the list of new endpoints (please refer to our documentation for more info: https://blockchair.com/api/docs): * `https://api.blockchair.com/cardano/stats` From 22222dc70a3982ce2db31e699bb546f8eb7b0879 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Thu, 6 Feb 2020 19:32:04 +0300 Subject: [PATCH 108/180] v.2.0.45 --- API_DOCUMENTATION_EN.md | 82 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 81 insertions(+), 1 deletion(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index 383c4f85..7ef525a4 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,4 +1,4 @@ -# [Blockchair.com](https://blockchair.com/) API v.2.0.44 Documentation +# [Blockchair.com](https://blockchair.com/) API v.2.0.45 Documentation ``` ____ __ __ __ _ @@ -93,6 +93,7 @@ + [State changes](#link_507) + [Available block ranges](#link_510) + [Release monitor](#link_511) + + [Halvening countdown](#link_512) + [Premium API endpoints](#link_M51) + [Premium API usage stats](#link_600) + [Support](#link_M7) @@ -289,6 +290,7 @@ This is the full list of available API endpoints. | **Misc** | — | — | — | | `https://api.blockchair.com/range` | [👉](#link_510) | `1` | Stable | | `https://api.blockchair.com/tools/releases` | [👉](#link_511) | `1` | Stable | +| `https://api.blockchair.com/tools/halvening` | [👉](#link_512) | `1` | Stable | | **Network nodes** | — | — | — | | `https://api.blockchair.com/nodes` | [👉](#link_508) | `1` | Stable | | `https://api.blockchair.com/{:btc_chain}/nodes` | [👉](#link_508) | `1` | Stable | @@ -7370,6 +7372,84 @@ Always `1`. +## Halvening countdown + +While `{:chain}/stats` endpoints already include info on various countdowns (i.e. to some hard forks), this is a separate endpoint to track halving events in UTXO coins. + +**Endpoint:** + +- `https://api.blockchair.com/tools/halvening + +**Output:** + +`data` contains an array of next halvening event data for all chains we support. Each element is an array with the following elements which are self-describing. + +`context` has a special array: + +* `supported_chains` — array of chains monitored + +**Example requests:** + +- `https://api.blockchair.com/tools/halvening` + +**Example output:** + +`https://api.blockchair.com/tools/halvening`: + +```json +{ + "data": { + "bitcoin": { + "current_block": 616264, + "current_reward": 1250000000, + "halvening_block": 630000, + "halvening_reward": 625000000, + "halvening_time_approximate": "2020-05-12 01:29:34", + "seconds_left_approximate": 8241000, + "blocks_left": 13735 + }, + "bitcoin-cash": { + "current_block": 621124, + "current_reward": 1250000000, + "halvening_block": 630000, + "halvening_reward": 625000000, + "halvening_time_approximate": "2020-04-08 07:29:34", + "seconds_left_approximate": 5325000, + "blocks_left": 8875 + }, + "bitcoin-sv": { + "current_block": 620900, + "current_reward": 1250000000, + "halvening_block": 630000, + "halvening_reward": 625000000, + "halvening_time_approximate": "2020-04-09 20:49:34", + "seconds_left_approximate": 5459400, + "blocks_left": 9099 + } + }, + "context": { + "code": 200, + "supported_chains": [ + "bitcoin", + "bitcoin-cash", + "bitcoin-sv" + ], + ... + } + } +} +``` + +**Request cost formula:** + +Always `1`. + +**Explore visualization on our front-end:** + +- https://blockchair.com/tools/halving-countdown + + + ## Premium API endpoints From ca4cbc39b0cfadfb6d1ac6fec71e09cb350a609b Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Thu, 6 Feb 2020 19:34:21 +0300 Subject: [PATCH 109/180] v.2.0.45 --- API.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/API.md b/API.md index bb1921aa..95e4bb0c 100644 --- a/API.md +++ b/API.md @@ -3,7 +3,7 @@ Logo ### API v.2 documentation -* English: [https://blockchair.com/api/docs](https://blockchair.com/api/docs) (up to v.2.0.44) +* English: [https://blockchair.com/api/docs](https://blockchair.com/api/docs) (up to v.2.0.45) ### Please apply for an API key first @@ -26,6 +26,8 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.45 - February 6th, 2020 + * New endpoint to track halvening events: `https://api.blockchair.com/tools/halvening`. Documentation: https://blockchair.com/api/docs#link_511 * v.2.0.44 - January 28th, 2020 * New endpoint to track new reference node software releases: `https://api.blockchair.com/tools/releases`. This endpoint returns the list of latest software (core clients) releases for blockchains we support. This may be useful for those who want to track blockchain development, new features, and hard forks (especially this is useful for multi-currency blockchain software — wallets or exchanges — developers). Never miss a BSV hard fork anymore! Documentation: https://blockchair.com/api/docs#link_510 * v.2.0.43 - January 23rd, 2020 From 2ad3b83b1b09d0273d7050f2575c85a7b22af888 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Wed, 4 Mar 2020 00:09:48 +0300 Subject: [PATCH 110/180] v.2.0.46 --- API.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/API.md b/API.md index 95e4bb0c..003ab8e9 100644 --- a/API.md +++ b/API.md @@ -3,7 +3,7 @@ Logo ### API v.2 documentation -* English: [https://blockchair.com/api/docs](https://blockchair.com/api/docs) (up to v.2.0.45) +* English: [https://blockchair.com/api/docs](https://blockchair.com/api/docs) (up to v.2.0.46) ### Please apply for an API key first @@ -26,6 +26,8 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.46 - March 3rd, 2020 + * There's a new interface for our Premium API users available at `https://api.blockchair.com/premium`. It's now possible to buy and extend a subscription using this interface as well as to track some basic stats. Subscription extending is not available for existing customers with custom plans, please contact us at if you'd like to have an automated interface. * v.2.0.45 - February 6th, 2020 * New endpoint to track halvening events: `https://api.blockchair.com/tools/halvening`. Documentation: https://blockchair.com/api/docs#link_511 * v.2.0.44 - January 28th, 2020 From 1bf7b3ecc1a070eb79fd4a46d3128b23d66fc73f Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Wed, 4 Mar 2020 00:10:39 +0300 Subject: [PATCH 111/180] v.2.0.46 --- API_DOCUMENTATION_EN.md | 60 +++++++++++++++++++++++++---------------- 1 file changed, 37 insertions(+), 23 deletions(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index 7ef525a4..0086c9c8 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,4 +1,4 @@ -# [Blockchair.com](https://blockchair.com/) API v.2.0.45 Documentation +# [Blockchair.com](https://blockchair.com/) API v.2.0.46 Documentation ``` ____ __ __ __ _ @@ -380,7 +380,7 @@ Here's our policy: | **Non-commercial or academic** | Key is not needed | Key is required, up to 100% discount | | **Commercial** | Key is required | Key is required, up to 10% discount | -**Our Premium API plans are available here: https://blockchair.com/api/plans, please [contact us](#link_M7) if you're interested.** +**Our Premium API plans are available here: https://api.blockchair.com/premium/plans, please [contact us](#link_M7) if you have any questions or would like to have a custom plan.** The daily request counter is reset at 00:00 UTC every day. @@ -394,20 +394,34 @@ If you have exceeded the limit multiple times without using a key, an error `430 **Please note that some of API requests may "cost" more than 1 request.** Here's an example: -* `https://api.blockchair.com/bitcoin/dashboard/block/0` — requesting information about one block via one request "costs" 1 request -* `https://api.blockchair.com/bitcoin/dashboard/blocks/0,1,2,3,4,5,6,7,8,9` — requesting information about ten blocks via one request "costs" 1.9 requests +* `https://api.blockchair.com/bitcoin/dashboards/block/0` — requesting information about one block via one request "costs" 1 request +* `https://api.blockchair.com/bitcoin/dashboards/blocks/0,1,2,3,4,5,6,7,8,9` — requesting information about ten blocks via one request "costs" 1.9 requests Every API endpoint documentation has the "Request cost formula" section describing how the "cost" is calculated. For most API requests it's always 1. It's more than 1 in cases when you're requiring additional data (e.g. when you're requesting data on an Ethereum address, and you're also requesting its ERC-20 token balances). As a kindly reminder, there are tasks such as extracting lots of blockchain data (e.g. all transactions over a 2 month period) which require lots of requests done — it may be better to use our Database dumps feature instead of the API (see https://blockchair.com/dumps for documentation) +**What are the steps to acquire an API key?** + +Our Premium API dashboard is available here: https://api.blockchair.com/premium + +First, you need to choose a suitable plan: https://api.blockchair.com/premium/plans + +At the moment, this automated system accepts PayPal payments only (which also allows you to pay with your card). If you'd like to pay via wire transfer or crypto, please contact us at [info@blockchair.com](mailto:info@blockchair.com) + +Once you've paid, you will receive a one-time password which can be used to generate and activate your API key. Enter it on [this page](https://api.blockchair.com/premium) into the "I want to activate an API key I've just purchased..." form, then fill in a small form about yourself, and you'll get the key. + +After you have received a key, you can track your stats and extend your subscription. Enter your API key on [this page](https://api.blockchair.com/premium) into the "I already have an API key and would like to see some stats or extend my subscription..." form. If you'd like to extend your subscription, you'd need to buy a one-time extension password and enter it on your key management page. + +If you have any questions about how to buy and use your key, you can always [contact us](#link_M7). + **In order to use an API key, you need to append `?key={:api_key}` or `&key={:api_key}` to the end of request URLs.** You should use `?` if there are no other parameters in the URL, and `&` otherwise. Here are three examples of correct URLs with a key: -* `https://api.blockchair.com/bitcoin/dashboard/block/0?key=myfirstpasswordwas4321andifeltsmartaboutit` +* `https://api.blockchair.com/bitcoin/dashboards/block/0?key=myfirstpasswordwas4321andifeltsmartaboutit` -* `https://api.blockchair.com/bitcoin/dashboard/block/0?limit=0&key=myfirstpasswordwas4321andifeltsmartaboutit` +* `https://api.blockchair.com/bitcoin/dashboards/block/0?limit=0&key=myfirstpasswordwas4321andifeltsmartaboutit` -* `https://api.blockchair.com/bitcoin/dashboard/block/0?key=myfirstpasswordwas4321andifeltsmartaboutit&limit=0` +* `https://api.blockchair.com/bitcoin/dashboards/block/0?key=myfirstpasswordwas4321andifeltsmartaboutit&limit=0` There's an extra API endpoint for those who have an API key allowing to [track the number of request made](#link_600). @@ -5983,22 +5997,22 @@ See [request costs for infinitables](#link_05) **Explore visualizations on our front-end:** -- https://blockchair.com/bitcoin/transactions -- https://blockchair.com/bitcoin-cash/transactions -- https://blockchair.com/litecoin/transactions -- https://blockchair.com/bitcoin-sv/transactions -- https://blockchair.com/dogecoin/transactions -- https://blockchair.com/dash/transactions -- https://blockchair.com/groestlcoin/transactions -- https://blockchair.com/bitcoin/testnet/transactions -- https://blockchair.com/bitcoin/mempool/transactions -- https://blockchair.com/bitcoin-cash/mempool/transactions -- https://blockchair.com/litecoin/mempool/transactions -- https://blockchair.com/bitcoin-sv/mempool/transactions -- https://blockchair.com/dogecoin/mempool/transactions -- https://blockchair.com/dash/mempool/transactions -- https://blockchair.com/groestlcoin/mempool/transactions -- https://blockchair.com/bitcoin/testnet/mempool/transactions +- https://blockchair.com/bitcoin/outputs +- https://blockchair.com/bitcoin-cash/outputs +- https://blockchair.com/litecoin/outputs +- https://blockchair.com/bitcoin-sv/outputs +- https://blockchair.com/dogecoin/outputs +- https://blockchair.com/dash/outputs +- https://blockchair.com/groestlcoin/outputs +- https://blockchair.com/bitcoin/testnet/outputs +- https://blockchair.com/bitcoin/mempool/outputs +- https://blockchair.com/bitcoin-cash/mempool/outputs +- https://blockchair.com/litecoin/mempool/outputs +- https://blockchair.com/bitcoin-sv/mempool/outputs +- https://blockchair.com/dogecoin/mempool/outputs +- https://blockchair.com/dash/mempool/outputs +- https://blockchair.com/groestlcoin/mempool/outputs +- https://blockchair.com/bitcoin/testnet/mempool/outputs From f2c542c6a6c017c1e4cdeac0afca395dfe7d27fc Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Thu, 12 Mar 2020 19:29:10 +0300 Subject: [PATCH 112/180] v.2.0.47 --- API_DOCUMENTATION_EN.md | 131 ++++++++++++++++++++++++++-------------- 1 file changed, 86 insertions(+), 45 deletions(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index 0086c9c8..c3f3b69a 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,4 +1,4 @@ -# [Blockchair.com](https://blockchair.com/) API v.2.0.46 Documentation +# [Blockchair.com](https://blockchair.com/) API v.2.0.47 Documentation ``` ____ __ __ __ _ @@ -30,7 +30,7 @@ + [Omni Layer stats](#link_500) + [ERC-20 stats](#link_509) + [Dashboard endpoints](#link_M2) (Retrieve information about various entities in a neat format from our databases) - + [Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin, and Bitcoin Testnet](#link_M21) + + [Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin, Zcash, and Bitcoin Testnet](#link_M21) - [Block](#link_100) - [Transaction](#link_200) - [Address and extended public key (xpub)](#link_300) @@ -41,11 +41,10 @@ - [Address](#link_302) + [Second layers](#link_M23) - [Omni Layer property](#link_501) - - [Wormhole property](#link_501) - [ERC-20 token](#link_503) - [ERC-20 token holder](#link_504) + [Raw data endpoints](#link_M3) (Retrieve raw information about various entities directly from our full nodes) - - [Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin, and Bitcoin Testnet](#link_M31) + - [Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin, Zcash, and Bitcoin Testnet](#link_M31) - [Block](#link_101) - [Transaction](#link_201) - [Ethereum](#link_M32) @@ -72,7 +71,7 @@ - [Transaction](#link_211) - [Address](#link_307) + [Infinitable endpoints](#link_05) (SQL-like queries: filter, sort, and aggregate blockchain data) - + [Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin, and Bitcoin Testnet](#link_M41) + + [Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin, Zcash, and Bitcoin Testnet](#link_M41) + [Blocks](#link_102) (table) + [Transactions](#link_203) (table) + [Outputs](#link_400) (table) @@ -84,7 +83,6 @@ + [Calls](#link_403) (table) + [Second layers](#link_M43) + [Omni Layer properties](#link_502) (table) - + [Wormhole properties](#link_502) (table) + [ERC-20 tokens](#link_505) (table) + [ERC-20 transactions](#link_506) (table) + [Misc endpoints](#link_M5) @@ -102,7 +100,7 @@ # Introduction -Blockchair API provides developers with access to data contained in [14 different blockchains](#link_M01). Unlike other APIs, Blockchair also supports numerous analytical queries like filtering, sorting, and aggregating blockchain data. +Blockchair API provides developers with access to data contained in [15 different blockchains](#link_M01). Unlike other APIs, Blockchair also supports numerous analytical queries like filtering, sorting, and aggregating blockchain data. Here are some examples of what you can build using our API: @@ -126,8 +124,8 @@ Our API is free to try under some limitations, and we have a variety of premium ## Supported blockchains and second layers -As of today, our API supports **14 blockchains** (12 mainnets and 2 testnets) divided into 7 groups: -* Bitcoin-like blockchains (Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin, Bitcoin Testnet), also known as UTXO-based blockchains +As of today, our API supports **15 blockchains** (13 mainnets and 2 testnets) divided into 7 groups: +* Bitcoin-like blockchains (Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin, Zcash, Bitcoin Testnet), also known as UTXO-based blockchains * Ethereum-like blockchains (Ethereum) * Ripple-like blockchains (Ripple) * Stellar-like blockchains (Stellar) @@ -153,6 +151,7 @@ Here's the list of available mainnets: | Stellar | Stellar-like | `https://api.blockchair.com/stellar` | Alpha mode, possible compatibility-breaking changes | | Monero | Monero-like | `https://api.blockchair.com/monero` | Alpha mode, possible compatibility-breaking changes | | Cardano | Cardano-like | `https://api.blockchair.com/cardano` | Alpha mode, possible compatibility-breaking changes | +| Zcash | Bitcoin-like | `https://api.blockchair.com/zcash` | Full support | There are also following testnets supported which are technically considered as separate blockchains: @@ -194,7 +193,7 @@ Wormhole support was dropped on January 1st, 2020 with a 3-month notice as it's This is the full list of available API endpoints. -- `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, or `bitcoin/testnet` +- `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `zcash`, or `bitcoin/testnet` - `{:eth_chain}` can be only `ethereum` - `{:xrp_chain}` can be only `ripple` - `{:xlm_chain}` can be only `stellar` @@ -272,13 +271,10 @@ This is the full list of available API endpoints. | `https://api.blockchair.com/{:eth_chain}/uncles?{:query}` | [👉](#link_402) | `2` | Stable | | `https://api.blockchair.com/{:eth_chain}/calls?{:query}` | [👉](#link_403) | `10` | Stable | | `https://api.blockchair.com/{:xmr_chain}/outputs?{:query}` | [👉](#link_306) | `1` | Alpha | -| **Special second layer protocol endpoints (Omni Layer, Wormhole, ERC-20 tokens)** | — | — | — | +| **Special second layer protocol endpoints (Omni Layer and ERC-20 tokens)** | — | — | — | | `https://api.blockchair.com/bitcoin/omni/stats` | [👉](#link_500) | `1` | Alpha | | `https://api.blockchair.com/bitcoin/omni/dashboards/property/{:prorerty_id}` | [👉](#link_501) | `1` | Alpha | | `https://api.blockchair.com/bitcoin/omni/properties` | [👉](#link_502) | `10` | Alpha | -| `https://api.blockchair.com/bitcoin-cash/wormhole/stats` | [👉](#link_500) | `1` | Alpha | -| `https://api.blockchair.com/bitcoin-cash/wormhole/dashboards/property/{:prorerty_id}` | [👉](#link_501) | `1` | Alpha | -| `https://api.blockchair.com/bitcoin-cash/wormhole/properties` | [👉](#link_502) | `10` | Alpha | | `https://api.blockchair.com/ethereum/erc-20/{:token_address}/stats` | [👉](#link_503) | `1` | Beta | | `https://api.blockchair.com/ethereum/erc-20/{:token_address}/dashboards/address/{:address}` | [👉](#link_504) | `1` | Beta | | `https://api.blockchair.com/ethereum/erc-20/tokens?{:query}` | [👉](#link_505) | `2` | Beta | @@ -369,10 +365,10 @@ Here's our policy: - If you use our API occasionally for personal use or testing up to 1440 requests a day (1 request a minute in average) — a key is not required - Non-commercial and academic projects which require up to 1440 requests a day — a key is not required -- Non-commercial and academic projects requiring more than 1440 requests a day should apply for a Premium API key, and are a subject to a discount up to 50% -- Non-commercial and academic projects requiring more than 1440 requests a day which are also Blockchair partners are a subject to a discount up to 100% +- Non-commercial and academic projects requiring more than 1440 requests a day should apply for a Premium API key, and are subject to a discount up to 50% +- Non-commercial and academic projects requiring more than 1440 requests a day which are also Blockchair partners are subject to a discount up to 100% - Commercial projects should apply for a key to Premium API not depending on the required number of requests -- Commercial projects which are also Blockchair partners (e.g. linking to Blockchair from the app's interface) are a subject to a discount up to 10% +- Commercial projects which are also Blockchair partners (e.g. linking to Blockchair from the app's interface) are subject to a discount up to 10% | | Up to 1440 requests a day | More than 1440 requests a day | | ------------------------------ | ------------------------- | ------------------------------------ | @@ -461,7 +457,7 @@ If you require data on just one blockchain, please use `https://api.blockchair.c **Output:** -`data` contains an array with stats on 12 blockchains we support at once: +`data` contains an array with stats on 13 blockchains we support at once: - Bitcoin - Bitcoin Cash @@ -476,6 +472,7 @@ If you require data on just one blockchain, please use `https://api.blockchair.c - Telegram Open Network Testnet - Monero - Cardano +- Zcash Note that Bitcoin Testnet stats are not included in this output, and TON Testnet will be changed to TON Mainnet as soon as it's launched. @@ -565,6 +562,12 @@ Description of the fields is available in the next three sections of documentati "blocks": 3673733, ... } + }, + "zcash": { + "data": { + "blocks": 756512, + ... + } } }, "context": { @@ -597,6 +600,7 @@ Always `1`. * `https://api.blockchair.com/dogecoin/stats` * `https://api.blockchair.com/dash/stats` * `https://api.blockchair.com/groestlcoin/stats` +* `https://api.blockchair.com/zcash/stats` * `https://api.blockchair.com/bitcoin/testnet/stats` **Output:** @@ -710,6 +714,10 @@ Always `1`. - https://blockchair.com/dogecoin - https://blockchair.com/dash - https://blockchair.com/groestlcoin +- https://blockchair.com/zcash +- https://blockchair.com/bitcoin/testnet + + @@ -1183,7 +1191,7 @@ Always `1`. -## Omni Layer and Wormhole stats +## Omni Layer stats Allows to retrieve the some basic stats on Omni Layer (Bitcoin). Note that this endpoint is in the Alpha stage, and Wormhole (Bitcoin Cash Omni-like token system) was phased out on January 1st, 2020. @@ -1268,7 +1276,7 @@ The API supports a number of calls that produce some aggregated data, or data in -## Dashboard endpoints for Bitcoin-like blockchains (Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin, Bitcoin Testnet) +## Dashboard endpoints for Bitcoin-like blockchains (Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin, Zcash, Bitcoin Testnet) @@ -1283,7 +1291,7 @@ The API supports a number of calls that produce some aggregated data, or data in **Where:** -* `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `bitcoin/testnet` +* `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `zcash`, `bitcoin/testnet` * `{:height}ᵢ` is the block height (integer value), also known as block id * `{:hash}ᵢ` is the block hash (regex: `/^[0-9a-f]{64}$/i`) @@ -1391,6 +1399,8 @@ Note that the total number of transactions in the block is contained in `data.{: - https://blockchair.com/dogecoin/block/0 - https://blockchair.com/dash/block/0 - https://blockchair.com/groestlcoin/block/0 +- https://blockchair.com/zcash/block/0 +- https://blockchair.com/bitcoin/testnet/block/0 @@ -1403,13 +1413,12 @@ Note that the total number of transactions in the block is contained in `data.{: **Where:** -* `{:chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `bitcoin/testnet` +* `{:chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `zcash`, `bitcoin/testnet` * `{:hashᵢ}` is the transaction hash (regex: `/^[0-9a-f]{64}$/i`), also known as txid **Possible options:** - `?omni=true` (for `bitcoin` only; in alpha test mode) — shows information about Omni Layer token transfers in this transaction -- `?wormhole=true` (for `bitcoin-cash` only; in alpha test mode) — shows information about Wormhole token transfers in this transaction **Output:** @@ -1421,7 +1430,6 @@ Note that the total number of transactions in the block is contained in `data.{: Additional data: * `data.{:hash}ᵢ.layer_2.omni` (for `bitcoin` only; in alpha test mode) — Omni layer transaction data in case there's any -* `data.{:hash}ᵢ.layer_2.wormhole` (for `bitcoin-cash` only; in alpha test mode) — Wormhole layer transaction data in case there's any In case transaction is confirmed on the blockchain, `data.{:hash}ᵢ.transaction.block_id` contains the block number it's included in. If the transaction is in the mempool, `data.{:hash}ᵢ.transaction.block_id` yields `-1`. If the transaction is neither present in the blockchain, nor in the mempool, there won't be `data.{:hash}ᵢ` key with data. @@ -1581,7 +1589,7 @@ For mempool transactions shows priority (`position`) — for chains supporting S - `1` for `https://api.blockchair.com/{:btc_chain}/dashboards/transaction/{:hash}₀` endpoint - `1 + (0.1 * (entity count - 1))` for `https://api.blockchair.com/{:btc_chain}/dashboards/transactions/{:hash}₀,...,{:hash}ᵩ` endpoint (e.g. it's `1 + (0.1 * (10 - 1)) = 1.9` for requesting 10 transactions) -- Using `?omni=true` or `?wormhole=true` adds `1` for each requested transaction +- Using `?omni=true` adds `1` for each requested transaction **Explore visualization on our front-end:** @@ -1599,7 +1607,7 @@ For mempool transactions shows priority (`position`) — for chains supporting S **Where:** -* `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `bitcoin/testnet` +* `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `zcash`, `bitcoin/testnet` * `{:address}ᵢ` is the address, possible formats are: * `p2pk`/`p2pkh` format (supported for all blockchains, example for Bitcoin: `1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa`) @@ -2730,7 +2738,7 @@ Notes: -### Omni Layer and Wormhole property info +### Omni Layer property info Allows to retrieve the some basic information on an Omni Layer (Bitcoin) property (token). @@ -2962,7 +2970,7 @@ Retrieve raw information about various entities directly from our full nodes -## Raw data endpoints for Bitcoin-like blockchains (Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin, Bitcoin Testnet) +## Raw data endpoints for Bitcoin-like blockchains (Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin, Zcash, Bitcoin Testnet) @@ -2977,7 +2985,7 @@ Returns raw block data directly from our full node. If the block is larger than **Where:** -- `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `bitcoin/testnet` +- `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `zcash`, `bitcoin/testnet` - `{:height}ᵢ` is the block height (integer value), also known as block id - `{:hash}ᵢ` is the block hash (regex: `/^[0-9a-f]{64}$/i`) @@ -3056,7 +3064,7 @@ Returns raw transaction data directly from our full node. **Where:** -- `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `bitcoin/testnet` +- `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `zcash`, `bitcoin/testnet` - `{:hash}ᵢ` is the transaction hash (regex: `/^[0-9a-f]{64}$/i`) **Output:** @@ -5282,13 +5290,12 @@ Just don't ask why do we call that `infinitables`… Infinite tables? Maybe. * `{:eth_chain}/mempool/transactions` * `{:eth_chain}/calls` * `bitcoin/omni/properties` -* `bitcoin-cash/wormhole/properties` * `ethereum/erc-20/tokens` * `ethereum/erc-20/transactions` Where: -* `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, or `bitcoin/testnet` +* `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `zcash`, or `bitcoin/testnet` * `{:eth_chain}` can be only `ethereum` Note on mempool tables: to speed up some requests, our architecture have separate tables (`{:chain}/mempool/{:entity}`) for unconfirmed transactions. Unlike with dashboard endpoints which search entities like transactions in both the blockchain and the mempool, infinitable endpoints don't do that. @@ -5524,7 +5531,6 @@ Applying a limit over the default multiplies the summed cost by `1 + 0.01 * numb | `{:eth_chain}/mempool/transactions` | `2` | | `{:eth_chain}/calls` | `10` | | `bitcoin/omni/properties` | `10` | -| `bitcoin-cash/wormhole/properties` | `10` | | `ethereum/erc-20/tokens` | `2` | | `ethereum/erc-20/transactions` | `5` | @@ -5551,7 +5557,7 @@ There can also be synthetic columns which aren't shown in the response, but you -## Inifinitable endpoints for Bitcoin-like blockchains (Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin, Bitcoin Testnet) +## Inifinitable endpoints for Bitcoin-like blockchains (Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin, Zcash, Bitcoin Testnet) @@ -5563,7 +5569,7 @@ There can also be synthetic columns which aren't shown in the response, but you **Where:** -- `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `bitcoin/testnet` +- `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `zcash`, `bitcoin/testnet` - `{:query}` is the query against the table ([how to build a query](#link_05)) **Output:** @@ -5584,7 +5590,10 @@ There can also be synthetic columns which aren't shown in the response, but you | version_hex | string `[0-9a-f]*` | Version field in hex | | | | | | version_bits | string `[01]{30}` | Version field in binary format | | | | | | merkle_root | `[0-9a-f]{64}` | Merkle root hash | | | | | +| final_sapling_root § | `[0-9a-f]{64}` | Sapling root hash | | | | | | nonce | int | Nonce value | `*` | `+` | | | +| solution § | `[0-9a-f]*` | Solution value | | | | | +| anchor § | `[0-9a-f]*` | Anchor value | | | | | | bits | int | Bits field | `*` | `+` | | | | difficulty | float | Difficulty | `*` | `+` | | `+` | | chainwork | string `[0-9a-f]{64}` | Chainwork field | | | | | @@ -5611,6 +5620,7 @@ There can also be synthetic columns which aren't shown in the response, but you | guessed_miner | string `.*` | The supposed name of the miner who found the block (the heuristic is based on `coinbase_data_bin` and the addresses to which the reward goes) | `=` | `+` | `+` | | | is_aux ‡ | boolean | Whether a block was mined using AuxPoW | `=` | | `+` | | | cbtx ※ | string `.*` | Coinbase transaction data (encoded JSON) | | | | | +| shielded_value_delta_total § | int | Amount transferred into the shielded pool | `*` | `+` | | `+` | Additional synthetic columns @@ -5624,6 +5634,7 @@ Notes: - † — only for Bitcoin, Litecoin, Groestlcoin, and Bitcoin Testnet (SegWit data) - ‡ — only for Dogecoin - ※ — only for Dash +- § — only for Zcash - The default sorting — `id DESC` **Example output:** @@ -5698,6 +5709,7 @@ See [request costs for infinitables](#link_05) - https://blockchair.com/dogecoin/blocks - https://blockchair.com/dash/blocks - https://blockchair.com/groestlcoin/blocks +- https://blockchair.com/zcash/blocks - https://blockchair.com/bitcoin/testnet/blocks @@ -5711,7 +5723,7 @@ See [request costs for infinitables](#link_05) **Where:** -- `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `bitcoin/testnet` +- `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `zcash`, `bitcoin/testnet` - `{:query}` is the query against the table ([how to build a query](#link_05)) **Output:** @@ -5754,11 +5766,26 @@ Additional Dash-specific columns: | is_special ※ | boolean | `true` for all transaction types except `simple` | `=` | | | | | special_json ※ | string `.*` | Special transaction data (encoded JSON string) | | | | | +Additional Zcash-specific columns: + +| Column | Type | Description | Q? | S? | A? | C? | +| ----------------- | ------------- | ------------------------------------------------------------ | ---- | ---- | ---- | ---- | +| shielded_value_delta § | int | Amount transferred into the shielded pool | `*` | `+` | | `+` | +| version_group_id § | string `[0-9a-f]*` | Special version field | `=` | | `+` | | +| is_overwintered § | boolean | Is overwintered? | `=` | | `+` | | +| expiry_height § | int | Expiry height | `*` | `+` | | | +| join_split_raw § | json | Raw 'v_join_split' value | | | | | +| shielded_input_raw § | json | Raw 'v_shielded_spend' value | | | | | +| shielded_output_raw § | json | Raw 'v_shielded_output' value | | | | | +| binding_signature § | string `[0-9a-f]*` | Binding signature | | | | | + + Notes: - `increased efficiency` method applies if querying `id` and ` hash` columns using the `equals` operator - † — only for Bitcoin, Litecoin, Groestlcoin, and Bitcoin Testnet (SegWit data) - ※ — only for Dash +- § — only for Zcash - The default sorting — `id DESC` - `block_id` for mempool transactions is `-1` @@ -5821,6 +5848,7 @@ See [request costs for infinitables](#link_05) - https://blockchair.com/dogecoin/transactions - https://blockchair.com/dash/transactions - https://blockchair.com/groestlcoin/transactions +- https://blockchair.com/zcash/transactions - https://blockchair.com/bitcoin/testnet/transactions - https://blockchair.com/bitcoin/mempool/transactions - https://blockchair.com/bitcoin-cash/mempool/transactions @@ -5829,6 +5857,7 @@ See [request costs for infinitables](#link_05) - https://blockchair.com/dogecoin/mempool/transactions - https://blockchair.com/dash/mempool/transactions - https://blockchair.com/groestlcoin/mempool/transactions +- https://blockchair.com/zcash/mempool/transactions - https://blockchair.com/bitcoin/testnet/mempool/transactions @@ -5843,7 +5872,7 @@ See [request costs for infinitables](#link_05) **Where:** -- `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `bitcoin/testnet` +- `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `zcash`, `bitcoin/testnet` - `{:query}` is the query against the table ([how to build a query](#link_05)) **Output:** @@ -6004,6 +6033,7 @@ See [request costs for infinitables](#link_05) - https://blockchair.com/dogecoin/outputs - https://blockchair.com/dash/outputs - https://blockchair.com/groestlcoin/outputs +- https://blockchair.com/zcash/outputs - https://blockchair.com/bitcoin/testnet/outputs - https://blockchair.com/bitcoin/mempool/outputs - https://blockchair.com/bitcoin-cash/mempool/outputs @@ -6012,6 +6042,7 @@ See [request costs for infinitables](#link_05) - https://blockchair.com/dogecoin/mempool/outputs - https://blockchair.com/dash/mempool/outputs - https://blockchair.com/groestlcoin/mempool/outputs +- https://blockchair.com/zcash/mempool/outputs - https://blockchair.com/bitcoin/testnet/mempool/outputs @@ -6025,7 +6056,7 @@ See [request costs for infinitables](#link_05) **Where:** -- `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `bitcoin/testnet` +- `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `zcash`, `bitcoin/testnet` - `{:query}` is the query against the table ([how to build a query](#link_05)) **Output:** @@ -6156,6 +6187,7 @@ See [request costs for infinitables](#link_05) - https://blockchair.com/dogecoin/addresses - https://blockchair.com/dash/addresses - https://blockchair.com/groestlcoin/addresses +- https://blockchair.com/zcash/addresses - https://blockchair.com/bitcoin/testnet/addresses @@ -6658,7 +6690,7 @@ See [request costs for infinitables](#link_05) -### `properties` table (Omni Layer and Wormhole) +### `properties` table (Omni Layer) Note: this particular table doesn't support querying. The only query section it supports is `?offset=`. Note that this endpoint is in the Alpha stage. @@ -6915,7 +6947,7 @@ Broadcast a transaction to the network **Where:** -- `{:chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `ethereum`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `bitcoin/testnet` +- `{:chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `ethereum`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `zcash`, `bitcoin/testnet` - `POST` data should contain `data` parameter with raw transaction represented in hex (for Ethereum it should start with `0x`) **Output:** @@ -6972,13 +7004,13 @@ List of full network nodes **Endpoints:** - `https://api.blockchair.com/{:btc_chain}/nodes` (agregated data on nodes + node list) -- `https://api.blockchair.com/nodes` (agregated data on nodes for 7 networks at once) +- `https://api.blockchair.com/nodes` (agregated data on nodes for 8 networks at once) Please note that the number of nodes is also available in the `https://api.blockchair.com/stats` and `https://api.blockchair.com/{:btc_chain}/stats` endpoints output. **Where:** -- `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin` +- `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `zcash` **Output:** @@ -6990,7 +7022,7 @@ Please note that the number of nodes is also available in the `https://api.block - `data.versions` — number of nodes grouped by node version - `data.heights` — number of nodes grouped by their best block height -`https://api.blockchair.com/nodes` endpoint shows this data for 7 coins at once (`bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`), but it doesn't have the `data.nodes` array, i.e. there's only aggregated data. +`https://api.blockchair.com/nodes` endpoint shows this data for 8 coins at once (`bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `zcash`), but it doesn't have the `data.nodes` array, i.e. there's only aggregated data. **Example output:** @@ -7056,6 +7088,7 @@ Always `1`. * https://blockchair.com/dogecoin/nodes * https://blockchair.com/dash/nodes * https://blockchair.com/groestlcoin/nodes +* https://blockchair.com/zcash/nodes @@ -7070,7 +7103,7 @@ Allows to query state changes caused by a block and potential state changes caus **Where:** -- `{:chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `bitcoin/testnet`. The first endpoint also supports `ethereum` +- `{:chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `zcash`, `bitcoin/testnet`. The first endpoint also supports `ethereum` - `{:height}` is the block height (integer value), also known as block id **Output:** @@ -7257,6 +7290,13 @@ The response contains an array where the keys are blockchains, and the values ar "blockchair_first_entry": 1, "blockchair_first_entry_date": "2017-09-23", "is_full": true + }, + "zcash": { + "blockchain_first_entry": 0, + "blockchain_first_entry_date": "2016-10-28", + "blockchair_first_entry": 0, + "blockchair_first_entry_date": "2016-10-28", + "is_full": true } }, "context": { @@ -7369,7 +7409,8 @@ This endpoint returns the list of latest software (core clients) releases for bl "groestlcoin": "Groestlcoin Core", "stellar": "Stellar Core", "monero": "Monero", - "cardano": "Cardano SL" + "cardano": "Cardano SL", + "zcash": "Zcash" }, ... } From 1a9b0fda1281f45a0af3d8fbf2bc584ce63b7b58 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Thu, 12 Mar 2020 19:37:41 +0300 Subject: [PATCH 113/180] v.2.0.47 --- API.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/API.md b/API.md index 003ab8e9..842ba6bc 100644 --- a/API.md +++ b/API.md @@ -3,7 +3,7 @@ Logo ### API v.2 documentation -* English: [https://blockchair.com/api/docs](https://blockchair.com/api/docs) (up to v.2.0.46) +* English: [https://blockchair.com/api/docs](https://blockchair.com/api/docs) (up to v.2.0.47) ### Please apply for an API key first @@ -26,6 +26,8 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.47 - March 12th, 2020 + * Added Zcash support. Features: dashboard endpoints, raw endpoints, infinitables (allowing to filter and sort blockchain data), node explorer, and many more. * v.2.0.46 - March 3rd, 2020 * There's a new interface for our Premium API users available at `https://api.blockchair.com/premium`. It's now possible to buy and extend a subscription using this interface as well as to track some basic stats. Subscription extending is not available for existing customers with custom plans, please contact us at if you'd like to have an automated interface. * v.2.0.45 - February 6th, 2020 From a3d979e4ef5e3ebd4500d1fa14d3fc4e75bdb331 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Wed, 22 Apr 2020 20:56:06 +0300 Subject: [PATCH 114/180] v.2.0.48 --- API.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/API.md b/API.md index 842ba6bc..3fe1854c 100644 --- a/API.md +++ b/API.md @@ -3,7 +3,7 @@ Logo ### API v.2 documentation -* English: [https://blockchair.com/api/docs](https://blockchair.com/api/docs) (up to v.2.0.47) +* English: [https://blockchair.com/api/docs](https://blockchair.com/api/docs) (up to v.2.0.48) ### Please apply for an API key first @@ -26,6 +26,20 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.48 - April 22nd, 2020 (Lenin turns 150 today!) + * Added Mixin support. The list of new endpoints (see the documentation for details): + * `https://api.blockchair.com/mixin/stats` + * `https://api.blockchair.com/mixin/raw/snapshots` + * `https://api.blockchair.com/mixin/raw/mintings` + * `https://api.blockchair.com/mixin/raw/nodes` + * `https://api.blockchair.com/mixin/raw/graph` + * `https://api.blockchair.com/mixin/raw/snapshot/{:hash}` + * `https://api.blockchair.com/mixin/raw/snapshot/{:id}` + * `https://api.blockchair.com/mixin/raw/transaction/{:hash}` + * `https://api.blockchair.com/mixin/raw/round/{:hash}` + * `https://api.blockchair.com/mixin/raw/round/({:id},{:node_hash})` + * `https://api.blockchair.com/mixin/raw/node/{:node_hash}` + * `https://api.blockchair.com/mixin/push/transaction` * v.2.0.47 - March 12th, 2020 * Added Zcash support. Features: dashboard endpoints, raw endpoints, infinitables (allowing to filter and sort blockchain data), node explorer, and many more. * v.2.0.46 - March 3rd, 2020 From c1ce840c6463a2126ba13f5d97173e4a45ca7f20 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Wed, 22 Apr 2020 20:58:29 +0300 Subject: [PATCH 115/180] v.2.0.48 --- API_DOCUMENTATION_EN.md | 912 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 899 insertions(+), 13 deletions(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index c3f3b69a..d6b97f84 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,4 +1,4 @@ -# [Blockchair.com](https://blockchair.com/) API v.2.0.47 Documentation +# [Blockchair.com](https://blockchair.com/) API v.2.0.48 Documentation ``` ____ __ __ __ _ @@ -27,6 +27,7 @@ + [TON-like blockchain stats](#link_005) + [Monero-like blockchain stats](#link_006) + [Cardano-like blockchain stats](#link_007) + + [Mixin-like DAG stats](#link_008) + [Omni Layer stats](#link_500) + [ERC-20 stats](#link_509) + [Dashboard endpoints](#link_M2) (Retrieve information about various entities in a neat format from our databases) @@ -70,6 +71,12 @@ - [Block](#link_110) - [Transaction](#link_211) - [Address](#link_307) + - [Mixin](#link_M38) + - [Snapshot](#link_111) + - [Round](#link_404) + - [Transaction](#link_212) + - [Node](#link_405) + - [Graph](#link_406) + [Infinitable endpoints](#link_05) (SQL-like queries: filter, sort, and aggregate blockchain data) + [Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin, Zcash, and Bitcoin Testnet](#link_M41) + [Blocks](#link_102) (table) @@ -81,6 +88,10 @@ + [Uncles](#link_402) (table) + [Transactions](#link_206) (table) + [Calls](#link_403) (table) + + [Mixin](#link_M44) + + [Snapshots](#link_407) (table) + + [Mintings](#link_408) (table) + + [Nodes](#link_409) (table) + [Second layers](#link_M43) + [Omni Layer properties](#link_502) (table) + [ERC-20 tokens](#link_505) (table) @@ -100,7 +111,7 @@ # Introduction -Blockchair API provides developers with access to data contained in [15 different blockchains](#link_M01). Unlike other APIs, Blockchair also supports numerous analytical queries like filtering, sorting, and aggregating blockchain data. +Blockchair API provides developers with access to data contained in [16 different blockchains](#link_M01). Unlike other APIs, Blockchair also supports numerous analytical queries like filtering, sorting, and aggregating blockchain data. Here are some examples of what you can build using our API: @@ -124,7 +135,7 @@ Our API is free to try under some limitations, and we have a variety of premium ## Supported blockchains and second layers -As of today, our API supports **15 blockchains** (13 mainnets and 2 testnets) divided into 7 groups: +As of today, our API supports **16 blockchains** (14 mainnets and 2 testnets) divided into 7 groups: * Bitcoin-like blockchains (Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin, Zcash, Bitcoin Testnet), also known as UTXO-based blockchains * Ethereum-like blockchains (Ethereum) * Ripple-like blockchains (Ripple) @@ -132,6 +143,7 @@ As of today, our API supports **15 blockchains** (13 mainnets and 2 testnets) di * TON-like blockchains (Telegram Open Network Testnet) * Monero-like blockchains (Monero) * Cardano-like blockchains (Cardano) +* Mixin-like DAGs (Mixin) — technically, it's a DAG rather than a blockchain, but for the sake of unification it may be mentioned as a blockchain further in this documentation Within a group, there's no or little difference between the set of available endpoints and their output. @@ -152,6 +164,7 @@ Here's the list of available mainnets: | Monero | Monero-like | `https://api.blockchair.com/monero` | Alpha mode, possible compatibility-breaking changes | | Cardano | Cardano-like | `https://api.blockchair.com/cardano` | Alpha mode, possible compatibility-breaking changes | | Zcash | Bitcoin-like | `https://api.blockchair.com/zcash` | Full support | +| Mixin | Mixin-like | `https://api.blockchair.com/mixin` | Full support | There are also following testnets supported which are technically considered as separate blockchains: @@ -200,6 +213,7 @@ This is the full list of available API endpoints. - `{:ton_chain}` can be only `ton/testnet` - `{:xmr_chain}` can be only `monero` - `{:ada_chain}` can be only `cardano` +- `{:xin_chain}` can be only `mixin` | Endpoint path | Docs | Base request cost | Status | | ----------------------------------------------- | :----------------: | -----------------------------: | :---------------------------------------------: | @@ -207,11 +221,12 @@ This is the full list of available API endpoints. | `https://api.blockchair.com/stats` | [👉](#link_000) | `1` | Stable | | `https://api.blockchair.com/{:btc_chain}/stats` | [👉](#link_001) | `1` | Stable | | `https://api.blockchair.com/{:eth_chain}/stats` | [👉](#link_002) | `1` | Stable | -| `https://api.blockchair.com/{:xrp_chain}/stats` | [👉](#link_003) | `1` | Alpha | -| `https://api.blockchair.com/{:xlm_chain}/stats` | [👉](#link_004) | `1` | Alpha | -| `https://api.blockchair.com/{:ton_chain}/stats` | [👉](#link_005) | `1` | Alpha | -| `https://api.blockchair.com/{:xmr_chain}/stats` | [👉](#link_006) | `1` | Alpha | -| `https://api.blockchair.com/{:ada_chain}/stats` | [👉](#link_007) | `1` | Alpha | +| `https://api.blockchair.com/{:xrp_chain}/stats` | [👉](#link_003) | `1` | Stable | +| `https://api.blockchair.com/{:xlm_chain}/stats` | [👉](#link_004) | `1` | Stable | +| `https://api.blockchair.com/{:ton_chain}/stats` | [👉](#link_005) | `1` | Stable | +| `https://api.blockchair.com/{:xmr_chain}/stats` | [👉](#link_006) | `1` | Stable | +| `https://api.blockchair.com/{:ada_chain}/stats` | [👉](#link_007) | `1` | Stable | +| `https://api.blockchair.com/{:xin_chain}/stats` | [👉](#link_008) | `1` | Stable | | **Block-related information** | — | — | — | | `https://api.blockchair.com/{:btc_chain}/dashboards/block/{:height}₀` | [👉](#link_100) | `1` | Stable | | `https://api.blockchair.com/{:btc_chain}/dashboards/block/{:hash}₀` | [👉](#link_100) | `1` | Stable | @@ -235,6 +250,8 @@ This is the full list of available API endpoints. | `https://api.blockchair.com/{:xmr_chain}/raw/block/{:hash}₀` | [👉](#link_109) | `1` | Alpha | | `https://api.blockchair.com/{:ada_chain}/raw/block/{:height}₀` | [👉](#link_110) | `1` | Alpha | | `https://api.blockchair.com/{:ada_chain}/raw/block/{:hash}₀` | [👉](#link_110) | `1` | Alpha | +| `https://api.blockchair.com/{:xin_chain}/raw/snapshot/{:height}₀` | [👉](#link_111) | `1` | Alpha | +| `https://api.blockchair.com/{:xin_chain}/raw/snapshot/{:hash}₀` | [👉](#link_111) | `1` | Alpha | | **Transaction-related information and actions** | — | — | — | | `https://api.blockchair.com/{:btc_chain}/dashboards/transaction/{:hash}₀` | [👉](#link_200) | `1` | Stable | | `https://api.blockchair.com/{:btc_chain}/dashboards/transactions/{:hash}₀,...,{:hash}ᵩ` | [👉](#link_200) | `1 + 0.1*c` | Stable | @@ -253,6 +270,8 @@ This is the full list of available API endpoints. | `https://api.blockchair.com/{:ton_chain}/raw/transaction/{:tuple}₀` | [👉](#link_209) | `1` | Alpha | | `https://api.blockchair.com/{:xmr_chain}/raw/transaction/{:hash}₀` | [👉](#link_210) | `1` | Alpha | | `https://api.blockchair.com/{:ada_chain}/raw/transaction/{:hash}₀` | [👉](#link_211) | `1` | Alpha | +| `https://api.blockchair.com/{:xin_chain}/raw/transaction/{:hash}₀` | [👉](#link_212) | `1` | Alpha | +| `https://api.blockchair.com/{:xin_chain}/push/transaction` (`POST`) | [👉](#link_202) | `1` | Stable | | **Address-related information** | — | — | — | | `https://api.blockchair.com/{:btc_chain}/dashboards/address/{:address}₀` | [👉](#link_300) | `1` | Stable | | `https://api.blockchair.com/{:btc_chain}/dashboards/addresses/{:address}₀,...,{:address}ᵩ` | [👉](#link_300) | `1 + 0.1*c` | Stable | @@ -271,6 +290,13 @@ This is the full list of available API endpoints. | `https://api.blockchair.com/{:eth_chain}/uncles?{:query}` | [👉](#link_402) | `2` | Stable | | `https://api.blockchair.com/{:eth_chain}/calls?{:query}` | [👉](#link_403) | `10` | Stable | | `https://api.blockchair.com/{:xmr_chain}/outputs?{:query}` | [👉](#link_306) | `1` | Alpha | +| `https://api.blockchair.com/{:xin_chain}/raw/round/{:hash}` | [👉](#link_404) | `1` | Alpha | +| `https://api.blockchair.com/{:xin_chain}/raw/round/({:node_hash},{:id})` | [👉](#link_404) | `1` | Alpha | +| `https://api.blockchair.com/{:xin_chain}/raw/node/{:hash}` | [👉](#link_405) | `1` | Alpha | +| `https://api.blockchair.com/{:xin_chain}/raw/graph` | [👉](#link_406) | `1` | Alpha | +| `https://api.blockchair.com/{:xin_chain}/raw/snapshots?{:query}` | [👉](#link_407) | `1` | Alpha | +| `https://api.blockchair.com/{:xin_chain}/raw/mintings?{:query}` | [👉](#link_408) | `1` | Alpha | +| `https://api.blockchair.com/{:xin_chain}/raw/nodes?{:query}` | [👉](#link_409) | `1` | Alpha | | **Special second layer protocol endpoints (Omni Layer and ERC-20 tokens)** | — | — | — | | `https://api.blockchair.com/bitcoin/omni/stats` | [👉](#link_500) | `1` | Alpha | | `https://api.blockchair.com/bitcoin/omni/dashboards/property/{:prorerty_id}` | [👉](#link_501) | `1` | Alpha | @@ -457,7 +483,7 @@ If you require data on just one blockchain, please use `https://api.blockchair.c **Output:** -`data` contains an array with stats on 13 blockchains we support at once: +`data` contains an array with stats on 15 blockchains we support at once: - Bitcoin - Bitcoin Cash @@ -473,6 +499,7 @@ If you require data on just one blockchain, please use `https://api.blockchair.c - Monero - Cardano - Zcash +- Mixin Note that Bitcoin Testnet stats are not included in this output, and TON Testnet will be changed to TON Mainnet as soon as it's launched. @@ -568,6 +595,12 @@ Description of the fields is available in the next three sections of documentati "blocks": 756512, ... } + }, + "mixin": { + "data": { + "snapshots": 18632532, + ... + } } }, "context": { @@ -1191,6 +1224,78 @@ Always `1`. +## Mixin-like DAG stats + +**Endpoint:** + +* `https://api.blockchair.com/mixin/stats` + +**Output:** + +`data` contains an array with DAG statistics: + +* `snapshots` — total number of snapshots +* `snapshots_24h` — number of snapshots over the last 24 hours +* `transactions_24h` — number of transactions over the last 24 hours +* `mempool_transactions` — number of unvonfirmed transactions +* `tps_24h` — transactions per second over 24 hours period +* `best_snapshot_height` — the latest snapshot number +* `best_snapshot_hash` — the latest snapshots hash +* `best_snapshot_time` — the latest snapshot time (UTC) +* `circulation` — number of coins in circulation (smallest denomination) +* `circulation_xin` — number of coins in circulation (in XINs) +* `market_price_usd` — average market price of 1 coin in USD (market data source: CoinGecko) +* `market_price_btc` — average market price of 1 coin in BTC +* `market_price_usd_change_24h_percentage` — market price change in percent for 24 hours +* `market_cap_usd` — market capitalization (coins in circulation * price per coin in USD) +* `market_dominance_percentage` — dominance index (how much % of the total cryptocurrency market is the market capitalization of the coin) +* `countdowns` (optional) — an optional array of events ([`event`, `time_left`] format), where `time_left` is the number of seconds till the `event` +* `accepted_nodes` — number of accepted network nodes +* `mintings` — number of coin mintings + +**Example output:** + +`https://api.blockchair.com/cardano/stats`: + +```json +{ + "data": { + "snapshots": 18626733, + "snapshots_24h": 135000, + "transactions_24h": 135000, + "mempool_transactions": 0, + "tps_24h": 1.5625, + "best_snapshot_height": 18626732, + "best_snapshot_hash": "6cc46ccbd753dbaf09c1a72d94225af0aaabc5c0c1f705939c7ea77515d6d18c", + "best_snapshot_time": "2020-04-22 16:33:08", + "circulation_xin": 550991.78082032, + "circulation": 55099178082032, + "market_price_usd": 168.06, + "market_price_btc": 0.02323, + "market_price_usd_change_24h_percentage": 2.901, + "market_cap_usd": 84247126, + "market_dominance_percentage": 0.01, + "accepted_nodes": 22, + "mintings": 419 + }, + "context": { + "code": 200, + "state": 18626733, + ... + } +} +``` + +**Request cost formula:** + +Always `1`. + +**Explore visualizations on our front-end:** + +- https://blockchair.com/mixin + + + ## Omni Layer stats Allows to retrieve the some basic stats on Omni Layer (Bitcoin). Note that this endpoint is in the Alpha stage, and Wormhole (Bitcoin Cash Omni-like token system) was phased out on January 1st, 2020. @@ -5270,6 +5375,462 @@ Always `1`. +## Raw data endpoints for Mixin + + + +### Raw snapshot data + +**Endpoints:** + +- `https://api.blockchair.com/{:xin_chain}/raw/snapshot/{:height}₀` +- `https://api.blockchair.com/{:xin_chain}/raw/snapshot/{:hash}₀` + +**Where:** + +- `{:xin_chain}` can be only `mixin` +- `{:height}ᵢ` is the snapshot id (topology) +- `{:hash}ᵢ` is the snapshot hash (regex: `/^[0-9a-f]{64}$/i`) + +**Output:** + +`data` contains an associative array: + +- `data.{:id}ᵢ.snapshot` — snapshot data +- `data.{:id}ᵢ.snapshot.transaction` — transaction data + +**Example requests:** + +- `https://api.blockchair.com/mixin/raw/snapshot/0` +- `https://api.blockchair.com/mixin/raw/snapshot/75eabab3b5e3fe0a811bc2969f32716cc58bac7260b112380be45a23fc839939` + +**Example output:** + +`https://api.blockchair.com/mixin/raw/snapshot/0`: + +```json +{ + "data": [ + { + "snapshot": { + "hash": "75eabab3b5e3fe0a811bc2969f32716cc58bac7260b112380be45a23fc839939", + "node": "a721a4fc0c667c4a1222c8d80350cbe07dab55c49942c8100a8c5e2f5bb4ec50", + "references": null, + "round": 0, + "signatures": null, + "timestamp": 1551312000000000000, + "topology": 0, + "transaction": { + "asset": "a99c2e0e2b1da4d648755ef19bd95139acbbe6564cfb06dec7cd34931ca72cdc", + "extra": "065866c10424d5cfa7ca95eddad69d261ddc7c31a107f28773880bd9cb5bf611c70a3825ca359993324db9e169acb832e9ca75ec17b2b2e1f5b10ebd40eb9dca", + "hash": "f3a94f83f0a579d1a1b87f713d934df44e9b888216938667e7b2817aba71ef93", + "inputs": [ + { + "genesis": "6430225c42bb015b4da03102fa962e4f4ef3969e03e04345db229f8377ef7997" + } + ], + "outputs": [ + { + "amount": "10000.00000000", + "keys": [ + "1d2dced65983ef59ea096d75a27a276308f1ae717c66f1884125adedfda3ae3d", + "ec7d399503241bf26975719df8152feb599afb85c8cf3cc4175761421fb4c2ca", + "a5ada6adecdc3bbb8aeb128ba8ddc3f6cb3022406de5576f3d15a38e926f0b96", + "d1913a811ea696961a0d253359f9590efd77519d6005a6326a47435589e3c909", + "3796347874919f62625a8db893d254b4292248f84504e7a5c766994c6251aea9", + "e566095e3fb7949ec2fef418c2a097bc1609ac5adde2401974d7d449ae31190b", + "2486621dc6c86300a60f2a46a910771f267dba698609aa686aa76d630e58e727", + "71b3238bb152e5c63386af6bfd27bcfdd677436bb8e70520535fac2087bc5452", + "9cd1704f830d035f7917e0a7eaf79b873abb715b00f0a2713205d2660f4b533b", + "967407727188086d3ac67811603e073743945c372103323898a15004da0503d8", + "4011b7a390e3c514c9da9341fbe461e3398e1538b9647ecafe1a95a74cebdefd", + "52dae8ec6e0abaab28902f7427163de375e618aaf012d5a5c4ef4629d0b32d1d", + "7a51cc274ea7dbc39bd81737b952aeea2f3bfaba55313b9a239bdd7e1f8f792e", + "682ecb376c5af616b20c653fadc59e5c3992ee4ad6ef10b1f4cbe429b2f8e9fb", + "0359fd509abff274bf7f8eca839ea17ec33c455478c4d1088936f8ff58a71705" + ], + "mask": "1502ba20afb0fa88b64ff9fbd8f12615da0fcd57f2132a3af712fee103d5ddeb", + "script": "fffe0b", + "type": 164 + } + ], + "version": 0 + }, + "version": 0 + } + } + ], + "context": { + "code": 200, + "results": 1, + "state": 18627212, + ... + } +} +``` + +**Request cost formula:** + +Always `1`. + +**Explore visualization on our front-end:** + +- https://blockchair.com/mixin/snapshot/0 + + + +### Raw round data + +**Endpoints:** + +- `https://api.blockchair.com/{:xin_chain}/raw/round/{:hash}` +- `https://api.blockchair.com/{:xin_chain}/raw/round/({:id},{:node_hash})` + +**Where:** + +- `{:xin_chain}` can be only `mixin` +- `{:hash}` is the round hash (regex: `/^[0-9a-f]{64}$/i`) +- `{:id}` is the round id +- `{:node_hash}` is the node hash (regex: `/^[0-9a-f]{64}$/i`) + +**Output:** + +`data` contains an associative array: + +- `data.{:id}ᵢ.round` — round data + +**Example requests:**` + +- `https://api.blockchair.com/mixin/raw/round/(0,a721a4fc0c667c4a1222c8d80350cbe07dab55c49942c8100a8c5e2f5bb4ec50)` +- `https://api.blockchair.com/mixin/raw/round/3a3edfac471bdcfd0ad6f0162c1c81b2771c606dc4c4ec08f7c0174366906712` + +**Example output:** + +`https://api.blockchair.com/mixin/raw/round/(0,a721a4fc0c667c4a1222c8d80350cbe07dab55c49942c8100a8c5e2f5bb4ec50)`: + +```json +{ + "data": { + "(0,a721a4fc0c667c4a1222c8d80350cbe07dab55c49942c8100a8c5e2f5bb4ec50)": { + "round": { + "end": 1551312000000000000, + "hash": "3a3edfac471bdcfd0ad6f0162c1c81b2771c606dc4c4ec08f7c0174366906712", + "node": "a721a4fc0c667c4a1222c8d80350cbe07dab55c49942c8100a8c5e2f5bb4ec50", + "number": 0, + "references": null, + "snapshots": [ + { + "hash": "75eabab3b5e3fe0a811bc2969f32716cc58bac7260b112380be45a23fc839939", + "node": "a721a4fc0c667c4a1222c8d80350cbe07dab55c49942c8100a8c5e2f5bb4ec50", + "references": null, + "round": 0, + "timestamp": 1551312000000000000, + "topology": 0, + "transaction": "f3a94f83f0a579d1a1b87f713d934df44e9b888216938667e7b2817aba71ef93", + "version": 0 + }, + { + "hash": "35882901dbeae376b01cf61d7ef0d58d3f9545878c0f9649c086628f1eaf9ab7", + "node": "a721a4fc0c667c4a1222c8d80350cbe07dab55c49942c8100a8c5e2f5bb4ec50", + "references": null, + "round": 0, + "timestamp": 1551312000000000000, + "topology": 15, + "transaction": "4e24675df8a9d1592c82d6fa9ef86881fb2dfafe2a06b2a51134daf5a98f8411", + "version": 0 + } + ], + "start": 1551312000000000000 + } + } + }, + "context": { + "code": 200, + "results": 1, + "state": 18628189, + ... + } +} +``` + +**Request cost formula:** + +Always `1`. + +**Explore visualization on our front-end:** + +- https://blockchair.com/mixin/round/3a3edfac471bdcfd0ad6f0162c1c81b2771c606dc4c4ec08f7c0174366906712 + + + +### Raw transaction data + +**Endpoint:** + +- `https://api.blockchair.com/{:xin_chain}/raw/transaction/{:hash}₀` + +**Where:** + +- `{:xin_chain}` can be only `mixin` +- `{:hash}ᵢ` is the transaction hash (regex: `/^[0-9a-f]{64}$/i`) + +**Output:** + +`data` contains an associative array: + +- `data.{:hash}ᵢ.transaction` — transaction data + +**Example request:**` + +- `https://api.blockchair.com/mixin/raw/transaction/704f7d52b864a70cc7219d04f534fb5105f341ff8fcbc6b80f90237ea7694ed2` + +**Example output:** + +`https://api.blockchair.com/mixin/raw/transaction/704f7d52b864a70cc7219d04f534fb5105f341ff8fcbc6b80f90237ea7694ed2`: + +```json +{ + "data": { + "704f7d52b864a70cc7219d04f534fb5105f341ff8fcbc6b80f90237ea7694ed2": { + "transaction": { + "asset": "8dd50817c082cdcdd6f167514928767a4b52426997bd6d4930eca101c5ff8a27", + "extra": "1fb1bb3ab8d8423f9c7421205c694810", + "hash": "704f7d52b864a70cc7219d04f534fb5105f341ff8fcbc6b80f90237ea7694ed2", + "hex": "86a756657273696f6e01a54173736574c4208dd50817c082cdcdd6f167514928767a4b52426997bd6d4930eca101c5ff8a27a6496e707574739385a448617368c420d53c766688b082db87c762fd517af5afc31b3b00e468193cb8c10b46cd0f375ba5496e64657800a747656e65736973c0a74465706f736974c0a44d696e74c085a448617368c420313f6552d57a89f47a43ca29019d2b15b250976c1652af30795022daf4a0ae4ba5496e64657801a747656e65736973c0a74465706f736974c0a44d696e74c085a448617368c4203bc42d2d3dfd3b95c0abd97750c1f2f1c2ee89156e3c1e5b89205852ce2f8895a5496e64657800a747656e65736973c0a74465706f736974c0a44d696e74c0a74f7574707574739285a45479706500a6416d6f756e74c703005265c0a44b65797391c42049c29716841df40eb88dc21974e3b2867ffed2b37b852015746aa3c151bffdf9a6536372697074c403fffe01a44d61736bc420efe475f7f66eb1946638e1ef0dbdaa7fa6ca83cce9fa856a20dd90fbad807a5985a45479706500a6416d6f756e74c70300b476f2a44b65797391c4202445800f02fff64f07f8062f66b8d35b0bab5e95c138de00f446e47b8bd1347ca6536372697074c403fffe01a44d61736bc420b7b135023dd232265c350173a0e84a14451b67de180636cc8829472d0bfff259a54578747261c4101fb1bb3ab8d8423f9c7421205c694810aa5369676e6174757265739391c44084560dd45f63aec94e07124bcb79a62fc8bd0d38e1d1254796d1b46400c0a75b9ce8b56b4c6be4c7db7e8d0613331d44b9bc1d8873d266e80c211f8008f50d0e91c44076fac18ee299eb471448fded8569c375547d097701eb02bb82edfba34a87df8767b5b1293f6a58d483841e961ad686577d101136a86be5d485e095f87dbafc0291c440ecf4d639b46d0c4ff310598446f37ac5e82817a44f1be86227dbfe9ced4511f1aa9b401c939396cb4605d1522a071320ef8b490ca5cfc4bf3c5bd6386a561502", + "inputs": [ + { + "hash": "d53c766688b082db87c762fd517af5afc31b3b00e468193cb8c10b46cd0f375b", + "index": 0 + }, + { + "hash": "313f6552d57a89f47a43ca29019d2b15b250976c1652af30795022daf4a0ae4b", + "index": 1 + }, + { + "hash": "3bc42d2d3dfd3b95c0abd97750c1f2f1c2ee89156e3c1e5b89205852ce2f8895", + "index": 0 + } + ], + "outputs": [ + { + "amount": "0.05400000", + "keys": [ + "49c29716841df40eb88dc21974e3b2867ffed2b37b852015746aa3c151bffdf9" + ], + "mask": "efe475f7f66eb1946638e1ef0dbdaa7fa6ca83cce9fa856a20dd90fbad807a59", + "script": "fffe01", + "type": 0 + }, + { + "amount": "0.11826930", + "keys": [ + "2445800f02fff64f07f8062f66b8d35b0bab5e95c138de00f446e47b8bd1347c" + ], + "mask": "b7b135023dd232265c350173a0e84a14451b67de180636cc8829472d0bfff259", + "script": "fffe01", + "type": 0 + } + ], + "snapshot": "83c4636a560fb15e25e69f0ea63e15900633db03ba2663d453b0825750f910d2", + "version": 1 + } + } + }, + "context": { + "code": 200, + "results": 1, + "state": 18627910, + ... + } +} +``` + +**Request cost formula:** + +Always `1`. + +**Explore visualization on our front-end:** + +- https://blockchair.com/mixin/transaction/704f7d52b864a70cc7219d04f534fb5105f341ff8fcbc6b80f90237ea7694ed2 + + + +### Raw node data + +**Endpoint:** + +- `https://api.blockchair.com/{:xin_chain}/raw/node/{:node_hash}` + +**Where:** + +- `{:xin_chain}` can be only `mixin` +- `{:node_hash}` is the node hash (regex: `/^[0-9a-f]{64}$/i`) + +**Output:** + +`data` contains an associative array: + +- `data.{:id}ᵢ.node` — node data +- `data.{:id}ᵢ.graph` — node graph data +- `data.{:id}ᵢ.transaction` — node transaction data +- `data.{:id}ᵢ.round` — node round data + +**Example request:**` + +- `https://api.blockchair.com/mixin/raw/node/a721a4fc0c667c4a1222c8d80350cbe07dab55c49942c8100a8c5e2f5bb4ec50` + +**Example output:** + +`https://api.blockchair.com/mixin/raw/node/a721a4fc0c667c4a1222c8d80350cbe07dab55c49942c8100a8c5e2f5bb4ec50`: + +```json +{ + "data": { + "node": { + "id": "a721a4fc0c667c4a1222c8d80350cbe07dab55c49942c8100a8c5e2f5bb4ec50", + "payee": "XINT3KrjgaC3EkrWJQkJBvY5ZJ4YFVTtrjxTuAkYoKTM8sZKLjrGnzDBAJkNZ3gUQuSWQdk98rr3xAF5C21Zb5YwaFHQ3WF9", + "signer": "XINq9ctH1qYjxE8AsxJoH53qgNpS6hpL5mv5sFGML4Bf7tdpBD5LorhGBGpSF4tEKh9LD81XrXcaLA3CmTnCZU2NoKExsDh", + "state": "REMOVED", + "timestamp": 1584709251628742100, + "transaction": "b26b3accf232512924087fc810a3ace700d8ccfd75a392e7403471465bc1a886" + }, + "graph": { + "hash": "a14ab7cb37931acd4a35cb46a0e1533a5557d24bf588767b2c5e36b888d44ac3", + "node": "a721a4fc0c667c4a1222c8d80350cbe07dab55c49942c8100a8c5e2f5bb4ec50", + "round": 539409 + }, + "transaction": { + "asset": "a99c2e0e2b1da4d648755ef19bd95139acbbe6564cfb06dec7cd34931ca72cdc", + "extra": "065866c10424d5cfa7ca95eddad69d261ddc7c31a107f28773880bd9cb5bf611c70a3825ca359993324db9e169acb832e9ca75ec17b2b2e1f5b10ebd40eb9dca", + "hash": "b26b3accf232512924087fc810a3ace700d8ccfd75a392e7403471465bc1a886", + "hex": "86a756657273696f6e01a54173736574c420a99c2e0e2b1da4d648755ef19bd95139acbbe6564cfb06dec7cd34931ca72cdca6496e707574739185a448617368c420f3a94f83f0a579d1a1b87f713d934df44e9b888216938667e7b2817aba71ef93a5496e64657800a747656e65736973c0a74465706f736974c0a44d696e74c0a74f7574707574739185a454797065cca6a6416d6f756e74c70500e8d4a51000a44b65797391c42064bc93e6e22a4e5f2ca3340e898393478f1aec5354c5444e927b66efea4c8491a6536372697074c403fffe01a44d61736bc420e54a5084f751b0966bb28cf532ce070efd68121c7ccb258bce1ad877ef0fe0eea54578747261c440065866c10424d5cfa7ca95eddad69d261ddc7c31a107f28773880bd9cb5bf611c70a3825ca359993324db9e169acb832e9ca75ec17b2b2e1f5b10ebd40eb9dcaaa5369676e617475726573c0", + "inputs": [ + { + "hash": "f3a94f83f0a579d1a1b87f713d934df44e9b888216938667e7b2817aba71ef93", + "index": 0 + } + ], + "outputs": [ + { + "amount": "10000.00000000", + "keys": [ + "64bc93e6e22a4e5f2ca3340e898393478f1aec5354c5444e927b66efea4c8491" + ], + "mask": "e54a5084f751b0966bb28cf532ce070efd68121c7ccb258bce1ad877ef0fe0ee", + "script": "fffe01", + "type": 166 + } + ], + "snapshot": "abe3e91c47618e45047bf19d7258fe7af9e599ea18e1814dffc661391863d38f", + "version": 1 + }, + "round": { + "end": 1584709084891248400, + "hash": "a14ab7cb37931acd4a35cb46a0e1533a5557d24bf588767b2c5e36b888d44ac3", + "node": "a721a4fc0c667c4a1222c8d80350cbe07dab55c49942c8100a8c5e2f5bb4ec50", + "number": 539409, + "references": { + "self": "80a01607cd8a3c9444c502f1008c3f1880b95471f25376fbc3e18d14d556a718", + "external": "73bec29807b077af6f061482cbee0ea8ec7b70021c03f82989bfc0edac27bea4" + }, + "snapshots": [ + { + "hash": "3b1039a352a5bcb8914239e4ef8e90c9f8e86e53186216ea7363a080d91e6472", + "node": "a721a4fc0c667c4a1222c8d80350cbe07dab55c49942c8100a8c5e2f5bb4ec50", + "references": { + "self": "80a01607cd8a3c9444c502f1008c3f1880b95471f25376fbc3e18d14d556a718", + "external": "73bec29807b077af6f061482cbee0ea8ec7b70021c03f82989bfc0edac27bea4" + }, + "round": 539409, + "timestamp": 1584709084891248400, + "topology": 15283799, + "transaction": "9e4c9bb6bbb8f92a9811b75a147844453038dfeb835ed790f4fe5a344de10186", + "version": 1 + } + ], + "start": 1584709084891248400 + } + }, + "context": { + "code": 200, + "results": 1, + "state": 18628433, + ... + } +} +``` + +**Request cost formula:** + +Always `1`. + +**Explore visualization on our front-end:** + +- https://blockchair.com/mixin/node/a721a4fc0c667c4a1222c8d80350cbe07dab55c49942c8100a8c5e2f5bb4ec50 + + + +### Raw graph data + +**Endpoint:** + +- `https://api.blockchair.com/{:xin_chain}/raw/graph` + +**Where:** + +- `{:xin_chain}` can be only `mixin` + +**Output:** + +`data` contains an array of graph elements + +**Example request:**` + +- `https://api.blockchair.com/mixin/raw/graph` + +**Example output:** + +`https://api.blockchair.com/mixin/raw/graph`: + +```json +{ + "data": [ + { + "hash": "304d2b18a1d30db251702c0ea7c9aec1128c554afcbb2ebf4ce28a47ca722e65", + "node": "017ebfb57ed9aace3d2ed9d559b7a6bf16a8745113872f80cf74ed618a40d3d3", + "round": 133635 + }, + { + "hash": "ecf9ae5e469ce68907178f2e3dc8681438a779ad30a66f42c48b2db223731bcd", + "node": "028d97996a0b78f48e43f90e82137dbca60199519453a8fbf6e04b1e4d11efc9", + "round": 545028 + }, + { + "hash": "52837654b5b2530a4a171656f48479c809a3718ed98b877a4cf5d19901e97276", + "node": "1334081011398877b225a11a680440f8edbc2b3dd8b4a33cf90e571069d4c471", + "round": 525300 + }, + ... + ], + "context": { + "code": 200, + "results": 53, + "state": 18628655, + ... + } +} +``` + +**Request cost formula:** + +Always `1`. + +**Explore visualization on our front-end:** + +- https://blockchair.com/mixin/graph + + + # Infinitable endpoints (SQL-like queries) These endpoints allow you to filter, sort, and aggregate blockchain data. The output is database rows. Unlike dashboard and raw endpoints, all infinitable endpoints listed in this section can be considered as just one endpoint as it has the same options and the same output structure across different blockchains and entities. Here it is: `https://api.blockchair.com/{:table}{:query}`. @@ -5289,6 +5850,9 @@ Just don't ask why do we call that `infinitables`… Infinite tables? Maybe. * `{:eth_chain}/transactions` * `{:eth_chain}/mempool/transactions` * `{:eth_chain}/calls` +* `{:xin_chain}/raw/snapshots` +* `{:xin_chain}/raw/mintings` +* `{:xin_chain}/raw/nodes` * `bitcoin/omni/properties` * `ethereum/erc-20/tokens` * `ethereum/erc-20/transactions` @@ -5297,6 +5861,7 @@ Where: * `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `zcash`, or `bitcoin/testnet` * `{:eth_chain}` can be only `ethereum` +* `{:xin_chain}` can be only `mixin` Note on mempool tables: to speed up some requests, our architecture have separate tables (`{:chain}/mempool/{:entity}`) for unconfirmed transactions. Unlike with dashboard endpoints which search entities like transactions in both the blockchain and the mempool, infinitable endpoints don't do that. @@ -5530,6 +6095,9 @@ Applying a limit over the default multiplies the summed cost by `1 + 0.01 * numb | `{:eth_chain}/transactions` | `5` | | `{:eth_chain}/mempool/transactions` | `2` | | `{:eth_chain}/calls` | `10` | +| `{:xin_chain}/raw/snapshots` | `1` | +| `{:xin_chain}/raw/mintings` | `1` | +| `{:xin_chain}/raw/nodes` | `1` | | `bitcoin/omni/properties` | `10` | | `ethereum/erc-20/tokens` | `2` | | `ethereum/erc-20/transactions` | `5` | @@ -5540,7 +6108,7 @@ Further in documentations are table descriptions. Each documentation section con | Column | Type | Description | Q? | S? | A? | C? | | ------------- | ------------- | -------------------- | ------------------------------------------ | ---------------------------------------- | ----------------------------------------- | ------------------------------------------------------------ | -| *Column name* | *Column type* | *Column description* | *Is it possible to filter by this column?* | *Is it possible to sort by this column?* | *Is it possible to group by this column?* | *Is it possible to apply aggregation functions (like `sum` to this column)?* | +| *Column name* | *Column type* | *Column description* | *Is it possible to filter by this column?* | *Is it possible to sort by this column?* | *Is it possible to group by this column?* | *Is it possible to apply aggregation functions (like `sum`) to this column?* | The following marks are possible for the `Q?` column: @@ -6686,6 +7254,316 @@ See [request costs for infinitables](#link_05) +## Inifinitable endpoints for Mixin + +Please note that our Mixin API outputs raw node data for these endpoints. + + + +### `snapshots` table + +Note: this particular table doesn't support advanced querying. The only query section it supports are `?offset=` and sorting/filtering by `topology`. + +**Endpoint:** + +- `https://api.blockchair.com/{:xin_chain}/raw/snapshots?{:query}` + +**Where:** + +- `{:xin_chain}` can be only `mixin` + +**Where:** + +- `{:query}` is the query against the table ([how to build a query](#link_05)) + +**Output:** + +`data` contains an array of database rows. + +**Example requests:**` + +- `https://api.blockchair.com/mixin/raw/snapshots` +- `https://api.blockchair.com/mixin/raw/snapshots?q=topology(..18629737)&offset=10` +- `https://api.blockchair.com/mixin/raw/snapshots?s=topology(asc)` + +**Example output:** + +`https://api.blockchair.com/mixin/raw/snapshots`: + +```json +{ + "data": [ + { + "hash": "a6188df5dfecef1a2650fc7efd51ad0147539182cf0459fee6986b48f83502a6", + "node": "f7d194a68478987bc472c9f99478260dc12f4860204e0e91bee98a8b89363bc3", + "references": { + "self": "c77df83dcc00afba5e8cbc34b075df975c42efe520b4e00b501289b23f9affc1", + "external": "4d5f06d7b8512780396c212ecf55a7bfd7c42b4d82d0bd8e7911a03cab28c8cc" + }, + "round": 8729, + "signature": "652e1d783743c45aebb127a3c9a8d823d743b3dd2304f12a4dc490e104448e61de8fe14abae911528ab9f7b845b73fc86582e53333e35ee1b78fdcb17b272e0000000000003eade5", + "timestamp": 1587575473417249500, + "topology": 18629830, + "transaction": { + "asset": "da5f6dbd3102cd89b1b040c6b61e5f2b696bcb989dff7d8ecee8872aacf65592", + "extra": "44876fa784bc11eabda9b827eb81dfb7", + "hash": "ce122ec544fc41c9cde2d350c544659ee5d4887201becf0a01eed6d238030303", + "inputs": [ + { + "hash": "d3ac83d0cc8ef79bb215e6fc3326d58c6b16d2eb43fd6d6f16c18de4ddb0907a", + "index": 0 + } + ], + "outputs": [ + { + "amount": "0.01033063", + "keys": [ + "322c48fa5b19aae518147de7223f62bcb7b444b054226d50fcfd064d0ed555c5" + ], + "mask": "bc561649c4f9a36c252159717cc0deb797f1af1af1704cefd96cb467616e060e", + "script": "fffe01", + "type": 0 + } + ], + "version": 1 + }, + "version": 1 + }, + { + "hash": "80f6199ccc5bcb2cfb484a334107a67f89dc6e4cbcbcaae341fe28c619960bd5", + "node": "f7d194a68478987bc472c9f99478260dc12f4860204e0e91bee98a8b89363bc3", + "references": { + "self": "c77df83dcc00afba5e8cbc34b075df975c42efe520b4e00b501289b23f9affc1", + "external": "4d5f06d7b8512780396c212ecf55a7bfd7c42b4d82d0bd8e7911a03cab28c8cc" + }, + "round": 8729, + "signature": "8e18689d15e051bb484ae08fa6b9325d61d75f86cbc203e2fcb87f97f93d5906d91d8cb31036b94a43918fc3e007a0e82bb3acb2735d66b5a90566b68bbb130700000000001efdf0", + "timestamp": 1587575472096503000, + "topology": 18629829, + "transaction": { + "asset": "d4c304ffc3270ee0f3468913bd8027225201f0eccd336d47062d76c6e2b6bb27", + "extra": "c5029926c5904a4583094a9e0761c9da", + "hash": "a95f88e19cd5dfbb6f14dd6ea581049b065ce0065798faa3cb889995088db9c0", + "inputs": [ + { + "hash": "80dac46fe23abc29d7fe74b6e3580c42e164d37c9bd50be05306ccd2c7e6c653", + "index": 1 + } + ], + "outputs": [ + { + "amount": "0.01193500", + "keys": [ + "b8124285ceca9f5e83b2a5f0420c8483067a69719f0741550742f0ac4c38c580" + ], + "mask": "0aef3fc155aa561d75490f545bb044f9a8f488060db7a6f4631d33a6d53296fd", + "script": "fffe01", + "type": 0 + }, + { + "amount": "0.00944393", + "keys": [ + "f75bfa4afe3584b2beda6998be56c93cf6cd79b5635d40f61e0a6cefdf66367b" + ], + "mask": "d6bb73f16b57f7a67bb0c8bfce11b2f7ab1a1f108b9f7af242e36d448d2406e5", + "script": "fffe01", + "type": 0 + } + ], + "version": 1 + }, + "version": 1 + }, + ... + ], + "context": { + "code": 200, + "results": 10, + "total_rows": 18629831, + "offset": 0, + "state": 18629830, + ... + } +} +``` + +**Request cost formula:** + +See [request costs for infinitables](#link_05) + +**Explore visualization on our front-end:** + +- https://blockchair.com/mixin/snapshots + + + +### `mintings` table + +Note: this particular table doesn't support advanced querying. The only query section it supports are `?offset=` and sorting/filtering by `batch`. + +**Endpoint:** + +- `https://api.blockchair.com/{:xin_chain}/raw/mintings?{:query}` + +**Where:** + +- `{:xin_chain}` can be only `mixin` + +**Where:** + +- `{:query}` is the query against the table ([how to build a query](#link_05)) + +**Output:** + +`data` contains an array of database rows. + +**Example requests:**` + +- `https://api.blockchair.com/mixin/raw/mintings` +- `https://api.blockchair.com/mixin/raw/mintings?q=batch(..400)&offset=10` +- `https://api.blockchair.com/mixin/raw/mintings?s=batch(asc)` + +**Example output:** + +`https://api.blockchair.com/mixin/raw/mintings?s=batch(asc)`: + +```json +{ + "data": [ + { + "amount": "1726.02739638", + "batch": 14, + "group": "KERNELNODE", + "transaction": "20001842d6eff5129c11f7c053bf1209f0267bf223f1681c9cb9d19fc773a692", + "snapshot": { + "hash": "1f408b456fe82b3e47801167649a725cb71075a58bb2568c8fe44bc223a0eece", + "node": "307ecfa84d100ecd6bc32743972083e5178e02db049ce16bfd743f3ae52fefc5", + "references": { + "self": "31923e163f5daddcb97ef98bf3b8a76002ec007e309c209ec9a071e16f876d90", + "external": "0597b1772ba2a0bd814dba7f9f6010512a426eef3154d41f7e63ff1394db6ce2" + }, + "round": 1, + "signatures": [ ... ], + "timestamp": 1552544417124320500, + "topology": 116, + "transaction": { + "asset": "a99c2e0e2b1da4d648755ef19bd95139acbbe6564cfb06dec7cd34931ca72cdc", + "extra": "", + "hash": "20001842d6eff5129c11f7c053bf1209f0267bf223f1681c9cb9d19fc773a692", + "inputs": [ + { + "mint": { + "group": "KERNELNODE", + "batch": 14, + "amount": "1726.02739638" + } + } + ], + "outputs": [ + { + "amount": "115.06849309", + "keys": [ + "5cd87b6b5a25f67445197261e1ebb5d68be598cd63b0a57eef6897f82cde5c0a" + ], + "mask": "f287afceabccc3d48b52de04d0edd43b446275041b024a3b5c9517894c06f9ab", + "script": "fffe01", + "type": 0 + }, + ... + ], + "version": 1 + }, + "version": 0 + }, + "timestamp": 1552544417124320500 + }, + ... + ], + "context": { + "code": 200, + "results": 10, + "total_rows": 404, + "offset": 0, + "state": 18630676, + ... + } +} +``` + +**Request cost formula:** + +See [request costs for infinitables](#link_05) + +**Explore visualization on our front-end:** + +- https://blockchair.com/mixin/mintings + + + +### `nodes` table + +Note: this particular table doesn't support querying. It outputs all the entries (so there's no standard limit of 10 rows). Nodes are sorted by their `state`, and then by `timestamp`. + +**Endpoint:** + +- `https://api.blockchair.com/{:xin_chain}/raw/nodes` + +**Where:** + +- `{:xin_chain}` can be only `mixin` + +**Output:** + +`data` contains an array of database rows. + +**Example requests:**` + +- `https://api.blockchair.com/mixin/raw/nodes` + +**Example output:** + +`https://api.blockchair.com/mixin/raw/nodes`: + +```json +{ + "data": [ + { + "id": "cbba7a5e7bae3b0cef3d6dcba7948fa03facda3be401d67aa1a38aecb1f443a0", + "payee": "XINCcpcWJbJRiqEoUV7pWrmAdN1AZq3wyYTxa62JojvM4UqpuQnoVX7DZ6BgJEb61pSUS4ZyZNuEbAGL5azNyZNCbwdgqcVY", + "signer": "XIN3ntCzd1FqjSxrYM1f9abN3wY5DcydkDviEVgZL3paV7oYEeKnwzbMLwoRVANwyiu7w9mRrPf2eTpPaLRgQow9rSr3hzWH", + "state": "ACCEPTED", + "timestamp": 1579450099118731000, + "transaction": "ebbbf69e9e74e4070ef0685f8d9b4d7bc443922ac93445bc9bda1567984bdda8" + }, + { + "id": "6985deee66ead2021925eae21737fa172d19c6efc3e53f3ca5e28ab42f7f51eb", + "payee": "XINYDpVHXHxkFRPbP9LZak5p7FZs3mWTeKvrAzo4g9uziTW99t7LrU7me66Xhm6oXGTbYczQLvznk3hxgNSfNBaZveAmEeRM", + "signer": "XINDfgnkijCTe9ijVd9yDwQP8VY4rXwFqYczfgeKJViJqjGKmWS8MdZhJn7kPd5Hv6M8W8RobhJUAxkxgZ6YNtdWQwefYE51", + "state": "ACCEPTED", + "timestamp": 1583004182403037400, + "transaction": "48f3d7b5ae6b03f251705cfc82c3b3c7413ec8a7e7b100de0cab4d8f3ec33bd5" + }, + ... + ], + "context": { + "code": 200, + "results": 55, + "state": 18630827, + ... + } +} +``` + +**Request cost formula:** + +See [request costs for infinitables](#link_05) + +**Explore visualization on our front-end:** + +- https://blockchair.com/mixin/nodes + + + ## Inifinitable endpoints for second layers @@ -6694,7 +7572,7 @@ See [request costs for infinitables](#link_05) Note: this particular table doesn't support querying. The only query section it supports is `?offset=`. Note that this endpoint is in the Alpha stage. -**Endpoints:** +**Endpoint:** - `https://api.blockchair.com/bitcoin/omni/properties?{:query}` @@ -6947,7 +7825,7 @@ Broadcast a transaction to the network **Where:** -- `{:chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `ethereum`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `zcash`, `bitcoin/testnet` +- `{:chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `ethereum`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `zcash`, `bitcoin/testnet`, `mixin` - `POST` data should contain `data` parameter with raw transaction represented in hex (for Ethereum it should start with `0x`) **Output:** @@ -7297,6 +8175,13 @@ The response contains an array where the keys are blockchains, and the values ar "blockchair_first_entry": 0, "blockchair_first_entry_date": "2016-10-28", "is_full": true + }, + "mixin": { + "blockchain_first_entry": 0, + "blockchain_first_entry_date": "2019-02-28", + "blockchair_first_entry": 0, + "blockchair_first_entry_date": "2019-02-28", + "is_full": true } }, "context": { @@ -7410,7 +8295,8 @@ This endpoint returns the list of latest software (core clients) releases for bl "stellar": "Stellar Core", "monero": "Monero", "cardano": "Cardano SL", - "zcash": "Zcash" + "zcash": "Zcash", + "mixin": "Mixin" }, ... } From f5c3705a8f29ec5ad41771fa3fb361f7a2075fad Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Sun, 26 Apr 2020 03:13:24 +0300 Subject: [PATCH 116/180] v.2.0.49 --- API.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/API.md b/API.md index 3fe1854c..f4360b93 100644 --- a/API.md +++ b/API.md @@ -3,7 +3,7 @@ Logo ### API v.2 documentation -* English: [https://blockchair.com/api/docs](https://blockchair.com/api/docs) (up to v.2.0.48) +* English: [https://blockchair.com/api/docs](https://blockchair.com/api/docs) (up to v.2.0.49) ### Please apply for an API key first @@ -26,6 +26,11 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.49 - April 26th, 2020 + * It's now possible to discard unconfirmed transactions from the address dashboard by applying `?state=latest` option. If this option is applied, `balance` will show only confirmed balance, and `transactions` and `utxo` arrays won't include unconfirmed data. Affected endpoints `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `zcash`, `bitcoin/testnet`): + * `https://api.blockchair.com/{:btc_chain}/dashboards/address/{:address}₀?state=latest` + * `https://api.blockchair.com/{:btc_chain}/dashboards/addresses/{:address}₀,...,{:address}ᵩ?state=latest` + * `https://api.blockchair.com/{:btc_chain}/dashboards/xpub/{:extended_key}?state=latest` * v.2.0.48 - April 22nd, 2020 (Lenin turns 150 today!) * Added Mixin support. The list of new endpoints (see the documentation for details): * `https://api.blockchair.com/mixin/stats` From f3caf61c1b944a9d58ad220779df734f19facb26 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Sun, 26 Apr 2020 03:13:54 +0300 Subject: [PATCH 117/180] v.2.0.49 --- API_DOCUMENTATION_EN.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index d6b97f84..ef8df52e 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,4 +1,4 @@ -# [Blockchair.com](https://blockchair.com/) API v.2.0.48 Documentation +# [Blockchair.com](https://blockchair.com/) API v.2.0.49 Documentation ``` ____ __ __ __ _ @@ -1734,7 +1734,7 @@ For mempool transactions shows priority (`position`) — for chains supporting S * `?offset={:transaction_offset},{:utxo_offest}` or a shorthand `?offset={:offset}` allows to paginate transaction hashes and the UTXO array. The behaviour is similar to the `?limit=` section. Default for both offset is `0`, and the maximum is `1000000`. * `?transaction_details=true` — returns detailed info on transactions instead of just hashes in the `transactions` array. Each element contains `block_id`, `transaction_hash`, `time`, and `balance_change` (shows how the transactions affected the balance of `{:address}`, i.e. it can be a negative value). At the moment, this option is available for the `address` endpoint only. * `?omni=true` (for `bitcoin` only; in alpha test mode) — shows information about Omni Layer tokens belonging to the address. At the moment, this option is available for the `address` endpoint only. The data is returned in the `layer_2.omni` array. -* `?wormhole=true` (for `bitcoin-cash` only; in alpha test mode) — shows information about Wormhole tokens belonging to the address. At the moment, this option is available for the `address` endpoint only. The data is returned in the `layer_2.wormhole` array. +* `?state=latest` — discards unconfirmed transactions from the output — `balance` will show only confirmed balance, and `transactions` and `utxo` arrays won't include unconfirmed data. **Output:** @@ -1779,7 +1779,7 @@ Address object specification: * `type` — address type (the same as `type` [here](#link_400), can be one of these: `pubkey`, `pubkeyhash`, `scripthash`, `multisig`, `nulldata`, `nonstandard`, `witness_v0_scripthash`, `witness_v0_keyhash`, `witness_unknown`) * `script_hex` — output script (in hex) corresponding to the address -* `balance` — address balance in satoshi (hereinafter - including unconfirmed outputs) +* `balance` — address balance in satoshi (hereinafter — including unconfirmed outputs unless `?state=latest` option is used) * `balance_usd` — address balance in USD * `received` — total received in satoshi * `received_usd` — total received in USD @@ -2266,7 +2266,7 @@ Address object specification: **Request cost formula:** -- `1` for the `address` endpoint (add `1` for every of these options used: `?transaction_details=true`, `?omni=true`, `?wormhole=true`) +- `1` for the `address` endpoint (add `1` for every of these options used: `?transaction_details=true`, `?omni=true`) - `1 + (0.1 * (entity count - 1))` for the `addresses` endpoint (e.g. it's `1 + (0.1 * (100 - 1)) = 10.9` for requesting 100 addresses) - `1 + 2 * depth - 0.1` for the `xpub` endpoint, where `depth` is the number of 20-addresses iterations (BIP 32 standard). The minimum number of iterations is 1 (the cost would be `2.9` in that case), if there are 5 iterations required, 100 addresses will be checked in total (the cost would be `10.9`) From 5f67dbf512cfb75aeb59ea480976ca98e6d656bf Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Sun, 26 Apr 2020 03:20:47 +0300 Subject: [PATCH 118/180] v.2.0.49 --- API.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/API.md b/API.md index f4360b93..8cb9a4f0 100644 --- a/API.md +++ b/API.md @@ -27,7 +27,7 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog * v.2.0.49 - April 26th, 2020 - * It's now possible to discard unconfirmed transactions from the address dashboard by applying `?state=latest` option. If this option is applied, `balance` will show only confirmed balance, and `transactions` and `utxo` arrays won't include unconfirmed data. Affected endpoints `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `zcash`, `bitcoin/testnet`): + * It's now possible to discard unconfirmed transactions from the address dashboard by applying `?state=latest` option. If this option is applied, `balance` will show only confirmed balance, and `transactions` and `utxo` arrays won't include unconfirmed data. Affected endpoints (`{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `zcash`, `bitcoin/testnet`): * `https://api.blockchair.com/{:btc_chain}/dashboards/address/{:address}₀?state=latest` * `https://api.blockchair.com/{:btc_chain}/dashboards/addresses/{:address}₀,...,{:address}ᵩ?state=latest` * `https://api.blockchair.com/{:btc_chain}/dashboards/xpub/{:extended_key}?state=latest` From e7fc5af7dda4a5bb738ec554edd7f1bc04194f03 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Wed, 13 May 2020 17:04:52 +0300 Subject: [PATCH 119/180] v.2.0.50 --- API.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/API.md b/API.md index 8cb9a4f0..c893d053 100644 --- a/API.md +++ b/API.md @@ -26,6 +26,8 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.50 - May 13th, 2020 + * Removed support for Telegram Open Network (TON) as the project has been shut down (see https://telegra.ph/What-Was-TON-And-Why-It-Is-Over-05-12). All the relevant endpoints will now return a `404` error. * v.2.0.49 - April 26th, 2020 * It's now possible to discard unconfirmed transactions from the address dashboard by applying `?state=latest` option. If this option is applied, `balance` will show only confirmed balance, and `transactions` and `utxo` arrays won't include unconfirmed data. Affected endpoints (`{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `zcash`, `bitcoin/testnet`): * `https://api.blockchair.com/{:btc_chain}/dashboards/address/{:address}₀?state=latest` From f1207bdaf8ceec416a1d0fd0ff44a9616652f61c Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Thu, 14 May 2020 17:34:32 +0300 Subject: [PATCH 120/180] v.2.0.51 --- API.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/API.md b/API.md index c893d053..8d03f790 100644 --- a/API.md +++ b/API.md @@ -26,6 +26,12 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.51 - May 14th, 2020 + * Added Tezos support. New endpoints: + * `https://api.blockchair.com/tezos/stats` + * `https://api.blockchair.com/tezos/raw/block/{:id|hash}` + * `https://api.blockchair.com/tezos/raw/operation/{:hash}` + * `https://api.blockchair.com/tezos/raw/account/{:account|contract}` * v.2.0.50 - May 13th, 2020 * Removed support for Telegram Open Network (TON) as the project has been shut down (see https://telegra.ph/What-Was-TON-And-Why-It-Is-Over-05-12). All the relevant endpoints will now return a `404` error. * v.2.0.49 - April 26th, 2020 From 29ba128de9483ca7a227a94ac8f6ecf8c160877e Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Fri, 22 May 2020 18:13:21 +0300 Subject: [PATCH 121/180] v.2.0.52 --- API.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/API.md b/API.md index 8d03f790..0277f10b 100644 --- a/API.md +++ b/API.md @@ -26,6 +26,9 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.52 - May 22th, 2020 + * Fixed a bug where it wasn't possible to filter Ethereum mempool tables by sender and recipient (thanks @emilianobonassi for noticing) + * `https://api.blockchair.com/{:btc_chain}/dashboards/transaction/{:hash}/priority` endpoint now yields `confirmed` in the `position` field for confirmed transactions. Previously it wasn't possible to differ confirmed transactions from transactions that have completely fallen out of the mempool. * v.2.0.51 - May 14th, 2020 * Added Tezos support. New endpoints: * `https://api.blockchair.com/tezos/stats` From c1db88009bee5b1656cc6141fd3a61eca611ba5c Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Tue, 26 May 2020 20:49:32 +0300 Subject: [PATCH 122/180] v.2.0.53 --- API.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/API.md b/API.md index 0277f10b..a06c6b67 100644 --- a/API.md +++ b/API.md @@ -26,6 +26,9 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.53 - May 26th, 2020 + * Improved stability of our Omni Layer explorer + * The `https://api.blockchair.com/bitcoin/dashboads/transaction/{:hash}?omni=true` endpoint now returns info for unconfirmed Omni Layer transfers. In case there are any, the `valid` field will yield `null`. Please note that it's not possible to know if an Omni Layer transfer is valid before it has at least 1 confirmation. * v.2.0.52 - May 22th, 2020 * Fixed a bug where it wasn't possible to filter Ethereum mempool tables by sender and recipient (thanks @emilianobonassi for noticing) * `https://api.blockchair.com/{:btc_chain}/dashboards/transaction/{:hash}/priority` endpoint now yields `confirmed` in the `position` field for confirmed transactions. Previously it wasn't possible to differ confirmed transactions from transactions that have completely fallen out of the mempool. From 113d79c5134c97856fcd5864a7998d53be598bef Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Wed, 27 May 2020 21:26:42 +0300 Subject: [PATCH 123/180] v.2.0.54 --- API.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/API.md b/API.md index a06c6b67..f19501ff 100644 --- a/API.md +++ b/API.md @@ -26,6 +26,11 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.54 - May 27th, 2020 + * The limit on xpub discovery is raised to 20.000 (10.000 main addresses and 10.000 change addresses) for Premium API customers. Please note that according to the request cost formula for `xpub` endpoints, the cost of fetching an xpub consisting of 10.000 addresses is `1 + 2 * (10000 / 20) - 0.1 = 1000.9` + * Fixed a bug with complex aggregation queries. Now instead throwing a `500` error, the following example works: `https://api.blockchair.com/bitcoin/transactions?q=has_witness(true),has_witness(false),time(2020-05),input_count(1),output_count(1),is_coinbase(false)&a=date,f(avg(fee)/avg(fee))&aq=0:0;1:1` (this particular example returns data on how many times more SegWit transactions with a single input and a single outputs pay in fees on average). + * `https://api.blockchair.com/{:chain}/push/transaction` endpoint now returns a detailed error description in the `context.error` field in case you're trying to submit a malformed transaction. This is not yet available for Ethereum. + * In addition to `POST`, `https://api.blockchair.com/{:chain}/push/transaction` endpoint now works using `GET` as well. Example usage: `https://api.blockchair.com/{:chain}/push/transaction?data={:raw_transaction}`. Available for all cryptos we support. * v.2.0.53 - May 26th, 2020 * Improved stability of our Omni Layer explorer * The `https://api.blockchair.com/bitcoin/dashboads/transaction/{:hash}?omni=true` endpoint now returns info for unconfirmed Omni Layer transfers. In case there are any, the `valid` field will yield `null`. Please note that it's not possible to know if an Omni Layer transfer is valid before it has at least 1 confirmation. From a359d80c295c419a7346dc023409dc30409ca1f3 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Thu, 28 May 2020 23:48:40 +0300 Subject: [PATCH 124/180] v.2.0.55 --- API.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/API.md b/API.md index f19501ff..24376187 100644 --- a/API.md +++ b/API.md @@ -26,6 +26,10 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.55 - May 28th, 2020 + * Added `circulation` and `circulation_approximate` fields to the `https://api.blockchair.com/ethereum/erc-20/{:token}/stats` endpoint output. These values yield total circulating supply of the token (`null` if the contract doesn't have the `totalSuply` function). + * Fixed a precision issue in the `https://api.blockchair.com/ethereum/erc-20/{:contract}/dashboards/address/{:address}` endpoint, now `balance` returns precise value. + * Added `?nonce=true` option to the `https://api.blockchair.com/ethereum/dashboards/address/{:address}` endpoint. If enabled, `nonce` will yield account's current transaction nonce. * v.2.0.54 - May 27th, 2020 * The limit on xpub discovery is raised to 20.000 (10.000 main addresses and 10.000 change addresses) for Premium API customers. Please note that according to the request cost formula for `xpub` endpoints, the cost of fetching an xpub consisting of 10.000 addresses is `1 + 2 * (10000 / 20) - 0.1 = 1000.9` * Fixed a bug with complex aggregation queries. Now instead throwing a `500` error, the following example works: `https://api.blockchair.com/bitcoin/transactions?q=has_witness(true),has_witness(false),time(2020-05),input_count(1),output_count(1),is_coinbase(false)&a=date,f(avg(fee)/avg(fee))&aq=0:0;1:1` (this particular example returns data on how many times more SegWit transactions with a single input and a single outputs pay in fees on average). From f1a0becc2d83792a78392bc349adb96f97ed7d14 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Sat, 30 May 2020 02:37:56 +0300 Subject: [PATCH 125/180] v.2.0.50-55 --- API_DOCUMENTATION_EN.md | 1010 +++++++++++++++++++++++---------------- 1 file changed, 593 insertions(+), 417 deletions(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index ef8df52e..64d7880d 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,4 +1,4 @@ -# [Blockchair.com](https://blockchair.com/) API v.2.0.49 Documentation +# [Blockchair.com](https://blockchair.com/) API v.2.0.55 Documentation ``` ____ __ __ __ _ @@ -17,17 +17,17 @@ + [Basic API request](#link_M03) + [Basic API response](#link_M04) + [API rate limits, API keys, and Premium API](#link_M05) - + [API versioning](#link_M06) + + [API versioning and changelog](#link_M06) + [General stats endpoints](#link_M1) (Retrieve overall information about blockchains and tokens) + [Stats on multiple blockchains at once](#link_000) + [Bitcoin-like blockchain stats](#link_001) + [Ethereum-like blockchain stats](#link_002) + [Ripple-like blockchain stats](#link_003) + [Stellar-like blockchain stats](#link_004) - + [TON-like blockchain stats](#link_005) + [Monero-like blockchain stats](#link_006) + [Cardano-like blockchain stats](#link_007) + [Mixin-like DAG stats](#link_008) + + [Tezos-like blockchain stats](#link_009) + [Omni Layer stats](#link_500) + [ERC-20 stats](#link_509) + [Dashboard endpoints](#link_M2) (Retrieve information about various entities in a neat format from our databases) @@ -59,10 +59,6 @@ - [Ledger](#link_107) - [Transaction](#link_208) - [Account](#link_304) - - [Telegram Open Network](#link_M35) - - [Ledger](#link_108) - - [Transaction](#link_209) - - [Account](#link_305) - [Monero](#link_M36) - [Block](#link_109) - [Transaction](#link_210) @@ -77,6 +73,10 @@ - [Transaction](#link_212) - [Node](#link_405) - [Graph](#link_406) + - [Tezos](#link_M39) + - [Block](#link_112) + - [Operation](#link_213) + - [Account](#link_308) + [Infinitable endpoints](#link_05) (SQL-like queries: filter, sort, and aggregate blockchain data) + [Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin, Zcash, and Bitcoin Testnet](#link_M41) + [Blocks](#link_102) (table) @@ -135,15 +135,15 @@ Our API is free to try under some limitations, and we have a variety of premium ## Supported blockchains and second layers -As of today, our API supports **16 blockchains** (14 mainnets and 2 testnets) divided into 7 groups: +As of today, our API supports **16 blockchains** (15 mainnets and 1 testnet) divided into 7 groups: * Bitcoin-like blockchains (Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin, Zcash, Bitcoin Testnet), also known as UTXO-based blockchains * Ethereum-like blockchains (Ethereum) * Ripple-like blockchains (Ripple) * Stellar-like blockchains (Stellar) -* TON-like blockchains (Telegram Open Network Testnet) * Monero-like blockchains (Monero) * Cardano-like blockchains (Cardano) * Mixin-like DAGs (Mixin) — technically, it's a DAG rather than a blockchain, but for the sake of unification it may be mentioned as a blockchain further in this documentation +* Tezos-like blockchains (Tezos) Within a group, there's no or little difference between the set of available endpoints and their output. @@ -165,13 +165,13 @@ Here's the list of available mainnets: | Cardano | Cardano-like | `https://api.blockchair.com/cardano` | Alpha mode, possible compatibility-breaking changes | | Zcash | Bitcoin-like | `https://api.blockchair.com/zcash` | Full support | | Mixin | Mixin-like | `https://api.blockchair.com/mixin` | Full support | +| Tezos | Tezos-like | `https://api.blockchair.com/tezos` | Alpha mode, possible compatibility-breaking changes | There are also following testnets supported which are technically considered as separate blockchains: | Blokchain | Group | API path prefix | Support status | |-----------|------|----------|-------------| | Bitcoin Testnet | Bitcoin-like | `https://api.blockchair.com/bitcoin/testnet` | Full support | -| Telegram Open Network Testnet | TON-like | `https://api.blockchair.com/ton/testnet` | Alpha mode, possible compatibility-breaking changes | We aim to support more blockchains (and their testnets) in future to cover as many users as possible. We don't disclose which blockchains we'll add next and how we choose them, but our main markers are daily number of real transactions and market capitalization. If you're representing a coin community which would like to add its blockchain to our platform, we'd be happy to talk. @@ -210,10 +210,10 @@ This is the full list of available API endpoints. - `{:eth_chain}` can be only `ethereum` - `{:xrp_chain}` can be only `ripple` - `{:xlm_chain}` can be only `stellar` -- `{:ton_chain}` can be only `ton/testnet` - `{:xmr_chain}` can be only `monero` - `{:ada_chain}` can be only `cardano` - `{:xin_chain}` can be only `mixin` +- `{:xtz_chain}` can be only `tezos` | Endpoint path | Docs | Base request cost | Status | | ----------------------------------------------- | :----------------: | -----------------------------: | :---------------------------------------------: | @@ -223,10 +223,10 @@ This is the full list of available API endpoints. | `https://api.blockchair.com/{:eth_chain}/stats` | [👉](#link_002) | `1` | Stable | | `https://api.blockchair.com/{:xrp_chain}/stats` | [👉](#link_003) | `1` | Stable | | `https://api.blockchair.com/{:xlm_chain}/stats` | [👉](#link_004) | `1` | Stable | -| `https://api.blockchair.com/{:ton_chain}/stats` | [👉](#link_005) | `1` | Stable | | `https://api.blockchair.com/{:xmr_chain}/stats` | [👉](#link_006) | `1` | Stable | | `https://api.blockchair.com/{:ada_chain}/stats` | [👉](#link_007) | `1` | Stable | | `https://api.blockchair.com/{:xin_chain}/stats` | [👉](#link_008) | `1` | Stable | +| `https://api.blockchair.com/{:xtz_chain}/stats` | [👉](#link_009) | `1` | Stable | | **Block-related information** | — | — | — | | `https://api.blockchair.com/{:btc_chain}/dashboards/block/{:height}₀` | [👉](#link_100) | `1` | Stable | | `https://api.blockchair.com/{:btc_chain}/dashboards/block/{:hash}₀` | [👉](#link_100) | `1` | Stable | @@ -245,13 +245,14 @@ This is the full list of available API endpoints. | `https://api.blockchair.com/{:xrp_chain}/raw/ledger/{:height}₀` | [👉](#link_106) | `1` | Alpha | | `https://api.blockchair.com/{:xrp_chain}/raw/ledger/{:hash}₀` | [👉](#link_106) | `1` | Alpha | | `https://api.blockchair.com/{:xlm_chain}/raw/ledger/{:height}₀` | [👉](#link_107) | `1` | Alpha | -| `https://api.blockchair.com/{:ton_chain}/raw/block/{:tuple}₀` | [👉](#link_108) | `1` | Alpha | | `https://api.blockchair.com/{:xmr_chain}/raw/block/{:height}₀` | [👉](#link_109) | `1` | Alpha | | `https://api.blockchair.com/{:xmr_chain}/raw/block/{:hash}₀` | [👉](#link_109) | `1` | Alpha | | `https://api.blockchair.com/{:ada_chain}/raw/block/{:height}₀` | [👉](#link_110) | `1` | Alpha | | `https://api.blockchair.com/{:ada_chain}/raw/block/{:hash}₀` | [👉](#link_110) | `1` | Alpha | | `https://api.blockchair.com/{:xin_chain}/raw/snapshot/{:height}₀` | [👉](#link_111) | `1` | Alpha | | `https://api.blockchair.com/{:xin_chain}/raw/snapshot/{:hash}₀` | [👉](#link_111) | `1` | Alpha | +| `https://api.blockchair.com/{:xtz_chain}/raw/block/{:height}₀` | [👉](#link_112) | `1` | Alpha | +| `https://api.blockchair.com/{:xtz_chain}/raw/block/{:hash}₀` | [👉](#link_112) | `1` | Alpha | | **Transaction-related information and actions** | — | — | — | | `https://api.blockchair.com/{:btc_chain}/dashboards/transaction/{:hash}₀` | [👉](#link_200) | `1` | Stable | | `https://api.blockchair.com/{:btc_chain}/dashboards/transactions/{:hash}₀,...,{:hash}ᵩ` | [👉](#link_200) | `1 + 0.1*c` | Stable | @@ -267,11 +268,11 @@ This is the full list of available API endpoints. | `https://api.blockchair.com/{:eth_chain}/mempool/transactions?{:query}` | [👉](#link_206) | `2` | Stable | | `https://api.blockchair.com/{:xrp_chain}/raw/transaction/{:hash}₀` | [👉](#link_207) | `1` | Alpha | | `https://api.blockchair.com/{:xlm_chain}/raw/transaction/{:hash}₀` | [👉](#link_208) | `1` | Alpha | -| `https://api.blockchair.com/{:ton_chain}/raw/transaction/{:tuple}₀` | [👉](#link_209) | `1` | Alpha | | `https://api.blockchair.com/{:xmr_chain}/raw/transaction/{:hash}₀` | [👉](#link_210) | `1` | Alpha | | `https://api.blockchair.com/{:ada_chain}/raw/transaction/{:hash}₀` | [👉](#link_211) | `1` | Alpha | | `https://api.blockchair.com/{:xin_chain}/raw/transaction/{:hash}₀` | [👉](#link_212) | `1` | Alpha | | `https://api.blockchair.com/{:xin_chain}/push/transaction` (`POST`) | [👉](#link_202) | `1` | Stable | +| `https://api.blockchair.com/{:xtz_chain}/raw/operation/{:hash}₀` | [👉](#link_213) | `1` | Alpha | | **Address-related information** | — | — | — | | `https://api.blockchair.com/{:btc_chain}/dashboards/address/{:address}₀` | [👉](#link_300) | `1` | Stable | | `https://api.blockchair.com/{:btc_chain}/dashboards/addresses/{:address}₀,...,{:address}ᵩ` | [👉](#link_300) | `1 + 0.1*c` | Stable | @@ -280,8 +281,8 @@ This is the full list of available API endpoints. | `https://api.blockchair.com/{:eth_chain}/dashboards/address/{:address}₀` | [👉](#link_302) | `1` | Stable | | `https://api.blockchair.com/{:xrp_chain}/raw/account/{:address}₀` | [👉](#link_303) | `1` | Alpha | | `https://api.blockchair.com/{:xlm_chain}/raw/account/{:address}₀` | [👉](#link_304) | `1` | Alpha | -| `https://api.blockchair.com/{:ton_chain}/raw/account/{:address}₀` | [👉](#link_305) | `1` | Alpha | | `https://api.blockchair.com/{:ada_chain}/raw/address/{:address}₀` | [👉](#link_307) | `1` | Alpha | +| `https://api.blockchair.com/{:xtz_chain}/raw/account/{:address}₀` | [👉](#link_308) | `1` | Alpha | | **Special entities** | — | — | — | | `https://api.blockchair.com/{:btc_chain}/outputs?{:query}` | [👉](#link_400) | `10` | Beta | | `https://api.blockchair.com/{:btc_chain}/mempool/outputs?{:query}` | [👉](#link_400) | `2` | Beta | @@ -290,6 +291,7 @@ This is the full list of available API endpoints. | `https://api.blockchair.com/{:eth_chain}/uncles?{:query}` | [👉](#link_402) | `2` | Stable | | `https://api.blockchair.com/{:eth_chain}/calls?{:query}` | [👉](#link_403) | `10` | Stable | | `https://api.blockchair.com/{:xmr_chain}/outputs?{:query}` | [👉](#link_306) | `1` | Alpha | +| `https://api.blockchair.com/zcash/validate?paymentdisclosure={:disclosure}` | N/A | `1` | Alpha | | `https://api.blockchair.com/{:xin_chain}/raw/round/{:hash}` | [👉](#link_404) | `1` | Alpha | | `https://api.blockchair.com/{:xin_chain}/raw/round/({:node_hash},{:id})` | [👉](#link_404) | `1` | Alpha | | `https://api.blockchair.com/{:xin_chain}/raw/node/{:hash}` | [👉](#link_405) | `1` | Alpha | @@ -338,7 +340,7 @@ Here are some considerations: * If you're building a web app, your users shouldn't make direct API requests from there. While we don't have any limitations in our CORS policy (API currently responds with a `Access-Control-Allow-Origin: *` header), that policy may be changed in the future without any warnings * Please don't use some random keys in your requests (e.g. `?random_key=random_value`) as this can result in a `400` error (though we don't force this rule at the moment for most of our endpoints) -* If you're using the API with an API key, you should keep it in secret. In order to build an app for public use using our API, you should build a proxy, so the requrst flow will look like the following: `user → https://your-proxy/{:request_string} → http://api.blockchair.com/{:request_string}?key={:api_key}` — that way you won't disclose the key to your users +* If you're using the API with an API key, you should keep it in secret. In order to build an app for public use using our API, you should build a proxy, so the requrst flow will look like the following: `user → https://your-proxy/{:request_string} → https://api.blockchair.com/{:request_string}?key={:api_key}` — that way you won't disclose the key to your users * The only exception to the "requests should be made using GET" rule is the [Broadcasting transactions](#link_202) endpoint accepting POST requests @@ -449,7 +451,7 @@ There's an extra API endpoint for those who have an API key allowing to [track t -## API versioning +## API versioning and changelog As a reminder, there's the `context.api` array in every API response which contains the following data: @@ -461,7 +463,7 @@ As a reminder, there's the `context.api` array in every API response which conta When we change something, or add new functions, we bump the API version number. Generally, we try as hard as possible not to bring any compatibility-breaking changes in API updates, but sometimes this is needed as some blockchains change their features themselves, we're fixing various bugs, etc. This doesn't apply, however, to changes to endpoints which are either marked as alpha- or beta-stage functions, or unstable in nature (e.g. all raw endpoints where the API returns data directly from our nodes, and the response may change as we upgrade the nodes). These marks are reflected in the [Quick endpoint reference](#link_M02). -The changelog is available here: https://github.com/Blockchair/Blockchair.Support/blob/master/API.md +**The changelog is available here: https://github.com/Blockchair/Blockchair.Support/blob/master/API.md** It makes sense to check if `context.api.version` has increased and/or just whether `context.api.next_major_update` is not `null` or larger than the latest update date known to you. If that's the case — you can send yourself a notification and review the changelog to make your application compatible with the changes starting from `context.api.next_major_update`. @@ -495,13 +497,13 @@ If you require data on just one blockchain, please use `https://api.blockchair.c - Ripple - Groestlcoin - Stellar -- Telegram Open Network Testnet - Monero - Cardano - Zcash - Mixin +- Tezos -Note that Bitcoin Testnet stats are not included in this output, and TON Testnet will be changed to TON Mainnet as soon as it's launched. +Note that Bitcoin Testnet stats are not included in this output. Description of the fields is available in the next three sections of documentation. @@ -572,12 +574,6 @@ Description of the fields is available in the next three sections of documentati ... } }, - "ton": { - "data": { - "blocks": 475753, - ... - } - }, "monero": { "data": { "blocks": 2014108, @@ -601,6 +597,12 @@ Description of the fields is available in the next three sections of documentati "snapshots": 18632532, ... } + }, + "tezos": { + "data": { + "blocks": 974144, + ... + } } }, "context": { @@ -1034,58 +1036,6 @@ Always `1`. -## TON-like blockchain stats - -**Endpoint:** - -- `https://api.blockchair.com/ton/testnet/stats` - -**Output:** - -`data` contains an array with blockchain statistics: - -- `blocks` — total number of blocks -- `best_block_height` — the latest block number in the default workchain -- `best_block_file_hash` — its filehash… -- `best_block_root_hash` — … roothash… -- `best_block_time` — … and timestamp -- `fist_block_time` — timestamp of the first block (when the current testnet was launched) -- `blocks_24h` — number of blocks over the last 24 hours -- `transactions_24h` — number of transactions over the last 24 hours - -**Example output:** - -`https://api.blockchair.com/ton/testnet/stats`: - -```json -{ - "data": { - "blocks": 475780, - "best_block_height": 475780, - "best_block_file_hash": "106BF11CFA87F20CF3310F200024D98344B3EC318803734857A5C5AEBF037E53", - "best_block_root_hash": "6A6B38C7A29315545271CA0C6FB1F04FB8DB6950EA24CEB3F81C86229FE7F370", - "best_block_time": "2019-12-03 18:36:55", - "first_block_time": "2019-11-15 12:53:05", - "blocks_24h": 26000, - "transactions_24h": 130000 - }, - "context": { - "code": 200, - ... - } -} -``` - -**Request cost formula:** - -Always `1`. - -**Explore visualization on our front-end:** - -- https://blockchair.com/ton - - - ## Monero-like blockchain stats **Endpoint:** @@ -1255,7 +1205,7 @@ Always `1`. **Example output:** -`https://api.blockchair.com/cardano/stats`: +`https://api.blockchair.com/mixin/stats`: ```json { @@ -1296,6 +1246,73 @@ Always `1`. +## Tezos-like blockchain stats + +**Endpoint:** + +- `https://api.blockchair.com/tezos/stats` + +**Output:** + +`data` contains an array with blockchain statistics: + +- `blocks` — total number of blocks +- `operations` — total number of operations +- `operations_24h` — number of operations over the last 24 hours +- `volume_24h` — volume transacted over the last 24 hours +- `inflation_24h` — newly minted coin count over the last 24 hours +- `best_block_height` — the latest block number in the default workchain +- `best_block_hash` — its hash… +- `best_block_time` — … and timestamp +- `circulation` and `circulation_xtz` — total circulating supply +- `market_price_usd` — average market price of 1 coin in USD (market data source: CoinGecko) +- `market_price_btc` — average market price of 1 coin in BTC +- `market_price_usd_change_24h_percentage` — market price change in percent for 24 hours +- `market_cap_usd` — market capitalization (coins in circulation * price per coin in USD) +- `market_dominance_percentage` — dominance index (how much % of the total cryptocurrency market is the market capitalization of the coin) +- `countdowns` (optional) — an optional array of events ([`event`, `time_left`] format), where `time_left` is the number of seconds till the `event` + +**Example output:** + +`https://api.blockchair.com/tezos/stats`: + +```json +{ + "data": { + "blocks": 974146, + "operations": 25664439, + "operations_24h": 41556, + "volume_24h": 19467451942626, + "inflation_24h": 114867833312, + "best_block_height": 974145, + "best_block_hash": "BL5GrLjJVpKfDGBxh3GgVKE25hYcX8FJEN7LmmohyXrS42H2Yx1", + "best_block_time": "2020-05-29 22:31:38", + "circulation_xtz": 712341492.340773, + "circulation": 712341492340773, + "market_price_usd": 2.86, + "market_price_btc": 0.00030425564282515, + "market_price_usd_change_24h_percentage": 2.51544, + "market_cap_usd": 2033457725, + "market_dominance_percentage": 0.77 + }, + "context": { + "code": 200, + "state": 974145, + ... + } +} +``` + +**Request cost formula:** + +Always `1`. + +**Explore visualization on our front-end:** + +- https://blockchair.com/tezos + + + ## Omni Layer stats Allows to retrieve the some basic stats on Omni Layer (Bitcoin). Note that this endpoint is in the Alpha stage, and Wormhole (Bitcoin Cash Omni-like token system) was phased out on January 1st, 2020. @@ -1688,7 +1705,7 @@ In case transaction is confirmed on the blockchain, `data.{:hash}ᵢ.transaction - `https://api.blockchair.com/{:btc_chain}/dashboards/transaction/{:hash}₀/priority` -For mempool transactions shows priority (`position`) — for chains supporting SegWit by `fee_per_kwu`, for others by `fee_per_kb`— over other transactions (`out_of` mempool transactions). `position` is `null` if the transaction is not in the mempool. Cost: `1`. +For mempool transactions shows priority (`position`) — for chains supporting SegWit by `fee_per_kwu`, for others by `fee_per_kb`— over other transactions (`out_of` mempool transactions). `position` is `null` if the transaction is neither in the mempool nor in the blockchain, `confirmed` if it's in the blockchain. Cost: `1`. **Request cost formula:** @@ -1771,7 +1788,7 @@ Here's how these three dashboard calls structured (see more detailed examples be * `utxo` — the UTXO set for the address set * `context` — some context info -Note that currently the maximum depth for xpub address discovery is 250 (larger limits are available on Premium plans). According to BIP 32, our engine looks for 20 addresses at once, and if there's no transactions associated with this set, it stops looking. +Note that currently the maximum depth for xpub address discovery is 250 main addresses and 250 change addresses (larger limits up to 10.000 main / 10.000 change are available on Premium plans). According to BIP 32, our engine looks for 20 addresses at once, and if there's no transactions associated with this set, it stops looking. `data.addresses` for both the `addresses` and the `xpub` endpoints don't include addresses which don't participate in transactions. @@ -2685,7 +2702,8 @@ For mempool transactions shows priority (`position`) by `gas_price` over other t - `?limit={:call_limit}` — limits the number of returned latest calls associated with the address. Default is `100`. Maximum is `10000`. - `?offset={:call_offset}` — allows to paginate calls. Default is `0`, and the maximum is `1000000`. -- `?erc_20=true` — return information about ERC-20 token balances of the address +- `?erc_20=true` — returns information about ERC-20 token balances of the address +- `?nonce=true` — returns current account nonce **Output:** @@ -2712,6 +2730,7 @@ In case the address has been found, `data.{:address}₀` returns an array consis - `address.last_seen_receiving` — timestamp (UTC) when the address received a successful incoming call for the last time - `address.first_seen_spending` — timestamp (UTC) when the address sent a successful call for the first time - `address.last_seen_spending` — timestamp (UTC) when the address sent a successful call for the last time + - `address.nonce` — current account nonce (only if `?nonce=true` is set, `null` otherwise) - `calls` — an array of the latest address call, each element of an array containing the following elements: `block_id`, `transaction_hash`,` index`, `time`,` sender`, `recipient`, `value`,` value_usd`, `transferred` (see the description [here](#link_403)) - `layer_2.erc_20` (only if `?erc_20=true` is set) — the array of ERC-20 token balances of the address, each element contains the following fields: `token_address`, `token_name`, `token_symbol`, `token_decimals`, `balance_approximate` (number of tokens), `balance` (exact number of tokens in the smallest denomination). Note that `balance ≈ balance_approximate * 10 ^ token_decimals`. @@ -2738,7 +2757,7 @@ Notes: - `https://api.blockchair.com/ethereum/dashboards/address/0x3282791d6fd713f1e94f4bfd565eaa78b3a0599d` - `https://api.blockchair.com/ethereum/dashboards/address/0x3282791d6fd713f1e94f4bfd565eaa78b3a0599d?limit=1&offset=0` -- `https://api.blockchair.com/ethereum/dashboards/address/0x3282791d6fd713f1e94f4bfd565eaa78b3a0599d?erc_20=true` +- `https://api.blockchair.com/ethereum/dashboards/address/0x3282791d6fd713f1e94f4bfd565eaa78b3a0599d?erc_20=true&nonce=true` **Example output:** @@ -2831,7 +2850,7 @@ Notes: **Request cost formula:** -- `1` or `2` if the `?erc_20=true` option is used +- `1` + `1` for each of the options used: `?erc_20=true`, `?nonce=true` **Explore visualizations on our front-end:** @@ -2931,6 +2950,8 @@ Allows to retrieve the some basic information on an ERC-20 token. Note that this * `transactions_24h` — the same over the last 24 hours * `volume_24h_approximate` — transacted monetary volume in the number of tokens * `volume_24h` — the same in the token's smallest denomination (`volume_24h ≈ volume_24h_approximate * (10 ^ decimals )`) +* `circulation_approximate` — circulating supply in the number of tokens +* `circulation` — the same in the token's smallest denomination (`circulation ≈ circulation_approximate * (10 ^ decimals )`) **Example requests:** @@ -2949,16 +2970,18 @@ Allows to retrieve the some basic information on an ERC-20 token. Note that this "time": "2017-11-28 00:41:21", "creating_block_id": 4634748, "creating_transaction_hash": "0x2f1c5c2b44f771e942a8506148e256f94f1a464babc938ae0690c6e34cd79190", - "transactions": 8898558, - "transactions_24h": 95437, - "volume_24h_approximate": 507067165.4109063, - "volume_24h": "507067165410910" + "transactions": 32295106, + "transactions_24h": 206963, + "volume_24h_approximate": 1629851234.6590867, + "volume_24h": "1629851234659100", + "circulation": "5737970410922098", + "circulation_approximate": 5737970410.922098 }, "context": { "code": 200, "results": 1, - "state": 8766954, - "state_layer_2": 8766944, + "state": 10163626, + "state_layer_2": 10163616, ... } } @@ -4170,322 +4193,6 @@ If there's no `{:account}ᵢ` has been found on the blockchain, returns an empty -## Raw data endpoints for Telegram Open Network - - - -### Raw block data - -Returns raw block data directly from our back end. Please note that as the TON network is highly unstable at the moment, we don't really provide anyone with any guarantees, and the documentation is limited for this section as many things can change very fast. - -**Endpoint:** - -- `https://api.blockchair.com/{:ton_chain}/raw/block/{:tuple}₀` - -**Where:** - -- `{:ton_chain}` can only be `ton/testnet` -- `{:tuple}ᵢ` is either a block number, or a tuple; possible formats are: - - `id` (e.g. `123456`), this will return info on the block no. 123456 in the default workchain (`-1`) and in the default shard (`8000000000000000`) - - `(workchain, shard, id)` tuple - - `(workchain, shard, id, roothash, filehash)` tuple - -**Output:** - -`data` contains an associative array: - -- `data.{:tuple}ᵢ.block` — block data. We don't provide field descriptions at the moment as they can change at any time. Most of the key names are self-explanatory. - -**Example requests:** - -- `https://api.blockchair.com/ton/testnet/raw/block/357290` -- `https://api.blockchair.com/ton/testnet/raw/block/(357290)` -- `https://api.blockchair.com/ton/testnet/raw/block/(-1,8000000000000000,357290)` -- `https://api.blockchair.com/ton/testnet/raw/block/(-1,8000000000000000,357290,69179AE3C3B5D3A007B397FD2774F4CCA7A43FC467B701469CC6081B55A72239,8645D68C3655493DB1F8B9AB7CFAC5602672012CC8419BF61EF365A7127C78CD)` - -Please note that some of these requests may stop working if the testnet gets reset. - -**Example output:** - -`https://api.blockchair.com/ton/testnet/raw/block/357290`: - -```json -{ - "data": { - "357290": { - "block": { - "end_lt": 483827000004, - "filehash": "8645D68C3655493DB1F8B9AB7CFAC5602672012CC8419BF61EF365A7127C78CD", - "global_id": -239, - "prev_block_info": { - "end_lt": 483825000004, - "filehash": "0x5f8a4eed5c77a717874544292269ada101535cac362ce347f85bea5a441403ef", - "roothash": "0xf8990cf733bad398761ee3337a731cd063a3825a5c21337cfe03a9ebb902bcb0", - "seqno": 357289 - }, - "roothash": "69179AE3C3B5D3A007B397FD2774F4CCA7A43FC467B701469CC6081B55A72239", - "seqno": 357290, - "shard": "8000000000000000", - "shards": [ - { - "filehash": "ECCEDDA9623423B55C711D73A5D33729BB7752AFA5EF5150F9EBF66180B37BED", - "roothash": "5DFABF07E43B23102C316FE2FD761495C511CEEF02805A64E0D50DD72D8BF5DF", - "seqno": 450944, - "shard": "2000000000000000", - "workchain": 0 - }, - { - "filehash": "F7BCEA34AB619443B8401A560F6CC5081B8402600CFE0E21AC97BF3CDD7C2FEB", - "roothash": "1E9C27FA21865B468B131949DF45A7E6BB3CFA206392DDC9BD1EDD825A371B30", - "seqno": 451222, - "shard": "6000000000000000", - "workchain": 0 - }, - { - "filehash": "A5E716AEC2CAC1F02E4C1624179D6A1D32A387E8D189FC77C9E923CDD4BE82F7", - "roothash": "E5FA8F81395ECFC6DA85A81052DCB5BF2E005FFECE693C8E54B45AAD5A594630", - "seqno": 451025, - "shard": "a000000000000000", - "workchain": 0 - }, - { - "filehash": "64307A2B7EC58A85E53F677FC066E577B8A8DF8E4CC8DB8580690939C2BDB846", - "roothash": "BA040777090B248B54B334ADA1A0A499822C8E7F5EBDA411DE5DDE9290AC75CB", - "seqno": 451462, - "shard": "e000000000000000", - "workchain": 0 - } - ], - "start_lt": 483827000000, - "time": "2019-11-29 00:27:17", - "transactions": [ - { - "hash": "045740A8D2400EEBFB6EBB9BDB1EE23AB2EBC0693B718C0AF0E04A3498A2934A", - "lt": 483827000001, - "userfriendly_address": "Ef8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM0vF" - }, - { - "hash": "4533BD6576FD34204B7A6DFB2576FDF3BB395917BC8C17A3208F292CDACE34BC", - "lt": 483827000002, - "userfriendly_address": "Ef8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM0vF" - }, - { - "hash": "6F7A37CF43604381C35153CA07E49140AE33C0A8AB3747439508A64E034F1858", - "lt": 483827000001, - "userfriendly_address": "Ef80UXx731GHxVr0-LYf3DIViMerdo3uJLAG3ykQZFjXz2kW" - }, - { - "hash": "7B4876DB8EA7DF3E06D34DAF287B8D94728CC125A8F7C915911A831EA1C86FCD", - "lt": 483827000003, - "userfriendly_address": "Ef80UXx731GHxVr0-LYf3DIViMerdo3uJLAG3ykQZFjXz2kW" - }, - { - "hash": "70E5BA410D9CCFDA457442661CCED8B42B0587158E130C85D7EC4BBA9335FFCC", - "lt": 483827000003, - "userfriendly_address": "Ef9VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVbxn" - } - ], - "value_flow": { - "created": { - "nanograms": 1700000000 - }, - "exported": { - "nanograms": 0 - }, - "fees_collected": { - "nanograms": 2950000000 - }, - "fees_imported": { - "nanograms": 1250000000 - }, - "from_prev_blk": { - "nanograms": 4990184927132822000 - }, - "imported": { - "nanograms": 0 - }, - "minted": { - "nanograms": 0 - }, - "recovered": { - "nanograms": 2950000000 - }, - "to_next_blk": { - "nanograms": 4990184930082821000 - } - }, - "workchain_id": -1 - } - } - }, - "context": { - "results": 1, - "state": 475783, - ... - } -} -``` - -**Request cost formula:** - -Always `1`. - -**Explore visualization on our front-end:** - -- https://blockchair.com/ton/block/357290 - - - -### Raw transaction data - -Returns raw transaction data directly from our back end. Please note that as the TON network is highly unstable at the moment, we don't really provide anyone with any guarantees, and the documentation is limited for this section as many things can change very fast. - -**Endpoint:** - -- `https://api.blockchair.com/{:ton_chain}/raw/transaction/{:tuple}₀` - -**Where:** - -- `{:ton_chain}` can only be `ton/testnet` -- `{:tuple}ᵢ` is a tuple in the following format: `(account, logical time, transaction hash)`, where `account` can be in two different formats (see the examples) - -**Output:** - -`data` contains an associative array: - -- `data.{:tuple}ᵢ.transaction` — transaction data. We don't provide field descriptions at the moment as they can change at any time. Most of the key names are self-explanatory. - -**Example requests:** - -- `https://api.blockchair.com/ton/testnet/raw/transaction/(Ef8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM0vF,483716000001,809A932E2AD8C307A5E69B427762AA1BE0EC57D9A246A7CE4E7D4CE49F00C4AE)` -- `https://api.blockchair.com/ton/testnet/raw/transaction/(0x3333333333333333333333333333333333333333333333333333333333333333,483716000001,809A932E2AD8C307A5E69B427762AA1BE0EC57D9A246A7CE4E7D4CE49F00C4AE)` - -Please note that some of these requests may stop working if the testnet gets reset. - -**Example output:** - -`https://api.blockchair.com/ton/testnet/raw/transaction/(Ef8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM0vF,483716000001,809A932E2AD8C307A5E69B427762AA1BE0EC57D9A246A7CE4E7D4CE49F00C4AE)`: - -```json -{ - "data": { - "(Ef8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM0vF,483716000001,809A932E2AD8C307A5E69B427762AA1BE0EC57D9A246A7CE4E7D4CE49F00C4AE)": { - "transaction": { - "account": "Ef8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM0vF", - "block": { - "filehash": "B3F4BA8B1C2FDC10F5F04C43B0FB226585E1F0EE170290DD3FC331D95DF5D9B2", - "roothash": "826176479B470808ED6CA721559000DF5E90602E05B5E7A8DBA7994A1C143AEB", - "seqno": 357220, - "shard": "8000000000000000", - "workchain": -1 - }, - "end_status": "acc_state_active", - "lt": 483716000001, - "orig_status": "acc_state_active", - "prev_transaction_hash": "0xc7ab8c6aea7f14c949ccb16230b9d18f12424fcceb9055e1775fc4f654f9b13b", - "prev_transaction_lt": 483714000002, - "raw_account": "0x3333333333333333333333333333333333333333333333333333333333333333", - "state_update": { - "new_hash": "0xfe41f7e87cd0b5df7ce677b4ba8d0939316c8a2968fa7c532d073e131969a60e", - "old_hash": "0x27906825005713fcec1602b4f16d16e29c38aac18623f80d256e177680d72af4" - }, - "time": "2019-11-29 00:22:55", - "total_fee": 0, - "tx_hash": "809A932E2AD8C307A5E69B427762AA1BE0EC57D9A246A7CE4E7D4CE49F00C4AE" - } - } - }, - "context": { - "results": 1, - "state": 475783, - ... - } -} -``` - -**Request cost formula:** - -Always `1`. - -**Explore visualization on our front-end:** - -- https://blockchair.com/ton/transaction/(Ef8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM0vF,483716000001,809A932E2AD8C307A5E69B427762AA1BE0EC57D9A246A7CE4E7D4CE49F00C4AE) - - - -### Raw account data - -Returns raw account data directly from our back end. Please note that as the TON network is highly unstable at the moment, we don't really provide anyone with any guarantees, and the documentation is limited for this section as many things can change very fast. - -**Endpoint:** - -- `https://api.blockchair.com/{:ton_chain}/raw/account/{:address}₀` - -**Where:** - -- `{:ton_chain}` can only be `ton/testnet` -- `{:address}ᵢ` can be an address in two different formats (hex or "user-friendly", see the examples below) - -**Output:** - -`data` contains an associative array: - -- `data.{:tuple}ᵢ.account` — account data. We don't provide field descriptions at the moment as they can change at any time. Most of the key names are self-explanatory. - -**Example requests:** - -- `https://api.blockchair.com/ton/testnet/raw/account/Ef8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM0vF` -- `https://api.blockchair.com/ton/testnet/raw/account/0x3333333333333333333333333333333333333333333333333333333333333333` - -Please note that some of these requests may stop working if the testnet gets reset. - -**Example output:** - -`https://api.blockchair.com/ton/testnet/raw/account/Ef8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM0vF`: - -```json -{ - "data": { - "Ef8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM0vF": { - "account": { - "address": { - "last_trans_hash": "8CC5546C7D770ECF0A0538B5A477D034403A7004124E00A7EE674CFF8ED0CFB8", - "last_trans_lt": 658854000002, - "raw_address": "0x3333333333333333333333333333333333333333333333333333333333333333", - "userfrienly_address": "Ef8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM0vF", - "workchain_id": -1 - }, - "balances": { - "nanograms": 2086443035892730 - }, - "storage_stat": { - "bits": 74434, - "cells": 228, - "due_payment": null, - "last_paid": 0, - "public_cells": 0 - } - } - } - }, - "context": { - "results": 1, - "state": 475783, - ... - } -} -``` - -**Request cost formula:** - -Always `1`. - -**Explore visualization on our front-end:** - -- https://blockchair.com/ton/account/Ef8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM0vF - - - ## Raw data endpoints for Monero @@ -5831,6 +5538,473 @@ Always `1`. +## Raw data endpoints for Tezos + + + +### Raw block data + +Returns raw block data from our `tzindex` instance. See https://github.com/blockwatch-cc/tzindex/blob/master/README.md for field descriptions, but mostly they are self-describing. + +**Endpoints:** + +- `https://api.blockchair.com/{:xtz_chain}/raw/block/{:height}₀` +- `https://api.blockchair.com/{:xtz_chain}/raw/block/{:hash}₀` + +**Where:** + +- `{:xtz_chain}` can only be `tezos` +- `{:height}ᵢ` is the block height (integer value), also known as block id +- `{:hash}ᵢ` is the block hash + +**Output:** + +`data` contains an associative array: + +- `data.{:id}ᵢ.block` — block data. + +**Example requests:** + +- `https://api.blockchair.com/tezos/raw/block/888888` +- `https://api.blockchair.com/tezos/raw/block/BMSY7Rvss3to1HGuCVLJsbAyCgghXzML8M3XD8kzoaCc2LLVEoM` + +**Example output:** + +`https://api.blockchair.com/tezos/raw/block/888888`: + +```json +{ + "data": { + "888888": { + "block": { + "hash": "BMSY7Rvss3to1HGuCVLJsbAyCgghXzML8M3XD8kzoaCc2LLVEoM", + "predecessor": "BLv7JH7gMfVqbnMQ6GsqSfXvRu5bKeVZTCCRKqzrz9WyjLYfKtG", + "successor": "BL8688QdRQgoEmoSr9QdLRdpyTk31kmojDwoQ1kYWsX3SNH5ch3", + "baker": "tz3VEZ4k6a4Wx42iyev6i2aVAptTRLEAivNN", + "height": 888888, + "cycle": 217, + "is_cycle_snapshot": false, + "time": "2020-03-31T10:33:31Z", + "solvetime": 60, + "version": 6, + "validation_pass": 4, + "fitness": 233528, + "priority": 0, + "nonce": 8461818875301725000, + "voting_period_kind": "proposal", + "endorsed_slots": 4293918719, + "n_endorsed_slots": 31, + "n_ops": 67, + "n_ops_failed": 0, + "n_ops_contract": 0, + "n_tx": 46, + "n_activation": 0, + "n_seed_nonce_revelations": 0, + "n_double_baking_evidences": 0, + "n_double_endorsement_evidences": 0, + "n_endorsement": 21, + "n_delegation": 0, + "n_reveal": 0, + "n_origination": 0, + "n_proposal": 0, + "n_ballot": 0, + "volume": 0.967347, + "fees": 0.081556, + "rewards": 80, + "deposits": 2560, + "unfrozen_fees": 0, + "unfrozen_rewards": 0, + "unfrozen_deposits": 0, + "activated_supply": 0, + "burned_supply": 0, + "n_accounts": 73, + "n_new_accounts": 0, + "n_new_implicit": 0, + "n_new_managed": 0, + "n_new_contracts": 0, + "n_cleared_accounts": 0, + "n_funded_accounts": 0, + "gas_limit": 697462, + "gas_used": 484756, + "gas_price": 0.16824, + "storage_size": 696, + "days_destroyed": 0.036068, + "pct_account_reuse": 100, + "endorsers": [ + "tz3RDC3Jdn4j15J7bBHZd29EUee9gVB1CxD9", + "tz1LcuQHNVQEWP2fZjk1QYZGNrfLDwrT3SyZ", + ... + ] + }, + "operations": [ + { + "hash": "op2UfeUHiVdu91c6G9GFC646FKW1tQmNXgs7BcbxUFuTrj3gUMg", + "type": "endorsement", + "status": "applied", + "is_success": 1, + "volume": 0, + "data": "1073742880", + "sender": "tz1gfArv665EUkSg2ojMBzcbfwuPxAvqPvjo", + "receiver": null, + "manager": null, + "delegate": null + }, + ... + ] + } + }, + "context": { + "code": 200, + "results": 1, + "state": 974152, + ... + } +} +``` + +**Request cost formula:** + +Always `1`. + +**Explore visualization on our front-end:** + +- https://blockchair.com/tezos/block/888888 + + + +### Raw operation data + +Returns raw operation data from our `tzindex` instance. See https://github.com/blockwatch-cc/tzindex/blob/master/README.md for field descriptions, but mostly they are self-describing. + +**Endpoint:** + +- `https://api.blockchair.com/{:xtz_chain}/raw/operation/{:hash}₀` + +**Where:** + +- `{:xtz_chain}` can only be `tezos` +- `{:hash}ᵢ` is the operation hash + +**Output:** + +`data` contains an associative array: + +- `data.{:id}ᵢ.operations` — an array of internal operations. + +**Example output:** + +`https://api.blockchair.com/tezos/raw/operation/ooe4aYfzRkGUS4UdXeRThNCsv5NkqeMLdKtfL7bzL3y7TGZzgGE`: + +```json +{ + "data": { + "ooe4aYfzRkGUS4UdXeRThNCsv5NkqeMLdKtfL7bzL3y7TGZzgGE": { + "operations": [ + { + "hash": "ooe4aYfzRkGUS4UdXeRThNCsv5NkqeMLdKtfL7bzL3y7TGZzgGE", + "type": "transaction", + "block": "BMSY7Rvss3to1HGuCVLJsbAyCgghXzML8M3XD8kzoaCc2LLVEoM", + "time": "2020-03-31T10:33:31Z", + "height": 888888, + "cycle": 217, + "counter": 2493708, + "op_n": 24, + "op_c": 0, + "op_i": 0, + "status": "applied", + "is_success": true, + "is_contract": false, + "gas_limit": 15385, + "gas_used": 10207, + "gas_price": 0.17557, + "storage_limit": 257, + "storage_size": 0, + "storage_paid": 0, + "volume": 0.014931, + "fee": 0.001792, + "reward": 0, + "deposit": 0, + "burned": 0, + "is_internal": false, + "has_data": false, + "days_destroyed": 0.000083, + "sender": "tz1bd5Pn5DxPinvCtkeJmoneyYiLeUebvUa5", + "receiver": "tz1ZnXzwGtyjGVEqRJgEgJK9z2vrrq1AooaA", + "branch_id": 888888, + "branch_height": 888887, + "branch_depth": 1, + "branch": "BLv7JH7gMfVqbnMQ6GsqSfXvRu5bKeVZTCCRKqzrz9WyjLYfKtG" + }, + { + "hash": "ooe4aYfzRkGUS4UdXeRThNCsv5NkqeMLdKtfL7bzL3y7TGZzgGE", + "type": "transaction", + "block": "BMSY7Rvss3to1HGuCVLJsbAyCgghXzML8M3XD8kzoaCc2LLVEoM", + "time": "2020-03-31T10:33:31Z", + "height": 888888, + "cycle": 217, + "counter": 2493709, + "op_n": 24, + "op_c": 1, + "op_i": 0, + "status": "applied", + "is_success": true, + "is_contract": false, + "gas_limit": 15385, + "gas_used": 10207, + "gas_price": 0.17557, + "storage_limit": 257, + "storage_size": 0, + "storage_paid": 0, + "volume": 0.014924, + "fee": 0.001792, + "reward": 0, + "deposit": 0, + "burned": 0, + "is_internal": false, + "has_data": false, + "days_destroyed": 0.000083, + "sender": "tz1bd5Pn5DxPinvCtkeJmoneyYiLeUebvUa5", + "receiver": "tz1ekJGKM5wvKPMfWfCqXdeydinq3Mv85qHd", + "branch_id": 888888, + "branch_height": 888887, + "branch_depth": 1, + "branch": "BLv7JH7gMfVqbnMQ6GsqSfXvRu5bKeVZTCCRKqzrz9WyjLYfKtG" + }, + ... + ] + } + }, + "context": { + "code": 200, + "results": 1, + "state": 974156, + ... + } +} +``` + +**Request cost formula:** + +Always `1`. + +**Explore visualization on our front-end:** + +- https://blockchair.com/tezos/operation/ooe4aYfzRkGUS4UdXeRThNCsv5NkqeMLdKtfL7bzL3y7TGZzgGE + + + +### Raw account data + +Returns raw account data from our `tzindex` instance. See https://github.com/blockwatch-cc/tzindex/blob/master/README.md for field descriptions, but mostly they are self-describing. + +**Endpoint:** + +- `https://api.blockchair.com/{:xtz_chain}/raw/account/{:address}₀` + +**Where:** + +- `{:xtz_chain}` can only be `tezos` +- `{:address}ᵢ` is the address + +**Output:** + +`data` contains an associative array: + +- `data.{:address}ᵢ.account` — account information. + +**Example output:** + +`https://api.blockchair.com/tezos/raw/account/tz1ekJGKM5wvKPMfWfCqXdeydinq3Mv85qHd`: + +```json +{ + "data": { + "tz1ekJGKM5wvKPMfWfCqXdeydinq3Mv85qHd": { + "account": { + "address": "tz1ekJGKM5wvKPMfWfCqXdeydinq3Mv85qHd", + "address_type": "ed25519", + "delegate": "tz1NEKxGEHsFufk87CVZcrqWu8o22qh46GK6", + "manager": "", + "pubkey": "edpktp1ih5KKrct18BgCS5inC3sJf3EKrSAAEa4poQiH6G7CeuaGaY", + "first_in": 836128, + "first_out": 836134, + "last_in": 965984, + "last_out": 965988, + "first_seen": 836128, + "last_seen": 965988, + "delegated_since": 965988, + "delegate_since": 0, + "first_in_time": "2020-02-22T23:33:26Z", + "first_out_time": "2020-02-22T23:39:26Z", + "last_in_time": "2020-05-24T05:39:34Z", + "last_out_time": "2020-05-24T05:43:34Z", + "first_seen_time": "2020-02-22T23:33:26Z", + "last_seen_time": "2020-05-24T05:43:34Z", + "delegated_since_time": "2020-05-24T05:43:34Z", + "delegate_since_time": "0001-01-01T00:00:00Z", + "total_received": 126.580209, + "total_sent": 27.58424, + "total_burned": 0.257, + "total_fees_paid": 0.0275, + "total_rewards_earned": 0, + "total_fees_earned": 0, + "total_lost": 0, + "frozen_deposits": 0, + "frozen_rewards": 0, + "frozen_fees": 0, + "unclaimed_balance": 0, + "spendable_balance": 98.711469, + "total_balance": 98.711469, + "delegated_balance": 0, + "total_delegations": 0, + "active_delegations": 0, + "is_funded": true, + "is_activated": false, + "is_vesting": false, + "is_spendable": true, + "is_delegatable": false, + "is_delegated": true, + "is_revealed": true, + "is_delegate": false, + "is_active_delegate": false, + "is_contract": false, + "blocks_baked": 0, + "blocks_missed": 0, + "blocks_stolen": 0, + "blocks_endorsed": 0, + "slots_endorsed": 0, + "slots_missed": 0, + "n_ops": 14, + "n_ops_failed": 0, + "n_tx": 10, + "n_delegation": 3, + "n_origination": 0, + "n_proposal": 0, + "n_ballot": 0, + "token_gen_min": 3, + "token_gen_max": 26171, + "grace_period": 0, + "staking_balance": 0, + "rolls": 0, + "rich_rank": 33881, + "traffic_rank": 0, + "flow_rank": 0, + "last_bake_height": 0, + "last_bake_block": "", + "last_bake_time": "0001-01-01T00:00:00Z", + "last_endorse_height": 0, + "last_endorse_block": "", + "last_endorse_time": "0001-01-01T00:00:00Z", + "next_bake_height": 0, + "next_bake_priority": 0, + "next_bake_time": "0001-01-01T00:00:00Z", + "next_endorse_height": 0, + "next_endorse_time": "0001-01-01T00:00:00Z", + "delegate_account": { + "address": "tz1NEKxGEHsFufk87CVZcrqWu8o22qh46GK6", + "address_type": "ed25519", + "delegate": "tz1NEKxGEHsFufk87CVZcrqWu8o22qh46GK6", + "manager": "", + "pubkey": "edpkthjojh2oARHALyYMfb7CtCjcr1FxknAyRVPCSJQXXmB3mEpTaq", + "first_in": 787242, + "first_out": 787244, + "last_in": 974156, + "last_out": 974156, + "first_seen": 787242, + "last_seen": 974156, + "delegated_since": 0, + "delegate_since": 787244, + "first_in_time": "2020-01-19T17:54:08Z", + "first_out_time": "2020-01-19T17:56:08Z", + "last_in_time": "2020-05-29T22:40:38Z", + "last_out_time": "2020-05-29T22:40:38Z", + "first_seen_time": "2020-01-19T17:54:08Z", + "last_seen_time": "2020-05-29T22:40:38Z", + "delegated_since_time": "0001-01-01T00:00:00Z", + "delegate_since_time": "2020-01-19T17:56:08Z", + "total_received": 187327.25126, + "total_sent": 8026.499705, + "total_burned": 0.269, + "total_fees_paid": 0.012091, + "total_rewards_earned": 9020.066654, + "total_fees_earned": 6.466546, + "total_lost": 0, + "frozen_deposits": 100544, + "frozen_rewards": 3301.666664, + "frozen_fees": 2.432551, + "unclaimed_balance": 0, + "spendable_balance": 84478.904449, + "total_balance": 185025.337, + "delegated_balance": 1360415.547819, + "total_delegations": 4665, + "active_delegations": 2909, + "is_funded": true, + "is_activated": false, + "is_vesting": false, + "is_spendable": true, + "is_delegatable": false, + "is_delegated": false, + "is_revealed": true, + "is_delegate": true, + "is_active_delegate": true, + "is_contract": false, + "blocks_baked": 117, + "blocks_missed": 1, + "blocks_stolen": 0, + "blocks_endorsed": 3433, + "slots_endorsed": 3486, + "slots_missed": 64, + "n_ops": 3459, + "n_ops_failed": 0, + "n_tx": 21, + "n_delegation": 1, + "n_origination": 0, + "n_proposal": 0, + "n_ballot": 1, + "token_gen_min": 3, + "token_gen_max": 25443, + "grace_period": 243, + "staking_balance": 1545440.884819, + "rolls": 193, + "rich_rank": 397, + "traffic_rank": 0, + "flow_rank": 0, + "last_bake_height": 0, + "last_bake_block": "", + "last_bake_time": "0001-01-01T00:00:00Z", + "last_endorse_height": 0, + "last_endorse_block": "", + "last_endorse_time": "0001-01-01T00:00:00Z", + "next_bake_height": 0, + "next_bake_priority": 0, + "next_bake_time": "0001-01-01T00:00:00Z", + "next_endorse_height": 0, + "next_endorse_time": "0001-01-01T00:00:00Z" + } + } + } + }, + "context": { + "code": 200, + "source": "D", + "time": 0.49178099632263184, + "results": 1, + "state": 974165, + ... + } +} +``` + +**Request cost formula:** + +Always `1`. + +**Explore visualization on our front-end:** + +- https://blockchair.com/tezos/account/tz1ekJGKM5wvKPMfWfCqXdeydinq3Mv85qHd + + + # Infinitable endpoints (SQL-like queries) These endpoints allow you to filter, sort, and aggregate blockchain data. The output is database rows. Unlike dashboard and raw endpoints, all infinitable endpoints listed in this section can be considered as just one endpoint as it has the same options and the same output structure across different blockchains and entities. Here it is: `https://api.blockchair.com/{:table}{:query}`. @@ -7819,7 +7993,7 @@ See [request costs for infinitables](#link_05) Broadcast a transaction to the network -**Endpoint:** +**Endpoints:** - `https://api.blockchair.com/{:chain}/push/transaction` (`POST` request) @@ -7830,7 +8004,7 @@ Broadcast a transaction to the network **Output:** -If the transaction has been successfully broadcast to the network, API will return a JSON response (code `200`) containing `data` array with `transaction_hash` key holding the hash of the received transaction. In case of any error (wrong transaction format, spending already spent outputs, etc.) API returns status code `400`. +If the transaction has been successfully broadcast to the network, API will return a JSON response (code `200`) containing `data` array with `transaction_hash` key holding the hash of the received transaction. In case of any error (wrong transaction format, spending already spent outputs, etc.) API returns status code `400` and an error desription if available (descriptions aren't shown for `ethereum` and `mixin`). Example of a successful response: @@ -7853,7 +8027,7 @@ Example of a response to an invalid transaction: "data": null, "context": { "code": 400, - "error": "Invalid transaction" + "error": "Invalid transaction. Error: 16: mandatory-script-verify-flag-failed (Signature must use SIGHASH_FORKID)" ... } } @@ -7865,6 +8039,8 @@ Example of a response to an invalid transaction: > curl -v --data "data=01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0704ffff001d0104ffffffff0100f2052a0100000043410496b538e853519c726a2c91e61ec11600ae1390813a627c66fb8be7947be63c52da7589379515d4e0a604f8141781e62294721166bf621e73a82cbf2342c858eeac00000000" https://api.blockchair.com/bitcoin/push/transaction ``` +**Tip:** for testing purpose it's possible to use GET request instead of POST like this: `https://api.blockchair.com/bitcoin/push/transaction?data=0100000001000000000000000000000000...` + **Request cost formula:** Always `1`. @@ -8155,13 +8331,6 @@ The response contains an array where the keys are blockchains, and the values ar "blockchair_first_entry_date": "2011-02-02", "is_full": true }, - "ton/testnet": { - "blockchain_first_entry": 1, - "blockchain_first_entry_date": "2019-11-15", - "blockchair_first_entry": 1, - "blockchair_first_entry_date": "2019-11-15", - "is_full": true - }, "cardano": { "blockchain_first_entry": 1, "blockchain_first_entry_date": "2017-09-23", @@ -8182,6 +8351,13 @@ The response contains an array where the keys are blockchains, and the values ar "blockchair_first_entry": 0, "blockchair_first_entry_date": "2019-02-28", "is_full": true + }, + "tezos": { + "blockchain_first_entry": 0, + "blockchain_first_entry_date": "2018-06-30", + "blockchair_first_entry": 0, + "blockchair_first_entry_date": "2018-06-30", + "is_full": true } }, "context": { @@ -8319,7 +8495,7 @@ While `{:chain}/stats` endpoints already include info on various countdowns (i.e **Endpoint:** -- `https://api.blockchair.com/tools/halvening +- `https://api.blockchair.com/tools/halvening` **Output:** From 0770a50c29e51587fbc07e017b33fa64bc2bba1e Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Thu, 4 Jun 2020 05:28:46 +0300 Subject: [PATCH 126/180] v.2.0.56 --- API.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/API.md b/API.md index 24376187..01ec87c9 100644 --- a/API.md +++ b/API.md @@ -26,6 +26,11 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.56 - Jun 4th, 2020 + * Improved the `https://api.blockchair.com/{:btc_chain}/dashboards/xpub/{:extended_key}` endpoint response time when requesting the same xpub for the second and subsequent times -- we now cache the minimum number of needed derivation cycles (e.g. now if an xpub contains 59 addresses on the first request API goes through 3 cycles -- 20 addresses each -- and then remembers that there are at least 60 addresses should be checked -- and on subsequent requests these 60 addresses will be checked using 1 database request instead of 3. + * Fixed API returning error `500` for very large xpubs + * Improved Cardano explorer stability + * Improved `https://api.blockchair.com/{:chain}/stats` and `https://api.blockchair.com/stats` endpoints response time * v.2.0.55 - May 28th, 2020 * Added `circulation` and `circulation_approximate` fields to the `https://api.blockchair.com/ethereum/erc-20/{:token}/stats` endpoint output. These values yield total circulating supply of the token (`null` if the contract doesn't have the `totalSuply` function). * Fixed a precision issue in the `https://api.blockchair.com/ethereum/erc-20/{:contract}/dashboards/address/{:address}` endpoint, now `balance` returns precise value. From 28db117a44cdc347ed5e4577a824c34e3ee203e3 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Fri, 5 Jun 2020 14:55:54 +0300 Subject: [PATCH 127/180] v.2.0.57 --- API.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/API.md b/API.md index 01ec87c9..0cd5edba 100644 --- a/API.md +++ b/API.md @@ -3,7 +3,7 @@ Logo ### API v.2 documentation -* English: [https://blockchair.com/api/docs](https://blockchair.com/api/docs) (up to v.2.0.49) +* English: [https://blockchair.com/api/docs](https://blockchair.com/api/docs) (up to v.2.0.56) ### Please apply for an API key first @@ -26,6 +26,11 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.57 - Jun 5th, 2020 + * We now show multisig types for P2SH and P2WSH addresses. The type has the following format: `multisig_{:m}_of_{:n}`. If the script is not P2SH or P2WSH multisig, the type is `null`. Affected endpoints: + * `https://api.blockchair.com/{:btc_chain}/dashboards/address/{:address}` now has the `scripthash_type` field (example: `https://api.blockchair.com/bitcoin/dashboards/address/37cmSuMp7CuLDhjYkNJiTSewmbPuv8RBt1`). If address hasn't been seen spending, it's not possible to derive the multisig type, and `scripthash_type` will be `null`. + * `https://api.blockchair.com/{:btc_chain}/dashboards/transaction/{:hash}₀` and `https://api.blockchair.com/{:btc_chain}/dashboards/transactions/{:hash}₀,...,{:hash}ᵩ` now have `scripthash_type` field for inputs and outputs (example: `https://api.blockchair.com/bitcoin/dashboards/transaction/4d41241148a7cb8f4e2820d4393415ccd3d0793053a3855b44c33e5053c231ff`). Please note that if output is unspent, `scripthash_type` will always be `null`, even if the associated address multisig type can be derived from some other spent output. + * Fixed bug in the `https://api.blockchair.com/{:btc_chain}/mempool/outputs` infinitable where `spending_witness` returned values in an incorrect format for SegWit-enabled chains (this closes Issue #157) * v.2.0.56 - Jun 4th, 2020 * Improved the `https://api.blockchair.com/{:btc_chain}/dashboards/xpub/{:extended_key}` endpoint response time when requesting the same xpub for the second and subsequent times -- we now cache the minimum number of needed derivation cycles (e.g. now if an xpub contains 59 addresses on the first request API goes through 3 cycles -- 20 addresses each -- and then remembers that there are at least 60 addresses should be checked -- and on subsequent requests these 60 addresses will be checked using 1 database request instead of 3. * Fixed API returning error `500` for very large xpubs From 2ae7b49b5a5debb9c6f03952afae9c075d168649 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Sun, 7 Jun 2020 12:51:36 +0300 Subject: [PATCH 128/180] v.2.0.56-57 --- API_DOCUMENTATION_EN.md | 41 ++++++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index 64d7880d..db52a1d9 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,4 +1,4 @@ -# [Blockchair.com](https://blockchair.com/) API v.2.0.55 Documentation +# [Blockchair.com](https://blockchair.com/) API v.2.0.57 Documentation ``` ____ __ __ __ _ @@ -463,7 +463,7 @@ As a reminder, there's the `context.api` array in every API response which conta When we change something, or add new functions, we bump the API version number. Generally, we try as hard as possible not to bring any compatibility-breaking changes in API updates, but sometimes this is needed as some blockchains change their features themselves, we're fixing various bugs, etc. This doesn't apply, however, to changes to endpoints which are either marked as alpha- or beta-stage functions, or unstable in nature (e.g. all raw endpoints where the API returns data directly from our nodes, and the response may change as we upgrade the nodes). These marks are reflected in the [Quick endpoint reference](#link_M02). -**The changelog is available here: https://github.com/Blockchair/Blockchair.Support/blob/master/API.md** +**The changelog is available here: [https://github.com/Blockchair/Blockchair.Support/blob/master/API.md](https://github.com/Blockchair/Blockchair.Support/blob/master/API.md)** It makes sense to check if `context.api.version` has increased and/or just whether `context.api.next_major_update` is not `null` or larger than the latest update date known to you. If that's the case — you can send yourself a notification and review the changelog to make your application compatible with the changes starting from `context.api.next_major_update`. @@ -1437,7 +1437,7 @@ Note that the total number of transactions in the block is contained in `data.{: * `context.results` — number of found blocks * `context.limit` — applied limit * `context.offset` — applied offset -* `context.state` — best block height on the `{:btc_chain}` chain (tip: it's possible to calculate the number of confirmation block received using this formula: `confirmations = data.{:id}ᵢ.block.id - context.state + 1`) +* `context.state` — best block height on the `{:btc_chain}` chain (tip: it's possible to calculate the number of confirmation block received using this formula: `confirmations = context.state - data.{:id}ᵢ.block.id + 1`) **Example requests:** @@ -1552,6 +1552,7 @@ Note that the total number of transactions in the block is contained in `data.{: Additional data: * `data.{:hash}ᵢ.layer_2.omni` (for `bitcoin` only; in alpha test mode) — Omni layer transaction data in case there's any +* `scripthash_type` field for inputs and outputs (example: `https://api.blockchair.com/bitcoin/dashboards/transaction/4d41241148a7cb8f4e2820d4393415ccd3d0793053a3855b44c33e5053c231ff`) in the `multisig_{:m}_of_{:n}` format. Please note that if output is unspent, `scripthash_type` will always be `null`, even if the associated address multisig type can be derived from some other spent output. In case transaction is confirmed on the blockchain, `data.{:hash}ᵢ.transaction.block_id` contains the block number it's included in. If the transaction is in the mempool, `data.{:hash}ᵢ.transaction.block_id` yields `-1`. If the transaction is neither present in the blockchain, nor in the mempool, there won't be `data.{:hash}ᵢ` key with data. @@ -1600,7 +1601,8 @@ In case transaction is confirmed on the blockchain, `data.{:hash}ᵢ.transaction "fee_per_kb_usd": 0, "fee_per_kwu": 0, "fee_per_kwu_usd": 0, - "cdd_total": 149.15856481481 + "cdd_total": 149.15856481481, + "scripthash_type": null }, "inputs": [ { @@ -1629,7 +1631,8 @@ In case transaction is confirmed on the blockchain, `data.{:hash}ᵢ.transaction "spending_signature_hex": "47304402204e45e16932b8af514961a1d3a1a25fdf3f4f7732e9d624c6c61548ab5fb8cd410220181522ec8eca07de4860a4acdd12909d831cc56cbbac4622082221a8768d1d0901", "spending_witness": "", "lifespan": 257746, - "cdd": 149.158564814815 + "cdd": 149.158564814815, + "scripthash_type": null } ], "outputs": [ @@ -1659,7 +1662,8 @@ In case transaction is confirmed on the blockchain, `data.{:hash}ᵢ.transaction "spending_signature_hex": "4730440220576497b7e6f9b553c0aba0d8929432550e092db9c130aae37b84b545e7f4a36c022066cb982ed80608372c139d7bb9af335423d5280350fe3e06bd510e695480914f01", "spending_witness": "", "lifespan": 58208942, - "cdd": 6737.14606481481 + "cdd": 6737.14606481481, + "scripthash_type": null }, { "block_id": 170, @@ -1687,7 +1691,8 @@ In case transaction is confirmed on the blockchain, `data.{:hash}ᵢ.transaction "spending_signature_hex": "473044022027542a94d6646c51240f23a76d33088d3dd8815b25e9ea18cac67d1171a3212e02203baf203c6e7b80ebd3e588628466ea28be572fe1aaa3f30947da4763dd3b3d2b01", "spending_witness": "", "lifespan": 9108, - "cdd": 4.21666666666667 + "cdd": 4.21666666666667, + "scripthash_type": null } ] } @@ -1794,7 +1799,7 @@ Note that currently the maximum depth for xpub address discovery is 250 main add Address object specification: -* `type` — address type (the same as `type` [here](#link_400), can be one of these: `pubkey`, `pubkeyhash`, `scripthash`, `multisig`, `nulldata`, `nonstandard`, `witness_v0_scripthash`, `witness_v0_keyhash`, `witness_unknown`) +* `type` — address type (the same as `type` [here](#link_400), can be one of these: `pubkey` (P2PK), `pubkeyhash` (P2PKH), `scripthash` (P2SH), `multisig`, `nulldata` (OP_RETURN), `nonstandard`, `witness_v0_keyhash` (P2WPKH), `witness_v0_scripthash` (P2WSH), `witness_unknown`) * `script_hex` — output script (in hex) corresponding to the address * `balance` — address balance in satoshi (hereinafter — including unconfirmed outputs unless `?state=latest` option is used) * `balance_usd` — address balance in USD @@ -1810,13 +1815,14 @@ Address object specification: * `last_seen_spending` — timestamp (UTC) when the last time this address sent coins * `transaction_count` — number of unique transactions this address participating in (available only in the `address` endpoint) * `path` — derived address path (available only in the `xpub` endpoint) +* `scripthash_type` — in case the `type` is either `scripthash` (P2SH) or `witness_v0_scripthash` (P2WSH) — yields multisig type in the following format: `multisig_{:m}_of_{:n}`. If it's not multisig, or it's not possible to derive the type because there has been no spendings from this address — yields `null`. Available only in the `address` endpoint. **Context keys:** * `context.results` — number of found addresses * `context.limit` — applied limit * `context.offset` — applied offset -* `context.state` — best block height on the `{:btc_chain}` chain (tip: it's possible to calculate the number of confirmation block received using this formula: `confirmations = data.{:id}ᵢ.block.id - context.state + 1`) +* `context.state` — best block height on the `{:btc_chain}` chain (tip: it's possible to calculate the number of confirmation block received using this formula: `confirmations = context.state - data.{:id}ᵢ.block.id + 1`) * `context.checked` (for the `xpub` endpoint only) — lists the addresses checked by our engine with their paths **Example requests:** @@ -1850,8 +1856,9 @@ Address object specification: "last_seen_receiving": "2019-10-24 18:47:23", "first_seen_spending": null, "last_seen_spending": null, - "transaction_count": 1820 - }, + "transaction_count": 1820, + "scripthash_type": null +, }, "transactions": [ { "block_id": 600890, @@ -2338,7 +2345,7 @@ Note that the total number of transactions in the block is contained in `data.{: - `context.results` — number of found blocks - `context.limit` — applied limit - `context.offset` — applied offset -- `context.state` — best block height on the `{:eth_chain}` chain (tip: it's possible to calculate the number of confirmation block received using this formula: `confirmations = data.{:id}ᵢ.block.id - context.state + 1`) +- `context.state` — best block height on the `{:eth_chain}` chain (tip: it's possible to calculate the number of confirmation block received using this formula: `confirmations = context.state - data.{:id}ᵢ.block.id + 1`) **Example requests:** @@ -3128,7 +3135,7 @@ Where `{:id}ᵢ` is either `{:height}ᵢ` or `{:hash}ᵢ` from the query string. **Context keys:** -- `context.state`: best block height on the `{:btc_chain}` chain (tip: it's possible to calculate the number of confirmation block received using this formula: `confirmations = data.{:id}ᵢ.block.id - context.state + 1`) +- `context.state`: best block height on the `{:btc_chain}` chain (tip: it's possible to calculate the number of confirmation block received using this formula: `confirmations = context.state - data.{:id}ᵢ.block.id + 1`) **Example requests:** @@ -3206,7 +3213,7 @@ If there's no `{:hash}ᵢ` has been found on the blockchain, returns an empty ar **Context keys:** -- `context.state`: best block height on the `{:btc_chain}` chain (tip: it's possible to calculate the number of confirmation block received using this formula: `confirmations = data.{:id}ᵢ.block.id - context.state + 1`) +- `context.state`: best block height on the `{:btc_chain}` chain (tip: it's possible to calculate the number of confirmation block received using this formula: `confirmations = context.state - data.{:id}ᵢ.block.id + 1`) **Example requests:** @@ -3315,7 +3322,7 @@ Where `{:id}ᵢ` is either `{:height}ᵢ` or `{:hash}ᵢ` from the query string. **Context keys:** -- `context.state`: best block height on the `{:eth_chain}` chain (tip: it's possible to calculate the number of confirmation block received using this formula: `confirmations = data.{:id}ᵢ.block.id - context.state + 1`) +- `context.state`: best block height on the `{:eth_chain}` chain (tip: it's possible to calculate the number of confirmation block received using this formula: `confirmations = context.state - data.{:id}ᵢ.block.id + 1`) **Example requests:** @@ -3399,7 +3406,7 @@ If there's no `{:hash}ᵢ` has been found on the blockchain, returns an empty ar **Context keys:** -- `context.state`: best block height on the `{:btc_chain}` chain (tip: it's possible to calculate the number of confirmation block received using this formula: `confirmations = data.{:id}ᵢ.block.id - context.state + 1`) +- `context.state`: best block height on the `{:btc_chain}` chain (tip: it's possible to calculate the number of confirmation block received using this formula: `confirmations = context.state - data.{:id}ᵢ.block.id + 1`) **Example requests:** @@ -3902,7 +3909,7 @@ Returns raw ledger data directly from our full node. **Context keys:** -- `context.state`: best ledger height on the `{:btc_chain}` chain (tip: it's possible to calculate the number of confirmation block received using this formula: `confirmations = data.{:id}ᵢ.block.id - context.state + 1`) +- `context.state`: best ledger height on the `{:btc_chain}` chain (tip: it's possible to calculate the number of confirmation block received using this formula: `confirmations = context.state - data.{:id}ᵢ.block.id + 1`) **Example requests:** From c18cb43a7fd85758c877fa77f3da03cc59789036 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Sat, 13 Jun 2020 22:15:29 +0300 Subject: [PATCH 129/180] v.2.0.58 --- API.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/API.md b/API.md index 0cd5edba..4388566f 100644 --- a/API.md +++ b/API.md @@ -3,7 +3,7 @@ Logo ### API v.2 documentation -* English: [https://blockchair.com/api/docs](https://blockchair.com/api/docs) (up to v.2.0.56) +* English: [https://blockchair.com/api/docs](https://blockchair.com/api/docs) (up to v.2.0.58) ### Please apply for an API key first @@ -26,6 +26,12 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.58 - Jun 13th, 2020 + * Added EOS support. Please note we're not running a full history EOS node at the moment, so our API shows the most recent blocks and transactions only. New endpoints: + * `https://api.blockchair.com/eos/stats` + * `https://api.blockchair.com/eos/raw/block/{:id}` + * `https://api.blockchair.com/eos/raw/transaction/{:hash}` + * `https://api.blockchair.com/eos/raw/account/{:address}` * v.2.0.57 - Jun 5th, 2020 * We now show multisig types for P2SH and P2WSH addresses. The type has the following format: `multisig_{:m}_of_{:n}`. If the script is not P2SH or P2WSH multisig, the type is `null`. Affected endpoints: * `https://api.blockchair.com/{:btc_chain}/dashboards/address/{:address}` now has the `scripthash_type` field (example: `https://api.blockchair.com/bitcoin/dashboards/address/37cmSuMp7CuLDhjYkNJiTSewmbPuv8RBt1`). If address hasn't been seen spending, it's not possible to derive the multisig type, and `scripthash_type` will be `null`. From e22624ddddd5a9e6287b24ac015c812c8e48099b Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Sat, 13 Jun 2020 22:16:32 +0300 Subject: [PATCH 130/180] v.2.0.58 --- API_DOCUMENTATION_EN.md | 460 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 451 insertions(+), 9 deletions(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index db52a1d9..c8f970ca 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,4 +1,4 @@ -# [Blockchair.com](https://blockchair.com/) API v.2.0.57 Documentation +# [Blockchair.com](https://blockchair.com/) API v.2.0.58 Documentation ``` ____ __ __ __ _ @@ -28,6 +28,7 @@ + [Cardano-like blockchain stats](#link_007) + [Mixin-like DAG stats](#link_008) + [Tezos-like blockchain stats](#link_009) + + [EOS-like blockchain stats](#link_010) + [Omni Layer stats](#link_500) + [ERC-20 stats](#link_509) + [Dashboard endpoints](#link_M2) (Retrieve information about various entities in a neat format from our databases) @@ -77,6 +78,10 @@ - [Block](#link_112) - [Operation](#link_213) - [Account](#link_308) + - [EOS](#link_M3A) + - [Block](#link_113) + - [Transaction](#link_214) + - [Account](#link_309) + [Infinitable endpoints](#link_05) (SQL-like queries: filter, sort, and aggregate blockchain data) + [Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin, Zcash, and Bitcoin Testnet](#link_M41) + [Blocks](#link_102) (table) @@ -111,7 +116,7 @@ # Introduction -Blockchair API provides developers with access to data contained in [16 different blockchains](#link_M01). Unlike other APIs, Blockchair also supports numerous analytical queries like filtering, sorting, and aggregating blockchain data. +Blockchair API provides developers with access to data contained in [17 different blockchains](#link_M01). Unlike other APIs, Blockchair also supports numerous analytical queries like filtering, sorting, and aggregating blockchain data. Here are some examples of what you can build using our API: @@ -135,7 +140,7 @@ Our API is free to try under some limitations, and we have a variety of premium ## Supported blockchains and second layers -As of today, our API supports **16 blockchains** (15 mainnets and 1 testnet) divided into 7 groups: +As of today, our API supports **17 blockchains** (16 mainnets and 1 testnet) divided into 9 groups: * Bitcoin-like blockchains (Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin, Zcash, Bitcoin Testnet), also known as UTXO-based blockchains * Ethereum-like blockchains (Ethereum) * Ripple-like blockchains (Ripple) @@ -144,6 +149,7 @@ As of today, our API supports **16 blockchains** (15 mainnets and 1 testnet) div * Cardano-like blockchains (Cardano) * Mixin-like DAGs (Mixin) — technically, it's a DAG rather than a blockchain, but for the sake of unification it may be mentioned as a blockchain further in this documentation * Tezos-like blockchains (Tezos) +* EOS-like blockchains (EOS) Within a group, there's no or little difference between the set of available endpoints and their output. @@ -159,13 +165,14 @@ Here's the list of available mainnets: | Dogecoin | Bitcoin-like | `https://api.blockchair.com/dogecoin` | Full support | | Dash | Bitcoin-like | `https://api.blockchair.com/dash` | Full support | | Ripple | Ripple-like | `https://api.blockchair.com/ripple` | Alpha mode, possible compatibility-breaking changes | -| Groestlcoin | Bitcoin-like | `https://api.blockchair.com/groestlcoin` | Full support, community-backed till June 18th, 2020 | +| Groestlcoin | Bitcoin-like | `https://api.blockchair.com/groestlcoin` | Full support at least till June 18th, 2020 | | Stellar | Stellar-like | `https://api.blockchair.com/stellar` | Alpha mode, possible compatibility-breaking changes | | Monero | Monero-like | `https://api.blockchair.com/monero` | Alpha mode, possible compatibility-breaking changes | | Cardano | Cardano-like | `https://api.blockchair.com/cardano` | Alpha mode, possible compatibility-breaking changes | | Zcash | Bitcoin-like | `https://api.blockchair.com/zcash` | Full support | -| Mixin | Mixin-like | `https://api.blockchair.com/mixin` | Full support | +| Mixin | Mixin-like | `https://api.blockchair.com/mixin` | Full support at least till April 24th, 2021 | | Tezos | Tezos-like | `https://api.blockchair.com/tezos` | Alpha mode, possible compatibility-breaking changes | +| EOS | EOS-like | `https://api.blockchair.com/eos` | Alpha mode, possible compatibility-breaking changes | There are also following testnets supported which are technically considered as separate blockchains: @@ -182,7 +189,7 @@ As a general rule, if we add a blockchain to our platform, it means we'll suppor * If a blockchain is community-backed, we guarantee support till some specified date (this is reflected in the tables above). If its community decides not to prolong the agreement with Blockchair after that date, we may either continue to support that blockchain for free, or drop support for it; * If we see that a particular blockchain became unpopular on our platform, we may terminate its support with a 3 month notice. -For some of the blockchains we support we don't store full historical data. These blockchains are: `Ripple`, `Stellar`. That means you won't be able to query some old blocks, and the transaction list for an address may not show some old transactions. See [Available block ranges](#link_510) API endpoint to get data on which blocks are available in these blockchains. All other blockchains have full historical data. It's our intent to have full historical data for all blockchains. +For some of the blockchains we support we don't store full historical data. These blockchains are: `Ripple`, `Stellar`, `EOS`. That means you won't be able to query some old blocks, and the transaction list for an address may not show some old transactions. See [Available block ranges](#link_510) API endpoint to get data on which blocks are available in these blockchains. All other blockchains have full historical data. It's our intent to have full historical data for all blockchains. Blockchair API also supports **2 layer 2 solutions** (tokens) divided into 2 groups: @@ -214,6 +221,7 @@ This is the full list of available API endpoints. - `{:ada_chain}` can be only `cardano` - `{:xin_chain}` can be only `mixin` - `{:xtz_chain}` can be only `tezos` +- `{:eos_chain}` can be only `eos` | Endpoint path | Docs | Base request cost | Status | | ----------------------------------------------- | :----------------: | -----------------------------: | :---------------------------------------------: | @@ -227,6 +235,7 @@ This is the full list of available API endpoints. | `https://api.blockchair.com/{:ada_chain}/stats` | [👉](#link_007) | `1` | Stable | | `https://api.blockchair.com/{:xin_chain}/stats` | [👉](#link_008) | `1` | Stable | | `https://api.blockchair.com/{:xtz_chain}/stats` | [👉](#link_009) | `1` | Stable | +| `https://api.blockchair.com/{:eos_chain}/stats` | [👉](#link_010) | `1` | Stable | | **Block-related information** | — | — | — | | `https://api.blockchair.com/{:btc_chain}/dashboards/block/{:height}₀` | [👉](#link_100) | `1` | Stable | | `https://api.blockchair.com/{:btc_chain}/dashboards/block/{:hash}₀` | [👉](#link_100) | `1` | Stable | @@ -253,6 +262,7 @@ This is the full list of available API endpoints. | `https://api.blockchair.com/{:xin_chain}/raw/snapshot/{:hash}₀` | [👉](#link_111) | `1` | Alpha | | `https://api.blockchair.com/{:xtz_chain}/raw/block/{:height}₀` | [👉](#link_112) | `1` | Alpha | | `https://api.blockchair.com/{:xtz_chain}/raw/block/{:hash}₀` | [👉](#link_112) | `1` | Alpha | +| `https://api.blockchair.com/{:eos_chain}/raw/block/{:height}₀` | [👉](#link_113) | `1` | Alpha | | **Transaction-related information and actions** | — | — | — | | `https://api.blockchair.com/{:btc_chain}/dashboards/transaction/{:hash}₀` | [👉](#link_200) | `1` | Stable | | `https://api.blockchair.com/{:btc_chain}/dashboards/transactions/{:hash}₀,...,{:hash}ᵩ` | [👉](#link_200) | `1 + 0.1*c` | Stable | @@ -273,6 +283,8 @@ This is the full list of available API endpoints. | `https://api.blockchair.com/{:xin_chain}/raw/transaction/{:hash}₀` | [👉](#link_212) | `1` | Alpha | | `https://api.blockchair.com/{:xin_chain}/push/transaction` (`POST`) | [👉](#link_202) | `1` | Stable | | `https://api.blockchair.com/{:xtz_chain}/raw/operation/{:hash}₀` | [👉](#link_213) | `1` | Alpha | +| `https://api.blockchair.com/{:eos_chain}/raw/transaction/{:hash}₀` | [👉](#link_214) | `1` | Alpha | +| `https://api.blockchair.com/{:eos_chain}/raw/transaction/({:block_height},{:hash})` | [👉](#link_214) | `1` | Alpha | | **Address-related information** | — | — | — | | `https://api.blockchair.com/{:btc_chain}/dashboards/address/{:address}₀` | [👉](#link_300) | `1` | Stable | | `https://api.blockchair.com/{:btc_chain}/dashboards/addresses/{:address}₀,...,{:address}ᵩ` | [👉](#link_300) | `1 + 0.1*c` | Stable | @@ -283,6 +295,7 @@ This is the full list of available API endpoints. | `https://api.blockchair.com/{:xlm_chain}/raw/account/{:address}₀` | [👉](#link_304) | `1` | Alpha | | `https://api.blockchair.com/{:ada_chain}/raw/address/{:address}₀` | [👉](#link_307) | `1` | Alpha | | `https://api.blockchair.com/{:xtz_chain}/raw/account/{:address}₀` | [👉](#link_308) | `1` | Alpha | +| `https://api.blockchair.com/{:eos_chain}/raw/account/{:address}₀` | [👉](#link_309) | `1` | Alpha | | **Special entities** | — | — | — | | `https://api.blockchair.com/{:btc_chain}/outputs?{:query}` | [👉](#link_400) | `10` | Beta | | `https://api.blockchair.com/{:btc_chain}/mempool/outputs?{:query}` | [👉](#link_400) | `2` | Beta | @@ -1261,7 +1274,7 @@ Always `1`. - `operations_24h` — number of operations over the last 24 hours - `volume_24h` — volume transacted over the last 24 hours - `inflation_24h` — newly minted coin count over the last 24 hours -- `best_block_height` — the latest block number in the default workchain +- `best_block_height` — the latest block number - `best_block_hash` — its hash… - `best_block_time` — … and timestamp - `circulation` and `circulation_xtz` — total circulating supply @@ -1313,6 +1326,81 @@ Always `1`. +## EOS-like blockchain stats + +**Endpoint:** + +- `https://api.blockchair.com/eos/stats` + +**Output:** + +`data` contains an array with blockchain statistics: + +- `blocks` — total number of blocks +- `circulation_eos` — total circulating supply in EOS +- `circulation_limit_eos` — circulating supply limit +- `staked_eos` — staked amount of EOS +- `staked_percentage` — `(staked_eos / circulation_eos) * 100%` +- `best_block_height` — latest block number +- `best_block_time` — its timestamp... +- `best_block_producer` — and producer account name +- `irreversible_block_height` — latest irreversible block number +- `irreversible_block_hash` — its hash +- `ram_max_size` — max RAM size in bytes +- `ram_allocated_size` — allocated RAM size in bytes +- `ram_allocated_percentage` — `(ram_allocated_size / ram_max_size) * 100%` +- `market_price_usd` — average market price of 1 coin in USD (market data source: CoinGecko) +- `market_price_btc` — average market price of 1 coin in BTC +- `market_price_usd_change_24h_percentage` — market price change in percent for 24 hours +- `market_cap_usd` — market capitalization (coins in circulation * price per coin in USD) +- `market_dominance_percentage` — dominance index (how much % of the total cryptocurrency market is the market capitalization of the coin) +- `countdowns` (optional) — an optional array of events ([`event`, `time_left`] format), where `time_left` is the number of seconds till the `event` + +**Example output:** + +`https://api.blockchair.com/tezos/stats`: + +```json +{ + "data": { + "blocks": 125855542, + "circulation_eos": 1020158333.6877, + "circulation_limit_eos": 10000000000, + "staked_eos": 524985046.5825, + "staked_percentage": 51.46113394817525, + "best_block_height": 125855542, + "best_block_time": "2020-06-13 17:33:53", + "best_block_producer": "newdex.bp", + "irreversible_block_height": 125855206, + "irreversible_block_hash": "078065e6d5a20d200729a117d6747761b52b9531eddb1072a62b5fe839dec3da", + "ram_max_size": 192171732992, + "ram_allocated_size": 81993066226, + "ram_allocated_percentage": 42.66655920171846, + "market_price_usd": 2.59, + "market_price_btc": 0.00027429815680111, + "market_price_usd_change_24h_percentage": 0.6576, + "market_cap_usd": 2433086848, + "market_dominance_percentage": 0.9 + }, + "context": { + "code": 200, + "state": 125855542, + "request_cost": 1, + ... + } +} +``` + +**Request cost formula:** + +Always `1`. + +**Explore visualization on our front-end:** + +- https://blockchair.com/eos + + + ## Omni Layer stats Allows to retrieve the some basic stats on Omni Layer (Bitcoin). Note that this endpoint is in the Alpha stage, and Wormhole (Bitcoin Cash Omni-like token system) was phased out on January 1st, 2020. @@ -6012,6 +6100,352 @@ Always `1`. +## Raw data endpoints for EOS + + + +### Raw block data + +Returns raw block data directly from our node. Please note that we're not running a full history node for EOS, thus we store only the most recent blocks. + +**Endpoint:** + +- `https://api.blockchair.com/{:eos_chain}/raw/block/{:height}₀` + +**Where:** + +- `{:eos_chain}` can only be `eos` +- `{:height}ᵢ` is the block height (integer value), also known as block id + +**Output:** + +`data` contains an associative array: + +- `data.{:id}ᵢ.block` — raw block data with its transactions. + +**Example output:** + +`https://api.blockchair.com/eos/raw/block/125637913`: + +```json +{ + "data": { + "125637913": { + "block": { + "timestamp": "2020-06-12T11:20:08.000", + "producer": "blockpooleos", + "confirmed": 0, + "previous": "077d15183aebac5f1319426b44746fdb1340ae8bc922a630392f226ecd83f910", + "transaction_mroot": "7345d598bc85d6a15984f0d79129dcd5b8597b080c93799d24719765213e83a3", + "action_mroot": "c21a6d34f8130b1c8562dc028564d33d254969197e22b8acbfac5d67506a5ff0", + "schedule_version": 1717, + "new_producers": null, + "producer_signature": "SIG_K1_KaUZPdiu9f1vWhsJqUzAvF8aWRxqrJdmrXK8TxBhvZq6UbuC85VDNuR3ec9aLwaDscVYPpmZJ5PiaWtMNeEvk22mbea41W", + "transactions": [ + { + "status": "expired", + "cpu_usage_us": 0, + "net_usage_words": 0, + "trx": "a8396ac4623d4d420196289d2b3b079c561bdc2eaf514a77c84fb5d54f5fd443" + }, + { + "status": "expired", + "cpu_usage_us": 0, + "net_usage_words": 0, + "trx": "4e4c8b99af74ba79b165f3d3a2c2861adcf43c2fe4f4fd9cfb066a635bf2f4ff" + }, + { + "status": "executed", + "cpu_usage_us": 7561, + "net_usage_words": 12, + "trx": { + "id": "47a31d96705c50062b5a5cc98bb6371154accd1b56fb51b0dc70747b183107f5", + "signatures": [ + "SIG_K1_KW2xHSjt34Nh1zBkNhwqgHKH3CciZNmGoAJ7YNifAPKCGkbgEQdfhV82Q4goVdFmrHt9ntbkQqCfBBWmCMfZFXhKsgFzNA" + ], + "compression": "none", + "packed_context_free_data": "", + "context_free_data": [], + "packed_trx": "1d65e35e0a15601c8fe10000000001c0a88fca546773ad0000000000000090015048187a55f63de50000000000a0a693010000", + "transaction": { + "expiration": "2020-06-12T11:21:01", + "ref_block_num": 5386, + "ref_block_prefix": 3784252512, + "max_net_usage_words": 0, + "max_cpu_usage_ms": 0, + "delay_sec": 0, + "context_free_actions": [], + "actions": [ + { + "account": "pptqipaelyog", + "name": "m", + "authorization": [ + { + "actor": "woyzgpfu3145", + "permission": "mine" + } + ], + "data": { + "actor": "" + }, + "hex_data": "00" + } + ] + } + } + }, + ... + ], + "id": "077d1519d82a4a20278019953fb1788fd1c81074f4b754d29f062a93ca0cd468", + "block_num": 125637913, + "ref_block_prefix": 2501476391 + } + } + }, + "context": { + "code": 200, + "results": 1, + "state": 125860293, + "request_cost": 1, + ... + } +} +``` + +`https://api.blockchair.com/eos/raw/block/1` (pruned block): + +```json +{ + "data": null, + "context": { + "code": 400, + "error": "Unknown Block" + } +} +``` + +**Request cost formula:** + +Always `1`. + +**Explore visualization on our front-end:** + +- https://blockchair.com/eos/block/125637913 (may not be available due to pruning) + + + +### Raw transaction data + +Returns raw transaction data directly from our node. Please note that we're not running a full history node for EOS, thus we store only the most recent transactions. + +**Endpoints:** + +- `https://api.blockchair.com/{:eos_chain}/raw/transaction/{:hash}` +- `https://api.blockchair.com/{:eos_chain}/raw/transaction/({:block_height},{:hash})` + +**Where:** + +- `{:eos_chain}` can only be `eos` +- `{:hash}` is the transaction hash +- `{:block_height}` is the block height (specifying it returns transaction faster) + +**Output:** + +`data` contains an associative array: + +- `data.{:id}ᵢ.transaction` — transaction data + +**Example output:** + +`https://api.blockchair.com/eos/raw/transaction/(125637913,a8396ac4623d4d420196289d2b3b079c561bdc2eaf514a77c84fb5d54f5fd443)`: + +```json +{ + "data": { + "a8396ac4623d4d420196289d2b3b079c561bdc2eaf514a77c84fb5d54f5fd443": { + "id": "a8396ac4623d4d420196289d2b3b079c561bdc2eaf514a77c84fb5d54f5fd443", + "trx": { + "receipt": { + "status": "expired", + "cpu_usage_us": 0, + "net_usage_words": 0, + "trx": [ + 0, + "a8396ac4623d4d420196289d2b3b079c561bdc2eaf514a77c84fb5d54f5fd443" + ] + } + }, + "block_time": "2020-06-12T11:20:08.000", + "block_num": 125637913, + "last_irreversible_block": 125862330, + "traces": [] + } + }, + "context": { + "code": 200, + "results": 1, + "state": 125862660, + "request_cost": 1, + ... + } +} +``` + +**Request cost formula:** + +Always `1`. + +**Explore visualization on our front-end:** + +- https://blockchair.com/eos — navigate to the latest block and its transactions + + + +### EOS account data + +Returns raw account data directly from our node. + +**Endpoint:** + +- `https://api.blockchair.com/{:eos_chain}/raw/account/{:address}₀` + +**Where:** + +- `{:eos_chain}` can only be `eos` +- `{:address}ᵢ` is the account name + +**Output:** + +`data` contains an associative array: + +- `data.{:address}ᵢ.account` — account information. + +**Example output:** + +`https://api.blockchair.com/eos/raw/account/blockpooleos`: + +```json +{ + "data": { + "blockpooleos": { + "account": { + "account_name": "blockpooleos", + "head_block_num": 125863151, + "head_block_time": "2020-06-13T18:37:20.000", + "privileged": false, + "last_code_update": "1970-01-01T00:00:00.000", + "created": "2019-07-13T03:45:22.500", + "core_liquid_balance": "4533.2384 EOS", + "ram_quota": 17559, + "net_weight": 150100, + "cpu_weight": 1050619, + "net_limit": { + "used": 105, + "available": 15532697, + "max": 15532802 + }, + "cpu_limit": { + "used": 662, + "available": 8895, + "max": 9557 + }, + "ram_usage": 4795, + "permissions": [ + { + "perm_name": "active", + "parent": "owner", + "required_auth": { + "threshold": 1, + "keys": [ + { + "key": "EOS6nRvuhb9gJju7tehyFdotEDVn2xwWKfhJWwyPMjG9deaCQxpxT", + "weight": 1 + } + ], + "accounts": [], + "waits": [] + } + }, + { + "perm_name": "claimer", + "parent": "active", + "required_auth": { + "threshold": 1, + "keys": [ + { + "key": "EOS6gZzNjmzWTJX2LTBrtaXB2sczuna3bQWX4YPaokVG8zBBaYP8p", + "weight": 1 + } + ], + "accounts": [], + "waits": [] + } + }, + { + "perm_name": "owner", + "parent": "", + "required_auth": { + "threshold": 1, + "keys": [ + { + "key": "EOS71Q9ZUPh6hJ8GamZ1T9vERR4dQt5aMG5jHMESGUBPNWZwQBMq5", + "weight": 1 + } + ], + "accounts": [], + "waits": [] + } + } + ], + "total_resources": { + "owner": "blockpooleos", + "net_weight": "15.0100 EOS", + "cpu_weight": "105.0619 EOS", + "ram_bytes": 16159 + }, + "self_delegated_bandwidth": { + "from": "blockpooleos", + "to": "blockpooleos", + "net_weight": "5.0100 EOS", + "cpu_weight": "5.0619 EOS" + }, + "refund_request": null, + "voter_info": { + "owner": "blockpooleos", + "proxy": "genpoolproxy", + "producers": [], + "staked": 100929, + "last_vote_weight": "151677066207.26217651367187500", + "proxied_vote_weight": "0.00000000000000000", + "is_proxy": 0, + "flags1": 0, + "reserved2": 0, + "reserved3": "0 " + }, + "rex_info": null + } + } + }, + "context": { + "code": 200, + "results": 1, + "state": 125863140, + "request_cost": 1, + ... + } +} +``` + +**Request cost formula:** + +Always `1`. + +**Explore visualization on our front-end:** + +- https://blockchair.com/eos/account/blockpooleos + + + # Infinitable endpoints (SQL-like queries) These endpoints allow you to filter, sort, and aggregate blockchain data. The output is database rows. Unlike dashboard and raw endpoints, all infinitable endpoints listed in this section can be considered as just one endpoint as it has the same options and the same output structure across different blockchains and entities. Here it is: `https://api.blockchair.com/{:table}{:query}`. @@ -6653,7 +7087,7 @@ See [request costs for infinitables](#link_05) | spending_value_usd | null or float | Monetary value of the output in USD at the time of `spending_date` | `*` | `+` | | `+` | | spending_sequence | null or int | Sequence field | `*` | `+` | | | | spending_signature_hex | null or string `[0-9a-f]*` | Hex value of the spending script (signature) | | | | | -| spending_witness † | null or string (JSONB) | Witness information in the escaped JSONB format | | | | | +| spending_witness † | null or string | Witness information (comma-separated, may start with a comma if the first witness element is empty) | | | | | | lifespan | null or int | The number of seconds from the time of the output creation (`time`) to its spending (`spending_time`), `null` if the output hasn't been spent | `*` | `+` | | `+` | | cdd | null or float | The number of coindays destroyed spending the output, `null` if the output hasn't been spent | `*` | `+` | | `+` | @@ -8365,6 +8799,13 @@ The response contains an array where the keys are blockchains, and the values ar "blockchair_first_entry": 0, "blockchair_first_entry_date": "2018-06-30", "is_full": true + }, + "eos": { + "blockchain_first_entry": 1, + "blockchain_first_entry_date": "2018-06-08", + "blockchair_first_entry": null, + "blockchair_first_entry_date": null, + "is_full": false } }, "context": { @@ -8479,7 +8920,8 @@ This endpoint returns the list of latest software (core clients) releases for bl "monero": "Monero", "cardano": "Cardano SL", "zcash": "Zcash", - "mixin": "Mixin" + "mixin": "Mixin", + "eos": "EOSIO" }, ... } From a08ae35c93d245c7227594e0269e8fba53538828 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Thu, 18 Jun 2020 20:55:28 +0300 Subject: [PATCH 131/180] v.2.0.59 --- API.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/API.md b/API.md index 4388566f..9f7bd040 100644 --- a/API.md +++ b/API.md @@ -26,6 +26,10 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.59 - Jun 18th, 2020 + * Enhancements for Tezos: + * New `blocks` infinitable: `https://api.blockchair.com/tezos/raw/blocks` + * `context` array for every API call to the Tezos blockchain now has `price_usd` element returning the current USD price of Tezos * v.2.0.58 - Jun 13th, 2020 * Added EOS support. Please note we're not running a full history EOS node at the moment, so our API shows the most recent blocks and transactions only. New endpoints: * `https://api.blockchair.com/eos/stats` From fdb6e4a0d05c9d1e6f854d8e5e362cc6b4fe3e3f Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Fri, 19 Jun 2020 17:46:17 +0300 Subject: [PATCH 132/180] v.2.0.60 --- API.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/API.md b/API.md index 9f7bd040..e6e06de4 100644 --- a/API.md +++ b/API.md @@ -3,7 +3,7 @@ Logo ### API v.2 documentation -* English: [https://blockchair.com/api/docs](https://blockchair.com/api/docs) (up to v.2.0.58) +* English: [https://blockchair.com/api/docs](https://blockchair.com/api/docs) (up to v.2.0.60) ### Please apply for an API key first @@ -26,6 +26,13 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.60 - Jun 19th, 2020 + * New way to fetch balances for multiple addresses: `https://api.blockchair.com/{:btc_chain}/addresses/balances` (`POST` or `GET`) with `addresses` key in a `POST` request (or `?addresses={:list}` in a `GET` request) as a comma-separated list of addresses (up to 25.000 at once). This endpoint returns confirmed balances only. If address hasn't been recorded on the blockchain or has a balance of zero, it won't be displayed in the results. This endpoint is extremely fast (under 1 second for 25.000 addresses) and cheap (it costs only 26 request points to fetch 25.000 addresses). See documentation here: https://blockchair.com/api/docs#link_390 (supported chains: Bitcoin, Bitcoin Cash, Bitcoin SV, Litecoin, Dash, Zcash, Dogecoin, Groestlcoin) + * On Oct 26th, 2019 with v.2.0.38 we announced the "request cost" concept by which some requests cost more than others (i.e. requesting the data on 10 transactions costs more than requesting it for just 1 transaction, but since the request is done in bulk, it is cheaper for the API user in the end). Up until now we didn't enforce that policy counting each request as 1. + * Starting July 19th, 2020 at 00:00 UTC we'll start enforcing this rule + * As this is a somewhat compatibility-breaking change, we activate `context.api.next_major_update` and set it to `2020-07-19 00:00:00` (see [General Provisions](https://blockchair.com/api/docs#link_M06) for our policy on compatibility-breaking changes) + * `context` array for all requests now has the `request_cost` field yielding the request cost + * Premium API clients can track thier usage using [the control panel](https://api.blockchair.com/premium). If you have any questions, you can always reach us at <`info@blockchair.com`> * v.2.0.59 - Jun 18th, 2020 * Enhancements for Tezos: * New `blocks` infinitable: `https://api.blockchair.com/tezos/raw/blocks` From f5059ab72fc5902aac9f1077be66090697e8e58b Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Thu, 2 Jul 2020 13:35:48 +0300 Subject: [PATCH 133/180] v.2.0.62 --- API_DOCUMENTATION_EN.md | 543 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 517 insertions(+), 26 deletions(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index c8f970ca..9287636a 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,4 +1,4 @@ -# [Blockchair.com](https://blockchair.com/) API v.2.0.58 Documentation +# [Blockchair.com](https://blockchair.com/) API v.2.0.62 Documentation ``` ____ __ __ __ _ @@ -36,6 +36,7 @@ - [Block](#link_100) - [Transaction](#link_200) - [Address and extended public key (xpub)](#link_300) + - [Address balance mass check](#link_390) + [Ethereum](#link_M22) - [Block](#link_103) - [Uncle](#link_401) @@ -97,6 +98,8 @@ + [Snapshots](#link_407) (table) + [Mintings](#link_408) (table) + [Nodes](#link_409) (table) + + [Tezos](#link_M45) + + [Blocks](#link_410) (table) + [Second layers](#link_M43) + [Omni Layer properties](#link_502) (table) + [ERC-20 tokens](#link_505) (table) @@ -110,6 +113,9 @@ + [Halvening countdown](#link_512) + [Premium API endpoints](#link_M51) + [Premium API usage stats](#link_600) ++ [Privacy-o-meter](#link_M6) + + [Introduction](#link_700) + + [Transaction privacy score](#link_702) + [Support](#link_M7) @@ -165,7 +171,7 @@ Here's the list of available mainnets: | Dogecoin | Bitcoin-like | `https://api.blockchair.com/dogecoin` | Full support | | Dash | Bitcoin-like | `https://api.blockchair.com/dash` | Full support | | Ripple | Ripple-like | `https://api.blockchair.com/ripple` | Alpha mode, possible compatibility-breaking changes | -| Groestlcoin | Bitcoin-like | `https://api.blockchair.com/groestlcoin` | Full support at least till June 18th, 2020 | +| Groestlcoin | Bitcoin-like | `https://api.blockchair.com/groestlcoin` | Full support at least till January 1st, 2021 | | Stellar | Stellar-like | `https://api.blockchair.com/stellar` | Alpha mode, possible compatibility-breaking changes | | Monero | Monero-like | `https://api.blockchair.com/monero` | Alpha mode, possible compatibility-breaking changes | | Cardano | Cardano-like | `https://api.blockchair.com/cardano` | Alpha mode, possible compatibility-breaking changes | @@ -260,8 +266,10 @@ This is the full list of available API endpoints. | `https://api.blockchair.com/{:ada_chain}/raw/block/{:hash}₀` | [👉](#link_110) | `1` | Alpha | | `https://api.blockchair.com/{:xin_chain}/raw/snapshot/{:height}₀` | [👉](#link_111) | `1` | Alpha | | `https://api.blockchair.com/{:xin_chain}/raw/snapshot/{:hash}₀` | [👉](#link_111) | `1` | Alpha | +| `https://api.blockchair.com/{:xin_chain}/raw/snapshots?{:query}` | [👉](#link_407) | `1` | Alpha | | `https://api.blockchair.com/{:xtz_chain}/raw/block/{:height}₀` | [👉](#link_112) | `1` | Alpha | | `https://api.blockchair.com/{:xtz_chain}/raw/block/{:hash}₀` | [👉](#link_112) | `1` | Alpha | +| `https://api.blockchair.com/{:xtz_chain}/raw/blocks?{:query}` | [👉](#link_410) | `1` | Alpha | | `https://api.blockchair.com/{:eos_chain}/raw/block/{:height}₀` | [👉](#link_113) | `1` | Alpha | | **Transaction-related information and actions** | — | — | — | | `https://api.blockchair.com/{:btc_chain}/dashboards/transaction/{:hash}₀` | [👉](#link_200) | `1` | Stable | @@ -288,6 +296,7 @@ This is the full list of available API endpoints. | **Address-related information** | — | — | — | | `https://api.blockchair.com/{:btc_chain}/dashboards/address/{:address}₀` | [👉](#link_300) | `1` | Stable | | `https://api.blockchair.com/{:btc_chain}/dashboards/addresses/{:address}₀,...,{:address}ᵩ` | [👉](#link_300) | `1 + 0.1*c` | Stable | +| `https://api.blockchair.com/{:btc_chain}/addresses/balances` (`POST`, mass balance check) | [👉](#link_390) | `1 + 0.001*c` | Stable | | `https://api.blockchair.com/{:btc_chain}/dashboards/xpub/{:extended_key}` | [👉](#link_300) | `1 + 0.1*d` | Beta | | `https://api.blockchair.com/{:btc_chain}/addresses?{:query}` | [👉](#link_301) | `2` | Stable | | `https://api.blockchair.com/{:eth_chain}/dashboards/address/{:address}₀` | [👉](#link_302) | `1` | Stable | @@ -309,7 +318,6 @@ This is the full list of available API endpoints. | `https://api.blockchair.com/{:xin_chain}/raw/round/({:node_hash},{:id})` | [👉](#link_404) | `1` | Alpha | | `https://api.blockchair.com/{:xin_chain}/raw/node/{:hash}` | [👉](#link_405) | `1` | Alpha | | `https://api.blockchair.com/{:xin_chain}/raw/graph` | [👉](#link_406) | `1` | Alpha | -| `https://api.blockchair.com/{:xin_chain}/raw/snapshots?{:query}` | [👉](#link_407) | `1` | Alpha | | `https://api.blockchair.com/{:xin_chain}/raw/mintings?{:query}` | [👉](#link_408) | `1` | Alpha | | `https://api.blockchair.com/{:xin_chain}/raw/nodes?{:query}` | [👉](#link_409) | `1` | Alpha | | **Special second layer protocol endpoints (Omni Layer and ERC-20 tokens)** | — | — | — | @@ -389,6 +397,7 @@ API returns JSON-encoded data. Typically, the response is an array consisting of * `context.cache` — array of info on whether the response comes from the cache or not * `context.cache.live` — `false` if the response comes from the cache, `true` otherwise * `context.cache.until` — cache expiry timestamp + * `context.request_cost` — API request cost (`1` for ordinary queries, more than 1 for complex requests, see the next section for details) There are also some things which are the same across all endpoints: @@ -436,6 +445,8 @@ If you have exceeded the limit multiple times without using a key, an error `430 Every API endpoint documentation has the "Request cost formula" section describing how the "cost" is calculated. For most API requests it's always 1. It's more than 1 in cases when you're requiring additional data (e.g. when you're requesting data on an Ethereum address, and you're also requesting its ERC-20 token balances). +Every API response yields `context.request_cost` with the request cost number ("request points"). + As a kindly reminder, there are tasks such as extracting lots of blockchain data (e.g. all transactions over a 2 month period) which require lots of requests done — it may be better to use our Database dumps feature instead of the API (see https://blockchair.com/dumps for documentation) **What are the steps to acquire an API key?** @@ -2389,6 +2400,54 @@ Address object specification: +### Address balance mass check + +This endpoint returns confirmed balances only. If address hasn't been seen on the blockchain or has a zero balance, it's not shown among the results. It's extremely fast (under 1 second for 25.000 addresses) and cheap (it costs only 26 request points to fetch 25.000 addresses). + +**Endpoints:** + +- `https://api.blockchair.com/{:btc_chain}/addresses/balances` (`POST`) +- `https://api.blockchair.com/{:btc_chain}/addresses/balances?addresses={:comma_separated_list}` (`GET`) + +**Where:** + +- `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `zcash`, `bitcoin/testnet` +- `{:comma_separated_list}` is the comma-separated list of addresses (up to 25.000) + +**Example output:** + +`https://api.blockchair.com/bitcoin/addresses/balances?addresses=34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo,35hK24tcLEWcgNA4JxpvbkNkoAcDGqQPsP,1DoesntExist`: + +```json +{ + "data": { + "35hK24tcLEWcgNA4JxpvbkNkoAcDGqQPsP": 25550215769897, + "34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo": 4053399981517 + }, + "context": { + "code": 200, + "results": 2, + "state": 635329, + "request_cost": 1.003, + ... + } +} +``` + +**Example POST request:** + +```bash +> curl -v --data "addresses=34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo,35hK24tcLEWcgNA4JxpvbkNkoAcDGqQPsP,1DoesntExist" https://api.blockchair.com/bitcoin/addresses/balances +``` + +(it's better to use `POST` for long requests) + +**Request cost formula:** + +`1` + `0.001` per each requested address (i.e. for 25.000 addresses it's just 25, so it's the best and the fastest way to fetch balances) + + + ## Dashboard endpoints for Ethereum @@ -6301,28 +6360,33 @@ Always `1`. -### EOS account data +### Raw account data Returns raw account data directly from our node. **Endpoint:** -- `https://api.blockchair.com/{:eos_chain}/raw/account/{:address}₀` +- `https://api.blockchair.com/{:eos_chain}/raw/account/{:address}` **Where:** - `{:eos_chain}` can only be `eos` -- `{:address}ᵢ` is the account name +- `{:address}` is the account name + +**Possible options:** + +- `?actions=true` displays 10 most recent actions for this account **Output:** `data` contains an associative array: -- `data.{:address}ᵢ.account` — account information. +- `data.{:address}.account` — account information +- `data.{:address}.actions` — the list of recent actions if `?actions=true` is set, otherwise `null` **Example output:** -`https://api.blockchair.com/eos/raw/account/blockpooleos`: +`https://api.blockchair.com/eos/raw/account/blockpooleos?actions=true`: ```json { @@ -6330,24 +6394,24 @@ Returns raw account data directly from our node. "blockpooleos": { "account": { "account_name": "blockpooleos", - "head_block_num": 125863151, - "head_block_time": "2020-06-13T18:37:20.000", + "head_block_num": 127937449, + "head_block_time": "2020-06-25T18:47:45.500", "privileged": false, "last_code_update": "1970-01-01T00:00:00.000", "created": "2019-07-13T03:45:22.500", - "core_liquid_balance": "4533.2384 EOS", + "core_liquid_balance": "2771.4153 EOS", "ram_quota": 17559, "net_weight": 150100, - "cpu_weight": 1050619, + "cpu_weight": 1050703, "net_limit": { "used": 105, - "available": 15532697, - "max": 15532802 + "available": 15609531, + "max": 15609636 }, "cpu_limit": { - "used": 662, - "available": 8895, - "max": 9557 + "used": 464, + "available": 9039, + "max": 9503 }, "ram_usage": 4795, "permissions": [ @@ -6400,22 +6464,22 @@ Returns raw account data directly from our node. "total_resources": { "owner": "blockpooleos", "net_weight": "15.0100 EOS", - "cpu_weight": "105.0619 EOS", + "cpu_weight": "105.0703 EOS", "ram_bytes": 16159 }, "self_delegated_bandwidth": { "from": "blockpooleos", "to": "blockpooleos", "net_weight": "5.0100 EOS", - "cpu_weight": "5.0619 EOS" + "cpu_weight": "5.0703 EOS" }, "refund_request": null, "voter_info": { "owner": "blockpooleos", "proxy": "genpoolproxy", "producers": [], - "staked": 100929, - "last_vote_weight": "151677066207.26217651367187500", + "staked": 101013, + "last_vote_weight": "153840349310.80059814453125000", "proxied_vote_weight": "0.00000000000000000", "is_proxy": 0, "flags1": 0, @@ -6423,14 +6487,79 @@ Returns raw account data directly from our node. "reserved3": "0 " }, "rex_info": null - } + }, + "actions": [ + { + "global_action_seq": "162018041028", + "account_action_seq": 33, + "block_num": 127926696, + "block_time": "2020-06-25T17:18:08.000", + "action_trace": { + "action_ordinal": 6, + "creator_action_ordinal": 1, + "closest_unnotified_ancestor_action_ordinal": 1, + "receipt": { + "receiver": "eosio.token", + "act_digest": "3e8e32ac2f3e9a4e9fe05c497016e8a2aad839f6f0dc700e1aa4be7fe1737436", + "global_sequence": "162018041028", + "recv_sequence": "39120141509", + "auth_sequence": [ + [ + "blockpooleos", + 2436 + ], + [ + "eosio.vpay", + 163338 + ] + ], + "code_sequence": 4, + "abi_sequence": 4 + }, + "receiver": "eosio.token", + "act": { + "account": "eosio.token", + "name": "transfer", + "authorization": [ + { + "actor": "eosio.vpay", + "permission": "active" + }, + { + "actor": "blockpooleos", + "permission": "active" + } + ], + "data": { + "from": "eosio.vpay", + "to": "blockpooleos", + "quantity": "588.1989 EOS", + "memo": "producer vote pay" + }, + "hex_data": "0080377503ea305580a98a945688683c85c059000000000004454f53000000001170726f647563657220766f746520706179" + }, + "context_free": false, + "elapsed": 82, + "console": "", + "trx_id": "999420909e47b8d3afe57b80c93c3317ea6f9103b8dbbec9572ebb8ecf073a45", + "block_num": 127926696, + "block_time": "2020-06-25T17:18:08.000", + "producer_block_id": "07a001a82d080f2ca57f6b4f2b0c33a32953d234156349b4434c5c56a2870967", + "account_ram_deltas": [], + "except": null, + "error_code": null + } + }, + ... + ] } }, "context": { "code": 200, "results": 1, - "state": 125863140, - "request_cost": 1, + "state": 127937448, + "price_usd": 2.49, + "request_cost": 2, ... } } @@ -6438,7 +6567,7 @@ Returns raw account data directly from our node. **Request cost formula:** -Always `1`. +`1` + `1` if the `?actions=true` option is used **Explore visualization on our front-end:** @@ -6468,6 +6597,7 @@ Just don't ask why do we call that `infinitables`… Infinite tables? Maybe. * `{:xin_chain}/raw/snapshots` * `{:xin_chain}/raw/mintings` * `{:xin_chain}/raw/nodes` +* `{:xtz_chain}/raw/blocks` * `bitcoin/omni/properties` * `ethereum/erc-20/tokens` * `ethereum/erc-20/transactions` @@ -6477,6 +6607,7 @@ Where: * `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `zcash`, or `bitcoin/testnet` * `{:eth_chain}` can be only `ethereum` * `{:xin_chain}` can be only `mixin` +* `{:xtz_chain}` can be only `tezos` Note on mempool tables: to speed up some requests, our architecture have separate tables (`{:chain}/mempool/{:entity}`) for unconfirmed transactions. Unlike with dashboard endpoints which search entities like transactions in both the blockchain and the mempool, infinitable endpoints don't do that. @@ -6719,7 +6850,7 @@ Applying a limit over the default multiplies the summed cost by `1 + 0.01 * numb **Table descriptions** -Further in documentations are table descriptions. Each documentation section contains a general description, and a table describing the table columns (fields) in the following format: +Further the documentation describes each of the supported tables. Each documentation section contains a general description, and a table listing the table columns (fields) in the following format: | Column | Type | Description | Q? | S? | A? | C? | | ------------- | ------------- | -------------------- | ------------------------------------------ | ---------------------------------------- | ----------------------------------------- | ------------------------------------------------------------ | @@ -8179,6 +8310,105 @@ See [request costs for infinitables](#link_05) +## Inifinitable endpoints for Tezos + +Please note that our Tezos API outputs raw node data for this endpoint. + + + +### `blocks` table + +Note: this particular table doesn't support advanced querying. The only query section it supports are `?offset=` and sorting/filtering by `id` (height). + +**Endpoint:** + +- `https://api.blockchair.com/{:xtz_chain}/raw/blocks?{:query}` + +**Where:** + +- `{:xtz_chain}` can be only `tezos` + +**Where:** + +- `{:query}` is the query against the table ([how to build a query](#link_05)) + +**Output:** + +`data` contains an array of database rows. + +**Example requests:**` + +- `https://api.blockchair.com/tezos/raw/blocks` +- `https://api.blockchair.com/tezos/raw/blocks?q=id(..100000)&offset=10` +- `https://api.blockchair.com/tezos/raw/blocks?s=id(asc)` + +**Example output:** + +`https://api.blockchair.com/tezos/raw/blocks?s=id(asc)`: + +```json +{ + "data": [ + { + "id": 0, + "time": "2018-06-30T16:07:32Z", + "hash": "BLockGenesisGenesisGenesisGenesisGenesisf79b5d1CoW2", + "priority": 0, + "n_ops": 0, + "volume": 0, + "cycle": 0, + "is_cycle_snapshot": 1, + "version": 0, + "n_accounts": 0, + "n_new_accounts": 0, + "n_new_contracts": 0, + "gas_limit": 0, + "gas_used": 0, + "gas_price": 0, + "days_destroyed": 0 + }, + { + "id": 1, + "time": "2018-06-30T17:39:57Z", + "hash": "BLSqrcLvFtqVCx8WSqkVJypW2kAVRM3eEj2BHgBsB6kb24NqYev", + "priority": 0, + "n_ops": 0, + "volume": 0, + "cycle": 0, + "is_cycle_snapshot": 0, + "version": 1, + "n_accounts": 31589, + "n_new_accounts": 31589, + "n_new_contracts": 32, + "gas_limit": 0, + "gas_used": 0, + "gas_price": 0, + "days_destroyed": 0 + }, + ... + ], + "context": { + "code": 200, + "results": 10, + "total_rows": 1002667, + "offset": 0, + "state": 1002666, + "price_usd": 2.67, + ... + } +} +``` + +**Request cost formula:** + +See [request costs for infinitables](#link_05) + +**Explore visualization on our front-end:** + +- https://blockchair.com/tezos/blocks + + + ## Inifinitable endpoints for second layers @@ -9074,6 +9304,267 @@ Always `0`. This request is free to use. + +# Privacy-o-meter + +## Introduction + +While Bitcoin is considered to be a privacy-oriented system, the blockchain is open to analyze by anyone, and there are numerous transaction tracing tools like Chainalysis, Coinfirm, Elliptic, CipherTrace, and Crystal. They're all not free, and Bitcoin users rarely have a chance to see how deep the rabbit hole goes. We start with a simple transaction scoring tool, and will soon expand this even further. We'll provide this service for free as we hope it'd help Bitcoin users to take some of their privacy back. + +Transaction tracing is quite an easy task on the Bitcoin blockchain due to the following reasons: + +1. Most users aren't concerned enough about their privacy and make rookie mistakes like sending round BTC amounts +2. Wallet software developers mostly don't care about user privacy. Taking the previous example in context, there are no warnings if user tries to send a round amount. +3. There are multiple wallets with different transaction processing rules making it possible to figure out what software type given user uses +4. Bitcoin blockchain is congested due to refusal to properly scale — that makes using mixers very expensive and cumbersome +5. While there are multiple protocols allowing more secure ways to transact (like shielded transactions on Zcash), these are not implemented in Bitcoin out of fears of changing the protocol +6. Bitcoin has multiple standard script types, their number has been recently increased with the activation of SegWit, and will increase further with new constructs built on top of SegWit + +Here's a good overview of some basic heuristics: https://en.bitcoin.it/wiki/Privacy — we use most of them and introduce many new ones. The full list of heuristics we're using is available below. + +At the moment, Privacy-o-meter is available for Bitcoin only, but we'll soon expand it to other UTXO-based coins, and then to all the others we support. + + + +**A couple of examples of transactions with bad and good privacy scores** + +Take this transaction as an example: https://blockchair.com/bitcoin/transaction/116bd19a3ec5f210ce72043115a4d5d3ef08f7556829c4feac8d89de3195ea4e + +It has 2 inputs and 2 outputs: + +| Input addresses | Input values | | Output values | Output addresses | +| ---------------------- | ---------------- | ---- | ---------------- | ------------------- | +| bc1qj9p0huddhg5pzccur… | 0.96350000 BTC | ⟾ | 1.00000000 BTC | 3EgAFC6FKojYUu53… | +| bc1qrpfxyvdc3fqmyux54… | 281.65022105 BTC | ⟾ | 281.61332105 BTC | bc1qva7utdxd6easlj… | + +And also the following characteristics: + +* Uses SegWit: `yes` +* Lock time: `0` +* Version: `1` + +An analyst will be able to gather lots of metadata looking at this transaction: + +1. First output has a round amount of 1 bitcoin +2. First output has a P2SH address type while both inputs and the second output are P2WSH +3. Given (1) and (2) it can be assumed that 3EgAFC6FKojYUu53… is the recipient, and bc1qva7utdxd6easlj… is the change address. Thus we can say that bc1qj9p0huddhg5pzccur…, bc1qrpfxyvdc3fqmyux54…, and bc1qva7utdxd6easlj… can be clusterized as belonging to one entity +4. There's a discrepancy: if the sender wanted to send just 1 bitcoin, there's no need for the first output to be in the transaction, the second would be more than sufficient. That shows that the sender is probably using a non-standard wallet software +5. The transaction's lock time value is `0` and the sender uses SegWit-copmatible software that generates version `1` transactions. That and (4) can be used to single out the sender's wallet software + +Our system gives this transaction the score of `0` as it's too clear which output is the recipient and which is the change. + +One important point: it's not probable, but still possible that this partiular transaction's sender tries to confuse forensics software and all the conclusions are incorrect. So, basically, if you're trying to increase your privacy level knowing how to do that, and getting the `0` score, you're probably doing that right. + +Let's take another transaction to show some contrast: https://blockchair.com/bitcoin/transaction/24a517dd2ffbb3a290eeee75d6dea2c62df7ebcd6f898b703b70dc031baa8a18 + +It has 1 input and 2 outputs: + +| Input addresses | Input values | | Output values | Output addresses | +| -------------------- | -------------- | ---- | -------------- | ----------------- | +| 12CBjcNtRU7c795neLC… | 0.01006987 BTC | ⟾ | 0.00344481 BTC | 199eZE5j4shSU7D9… | +| | | | 0.00640487 BTC | 1CGL5micNcJbMaV… | + +This is a relatively rare example of a transaction getting a `100` score. It's not possible to distinguish the recipient from the change address just by analyzing this transaction. + + + +**Heuristics we use:** + +| Heuristic key | Heuristic name | Description and notes | Affects clusterization? | Example transaction | API example | +| ---- | ---- | ---- | ---- | ---- | ---- | +| **Most common heuristics** | **♠** | **♠** | **♠** | **♠** | **♠** | +|`inputs` |Co-spending | Unless it's a CoinJoin transaction it's safe to assume that all input addresses belong to one person | `+` | [👉](https://blockchair.com/bitcoin/transaction/a7d7eb23e76e1f95996b25655025aa5c68bfa46f609ebd9df5feec7cc12f5a6c) | [👉](https://api.blockchair.com/bitcoin/dashboards/transaction/a7d7eb23e76e1f95996b25655025aa5c68bfa46f609ebd9df5feec7cc12f5a6c?privacy-o-meter=true) | +|`script_types` |Script types | If all inputs has the same type, and exactly one of the outputs is not of the same type — this output can be considered as the recipient | `+` | [👉](https://blockchair.com/bitcoin/transaction/250b2c28ff7213633bba93fa4578144a00eed1fcb6378740d2071b7088a6aee8) | [👉](https://api.blockchair.com/bitcoin/dashboards/transaction/250b2c28ff7213633bba93fa4578144a00eed1fcb6378740d2071b7088a6aee8?privacy-o-meter=true) | +|`p2sh_types` | P2SH multisig types | If all inputs are `m of n` multisig P2SH, and all outputs are multisig P2SH, but exactly one of the outputs has another `m` of `n` structure — this output can be considered as the recipient | `+` | [👉](https://blockchair.com/bitcoin/transaction/816e90f4ff8cf5348eb81de3bfe93c53cd990b8018f7f50ba7845428f0334cbe) | [👉](https://api.blockchair.com/bitcoin/dashboards/transaction/816e90f4ff8cf5348eb81de3bfe93c53cd990b8018f7f50ba7845428f0334cbe?privacy-o-meter=true) | +|`p2wsh_types` | P2WSH multisig types | If all inputs are `m of n` multisig P2WSH, and all outputs are multisig P2WSH, but exactly one of the outputs has another `m` of `n` structure — this output can be considered as the recipient | `+` | [👉](https://blockchair.com/bitcoin/transaction/31a3bda9bb623973808f65feede0dc948f4d0523ec8c7571f40a54cb46cb10f1) | [👉](https://api.blockchair.com/bitcoin/dashboards/transaction/31a3bda9bb623973808f65feede0dc948f4d0523ec8c7571f40a54cb46cb10f1?privacy-o-meter=true) | +|`round_value` |Round value | If one of the outputs has a round value (like exactly 1 BTC) — this output can be considered as the recipient | `+` | [👉](https://blockchair.com/bitcoin/transaction/617abb5cf47791077a71ba5a342496c17b259a39a1e8287820be64de229118d5) | [👉](https://api.blockchair.com/bitcoin/dashboards/transaction/617abb5cf47791077a71ba5a342496c17b259a39a1e8287820be64de229118d5?privacy-o-meter=true) | +|`recipient_by_value` | Recipient by bigger value | If the recipient is the smaller output, there's no point in having some of the inputs | `+` | [👉](https://blockchair.com/bitcoin/transaction/1b6b875d97e13301aa1c1a7a8991a8ca9b9b346d88fd018f2c79d7b2bd20362d) | [👉](https://api.blockchair.com/bitcoin/dashboards/transaction/1b6b875d97e13301aa1c1a7a8991a8ca9b9b346d88fd018f2c79d7b2bd20362d?privacy-o-meter=true) | +|`t1-2_bigger_value_25` | Output value x25 | One of the two outputs is 25 times bigger than the other meaning that it's potentially the change output | `+` | [👉](https://blockchair.com/bitcoin/transaction/dc4521de6e89a313a84cbdc979a6d2796b6c0fa00456664c0298dbfb9f14f23d) | [👉](https://api.blockchair.com/bitcoin/dashboards/transaction/dc4521de6e89a313a84cbdc979a6d2796b6c0fa00456664c0298dbfb9f14f23d?privacy-o-meter=true) | +|`t1-2_bigger_value_100` | Output value x100 | - 〃 - 〃 - 100 times bigger | `+` | [👉](https://blockchair.com/bitcoin/transaction/5fdd152a47e6701ae184d5f14d67fa53279309fce8345569638e06a62f78e8fe) | [👉](https://api.blockchair.com/bitcoin/dashboards/transaction/5fdd152a47e6701ae184d5f14d67fa53279309fce8345569638e06a62f78e8fe?privacy-o-meter=true) | +|`t1-2_bigger_value_250` | Output value x250 | - 〃 - 〃 - 250 times bigger | `+` | [👉](https://blockchair.com/bitcoin/transaction/8f39915714e1fd8c5025c95b4c4cb5c1ef9066212578a70c729ce2c856dba314) | [👉](https://api.blockchair.com/bitcoin/dashboards/transaction/8f39915714e1fd8c5025c95b4c4cb5c1ef9066212578a70c729ce2c856dba314?privacy-o-meter=true) | +|`t1-2_bigger_value_1000` | Output value x1000 | - 〃 - 〃 - 1000 times bigger | `+` | [👉](https://blockchair.com/bitcoin/transaction/8b5c0080ff2d5fd022ff910f1be99eb504b5d89dd74c5c8f543cac184299eab0) | [👉](https://api.blockchair.com/bitcoin/dashboards/transaction/8b5c0080ff2d5fd022ff910f1be99eb504b5d89dd74c5c8f543cac184299eab0?privacy-o-meter=true) | +|`coinbase_known` | Known miner | The recipient is the known miner | | [👉](https://blockchair.com/bitcoin/transaction/4e5c226fd6d88c20ff56d10037c473bdf17a401878c9d41724bffb8762cb18d6) | [👉](https://api.blockchair.com/bitcoin/dashboards/transaction/4e5c226fd6d88c20ff56d10037c473bdf17a401878c9d41724bffb8762cb18d6?privacy-o-meter=true) | +|`coinbase_unknown` | Unknown miner | The recipient is an unknown miner | | [👉](https://blockchair.com/bitcoin/transaction/415b101a57a2117eb9b2cc18959c962c03b6292d2553b31a041d70fcc429e85c) | [👉](https://api.blockchair.com/bitcoin/dashboards/transaction/415b101a57a2117eb9b2cc18959c962c03b6292d2553b31a041d70fcc429e85c?privacy-o-meter=true) | +|`coinjoin` | Coinjoin | This is a CoinJoin transaction. This cancels all other heuristics. | `+` | [👉](https://blockchair.com/bitcoin/transaction/0156114ce052ca0be908cdee9fe7840a57087e99022d88d82ff78a2653419a00) | [👉](https://api.blockchair.com/bitcoin/dashboards/transaction/0156114ce052ca0be908cdee9fe7840a57087e99022d88d82ff78a2653419a00?privacy-o-meter=true) | +|`round_fee` | Round fee | The transaction has a round fee amount, the sender is probably using some specific software | | [👉](https://blockchair.com/bitcoin/transaction/fb8c2c96d1f442e2e66fe1eccd519a5658eeb9ea5de7f79bef96d82b22755854) | [👉](https://api.blockchair.com/bitcoin/dashboards/transaction/fb8c2c96d1f442e2e66fe1eccd519a5658eeb9ea5de7f79bef96d82b22755854?privacy-o-meter=true) | +|`rare_fingerprint` | Rare fingerprint | This transaction has quite unique technical characteristics | | [👉](https://blockchair.com/bitcoin/transaction/52bf8b7600a38946506b400121513a09b44e5050df0c33448f35546d2bf44e00) | [👉](https://api.blockchair.com/bitcoin/dashboards/transaction/52bf8b7600a38946506b400121513a09b44e5050df0c33448f35546d2bf44e00?privacy-o-meter=true) | +|**Specific order of inputs and outputs** |**♠** | **♠** | **♠** | **♠** | **♠** | +|`asc_output_values` |Ascending output values | For transaction with more than 5 outputs — they are ordered by value ascending — that may due to some specific software usage | | [👉](https://blockchair.com/bitcoin/transaction/81c27162281ae7927444293994a066678a4ee681e5beb91bc5f82f1f2bfc5284) | [👉](https://api.blockchair.com/bitcoin/dashboards/transaction/81c27162281ae7927444293994a066678a4ee681e5beb91bc5f82f1f2bfc5284?privacy-o-meter=true) | +|`desc_output_values` |Descending output values | Same, but in descending order. Generally, all descending patterns are more rare than ascending. | | [👉](https://blockchair.com/bitcoin/transaction/0ec4fc763b25acbf7e6119a3dfa6ed94523ebc9a4ddbe85e73796e01d245c76b) | [👉](https://api.blockchair.com/bitcoin/dashboards/transaction/0ec4fc763b25acbf7e6119a3dfa6ed94523ebc9a4ddbe85e73796e01d245c76b?privacy-o-meter=true) | +|`asc_output_addresses` |Ascending output addresses | Same, but this time it's addresses sorted in alphabetical order | | [👉](https://blockchair.com/bitcoin/transaction/6075cf9a3a417a7a8f924e163b091ed793e51d68d21b14a9b5beb96fbc6593e3) | [👉](https://api.blockchair.com/bitcoin/dashboards/transaction/6075cf9a3a417a7a8f924e163b091ed793e51d68d21b14a9b5beb96fbc6593e3?privacy-o-meter=true) | +|`desc_output_addresses` |Descending output addresses | - 〃 - 〃 - (Very rare) | | [👉](https://blockchair.com/bitcoin/transaction/4379451e04005c00f4f3163d555a0afc5d69e4de6496b1e45faa8234752f6819) | [👉](https://api.blockchair.com/bitcoin/dashboards/transaction/4379451e04005c00f4f3163d555a0afc5d69e4de6496b1e45faa8234752f6819?privacy-o-meter=true) | +|`asc_input_values` |Ascending input values | - 〃 - 〃 - Same, but for inputs | | [👉](https://blockchair.com/bitcoin/transaction/05bc2ea8f5fc3dd10decf307868541dbd237255b7682c1948db9b5c0a05ceb3a) | [👉](https://api.blockchair.com/bitcoin/dashboards/transaction/05bc2ea8f5fc3dd10decf307868541dbd237255b7682c1948db9b5c0a05ceb3a?privacy-o-meter=true) | +|`desc_input_values` |Descending input values | - 〃 - 〃 - | | [👉](https://blockchair.com/bitcoin/transaction/87452c593c556c5a9f3a7c1b6a220e70f56d52ccc4f4bc84bc4ee0205bf6d1d6) | [👉](https://api.blockchair.com/bitcoin/dashboards/transaction/87452c593c556c5a9f3a7c1b6a220e70f56d52ccc4f4bc84bc4ee0205bf6d1d6?privacy-o-meter=true) | +|`asc_input_addresses` |Ascending input addresses | - 〃 - 〃 - (Very rare) | | [👉](https://blockchair.com/bitcoin/transaction/1f07f37f2b76479e8dedad8b59aef9a1e6290b0cc8c246e46a87fa3206b84d5c) | [👉](https://api.blockchair.com/bitcoin/dashboards/transaction/1f07f37f2b76479e8dedad8b59aef9a1e6290b0cc8c246e46a87fa3206b84d5c?privacy-o-meter=true) | +|`desc_input_addresses` |Descending input addresses | - 〃 - 〃 - (Very rare) | | [👉](https://blockchair.com/bitcoin/transaction/662739458c6d4ee79027b0cc2bac4c79341f4bae7faa477f50f84a657fb9e674) | [👉](https://api.blockchair.com/bitcoin/dashboards/transaction/662739458c6d4ee79027b0cc2bac4c79341f4bae7faa477f50f84a657fb9e674?privacy-o-meter=true) | +|`asc_input_timestamps` |Ascending input timestamps | - 〃 - 〃 - Same, inputs are sorted by age | | [👉](https://blockchair.com/bitcoin/transaction/e5e46dace28b98689d9dc05296fc1712f492cebcebe1dcf4b0e2ab315404feba) | [👉](https://api.blockchair.com/bitcoin/dashboards/transaction/e5e46dace28b98689d9dc05296fc1712f492cebcebe1dcf4b0e2ab315404feba?privacy-o-meter=true) | +|`desc_input_timestamps` |Descending input timestamps | - 〃 - 〃 - | | [👉](https://blockchair.com/bitcoin/transaction/3547bf0310882c290d073f7ad8b73c1a017ea93bd7677202f4d1147df6d8e2b1) | [👉](https://api.blockchair.com/bitcoin/dashboards/transaction/3547bf0310882c290d073f7ad8b73c1a017ea93bd7677202f4d1147df6d8e2b1?privacy-o-meter=true) | +|`asc_output_values_except_first` |Ascending output values except first | All outputs are sorted by value ascending except for the first one, that may mean that the first output is the change address. But this is a quite vague heuristic, thus we don't use it in clusterization. | | [👉](https://blockchair.com/bitcoin/transaction/d89159504e8ec57ec89646f727555b67bc5189fbdb293e2843dc1463e87a970e) | [👉](https://api.blockchair.com/bitcoin/dashboards/transaction/d89159504e8ec57ec89646f727555b67bc5189fbdb293e2843dc1463e87a970e?privacy-o-meter=true) | +|`asc_output_values_except_last` |Ascending output values except last | - 〃 - 〃 - | | [👉](https://blockchair.com/bitcoin/transaction/30ef0b26e8163c77bb56f5afeba54329f0cfd7ea8e7bb2cf65d343f469bb91fd) | [👉](https://api.blockchair.com/bitcoin/dashboards/transaction/30ef0b26e8163c77bb56f5afeba54329f0cfd7ea8e7bb2cf65d343f469bb91fd?privacy-o-meter=true) | +|`asc_output_addresses_except_first` |Ascending output addresses except first | - 〃 - 〃 - | | [👉](https://blockchair.com/bitcoin/transaction/1d4685dd141c1951adbebda7e7f05c72c7598b9028852283f1055dde4f49b0f7) | [👉](https://api.blockchair.com/bitcoin/dashboards/transaction/1d4685dd141c1951adbebda7e7f05c72c7598b9028852283f1055dde4f49b0f7?privacy-o-meter=true) | +|`asc_output_addresses_except_last` |Ascending output addresses except last | - 〃 - 〃 - | | [👉](https://blockchair.com/bitcoin/transaction/59c553c9484badebcd68a55df0f74c7a05e8cc053fa49d5340f6ece9841d47cd) | [👉](https://api.blockchair.com/bitcoin/dashboards/transaction/59c553c9484badebcd68a55df0f74c7a05e8cc053fa49d5340f6ece9841d47cd?privacy-o-meter=true) | +|`desc_output_values_except_first` |Descending output values except first | - 〃 - 〃 - | | [👉](https://blockchair.com/bitcoin/transaction/8b2d41e57b268a49dd9f97849c7e75c60b1fa2001b915f2378eb85abffb6b2f2) | [👉](https://api.blockchair.com/bitcoin/dashboards/transaction/8b2d41e57b268a49dd9f97849c7e75c60b1fa2001b915f2378eb85abffb6b2f2?privacy-o-meter=true) | +|`desc_output_values_except_last` |Descending output values except last | - 〃 - 〃 - | | [👉](https://blockchair.com/bitcoin/transaction/63595f498276e327a36fffb062e902ed8da65a9c56dae26cd9571d4c0487f98e) | [👉](https://api.blockchair.com/bitcoin/dashboards/transaction/63595f498276e327a36fffb062e902ed8da65a9c56dae26cd9571d4c0487f98e?privacy-o-meter=true) | +|`desc_output_addresses_except_last` |Descending output addresses except last | - 〃 - 〃 - | | [👉](https://blockchair.com/bitcoin/transaction/94d72365f7de01766dd5b3a30b25cf9b362d41adcad0a02c852786413814af7b) | [👉](https://api.blockchair.com/bitcoin/dashboards/transaction/94d72365f7de01766dd5b3a30b25cf9b362d41adcad0a02c852786413814af7b?privacy-o-meter=true) | +|`desc_output_addresses_except_first` |Descending output addresses except first | - 〃 - 〃 - | | [👉](https://blockchair.com/bitcoin/transaction/6d417f1b4f9aacafebf8ae51a4eb4ad0511ccb584e9d1196088eeab4b6858a67) | [👉](https://api.blockchair.com/bitcoin/dashboards/transaction/6d417f1b4f9aacafebf8ae51a4eb4ad0511ccb584e9d1196088eeab4b6858a67?privacy-o-meter=true) | +|**Reuse of the same address** |**♠** | **♠** | **♠** | **♠** | **♠** | +|`simple_reuse_1-2` | Address reuse | The sender uses the same address for receiving and for change | | [👉](https://blockchair.com/bitcoin/transaction/a0dc90c9856f19de61170eac0b43061e6835a8fba9c00f11338d020a85ee5322) | [👉](https://api.blockchair.com/bitcoin/dashboards/transaction/a0dc90c9856f19de61170eac0b43061e6835a8fba9c00f11338d020a85ee5322?privacy-o-meter=true) | +|`simple_reuse_N-2` | Address reuse | The sender uses the same address for receiving and for change | | [👉](https://blockchair.com/bitcoin/transaction/425fa42b8f31c5123d50133461ee0bd30d8b3c8a263315c5d3b9018a90a82857) | [👉](https://api.blockchair.com/bitcoin/dashboards/transaction/425fa42b8f31c5123d50133461ee0bd30d8b3c8a263315c5d3b9018a90a82857?privacy-o-meter=true) | +|`simple_reuse_1-N` | Address reuse | The sender (probably an exchange) uses the same address for receiving and for change | | [👉](https://blockchair.com/bitcoin/transaction/2181e669dddbaf7bf2b77174405df82d0085f0b58edd5b98af095b95b494f0e5) | [👉](https://api.blockchair.com/bitcoin/dashboards/transaction/2181e669dddbaf7bf2b77174405df82d0085f0b58edd5b98af095b95b494f0e5?privacy-o-meter=true) | +|`simple_reuse_same_address_in_inputs` | Same address in inputs | There's multiple occurences of the same address in inputs | | [👉](https://blockchair.com/bitcoin/transaction/b16f9802004ade2df1c764daa811f021bd424e5070da706cee8e2e6e384e0273) | [👉](https://api.blockchair.com/bitcoin/dashboards/transaction/b16f9802004ade2df1c764daa811f021bd424e5070da706cee8e2e6e384e0273?privacy-o-meter=true) | +|**Sweeps** |**♠** | **♠** | **♠** | **♠** | **♠** | +|`sweep_1-1` | Sweep (1-1) | The sender uses the "send everything" option to either pay someone (e.g. an exchange) or just moving the funds to another wallet (1 input) | | [👉](https://blockchair.com/bitcoin/transaction/babd3998f821c2d2f4a1dca9ec37d83213264d18e9ec00a692ce5f58da90509e) | [👉](https://api.blockchair.com/bitcoin/dashboards/transaction/babd3998f821c2d2f4a1dca9ec37d83213264d18e9ec00a692ce5f58da90509e?privacy-o-meter=true) | +|`sweep_1-1_to_another_type` | Sweep to another type (1-1) | - 〃 - 〃 - Same, but the outputs is of another type. The sender is either paying someone or moving the funds to a new wallet type (1 input) | | [👉](https://blockchair.com/bitcoin/transaction/8ae5fef447c836c02021b84cd4b6e6610328618e5b6eb0a29839237b02bfd274) | [👉](https://api.blockchair.com/bitcoin/dashboards/transaction/8ae5fef447c836c02021b84cd4b6e6610328618e5b6eb0a29839237b02bfd274?privacy-o-meter=true) | +|`sweep_N-1` | Sweep | - 〃 - 〃 - Same, but with multiple inputs | | [👉](https://blockchair.com/bitcoin/transaction/8221a2efa0fdaf2355c9017e845c614a77d488c9ebb1a1322eca7d3de586e926) | [👉](https://api.blockchair.com/bitcoin/dashboards/transaction/8221a2efa0fdaf2355c9017e845c614a77d488c9ebb1a1322eca7d3de586e926?privacy-o-meter=true) | +|`sweep_N-1_to_another_type` | Sweep to another type | - 〃 - 〃 - Same, but to another address type | | [👉](https://blockchair.com/bitcoin/transaction/87452c593c556c5a9f3a7c1b6a220e70f56d52ccc4f4bc84bc4ee0205bf6d1d6) | [👉](https://api.blockchair.com/bitcoin/dashboards/transaction/87452c593c556c5a9f3a7c1b6a220e70f56d52ccc4f4bc84bc4ee0205bf6d1d6?privacy-o-meter=true) | +|**Discrepancies** |**♠** | **♠** | **♠** | **♠** | **♠** | +|`discrepancy_unnecessary_inputs` | Discrepancy: unnecessary input | The smaller input is unnecessary, as whichever of the outputs is the recipient, there's no need to include that input | | [👉](https://blockchair.com/bitcoin/transaction/2b4601a6a1a295fdbe546b78af97a619b13ae43e31715ebcc5b683f17a1a0205) | [👉](https://api.blockchair.com/bitcoin/dashboards/transaction/2b4601a6a1a295fdbe546b78af97a619b13ae43e31715ebcc5b683f17a1a0205?privacy-o-meter=true) | +|`discrepancy_input_types` | Discrepancy: various input types | The inputs are of different types. That means the sender is probably using the software allowing to create the same address type for the change as the recipient has, trying to circumvent the `script_types` heuristic | | [👉](https://blockchair.com/bitcoin/transaction/890719cb7e5b365988e07c461e88b1d6ba432c24dad499177d81cd49a07155bb) | [👉](https://api.blockchair.com/bitcoin/dashboards/transaction/890719cb7e5b365988e07c461e88b1d6ba432c24dad499177d81cd49a07155bb?privacy-o-meter=true) | +|`discrepancy_script_types_and_round_value` | Discrepancy between Script types and Round value | `script_types` and `round_value` heuristics yield different results | `+` | [👉](https://blockchair.com/bitcoin/transaction/f02b2bf8d0f0383a2a65ee3bc72d49f02d7463beae118ffbcd28cdc709fab4e8) | [👉](https://api.blockchair.com/bitcoin/dashboards/transaction/f02b2bf8d0f0383a2a65ee3bc72d49f02d7463beae118ffbcd28cdc709fab4e8?privacy-o-meter=true) | +|`discrepancy_script_types_and_recipient_by_value` | Discrepancy between Script types and Recipient by value | `script_types` and `recipient by value` heuristics yield different results | `+` | [👉](https://blockchair.com/bitcoin/transaction/bc2485c492c9985996c0bf43beecb6bd45c4b0ed9d2ad395a42930a6f704c060) | [👉](https://api.blockchair.com/bitcoin/dashboards/transaction/bc2485c492c9985996c0bf43beecb6bd45c4b0ed9d2ad395a42930a6f704c060?privacy-o-meter=true) | +|`discrepancy_round_value_and_recipient_by_value` | Discrepancy between Round value and Recipient by value | `round_value` and `recipient by value` heuristics yield different results | `+` | [👉](https://blockchair.com/bitcoin/transaction/e20768471edddafc74cddda43df28c43219a9c237480f768491a754e3b0f02fb) | [👉](https://api.blockchair.com/bitcoin/dashboards/transaction/e20768471edddafc74cddda43df28c43219a9c237480f768491a754e3b0f02fb?privacy-o-meter=true) | +|`discrepancy_p2sh_various_input_types` | Discrepancy: various P2SH input types | The P2SH input types are different (e.g. one is 2-of-2 multisig, and the other is 2-of-3). Very rare. | | [👉](https://blockchair.com/bitcoin/transaction/a1ace505a545ac750ed3bdce8514b96e406eafc228695606a15d56bc39e708f3) | [👉](https://api.blockchair.com/bitcoin/dashboards/transaction/a1ace505a545ac750ed3bdce8514b96e406eafc228695606a15d56bc39e708f3?privacy-o-meter=true) | +|`discrepancy_p2wsh_various_input_types` | Discrepancy: various P2WSH input types | - 〃 - 〃 - Same, but for P2WSH | | N/A |N/A| +|`discrepancy_same_address_in_outputs` | Discrepancy: output address duplicates | There are outputs with the same address — that makes no economical sense | | [👉](https://blockchair.com/bitcoin/transaction/e7af7c8526069f367334e22bbfa0d0287a24eacaeb5dd5df05db660a4bf4b76b) | [👉](https://api.blockchair.com/bitcoin/dashboards/transaction/e7af7c8526069f367334e22bbfa0d0287a24eacaeb5dd5df05db660a4bf4b76b?privacy-o-meter=true) | +|`discrepancy_no_output_of_the_same_type_as_inputs` | Discrepancy: no output of the same type as inputs | Probably the sender uses software generating the same change address type as the recipient address has | | [👉](https://blockchair.com/bitcoin/transaction/ad0e7a6c20ca04a42978100de79f4d9851e7ccfa1776aacf309ee6a2d6266d8a) | [👉](https://api.blockchair.com/bitcoin/dashboards/transaction/ad0e7a6c20ca04a42978100de79f4d9851e7ccfa1776aacf309ee6a2d6266d8a?privacy-o-meter=true) | + + + +**Possible transaction types are:** + +| Type code | Description | +| --------- | ------------------------------------------------------------ | +| `CB` | Coinbase transaction | +| `N1` | Transaction with just 1 output (either a sweep to another address by the same owner, or a transfer using a "send everything I have" option) | +| `N2` | Transaction with 2 outputs — most common in wallets — where one of the outputs is the recipient, and the other one is the change address | +| `NN` | Transaction with more than 2 outputs — most common in exchanges and services that use payout batching | + + + +**Transaction fingerprint:** + +| Property | Possible values | Description | +| ------------- | ------------------------------------------------- | ------------------------------------------------------------ | +| `lock_time` | `0`, `rare`, `block_id`, `big_value`, `timestamp` | Depending on wallet software, `lock_time` property can either be `0`, or a block height, or some timestamp. In rare cases it's some other value (`rare` or `big_value`) | +| `version` | `1`, `2`, `unknown` | Versions `1` and `2` are distributed almost equally these days | +| `has_witness` | `true`, `false` | SegWit usage is a distinctive property — there are wallets and exchanges who are known to be using or not using SegWit | + + +## API endpoints + +### Transaction score + +**Endpoints:** + +- `https://api.blockchair.com/{:chain}/dashboards/transaction/{:hash}₀?privacy-o-meter=true` +- `https://api.blockchair.com/{:chain}/dashboards/transactions/{:hash}₀,...,{:hash}ᵩ?privacy-o-meter=true` (up to 10 transactions, comma-separated) + +**Output:** + +- See the transaction dashboard for general transaction info: [👉](#link_200) +- `privacy-o-meter` array with scoring data: + - `type` — transaction type (`CB`, `N1`, `N2`, or `NN`) + - `fingerprint` — transaction properties allowing to understand what software the sender uses + - `is_finalized` — shows whether the transaction has the final score — `true` if all outputs are spent, `false` otherwise (`nulldata` and other non-spendable outputs are considered as spent) + - `heuristics` — array of heuristic keys applicable for the transaction + - `clusterized` — array of addresses potentially belonging to one entity based on the applicable heuristics + - `score` — transaction privacy score where `0` is the worst score, and `100` is the best score + +**Example output:** + +`https://api.blockchair.com/bitcoin/dashboards/transaction/116bd19a3ec5f210ce72043115a4d5d3ef08f7556829c4feac8d89de3195ea4e?privacy-o-meter=true`: + +```json +{ + "data": { + "116bd19a3ec5f210ce72043115a4d5d3ef08f7556829c4feac8d89de3195ea4e": { + "transaction": { + ... + "version": 1, + "lock_time": 0, + "has_witness": true, + "input_count": 2, + "output_count": 2, + ... + }, + "inputs": [ + { + ... + "value": 96350000, + "recipient": "bc1qj9p0huddhg5pzccur3zyzuxpserfvj983jcg6nmwqq6fqkeaaxtstnp4ea", + "type": "witness_v0_scripthash", + "scripthash_type": "multisig_2_of_3" + }, + { + ... + "value": 28165022105, + "recipient": "bc1qrpfxyvdc3fqmyux54cg63s5eph7hc9lk2aeveu8ahz4dt63caf2q8lw9n7", + "type": "witness_v0_scripthash", + "scripthash_type": "multisig_2_of_3" + } + ], + "outputs": [ + { + ... + "value": 100000000, + "recipient": "3EgAFC6FKojYUu53FfazU6ZUgE4p3YzyUU", + "type": "scripthash", + "is_spent": true, + "scripthash_type": "multisig_2_of_3" + }, + { + ... + "value": 28161332105, + "recipient": "bc1qva7utdxd6easljpy28kvuyq67x4y9t9mwcdep4xrwrr98wkrxs8qhxqj70", + "type": "witness_v0_scripthash", + "is_spent": true, + "scripthash_type": "multisig_2_of_3" + } + ], + "privacy-o-meter": { + "type": "N2", + "fingerprint": { + "lock_time": 0, + "version": 1, + "has_witness": true + }, + "is_finalized": true, + "heuristics": [ + "inputs", + "script_types", + "round_values", + "unnecessary_inputs" + ], + "clusterized": [ + "bc1qva7utdxd6easljpy28kvuyq67x4y9t9mwcdep4xrwrr98wkrxs8qhxqj70", + "bc1qj9p0huddhg5pzccur3zyzuxpserfvj983jcg6nmwqq6fqkeaaxtstnp4ea", + "bc1qrpfxyvdc3fqmyux54cg63s5eph7hc9lk2aeveu8ahz4dt63caf2q8lw9n7" + ], + "score": 0 + } + } + }, + "context": { + "code": 200, + "results": 1, + ... + } +} +``` + +**Request cost formula:** + + `1`1 (`1` for the dashboard + `10` for the `?privacy-o-meter=true` option) + +For privacy-concerned wallets and services who'd agree to feature a link to our Privacy-o-meter along with showing the score, the cost would be `0`. + +**Explore visualizations on our front-end:** + +- https://blockchair.com/bitcoin/transaction/116bd19a3ec5f210ce72043115a4d5d3ef08f7556829c4feac8d89de3195ea4e + + + + # Support * E-mail: [info@blockchair.com](mailto:info@blockchair.com) From 06bd7687e7f96b39285620f6cbd45447112203f7 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Thu, 2 Jul 2020 13:36:24 +0300 Subject: [PATCH 134/180] v.2.0.62 --- API.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/API.md b/API.md index e6e06de4..cd60deb4 100644 --- a/API.md +++ b/API.md @@ -26,6 +26,15 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.62 - July 2nd, 2020 + * We're happy to announce that Groestlcoin support has been extended up to at least January 1st, 2021. + * `https://api.blockchair.com/{:eos_chain}/raw/account/{:address}` endpoint now has `?actions=true` option showing the last 10 actions for account + * All EOS endpoints now have `context.price_usd` showing the USD price of EOS. + * Fixed a bug where it wasn't possible to submit a transaction that is larger than 32 kB in size for broadcast (thanks to Koval for noticing that). Just a reminder, the transaction size still shouldn't be more than ~100 kB as it makes it non-standard and it won't be relayed by nodes. + * The `https://api.blockchair.com/{:btc_chain}/addresses/balances` endpoint now works more stable. +* v.2.0.61 - Jun 24th, 2020 + * We're launching Privacy-o-meter - a tool to highlight transactions privacy issues. See the most detailed documentation: https://blockchair.com/api/docs#link_M6 + * `https://api.blockchair.com/{:btc_chain}/dashboards/transaction/{:hash}₀` and `https://api.blockchair.com/{:btc_chain}/dashboards/transactions/{:hash}₀,...,{:hash}ᵩ` now yield `coinbase_data_hex` for coinbase transactions if `?privacy-o-meter=true` option is set. * v.2.0.60 - Jun 19th, 2020 * New way to fetch balances for multiple addresses: `https://api.blockchair.com/{:btc_chain}/addresses/balances` (`POST` or `GET`) with `addresses` key in a `POST` request (or `?addresses={:list}` in a `GET` request) as a comma-separated list of addresses (up to 25.000 at once). This endpoint returns confirmed balances only. If address hasn't been recorded on the blockchain or has a balance of zero, it won't be displayed in the results. This endpoint is extremely fast (under 1 second for 25.000 addresses) and cheap (it costs only 26 request points to fetch 25.000 addresses). See documentation here: https://blockchair.com/api/docs#link_390 (supported chains: Bitcoin, Bitcoin Cash, Bitcoin SV, Litecoin, Dash, Zcash, Dogecoin, Groestlcoin) * On Oct 26th, 2019 with v.2.0.38 we announced the "request cost" concept by which some requests cost more than others (i.e. requesting the data on 10 transactions costs more than requesting it for just 1 transaction, but since the request is done in bulk, it is cheaper for the API user in the end). Up until now we didn't enforce that policy counting each request as 1. From 54e1becb6e2295b001afc76e4e332f203166fa39 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Wed, 8 Jul 2020 15:14:50 +0300 Subject: [PATCH 135/180] v.2.0.63 --- API_DOCUMENTATION_EN.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index 9287636a..bc3c6f13 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,4 +1,4 @@ -# [Blockchair.com](https://blockchair.com/) API v.2.0.62 Documentation +# [Blockchair.com](https://blockchair.com/) API v.2.0.63 Documentation ``` ____ __ __ __ _ @@ -313,7 +313,7 @@ This is the full list of available API endpoints. | `https://api.blockchair.com/{:eth_chain}/uncles?{:query}` | [👉](#link_402) | `2` | Stable | | `https://api.blockchair.com/{:eth_chain}/calls?{:query}` | [👉](#link_403) | `10` | Stable | | `https://api.blockchair.com/{:xmr_chain}/outputs?{:query}` | [👉](#link_306) | `1` | Alpha | -| `https://api.blockchair.com/zcash/validate?paymentdisclosure={:disclosure}` | N/A | `1` | Alpha | +| `https://api.blockchair.com/zcash/raw/validate?paymentdisclosure=zpd:...` | N/A | `1` | Alpha | | `https://api.blockchair.com/{:xin_chain}/raw/round/{:hash}` | [👉](#link_404) | `1` | Alpha | | `https://api.blockchair.com/{:xin_chain}/raw/round/({:node_hash},{:id})` | [👉](#link_404) | `1` | Alpha | | `https://api.blockchair.com/{:xin_chain}/raw/node/{:hash}` | [👉](#link_405) | `1` | Alpha | @@ -1652,6 +1652,7 @@ Note that the total number of transactions in the block is contained in `data.{: Additional data: * `data.{:hash}ᵢ.layer_2.omni` (for `bitcoin` only; in alpha test mode) — Omni layer transaction data in case there's any * `scripthash_type` field for inputs and outputs (example: `https://api.blockchair.com/bitcoin/dashboards/transaction/4d41241148a7cb8f4e2820d4393415ccd3d0793053a3855b44c33e5053c231ff`) in the `multisig_{:m}_of_{:n}` format. Please note that if output is unspent, `scripthash_type` will always be `null`, even if the associated address multisig type can be derived from some other spent output. +* `data.{:hash}ᵢ.transaction.is_rbf` (for `bitcoin` and `bitcoin/testnet` only) — yields `true` if the transaction can be replaced with a transaction with a higher fee (replace-by-fee), and `false` otherwise; for blockchain transactions it shows whether the transaction could've been replaced before it has been included into the block. In case transaction is confirmed on the blockchain, `data.{:hash}ᵢ.transaction.block_id` contains the block number it's included in. If the transaction is in the mempool, `data.{:hash}ᵢ.transaction.block_id` yields `-1`. If the transaction is neither present in the blockchain, nor in the mempool, there won't be `data.{:hash}ᵢ` key with data. @@ -1701,7 +1702,7 @@ In case transaction is confirmed on the blockchain, `data.{:hash}ᵢ.transaction "fee_per_kwu": 0, "fee_per_kwu_usd": 0, "cdd_total": 149.15856481481, - "scripthash_type": null + "is_rbf": false }, "inputs": [ { From 99d03ba92b1b5c28d508d0d4483332c5abbb8e31 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Wed, 8 Jul 2020 15:15:28 +0300 Subject: [PATCH 136/180] v.2.0.63 --- API.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/API.md b/API.md index cd60deb4..811d1d17 100644 --- a/API.md +++ b/API.md @@ -3,7 +3,7 @@ Logo ### API v.2 documentation -* English: [https://blockchair.com/api/docs](https://blockchair.com/api/docs) (up to v.2.0.60) +* English: [https://blockchair.com/api/docs](https://blockchair.com/api/docs) (up to v.2.0.63) ### Please apply for an API key first @@ -26,6 +26,9 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.63 - July 8th, 2020 + * Added `is_rbf` field to `https://api.blockchair.com/bitcoin/dashboards/transaction/{:hash}` and `https://api.blockchair.com/bitcoin/dashboards/transactions/{:hash}₀,...,{:hash}ᵩ` endpoints. It yields `true` if the transaction can be replaced with a transaction with a higher fee (replace-by-fee), and `false` otherwise. For blockchain transactions it shows whether the transaction could've been replaced before it has been included into the block. Available for Bitcoin Testnet as well. + * Fixed a bug with Tezos when API returned error `500` for blocks with no transactions * v.2.0.62 - July 2nd, 2020 * We're happy to announce that Groestlcoin support has been extended up to at least January 1st, 2021. * `https://api.blockchair.com/{:eos_chain}/raw/account/{:address}` endpoint now has `?actions=true` option showing the last 10 actions for account From cb75c2c4a8b90c653de73592c021691207e36150 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Sat, 11 Jul 2020 21:46:29 +0300 Subject: [PATCH 137/180] Remove Telegram support links --- API.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/API.md b/API.md index 811d1d17..8ff3bd91 100644 --- a/API.md +++ b/API.md @@ -347,5 +347,3 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Support * E-mail: [info@blockchair.com](mailto:info@blockchair.com) -* Telegram chat: [@Blockchair](https://telegram.me/Blockchair) -* Twitter: [@Blockchair](https://twitter.com/Blockchair) From eeea7b1d3b489cfed2af3130d5db2ee2b4e598f7 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Sat, 11 Jul 2020 21:46:50 +0300 Subject: [PATCH 138/180] Remove Telegram support links --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 56cd9def..05502a65 100644 --- a/README.md +++ b/README.md @@ -10,5 +10,4 @@ This is our public repository for issues and feature requests. Please feel free Additional contacts: * E-mail: [info@blockchair.com](mailto:info@blockchair.com) -* Telegram group: [@Blockchair](https://telegram.me/Blockchair) * Twitter: [@Blockchair](https://twitter.com/Blockchair) From 9b68ebf75caa40815821b7e5749187173f23e905 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Sat, 11 Jul 2020 21:47:10 +0300 Subject: [PATCH 139/180] Remove Telegram support links --- API_DOCUMENTATION_EN.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index bc3c6f13..3dba3efc 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -9569,6 +9569,4 @@ For privacy-concerned wallets and services who'd agree to feature a link to our # Support * E-mail: [info@blockchair.com](mailto:info@blockchair.com) -* Telegram chat: [@Blockchair](https://telegram.me/Blockchair) -* Twitter: [@Blockchair](https://twitter.com/Blockchair) * Github issue tracker: https://github.com/Blockchair/Blockchair.Support/issues From 7ecd0d3013bb58d424e00e922b2282abdef1ebee Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Sat, 18 Jul 2020 21:12:32 +0300 Subject: [PATCH 140/180] v.2.0.64 --- API_DOCUMENTATION_EN.md | 192 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 189 insertions(+), 3 deletions(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index 3dba3efc..a24aaaa3 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,4 +1,4 @@ -# [Blockchair.com](https://blockchair.com/) API v.2.0.63 Documentation +# [Blockchair.com](https://blockchair.com/) API v.2.0.64 Documentation ``` ____ __ __ __ _ @@ -46,6 +46,8 @@ - [Omni Layer property](#link_501) - [ERC-20 token](#link_503) - [ERC-20 token holder](#link_504) + + [Cross-chain checks](#link_M24) + - [Address data from multiple blockchains](#link_391) + [Raw data endpoints](#link_M3) (Retrieve raw information about various entities directly from our full nodes) - [Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin, Zcash, and Bitcoin Testnet](#link_M31) - [Block](#link_101) @@ -305,6 +307,7 @@ This is the full list of available API endpoints. | `https://api.blockchair.com/{:ada_chain}/raw/address/{:address}₀` | [👉](#link_307) | `1` | Alpha | | `https://api.blockchair.com/{:xtz_chain}/raw/account/{:address}₀` | [👉](#link_308) | `1` | Alpha | | `https://api.blockchair.com/{:eos_chain}/raw/account/{:address}₀` | [👉](#link_309) | `1` | Alpha | +| `https://api.blockchair.com/multi/dashboards/addresses/{:address}₀,...,{:address}ᵩ` | [👉](#link_391) | Complex | Alpha | | **Special entities** | — | — | — | | `https://api.blockchair.com/{:btc_chain}/outputs?{:query}` | [👉](#link_400) | `10` | Beta | | `https://api.blockchair.com/{:btc_chain}/mempool/outputs?{:query}` | [👉](#link_400) | `2` | Beta | @@ -1854,7 +1857,7 @@ For mempool transactions shows priority (`position`) — for chains supporting S * `?limit={:transaction_limit},{:utxo_limit}` or a shorthand `?limit={:limit}`. `{:transaction_limit}` limits the number of returned latest transaction hashes (in the `transactions` array) for an address or an address set. Default is `100`. Maximum is `10000`. In case of `0` returns an empty transaction hashes array. `{:utxo_limit}` limits the number of returned latest UTXOs (in the `utxo` array) for an address or an address set. Default is `100`. Maximum is `10000`. In case of `0` returns an empty UTXO array. If only one limit is set, it applies to both `{:transaction_limit}` and `{:utxo_limit}` (e.g. `?limit=100` is an equivalent of `?limit=100,100`). * `?offset={:transaction_offset},{:utxo_offest}` or a shorthand `?offset={:offset}` allows to paginate transaction hashes and the UTXO array. The behaviour is similar to the `?limit=` section. Default for both offset is `0`, and the maximum is `1000000`. -* `?transaction_details=true` — returns detailed info on transactions instead of just hashes in the `transactions` array. Each element contains `block_id`, `transaction_hash`, `time`, and `balance_change` (shows how the transactions affected the balance of `{:address}`, i.e. it can be a negative value). At the moment, this option is available for the `address` endpoint only. +* `?transaction_details=true` — returns detailed info on transactions instead of just hashes in the `transactions` array. Each element contains `block_id`, `transaction_hash`, `time`, and `balance_change` (shows how the transactions affected the balance of `{:address}`, i.e. it can be a negative value). This option is available for all three endpoints: `dashboards/address`, `dashboards/addresses`, and `dashboards/xpub`. * `?omni=true` (for `bitcoin` only; in alpha test mode) — shows information about Omni Layer tokens belonging to the address. At the moment, this option is available for the `address` endpoint only. The data is returned in the `layer_2.omni` array. * `?state=latest` — discards unconfirmed transactions from the output — `balance` will show only confirmed balance, and `transactions` and `utxo` arrays won't include unconfirmed data. @@ -1930,6 +1933,7 @@ Address object specification: * `https://api.blockchair.com/bitcoin/dashboards/address/1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa` * `https://api.blockchair.com/bitcoin/dashboards/addresses/1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa,12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX` * `https://api.blockchair.com/bitcoin/dashboards/xpub/xpub6CUGRUonZSQ4TWtTMmzXdrXDtypWKiKrhko4egpiMZbpiaQL2jkwSB1icqYh2cfDfVxdx4df189oLKnC5fSwqPfgyP3hooxujYzAu3fDVmz` +* `https://api.blockchair.com/bitcoin/dashboards/xpub/xpub6CUGRUonZSQ4TWtTMmzXdrXDtypWKiKrhko4egpiMZbpiaQL2jkwSB1icqYh2cfDfVxdx4df189oLKnC5fSwqPfgyP3hooxujYzAu3fDVmz?transaction_details=true&limit=10,0` * `https://api.blockchair.com/bitcoin/dashboards/address/12cbQLTFMXRnSzktFkuoG3eHoMeFtpTu3S?transaction_details=true` * `https://api.blockchair.com/bitcoin/dashboards/address/1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa?limit=1&offset=1&transaction_details=true` @@ -2390,9 +2394,10 @@ Address object specification: **Request cost formula:** -- `1` for the `address` endpoint (add `1` for every of these options used: `?transaction_details=true`, `?omni=true`) +- `1` for the `address` endpoint (add `1` if `?omni=true` is used) - `1 + (0.1 * (entity count - 1))` for the `addresses` endpoint (e.g. it's `1 + (0.1 * (100 - 1)) = 10.9` for requesting 100 addresses) - `1 + 2 * depth - 0.1` for the `xpub` endpoint, where `depth` is the number of 20-addresses iterations (BIP 32 standard). The minimum number of iterations is 1 (the cost would be `2.9` in that case), if there are 5 iterations required, 100 addresses will be checked in total (the cost would be `10.9`) +- Additional `1` point if `?transaction_details=true` is used **Explore visualizations on our front-end:** @@ -3247,6 +3252,187 @@ The structure is similar to the [Ethereum address](#link_302) endpoint with the +## Cross-chain checks + + + +### Multichain address check + +This endpoint allows to check multiple addresses from diffrerent blockchain via just one request. This can be useful if you're monitoring your own wallet or portfolio. + +**Endpoint:** + +- ``https://api.blockchair.com/multi/dashboards/addresses/{:address}₀,...,{:address}ᵩ` + +**Where:** + +- `{:address}₀,...,{:address}ᵩ` is a comma separated list of addresses in the `blockchain:address` format. Supported blockchains: `bitcoin`, `bitcoin-cash`, `ethereum,` `litecoin`, `bitcoin-sv`, `dash`, `groestlcoin`, `zcash`. More blockchains are coming in the future. `bitcoin-cash` and `bitcoin-sv` may be used as `bitcoincash` and `bitcoinsv` respectively. Only `CashAddr` format is supported for Bictoin Cash. The maximum number of addresses is 100. There can only be one Ethereum address in the list. + +**Output:** + +- `data.set` — information on the entire set (total USD balance, etc.) +- `data.addresses` — an array of info on addresses found +- `data.transactions` — list of the latest transactions for this set (similar to `?transaction_details=true` option for `{:btc_chain}/dashboards/address` endpoint) + +**Example output:** + +`https://api.blockchair.com/multi/dashboards/addresses/bitcoin:1JADsmDFX9d2TXis63S9F9L8eDAXwJmnWE,ethereum:0x19DdD94B94D3c68385c897846AB44Ac99DBFAe0f,litecoin:LNAifc8nfjtDJ8azRPiancbZSBftPzhfzb,bitcoin:1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa`: + +```json +{ + "data": { + "set": { + "address_count": 4, + "balance_usd": 634530.2131392508, + "received_usd": 195118.95799999998, + "first_seen_receiving": "2009-01-03 18:15:05", + "last_seen_receiving": "2020-06-26 18:10:58", + "first_seen_spending": "2019-03-19 18:48:57", + "last_seen_spending": "2020-06-08 17:48:18", + "transaction_count": 3524 + }, + "addresses": { + "bitcoin:1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa": { + "chain": "bitcoin", + "address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa", + "type": "pubkeyhash", + "script_hex": "76a91462e907b15cbf27d5425399ebf6f0fb50ebb88f1888ac", + "balance": 6833161946, + "balance_usd": 623983.1661066874, + "received": 6833161946, + "received_usd": 17068.6063, + "spent": 0, + "spent_usd": 0, + "output_count": 2399, + "unspent_output_count": 2399, + "first_seen_receiving": "2009-01-03 18:15:05", + "last_seen_receiving": "2020-07-18 12:16:28", + "first_seen_spending": null, + "last_seen_spending": null + }, + "bitcoin:1JADsmDFX9d2TXis63S9F9L8eDAXwJmnWE": { + "chain": "bitcoin", + "address": "1JADsmDFX9d2TXis63S9F9L8eDAXwJmnWE", + "type": "pubkeyhash", + "script_hex": "76a914bc38a131c33427e977a9c08bcce726dd180eece888ac", + "balance": 115220355, + "balance_usd": 10521.5656354995, + "received": 2117013594, + "received_usd": 164984.9339, + "spent": 2001793239, + "spent_usd": 154273.1036, + "output_count": 672, + "unspent_output_count": 17, + "first_seen_receiving": "2019-03-19 01:19:51", + "last_seen_receiving": "2020-07-18 03:40:41", + "first_seen_spending": "2019-03-19 18:48:57", + "last_seen_spending": "2020-07-07 19:05:16" + }, + "ethereum:0x19ddd94b94d3c68385c897846ab44ac99dbfae0f": { + "chain": "ethereum", + "address": "0x19ddd94b94d3c68385c897846ab44ac99dbfae0f", + "type": "account", + "contract_code_hex": null, + "contract_created": null, + "contract_destroyed": null, + "balance": "108693390000000000", + "balance_usd": 25.30068026881297, + "received_approximate": "56446395000000000000", + "received_usd": 12974.6457, + "spent_approximate": "56327761000000000000", + "spent_usd": 12937.1422, + "fees_approximate": "9941000000000000", + "fees_usd": 2.0446, + "receiving_call_count": 83, + "spending_call_count": 56, + "call_count": 140, + "transaction_count": 140, + "first_seen_receiving": "2019-03-20 05:34:30", + "last_seen_receiving": "2020-07-18 17:56:29", + "first_seen_spending": "2019-03-20 14:26:51", + "last_seen_spending": "2020-07-13 18:09:23", + "nonce": null + }, + "litecoin:LNAifc8nfjtDJ8azRPiancbZSBftPzhfzb": { + "chain": "litecoin", + "address": "LNAifc8nfjtDJ8azRPiancbZSBftPzhfzb", + "type": "pubkeyhash", + "script_hex": "76a914204bc7902ad5bfc5174b2c3d5162156695fb647888ac", + "balance": 431305, + "balance_usd": 0.18071679499999999, + "received": 20914686144, + "received_usd": 90.7721, + "spent": 20914254839, + "spent_usd": 92.6259, + "output_count": 59, + "unspent_output_count": 2, + "first_seen_receiving": "2019-03-20 00:01:21", + "last_seen_receiving": "2020-06-26 18:10:58", + "first_seen_spending": "2019-03-20 00:41:49", + "last_seen_spending": "2020-06-08 17:48:18" + } + }, + "transactions": [ + { + "chain": "ethereum", + "address": "0x19ddd94b94d3c68385c897846ab44ac99dbfae0f", + "block_id": 10484912, + "hash": "0x35198f37aa02245789fe8c377b2328fa665498981e0ff93909494602b7d3c592", + "time": "2020-07-18 17:56:29", + "balance_change": 1000000000000000 + }, + { + "chain": "ethereum", + "address": "0x19ddd94b94d3c68385c897846ab44ac99dbfae0f", + "block_id": 10484558, + "hash": "0x9e368758434651efdbf1be4a19ec3a90fc74c51a9bd3822957a7bf5e1c5734c2", + "time": "2020-07-18 16:35:19", + "balance_change": 413370000000000 + }, + { + "chain": "bitcoin", + "address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa", + "block_id": -1, + "hash": "43401f6f7da64a5bff65fba8b80bb98c9fa252bfc763a634cae5c616e5d89394", + "time": "2020-07-18 12:16:28", + "balance_change": 558 + }, + ... + ] + }, + "context": { + "code": 200, + "cache": { + "live": true, + "duration": 60, + "since": "2020-07-18 18:07:03", + "until": "2020-07-18 18:08:03", + "time": null + }, + "api": { + "version": "2.0.63", + "last_major_update": "2019-07-19 18:07:19", + "next_major_update": "2020-07-19 00:00:00", + "documentation": "https://blockchair.com/api/docs", + "notice": "Beginning July 19th, 2020 we'll start enforcing request cost formulas, see the changelog for details" + }, + "time": 0.330610990524292, + "render_time": 0.010856151580810547, + "full_time": 0.34146714210510254, + "request_cost": 5.1 + } +} +``` + +**Request cost formula:** + +The total cost is the same as if you'd use `dashboards/addresses` endpoints for the requested blockchains separately with the `?transaction_details=true` option enabled. In the example, the cost is `5.1`, and it's calculated as the sum of using the following endpoints: + +* `https://api.blockchair.com/bitcoin/dashboards/addresses/1JADsmDFX9d2TXis63S9F9L8eDAXwJmnWE,1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa?transaction_details=true` (cost: `2.1`) +* `https://api.blockchair.com/ethereum/dashboards/address/0x19DdD94B94D3c68385c897846AB44Ac99DBFAe0f` (cost: `1`) +* `https://api.blockchair.com/litecoin/dashboards/addresses/LNAifc8nfjtDJ8azRPiancbZSBftPzhfzb?transaction_details=true` (cost: `2`) + + # Raw data endpoints Retrieve raw information about various entities directly from our full nodes From 7f5f34d6bea12d9613e78bb17cde1915292fd414 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Sat, 18 Jul 2020 21:14:40 +0300 Subject: [PATCH 141/180] v.2.0.64 --- API.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/API.md b/API.md index 8ff3bd91..1f099278 100644 --- a/API.md +++ b/API.md @@ -3,7 +3,7 @@ Logo ### API v.2 documentation -* English: [https://blockchair.com/api/docs](https://blockchair.com/api/docs) (up to v.2.0.63) +* English: [https://blockchair.com/api/docs](https://blockchair.com/api/docs) (up to v.2.0.64) ### Please apply for an API key first @@ -26,6 +26,10 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.64 - July 19th, 2020 + * Added `?transaction_details=true` option to `https://api.blockchair.com/{:btc_chain}/dashboards/addresses/{:address}₀,...,{:address}ᵩ` and `https://api.blockchair.com/{:btc_chain}/dashboards/xpub/{:extended_key}` endpoints. The additional cost for using this option is `1`. See its description in the v.2.0.37 changelog or in the documentation. Usage example: `https://api.blockchair.com/bitcoin/dashboards/xpub/xpub6CUGRUonZSQ4TWtTMmzXdrXDtypWKiKrhko4egpiMZbpiaQL2jkwSB1icqYh2cfDfVxdx4df189oLKnC5fSwqPfgyP3hooxujYzAu3fDVmz?transaction_details=true` + * New `https://api.blockchair.com/multi/dashboards/addresses/{:address}₀,...,{:address}ᵩ` endpoint to check addresses from multiple blockchains at once. Supported blockchains: all Bitcoin-like blockchains and Ethereum. The maximum number of addresses is 100. See the documentation: https://blockchair.com/api/docs#link_391 + * Previously announced request cost formulas now come into full effect. * v.2.0.63 - July 8th, 2020 * Added `is_rbf` field to `https://api.blockchair.com/bitcoin/dashboards/transaction/{:hash}` and `https://api.blockchair.com/bitcoin/dashboards/transactions/{:hash}₀,...,{:hash}ᵩ` endpoints. It yields `true` if the transaction can be replaced with a transaction with a higher fee (replace-by-fee), and `false` otherwise. For blockchain transactions it shows whether the transaction could've been replaced before it has been included into the block. Available for Bitcoin Testnet as well. * Fixed a bug with Tezos when API returned error `500` for blocks with no transactions From b66c1ad7fc0cb1fa70bf8e5ecf699d8555c55ffc Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Thu, 27 Aug 2020 16:22:43 +0300 Subject: [PATCH 142/180] v.2.0.65 --- API.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/API.md b/API.md index 1f099278..bfdf8530 100644 --- a/API.md +++ b/API.md @@ -26,6 +26,8 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.65 - August 27th, 2020 + * Fixed wrong `nonce` values for Ethereum transactions. `nonce` field now yields correct integers (thanks to Linmin Li for noticing this bug). * v.2.0.64 - July 19th, 2020 * Added `?transaction_details=true` option to `https://api.blockchair.com/{:btc_chain}/dashboards/addresses/{:address}₀,...,{:address}ᵩ` and `https://api.blockchair.com/{:btc_chain}/dashboards/xpub/{:extended_key}` endpoints. The additional cost for using this option is `1`. See its description in the v.2.0.37 changelog or in the documentation. Usage example: `https://api.blockchair.com/bitcoin/dashboards/xpub/xpub6CUGRUonZSQ4TWtTMmzXdrXDtypWKiKrhko4egpiMZbpiaQL2jkwSB1icqYh2cfDfVxdx4df189oLKnC5fSwqPfgyP3hooxujYzAu3fDVmz?transaction_details=true` * New `https://api.blockchair.com/multi/dashboards/addresses/{:address}₀,...,{:address}ᵩ` endpoint to check addresses from multiple blockchains at once. Supported blockchains: all Bitcoin-like blockchains and Ethereum. The maximum number of addresses is 100. See the documentation: https://blockchair.com/api/docs#link_391 From 7efaa15324558f4d126090d8d9d62d522dc3d2b8 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Wed, 23 Sep 2020 17:16:57 +0300 Subject: [PATCH 143/180] v.2.0.66 --- API.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/API.md b/API.md index bfdf8530..f2ca0650 100644 --- a/API.md +++ b/API.md @@ -26,6 +26,9 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.66 - September 23rd, 2020 + * We've upgraded our Ethereum engine - blocks, transactions, and ERC-20 transfers are now processed more than 10 times faster. + * Added Ethereum Goerli testnet: https://blockchair.com/ethereum/testnet (API endpoints are the same as for Ethereum, just use `ethereum/testnet` instead of `ethereum`; ERC-20's are also supported for the testnet). * v.2.0.65 - August 27th, 2020 * Fixed wrong `nonce` values for Ethereum transactions. `nonce` field now yields correct integers (thanks to Linmin Li for noticing this bug). * v.2.0.64 - July 19th, 2020 From b54da1fe8c9744afc402ef28d48bff3975749254 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Tue, 10 Nov 2020 16:56:02 +0300 Subject: [PATCH 144/180] v.2.0.67 --- API.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/API.md b/API.md index f2ca0650..9612c97c 100644 --- a/API.md +++ b/API.md @@ -26,6 +26,8 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.67 - November 6th, 2020 + * Added Bitcoin ABC (Bitcoin Cash ABC) support. Please read our statement on the upcoming Bitcoin Cash split: https://twitter.com/Blockchair/status/1324424632179576832. Also please note that it is expected that Bitcoin ABC's hashrate will be very low so 51% attacks are possible. We'll be running Bitcoin ABC in beta mode and we don't guarantee neither its stability, nor that we'll run it if the chain won't be used by businesses. * v.2.0.66 - September 23rd, 2020 * We've upgraded our Ethereum engine - blocks, transactions, and ERC-20 transfers are now processed more than 10 times faster. * Added Ethereum Goerli testnet: https://blockchair.com/ethereum/testnet (API endpoints are the same as for Ethereum, just use `ethereum/testnet` instead of `ethereum`; ERC-20's are also supported for the testnet). From 698fc64805482ba465b53dff1ab33475fa34f5da Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Tue, 10 Nov 2020 18:55:38 +0300 Subject: [PATCH 145/180] v.2.0.68 --- API.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/API.md b/API.md index 9612c97c..26a58078 100644 --- a/API.md +++ b/API.md @@ -3,7 +3,7 @@ Logo ### API v.2 documentation -* English: [https://blockchair.com/api/docs](https://blockchair.com/api/docs) (up to v.2.0.64) +* English: [https://blockchair.com/api/docs](https://blockchair.com/api/docs) (up to v.2.0.68) ### Please apply for an API key first @@ -26,6 +26,16 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.68 - November 10th, 2020 + * Added an experimental `?effects=true` option to the `https://api.blockchair.com/ethereum/dashboards/transaction/{:hash}` dashboard. Example: `https://api.blockchair.com/ethereum/dashboards/transaction/0xd9a24f57c713207c39c58e8ef3cb44e115fcc8bd0f85eb4ea82c78bc065a723f?effects=true&erc_20=true`. `effects` array yields the list of all changes to ETH and ERC-20 token balances. + * Added an experimental endpoint to retrieve allowance for ERC-20 contracts: `https://api.blockchair.com/ethereum/erc-20/{:token_address}/utils/allowance?owner={:owner_address}&spender={:spender_address}`. Example: `https://api.blockchair.com/ethereum/erc-20/0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2/utils/allowance?owner=0x448bb00f370da5af5d33d3e7fca686379fc782ea&spender=0xe0e6b25b22173849668c85e06bc2ce1f69baff8c` + * The `https://api.blockchair.com/{:eth_chain}/dashboards/address/{:address}` dashboard now has 3 options to retrieve ERC-20 balances: + * `?erc_20=approximate` (or `?erc_20=true`, default) - yields all token balances from our database. These values may miss some non-standard transfers in tokens that don't follow the ERC-20 standard in full. Please double-check if this option returns correct values for the tokens you'd want to get information about. Using this option costs `1`. + * `?erc_20=precise` - yields all token balances from our node. The process is the following: we gather information from our database about potential ERC-20 tokens the address may hold, and then for each token we call `getBalance` function using our node to get precise balances. Please note that if for some reason some contract doesn't follow the ERC-20 standard, our database may still miss records about the address holding this token, and there will be no request to the node about this token. So while balances yielded with this option are precise, some non-standard tokens may still be missed. Using this option costs `2`. + * `?erc_20={:token_address}₀,...,{:token_address}ᵩ` (recommended) - yields balances for the enlisted ERC-20 tokens from our node. That's the recommended way if you have an exact list of tokens you'd like to check. Even if some token doesn't follow the ERC-20 standard, but still has `getBalance` function implemented, the correct balance will be returned. Using this option costs `0.75` + `0.01` for each contract checked (the cheapest option!) + * Improved efficiency of the `https://api.blockchair.com/ethereum/erc-20/{:token_address}/stats` endpoint + * Fixed a bug with cUSDT Ethereum contract + * Fixed some missing ERC-20 transfers * v.2.0.67 - November 6th, 2020 * Added Bitcoin ABC (Bitcoin Cash ABC) support. Please read our statement on the upcoming Bitcoin Cash split: https://twitter.com/Blockchair/status/1324424632179576832. Also please note that it is expected that Bitcoin ABC's hashrate will be very low so 51% attacks are possible. We'll be running Bitcoin ABC in beta mode and we don't guarantee neither its stability, nor that we'll run it if the chain won't be used by businesses. * v.2.0.66 - September 23rd, 2020 From 2672cb40d682ac04fcbd80b1a27c089ccae9618e Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Tue, 10 Nov 2020 19:03:43 +0300 Subject: [PATCH 146/180] v.2.0.68 --- API_DOCUMENTATION_EN.md | 77 +++++++++++++++++++++++++---------------- 1 file changed, 48 insertions(+), 29 deletions(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index a24aaaa3..eca8e082 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,4 +1,4 @@ -# [Blockchair.com](https://blockchair.com/) API v.2.0.64 Documentation +# [Blockchair.com](https://blockchair.com/) API v.2.0.68 Documentation ``` ____ __ __ __ _ @@ -124,7 +124,7 @@ # Introduction -Blockchair API provides developers with access to data contained in [17 different blockchains](#link_M01). Unlike other APIs, Blockchair also supports numerous analytical queries like filtering, sorting, and aggregating blockchain data. +Blockchair API provides developers with access to data contained in [18 different blockchains](#link_M01). Unlike other APIs, Blockchair also supports numerous analytical queries like filtering, sorting, and aggregating blockchain data. Here are some examples of what you can build using our API: @@ -148,9 +148,9 @@ Our API is free to try under some limitations, and we have a variety of premium ## Supported blockchains and second layers -As of today, our API supports **17 blockchains** (16 mainnets and 1 testnet) divided into 9 groups: -* Bitcoin-like blockchains (Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin, Zcash, Bitcoin Testnet), also known as UTXO-based blockchains -* Ethereum-like blockchains (Ethereum) +As of today, our API supports **19 blockchains** (17 mainnets and 2 testnets) divided into 9 groups: +* Bitcoin-like blockchains (Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin, Zcash, Bitcoin ABC, Bitcoin Testnet), also known as UTXO-based blockchains +* Ethereum-like blockchains (Ethereum, Ethereum Goerli Testnet) * Ripple-like blockchains (Ripple) * Stellar-like blockchains (Stellar) * Monero-like blockchains (Monero) @@ -181,12 +181,16 @@ Here's the list of available mainnets: | Mixin | Mixin-like | `https://api.blockchair.com/mixin` | Full support at least till April 24th, 2021 | | Tezos | Tezos-like | `https://api.blockchair.com/tezos` | Alpha mode, possible compatibility-breaking changes | | EOS | EOS-like | `https://api.blockchair.com/eos` | Alpha mode, possible compatibility-breaking changes | +| Bitcoin ABC | Bitcoin-like | `https://api.blockchair.com/bitcoin-abc` | Beta mode, possible instability. Also known as Bitcoin Cash ABC. | + +Please read our statement on the November 15th, 2020 Bitcoin Cash split: https://twitter.com/Blockchair/status/1324424632179576832. It is expected that Bitcoin ABC's hashrate will be very low so 51% attacks are possible. We'll be running Bitcoin ABC in beta mode and we don't guarantee neither its stability, nor that we'll run it if the chain won't be used by businesses. Once the situation becomes more stable we'll update the documentation. At the moment, other parts of the documentation don't reflect Bitcoin ABC support, so please assume that for every `bitcoin-cash` endpoint there's a `bitcoin-abc` equivalent except for `https://api.blockchair.com/bitcoin-cash/nodes`. There are also following testnets supported which are technically considered as separate blockchains: | Blokchain | Group | API path prefix | Support status | |-----------|------|----------|-------------| | Bitcoin Testnet | Bitcoin-like | `https://api.blockchair.com/bitcoin/testnet` | Full support | +| Ethereum Goerli Testnet | Ethereum-like | `https://api.blockchair.com/ethereum/testnet` | Development mode, no guaranteed stability | We aim to support more blockchains (and their testnets) in future to cover as many users as possible. We don't disclose which blockchains we'll add next and how we choose them, but our main markers are daily number of real transactions and market capitalization. If you're representing a coin community which would like to add its blockchain to our platform, we'd be happy to talk. @@ -211,7 +215,9 @@ Like with blockchains, within a group, there's no or little difference between t | Omni Layer | Omni-like | Bitcoin | `https://api.blockchair.com/bitcoin/omni` | Alpha support | | ERC-20 | ERC-20-like | Ethereum | `https://api.blockchair.com/ethereum/erc-20` | Beta support | -We also plan to bring ERC-721 support in the near future. +We also plan to bring ERC-721 support in the future. + +Ethereum Goerli Testnet also supports ERC-20's. Wormhole support was dropped on January 1st, 2020 with a 3-month notice as it's not used by anyone anymore. @@ -221,8 +227,8 @@ Wormhole support was dropped on January 1st, 2020 with a 3-month notice as it's This is the full list of available API endpoints. -- `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `zcash`, or `bitcoin/testnet` -- `{:eth_chain}` can be only `ethereum` +- `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `zcash`, `bitcoin-abc`, or `bitcoin/testnet` +- `{:eth_chain}` can be `ethereum` or `ethereum/testnet` - `{:xrp_chain}` can be only `ripple` - `{:xlm_chain}` can be only `stellar` - `{:xmr_chain}` can be only `monero` @@ -331,6 +337,7 @@ This is the full list of available API endpoints. | `https://api.blockchair.com/ethereum/erc-20/{:token_address}/dashboards/address/{:address}` | [👉](#link_504) | `1` | Beta | | `https://api.blockchair.com/ethereum/erc-20/tokens?{:query}` | [👉](#link_505) | `2` | Beta | | `https://api.blockchair.com/ethereum/erc-20/transactions?{:query}` | [👉](#link_506) | `5` | Beta | +| `https://api.blockchair.com/ethereum/erc-20/{:token_address}/utils/allowance?owner={:owner_address}&spender={:spender_address}` | N/A | `1` | Alpha | | **State changes** | — | — | — | | `https://api.blockchair.com/{:btc_chain}/state/changes/block/{:block_id}` | [👉](#link_507) | `5` | Stable | | `https://api.blockchair.com/{:btc_chain}/state/changes/mempool` | [👉](#link_507) | `10` | Stable | @@ -385,7 +392,7 @@ API returns JSON-encoded data. Typically, the response is an array consisting of * `500` or `503` in case of a server error (it makes sense to wait and repeat the same request or open a ticket at https://github.com/Blockchair/Blockchair.Support/issues/new or write to ) * `context.error` — error description in the case there's an error * `context.state` — number of the latest known block (e.g., for all requests to endpoints connected to the Bitcoin blockchain this will yield the latest block number for Bitcoin). For example, it may be useful to calculate the number of network сonfirmations, or correctly iterate trough the results using `?offset=`. Not returned if the request has failed. - * `context.state_layer_2` — the latest block number for which our engine has processed second layer (e.g. ERC-20) transactions. If it's less than the block id in your current environment (e.g. block id of a transaction you requested), it makes sense to repeat the request after some time to retrieve second layer data + * `context.state_layer_2` — the latest block number for which our engine has processed second layer (e.g. ERC-20) transactions. If it's less than the block id in your current environment (e.g. block id of a transaction you requested), it makes sense to repeat the request after some time to retrieve second layer data. With our current architecture it always equals to `context.state`, but that may change in future. * `context.results` — contains the number of found results (dashboard and raw endpoints) * `context.limit` — applied limit to the number of results (the default one or user set in the `?limit=` query section) * `context.offset` — applied offset (the default one or user set in the `?offset=` query section) @@ -429,7 +436,7 @@ Here's our policy: | **Non-commercial or academic** | Key is not needed | Key is required, up to 100% discount | | **Commercial** | Key is required | Key is required, up to 10% discount | -**Our Premium API plans are available here: https://api.blockchair.com/premium/plans, please [contact us](#link_M7) if you have any questions or would like to have a custom plan.** +**Our Premium API plans are available here: https://blockchair.com/api/plans, please [contact us](#link_M7) if you have any questions or would like to have a custom plan.** The daily request counter is reset at 00:00 UTC every day. @@ -456,7 +463,7 @@ As a kindly reminder, there are tasks such as extracting lots of blockchain data Our Premium API dashboard is available here: https://api.blockchair.com/premium -First, you need to choose a suitable plan: https://api.blockchair.com/premium/plans +First, you need to choose a suitable plan: https://blockchair.com/api/plans At the moment, this automated system accepts PayPal payments only (which also allows you to pay with your card). If you'd like to pay via wire transfer or crypto, please contact us at [info@blockchair.com](mailto:info@blockchair.com) @@ -785,9 +792,10 @@ Always `1`. ## Ethereum-like blockchain stats -**Endpoint:** +**Endpoints:** - `https://api.blockchair.com/ethereum/stats` +- `https://api.blockchair.com/ethereum/testnet/stats` **Output:** @@ -903,6 +911,7 @@ Always `1`. **Explore visualization on our front-end:** - https://blockchair.com/ethereum +- https://blockchair.com/ethereum/testnet @@ -2469,7 +2478,7 @@ This endpoint returns confirmed balances only. If address hasn't been seen on th **Where:** -- `{:eth_chain}` can only be: `ethereum` +- `{:eth_chain}` can only be: `ethereum` or `ethereum/testnet` - `{:height}ᵢ` is the block height (integer value), also known as block id - `{:hash}ᵢ` is the block hash (regex: `/^0x[0-9a-f]{64}$/i`) @@ -2598,7 +2607,7 @@ Note that the total number of transactions in the block is contained in `data.{: **Where:** -- `{:eth_chain}` can only be: `ethereum` +- `{:eth_chain}` can only be: `ethereum` or `ethereum/testnet` - `{:hash}ᵢ` is the uncle hash (regex: `/^0x[0-9a-f]{64}$/i`) **Output:** @@ -2684,12 +2693,13 @@ If there's no `{:hash}ᵢ` has been found in the database, there won't be such k **Where:** -- `{:eth_chain}` can only be: `ethereum` +- `{:eth_chain}` can only be: `ethereum` or `ethereum/testnet` - `{:hashᵢ}` is the transaction hash (regex: `/^0x[0-9a-f]{64}$/i`), also known as txid **Possible options:** - `?erc_20=true` shows information about ERC-20 token transfers in this transaction +- `?effects=true` shows state changes for the transaction **Output:** @@ -2700,7 +2710,8 @@ If there's no `{:hash}ᵢ` has been found in the database, there won't be such k Additional data: -- `data.{:hash}ᵢ.layer_2.erc_20` (only if `?erc_20=true` is set) — the array of ERC-20 transfers (or an empty array if there are none), Each array element contains the following keys: `token_address`, `token_name`, `token_symbol`, `token_decimals`, `sender`, `recipient`, `value` — field descriptions are available [here](#link_506). +- `data.{:hash}ᵢ.layer_2.erc_20` (only if `?erc_20=true` is set) — an array of ERC-20 transfers (or an empty array if there are none), Each array element contains the following keys: `token_address`, `token_name`, `token_symbol`, `token_decimals`, `sender`, `recipient`, `value` — field descriptions are available [here](#link_506). +- `data.{:hash}ᵢ.effects` (only if `?effects=true` is set) — yields all ETH ad ERC-20 balance changes for the transaction in a neat format. Keys are `0x0000000000000000000000000000000000000000` for ETH or token address for ERC-20's. Each array element contains the following keys: `asset_type`, `asset_name`, `asset_symbol`, `asset_decimals`, `changes`. `changes` is an array containing all the changes for the asset (keys are Ethereum addresses, and values are balance changes). Please note this option is experimental. Example request: `https://api.blockchair.com/ethereum/dashboards/transaction/0xd9a24f57c713207c39c58e8ef3cb44e115fcc8bd0f85eb4ea82c78bc065a723f?effects=true&erc_20=true`. If `?erc_20=true` option is not used, `?effects=true` won't yield ERC-20 data. In case transaction is confirmed on the blockchain, `data.{:hash}ᵢ.transaction.block_id` contains the block number it's included in. If the transaction is in the mempool, `data.{:hash}ᵢ.transaction.block_id` yields `-1`. If the transaction is neither present in the blockchain, nor in the mempool, there won't be `data.{:hash}ᵢ` key with data. @@ -2840,6 +2851,7 @@ For mempool transactions shows priority (`position`) by `gas_price` over other t - `1` for `https://api.blockchair.com/{:eth_chain}/dashboards/transaction/{:hash}₀` endpoint - `1 + (0.1 * (entity count - 1))` for `https://api.blockchair.com/{:eth_chain}/dashboards/transactions/{:hash}₀,...,{:hash}ᵩ` endpoint (e.g. it's `1 + (0.1 * (10 - 1)) = 1.9` for requesting 10 transactions) - Using `?erc_20=true` adds `1` for each requested transaction +- Using `?effects=true` adds `1` for each requested transaction **Explore visualization on our front-end:** @@ -2855,14 +2867,17 @@ For mempool transactions shows priority (`position`) by `gas_price` over other t **Where:** -- `{:eth_chain}` can only be: `ethereum` +- `{:eth_chain}` can only be: `ethereum` or `ethereum/testnet` - `{:address}ᵢ` is an Ethereum address (either an account or a contract, the address should start with `0x`) **Possible options:** - `?limit={:call_limit}` — limits the number of returned latest calls associated with the address. Default is `100`. Maximum is `10000`. - `?offset={:call_offset}` — allows to paginate calls. Default is `0`, and the maximum is `1000000`. -- `?erc_20=true` — returns information about ERC-20 token balances of the address +- `?erc_20={...}` — returns information about ERC-20 token balances of the address: + - `?erc_20=approximate` (or `?erc_20=true`, default) — yields all token balances from our database. These values may miss some non-standard transfers in tokens that don't follow the ERC-20 standard in full. Please double-check if this option returns correct values for the tokens you'd want to get information about. Using this option costs `1`. + - `?erc_20=precise` — yields all token balances from our node. The process is the following: we gather information from our database about potential ERC-20 tokens the address may hold, and then for each token we call `getBalance` function using our node to get precise balances. Please note that if for some reason some contract doesn't follow the ERC-20 standard, our database may still miss records about the address holding this token, and there will be no request to the node about this token. So while balances yielded with this option are precise, some non-standard tokens may still be missed. Using this option costs `2`. + - `?erc_20={:token_address}₀,...,{:token_address}ᵩ` (recommended) — yields balances for the enlisted ERC-20 tokens from our node. That's the recommended way if you have an exact list of tokens you'd like to check. Even if some token doesn't follow the ERC-20 standard, but still has `getBalance` function implemented, the correct balance will be returned. Using this option costs `0.75` + `0.01` for each contract checked (the cheapest option!) - `?nonce=true` — returns current account nonce **Output:** @@ -3088,9 +3103,10 @@ Always `1`. Allows to retrieve the some basic information on an ERC-20 token. Note that this endpoint is in the Beta stage. -**Endpoint:** +**Endpoints:** - `https://api.blockchair.com/ethereum/erc-20/{:token_address}/stats` +- `https://api.blockchair.com/ethereum/testnet/erc-20/{:token_address}/stats` (Goerli Testnet) **Where:** @@ -3159,9 +3175,10 @@ Always `1`. ### ERC-20 token holder info -**Endpoint:** +**Endpoints:** - `https://api.blockchair.com/ethereum/erc-20/{:token_address}/dashboards/address/{:address}` +- `https://api.blockchair.com/ethereum/testnet/erc-20/{:token_address}/dashboards/address/{:address}` (Goerli Testnet) **Where:** @@ -3627,7 +3644,7 @@ Always `1`. -## Raw data endpoints for Ethereum +## Raw data endpoints for Ethereum and Ethereum Goerli Testnet @@ -3642,7 +3659,7 @@ Returns raw block data directly from our full node. **Where:** -- `{:eth_chain}` can only be `ethereum` +- `{:eth_chain}` can only be `ethereum` or `ethereum/testnet` - `{:height}ᵢ` is the block height (integer value), also known as block id - `{:hash}ᵢ` is the block hash (regex: `/^0x[0-9a-f]{64}$/i`) @@ -3727,7 +3744,7 @@ Returns raw transaction data directly from our full node. **Where:** -- `{:eth_chain}` can only be 'ethereum' +- `{:eth_chain}` can only be `ethereum` or `ethereum/testnet` - `{:hash}ᵢ` is the transaction hash (regex: `/^0x[0-9a-f]{64}$/i`) **Output:** @@ -7693,7 +7710,7 @@ See [request costs for infinitables](#link_05) -## Inifinitable endpoints for Ethereum +## Inifinitable endpoints for Ethereum and Ethereum Goerli Testnet Please note that unlike with Bitcoin-like chains, where we populate our databases synchronically (block after block as there's the UTXO model used), for Ethereum we use asynchronous process, thus it's possible that for some brief period of time there will be information about block `n`, but there may not be for block `n-1` and further. @@ -7707,7 +7724,7 @@ Please note that unlike with Bitcoin-like chains, where we populate our database **Where:** -- `{:eth_chain}` can only be `ethereum` +- `{:eth_chain}` can only be `ethereum` or `ethereum/testnet` - `{:query}` is the query against the table ([how to build a query](#link_05)) **Output:** @@ -7841,7 +7858,7 @@ See [request costs for infinitables](#link_05) **Where:** -- `{:eth_chain}` can only be `ethereum` +- `{:eth_chain}` can only be `ethereum` or `ethereum/testnet` - `{:query}` is the query against the table ([how to build a query](#link_05)) **Output:** @@ -7948,7 +7965,7 @@ See [request costs for infinitables](#link_05) **Where:** -- `{:eth_chain}` can only be `ethereum` +- `{:eth_chain}` can only be `ethereum` or `ethereum/testnet` - `{:query}` is the query against the table ([how to build a query](#link_05)) **Output:** @@ -7978,7 +7995,7 @@ See [request costs for infinitables](#link_05) | gas_limit ‡ | int | Gas limit for transaction set by the sender | `*` | `+` | | `+` | | gas_price ‡ | int | Price for gas set by the sender | `*` | `+` | | `+` | | input_hex ‡ | string `[0-9a-f]*` | Transaction input data (hex) | `^` | | | | -| nonce ‡ | string `[0-9a-f]*` | Nonce value | | | | | +| nonce ‡ | int | Nonce value | | | | | | v ‡ | string `[0-9a-f]*` | V value | | | | | | r ‡ | string `[0-9a-f]*` | R value | | | | | | s ‡ | string `[0-9a-f]*` | S value | | | | | @@ -8100,7 +8117,7 @@ See [request costs for infinitables](#link_05) **Where:** -- `{:eth_chain}` can only be `ethereum` +- `{:eth_chain}` can only be `ethereum` or `ethereum/testnet` - `{:query}` is the query against the table ([how to build a query](#link_05)) **Output:** @@ -8669,6 +8686,7 @@ See [request costs for infinitables](#link_05) **Endpoint:** - `https://api.blockchair.com/ethereum/erc-20/tokens?{:query}` +- `https://api.blockchair.com/ethereum/testnet/erc-20/tokens?{:query}` (Goerli Testnet) **Where:** @@ -8766,6 +8784,7 @@ See [request costs for infinitables](#link_05) **Endpoint:** - `https://api.blockchair.com/ethereum/erc-20/transactions?{:query}` +- `https://api.blockchair.com/ethereum/testnet/erc-20/transactions?{:query}` (Goerli Testnet) **Where:** From 4c122fbfe778aff8e5b65f79ca431f538d829276 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Mon, 16 Nov 2020 21:36:34 +0300 Subject: [PATCH 147/180] v.2.0.69 --- API_DOCUMENTATION_EN.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index eca8e082..e975f468 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,4 +1,4 @@ -# [Blockchair.com](https://blockchair.com/) API v.2.0.68 Documentation +# [Blockchair.com](https://blockchair.com/) API v.2.0.69 Documentation ``` ____ __ __ __ _ @@ -2874,7 +2874,7 @@ For mempool transactions shows priority (`position`) by `gas_price` over other t - `?limit={:call_limit}` — limits the number of returned latest calls associated with the address. Default is `100`. Maximum is `10000`. - `?offset={:call_offset}` — allows to paginate calls. Default is `0`, and the maximum is `1000000`. -- `?erc_20={...}` — returns information about ERC-20 token balances of the address: +- `?erc_20={...}` — returns information about ERC-20 token balances of the address (tokens are sorted by market capitalization descending): - `?erc_20=approximate` (or `?erc_20=true`, default) — yields all token balances from our database. These values may miss some non-standard transfers in tokens that don't follow the ERC-20 standard in full. Please double-check if this option returns correct values for the tokens you'd want to get information about. Using this option costs `1`. - `?erc_20=precise` — yields all token balances from our node. The process is the following: we gather information from our database about potential ERC-20 tokens the address may hold, and then for each token we call `getBalance` function using our node to get precise balances. Please note that if for some reason some contract doesn't follow the ERC-20 standard, our database may still miss records about the address holding this token, and there will be no request to the node about this token. So while balances yielded with this option are precise, some non-standard tokens may still be missed. Using this option costs `2`. - `?erc_20={:token_address}₀,...,{:token_address}ᵩ` (recommended) — yields balances for the enlisted ERC-20 tokens from our node. That's the recommended way if you have an exact list of tokens you'd like to check. Even if some token doesn't follow the ERC-20 standard, but still has `getBalance` function implemented, the correct balance will be returned. Using this option costs `0.75` + `0.01` for each contract checked (the cheapest option!) @@ -7982,8 +7982,8 @@ See [request costs for infinitables](#link_05) | time | string `YYYY-MM-DD HH:ii:ss` | Time of the block containing the transaction (UTC) | `⌘` | `+` | | | | failed † | bool | Failed transaction or not? | `=` | | `+` | | | type † | string (enum) | Transaction type with one of the following values: `call`, `create`, `call_tree`, `create_tree`, `synthetic_coinbase`. Description in the note below. | `=` | `+` | `+` | | -| sender ‡ | string `0x[0-9a-f]{40}` | Address of the transaction sender | `=` | | | | -| recipient | string `0x[0-9a-f]{40}` | Address of the transaction recipient | `=` | | | | +| sender ‡ | string `0x[0-9a-f]{40}` | Address of the transaction sender | `=` | | `+` | | +| recipient | string `0x[0-9a-f]{40}` | Address of the transaction recipient | `=` | | `+` | | | call_count † | int | Number of calls in the transaction | `*` | `+` | | `+` | | value | numeric string | Monetary value of transaction in wei | `*≈` | `+` | | `+` | | value_usd | float | Value of transaction in USD | `*` | `+` | | `+` | From 6c7b394cb93254c5f5121a3d42e400b74117390c Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Mon, 16 Nov 2020 21:37:01 +0300 Subject: [PATCH 148/180] v.2.0.69 --- API.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/API.md b/API.md index 26a58078..a10f9bc3 100644 --- a/API.md +++ b/API.md @@ -3,7 +3,7 @@ Logo ### API v.2 documentation -* English: [https://blockchair.com/api/docs](https://blockchair.com/api/docs) (up to v.2.0.68) +* English: [https://blockchair.com/api/docs](https://blockchair.com/api/docs) (up to v.2.0.69) ### Please apply for an API key first @@ -26,6 +26,9 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.69 - November 16th, 2020 + * ERC-20 tokens in the `https://api.blockchair.com/{:eth_chain}/dashboards/address/{:address}?erc_20={approximate|precise|{:list}}` endpoint are now sorted by their market capitalization descending (so the most popular ones are on top now) + * It's now possible to aggregate the Ethereum transactions infinitable (`https://api.blockchair.com/ethereum/transactions`) by `sender` and `recipient` (the same applies for the Ethereum testnet). Example: show top 100 stakers of the eth2 contract (by number of deposits): `https://api.blockchair.com/ethereum/transactions?q=recipient(0x00000000219ab540356cbb839cbe05303d7705fa),failed(false)&limit=100&a=sender,count()&s=count()(desc)` * v.2.0.68 - November 10th, 2020 * Added an experimental `?effects=true` option to the `https://api.blockchair.com/ethereum/dashboards/transaction/{:hash}` dashboard. Example: `https://api.blockchair.com/ethereum/dashboards/transaction/0xd9a24f57c713207c39c58e8ef3cb44e115fcc8bd0f85eb4ea82c78bc065a723f?effects=true&erc_20=true`. `effects` array yields the list of all changes to ETH and ERC-20 token balances. * Added an experimental endpoint to retrieve allowance for ERC-20 contracts: `https://api.blockchair.com/ethereum/erc-20/{:token_address}/utils/allowance?owner={:owner_address}&spender={:spender_address}`. Example: `https://api.blockchair.com/ethereum/erc-20/0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2/utils/allowance?owner=0x448bb00f370da5af5d33d3e7fca686379fc782ea&spender=0xe0e6b25b22173849668c85e06bc2ce1f69baff8c` From f269c1819d91abc0d3ba79e5bdb7a80db903ebc4 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Mon, 16 Nov 2020 22:29:03 +0300 Subject: [PATCH 149/180] v.2.0.69 --- API.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/API.md b/API.md index a10f9bc3..e23dd054 100644 --- a/API.md +++ b/API.md @@ -28,7 +28,7 @@ The key is applied to the end of the request string like this: `api.blockchair.c * v.2.0.69 - November 16th, 2020 * ERC-20 tokens in the `https://api.blockchair.com/{:eth_chain}/dashboards/address/{:address}?erc_20={approximate|precise|{:list}}` endpoint are now sorted by their market capitalization descending (so the most popular ones are on top now) - * It's now possible to aggregate the Ethereum transactions infinitable (`https://api.blockchair.com/ethereum/transactions`) by `sender` and `recipient` (the same applies for the Ethereum testnet). Example: show top 100 stakers of the eth2 contract (by number of deposits): `https://api.blockchair.com/ethereum/transactions?q=recipient(0x00000000219ab540356cbb839cbe05303d7705fa),failed(false)&limit=100&a=sender,count()&s=count()(desc)` + * It's now possible to aggregate the Ethereum transactions infinitable (`https://api.blockchair.com/ethereum/transactions`) and the Ethereum calls infinitable (`https://api.blockchair.com/ethereum/calls`) by `sender` and `recipient` (the same applies for the Ethereum testnet). Example: show top 100 stakers of the eth2 contract (by number of deposits): `https://api.blockchair.com/ethereum/calls?q=recipient(0x00000000219ab540356cbb839cbe05303d7705fa),failed(false)&limit=100&a=sender,count()&s=count()(desc)` * v.2.0.68 - November 10th, 2020 * Added an experimental `?effects=true` option to the `https://api.blockchair.com/ethereum/dashboards/transaction/{:hash}` dashboard. Example: `https://api.blockchair.com/ethereum/dashboards/transaction/0xd9a24f57c713207c39c58e8ef3cb44e115fcc8bd0f85eb4ea82c78bc065a723f?effects=true&erc_20=true`. `effects` array yields the list of all changes to ETH and ERC-20 token balances. * Added an experimental endpoint to retrieve allowance for ERC-20 contracts: `https://api.blockchair.com/ethereum/erc-20/{:token_address}/utils/allowance?owner={:owner_address}&spender={:spender_address}`. Example: `https://api.blockchair.com/ethereum/erc-20/0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2/utils/allowance?owner=0x448bb00f370da5af5d33d3e7fca686379fc782ea&spender=0xe0e6b25b22173849668c85e06bc2ce1f69baff8c` From 9805c5a53cebc3f8bf5b2052d5e0638db57903cf Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Tue, 17 Nov 2020 19:30:42 +0300 Subject: [PATCH 150/180] v.2.0.70 --- API_DOCUMENTATION_EN.md | 96 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 93 insertions(+), 3 deletions(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index e975f468..6beee003 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,4 +1,4 @@ -# [Blockchair.com](https://blockchair.com/) API v.2.0.69 Documentation +# [Blockchair.com](https://blockchair.com/) API v.2.0.70 Documentation ``` ____ __ __ __ _ @@ -118,6 +118,8 @@ + [Privacy-o-meter](#link_M6) + [Introduction](#link_700) + [Transaction privacy score](#link_702) ++ [News aggregator](#link_M701) + + [News list infinitable](#link_701) + [Support](#link_M7) @@ -346,6 +348,7 @@ This is the full list of available API endpoints. | `https://api.blockchair.com/range` | [👉](#link_510) | `1` | Stable | | `https://api.blockchair.com/tools/releases` | [👉](#link_511) | `1` | Stable | | `https://api.blockchair.com/tools/halvening` | [👉](#link_512) | `1` | Stable | +| `https://api.blockchair.com/news` (News API) | [👉](#link_701) | `1` | Stable | | **Network nodes** | — | — | — | | `https://api.blockchair.com/nodes` | [👉](#link_508) | `1` | Stable | | `https://api.blockchair.com/{:btc_chain}/nodes` | [👉](#link_508) | `1` | Stable | @@ -8136,8 +8139,8 @@ Returns information about internal transaction calls. `data` contains an array o | failed | bool | Failed call or not | `=` | | `+` | | | fail_reason | string `.*` or null | If failed, then the failure description, if not, then `null` | `~` | | `+` | | | type | string (enum) | The call type, one of the following values: `call`, `delegatecall`, `staticcall`, `callcode`, `selfdestruct`, `create`, `synthetic_coinbase`, `create2` | `=` | `+` | `+` | | -| sender † | string `0x[0-9a-f]{40}` | Sender's address (with 0x) | `=` | | | | -| recipient | string `0x[0-9a-f]{40}` | Recipient's address (with 0x) | `=` | | | | +| sender † | string `0x[0-9a-f]{40}` | Sender's address (with 0x) | `=` | | `+` | | +| recipient | string `0x[0-9a-f]{40}` | Recipient's address (with 0x) | `=` | | `+` | | | child_call_count | int | Number of child calls | `*` | `+` | | `+` | | value | numeric string | Call value in wei, hereinafter `numeric string` - is a numeric string passed as a string, because wei-values do not fit into uint64 | `*≈` | `+` | | `+` | | value_usd | float | Call value in USD | `*` | `+` | | `+` | @@ -9771,6 +9774,93 @@ For privacy-concerned wallets and services who'd agree to feature a link to our + +# News aggregator + +Not only Blockchair API provides you with blockchain data, but also with some crypto news to integrate into your app. We're aggregating data from more than 60 news outlets in 14 languages, populating over 35,000 headlines into our database a month,. + +## News list + +**Endpoint:** + +- `https://api.blockchair.com/news?{:query}` + +**Where:** + +- `{:query}` is the query against the table ([how to build a query](#link_05)) + +This endpoint acts like an [Infinitable](#link_05) meaning you can perform SQL-like queries: filter sort, and aggregate news articles. + +`data` contains an array of database rows. Each row is in the following format: + +| Column | Type | Description | Q? | S? | A? | C? | +| -------------- | ------------------------------- | ------------------------------------------------------------ | ---- | ---- | ---- | ---- | +| title | `string` | Headline | `~` | | | | +| source | `string` (domain name) | Source (domain name) | `=` | | | | +| language | `string [a-z]{2}` | Supported languages: `ar`, `de`, `en`, `es`, `fa`, `fr`, `it`, `jp`, `ko`, `nl`, `pt`, `ru`, `tr`, `zh` | `=` | | | | +| link | `string` (URL) | URL to the article on the source website | | | | | +| link_amp | `string` (URL) | URL to the AMP (Accelerated Mobile Pages) article on the source website or `false` if AMP is not available. `null` if it hasn't been processed yet (usually it takes under a few seconds) | | | | | +| link_iframable | `boolean` | `true` if the page could be put into an iframe (`false` otherwise). Note that there's no guarantee this value is valid as the source can change its policy after the page was crawled! `null` if it hasn't been processed yet (usually it takes under a few seconds) | | | | | +| time | `YYYY-MM-DD HH:ii:ss` | Timestamp | `⌘` | `+` | | | +| tags | `string` (comma-separated list) | Comma-separated list of tags by the publisher | | | | | +| description | `string` | Short description | `~` | | | | +| hash | `[0-9a-f]{10}` | Internal Blockchair hash (unique id) | `=` | | | | +| file | `string` | Internal Blockchair article name | | | | | +| permalink | `string` (URL) | URL to the article on Blockchair.com | | | | | + +Default sorting is by `tim`e descending. + +**Some examples:** + +* The latest crypto news in English: `https://api.blockchair.com/news?q=language(en)` +* Find news about Blockchair: `https://api.blockchair.com/news?q=title(~blockchair),or,description(~blockchair)` +* Find news about Blockchair in English: `https://api.blockchair.com/news?q=language(en),title(~blockchair),or,description(~blockchair)` + +**Example output:** + +`https://api.blockchair.com/news?q=language(en)`: + +```json +{ + "data": [ + { + "title": "Ten Days Remain Where Buying Bitcoin Was Unprofitable", + "source": "bitcoinist.com", + "language": "en", + "link": "https://bitcoinist.com/ten-days-remain-where-buying-bitcoin-was-unprofitable/", + "link_amp": false, + "link_iframable": true, + "time": "2020-11-17 15:00:31", + "tags": "Bitcoin, bitcoin, btc, btcusd, btcusdc, BTCUSDT, crypto, XBT, xbtusd", + "description": "Believe it or not, Bitcoin price is now trading at over $17,000, even though earlier this year it crashed to under $4,000. From low to high, the leading cryptocurrency by market cap rallied over 350%. With prices now trading around highs from late 2017 and early 2018 when Bitcoin had set its peak, it has left only ten days remaining where buying BTC was unprofitable. Bitcoin Faces $17,200 Where Bear Market Began, Final Resistance Before […]", + "hash": "cbe09bd89c", + "file": "ten-days-remain-where-buying-bitcoin-was-unprofitable", + "permalink": "https://blockchair.com/en/news/ten-days-remain-where-buying-bitcoin-was-unprofitable--cbe09bd89c" + }, + ... + ], + "context": { + "code": 200, + "limit": 10, + "offset": 0, + "rows": 10, + "request_cost": 1, + ... + } +} +``` + +**Request cost formula:** + +`1` + infinitable costs may apply. + +**Explore how this functionality works on Blockchair: https://blockchair.com/news** (try to switch languages as well!) + +**Want your media outlet to be included? Please contact us at [info@blockchair.com](mailto:info@blockchair.com)** + + + + # Support * E-mail: [info@blockchair.com](mailto:info@blockchair.com) From 130c0dc11277be48ffca106d3179e1936a4d19ae Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Tue, 17 Nov 2020 19:57:06 +0300 Subject: [PATCH 151/180] v.2.0.70 --- API.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/API.md b/API.md index e23dd054..beda4c47 100644 --- a/API.md +++ b/API.md @@ -26,6 +26,8 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.70 - November 17th, 2020 + * We're introducing News aggregator API! Starting today not only Blockchair API provides you with blockchain data, but also with some crypto news to integrate into your app. We're aggregating data from more than 60 news outlets in 14 languages, populating over 35,000 headlines into our database a month. Documentation: https://blockchair.com/api/docs#link_M701. Want your media outlet to be included to the aggregator? Please contact us at [info@blockchair.com](mailto:info@blockchair.com)! * v.2.0.69 - November 16th, 2020 * ERC-20 tokens in the `https://api.blockchair.com/{:eth_chain}/dashboards/address/{:address}?erc_20={approximate|precise|{:list}}` endpoint are now sorted by their market capitalization descending (so the most popular ones are on top now) * It's now possible to aggregate the Ethereum transactions infinitable (`https://api.blockchair.com/ethereum/transactions`) and the Ethereum calls infinitable (`https://api.blockchair.com/ethereum/calls`) by `sender` and `recipient` (the same applies for the Ethereum testnet). Example: show top 100 stakers of the eth2 contract (by number of deposits): `https://api.blockchair.com/ethereum/calls?q=recipient(0x00000000219ab540356cbb839cbe05303d7705fa),failed(false)&limit=100&a=sender,count()&s=count()(desc)` From ab0ca3bcce1e586b926e5f70d9655dbf95f3ae2d Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Tue, 17 Nov 2020 19:57:36 +0300 Subject: [PATCH 152/180] v.2.0.70 --- API.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/API.md b/API.md index beda4c47..2d8a9af3 100644 --- a/API.md +++ b/API.md @@ -3,7 +3,7 @@ Logo ### API v.2 documentation -* English: [https://blockchair.com/api/docs](https://blockchair.com/api/docs) (up to v.2.0.69) +* English: [https://blockchair.com/api/docs](https://blockchair.com/api/docs) (up to v.2.0.70) ### Please apply for an API key first From ee3391a3f1b3def0024efd645d6f942f56b792c9 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Wed, 18 Nov 2020 18:04:10 +0300 Subject: [PATCH 153/180] v.2.0.70 --- API.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/API.md b/API.md index 2d8a9af3..f5ede264 100644 --- a/API.md +++ b/API.md @@ -27,7 +27,7 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog * v.2.0.70 - November 17th, 2020 - * We're introducing News aggregator API! Starting today not only Blockchair API provides you with blockchain data, but also with some crypto news to integrate into your app. We're aggregating data from more than 60 news outlets in 14 languages, populating over 35,000 headlines into our database a month. Documentation: https://blockchair.com/api/docs#link_M701. Want your media outlet to be included to the aggregator? Please contact us at [info@blockchair.com](mailto:info@blockchair.com)! + * We're introducing News aggregator API! Starting today not only Blockchair API provides you with blockchain data, but also with some crypto news to integrate into your app. We're aggregating data from more than 60 news outlets in 14 languages, populating over 35,000 headlines into our database a month. Documentation: https://blockchair.com/api/docs#link_M7. Want your media outlet to be included to the aggregator? Please contact us at [info@blockchair.com](mailto:info@blockchair.com)! * v.2.0.69 - November 16th, 2020 * ERC-20 tokens in the `https://api.blockchair.com/{:eth_chain}/dashboards/address/{:address}?erc_20={approximate|precise|{:list}}` endpoint are now sorted by their market capitalization descending (so the most popular ones are on top now) * It's now possible to aggregate the Ethereum transactions infinitable (`https://api.blockchair.com/ethereum/transactions`) and the Ethereum calls infinitable (`https://api.blockchair.com/ethereum/calls`) by `sender` and `recipient` (the same applies for the Ethereum testnet). Example: show top 100 stakers of the eth2 contract (by number of deposits): `https://api.blockchair.com/ethereum/calls?q=recipient(0x00000000219ab540356cbb839cbe05303d7705fa),failed(false)&limit=100&a=sender,count()&s=count()(desc)` From 76104b3fc183f9f20c5b5ccc8d476dcde8ab858d Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Mon, 14 Dec 2020 16:26:15 +0300 Subject: [PATCH 154/180] v.2.0.71 --- API.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/API.md b/API.md index f5ede264..74db5b72 100644 --- a/API.md +++ b/API.md @@ -26,6 +26,12 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.71 - December 14th, 2020 + * Improved Dogecoin transaction broadcasting + * Added `?output=type` option to the `https://api.blockchair.com/{:eth_chain}/dashboards/address/{:address}` dashboard. When this option is enabled, only address type (`account` or `contract`) is returned. This may be a very fast handy way instead of requesting full address data. Example: `https://api.blockchair.com/ethereum/dashboards/address/0x00000000219ab540356cbb839cbe05303d7705fa?output=type`. + * Fixed a bug where the `https://api.blockchair.com/{:btc_chain}/raw/transaction/{:hash}` endpoint returned code `200` even if there was a back end error + * Fixed GitHub issue #320 ("No data returned for address balance mass check for some bitcoin-cash addresses", https://github.com/Blockchair/Blockchair.Support/issues/320) + * Added new nodes to the Release monitor: `Bitcoin Cash Node` for Bitcoin Cash, `Cardano Node` for Cardano * v.2.0.70 - November 17th, 2020 * We're introducing News aggregator API! Starting today not only Blockchair API provides you with blockchain data, but also with some crypto news to integrate into your app. We're aggregating data from more than 60 news outlets in 14 languages, populating over 35,000 headlines into our database a month. Documentation: https://blockchair.com/api/docs#link_M7. Want your media outlet to be included to the aggregator? Please contact us at [info@blockchair.com](mailto:info@blockchair.com)! * v.2.0.69 - November 16th, 2020 From 070823f3d38222a704d8617611d42978a0eb6594 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Fri, 18 Dec 2020 22:08:15 +0300 Subject: [PATCH 155/180] v.2.0.72 --- API.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/API.md b/API.md index 74db5b72..e9f2c7a2 100644 --- a/API.md +++ b/API.md @@ -25,7 +25,11 @@ While we still allow making requests without a key, services which make too many The key is applied to the end of the request string like this: `api.blockchair.com/bitcoin/blocks?key=MYSECRETKEY`. Please remember that your key is a secret -- don't disclose it to client-side applications as unauthorized users may start to use your key. ### Changelog - +* v.2.0.72 - December 18th, 2020 + * Added an ability to retrieve internal calls for unconfirmed Ethereum transactions. Usage: `https://api.blockchair.com/{:eth_chain}/dashboards/transaction/{:hash}?trace_mempool=true`. It's also possible to retrieve the list of ERC-20 transfers for mempool transactions: `https://api.blockchair.com/{:eth_chain}/dashboards/transaction/{:hash}?trace_mempool=true&erc_20=true`. This is an experimental feature. Please note that internal transfers may get invalidated when transaction gets confirmed. + * The `https://api.blockchair.com/{:eth_chain}/dashboards/transaction/{:hash}` dashboard is now more efficient at handling recently (1-30 seconds ago) confirmed transactions + * Updated list of Bitcoin mining pools + * Fixed some issues with Bitcoin ABC * v.2.0.71 - December 14th, 2020 * Improved Dogecoin transaction broadcasting * Added `?output=type` option to the `https://api.blockchair.com/{:eth_chain}/dashboards/address/{:address}` dashboard. When this option is enabled, only address type (`account` or `contract`) is returned. This may be a very fast handy way instead of requesting full address data. Example: `https://api.blockchair.com/ethereum/dashboards/address/0x00000000219ab540356cbb839cbe05303d7705fa?output=type`. From f6ccde1eceb349ac96a042af1f5726bb34fb3e11 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Fri, 26 Feb 2021 18:56:54 +0300 Subject: [PATCH 156/180] v.2.0.73 --- API.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/API.md b/API.md index e9f2c7a2..0b6ab827 100644 --- a/API.md +++ b/API.md @@ -25,6 +25,12 @@ While we still allow making requests without a key, services which make too many The key is applied to the end of the request string like this: `api.blockchair.com/bitcoin/blocks?key=MYSECRETKEY`. Please remember that your key is a secret -- don't disclose it to client-side applications as unauthorized users may start to use your key. ### Changelog + +* v.2.0.73 - February 26th, 2020 + * Added new `?assets_in_usd=true` option to the `https://api.blockchair.com/ethereum/dashboards/address/{:address}` endpoint. When applied, it adds `asset_balance_usd` to the output yielding the total USD value of all account assets (currently it's most popular ERC-20 tokens only), as well as `balance_usd` to all `layer_2.erc_20` items. + * Fixed wrong nonce values for some Ethereum transactions + * The `https://api.blockchair.com/premium/stats?key={:api_key}` now yields request points instead of raw requests in `requests_today` + * The `https://api.blockchair.com/{:eth_chain}/push/transaction` endpoint now yields a more detailed error description (`context.error`) in case the broadcast fails (e.g. `nonce too low`, `insufficient funds for gas * price + value` or `already known`) * v.2.0.72 - December 18th, 2020 * Added an ability to retrieve internal calls for unconfirmed Ethereum transactions. Usage: `https://api.blockchair.com/{:eth_chain}/dashboards/transaction/{:hash}?trace_mempool=true`. It's also possible to retrieve the list of ERC-20 transfers for mempool transactions: `https://api.blockchair.com/{:eth_chain}/dashboards/transaction/{:hash}?trace_mempool=true&erc_20=true`. This is an experimental feature. Please note that internal transfers may get invalidated when transaction gets confirmed. * The `https://api.blockchair.com/{:eth_chain}/dashboards/transaction/{:hash}` dashboard is now more efficient at handling recently (1-30 seconds ago) confirmed transactions From 0d49448854e6e9f877076d8bc60f1aba036bc84b Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Thu, 4 Mar 2021 20:52:50 +0300 Subject: [PATCH 157/180] v.2.0.74 --- API.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/API.md b/API.md index 0b6ab827..bdee7d15 100644 --- a/API.md +++ b/API.md @@ -26,8 +26,13 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog -* v.2.0.73 - February 26th, 2020 - * Added new `?assets_in_usd=true` option to the `https://api.blockchair.com/ethereum/dashboards/address/{:address}` endpoint. When applied, it adds `asset_balance_usd` to the output yielding the total USD value of all account assets (currently it's most popular ERC-20 tokens only), as well as `balance_usd` to all `layer_2.erc_20` items. +* v.2.0.74 - March 4th, 2021 + * `address.nonce` now yields `0` instead of `null` when using the `?nonce=true` option with the `https://api.blockchair.com/ethereum/dashboards/address/{:address}` dashboard for addresses that have made no transactions + * The `https://api.blockchair.com/{:eth_chain}/dashboards/address/{:address}` endpoint now correctly returns token details when the `?erc_20={:list}` option is fed with non-lowered token addresses + * Cardano API enhancements + * Mixin API enhancements +* v.2.0.73 - February 26th, 2021 + * Added a new `?assets_in_usd=true` option to the `https://api.blockchair.com/ethereum/dashboards/address/{:address}` endpoint. When applied, it adds `asset_balance_usd` to the output yielding the total USD value of all account assets (currently it's most popular ERC-20 tokens only), as well as `balance_usd` to all `layer_2.erc_20` items. * Fixed wrong nonce values for some Ethereum transactions * The `https://api.blockchair.com/premium/stats?key={:api_key}` now yields request points instead of raw requests in `requests_today` * The `https://api.blockchair.com/{:eth_chain}/push/transaction` endpoint now yields a more detailed error description (`context.error`) in case the broadcast fails (e.g. `nonce too low`, `insufficient funds for gas * price + value` or `already known`) From 4c76d17f5e991f10332a2567074f35cc3b69fe30 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Thu, 11 Mar 2021 15:59:27 +0300 Subject: [PATCH 158/180] v.2.0.75 --- API.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/API.md b/API.md index bdee7d15..27bae264 100644 --- a/API.md +++ b/API.md @@ -26,6 +26,9 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.75 - March 11th, 2021 + * Added `suggested_transaction_fee_gwei_options` to the `https://api.blockchair.com/{:eth_chain}/stats` endpoint yielding an array of suggested gas prices (`sloth` if you can take the risk and wait; `slow`, `normal`, and `fast` if you want to get the transaction confirmed within 2-10 minutes; `cheetah` if you'd like to try to get into the next block). + * The `https://api.blockchair.com/{:eth_chain}/dashboards/transaction/{:hash}₀/priority` endpoint now supports Ethereum Testnet * v.2.0.74 - March 4th, 2021 * `address.nonce` now yields `0` instead of `null` when using the `?nonce=true` option with the `https://api.blockchair.com/ethereum/dashboards/address/{:address}` dashboard for addresses that have made no transactions * The `https://api.blockchair.com/{:eth_chain}/dashboards/address/{:address}` endpoint now correctly returns token details when the `?erc_20={:list}` option is fed with non-lowered token addresses From 5d2c1cd3b1885ec8260c8950870137cf505a910e Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Fri, 12 Mar 2021 13:51:05 +0300 Subject: [PATCH 159/180] v.2.0.76 --- API.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/API.md b/API.md index 27bae264..4df0f001 100644 --- a/API.md +++ b/API.md @@ -3,7 +3,7 @@ Logo ### API v.2 documentation -* English: [https://blockchair.com/api/docs](https://blockchair.com/api/docs) (up to v.2.0.70) +* English: [https://blockchair.com/api/docs](https://blockchair.com/api/docs) (up to v.2.0.76) ### Please apply for an API key first @@ -26,6 +26,9 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.76 - March 12th, 2021 + * Added a new `?assets_in_usd=true` option to the `https://api.blockchair.com/ethereum/dashboards/transaction/{:hash}` endpoint (works with the `transactions` endpoint as well). When applied, it adds `value_usd_now` to all `layer_2.erc_20` items yielding the current (not at the moment of the transaction!) USD value of tokens (`null` if the price is unknown). Example: `https://api.blockchair.com/ethereum/dashboards/transaction/0x77025c5c7ff5eeb4bb164a4be84dd49192e12086cc321199f73888830c3ecd9e?erc_20=true&assets_in_usd=true` + * Added `{:hash}.layer_2.erc_20.{:index}.value_approximate` to the `https://api.blockchair.com/{:eth_chain}/dashboards/transaction/{:hash}` endpoint when using `?erc_20=true` option * v.2.0.75 - March 11th, 2021 * Added `suggested_transaction_fee_gwei_options` to the `https://api.blockchair.com/{:eth_chain}/stats` endpoint yielding an array of suggested gas prices (`sloth` if you can take the risk and wait; `slow`, `normal`, and `fast` if you want to get the transaction confirmed within 2-10 minutes; `cheetah` if you'd like to try to get into the next block). * The `https://api.blockchair.com/{:eth_chain}/dashboards/transaction/{:hash}₀/priority` endpoint now supports Ethereum Testnet From d270d069147fe2a99e49ee276a0fe4cea8e778a6 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Fri, 12 Mar 2021 13:57:46 +0300 Subject: [PATCH 160/180] v.2.0.76 --- API_DOCUMENTATION_EN.md | 160 +++++++++++++++++++++++++++------------- 1 file changed, 108 insertions(+), 52 deletions(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index 6beee003..66a6fc35 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,4 +1,4 @@ -# [Blockchair.com](https://blockchair.com/) API v.2.0.70 Documentation +# [Blockchair.com](https://blockchair.com/) API v.2.0.76 Documentation ``` ____ __ __ __ _ @@ -348,7 +348,7 @@ This is the full list of available API endpoints. | `https://api.blockchair.com/range` | [👉](#link_510) | `1` | Stable | | `https://api.blockchair.com/tools/releases` | [👉](#link_511) | `1` | Stable | | `https://api.blockchair.com/tools/halvening` | [👉](#link_512) | `1` | Stable | -| `https://api.blockchair.com/news` (News API) | [👉](#link_701) | `1` | Stable | +| `https://api.blockchair.com/news` (News API) | [👉](#link_800) | `1` | Stable | | **Network nodes** | — | — | — | | `https://api.blockchair.com/nodes` | [👉](#link_508) | `1` | Stable | | `https://api.blockchair.com/{:btc_chain}/nodes` | [👉](#link_508) | `1` | Stable | @@ -845,6 +845,7 @@ Always `1`. - `transactions` — total number of ERC-20 transfers - `tokens_24h` — number of tokens created over the last 24 hours - `transactions_24h` — total number of ERC-20 transfers over the last 24 hours +- `suggested_transaction_fee_gwei_options` — recommended transaction fees in gwei. It has 5 options: `sloth` for occasions when take the risk and wait; `slow`, `normal`, and `fast` if you want to get the transaction confirmed within 2-10 minutes; `cheetah` for an almost guaranteed next-block confirmation **Example output:** @@ -853,55 +854,72 @@ Always `1`. ```json { "data": { - "blocks": 8765932, - "transactions": 563679664, - "blocks_24h": 6345, - "circulation_approximate": "108198544155730000000000000", - "transactions_24h": 732332, - "difficulty": 2384281079680802, - "volume_24h_approximate": "1942030242954258000000000", - "mempool_transactions": 34803, - "mempool_median_gas_price": 100000000, - "mempool_tps": 1.8333333333333333, - "mempool_total_value_approximate": "890993462756481300000", - "best_block_height": 8765929, - "best_block_hash": "18164bed364f1ceef954e98f2d0ee8af4b45ba2144baa74e203e882dbf4a32f6", - "best_block_time": "2019-10-18 16:27:20", - "uncles": 943033, - "uncles_24h": 353, - "blockchain_size": 106821332817, - "calls": 1416512303, - "average_transaction_fee_24h": "631689895242411", - "median_transaction_fee_24h": "315000000000000", - "inflation_24h": 13293.0625, - "average_simple_transaction_fee_24h": "319074939493396", - "median_simple_transaction_fee_24h": "210000000000000", + "blocks": 12023239, + "transactions": 1043567165, + "blocks_24h": 6433, + "circulation_approximate": "115018182780730000000000000", + "transactions_24h": 1302619, + "difficulty": 5447494005324207, + "volume_24h_approximate": "6300512633065118000000000", + "mempool_transactions": 94866, + "mempool_median_gas_price": 40000000000, + "mempool_tps": 7.983333333333333, + "mempool_total_value_approximate": "77011108570302550000000", + "best_block_height": 12023240, + "best_block_hash": "4338ee00f57c8d0bfcb5e9bbbdc47ab40d9685e2b41801541acda53da71132f3", + "best_block_time": "2021-03-12 10:43:40", + "uncles": 1121915, + "uncles_24h": 307, + "blockchain_size": 213678005011, + "calls": 3032610029, + "average_transaction_fee_24h": "9339692912924509", + "median_transaction_fee_24h": "4887620538746249", + "inflation_24h": 13411.4375, + "average_simple_transaction_fee_24h": "2947056048574188", + "median_simple_transaction_fee_24h": "3129000000000000", "largest_transaction_24h": { - "hash": "0x8cdda43621c13cd6f6f5001c39792aec8602c1bb1fe406558224201b0a79f465", - "value_usd": 17709550.4761 + "hash": "0xbc4fc78885355694f0a5ffe27af7e2157f323855a4e40beaf37905e3f3617640", + "value_usd": 872236755.0026 }, - "hashrate_24h": "198690089973400", - "inflation_usd_24h": 2302358.425, - "average_transaction_fee_usd_24h": 0.10940868985598558, - "median_transaction_fee_usd_24h": 0.054557999999999995, - "average_simple_transaction_fee_usd_24h": 0.05526377952025618, - "median_simple_transaction_fee_usd_24h": 0.036372, - "market_price_usd": 173.2, - "market_price_btc": 0.021793263465708, - "market_price_usd_change_24h_percentage": -3.30365, - "market_cap_usd": 18739592599, - "market_dominance_percentage": 8.63, + "hashrate_24h": "453957833777017", + "inflation_usd_24h": 23792024.239375, + "average_transaction_fee_usd_24h": 16.56870862445721, + "median_transaction_fee_usd_24h": 8.670687711941234, + "average_simple_transaction_fee_usd_24h": 5.228106900731096, + "median_simple_transaction_fee_usd_24h": 5.55087729, + "market_price_usd": 1774.01, + "market_price_btc": 0.031517784173684, + "market_price_usd_change_24h_percentage": 0.95673, + "market_cap_usd": 203352392960, + "market_dominance_percentage": 11.66, "layer_2": { "erc_20": { - "tokens": 120889, - "transactions": 273663782, - "tokens_24h": 164, - "transactions_24h": 495265 + "tokens": 246816, + "transactions": 604957673, + "tokens_24h": 100, + "transactions_24h": 859287 } + }, + "countdowns": [ + { + "event": "eth2 launch", + "eth_staked": 3487170.000069, + "eth_needed": 524288 + } + ], + "suggested_transaction_fee_gwei_options": { + "sloth": 102, + "slow": 115, + "normal": 122, + "fast": 134, + "cheetah": 173 } }, "context": { "code": 200, + "state": 12023239, + "state_layer_2": 12023239, + "request_cost": 1, ... } } @@ -2703,6 +2721,8 @@ If there's no `{:hash}ᵢ` has been found in the database, there won't be such k - `?erc_20=true` shows information about ERC-20 token transfers in this transaction - `?effects=true` shows state changes for the transaction +- `?trace_mempool=true` — this option tries to retrieve a list of internall calls for mempool transactions. In conjunction with `&erc_20=true` it also shows the list of ERC-20 transfers. This is an experimental feature. Please note that internal transfers may get invalidated when transaction gets confirmed. +- `?assets_in_usd=true` — adds `value_usd_now` to all `layer_2.erc_20` items yielding the current (not at the moment of the transaction!) USD value of tokens (`null` if the price is unknown) **Output:** @@ -2729,6 +2749,7 @@ In case transaction is confirmed on the blockchain, `data.{:hash}ᵢ.transaction - `https://api.blockchair.com/ethereum/dashboards/transaction/0xc132a422513e39038269e091847319a14029feb42c66bd1424c57dfc0e4f8d08` - `https://api.blockchair.com/ethereum/dashboards/transactions/0xc132a422513e39038269e091847319a14029feb42c66bd1424c57dfc0e4f8d08,0x502bc6fe1f39738f0fd3223a2f125433b8ec7e80acd11ef514f6909536cc9e66` - `https://api.blockchair.com/ethereum/dashboards/transaction/0xc132a422513e39038269e091847319a14029feb42c66bd1424c57dfc0e4f8d08?erc_20=true` +- `https://api.blockchair.com/ethereum/dashboards/transaction/0x77025c5c7ff5eeb4bb164a4be84dd49192e12086cc321199f73888830c3ecd9e?erc_20=true&assets_in_usd=true` **Example output:** @@ -2817,7 +2838,8 @@ In case transaction is confirmed on the blockchain, `data.{:hash}ᵢ.transaction "token_decimals": 18, "sender": "0x0ebe7487f60d3a4eb084a23152890a1a65b2ad65", "recipient": "0xa488cf9adcac170f28a046ba34a9885eb9f67033", - "value": "100000000000000000000" + "value": "100000000000000000000", + "value_approximate": 100 }, { "token_address": "0xa68920f6d3c996ac3c232e4e93914e9d76150735", @@ -2826,7 +2848,8 @@ In case transaction is confirmed on the blockchain, `data.{:hash}ᵢ.transaction "token_decimals": 18, "sender": "0x0ebe7487f60d3a4eb084a23152890a1a65b2ad65", "recipient": "0x8cc1e8ffc3bf19c67c244e2bd8126fd29ec50e58", - "value": "100000000000000000000" + "value": "100000000000000000000", + "value_approximate": 100 }, ... ] @@ -2881,7 +2904,9 @@ For mempool transactions shows priority (`position`) by `gas_price` over other t - `?erc_20=approximate` (or `?erc_20=true`, default) — yields all token balances from our database. These values may miss some non-standard transfers in tokens that don't follow the ERC-20 standard in full. Please double-check if this option returns correct values for the tokens you'd want to get information about. Using this option costs `1`. - `?erc_20=precise` — yields all token balances from our node. The process is the following: we gather information from our database about potential ERC-20 tokens the address may hold, and then for each token we call `getBalance` function using our node to get precise balances. Please note that if for some reason some contract doesn't follow the ERC-20 standard, our database may still miss records about the address holding this token, and there will be no request to the node about this token. So while balances yielded with this option are precise, some non-standard tokens may still be missed. Using this option costs `2`. - `?erc_20={:token_address}₀,...,{:token_address}ᵩ` (recommended) — yields balances for the enlisted ERC-20 tokens from our node. That's the recommended way if you have an exact list of tokens you'd like to check. Even if some token doesn't follow the ERC-20 standard, but still has `getBalance` function implemented, the correct balance will be returned. Using this option costs `0.75` + `0.01` for each contract checked (the cheapest option!) -- `?nonce=true` — returns current account nonce +- `?nonce=true` — returns current account nonce (mempool transactions are taken in account) +- `?output=type` — this option scrubs all the output data except for the address type (`account` or `contract`). This may be a very fast handy way to retrieve address type instead of requesting full address data +- `?assets_in_usd=true` — adds `asset_balance_usd` to the output yielding the total USD value of all (excluding ETH) account assets (currently it's most popular ERC-20 tokens only), as well as `balance_usd` to all `layer_2.erc_20` items. If the exchange rate for a particular token is unknown, returns `null` for this token. **Output:** @@ -9344,10 +9369,11 @@ This endpoint returns the list of latest software (core clients) releases for bl ], "context": { "code": 200, - "latest_update": "2020-01-28 13:12:16", + "latest_update": "2021-03-12 10:36:16", "supported_chains": { "bitcoin": "Bitcoin Core", - "bitcoin-cash": "Bitcoin ABC", + "bitcoin-abc": "Bitcoin ABC", + "bitcoin-cash": "Bitcoin Cash Node", "ethereum": "Geth", "litecoin": "Litecoin Core", "bitcoin-sv": "Bitcoin SV", @@ -9357,7 +9383,7 @@ This endpoint returns the list of latest software (core clients) releases for bl "groestlcoin": "Groestlcoin Core", "stellar": "Stellar Core", "monero": "Monero", - "cardano": "Cardano SL", + "cardano": "Cardano Node", "zcash": "Zcash", "mixin": "Mixin", "eos": "EOSIO" @@ -9773,13 +9799,43 @@ For privacy-concerned wallets and services who'd agree to feature a link to our +### Address clusterizer + +**Endpoint:** + +- `https://api.blockchair.com/{:chain}/clusterize/{:address}` + +**Output:** + +- ... + +**Example output:** + +`https://api.blockchair.com/...`: + +```json +... +``` + +**Request cost formula:** + + `1` + +... + +**Explore visualizations on our front-end:** + +- https://blockchair.com/... + + + -# News aggregator +# News aggregator -Not only Blockchair API provides you with blockchain data, but also with some crypto news to integrate into your app. We're aggregating data from more than 60 news outlets in 14 languages, populating over 35,000 headlines into our database a month,. +Not only Blockchair API provides you with blockchain data, but also with some crypto news to integrate into your app. We're aggregating data from more than 60 news outlets in 14 languages, populating over 35,000 headlines into our database a month. -## News list +## News list **Endpoint:** @@ -9854,7 +9910,7 @@ Default sorting is by `tim`e descending. `1` + infinitable costs may apply. -**Explore how this functionality works on Blockchair: https://blockchair.com/news** (try to switch languages as well!) +**Explore how this functionality works on Blockchair: [https://blockchair.com/news](https://blockchair.com/news)** (try to switch languages as well!) **Want your media outlet to be included? Please contact us at [info@blockchair.com](mailto:info@blockchair.com)** From 7f48862b5743d1ee8d5d9dbbdaf8c50d346c941a Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Mon, 15 Mar 2021 16:32:07 +0300 Subject: [PATCH 161/180] v.2.0.77 --- API.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/API.md b/API.md index 4df0f001..260b0b09 100644 --- a/API.md +++ b/API.md @@ -26,6 +26,12 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.77 - March 15th, 2021 + * Added special statistical endpoints for USDT, USDC, and BUSD. Please note this feature is currently in test mode, there may be compatibility-breaking changes. These endpoints show the distribution of tokens amongst blockchain platforms they are issued on: + * `https://api.blockchair.com/cross-chain/tether/stats` for Tether (USDT) + * `https://api.blockchair.com/cross-chain/usd-coin/stats` for USD Coin (USDC) + * `https://api.blockchair.com/cross-chain/binance-usd/stats` for Binance USD (BUSD) + * `https://api.blockchair.com/stats` was also updated to show these stats * v.2.0.76 - March 12th, 2021 * Added a new `?assets_in_usd=true` option to the `https://api.blockchair.com/ethereum/dashboards/transaction/{:hash}` endpoint (works with the `transactions` endpoint as well). When applied, it adds `value_usd_now` to all `layer_2.erc_20` items yielding the current (not at the moment of the transaction!) USD value of tokens (`null` if the price is unknown). Example: `https://api.blockchair.com/ethereum/dashboards/transaction/0x77025c5c7ff5eeb4bb164a4be84dd49192e12086cc321199f73888830c3ecd9e?erc_20=true&assets_in_usd=true` * Added `{:hash}.layer_2.erc_20.{:index}.value_approximate` to the `https://api.blockchair.com/{:eth_chain}/dashboards/transaction/{:hash}` endpoint when using `?erc_20=true` option From 70957fc66c15a2dda926340b4ce6b8eb9a26fa05 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Sun, 18 Apr 2021 19:51:18 +0300 Subject: [PATCH 162/180] v.2.0.78 --- API.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/API.md b/API.md index 260b0b09..b5050de2 100644 --- a/API.md +++ b/API.md @@ -26,6 +26,11 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.78 - April 17th, 2021 + * The `?state=latest` option can now also be applied to the Ethereum address dashboard endpoint. If this option is enabled, `balance` will yield the confirmed balance, and the `calls` array won't include unconfirmed data. Example: `https://api.blockchair.com/{:eth_chain}/dashboards/address/{:address}?state=latest`. + * Added a new `?contract_details=true` option to the `https://api.blockchair.com/ethereum/dashboards/address/{:address}₀` endpoint. If applied, it adds additional data on the address if it's a contract. At the moment, it works with ERC-20 contracts only yielding `token_name`, `token_symbol`, and `token_decimals`. It also yields some additional fields for all contracts: `creating_transaction_hash`, `creating_address`, and `creating_transaction_time`. The additional cost of using this option is `0.5`. + * Added `hodling_addresses` to the `https://api.blockchair.com/{:btc_chain}/stats` endpoint (stats on Bitcoin-like blockchains) yielding the total number of addresses with positive balance. + * Added `market_price_usd`, `market_price_btc`, `market_cap_usd` to the `https://api.blockchair.com/ethereum/erc-20/{:token_address}/stats` endpoint. `null`s are returned if there's no market data for the specified token. * v.2.0.77 - March 15th, 2021 * Added special statistical endpoints for USDT, USDC, and BUSD. Please note this feature is currently in test mode, there may be compatibility-breaking changes. These endpoints show the distribution of tokens amongst blockchain platforms they are issued on: * `https://api.blockchair.com/cross-chain/tether/stats` for Tether (USDT) From 09516b8287a52858373598fd3385263af2e57bdd Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Fri, 23 Apr 2021 18:10:00 +0300 Subject: [PATCH 163/180] v.2.0.79 --- API.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/API.md b/API.md index b5050de2..d192b9e0 100644 --- a/API.md +++ b/API.md @@ -26,6 +26,13 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.79 - April 23rd, 2021 + * Added a new `?events=true` option to the `https://api.blockchair.com/ethereum/dashboards/transaction/{:hash}` endpoint (works with the `transactions` endpoint as well). This option costs `1` additional request point to use. When enabled, it adds an array of event logs to the output. Every log contains `topics`, `data`, `contract`, `log_index`, and `decoded_event`. Depending on how much our API knows about the event signature, there are 3 detalization levels for `decoded_event` (example transaction with all 3: `https://api.blockchair.com/ethereum/dashboards/transaction/0x7d52cf58fe78403e8816dae6e900baff92b35760b4ed81cecd2590eafcde3dad?events=true`): + * Full data: `decoded_event` contains both the full event name with its argument names (`name_full`, example: `Approval(address owner, address spender, uint256 value)`), and the argument values in the `arguments` array; + * Partial data: only `name_with_types` is known (example: `Withdrawal(address, uint256)`), `arguments` yields `null`; + * No data: `decoded_event` yields `null`. + * Added `eta_seconds` to the `https://api.blockchair.com/{:btc_chain}/dashboards/transaction/{:hash}/priority` and `https://api.blockchair.com/{:eth_chain}/dashboards/transaction/{:hash}/priority` endpoints returning an approximate time for the transaction to confirm (in seconds). Please note it's an experimental function and may be unreliable. + * Upgraded Dogecoin infrastructure for better transaction broadcasting * v.2.0.78 - April 17th, 2021 * The `?state=latest` option can now also be applied to the Ethereum address dashboard endpoint. If this option is enabled, `balance` will yield the confirmed balance, and the `calls` array won't include unconfirmed data. Example: `https://api.blockchair.com/{:eth_chain}/dashboards/address/{:address}?state=latest`. * Added a new `?contract_details=true` option to the `https://api.blockchair.com/ethereum/dashboards/address/{:address}₀` endpoint. If applied, it adds additional data on the address if it's a contract. At the moment, it works with ERC-20 contracts only yielding `token_name`, `token_symbol`, and `token_decimals`. It also yields some additional fields for all contracts: `creating_transaction_hash`, `creating_address`, and `creating_transaction_time`. The additional cost of using this option is `0.5`. From e37f3de5844bf6ce8e7984a1f1e8ec37815b0c7a Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Thu, 8 Jul 2021 20:15:54 +0300 Subject: [PATCH 164/180] v.2.0.80 --- API.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/API.md b/API.md index d192b9e0..67360089 100644 --- a/API.md +++ b/API.md @@ -3,7 +3,7 @@ Logo ### API v.2 documentation -* English: [https://blockchair.com/api/docs](https://blockchair.com/api/docs) (up to v.2.0.76) +* English: [https://blockchair.com/api/docs](https://blockchair.com/api/docs) (up to v.2.0.80) ### Please apply for an API key first @@ -26,6 +26,17 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.80 - July 8th, 2021 + * Database dumps now feature Ethereum addresses, ERC-20 tokens, ERC-20 transfers, Zcash blocks, Zcash transactions, Zcash outputs, Zcash inputs, and Zcash addresses (transparent): https://gz.blockchair.com + * There's a new `addresses` infinitable for Ethereum: `https://api.blockchair.com/ethereum/addresses`. The columns are: `address`, `balance`, `nonce`, `is_contract`. The default sort is by balance descending. Unlike with Bitocin-like `addresses` infinitables which are updated once every 5 minutes, this infinitable is only updated once a day. The documentation is available here: https://blockchair.com/api/docs#link_310. Some cool examples: + * `https://api.blockchair.com/ethereum/addresses?a=is_contract,count()` - count accounts and contracts + * `https://api.blockchair.com/ethereum/addresses?q=balance(1000000..)&a=count()` - count the number of addresses hodling more than 1 million ethers + * Full dump is available here: https://gz.blockchair.com/ethereum/addresses/ (updated daily) + * Stats endpoint for Bitcoin-like chains (`https://api.blockchair.com/{:btc_chain}/stats`) now includes `mempool_outputs`. + * **BREAKING CHANGE**: Bitcoin ABC (which is still in beta status on our platform) is now renamed to eCash and starting from July 19th, 2021 00:00:00 UTC: + * All API paths will be renamed from `bitcoin-abc` to `ecash` (right now both work) + * All array keys that previously were named `bitcoin-abc` will be renamed to `ecash` + * The prefix for the address format will be changed from `bitcoincash:` to `ecash:` * v.2.0.79 - April 23rd, 2021 * Added a new `?events=true` option to the `https://api.blockchair.com/ethereum/dashboards/transaction/{:hash}` endpoint (works with the `transactions` endpoint as well). This option costs `1` additional request point to use. When enabled, it adds an array of event logs to the output. Every log contains `topics`, `data`, `contract`, `log_index`, and `decoded_event`. Depending on how much our API knows about the event signature, there are 3 detalization levels for `decoded_event` (example transaction with all 3: `https://api.blockchair.com/ethereum/dashboards/transaction/0x7d52cf58fe78403e8816dae6e900baff92b35760b4ed81cecd2590eafcde3dad?events=true`): * Full data: `decoded_event` contains both the full event name with its argument names (`name_full`, example: `Approval(address owner, address spender, uint256 value)`), and the argument values in the `arguments` array; From c3da2c0ec8e7db22fc90c1b9d5f9e52bda28626a Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Thu, 8 Jul 2021 20:16:41 +0300 Subject: [PATCH 165/180] v.2.0.80 --- API_DOCUMENTATION_EN.md | 408 ++++++++++++++++++++++++++++++++-------- 1 file changed, 325 insertions(+), 83 deletions(-) diff --git a/API_DOCUMENTATION_EN.md b/API_DOCUMENTATION_EN.md index 66a6fc35..129a49dc 100644 --- a/API_DOCUMENTATION_EN.md +++ b/API_DOCUMENTATION_EN.md @@ -1,4 +1,4 @@ -# [Blockchair.com](https://blockchair.com/) API v.2.0.76 Documentation +# [Blockchair.com](https://blockchair.com/) API v.2.0.80 Documentation ``` ____ __ __ __ _ @@ -29,6 +29,7 @@ + [Mixin-like DAG stats](#link_008) + [Tezos-like blockchain stats](#link_009) + [EOS-like blockchain stats](#link_010) + + [Cross-chain token stats](#link_011) + [Omni Layer stats](#link_500) + [ERC-20 stats](#link_509) + [Dashboard endpoints](#link_M2) (Retrieve information about various entities in a neat format from our databases) @@ -96,6 +97,7 @@ + [Uncles](#link_402) (table) + [Transactions](#link_206) (table) + [Calls](#link_403) (table) + + [Addresses](#link_310) (view) + [Mixin](#link_M44) + [Snapshots](#link_407) (table) + [Mintings](#link_408) (table) @@ -151,7 +153,7 @@ Our API is free to try under some limitations, and we have a variety of premium ## Supported blockchains and second layers As of today, our API supports **19 blockchains** (17 mainnets and 2 testnets) divided into 9 groups: -* Bitcoin-like blockchains (Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin, Zcash, Bitcoin ABC, Bitcoin Testnet), also known as UTXO-based blockchains +* Bitcoin-like blockchains (Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin, Zcash, eCash, Bitcoin Testnet), also known as UTXO-based blockchains * Ethereum-like blockchains (Ethereum, Ethereum Goerli Testnet) * Ripple-like blockchains (Ripple) * Stellar-like blockchains (Stellar) @@ -183,7 +185,7 @@ Here's the list of available mainnets: | Mixin | Mixin-like | `https://api.blockchair.com/mixin` | Full support at least till April 24th, 2021 | | Tezos | Tezos-like | `https://api.blockchair.com/tezos` | Alpha mode, possible compatibility-breaking changes | | EOS | EOS-like | `https://api.blockchair.com/eos` | Alpha mode, possible compatibility-breaking changes | -| Bitcoin ABC | Bitcoin-like | `https://api.blockchair.com/bitcoin-abc` | Beta mode, possible instability. Also known as Bitcoin Cash ABC. | +| eCash | Bitcoin-like | `https://api.blockchair.com/ecash` | Beta mode, possible instability. Also known as Bitcoin Cash ABC and Bitcoin ABC. | Please read our statement on the November 15th, 2020 Bitcoin Cash split: https://twitter.com/Blockchair/status/1324424632179576832. It is expected that Bitcoin ABC's hashrate will be very low so 51% attacks are possible. We'll be running Bitcoin ABC in beta mode and we don't guarantee neither its stability, nor that we'll run it if the chain won't be used by businesses. Once the situation becomes more stable we'll update the documentation. At the moment, other parts of the documentation don't reflect Bitcoin ABC support, so please assume that for every `bitcoin-cash` endpoint there's a `bitcoin-abc` equivalent except for `https://api.blockchair.com/bitcoin-cash/nodes`. @@ -229,7 +231,7 @@ Wormhole support was dropped on January 1st, 2020 with a 3-month notice as it's This is the full list of available API endpoints. -- `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `zcash`, `bitcoin-abc`, or `bitcoin/testnet` +- `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `zcash`, `ecash`, or `bitcoin/testnet` - `{:eth_chain}` can be `ethereum` or `ethereum/testnet` - `{:xrp_chain}` can be only `ripple` - `{:xlm_chain}` can be only `stellar` @@ -238,6 +240,7 @@ This is the full list of available API endpoints. - `{:xin_chain}` can be only `mixin` - `{:xtz_chain}` can be only `tezos` - `{:eos_chain}` can be only `eos` +- `{:xchain_token}` can be `tether`, `usd-coin`, or `binance-usd` | Endpoint path | Docs | Base request cost | Status | | ----------------------------------------------- | :----------------: | -----------------------------: | :---------------------------------------------: | @@ -252,6 +255,7 @@ This is the full list of available API endpoints. | `https://api.blockchair.com/{:xin_chain}/stats` | [👉](#link_008) | `1` | Stable | | `https://api.blockchair.com/{:xtz_chain}/stats` | [👉](#link_009) | `1` | Stable | | `https://api.blockchair.com/{:eos_chain}/stats` | [👉](#link_010) | `1` | Stable | +| `https://api.blockchair.com/cross-chain/{:xchain_token}/stats` | [👉](#link_011) | `1` | Alpha | | **Block-related information** | — | — | — | | `https://api.blockchair.com/{:btc_chain}/dashboards/block/{:height}₀` | [👉](#link_100) | `1` | Stable | | `https://api.blockchair.com/{:btc_chain}/dashboards/block/{:hash}₀` | [👉](#link_100) | `1` | Stable | @@ -310,6 +314,7 @@ This is the full list of available API endpoints. | `https://api.blockchair.com/{:btc_chain}/dashboards/xpub/{:extended_key}` | [👉](#link_300) | `1 + 0.1*d` | Beta | | `https://api.blockchair.com/{:btc_chain}/addresses?{:query}` | [👉](#link_301) | `2` | Stable | | `https://api.blockchair.com/{:eth_chain}/dashboards/address/{:address}₀` | [👉](#link_302) | `1` | Stable | +| `https://api.blockchair.com/{:eth_chain}/addresses?{:query}` | [👉](#link_310) | `2` | Stable | | `https://api.blockchair.com/{:xrp_chain}/raw/account/{:address}₀` | [👉](#link_303) | `1` | Alpha | | `https://api.blockchair.com/{:xlm_chain}/raw/account/{:address}₀` | [👉](#link_304) | `1` | Alpha | | `https://api.blockchair.com/{:ada_chain}/raw/address/{:address}₀` | [👉](#link_307) | `1` | Alpha | @@ -539,6 +544,13 @@ If you require data on just one blockchain, please use `https://api.blockchair.c - Zcash - Mixin - Tezos +- eCash + +and on 3 cross-chain tokens: + +* Tether (USDT) +* USD Coin (USDC) +* Binance USD (BUSD) Note that Bitcoin Testnet stats are not included in this output. @@ -640,6 +652,17 @@ Description of the fields is available in the next three sections of documentati "blocks": 974144, ... } + }, + "cross-chain": { + "tether": { + "data": ... + }, + "usd-coin": { + "data": ... + }, + "binance-usd": { + "data": ... + } } }, "context": { @@ -673,6 +696,7 @@ Always `1`. * `https://api.blockchair.com/dash/stats` * `https://api.blockchair.com/groestlcoin/stats` * `https://api.blockchair.com/zcash/stats` +* `https://api.blockchair.com/ecash/stats` * `https://api.blockchair.com/bitcoin/testnet/stats` **Output:** @@ -693,6 +717,7 @@ Always `1`. * `best_block_hash` — the latest block hash * `best_block_time` — the latest block time * `mempool_transactions` — number of transactions in the mempool +* `mempool_outputs` — number of outputs in the mempool * `mempool_size` — mempool size in bytes * `mempool_tps` — number of transactions per second added to the mempool * `mempool_total_fee_usd` — sum of transaction fees in the mempool, in USD @@ -714,6 +739,7 @@ Always `1`. * `market_dominance_percentage` — dominance index (how much % of the total cryptocurrency market is the market capitalization of the coin) * `countdowns` (optional) — an optional array of events ([`event`, `time_left`] format), where `time_left` is the number of seconds till the `event` * `suggested_transaction_fee_per_byte_sat` — suggests a proper transaction fee in satoshi per byte based on the latest block +* `hodling_addresses` — the total number of addresses with positive balance **Example output:** @@ -722,49 +748,47 @@ Always `1`. ```json { "data": { - "blocks": 586962, - "transactions": 438436033, - "outputs": 1175789668, - "circulation": 1783699604497237, - "blocks_24h": 133, - "transactions_24h": 302792, - "difficulty": 9013786945891.7, - "volume_24h": 203868415027354, - "mempool_transactions": 11206, - "mempool_size": 9700111, - "mempool_tps": 3.183333333333333, - "mempool_total_fee_usd": 17385.9233, - "best_block_height": 586961, - "best_block_hash": "0000000000000000000c0f21dffb88b43aaa38dc561c1744f8964c010ddeed5e", - "best_block_time": "2019-07-25 13:40:20", - "blockchain_size": 231910648585, - "average_transaction_fee_24h": 18150, - "inflation_24h": 166250000000, - "median_transaction_fee_24h": 9812, - "cdd_24h": 53734025.51903, + "blocks": 690165, + "transactions": 654248075, + "outputs": 1776138129, + "circulation": 1875100229497096, + "blocks_24h": 130, + "transactions_24h": 229726, + "difficulty": 14363025673660, + "volume_24h": 187713267560047, + "mempool_transactions": 6591, + "mempool_outputs": 16532, + "mempool_size": 5076549, + "mempool_tps": 5.416666666666667, + "mempool_total_fee_usd": 14219.1005, + "best_block_height": 690164, + "best_block_hash": "000000000000000000023fcb3703bf89ddbfc1ef5109f21c2387a9d630b78c6e", + "best_block_time": "2021-07-08 14:37:00", + "blockchain_size": 353767186147, + "average_transaction_fee_24h": 14421, + "inflation_24h": 81250000000, + "median_transaction_fee_24h": 5269, + "cdd_24h": 3696149.5996842394, + "mempool_outputs": 44316, "largest_transaction_24h": { - "hash": "89037b97c0e8b7762c05c64ff89349e55433c7f2aaa5829dcf401774ad36d171", - "value_usd": 323700000 + "hash": "7a83c11f42dadad1c6916cceb079835aa09ed70127dba7cdf15aa904277c907d", + "value_usd": 773548352 }, - "nodes": 9287, - "hashrate_24h": "59651648914812891495", - "inflation_usd_24h": 16578450, - "average_transaction_fee_usd_24h": 1.8099929306260403, - "median_transaction_fee_usd_24h": 0.97845264, - "market_price_usd": 9972, + "nodes": 8502, + "hashrate_24h": "92904707138521187685", + "inflation_usd_24h": 26587437.5, + "average_transaction_fee_usd_24h": 4.719001232335435, + "median_transaction_fee_usd_24h": 1.724338485, + "market_price_usd": 32723, "market_price_btc": 1, - "market_price_usd_change_24h_percentage": 2.77893, - "market_cap_usd": 177983139916, - "market_dominance_percentage": 64.48, - "next_retarget_time_estimate": "2019-08-06 08:06:58", - "next_difficulty_estimate": 9154306812972, - "countdowns": [ - { - "event": "Reward halving", - "time_left": 25822200 - } - ], - "suggested_transaction_fee_per_byte_sat": 49 + "market_price_usd_change_24h_percentage": -5.7534, + "market_cap_usd": 613578128025, + "market_dominance_percentage": 43.03, + "next_retarget_time_estimate": "2021-07-18 19:23:20", + "next_difficulty_estimate": 17958208674260, + "countdowns": [], + "suggested_transaction_fee_per_byte_sat": 17, + "hodling_addresses": 38343147 }, "context": { "code": 200, @@ -787,6 +811,7 @@ Always `1`. - https://blockchair.com/dash - https://blockchair.com/groestlcoin - https://blockchair.com/zcash +- https://blockchair.com/ecash - https://blockchair.com/bitcoin/testnet @@ -1445,6 +1470,62 @@ Always `1`. +## Stats for cross-chain tokens (USDT, USDC, BUSD) + +**Endpoints:** + +- `https://api.blockchair.com/cross-chain/tether/stats` +- `https://api.blockchair.com/cross-chain/usd-coin/stats` +- `https://api.blockchair.com/cross-chain/binance-usd/stats` + +**Output:** + +- `circulation` shows the total token circulation across all supported blockchains +- `blockchains` is an array of blockchains the token supports: + - `circulation` is the token circulation on a particular blockchain + - `explorer` is a link to Blockchair's explorer for the token + +**Example output:** + +`https://api.blockchair.com/cross-chain/usd-coin/stats`: + +```json +{ + "data": { + "circulation": 26017746210.430256, + "blockchains": { + "ethereum": { + "circulation": 25058405745.44955, + "explorer": "https://blockchair.com/ethereum/erc-20/token/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48" + }, + "algorand": { + "circulation": 174340444.981248, + "explorer": null + }, + "solana": { + "circulation": 785000019.99946, + "explorer": null + } + } + }, + "context": { + "code": 200, + "request_cost": 1, + ... + } +} +``` + +**Request cost formula:** + +Always `1`. + +**Explore visualization on our front-end:** + +Not yet available + + + ## Omni Layer stats Allows to retrieve the some basic stats on Omni Layer (Bitcoin). Note that this endpoint is in the Alpha stage, and Wormhole (Bitcoin Cash Omni-like token system) was phased out on January 1st, 2020. @@ -1530,7 +1611,7 @@ The API supports a number of calls that produce some aggregated data, or data in -## Dashboard endpoints for Bitcoin-like blockchains (Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin, Zcash, Bitcoin Testnet) +## Dashboard endpoints for Bitcoin-like blockchains (Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin, Zcash, eCash, Bitcoin Testnet) @@ -1545,7 +1626,7 @@ The API supports a number of calls that produce some aggregated data, or data in **Where:** -* `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `zcash`, `bitcoin/testnet` +* `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `zcash`, `ecash`, `bitcoin/testnet` * `{:height}ᵢ` is the block height (integer value), also known as block id * `{:hash}ᵢ` is the block hash (regex: `/^[0-9a-f]{64}$/i`) @@ -1654,6 +1735,7 @@ Note that the total number of transactions in the block is contained in `data.{: - https://blockchair.com/dash/block/0 - https://blockchair.com/groestlcoin/block/0 - https://blockchair.com/zcash/block/0 +- https://blockchair.com/ecash/block/0 - https://blockchair.com/bitcoin/testnet/block/0 @@ -1667,7 +1749,7 @@ Note that the total number of transactions in the block is contained in `data.{: **Where:** -* `{:chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `zcash`, `bitcoin/testnet` +* `{:chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `zcash`, `ecash`, `bitcoin/testnet` * `{:hashᵢ}` is the transaction hash (regex: `/^[0-9a-f]{64}$/i`), also known as txid **Possible options:** @@ -1843,7 +1925,7 @@ In case transaction is confirmed on the blockchain, `data.{:hash}ᵢ.transaction - `https://api.blockchair.com/{:btc_chain}/dashboards/transaction/{:hash}₀/priority` -For mempool transactions shows priority (`position`) — for chains supporting SegWit by `fee_per_kwu`, for others by `fee_per_kb`— over other transactions (`out_of` mempool transactions). `position` is `null` if the transaction is neither in the mempool nor in the blockchain, `confirmed` if it's in the blockchain. Cost: `1`. +For mempool transactions shows priority (`position`) — for chains supporting SegWit by `fee_per_kwu`, for others by `fee_per_kb`— over other transactions (`out_of` mempool transactions). `position` is `null` if the transaction is neither in the mempool nor in the blockchain, `confirmed` if it's in the blockchain. `eta_seconds` returns an approximate time for the transaction to confirm (in seconds, exprimental). Cost: `1`. **Request cost formula:** @@ -1867,7 +1949,7 @@ For mempool transactions shows priority (`position`) — for chains supporting S **Where:** -* `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `zcash`, `bitcoin/testnet` +* `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `zcash`, `ecash`, `bitcoin/testnet` * `{:address}ᵢ` is the address, possible formats are: * `p2pk`/`p2pkh` format (supported for all blockchains, example for Bitcoin: `1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa`) @@ -1875,13 +1957,13 @@ For mempool transactions shows priority (`position`) — for chains supporting S * Only for the `dashboards/address` endpoint Bitcoin Cash also supports `Legacy` address variant, and Bitcoin SV supports `CashAddr` variant for `p2pkh` and `p2sh` formats. It's also possible to use `bitcoincash:` prefix (examples: `qzyl04w3m99ddpqahzwghn3erallm3e7z5le4aqqmh` or `bitcoincash:qzyl04w3m99ddpqahzwghn3erallm3e7z5le4aqqmh` for both Bitcoin Cash and Bitcoin SV. * `bech32` format (`witness_v0_keyhash`, `witness_v0_scripthash`, or `witness_unknown` — supported for Bitcoin, Litecoin, Groestlcoin, and Bitcoin Testnet only; example for Bitcoin: `bc1q34aq5drpuwy3wgl9lhup9892qp6svr8ldzyy7c`) * Internal Blockchair format (for `multisig`. `nulldata`, and `nonstandard` output types) + * For eCash the `ecash:` prefix and format are used * `{:extended_key}` is the extended public key, possible formats are: * `xpub` (supported for all blockchains, example for Bitcoin: `xpub6CUGRUonZSQ4TWtTMmzXdrXDtypWKiKrhko4egpiMZbpiaQL2jkwSB1icqYh2cfDfVxdx4df189oLKnC5fSwqPfgyP3hooxujYzAu3fDVmz`, yields `p2pkh` addresses) * `ypub` (supported for Bitcoin, Litecoin, Groestlcoin, and Bitcoin Testnet only, example for Bitcoin: `ypub6XiW9nhToS1gjVsFKzgmtWZuqo6V1YY7xaCns37aR3oYhFyAsTehAqV1iW2UCNtgWFQFkz3aNSZZbkfe5d1tD8MzjZuFJQn2XnczsxtjoXr`, yields `p2sh` addresses) * `zpub` (supported for Bitcoin, Litecoin, Groestlcoin, and Bitcoin Testnet only, example for Bitcoin: `ypub6XiW9nhToS1gjVsFKzgmtWZuqo6V1YY7xaCns37aR3oYhFyAsTehAqV1iW2UCNtgWFQFkz3aNSZZbkfe5d1tD8MzjZuFJQn2XnczsxtjoXr`, yields `witness_v0_keyhash` addresses) Note that custom xpub formats (e.g. `ltub` for Litecoin) are not supported. - **Possible options:** @@ -2447,7 +2529,7 @@ This endpoint returns confirmed balances only. If address hasn't been seen on th **Where:** -- `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `zcash`, `bitcoin/testnet` +- `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `zcash`, `ecash`, `bitcoin/testnet` - `{:comma_separated_list}` is the comma-separated list of addresses (up to 25.000) **Example output:** @@ -2723,6 +2805,10 @@ If there's no `{:hash}ᵢ` has been found in the database, there won't be such k - `?effects=true` shows state changes for the transaction - `?trace_mempool=true` — this option tries to retrieve a list of internall calls for mempool transactions. In conjunction with `&erc_20=true` it also shows the list of ERC-20 transfers. This is an experimental feature. Please note that internal transfers may get invalidated when transaction gets confirmed. - `?assets_in_usd=true` — adds `value_usd_now` to all `layer_2.erc_20` items yielding the current (not at the moment of the transaction!) USD value of tokens (`null` if the price is unknown) +- `?events=true` — this option costs `1` additional request point to use. When enabled, it adds an array of event logs to the output. Every log contains `topics`, `data`, `contract`, `log_index`, and `decoded_event`. Depending on how much our API knows about the event signature, there are 3 detalization levels for `decoded_event` (example transaction with all 3: `https://api.blockchair.com/ethereum/dashboards/transaction/0x7d52cf58fe78403e8816dae6e900baff92b35760b4ed81cecd2590eafcde3dad?events=true`): + - Full data: `decoded_event` contains both the full event name with its argument names (`name_full`, example: `Approval(address owner, address spender, uint256 value)`), and the argument values in the `arguments` array; + - Partial data: only `name_with_types` is known (example: `Withdrawal(address, uint256)`), `arguments` yields `null`; + - No data: `decoded_event` yields `null`. **Output:** @@ -2870,7 +2956,7 @@ In case transaction is confirmed on the blockchain, `data.{:hash}ᵢ.transaction * `https://api.blockchair.com/{:eth_chain}/dashboards/transaction/{:hash}₀/priority` -For mempool transactions shows priority (`position`) by `gas_price` over other transactions (`out_of` mempool transactions). `position` is `null` if the transaction is not in the mempool. Cost: `1`. +For mempool transactions shows priority (`position`) by `gas_price` over other transactions (`out_of` mempool transactions). `position` is `null` if the transaction is not in the mempool. `eta_seconds` returns an approximate time for the transaction to confirm (in seconds, exprimental). Cost: `1`. **Request cost formula:** @@ -2878,6 +2964,7 @@ For mempool transactions shows priority (`position`) by `gas_price` over other t - `1 + (0.1 * (entity count - 1))` for `https://api.blockchair.com/{:eth_chain}/dashboards/transactions/{:hash}₀,...,{:hash}ᵩ` endpoint (e.g. it's `1 + (0.1 * (10 - 1)) = 1.9` for requesting 10 transactions) - Using `?erc_20=true` adds `1` for each requested transaction - Using `?effects=true` adds `1` for each requested transaction +- Using `?events=true` adds `1` for each requested transaction **Explore visualization on our front-end:** @@ -2907,6 +2994,8 @@ For mempool transactions shows priority (`position`) by `gas_price` over other t - `?nonce=true` — returns current account nonce (mempool transactions are taken in account) - `?output=type` — this option scrubs all the output data except for the address type (`account` or `contract`). This may be a very fast handy way to retrieve address type instead of requesting full address data - `?assets_in_usd=true` — adds `asset_balance_usd` to the output yielding the total USD value of all (excluding ETH) account assets (currently it's most popular ERC-20 tokens only), as well as `balance_usd` to all `layer_2.erc_20` items. If the exchange rate for a particular token is unknown, returns `null` for this token. +- `?state=latest` — if this option is enabled, `balance` will yield the confirmed balance, and the `calls` array won't include unconfirmed data +- `?contract_details=true` — if applied, it adds additional data on the address if it's a contract. At the moment, it works with ERC-20 contracts only yielding `token_name`, `token_symbol`, and `token_decimals`. It also yields some additional fields for all contracts: `creating_transaction_hash`, `creating_address`, and `creating_transaction_time`. The additional cost of using this option is `0.5` **Output:** @@ -3053,7 +3142,7 @@ Notes: **Request cost formula:** -- `1` + `1` for each of the options used: `?erc_20=true`, `?nonce=true` +- `1` + `1` for each of the options used: `?erc_20=true`, `?nonce=true` + `0.5` if the `?contract_details=true` option is used **Explore visualizations on our front-end:** @@ -3156,6 +3245,7 @@ Allows to retrieve the some basic information on an ERC-20 token. Note that this * `volume_24h` — the same in the token's smallest denomination (`volume_24h ≈ volume_24h_approximate * (10 ^ decimals )`) * `circulation_approximate` — circulating supply in the number of tokens * `circulation` — the same in the token's smallest denomination (`circulation ≈ circulation_approximate * (10 ^ decimals )`) +* `market_price_usd`, `market_price_btc`, and `market_cap_usd` for market data. `null`s are returned if there's no market data for the specified token **Example requests:** @@ -3174,12 +3264,15 @@ Allows to retrieve the some basic information on an ERC-20 token. Note that this "time": "2017-11-28 00:41:21", "creating_block_id": 4634748, "creating_transaction_hash": "0x2f1c5c2b44f771e942a8506148e256f94f1a464babc938ae0690c6e34cd79190", - "transactions": 32295106, - "transactions_24h": 206963, - "volume_24h_approximate": 1629851234.6590867, - "volume_24h": "1629851234659100", - "circulation": "5737970410922098", - "circulation_approximate": 5737970410.922098 + "transactions": 120789146, + "transactions_24h": 153043, + "volume_24h_approximate": 6941771405.5918045, + "volume_24h": "6941771405591800", + "circulation": "30910401959975130", + "circulation_approximate": 30910401959.97513, + "market_price_usd": 0.99923, + "market_price_btc": 0.000029490600005902663, + "market_cap_usd": 30886600950.465946 }, "context": { "code": 200, @@ -3484,7 +3577,7 @@ Retrieve raw information about various entities directly from our full nodes -## Raw data endpoints for Bitcoin-like blockchains (Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin, Zcash, Bitcoin Testnet) +## Raw data endpoints for Bitcoin-like blockchains (Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin, Zcash, eCash, Bitcoin Testnet) @@ -3499,7 +3592,7 @@ Returns raw block data directly from our full node. If the block is larger than **Where:** -- `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `zcash`, `bitcoin/testnet` +- `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `zcash`, `ecash`, `bitcoin/testnet` - `{:height}ᵢ` is the block height (integer value), also known as block id - `{:hash}ᵢ` is the block hash (regex: `/^[0-9a-f]{64}$/i`) @@ -3578,7 +3671,7 @@ Returns raw transaction data directly from our full node. **Where:** -- `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `zcash`, `bitcoin/testnet` +- `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `zcash`, `ecash`, `bitcoin/testnet` - `{:hash}ᵢ` is the transaction hash (regex: `/^[0-9a-f]{64}$/i`) **Output:** @@ -6836,7 +6929,7 @@ Just don't ask why do we call that `infinitables`… Infinite tables? Maybe. Where: -* `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `zcash`, or `bitcoin/testnet` +* `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `zcash`, `ecash`, or `bitcoin/testnet` * `{:eth_chain}` can be only `ethereum` * `{:xin_chain}` can be only `mixin` * `{:xtz_chain}` can be only `tezos` @@ -7016,7 +7109,7 @@ There's also a special `?aq=` section which have the following format: `?aq={:i} If you use the `?a=` section, the default limit is 10000 instead of 10. -It's possible to export aggregated data to TSV or CSV format using `&export=tsv` or `&export=csv` accordingly. Example: `https://api.blockchair.com/bitcoin/transactions?a=date,avg(fee_usd)&q=time(2019-01-01..2019-04-01)&export=tsv`. This feature is available on Premium API plans with export functions only. Unlike when not using aggragating, this doesn't require listing the fields to export. +It's possible to export aggregated data to TSV or CSV format using `&export=tsv` or `&export=csv` accordingly. Example: `https://api.blockchair.com/bitcoin/transactions?a=date,avg(fee_usd)&q=time(2019-01-01..2019-04-01)&export=tsv`. Please note that data export is only available for aggregated data. If you need to export the whole table or its part, please use [Database dumps](https://blockchair.com/dumps#database). *Warning*: the `f({:expression})` special function, the `?aq=` section, and TSV/CSV export are currently in alpha stage on our platform. Special function `price({:ticker1}_{:ticker2})` can't be used within special function `f({:expression})`. There are some known issues when sorting if `f({:expression})` is present. There are some known issues when applying the `?aq=` section to inequality filters. @@ -7030,18 +7123,7 @@ The following requests return the same result: **Export data to TSV or CSV** -Some of our Premium API plans support export to TSV and CSV formats ignoring `?limit=` and `?offset=` sections (along with the max limit of 100 rows). In order to export, you should - -* Apply `&export=tsv` or `&export=csv` to the request -* List the necessary fields in `&fields=` separating them with commas - -Here's an example: `https://api.blockchair.com/bitcoin/blocks?q=time(2019-01)&export=tsv&fields=id,hash` — responds with a TSV file containing ids and hashes for blocks mined in January 2019 (4525 rows in total) - -To test this functionality, on the free plan we allow to export from `blocks` tables across the blockchains we support up to 1 million cells (rows * columns) at once. - -If you'd like to export entire tables without using filters — it's better to use our Database dumps feature instead of the API (see https://blockchair.com/dumps for documentation) - -*Warning*: this functionality is in beta stage. +Please use our Database dumps feature instead of the API (see https://blockchair.com/dumps for documentation) **Front-end visualizations** @@ -7073,6 +7155,7 @@ Applying a limit over the default multiplies the summed cost by `1 + 0.01 * numb | `{:eth_chain}/transactions` | `5` | | `{:eth_chain}/mempool/transactions` | `2` | | `{:eth_chain}/calls` | `10` | +| `{:eth_chain}/addresses` | `2` | | `{:xin_chain}/raw/snapshots` | `1` | | `{:xin_chain}/raw/mintings` | `1` | | `{:xin_chain}/raw/nodes` | `1` | @@ -7103,7 +7186,7 @@ There can also be synthetic columns which aren't shown in the response, but you -## Inifinitable endpoints for Bitcoin-like blockchains (Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin, Zcash, Bitcoin Testnet) +## Inifinitable endpoints for Bitcoin-like blockchains (Bitcoin, Bitcoin Cash, Litecoin, Bitcoin SV, Dogecoin, Dash, Groestlcoin, Zcash, eCash, Bitcoin Testnet) @@ -7115,7 +7198,7 @@ There can also be synthetic columns which aren't shown in the response, but you **Where:** -- `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `zcash`, `bitcoin/testnet` +- `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `zcash`, `ecash`, `bitcoin/testnet` - `{:query}` is the query against the table ([how to build a query](#link_05)) **Output:** @@ -7256,6 +7339,7 @@ See [request costs for infinitables](#link_05) - https://blockchair.com/dash/blocks - https://blockchair.com/groestlcoin/blocks - https://blockchair.com/zcash/blocks +- https://blockchair.com/ecash/blocks - https://blockchair.com/bitcoin/testnet/blocks @@ -7269,7 +7353,7 @@ See [request costs for infinitables](#link_05) **Where:** -- `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `zcash`, `bitcoin/testnet` +- `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `zcash`, `ecash`, `bitcoin/testnet` - `{:query}` is the query against the table ([how to build a query](#link_05)) **Output:** @@ -7395,6 +7479,7 @@ See [request costs for infinitables](#link_05) - https://blockchair.com/dash/transactions - https://blockchair.com/groestlcoin/transactions - https://blockchair.com/zcash/transactions +- https://blockchair.com/ecash/transactions - https://blockchair.com/bitcoin/testnet/transactions - https://blockchair.com/bitcoin/mempool/transactions - https://blockchair.com/bitcoin-cash/mempool/transactions @@ -7404,6 +7489,7 @@ See [request costs for infinitables](#link_05) - https://blockchair.com/dash/mempool/transactions - https://blockchair.com/groestlcoin/mempool/transactions - https://blockchair.com/zcash/mempool/transactions +- https://blockchair.com/ecash/mempool/transactions - https://blockchair.com/bitcoin/testnet/mempool/transactions @@ -7418,7 +7504,7 @@ See [request costs for infinitables](#link_05) **Where:** -- `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `zcash`, `bitcoin/testnet` +- `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `zcash`, `ecash`, `bitcoin/testnet` - `{:query}` is the query against the table ([how to build a query](#link_05)) **Output:** @@ -7602,7 +7688,7 @@ See [request costs for infinitables](#link_05) **Where:** -- `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `zcash`, `bitcoin/testnet` +- `{:btc_chain}` can be one of these: `bitcoin`, `bitcoin-cash`, `litecoin`, `bitcoin-sv`, `dogecoin`, `dash`, `groestlcoin`, `zcash`, `ecash`, `bitcoin/testnet` - `{:query}` is the query against the table ([how to build a query](#link_05)) **Output:** @@ -7740,8 +7826,6 @@ See [request costs for infinitables](#link_05) ## Inifinitable endpoints for Ethereum and Ethereum Goerli Testnet -Please note that unlike with Bitcoin-like chains, where we populate our databases synchronically (block after block as there's the UTXO model used), for Ethereum we use asynchronous process, thus it's possible that for some brief period of time there will be information about block `n`, but there may not be for block `n-1` and further. - ### `blocks` table @@ -8232,6 +8316,164 @@ See [request costs for infinitables](#link_05) +### `addresses` view + +**Endpoints:** + +- `https://api.blockchair.com/{:eth_chain}/addresses?{:query}` + +**Where:** + +- `{:eth_chain}` can only be: `ethereum` or `ethereum/testnet` +- `{:query}` is the query against the table ([how to build a query](#link_05)) + +**Output:** + +The `addresses` view contains the list of all addresses and their confirmed balances. Unlike other infinitables (`blocks`, `transactions`, `outputs`) this table isn't live, it's automatically updated **every day** with new data, thus we classify it as a "view". `data` contains an array of database rows. Each row is in the following format: + +| Column | Type | Description | Q? | S? | A? | C? | +| ----------- | ------------------------- | -------------------------------------------------- | ---- | ---- | ---- | ---- | +| address | string `0x[0-9a-zA-Z\-]*` | Ethereum account or contract address | | | | | +| balance | numeric string | Its balance | `*` | `+` | | `+` | +| nonce | int | Its nonce value | `*` | `+` | | `+` | +| is_contract | boolean | Is it a contract (`true`) or an account (`false`)? | `=` | | `+` | | + +Notes: + +- the default sorting — `balance DESC` + +**Example outputs:** + +`https://api.blockchair.com/ethereum/addresses`: + +```json +{ + "data": [ + { + "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + "balance": "6693912559400585982377984", + "nonce": 1, + "is_contract": true + }, + { + "address": "0x00000000219ab540356cbb839cbe05303d7705fa", + "balance": "6232610000069000205172736", + "nonce": 1, + "is_contract": true + }, + { + "address": "0xbe0eb53f46cd790cd13851d5eff43d12404d33e8", + "balance": "2296896558056344842665984", + "nonce": 865, + "is_contract": false + }, + { + "address": "0x53d284357ec70ce289d6d64134dfac8e511c8a3d", + "balance": "1378734066321521433903104", + "nonce": 4, + "is_contract": false + }, + { + "address": "0x61edcdf5bb737adffe5043706e7c5bb1f1a56eea", + "balance": "1189498953581339986624512", + "nonce": 0, + "is_contract": true + }, + { + "address": "0x4ddc2d193948926d02f9b1fe9e1daa0718270ed5", + "balance": "1146177206209739021615104", + "nonce": 1, + "is_contract": true + }, + { + "address": "0xdf9eb223bafbe5c5271415c75aecd68c21fe3d7f", + "balance": "988648154664867412836352", + "nonce": 1, + "is_contract": true + }, + { + "address": "0xc61b9bb3a7a0767e3179713f3a5c7a9aedce193c", + "balance": "800010760463680857440256", + "nonce": 1, + "is_contract": true + }, + { + "address": "0x8484ef722627bf18ca5ae6bcf031c23e6e922b30", + "balance": "755009999245592554897408", + "nonce": 1, + "is_contract": true + }, + { + "address": "0x07ee55aa48bb72dcc6e9d78256648910de513eca", + "balance": "681241111484627083591680", + "nonce": 0, + "is_contract": true + } + ], + "context": { + "code": 200, + "source": "A", + "limit": 10, + "offset": 0, + "rows": 10, + "total_rows": 121050742, + "state": 12787924, + "state_layer_2": 12787924, + ... + } +} +``` + +`https://api.blockchair.com/ethereum/addresses?q=balance(1000000..)&a=count()` (counts the number of addresses hodling more than 1M ether): + +```json +{ + "data": [ + { + "count()": 6 + } + ], + "context": { + "code": 200, + ... + } +} +``` + +`https://api.blockchair.com/ethereum/addresses?a=is_contract,count()` (counts accounts and contracts): + +```json +{ + "data": [ + { + "is_contract": false, + "count()": 103337709 + }, + { + "is_contract": true, + "count()": 17713033 + } + ], + "context": { + "code": 200, + ... + } +} +``` + +**Request cost formula:** + +See [request costs for infinitables](#link_05) + +**Explore visualizations on our front-end:** + +- https://blockchair.com/ethereum/addresses +- https://blockchair.com/ethereum/testnet/addresses + + + + + ## Inifinitable endpoints for Mixin Please note that our Mixin API outputs raw node data for these endpoints. From 353e922a48b28fb3cb2aff280d1f5eb369971d53 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Mon, 12 Jul 2021 13:30:30 +0300 Subject: [PATCH 166/180] v.2.0.81 --- API.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/API.md b/API.md index 67360089..d12a184e 100644 --- a/API.md +++ b/API.md @@ -26,6 +26,10 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.81 - July 12th, 2021 + * Infinitable enhancements: + * Intervals are now available for querying time columns. Example usage: `https://api.blockchair.com/bitcoin/blocks?q=time(~P1D)&a=count()` counts the number of blocks over the last 24 hours, `https://api.blockchair.com/ethereum/mempool/transactions?q=time(~PT30S)` lists transactions that were included to the Ethereum mempool for the last 30 seconds. Previously users were required to set the interval manually (e.g. `?q=time(2021-07-11 07:58:58..2021-07-12 07:58:58)`). The format is format is an ISO 8601 Duration. + * New aggregation functions to calculate running totals: `runningcount()`, `runningsum({:column})`, `runningavg({:column})`, `runningmedian({:column})`, `runningmin({:column})`, `runningmax({:column})`. Example usage: `https://api.blockchair.com/bitcoin/blocks?a=month,sum(size),runningsum(size)` calculates the blockchain size, `https://api.blockchair.com/bitcoin/blocks?a=date,avg(size),runningavg(size)` calculates the running average for block size, `https://api.blockchair.com/bitcoin/blocks?a=year,count(),runningcount()` calculates the number of blocks by the end of each year since 2009 * v.2.0.80 - July 8th, 2021 * Database dumps now feature Ethereum addresses, ERC-20 tokens, ERC-20 transfers, Zcash blocks, Zcash transactions, Zcash outputs, Zcash inputs, and Zcash addresses (transparent): https://gz.blockchair.com * There's a new `addresses` infinitable for Ethereum: `https://api.blockchair.com/ethereum/addresses`. The columns are: `address`, `balance`, `nonce`, `is_contract`. The default sort is by balance descending. Unlike with Bitocin-like `addresses` infinitables which are updated once every 5 minutes, this infinitable is only updated once a day. The documentation is available here: https://blockchair.com/api/docs#link_310. Some cool examples: From 425be528899d9094a9b36f9ceef01c637ba91948 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Fri, 30 Jul 2021 20:26:00 +0300 Subject: [PATCH 167/180] v.2.0.82 --- API.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/API.md b/API.md index d12a184e..00092513 100644 --- a/API.md +++ b/API.md @@ -26,10 +26,16 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.82 - July 30th, 2021 + * Now it's possible to broadcast Cardano transactions using the `https://api.blockchair.com/cardano/push/transaction` endpoint + * Despite the request cost formulas for infinitables have been set in the documentation since July 19th, 2020, they haven't been effective, and every request to inifintables always cost 1 point. Now the formulas are respected. + * Fixed a bug with the `https://api.blockchair.com/{:btc_chain}/addresses` infinitable where some balances weren't returned correctly + * Fixed a bug with the `https://api.blockchair.com/{:btc_chain}/addresses/balances?addresses={:list}` endpoint where some balances weren't calculated correctly + * Fixed some bugs with eCash * v.2.0.81 - July 12th, 2021 * Infinitable enhancements: - * Intervals are now available for querying time columns. Example usage: `https://api.blockchair.com/bitcoin/blocks?q=time(~P1D)&a=count()` counts the number of blocks over the last 24 hours, `https://api.blockchair.com/ethereum/mempool/transactions?q=time(~PT30S)` lists transactions that were included to the Ethereum mempool for the last 30 seconds. Previously users were required to set the interval manually (e.g. `?q=time(2021-07-11 07:58:58..2021-07-12 07:58:58)`). The format is format is an ISO 8601 Duration. - * New aggregation functions to calculate running totals: `runningcount()`, `runningsum({:column})`, `runningavg({:column})`, `runningmedian({:column})`, `runningmin({:column})`, `runningmax({:column})`. Example usage: `https://api.blockchair.com/bitcoin/blocks?a=month,sum(size),runningsum(size)` calculates the blockchain size, `https://api.blockchair.com/bitcoin/blocks?a=date,avg(size),runningavg(size)` calculates the running average for block size, `https://api.blockchair.com/bitcoin/blocks?a=year,count(),runningcount()` calculates the number of blocks by the end of each year since 2009 + * Intervals are now available for querying time columns. Example usage: `https://api.blockchair.com/bitcoin/blocks?q=time(~P1D)&a=count()` counts the number of blocks over the last 24 hours, `https://api.blockchair.com/ethereum/mempool/transactions?q=time(~PT30S)` lists transactions that were included to the Ethereum mempool for the last 30 seconds. Previously users were required to set the interval manually (e.g. `?q=time(2021-07-11 07:58:58..2021-07-12 07:58:58)`). The format is an ISO 8601 Duration. + * New aggregation functions to calculate running totals: `runningcount()`, `runningsum({:column})`, `runningavg({:column})`, `runningmedian({:column})`, `runningmin({:column})`, `runningmax({:column})`. Example usage: `https://api.blockchair.com/bitcoin/blocks?a=month,sum(size),runningsum(size)` calculates the blockchain size, `https://api.blockchair.com/bitcoin/blocks?a=date,avg(size),runningavg(size)` calculates the running average for block size, `https://api.blockchair.com/bitcoin/blocks?a=year,count(),runningcount()` calculates the number of blocks by the end of each year since 2009. * v.2.0.80 - July 8th, 2021 * Database dumps now feature Ethereum addresses, ERC-20 tokens, ERC-20 transfers, Zcash blocks, Zcash transactions, Zcash outputs, Zcash inputs, and Zcash addresses (transparent): https://gz.blockchair.com * There's a new `addresses` infinitable for Ethereum: `https://api.blockchair.com/ethereum/addresses`. The columns are: `address`, `balance`, `nonce`, `is_contract`. The default sort is by balance descending. Unlike with Bitocin-like `addresses` infinitables which are updated once every 5 minutes, this infinitable is only updated once a day. The documentation is available here: https://blockchair.com/api/docs#link_310. Some cool examples: From df5460edccb4b43b75af7535e4ac1f26d95ccebc Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Fri, 6 Aug 2021 20:57:01 +0300 Subject: [PATCH 168/180] v.2.0.83 --- API.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/API.md b/API.md index 00092513..4ffbf20d 100644 --- a/API.md +++ b/API.md @@ -26,6 +26,24 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.83 - August 6th, 2021 + * Added support for the Ethereum London hard fork. New table fields (for Ethereum and Ethereum Goerli Testnet): + * Blocks: + * `base_fee_per_gas` (queryable, sortable, aggregatable). Average base fee per day example: `https://api.blockchair.com/ethereum/blocks?a=date,avg(base_fee_per_gas)&q=id(12965000..)` + * `burned_total` (queryable, sortable, aggregatable). Examples: + * Total ETH burned: `https://api.blockchair.com/ethereum/blocks?a=date,sum(burned_total)&q=id(12965000..)` + * Burned to minted ratio by day: `https://api.blockchair.com/ethereum/blocks?a=date,f(sum(burned_total)/sum(generation))&q=id(12965000..)` + * Uncles: + * `base_fee_per_gas` (queryable, sortable, aggregatable) + * Transactions: + * `effective_gas_price` (queryable, sortable, aggregatable) + * `max_fee_per_gas` (`null` for legacy transactions; queryable, sortable, aggregatable) + * `max_priority_fee_per_gas` (`null` for legacy transactions; queryable, sortable, aggregatable) + * `base_fee_per_gas` (base fee of the block; queryable, sortable, aggregatable) + * `burned` (calculated as `gas_used * base_fee_per_gas`; queryable, sortable, aggregatable) + * Added `burned` and `burned_24h` to the `https://api.blockchair.com/{:eth_chain}/stats` dashboard + * Added `version` field (queryable, aggregatable) to Ethereum transactions. `0` represents legacy transactions, `1` is for EIP-2718 transactions, `2` is for London transactions. In Ethereum terminology this is "type" instead of "version", but as we're already using "type" for another column, we decided to go with "version". Example: `https://api.blockchair.com/ethereum/transactions?a=version,count()&q=block_id(12965000..)`. Please note that for all transactions before block #12965000 it always returns `0`, even for EIP-2718 transactions: this will be fixed in one of the next updates. + * Added support for the Ethereum Berlin hard fork. Transactions now have an additional field called `type_2718` (queryable) that represents transaction type as outlined in [EIP-2718](https://eips.ethereum.org/EIPS/eip-2718) * v.2.0.82 - July 30th, 2021 * Now it's possible to broadcast Cardano transactions using the `https://api.blockchair.com/cardano/push/transaction` endpoint * Despite the request cost formulas for infinitables have been set in the documentation since July 19th, 2020, they haven't been effective, and every request to inifintables always cost 1 point. Now the formulas are respected. From ba8500a7354bc7e3b46927d345dbded4dd8edf09 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Mon, 9 Aug 2021 19:57:57 +0300 Subject: [PATCH 169/180] v.2.0.84 --- API.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/API.md b/API.md index 4ffbf20d..3dd08c08 100644 --- a/API.md +++ b/API.md @@ -26,6 +26,13 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.84 - August 9th, 2021 + * Enhancements to the Ethereum transaction dashboard (`https://api.blockchair.com/{:eth_chain}/dashboards/transaction/{:hash}`) for unconfirmed transactions. Please note that these values are not final and may change as transactions get confirmed: tracing unconfirmed transactions doesn't take possible changes to the state into account. + * If the `?events=true` option is used, API returns values for `gas_used`, `fee`, `fee_usd` instead of `null`s + * If the `?trace_mempool=true` option is used, API returns values for `internal_value` and `internal_value_usd` instead of `null`s + * API still always returns `null` for `failed` + * There's a new option for the Ethereum address dashboard (`https://api.blockchair.com/{:eth_chain}/dashboards/address/{:address}`): `?transactions_instead_of_calls=true`. If applied, it returns the list of latest transaction hashes in the `transactions` array instead of returning the `calls` array. An important difference is that ERC-20 transfers that weren't previously included in the `calls` array will be among `transactions`. This option also affects `transaction_count` behaviour: if enabled, it returns the transaction count for an address which takes ERC-20 transfers into account. Using this option costs `2`. The option has no effect on contracts (i.e. for contracts the `calls` array will be returned even if the option is enabled). + * The Ethereum stats dashboard (`https://api.blockchair.com/{:eth_chain}/stats`) now also outputs `addresses` yielding the total number of addresses (including both accounts and contracts) ever seen on chain. * v.2.0.83 - August 6th, 2021 * Added support for the Ethereum London hard fork. New table fields (for Ethereum and Ethereum Goerli Testnet): * Blocks: From 7a2e988119cb2c07db45d58b172d7d7227268a91 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Wed, 18 Aug 2021 03:45:24 +0300 Subject: [PATCH 170/180] v.2.0.85 --- API.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/API.md b/API.md index 3dd08c08..9de52da3 100644 --- a/API.md +++ b/API.md @@ -26,6 +26,12 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.85 - August 18th, 2021 + * New hashrate dashboard for all Bitcoin-like and Ethereum-like chains: `https://api.blockchair.com/{:chain}/dashboards/hashrate` that outputs the estimated hashrate by day. Example: `https://api.blockchair.com/bitcoin/dashboards/hashrate`. + * New difficulty dashboard for Bitcoin: `https://api.blockchair.com/bitcoin/dashboards/difficulty`. It outputs: + * All completed difficulty "periods" (2016 blocks each). `status` is `completed`, `hashrate` is the estimated average hashrate within the period, `avg_block_time` is the average time between blocks in seconds + * The current difficulty period. `status` is `ongoing` + * The next difficulty period. `status` is `planned`, `start_time` is the estimated time when the period will start based on the current hashrate and the number of blocks left in the current period, `difficulty` is the estimated difficulty for the next period, `hashrate` is the same as for the current period, `avg_block_time` is always `600` (10 minutes) as it's the target time between blocks * v.2.0.84 - August 9th, 2021 * Enhancements to the Ethereum transaction dashboard (`https://api.blockchair.com/{:eth_chain}/dashboards/transaction/{:hash}`) for unconfirmed transactions. Please note that these values are not final and may change as transactions get confirmed: tracing unconfirmed transactions doesn't take possible changes to the state into account. * If the `?events=true` option is used, API returns values for `gas_used`, `fee`, `fee_usd` instead of `null`s From ea403a59926c48a88efea17be41a9613d0a6af04 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Thu, 19 Aug 2021 15:41:57 +0300 Subject: [PATCH 171/180] v.2.0.86 --- API.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/API.md b/API.md index 9de52da3..01957c15 100644 --- a/API.md +++ b/API.md @@ -26,6 +26,8 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.86 - August 19th, 2021 + * Error code `435` is now returned if you're using an API key and going over the maximum requests in parallel limit. By default, the limit is `daily_request_limit / 10000` request points. Also, by default, it is not enforced: it only comes into effect if our security system notices that your requests significantly overload our servers on a constant basis. This limit **supersedes** the 5 requests per second limit for premium API plans (which was also not enforced automatically). Example: if you're on a 5000 requests per day plan and do some daily calculations like fetching xpub balances right after the midnight, please try doing this in 2-3 app instances in parallel instead of spawning 1000 instances trying to complete the process in 10 seconds. * v.2.0.85 - August 18th, 2021 * New hashrate dashboard for all Bitcoin-like and Ethereum-like chains: `https://api.blockchair.com/{:chain}/dashboards/hashrate` that outputs the estimated hashrate by day. Example: `https://api.blockchair.com/bitcoin/dashboards/hashrate`. * New difficulty dashboard for Bitcoin: `https://api.blockchair.com/bitcoin/dashboards/difficulty`. It outputs: From dbd5d504864c2c687ae943029434cc1a89485bd3 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Fri, 20 Aug 2021 15:16:12 +0300 Subject: [PATCH 172/180] v.2.0.87 --- API.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/API.md b/API.md index 01957c15..95560530 100644 --- a/API.md +++ b/API.md @@ -26,6 +26,16 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.87 - August 20th, 2021 + * For all API requests, the `context` array now yields `market_price_usd` value. It contains the current USD price of the blockchain's main token in request. E.g. all `https://api.blockchair.com/zcash/...` requests show ZEC price in `context.market_price_usd`. For Ethereum, it's always the ETH price, even if some token data is requested. This change also deprecates `context.price_usd` for EOS and Tezos in favour of `context.market_price_usd`. + * New `number({:n})` function for aggregations that returns a number. It may be useful when you are too lazy to divide some values on your side, for example, when you're calculating the average interval between blocks in seconds: `https://api.blockchair.com/bitcoin/blocks?a=date,f(number(86400)/count())`. Our API can now also serve as your calculator for any needs: `https://api.blockchair.com/bitcoin/blocks?a=f(number(2)*number(2))&limit=1` returns `4`. + * Tweaked `suggested_transaction_fee_per_byte_sat` for Dogecoin (in `https://api.blockchair.com/dogecoin/stats`) to honour the minimum fee of 1 DOGE per transaction + * The following Ethereum endpoints are now also available for Ethereum Goerli Testnet: + * `https://api.blockchair.com/ethereum/testnet/raw/block/{:id|hash}` + * `https://api.blockchair.com/ethereum/testnet/raw/transaction/{:hash}` + * `https://api.blockchair.com/ethereum/testnet/push/transaction` + * `https://api.blockchair.com/ethereum/testnet/addresses` + * `https://api.blockchair.com/ethereum/testnet/state/changes/block/{:id}` * v.2.0.86 - August 19th, 2021 * Error code `435` is now returned if you're using an API key and going over the maximum requests in parallel limit. By default, the limit is `daily_request_limit / 10000` request points. Also, by default, it is not enforced: it only comes into effect if our security system notices that your requests significantly overload our servers on a constant basis. This limit **supersedes** the 5 requests per second limit for premium API plans (which was also not enforced automatically). Example: if you're on a 5000 requests per day plan and do some daily calculations like fetching xpub balances right after the midnight, please try doing this in 2-3 app instances in parallel instead of spawning 1000 instances trying to complete the process in 10 seconds. * v.2.0.85 - August 18th, 2021 From 64cff8feed9139f9aa88edbe6bddf195fbdd6cb3 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Mon, 23 Aug 2021 20:30:39 +0300 Subject: [PATCH 173/180] v.2.0.88 --- API.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/API.md b/API.md index 95560530..e001faa0 100644 --- a/API.md +++ b/API.md @@ -26,6 +26,10 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.88 - August 23rd, 2021 + * Added basic SLP support for Bitcoin Cash. New endpoints and options: + * `https://api.blockchair.com/bitcoin-cash/stats` now yields statistical data on SLP in the `layer_2.slp` array: `tokens` is the total number of SLP tokens, `transactions` - the total number of SLP transfers, `tokens_24h` - new SLP tokens over the last 24 hours, `transactions_24h` - token transfers over the last 24 hours + * Find SLP transfers inside of a transaction: `https://api.blockchair.com/bitcoin-cash/dashboards/transaction/{:hash}?slp=true`. Example: `https://api.blockchair.com/bitcoin-cash/dashboards/transaction/ca851afc516f6d1488924f4a064abdd8b82b45bc8a5890bee8aba58a1314f498?slp=true` (valid `SEND` transaction), `https://api.blockchair.com/bitcoin-cash/dashboards/transaction/71b31ecaf916fe2da690a61c45978542a654185caba643c3eda2a87f38f88d31?slp=true` (invalid `MINT` transaction`) * v.2.0.87 - August 20th, 2021 * For all API requests, the `context` array now yields `market_price_usd` value. It contains the current USD price of the blockchain's main token in request. E.g. all `https://api.blockchair.com/zcash/...` requests show ZEC price in `context.market_price_usd`. For Ethereum, it's always the ETH price, even if some token data is requested. This change also deprecates `context.price_usd` for EOS and Tezos in favour of `context.market_price_usd`. * New `number({:n})` function for aggregations that returns a number. It may be useful when you are too lazy to divide some values on your side, for example, when you're calculating the average interval between blocks in seconds: `https://api.blockchair.com/bitcoin/blocks?a=date,f(number(86400)/count())`. Our API can now also serve as your calculator for any needs: `https://api.blockchair.com/bitcoin/blocks?a=f(number(2)*number(2))&limit=1` returns `4`. From a72c5a45b5d823fc2cff7b8393539c1768b43034 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Mon, 18 Oct 2021 18:31:14 +0300 Subject: [PATCH 174/180] v.2.0.89 --- API.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/API.md b/API.md index e001faa0..6423a0cc 100644 --- a/API.md +++ b/API.md @@ -26,6 +26,19 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.89 - October 18th, 2021 + * Added ERC-721 support for Ethereum. New endpoints and options: + * `https://api.blockchair.com/ethereum/erc-721/tokens` infinitable (the output is the same as for ERC-20 except for there's no `decimals`). + * `https://api.blockchair.com/ethereum/erc-721/transactions` infinitable (also no `token_decimals`, and `token_id` is used instead of `value` Examples: + * Find most used contracts over the last month: `https://api.blockchair.com/ethereum/erc-721/transactions?q=time(~P1M)&a=token_address,token_name,count()&s=count()(desc)&limit=10` + * Owner change history by token id: `https://api.blockchair.com/ethereum/erc-721/transactions?q=token_address(0xbd3531da5cf5857e7cfaa92426877b022e612cf8),token_id(5177)` + * Find tokens that changed hands many times: `https://api.blockchair.com/ethereum/erc-721/transactions?a=token_address,token_id,count()&s=count()(desc)&limit=10` + * `https://api.blockchair.com/ethereum/stats` now yields statistical data on ERC-721s in the `layer_2.erc_721` array: `tokens` is the total number of NFTs, `transactions` - the total number of transfers, `tokens_24h` - new NFTs over the last 24 hours, `transactions_24h` - token transfers over the last 24 hours + * Find ERC-721 transfers inside of a transaction: `https://api.blockchair.com/ethereum/dashboards/transaction/{:hash}?erc_721=true`. Example: `https://api.blockchair.com/ethereum/dashboards/transaction/0x6e7dbd3e3835f5c08ac8a0e26216df17e9aa9d1b6956fc9f0c56c19a085ad888?erc_721=true` + * List ERC-721 tokens for an address: `https://api.blockchair.com/ethereum/dashboards/address/{:address}?erc_721=true`. Example: `https://api.blockchair.com/ethereum/dashboards/address/0x943a48498c9d622273e214c1757e436f76a113ce?erc_721=true&limit=0`. This option lists token ids + * ERC-721 contract dashboard: `https://api.blockchair.com/ethereum/erc-721/{:address}/stats`. Example: `https://api.blockchair.com/ethereum/erc-721/0x1dfe7ca09e99d10835bf73044a23b73fc20623df/stats` + * ERC-721 contract inventory (token list): `https://api.blockchair.com/ethereum/erc-721/{:address}/inventory`. Available params: `?limit={:limit}` and `?offset={:offset}`. Example: `https://api.blockchair.com/ethereum/erc-721/0x2E956Ed3D7337F4Ed4316A6e8F2EdF74BF84bb54/inventory?limit=100&offset=100`. The list returns `transaction_count`, `first_time` (creation time), `last_time` (last ownership change time), `first_owner`, and `last_owner` (current owner). + * Please note that some of popular NFTs may either not follow the ERC-721 standard at all or follow the ERC-20 standard instead. In the first case, our API won't return any data for such NFTs. In the second case, such contracts will be treated as ERC-20s. ERC-721 functionality is launched in beta mode, it's possible there will be compatibility-breaking changes. This functionality is available for the Goerli Testnet as well. * v.2.0.88 - August 23rd, 2021 * Added basic SLP support for Bitcoin Cash. New endpoints and options: * `https://api.blockchair.com/bitcoin-cash/stats` now yields statistical data on SLP in the `layer_2.slp` array: `tokens` is the total number of SLP tokens, `transactions` - the total number of SLP transfers, `tokens_24h` - new SLP tokens over the last 24 hours, `transactions_24h` - token transfers over the last 24 hours From a6812a595a691d7a2cbfa65a3edadda9a6a0828d Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Sun, 24 Oct 2021 20:56:25 +0300 Subject: [PATCH 175/180] v.2.0.90 --- API.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/API.md b/API.md index 6423a0cc..8b66e4da 100644 --- a/API.md +++ b/API.md @@ -26,6 +26,9 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.90 - October 24th, 2021 + * ERC-20 and ERC-721 transfers are now ordered within transactions as they were executed + * Added `?offset={:offset}` option to the Cardano address endpoint (`https://api.blockchair.com/{:ada_chain}/raw/address/{:address}₀`) that allows to paginate the list of latest transactions * v.2.0.89 - October 18th, 2021 * Added ERC-721 support for Ethereum. New endpoints and options: * `https://api.blockchair.com/ethereum/erc-721/tokens` infinitable (the output is the same as for ERC-20 except for there's no `decimals`). From 517627ed25ca91a78c14fdf895057e94fb91f7df Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Wed, 10 Nov 2021 22:34:44 +0300 Subject: [PATCH 176/180] v.2.0.91 --- API.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/API.md b/API.md index 8b66e4da..30302200 100644 --- a/API.md +++ b/API.md @@ -26,6 +26,17 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.91 - November 10th, 2021 + * Added Polkadot support in beta mode. New endpoints: + * `https://api.blockchair.com/polkadot/stats` (+ `https://api.blockchair.com/stats` now also features Polkadot) + * `https://api.blockchair.com/polkadot/raw/block/{:id}` + * `https://api.blockchair.com/polkadot/raw/block/{:hash}` + * `https://api.blockchair.com/polkadot/raw/extrinsic/{:id}` + * `https://api.blockchair.com/polkadot/raw/extrinsic/{:hash}` + * `https://api.blockchair.com/polkadot/raw/address/{:address}` (with `?offset={:offset} option to iterate through the latest extrinsics and transfers) + * `https://api.blockchair.com/polkadot/raw/blocks` (an infinitable with `?offset={:offset} option) + * `https://api.blockchair.com/polkadot/raw/extrinsics` (an infinitable with `?offset={:offset} option) + * `https://api.blockchair.com/polkadot/raw/events` (an infinitable with `?offset={:offset} option) * v.2.0.90 - October 24th, 2021 * ERC-20 and ERC-721 transfers are now ordered within transactions as they were executed * Added `?offset={:offset}` option to the Cardano address endpoint (`https://api.blockchair.com/{:ada_chain}/raw/address/{:address}₀`) that allows to paginate the list of latest transactions From c385d30e5490420771a1534ea1d2a22ad4b10173 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Thu, 11 Nov 2021 18:38:27 +0300 Subject: [PATCH 177/180] v.2.0.92 --- API.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/API.md b/API.md index 30302200..53534296 100644 --- a/API.md +++ b/API.md @@ -26,6 +26,10 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.92 - November 11th, 2021 + * Added Taproot support for Bitcoin, Groestlcoin, and Bitcoin Testnet: + * Taproot scripts now convert to P2TR addresses (some older outputs that came before according activation dates may be reindexed a bit later) + * `outputs.type` column can now yield and accept `witness_v1_taproot` type. Example: `https://api.blockchair.com/bitcoin/testnet/outputs?q=type(witness_v1_taproot)` * v.2.0.91 - November 10th, 2021 * Added Polkadot support in beta mode. New endpoints: * `https://api.blockchair.com/polkadot/stats` (+ `https://api.blockchair.com/stats` now also features Polkadot) From 95bec7d7c06a479095edbd838b79ca3fe1c96589 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Wed, 17 Nov 2021 22:18:49 +0300 Subject: [PATCH 178/180] v.2.0.93 --- API.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/API.md b/API.md index 53534296..8a85e56b 100644 --- a/API.md +++ b/API.md @@ -26,6 +26,13 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.93 - November 17th, 2021 + * Added support for almost 200 fiat currencies and precious metals with exchange rates going back to 2009. + * All API endpoints now support the `?rates={:code}` option. If enabled, it adds extra data for the chosen currency code on top of where USD data is already available. Example: `https://api.blockchair.com/bitcoin/stats?rates=kzt` adds `average_transaction_fee_kzt_24h`. For historical data (example: `https://api.blockchair.com/bitcoin/dashboards/block/500000?rates=kzt`) it honors historical exchange rates. + * The supported fiat currencies are: `AED` (United Arab Emirates Dirham), `AFN` (Afghan Afghani), `ALL` (Albanian Lek), `AMD` (Armenian Dram), `ANG` (Netherlands Antillean Guilder), `AOA` (Angolan Kwanza), `ARS` (Argentine Peso), `AUD` (Australian Dollar), `AWG` (Aruban Florin), `AZN` (Azerbaijani Manat), `BAM` (Bosnia-Herzegovina Convertible Mark), `BBD` (Barbadian Dollar), `BDT` (Bangladeshi Taka), `BGN` (Bulgarian Lev), `BHD` (Bahraini Dinar), `BIF` (Burundian Franc), `BMD` (Bermudan Dollar), `BND` (Brunei Dollar), `BOB` (Bolivian Boliviano), `BRL` (Brazilian Real), `BSD` (Bahamian Dollar), `BTN` (Bhutanese Ngultrum), `BWP` (Botswanan Pula), `BYN` (Belarusian Ruble), `BZD` (Belize Dollar), `CAD` (Canadian Dollar), `CDF` (Congolese Franc), `CHF` (Swiss Franc), `CLF` (Chilean Unit of Account (UF)), `CLP` (Chilean Peso), `CNH` (Chinese Yuan (Offshore)), `CNY` (Chinese Yuan), `COP` (Colombian Peso), `CRC` (Costa Rican Colón), `CUC` (Cuban Convertible Peso), `CUP` (Cuban Peso), `CVE` (Cape Verdean Escudo), `CZK` (Czech Republic Koruna), `DJF` (Djiboutian Franc), `DKK` (Danish Krone), `DOP` (Dominican Peso), `DZD` (Algerian Dinar), `EGP` (Egyptian Pound), `ERN` (Eritrean Nakfa), `ETB` (Ethiopian Birr), `EUR` (Euro), `FJD` (Fijian Dollar), `FKP` (Falkland Islands Pound), `GBP` (British Pound Sterling), `GEL` (Georgian Lari), `GGP` (Guernsey Pound), `GHS` (Ghanaian Cedi), `GIP` (Gibraltar Pound), `GMD` (Gambian Dalasi), `GNF` (Guinean Franc), `GTQ` (Guatemalan Quetzal), `GYD` (Guyanaese Dollar), `HKD` (Hong Kong Dollar), `HNL` (Honduran Lempira), `HRK` (Croatian Kuna), `HTG` (Haitian Gourde), `HUF` (Hungarian Forint), `IDR` (Indonesian Rupiah), `ILS` (Israeli New Sheqel), `IMP` (Manx pound), `INR` (Indian Rupee), `IQD` (Iraqi Dinar), `IRR` (Iranian Rial), `ISK` (Icelandic Króna), `JEP` (Jersey Pound), `JMD` (Jamaican Dollar), `JOD` (Jordanian Dinar), `JPY` (Japanese Yen), `KES` (Kenyan Shilling), `KGS` (Kyrgystani Som), `KHR` (Cambodian Riel), `KMF` (Comorian Franc), `KPW` (North Korean Won), `KRW` (South Korean Won), `KWD` (Kuwaiti Dinar), `KYD` (Cayman Islands Dollar), `KZT` (Kazakhstani Tenge), `LAK` (Laotian Kip), `LBP` (Lebanese Pound), `LKR` (Sri Lankan Rupee), `LRD` (Liberian Dollar), `LSL` (Lesotho Loti), `LYD` (Libyan Dinar), `MAD` (Moroccan Dirham), `MDL` (Moldovan Leu), `MGA` (Malagasy Ariary), `MKD` (Macedonian Denar), `MMK` (Myanma Kyat), `MNT` (Mongolian Tugrik), `MOP` (Macanese Pataca), `MRO` (Mauritanian Ouguiya (pre-2018)), `MRU` (Mauritanian Ouguiya), `MUR` (Mauritian Rupee), `MVR` (Maldivian Rufiyaa), `MWK` (Malawian Kwacha), `MXN` (Mexican Peso), `MYR` (Malaysian Ringgit), `MZN` (Mozambican Metical), `NAD` (Namibian Dollar), `NGN` (Nigerian Naira), `NIO` (Nicaraguan Córdoba), `NOK` (Norwegian Krone), `NPR` (Nepalese Rupee), `NZD` (New Zealand Dollar), `OMR` (Omani Rial), `PAB` (Panamanian Balboa), `PEN` (Peruvian Nuevo Sol), `PGK` (Papua New Guinean Kina), `PHP` (Philippine Peso), `PKR` (Pakistani Rupee), `PLN` (Polish Zloty), `PYG` (Paraguayan Guarani), `QAR` (Qatari Rial), `RON` (Romanian Leu), `RSD` (Serbian Dinar), `RUB` (Russian Ruble), `RWF` (Rwandan Franc), `SAR` (Saudi Riyal), `SBD` (Solomon Islands Dollar), `SCR` (Seychellois Rupee), `SDG` (Sudanese Pound), `SEK` (Swedish Krona), `SGD` (Singapore Dollar), `SHP` (Saint Helena Pound), `SLL` (Sierra Leonean Leone), `SOS` (Somali Shilling), `SRD` (Surinamese Dollar), `SSP` (South Sudanese Pound), `STD` (São Tomé and Príncipe Dobra (pre-2018)), `STN` (São Tomé and Príncipe Dobra), `SVC` (Salvadoran Colón), `SYP` (Syrian Pound), `SZL` (Swazi Lilangeni), `THB` (Thai Baht), `TJS` (Tajikistani Somoni), `TMT` (Turkmenistani Manat), `TND` (Tunisian Dinar), `TOP` (Tongan Pa'anga), `TRY` (Turkish Lira), `TTD` (Trinidad and Tobago Dollar), `TWD` (New Taiwan Dollar), `TZS` (Tanzanian Shilling), `UAH` (Ukrainian Hryvnia), `UGX` (Ugandan Shilling), `UYU` (Uruguayan Peso), `UZS` (Uzbekistan Som), `VEF` (Venezuelan Bolívar Fuerte (Old)), `VES` (Venezuelan Bolívar Soberano), `VND` (Vietnamese Dong), `VUV` (Vanuatu Vatu), `WST` (Samoan Tala), `XCD` (East Caribbean Dollar), `XPF` (CFP Franc), `YER` (Yemeni Rial), `ZAR` (South African Rand), `ZMW` (Zambian Kwacha), `ZWL` (Zimbabwean Dollar) + * The precious metals are: `XAG` (Silver Ounce), `XAU` (Gold Ounce), `XPD` (Palladium Ounce) `XPT` (Platinum Ounce) + * The cryptocurrencies are: `BTC` (Bitcoin), `ETH` (Ethereum) + * Note that `?rates=USD` is not supported and will result in an error. When the `?rates={:code}` option is used, it only adds new data, and doesn't remove any `*usd*` fields from the output. * v.2.0.92 - November 11th, 2021 * Added Taproot support for Bitcoin, Groestlcoin, and Bitcoin Testnet: * Taproot scripts now convert to P2TR addresses (some older outputs that came before according activation dates may be reindexed a bit later) From b6209cb9d9c9fe6c6047ae6a36333661eee66d9e Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Wed, 1 Dec 2021 14:35:02 +0300 Subject: [PATCH 179/180] v.2.0.94 --- API.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/API.md b/API.md index 8a85e56b..9e33a3a2 100644 --- a/API.md +++ b/API.md @@ -26,6 +26,17 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.94 - December 1st, 2021 + * Added Kusama support in beta mode. The endpoints are compatible with Polkadot (we'll refer to Polkadot and Kusama as "Polkadot-like blockchains"): + * `https://api.blockchair.com/kusama/stats` (+ `https://api.blockchair.com/stats` now also features Kusama) + * `https://api.blockchair.com/kusama/raw/block/{:id}` + * `https://api.blockchair.com/kusama/raw/block/{:hash}` + * `https://api.blockchair.com/kusama/raw/extrinsic/{:id}` + * `https://api.blockchair.com/kusama/raw/extrinsic/{:hash}` + * `https://api.blockchair.com/kusama/raw/address/{:address}` (with `?offset={:offset} option to iterate through the latest extrinsics and transfers) + * `https://api.blockchair.com/kusama/raw/blocks` (an infinitable with `?offset={:offset} option) + * `https://api.blockchair.com/kusama/raw/extrinsics` (an infinitable with `?offset={:offset} option) + * `https://api.blockchair.com/kusama/raw/events` (an infinitable with `?offset={:offset} option) * v.2.0.93 - November 17th, 2021 * Added support for almost 200 fiat currencies and precious metals with exchange rates going back to 2009. * All API endpoints now support the `?rates={:code}` option. If enabled, it adds extra data for the chosen currency code on top of where USD data is already available. Example: `https://api.blockchair.com/bitcoin/stats?rates=kzt` adds `average_transaction_fee_kzt_24h`. For historical data (example: `https://api.blockchair.com/bitcoin/dashboards/block/500000?rates=kzt`) it honors historical exchange rates. From c11daec8c263cc10ea61143f010d0986e827d4d4 Mon Sep 17 00:00:00 2001 From: Nikita Zhavoronkov Date: Thu, 23 Dec 2021 19:11:43 +0300 Subject: [PATCH 180/180] v.2.0.95 --- API.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/API.md b/API.md index 9e33a3a2..e1f0db4a 100644 --- a/API.md +++ b/API.md @@ -26,6 +26,14 @@ The key is applied to the end of the request string like this: `api.blockchair.c ### Changelog +* v.2.0.95 - December 23rd, 2021 + * Added Solana support in beta mode. We're not running a full history Solana node at the moment, so only the most recent blocks and transactions are available. The available block range can be obtained using `https://api.blockchair.com/range`. New endpoints: + * `https://api.blockchair.com/solana/stats` + * `https://api.blockchair.com/solana/raw/slot/{:id}` + * `https://api.blockchair.com/solana/raw/transaction/{:signature}` + * `https://api.blockchair.com/solana/raw/address/{:address}`. Possible options: `?tokens=true` (costs `1` additional request point to use). + * `https://api.blockchair.com/solana/raw/validators`. Available options: `?offset={:offset}`. + * `https://api.blockchair.com/solana/raw/slots`. Available options: `?offset={:offset}`. * v.2.0.94 - December 1st, 2021 * Added Kusama support in beta mode. The endpoints are compatible with Polkadot (we'll refer to Polkadot and Kusama as "Polkadot-like blockchains"): * `https://api.blockchair.com/kusama/stats` (+ `https://api.blockchair.com/stats` now also features Kusama)