Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Hot answers tagged

26

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: #!/...


23

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

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 ...


15

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 (!!!) ...


13

All historical data from any exchange available at Bitcoin Charts: Markets API Historic Trade Data Trade data is available as CSV, delayed by approx. 15 minutes. It will return the 2000 most recent trades. Format: https://api.bitcoincharts.com/v1/trades.csv?symbol=SYMBOL[&start=UNIXTIME] Returns CSV with columns: unixtime,price,amount ...


9

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 ...


9

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


9

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 ...


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!


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

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.


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 ...


6

This will be possible using the 'raw transaction interface' that was added recently and scheduled to be part of the 0.7.0 release. With listunspent you can request a list of available coins sent to a particular (wallet) address, and with createrawtransaction you can build a transaction that consumes specified coins. Finally, sendrawtransaction can be used ...


6

Though the terminiology is unclear, in code "label" and "account" are the same thing: importprivkey function (src/rpcdump.cpp): pwalletMain->SetAddressBookName(vchAddress, strLabel); from getnewaddress function (src/rpcwallet.cpp): pwalletMain->SetAddressBookName(keyID, strAccount);


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

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/...


5

You can for example check the Block Explorer's info about a given transaction. For example, given transaction 1c480aad976c61b51ae47401a554b09f65efe6f95f644041f838d9129e09167c, you can see that the only input was associated with address 1HnjAo2nbHGFDto86smcFiF3uUwfvNJ4cS. However, generally you should avoid using transaction inputs for basically any purpose -...


5

Beginning with v0.6.0 of the Bitcoin.org client was -BlockNotify. Beginning with v0.8.2 of the Bitcoin.org client was -WalletNotify which provides transaction-level notification.


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

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


5

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


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

How are fees charged? They are charged in the currency fee set during a trade. Due to a discreet nature of trade matching process, it's rather tricky to give a definite answer on how each individual fee is applied. However, a good rule of thumb is to choose a fee currency when placing an order, as this is the one in which fee will be subtracted. Are the ...


5

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....


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