You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* v.2.0.6 - Oct 8th - Added data aggregation of blockchain data in beta mode, see `Data aggregation support` below
6
37
* 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 @@
9
40
* v.2.0.2 - Sep 9th - Added `address.contract_created` to the `ethereum/dashboards/address/{A}` call
10
41
* v.2.0.1 - Sep 1st - Added Litecoin support
11
42
12
-
####Tested features changelog
43
+
### Tested features changelog
13
44
14
45
##### Data aggregation support (since Oct 8th)
15
46
@@ -25,34 +56,34 @@ To use aggregation, put the fields by which you'd like to group by (zero, one, o
* 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)
36
-
* To calculate: value, value_usd, spending_value_usd, lifespan, cdd -- possible functions: avg(field), median(field), min(field), max(field), sum(field), count()
67
+
* To calculate: value, value_usd, spending_value_usd, lifespan, cdd — possible functions: avg(field), median(field), min(field), max(field), sum(field), count()
* Group by: block_id, date (or week, month, year), failed, fail_reason, type, transferred
49
-
* To calculate: child_call_count, value, value_usd -- possible functions: avg(field), median(field), min(field), max(field), sum(field), count()
80
+
* To calculate: child_call_count, value, value_usd — possible functions: avg(field), median(field), min(field), max(field), sum(field), count()
50
81
51
82
##### Omni Layer and Wormhole support (since Sep 18th)
52
83
53
84
* 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!
54
85
55
-
####General Provisions
86
+
### General Provisions
56
87
57
88
* Requests to our server should be made through the HTTPS protocol by GET requests to the domain `api.blockchair.com`
58
89
@@ -149,7 +180,7 @@ If you need to apply several sorts, you can list them by commas, similar to filt
149
180
150
181
**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.
Returns information about the outputs (that become inputs when they are spent, and then `spending*` information appears)
249
280
@@ -289,7 +320,7 @@ Notes:
289
320
- (\*) - only for Bitcoin
290
321
- the default sort is - transaction_id DESC
291
322
292
-
#####ethereum/[mempool/]blocks
323
+
#### ethereum/[mempool/]blocks
293
324
294
325
Returns block data
295
326
@@ -346,7 +377,7 @@ Notes:
346
377
- 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
347
378
- the default sort is id DESC
348
379
349
-
#####ethereum/uncles
380
+
#### ethereum/uncles
350
381
351
382
Returns information about uncles
352
383
@@ -388,7 +419,7 @@ Notes:
388
419
- 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)
389
420
- sort by default - parent_block_id DESC
390
421
391
-
#####ethereum/[mempool/]transactions
422
+
#### ethereum/[mempool/]transactions
392
423
393
424
Returns transaction information
394
425
@@ -444,7 +475,7 @@ Notes:
444
475
* create_tree - create a new contract that create contracts or starts making calls
445
476
* synthetic_coinbase - a synthetic transaction for awarding a reward to the miner (block or uncle)
446
477
447
-
#####ethereum/calls
478
+
#### ethereum/calls
448
479
449
480
Returns information about calls
450
481
@@ -478,18 +509,18 @@ Notes:
478
509
- the default sort is transaction_id DESC
479
510
- 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`)
480
511
481
-
#####Notes
512
+
#### Notes
482
513
483
514
- for unconfirmed transactions (and outputs in the case of bitcoin[-cash]), the following rules are applied:
484
515
- their `block_id` is equal to `-1`
485
516
-`date` and` time` indicate the time when the transaction was received by our node
486
517
- 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.
487
518
488
-
####Dashboard calls
519
+
### Dashboard calls
489
520
490
521
The API supports a number of calls that produce some aggregated data, or data in a more convenient form for certain entities.
491
522
492
-
#####(bitcoin[-cash]|litecoin|ethereum)/dashboards/block/{A} and (bitcoin[-cash]|litecoin|ethereum)/dashboards/blocks/{A[,B,...]}
523
+
#### (bitcoin[-cash]|litecoin|ethereum)/dashboards/block/{A} and (bitcoin[-cash]|litecoin|ethereum)/dashboards/blocks/{A[,B,...]}
493
524
494
525
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:
495
526
*`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
499
530
500
531
`context.results` contains the number of found blocks.
501
532
502
-
#####ethereum/dashboards/uncle/{A} and ethereum/dashboards/uncles/{A[,B,...]}
533
+
#### ethereum/dashboards/uncle/{A} and ethereum/dashboards/uncles/{A[,B,...]}
503
534
504
535
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:
505
536
*`uncle` - information about the block in infinitable-format `ethereum/uncles`
506
537
507
538
`context.results` contains the number of found uncles.
508
539
509
-
#####(bitcoin[-cash]|litecoin|ethereum)/dashboards/transaction/{A} and (bitcoin[-cash]|litecoin|ethereum)/dashboards/transactions/{A[,B,...]}
540
+
#### (bitcoin[-cash]|litecoin|ethereum)/dashboards/transaction/{A} and (bitcoin[-cash]|litecoin|ethereum)/dashboards/transactions/{A[,B,...]}
510
541
511
542
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:
512
543
*`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
516
547
517
548
`context.results` contains the number of found transactions.
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
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:
526
557
*`address`
@@ -545,7 +576,7 @@ Uses address as the input data. `data` returns an array with one element (if the
545
576
546
577
To iterate `transactions`, `?offset=N` is supported.
547
578
548
-
#####ethereum/dashboards/address/{A}
579
+
#### ethereum/dashboards/address/{A}
549
580
550
581
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:
551
582
*`address`
@@ -579,7 +610,7 @@ Notes:
579
610
- (\*) - in these columns, the value in wei can be rounded. For a million of calls, the error can be more than 1 ether.
580
611
- (\*\*) - 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
581
612
582
-
#####(bitcoin[-cash]|litecoin|ethereum)/stats
613
+
#### (bitcoin[-cash]|litecoin|ethereum)/stats
583
614
584
615
Returns an array with blockchain statistics:
585
616
*`blocks` - total number of blocks
@@ -610,15 +641,15 @@ Returns an array with blockchain statistics:
610
641
*`market_dominance_percentage` - dominance index (how much % of the total cryptocurrency market is the market capitalization of the coin)
611
642
... there's also some other self-explanatory keys
612
643
613
-
#####stats
644
+
#### stats
614
645
615
646
Returns data on four calls:
616
647
*`bitcoin/stats`
617
648
*`bitcoin-cash/stats`
618
649
*`ethereum/stats`
619
650
*`litecoin/stats`
620
651
621
-
####API request examples
652
+
### API request examples
622
653
623
654
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:
0 commit comments