Bitcoin Forum

Bitcoin => Project Development => Topic started by: tyz on January 28, 2017, 06:54:41 PM



Title: Open API to request Bitcoin blockchain data?
Post by: tyz on January 28, 2017, 06:54:41 PM
I want to integrate requesting Bitcoin data into a little project of mine. Therefore I am looking for an open API where I can request Bitcoin address data like balance and transactions. Google did not give me useful results. Any advices how to do without running an own Bitcoin node?


Title: Re: Open API to request Bitcoin blockchain data?
Post by: devans on January 28, 2017, 09:02:27 PM
BlockCypher (https://www.blockcypher.com/dev/bitcoin/) offers an API, as do many other blockchain explorers. If you take a look at the popular ones you'll probably find a few more that have one.


Title: Re: Open API to request Bitcoin blockchain data?
Post by: BuySomeBitcoins on January 29, 2017, 01:16:46 AM
try bitgo.com - and it is free.


Title: Re: Open API to request Bitcoin blockchain data?
Post by: Emerge on January 29, 2017, 01:32:55 AM
try bitgo.com - and it is free.


I agree, Bitgo is a pretty good service especially with BitGo Instant.. Everyone loves getting their balances upped instantly,
if they're using a Bitgo wallet as well that is.


Title: Re: Open API to request Bitcoin blockchain data?
Post by: freemanjackal on February 09, 2017, 10:30:28 PM
most web wallets offer apis to comunicate with it, those that have been mentioned here and some others like blockchain.info, you can also use  a desktop wallet lke electrum


Title: Re: Open API to request Bitcoin blockchain data?
Post by: nemgun on February 10, 2017, 11:33:45 AM
blocktrail is easy to use and convinient, plus it is built for merchants as it have a well coded account system, you can easily create an account for each user and retrieve these informations quickly and without hustle.
In all cases, you will have to be confident with the usage of objects, wether you use PHP, NODEJS, JQUERY languages, these APIs always return objects, maybe sometimes arrays, and usually both at the same time so if you don't have a lot of experience in these languages, i advise you to ask for someone to help you, or at least, learn more about POO.


Title: Re: Open API to request Bitcoin blockchain data?
Post by: freemanjackal on February 10, 2017, 03:00:51 PM
what languages and frameworks are you using? blockchain.info provides api for php,node,java and some oother that i cant remember, rigth now, i talk to you about this one because it is the one that i know, they have documentation and examples of usage


Title: Re: Open API to request Bitcoin blockchain data?
Post by: Patatas on February 10, 2017, 03:46:18 PM
I want to integrate requesting Bitcoin data into a little project of mine. Therefore I am looking for an open API where I can request Bitcoin address data like balance and transactions. Google did not give me useful results. Any advices how to do without running an own Bitcoin node?
1.You don't have to run your own bitcoin node.Just a source for JSON data supporting multiple API calls.
2.You can either write your own JSON Rpc or use one of the existing from n number of sites listed above.
3.Addition to the above,I find this one quite faster https://www.blockcypher.com/dev/bitcoin/ in terms of handling multiple requests and calls per second.


Title: Re: Open API to request Bitcoin blockchain data?
Post by: freemanjackal on February 10, 2017, 06:59:34 PM
3.Addition to the above,I find this one quite faster https://www.blockcypher.com/dev/bitcoin/ in terms of handling multiple requests and calls per second.
i have seen it in this post couple of times, i was studying blockchain api for something that i wanna try, ill take a look to this one


Title: Re: Open API to request Bitcoin blockchain data?
Post by: annie9771 on February 20, 2017, 04:56:06 AM
bitgo.com and blockchain.info these both are good , if you are working in PHP then pm me i can help you more


Title: Re: Open API to request Bitcoin blockchain data?
Post by: bitKaBoom on February 20, 2017, 07:29:22 AM
Do you need help?

I can help you for reward :)

what is your project?


Title: Re: Open API to request Bitcoin blockchain data?
Post by: tyz on February 27, 2017, 08:00:25 PM
@all responders: Thanks, your suggestions helped me a lot to realize the script.

Do you need help?

I can help you for reward :)

what is your project?

Thanks, as said in the opening post, I just integrate a fast address balance check into my project. The project is a little community project. Nothing spectacular that has to be mentioned here ;)


Title: Re: Open API to request Bitcoin blockchain data?
Post by: DiamondCardz on February 27, 2017, 08:40:33 PM
@all responders: Thanks, your suggestions helped me a lot to realize the script.

Do you need help?

I can help you for reward :)

what is your project?

Thanks, as said in the opening post, I just integrate a fast address balance check into my project. The project is a little community project. Nothing spectacular that has to be mentioned here ;)

I'm quite curious to see which of the APIs would be the fastest, actually. Have you considered trying each blockchain API in order to see which returns data the fastest? I suppose it doesn't matter too much for a community project, but it would be quite interesting to see anyways...


Title: Re: Open API to request Bitcoin blockchain data?
Post by: slick2 on February 28, 2017, 12:36:52 AM
using blockchain.info api, it would take really a month to get an API key :D

my two applications got rejected recently


Title: Re: Open API to request Bitcoin blockchain data?
Post by: nemgun on February 28, 2017, 07:54:16 AM
using blockchain.info api, it would take really a month to get an API key :D

my two applications got rejected recently
I don't understand why they are so restrictive about their API, but if you really need one to work with, use block.io, i like them because it is really easy to use, easy to generate and manage accounts, and they support bitcoin litecoin dogecoin.
I didn't tested the others but i plan to do it soon.
Talking about these APIs is there a website who tracks them ?


Title: Re: Open API to request Bitcoin blockchain data?
Post by: BuySomeBitcoins on February 28, 2017, 04:03:35 PM
using blockchain.info api, it would take really a month to get an API key :D

my two applications got rejected recently
I don't understand why they are so restrictive about their API, but if you really need one to work with, use block.io, i like them because it is really easy to use, easy to generate and manage accounts, and they support bitcoin litecoin dogecoin.
I didn't tested the others but i plan to do it soon.
Talking about these APIs is there a website who tracks them ?

You do not understand ?

Because it costs them lots of money and ressources to maintain the API up, and to answer all the technical issues for the API users.
Why not just make an API like that one, for free and you will have an  idea of its complexity.


Block.io sucks.


Title: Re: Open API to request Bitcoin blockchain data?
Post by: nemgun on February 28, 2017, 06:33:13 PM
using blockchain.info api, it would take really a month to get an API key :D

my two applications got rejected recently
I don't understand why they are so restrictive about their API, but if you really need one to work with, use block.io, i like them because it is really easy to use, easy to generate and manage accounts, and they support bitcoin litecoin dogecoin.
I didn't tested the others but i plan to do it soon.
Talking about these APIs is there a website who tracks them ?

You do not understand ?

Because it costs them lots of money and ressources to maintain the API up, and to answer all the technical issues for the API users.
Why not just make an API like that one, for free and you will have an  idea of its complexity.


Block.io sucks.

I know how complex it is, and i know how much ressources it consumes, but why other API providers do it without restriction ?
Block.io is a simple API who does the job, now for security considerations i didn't went too much in testing as i never had to use it in a production environment, i just know that it is accessible, easy to use, clear UI. And these are very appreciated qualities.


Title: Re: Open API to request Bitcoin blockchain data?
Post by: BuySomeBitcoins on February 28, 2017, 06:56:45 PM

I know how complex it is, and i know how much ressources it consumes, but why other API providers do it without restriction ?
Block.io is a simple API who does the job, now for security considerations i didn't went too much in testing as i never had to use it in a production environment, i just know that it is accessible, easy to use, clear UI. And these are very appreciated qualities.


Other API providers restrict usage of their APIs, and do not offer it for free.

Block.io does not do any job, and their API is shit and not free, I used them for a year and it was a pain in the ass to work with them, they use STRIPE to bill their customers even when they pay with bitcoin, what the heck ?


Title: Re: Open API to request Bitcoin blockchain data?
Post by: nemgun on February 28, 2017, 07:03:35 PM

I know how complex it is, and i know how much ressources it consumes, but why other API providers do it without restriction ?
Block.io is a simple API who does the job, now for security considerations i didn't went too much in testing as i never had to use it in a production environment, i just know that it is accessible, easy to use, clear UI. And these are very appreciated qualities.


Other API providers restrict usage of their APIs, and do not offer it for free.

Block.io does not do any job, and their API is shit and not free, I used them for a year and it was a pain in the ass to work with them, they use STRIPE to bill their customers even when they pay with bitcoin, what the heck ?

I used them in development only, i won't pay for an api, especially when i don't need to use it, it is just that APIs are easy to use, and provides quick deployment.
It can be a pain for sure, especially if you need methods they can't provide.
Have you switched to annother API ?


Title: Re: Open API to request Bitcoin blockchain data?
Post by: BuySomeBitcoins on February 28, 2017, 08:32:33 PM

I know how complex it is, and i know how much ressources it consumes, but why other API providers do it without restriction ?
Block.io is a simple API who does the job, now for security considerations i didn't went too much in testing as i never had to use it in a production environment, i just know that it is accessible, easy to use, clear UI. And these are very appreciated qualities.


Other API providers restrict usage of their APIs, and do not offer it for free.

Block.io does not do any job, and their API is shit and not free, I used them for a year and it was a pain in the ass to work with them, they use STRIPE to bill their customers even when they pay with bitcoin, what the heck ?

I used them in development only, i won't pay for an api, especially when i don't need to use it, it is just that APIs are easy to use, and provides quick deployment.
It can be a pain for sure, especially if you need methods they can't provide.
Have you switched to annother API ?

Moved to Bitgo, but I decided to build my own solutions instead of relying on third parties, even payable ones.


Title: Re: Open API to request Bitcoin blockchain data?
Post by: nemgun on February 28, 2017, 09:23:00 PM

I know how complex it is, and i know how much ressources it consumes, but why other API providers do it without restriction ?
Block.io is a simple API who does the job, now for security considerations i didn't went too much in testing as i never had to use it in a production environment, i just know that it is accessible, easy to use, clear UI. And these are very appreciated qualities.


Other API providers restrict usage of their APIs, and do not offer it for free.

Block.io does not do any job, and their API is shit and not free, I used them for a year and it was a pain in the ass to work with them, they use STRIPE to bill their customers even when they pay with bitcoin, what the heck ?

I used them in development only, i won't pay for an api, especially when i don't need to use it, it is just that APIs are easy to use, and provides quick deployment.
It can be a pain for sure, especially if you need methods they can't provide.
Have you switched to annother API ?

Moved to Bitgo, but I decided to build my own solutions instead of relying on third parties, even payable ones.

I am curious about your build, what did you created ? or maybe you found some open source web wallets with built-in API ?
the last i heard of bitgo was something like a year ago, they still exists then.


Title: Re: Open API to request Bitcoin blockchain data?
Post by: BuySomeBitcoins on February 28, 2017, 09:39:36 PM

I am curious about your build, what did you created ? or maybe you found some open source web wallets with built-in API ?
the last i heard of bitgo was something like a year ago, they still exists then.


Bitgo is the wallet most exchangers are using, bitstamp, kraken, bitfinex, shapeshift, and most Bitcoin ATMs.


Title: Re: Open API to request Bitcoin blockchain data?
Post by: Joel_Jantsen on February 28, 2017, 09:46:35 PM
or maybe you found some open source web wallets with built-in API ?
Is there a thing called "Open Source Web Wallets" ? Welp! I need to look that up son!
Would really help figure out transparency behind the wallet.Most of the online wallets do provide built in API's but with limited access and cross verification of the tokens.I'd rather write my own API instead of begging them to provide me unlimited requests per minute.


Title: Re: Open API to request Bitcoin blockchain data?
Post by: ~Bitcoin~ on March 01, 2017, 12:44:21 PM
Is there a thing called "Open Source Web Wallets" ? Welp! I need to look that up son!
Would really help figure out transparency behind the wallet.Most of the online wallets do provide built in API's but with limited access and cross verification of the tokens.I'd rather write my own API instead of begging them to provide me unlimited requests per minute.
Check coinb.in they are opensource web based bitcoin wallet but i don't think they have API option.
You have to run own bitcoin node (wallet) to create own api or you can simply call your node using jsonrpc.


Title: Re: Open API to request Bitcoin blockchain data?
Post by: nemgun on March 01, 2017, 02:20:22 PM
or maybe you found some open source web wallets with built-in API ?
Is there a thing called "Open Source Web Wallets" ? Welp! I need to look that up son!
Would really help figure out transparency behind the wallet.Most of the online wallets do provide built in API's but with limited access and cross verification of the tokens.I'd rather write my own API instead of begging them to provide me unlimited requests per minute.

there are a lot of open source wallets :

- Safe wallet
- Insight API (then you have to build the frontend)
- PiWallet

These are the most used projects, buti  am sure you can find more on github.


Title: Re: Open API to request Bitcoin blockchain data?
Post by: TheByzantineGeneral on March 02, 2017, 03:51:54 AM
bitgo.com
blockcypher.com
blockchain.info
bitcore.io

and many more


Title: Re: Open API to request Bitcoin blockchain data?
Post by: bitKaBoom on March 15, 2017, 06:05:53 AM
Is there a thing called "Open Source Web Wallets" ? Welp! I need to look that up son!
Would really help figure out transparency behind the wallet.Most of the online wallets do provide built in API's but with limited access and cross verification of the tokens.I'd rather write my own API instead of begging them to provide me unlimited requests per minute.
Check coinb.in they are opensource web based bitcoin wallet but i don't think they have API option.
You have to run own bitcoin node (wallet) to create own api or you can simply call your node using jsonrpc.

for bitcoin node need hosting.
hosting for bitcoind cost not cheap


Title: Re: Open API to request Bitcoin blockchain data?
Post by: nemgun on March 15, 2017, 09:27:27 AM
you can use bcoin, or prune the bitcoin core, i am testing it on 0.14, it is great, even if you have to download the whole blockchain you keep just a fraction of it, you will need around 7gb to store a pruned bitcoin core.
You can also use other projects, depending on what you need you can use the APIs, or a pruned node, or if you are on nodeJS you can go bcoin, but you will need to be skilled as bcoin is kind of tricky, and complex.


Title: Re: Open API to request Bitcoin blockchain data?
Post by: cloverme on March 15, 2017, 01:10:27 PM
I want to integrate requesting Bitcoin data into a little project of mine. Therefore I am looking for an open API where I can request Bitcoin address data like balance and transactions. Google did not give me useful results. Any advices how to do without running an own Bitcoin node?

Blockchain.info is the easiest, but anything free has its limits. So some API calls may be limited on number of times per day, etc. Also, there's downtime to contend with that you're not always notified about. My earlier projects used free API's but later I moved to my own nodes.

Code:
function getBalance($address) {
    return file_get_contents('https://blockchain.info/en/q/addressbalance/'. $address);
}
$balance_address =  getBalance('1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa');


Title: Re: Open API to request Bitcoin blockchain data?
Post by: bitKaBoom on April 13, 2017, 04:57:25 PM
you can try
https://www.blocktrail.com/api

i want lean how it works too..

how can use callback with php?

and how can send btc?

(i can use bitcoind and rpc, have experience)


Title: Re: Open API to request Bitcoin blockchain data?
Post by: btc_enigma on April 14, 2017, 06:53:23 AM
Have a look at moneywagon (https://github.com/priestc/moneywagon) . Instead of using one blockexplorer service , it will randomly sample between various services. You can query blocks/transactions/address and even create transactions.


Title: Re: Open API to request Bitcoin blockchain data?
Post by: nemgun on April 15, 2017, 10:49:05 AM
Well, the best of all solutions is to run your own node, in pruned mode, and query it using your own API in order to be secure.
Use bitcoinjs-lib to generate addresses and transactions, and pass them to bitcoind.
Use your api to query bitcoind about the state of a transaction, or record the TX informations in a database at each new block. At least you will have custom informations.


Title: Re: Open API to request Bitcoin blockchain data?
Post by: PremiumCodeX on April 15, 2017, 03:11:13 PM
Well, the best of all solutions is to run your own node, in pruned mode, and query it using your own API in order to be secure.
Use bitcoinjs-lib to generate addresses and transactions, and pass them to bitcoind.
-...-

From security viewpoint, that is true. However, integrating an API is still the easier solution.

If you do not develop a critical system, using the already-suggested blockchain(dot)info API should be legit enough. It is fairly easy too.

I have a tutorial in my previous threads where I explain how to use these APIs with POST/GET requests and Ruby. That works with blockchain(dot)info too.

Or using PHP as @cloverme suggested:

Blockchain.info is the easiest, but anything free has its limits. So some API calls may be limited on number of times per day, etc. Also, there's downtime to contend with that you're not always notified about. My earlier projects used free API's but later I moved to my own nodes.

Code:
function getBalance($address) {
    return file_get_contents('https://blockchain.info/en/q/addressbalance/'. $address);
}
$balance_address =  getBalance('1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa');

Thank you for contributing to the community!  :)


Title: Re: Open API to request Bitcoin blockchain data?
Post by: nemgun on April 15, 2017, 03:16:19 PM
Well, the best of all solutions is to run your own node, in pruned mode, and query it using your own API in order to be secure.
Use bitcoinjs-lib to generate addresses and transactions, and pass them to bitcoind.
-...-

From security viewpoint, that is true. However, integrating an API is still the easier solution.

If you do not develop a critical system, using the already-suggested blockchain(dot)info API should be legit enough. It is fairly easy too.

I have a tutorial in my previous threads where I explain how to use these APIs with POST/GET requests and Ruby. That works with blockchain(dot)info too.

Or using PHP as @cloverme suggested:

Blockchain.info is the easiest, but anything free has its limits. So some API calls may be limited on number of times per day, etc. Also, there's downtime to contend with that you're not always notified about. My earlier projects used free API's but later I moved to my own nodes.

Code:
function getBalance($address) {
    return file_get_contents('https://blockchain.info/en/q/addressbalance/'. $address);
}
$balance_address =  getBalance('1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa');

Thank you for contributing to the community!  :)

no problem, however, i have been advised many times not to use file_get_contents, because of security issues. An example with curl may look too complex, maybe npm is the right sollution as they have made an api wrapper. Blocktrail is the most advised for this, as they are linked to some big miners, so your TXs have a better chance to be processed.


Title: Re: Open API to request Bitcoin blockchain data?
Post by: matinbeigi on April 02, 2019, 08:56:21 AM
برای دریافت اطلاعات میتوانید از وبسرویس زیر استفاده کنید.
You can use the following Web site to receive the information.

                
//Get information account (single)
$json_info = json_decode(file_get_contents("https://blockchain.info/rawaddr/$address"),TRUE);

//Get information account (multi)
$json_info = json_decode(file_get_contents("https://blockchain.info/multiaddr?active=$address"),TRUE);


//example
https://blockchain.info/rawaddr/1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa

https://blockchain.info/multiaddr?active=1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa|1K294dYK83kokPGEqWz9ciCHHqFD1smjVD