Bitcoin Forum
November 18, 2024, 07:12:46 AM *
News: Check out the artwork 1Dq created to commemorate this forum's 15th anniversary
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Reading live data from bitcoin network?  (Read 995 times)
Khanduras (OP)
Full Member
***
Offline Offline

Activity: 168
Merit: 100

Movin' on up.


View Profile
February 22, 2013, 08:13:41 AM
 #1

I'm going to be creating a few projects related to Bitcoin that I think will be rather useful.  A few of the sites will be using Bitcoin as a primary method of payment.  I currently have my website communicating with an instance of the bitcoin client in order to create deposit addresses for users of these services.  This is highly documented, so it's simple enough to set up.

I'd now like to make use of the transaction data of the network, much like blockchain.info does.  Chances are I'm just being extremely slow, and just wasn't able to spot the right forum post or passed something by in the documentation.  Either that or it's some form of well-guarded secret.

Anyway, is there some form of documentation for setting this up that I've been unable to find?  If not, is there anyone who can sum up how to do something similar?  I'd very much appreciate any information I can get.

Bitcoin Address: 1N1sex4rktWdxBJcFTczYZF5Xa75C47j4c                 |
Mining Income Address: 15wgpV7fDN8fVYn1q9QaPb9XSLjGRhry5L    |
gweedo
Legendary
*
Offline Offline

Activity: 1498
Merit: 1000


View Profile
February 22, 2013, 08:23:53 AM
 #2

Well are you asking how to read the data from the actual network, you could modify the bitcoin-qt client and add in the features you need like writing it to a database, or allowing you to access the information using JSON-RPC. Or you could build your own client that connects to peers...

https://en.bitcoin.it/wiki/Protocol_specification
Khanduras (OP)
Full Member
***
Offline Offline

Activity: 168
Merit: 100

Movin' on up.


View Profile
February 22, 2013, 08:38:14 AM
 #3

Yes, I am talking about getting live transaction data from the Bitcoin network.  Unfortunately, I figured it would be something similar to what you said.

Are there any clients out there with this functionality already built in?  I know I can use Blockchain's API to do so, but I'd rather have something done in-house and use them as a backup only if necessary.

Bitcoin Address: 1N1sex4rktWdxBJcFTczYZF5Xa75C47j4c                 |
Mining Income Address: 15wgpV7fDN8fVYn1q9QaPb9XSLjGRhry5L    |
jim618
Legendary
*
Offline Offline

Activity: 1708
Merit: 1066



View Profile WWW
February 22, 2013, 09:58:01 AM
 #4

You can use bitcoinj to see all the zero conf transactions. The peers you are connected to send them to you when they retransmit them.

You can see it happening in MultiBit when you do a send. When the peer count for a transaction increments that is one of the peers you are connected to retransmitting your own transaction back to you (after it has traversed the network).

MultiBit HD   Lightweight desktop client.                    Bitcoin Solutions Ltd   Bespoke software. Consultancy.
Stephen Gornick
Legendary
*
Offline Offline

Activity: 2506
Merit: 1010


View Profile
February 22, 2013, 04:44:07 PM
 #5

Either that or it's some form of well-guarded secret.

The Bitcoin.org client's API command "listsinceblock" will let you know new transactions, and then the Raw Transactions will give you the details on each.

Unichange.me

            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █


Khanduras (OP)
Full Member
***
Offline Offline

Activity: 168
Merit: 100

Movin' on up.


View Profile
February 22, 2013, 07:27:28 PM
 #6

Wouldn't using listsinceblock require constant polling for receiving up-to-date information on the current transactions?  Seems horribly inefficient, and wouldn't exactly be considered live.

Seems out of all of these options, editing the client to include a socket which spits out transaction information as it arrives would be the best option.  May even go as far as to create my own, since I'd like to see a Node.js alternative (BitcoinJS didn't seem to work for me after hours of frustration) surface.

Oh well.  Was kind of hoping for an easy-way-out that I could host on my own servers.  Back to the drawing board, it seems.  Thanks for the information, guys.

Bitcoin Address: 1N1sex4rktWdxBJcFTczYZF5Xa75C47j4c                 |
Mining Income Address: 15wgpV7fDN8fVYn1q9QaPb9XSLjGRhry5L    |
Zeilap
Full Member
***
Offline Offline

Activity: 154
Merit: 100


View Profile
February 22, 2013, 09:07:59 PM
 #7

Wouldn't using listsinceblock require constant polling for receiving up-to-date information on the current transactions?  Seems horribly inefficient, and wouldn't exactly be considered live.

Seems out of all of these options, editing the client to include a socket which spits out transaction information as it arrives would be the best option.  May even go as far as to create my own, since I'd like to see a Node.js alternative (BitcoinJS didn't seem to work for me after hours of frustration) surface.

Oh well.  Was kind of hoping for an easy-way-out that I could host on my own servers.  Back to the drawing board, it seems.  Thanks for the information, guys.
The creator of BitcoinJS is an active member of this forum, you could ask him what needs to be done to bring it back up to working state, rather than implementing everything from scratch.
Stephen Gornick
Legendary
*
Offline Offline

Activity: 2506
Merit: 1010


View Profile
February 22, 2013, 10:42:55 PM
 #8

Was kind of hoping for an easy-way-out that I could host on my own servers.  Back to the drawing board, it seems.

Not ready for production use, however ...

The bitsofproof node offers a message bus where it sends validated transactions and block chain events to authenticated extensions. It accepts transactions for routing towards the net through the same bus.

[...]
See the wiki for more: https://github.com/bitsofproof/supernode/wiki

Unichange.me

            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █


Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!