Blockchain Explorer – Search the Blockchain | BTC | ETH | BCH

Blockchain API question

USD

USD

AUD

CAD

CHF

CLP

CNY

DKK

EUR

GBP

HKD

INR

ISK

JPY

KRW

NZD

PLN

RUB

SEK

SGD

THB

TWD

Query API

Plaintext query api to retrieve data from blockchain.com

Some API calls are available with CORS headers if you add a & cors=true parameter to the GET request

Please limit your queries to a maximum of 1 every 10 seconds. All bitcoin values are in Satoshi i.e. divide by 100000000 to get the amount in BTC

Real-time

getdifficulty – Current difficulty target as a decimal numbergetblockcount – Current block height in the longest chainlatesthash – Hash of the latest blockbcperblock – Current block reward in BTCtotalbc – Total Bitcoins in circulation (delayed by up to 1 hour)probability – Probability of finding a valid block each hash attempthashestowin – Average number of hash attempts needed to solve a blocknextretarget – Block height of the next difficulty re-targetavgtxsize – Average transaction size for the past 1000 blocks. Change the number of blocks by passing an integer as the second argument e.g. avgtxsize/2000avgtxvalue – Average transaction value (1000 Default)interval – Average time between blocks in secondseta – Estimated time until the next block (in seconds)avgtxnumber – Average number of transactions per block (100 Default)

Address Lookups

To filter by x number of confirmations include the confirmations parameter

e.g. /q/addressbalance/1EzwoHtiXB4iFwedPr49iywjZn2nnekhoj?confirmations=6

to only include transactions with 6 or more confirmations. This is extremely important if you are processing valuable transactions.

Do not use to process payments without the confirmations parametergetreceivedbyaddress/$address – Get the total number of bitcoins received by an address (in satoshi). Multiple addresses separated by |

Add the parameters start_time and end_time to restrict received by to a specific time period. Provided times should be a unix timestamp in milliseconds. Multiple addresses separated by |

Do not use to process payments without the confirmations argumentgetsentbyaddress/$address – Get the total number of bitcoins send by an address (in satoshi). Multiple addresses separated by | Do not use to process payments without the confirmations parameteraddressbalance/$address – Get the balance of an address (in satoshi). Multiple addresses separated by |addressfirstseen/$address – Timestamp of the block an address was first confirmed in.

Transactions Lookups

txtotalbtcoutput/$txHash – Get total output value of a transaction (in satoshi)txtotalbtcinput/$txHash – Get total input value of a transaction (in satoshi)txfee/$txHash – Get fee included in a transaction (in satoshi)txresult/$txHash/$address – Calculate the result of a transaction sent or received to Address. Multiple addresses separated by |

Tools

addresstohash/$address – Converts a bitcoin address to a hash 160hashtoaddress/$hash – Converts a hash 160 to a bitcoin addresshashpubkey/$pubkey – Converts a public key to a hash 160addrpubkey/$pubkey – Converts a public key to an Addresspubkeyaddr/$address – Converts an address to public key (if available)

Misc

unconfirmedcount – Number of pending unconfirmed transactions24hrprice – 24 hour weighted price from the largest exchangesmarketcap – USD market cap (based on 24 hour weighted price)24hrtransactioncount – Number of transactions in the past 24 hours24hrbtcsent – Number of btc sent in the last 24 hours (in satoshi)hashrate – Estimated network hash rate in gigahashrejected – Lookup the reason why the provided tx or block hash was rejected (if any)

source : https://ontopwiki.com
Category : Finance

Post navigation

Leave a Comment

Trả lời

Email của bạn sẽ không được hiển thị công khai.