Difference between revisions of "BlockExplorer.com"
m (link to block and theymos pages)
|Line 1:||Line 1:|
as is a to . is .
It is mainly aimed at advanced users who already know what blocks are and what kind of information they contain.
It is mainly aimed at advanced users who already know what blocks are and what kind of information they contain
==Interfacing with BBE==
==Interfacing with BBE==
Revision as of 04:55, 3 March 2011
Bitcoin Block Explorer (also known as Block Explorer or BBE) is an online service which displays the contents of individual Bitcoin blocks and transactions and the transaction histories and balances of addresses. It is operated by theymos.
Each object is displayed in human-readable form, as a web page, and is given a URL. By using hyperlinks, it allows users to switch from seeing one piece of data to a related one, with a single click. Clicking on the hash of an object, will move to the page that displays its data. This way for instance, you can switch from looking at a transaction, to looking at the previous transaction which gave this transaction its inputs. All block data is visible, in human-readable or machine-readable forms, and even some information that is not actually part of blocks.
It is mainly aimed at advanced users who already know what blocks are and what kind of information they contain, but a lot of helpful information is provided in tool-tips.
A listing of "strange transactions" is displayed in the main page, along with listings of the latest and largest transactions.
Interfacing with BBE
Use the query pages such as getreceivedbyaddress wherever possible. Note that these pages do not send a trailing newline, which may cause problems with your HTTP-fetching tool. When an error occurs, the result will begin with "ERROR:", followed by the error text. Your detection of "ERROR" must be case-insensitive. An empty result is also an error. Non-fatal errors will print query results on the next line after the error, though using this data is inadvisable.
To get block or transaction info, first find the hash of the item. This is done by using the search tool, which is accessible through a GET/HEAD request. For example, to get the hash of block number 444:
$ telnet blockexplorer.com 80 HEAD /search/444 HTTP/1.1 Host: blockexplorer.com HTTP/1.1 302 Found ... Location: http://blockexplorer.com/block/00000000cff43a64ec00bea1...
The hash is in the URL listed in the "location" header. Use it to get the JSON raw block:
Transactions use a URL like this:
If the search returns any status code other than 302, then the search is bad. A status code of 200 indicates that the search was ambiguous, and the page body will contain links to the choices. Example of search ambiguity. A search with no search terms will 302-redirect to the home page.
Unfortunately, the JSON raw block/tx pages omit a lot of important information, and there is no similar page for addresses. A full XML interface is planned. Scraping the HTML pages is not recommended, as the layout can change at any time.