Hot answers tagged

29

First you must configure your bitcoin.conf file for JSON-RPC rpcallowip=127.0.0.1 rpcuser=yourusername rpcpassword=reallystrongpasswordthatsnothis rpcport=7788 walletnotify=/home/scripts/transaction.sh %s Where transaction.sh is some bash program. One approach is to have it make an http request to some process to notify you of the deposit. An example: #!/...


25

By default, what is maintained by the 0.8 blockchain engine is: All blocks A database with all block headers, and the positions on disk for each block A database that represents all unspent transaction outputs (UTXOs), indexed by txid, at the current tip of the block chain Undo files that allow rewinding the effects of blocks on this set of UTXOs. Nothing ...


17

I am developing the ccxt cryptocurrency trading library, check it out on GitHub: https://github.com/kroitor/ccxt It is a library for cryptocurrency trading and e-commerce with support for many bitcoin/ether/altcoin exchange markets and merchant APIs. With it you can access market data and trade bitcoin, ether and altcoins with more than 70 (!!!) ...


17

Most exchanges offer API solutions for market data. Here are some examples: GDAX Bittrex Kraken WAVES DEX CryptoCompare has an API that aggregates data from many exchanges, and they also offer many query parameters. Link: CryptoCompareAPI Additionally, many block explorers provide APIs for blockchain account information. This ZChain Playlist shows how to ...


11

Building trading bots that interact with the exchanges is very similar to interacting with other RESTful APIs. Basically, you make query objects to whichever exchange you like to use. Here is a simple example: https://github.com/AdamCox9/nickelbot/blob/master/adapters/poloniex/poloniex_lib.php Nickelbot is development platform written in PHP that has all ...


10

The other answer is outdated. estimatefee is deprecated. You should use estimatesmartfee Please use estimatesmartfee for more intelligent estimates. Estimates the approximate fee per kilobyte needed for a transaction to begin confirmation within nblocks blocks. Uses virtual transaction size of transaction as defined in BIP 141 (witness data is ...


9

Bitcoin does not have one single buy and sell price. Bitcoins are exchanged on many different exchanges, each keeping track of their own market price. However, BitcoinCharts.com has a useful API that summarises many of the largest exchanges according to their trading volume. You could use that to display the Bitcoin price on your website.


8

You can get any price quotes, in a JSON format, using these kinds of endpoints: https://btc-e.com/api/2/ltc_usd/ticker https://btc-e.com/api/2/btc_usd/ticker https://btc-e.com/api/2/ltc_btc/ticker The structure of the endpoint is https://btc-e.com/api/2 and then currency_currency and then /ticker. Hope that helps!


8

Have you tried using the estimatefee RPC call? This will calculate the amount needed per kilobyte. For example calling bitcoin-cli estimatefee 2 would provide a fee per kb to try to get confirmed within 2 blocks. https://bitcoin.org/en/developer-reference#estimatefee


7

import all address using "importaddress" you can get balance using "listunspent", but you must sum all unspent amount per an address.


7

if you want fast http ticker use the new fast_ticker : http://www.reddit.com/r/Bitcoin/comments/1c9npl/mtgox_fast_ticker_last_only_no_rate_limit_1second/ http://data.mtgox.com/api/2/BTCUSD/money/ticker_fast and you will get 1 second only cached minimalist ticker ( last ) if you need more ( low, high, volume ) you have the normal ticker, most probably ...


7

If you are not going to use a 3rd party API, you'll need to run a node and add each address you want to query as a watch only address. If you are looking to create a database with all addresses, similar to a block explorer website, you'll need to parse the blockchain using something like abe, and then continually update your database for each new transaction....


7

Found the data on crypto compare const endpoint = 'https://min-api.cryptocompare.com/data/histoday?aggregate=1&e=CCCAGG&extraParams=CryptoCompare&fsym='+ ticker.toUpperCase() +'&limit=365&tryConversion=false&tsym=' + currency.toUpperCase();


7

This question has been asked in the #api-developers channel of the Bittrex Slack Group a few times. Here's the important fragment of the discussion with somewhat an answer to our question. July 2nd, 2017 Some user: seriously guys.. the rate limit.. what is it.. bittrex-bill: It varies by API call. If you hit the limit, you are abusing it. If you hit ...


7

You probably could - blockchain.info has certainly taken steps towards letting you, and provide a reasonably complete API, along with websocket streams for real time data. That said, you probably shouldn't - Bitcoin, and other cryptocurrencies, are designed to be decentralized and trustless. By using Blockchain.info, or any other API provider, you leave ...


6

Problem solved. The error is caused by too many decimal places in the rate parameter. It would be good if the API returned a more informative error message though. There is an API call to find the correct maximum number of places, as well as the minimum order for each currency pair. https://btc-e.com/api/3/info returns a list of currencies and information. ...


6

These days the most thorough and handy guide for the Bitcoin Core RPC commands is the bitcoin.org developer reference page.


6

Since you originally stated that you wanted to write a trading bot, perhaps you will find the following library useful: "XChange is a Java library providing a simple and consistent API for interacting with over a dozen Bitcoin exchanges providing a consistent interface for trading and accessing market data" (according to their GitHub page) Unfortunately, ...


6

Finally discovered the fix: hexhash has to be lower case: string hexHash = BitConverter.ToString(hash).Replace("-", "").ToLower();


6

did you look at bitcoind? It does everything you are looking for. -port= Listen for connections on (default: 8333 or testnet: 18333) -walletnotify= Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) -alertnotify= Execute command when a relevant alert is received (%s in cmd is replaced by message) http://...


6

Multisig and singlesig wallets use the same flow. A Tx proposal need to be created in singlesig wallets also. Copay syncronize across devices, so you can have a non-signing copayers in a 1-1 wallet that submit proposals, for later approval. The flow is: create => publish => sign => broadcast. You can check the official client https://github.com/bitpay/...


6

Volume is the amount traded in that altcoin over the past 24 hours. In the case of BTC-DGB, this is the amount of DGB that has been traded in 24 hours. BaseVolume is the total value traded in the base currency, for example Bitcoin. Volume increases regardless if it is a buy or sell order. To find the overall volume you can go to https://coinmarketcap....


6

In general, HD Wallets use the following logic for how many addresses to query, and when to stop: Start with account 0, generate gap limit number of addresses (usually 20) Check for any transactions in those addresses If there are no transactions, stop searching for new addresses and accounts If there are transactions, generator gap limit more from the ...


6

In the example RPC results, it will show whether the result is a JSON array by including brackets [] or it will show if it is a JSON object (associative array) by using curly brackets {}. If the result does not come with any JSON encoding and is a single string or other data type, then you will not see that in the example. You can see an example of a result ...


6

You can use a self-hosted (but low-burden!) instance of Esplora. Blockstream is also exposing an instance for free (at the moment) at blockstream.info. Disclaimer: if you take part of Bitcoin as an economic actor (as an application providing account balances may imply), you should really consider using your own source of truth and self-host the instance. It'...


5

listsinceblock is more convinient - it can be used incrementally.


5

The BOP Enterprise Bitcoin Server is an open source full node implementation with remote (that is client side) wallet. The server downloads the block chain does the transaction and block validation and routes transactions signed at the client. The client connects to the server via a message bus. There is a Java and other APIs available with added client ...


5

This comes from the Original Bitcoin client/API calls list regarding the command getreceivedbyaddress. Returns the total amount received by in transactions with at least [minconf] confirmations. While some might consider this obvious, value reported by this only considers receiving transactions. It does not check payments that have been made from this ...


5

You can query the unspent outputs of an address with this: http://blockchain.info/unspent?active=$bitcoin_address You can get the transaction history for an address with this: http://blockchain.info/address/$bitcoin_address?format=json For more information see http://blockchain.info/api/blockchain_api


5

First, use the API to get the information on the txid. /api/tx/e3f0e88ce224d342a0189c1b9d2fd488d8bda2f303dbe1e1dbbaa5f51d9f4a53 This result will include all of the details you're looking for. Here are the parts that you're asking about. The n here corresponds to the vout number above, I believe, and the value and addresses values are the input amount and ...


Only top voted, non community-wiki answers of a minimum length are eligible