Bitcoin Forum
June 19, 2018, 11:34:51 AM *
News: Latest stable version of Bitcoin Core: 0.16.1  [Torrent]. (New!)
 
   Home   Help Search Donate Login Register  
Pages: « 1 [2]  All
  Print  
Author Topic: Bitcoin API - solved!  (Read 15145 times)
theymos
Administrator
Legendary
*
expert
Offline Offline

Activity: 3052
Merit: 3187


View Profile
April 04, 2011, 04:39:03 AM
 #21

(Just realized my solution is still vulnerable: the transaction could pay you, go away, you wait n blocks, and a different transaction pays you, you recheck the balance and it looks good, but then the 2nd transaction goes away.)

Yeah, /q/getreceivedbyaddress is currently only suitable when you need just 1 confirmation. I'll add a "minconf" parameter when I get time.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
1529408091
Hero Member
*
Offline Offline

Posts: 1529408091

View Profile Personal Message (Offline)

Ignore
1529408091
Reply with quote  #2

1529408091
Report to moderator
The World's Betting Exchange

Bet with play money. Win real Bitcoin. 5BTC Prize Fund for World Cup 2018.

Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
theymos
Administrator
Legendary
*
expert
Offline Offline

Activity: 3052
Merit: 3187


View Profile
April 04, 2011, 05:06:05 AM
 #22

It wasn't as hard as I thought it would be, so I added it now.

6 confirmations:
http://blockexplorer.com/q/getreceivedbyaddress/19hMEAaRMbEhfSkeU4GT8mgSuyR4t4M6TH/6
1,000,000 confirmations:
http://blockexplorer.com/q/getreceivedbyaddress/19hMEAaRMbEhfSkeU4GT8mgSuyR4t4M6TH/1000000

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
dacoinminster
Legendary
*
expert
Offline Offline

Activity: 1232
Merit: 1002


Rational Exuberance


View Profile WWW
April 04, 2011, 04:06:20 PM
 #23


That is absolutely perfect. I updated my forum post and the wiki to reflect this method. I even put your blockexplorer.com donation address at the bottom  Tongue

Since theymos made changes to support what I want to do, I paid the 20BTC bounty using the donation address for blockexplorer.com

Theymos, please support laziness by adding a link to the API description from the blockexplorer.com home page. Thanks!

theymos
Administrator
Legendary
*
expert
Offline Offline

Activity: 3052
Merit: 3187


View Profile
April 04, 2011, 08:16:59 PM
 #24

Since theymos made changes to support what I want to do, I paid the 20BTC bounty using the donation address for blockexplorer.com

Theymos, please support laziness by adding a link to the API description from the blockexplorer.com home page. Thanks!

Thanks for the 20 BTC! I added a link.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
frenkel
Newbie
*
Offline Offline

Activity: 12
Merit: 0


View Profile
May 23, 2011, 06:13:55 PM
 #25


Hi theymos,

Your examples give me an error, it doesn't seem to work anymore:
Quote
ERROR: this page never counts 0-confirmation transactions
theymos
Administrator
Legendary
*
expert
Offline Offline

Activity: 3052
Merit: 3187


View Profile
May 23, 2011, 07:41:32 PM
 #26

Fixed. Thanks.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
frenkel
Newbie
*
Offline Offline

Activity: 12
Merit: 0


View Profile
May 23, 2011, 07:48:09 PM
 #27

Cool, thanks!
andrehorta
Legendary
*
Offline Offline

Activity: 1261
Merit: 1000


View Profile WWW
April 08, 2013, 10:35:43 PM
 #28

How can i create a new address?
Amitabh S
Legendary
*
Offline Offline

Activity: 1002
Merit: 1000


View Profile
August 05, 2013, 07:31:10 PM
 #29

How can i create a new address?

A tool (that claims to run on client side - have not verified) is bitaddress, which lets you generate random addresses.

Coinsecure referral ID: https://coinsecure.in/signup/refamit (use this link to signup)
Judson
Newbie
*
Offline Offline

Activity: 22
Merit: 0



View Profile
August 06, 2013, 03:37:42 AM
 #30

This thread is 2 years old.
jlp
Sr. Member
****
Offline Offline

Activity: 266
Merit: 261


View Profile
February 08, 2014, 03:07:52 AM
 #31

1) bitcoind - I think this might be the same as configuring bitcoin to run as server. I believe it uses an RPC API to run transactions from the command line.
Pros: Everything stays on my server
Cons: I have to find a server that will let me compile and install this, rather than just some PHP/MySQL farm in the cloud, which is what I prefer

You can run the front-end on one server and the back-end on another (and communicate via JSON-RPC over HTTPS).  That's how I'm able to run the Faucet and ClearCoin on Google's App Engine (they talk with bitcoind processes running on linode.com and aws.amazon.com servers).  bitcoind doesn't take much memory, bandwidth, or CPU (just don't turn on coin generation), so, for now, anyway, you can even use an Amazon "micro" server (which costs something like $100 per year).

I'm not selling anything so can't comment on the shopping cart interfaces.  Screen-scraping web pages is a bad idea for lots of reasons.


What is the speed/performance like if one runs the web app and bitcoind on two separate remote servers?  Won't the speed be slow?

The JSON-RPC in the web app sends the user name and password to access the bitcoind API.  Do both the web app's server and the bitcoind server need HTTPS, or just the bitcoind server is sufficient?

Which hosting company is best for this type of architecture?  Google App Engine, AWS EC2, DigitalOcean or Linode?

What about security?  Do I need to encrypt the wallet on the server?  How do I ensure that nobody at the hosting company accesses my server, reads the rpcuser and rpcpassword in bitcoin.conf and then starting sending Bitcoins out of my wallet?  If I move away, how do I ensure that the hosting company or the next customer doesn't take a copy of my wallet?
nasamanBoy
Newbie
*
Offline Offline

Activity: 14
Merit: 0


View Profile
February 08, 2014, 08:03:32 AM
 #32

Here you have one interesting page  http://176.221.46.81/chain/Quarkcoin....
thonglor
Newbie
*
Offline Offline

Activity: 24
Merit: 0


View Profile
March 02, 2014, 07:47:35 AM
 #33

Now as MtGox has gone down, is there another API/webpage that can be recommended?
grifferz
Full Member
***
Offline Offline

Activity: 154
Merit: 100


View Profile
March 02, 2014, 08:46:17 AM
 #34

Now as MtGox has gone down, is there another API/webpage that can be recommended?
What features do you require?

I do not use it myself but I have heard good things about blockchain.info's API.
thonglor
Newbie
*
Offline Offline

Activity: 24
Merit: 0


View Profile
March 02, 2014, 11:01:22 AM
 #35

Yes, I'm trying to do exactly that but experience this error on testing their API:

https://bitcointalk.org/index.php?topic=495631.0
OWZ1337
Member
**
Offline Offline

Activity: 112
Merit: 10

BITCOIN===>THE DISRUPTIVE CYBERCURRENCY


View Profile
June 09, 2018, 09:09:51 PM
 #36

I added this bounty to the list of active bounties: https://en.bitcoin.it/wiki/Active_Bounties

I solved my problem, and I am hereby paying the bounty to myself the bounty has been paid to blockexplorer.com!

Problem:
Lazy web designer (me) wants to use bitcoins without dealing with installing bitcoin on a server, installing a shopping cart interface, or using ugly merchant services with callbacks.

Solution for sending bitcoins:
Use the MtGox API (https://mtgox.com/support/tradeAPI)

Solution for receiving bitcoins:
1) Input a list of bitcoin receiving addresses to your database
2) Give a bitcoin address to a potential customer
3) Have the customer tell you when they have sent the coins and have at least 1 confirmation (you can choose a number higher than 1 if you are worried about double-spending)
4) Check blockexplorer to see if they sent the right amount (i.e. http://blockexplorer.com/q/getreceivedbyaddress/19hMEAaRMbEhfSkeU4GT8mgSuyR4t4M6TH/1) - the /1 is the number of confirmations you require
5) Give them what they paid for
6) After a reasonable amount of time has passed, you can re-use the address for another customer

You could avoid having a list of addresses and reusing them if one of the wallet services someday lets you get a new address via API call, but this will work for now.

Bad idea:
Selling bars of gold this way (owner of blockexplorer.com could rip you off)

Good(?) idea:
Selling naked pictures of your grandma this way (owner of blockexplorer.com won't bother)

Shameless begging:
If this info is useful to you, please consider a donation: 19hMEAaRMbEhfSkeU4GT8mgSuyR4t4M6TH

Maybe I'm the only one this lazy, but just in case, I added a page to the wiki: https://en.bitcoin.it/wiki/Lazy_API

Thanks to theymos for making changes to blockexplorer.com to make it even easier to do this. Because of those changes to better support what I want to do, I paid Theymos the 20BTC bounty. You can support blockexplorer.com too by donating to 1Cvvr8AsCfbbVQ2xoWiFD1Gb2VRbGsEf28

this sounds too like wayyyy too much effort! Smiley haha

===>

https://en.bitcoin.it/wiki/Lazy_API

I am not a Financial Analyst, Investment Broker, Financial Adviser, Crypto-Guru or any sort of professional that would be deemed trustworthy! Wink weee™
Jonbak
Newbie
*
Offline Offline

Activity: 10
Merit: 0


View Profile
June 11, 2018, 09:57:22 PM
 #37

BlockCypher API! BlockCypher is a simple JSON API, mostly RESTful for using blockchain, accessible via HTTP or HTTPS from the api.blockcypher.com domain. Currently, BlockCypher supports Bitcoin, Ethereum, Litecoin, Dogecoin, Bitcoin Testnet3, and BlockCypher Test Chain.
BlockCypher's API provides a superset of the endpoints you'll find in reference implementations, in addition to some special features that make BlockCypher uniquely powerful, such as Unconfirmed Confidence Factor, WebHook Event or Web-based WebSockets Reliable, On-Chain Micro Transactions, and Payment Forward.

As a result, if you are familiar with the implementation of blockchain referrals, you will feel at home using BlockCypher, but without worrying about scale or implementation challenges. And if you're not familiar - with the application of referrals or blockchain in general - BlockCypher's API is a great way to dip your toes into the development of blockchain, without a lengthy regulatory process. In any case, BlockCypher has 99.99% time-active, and maintains the expressive and logical API you'll like.
Pages: « 1 [2]  All
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!