Bitcoin Forum

Bitcoin => Electrum => Topic started by: dave111223 on February 20, 2014, 12:07:09 AM



Title: PHP connect to Electrum server
Post by: dave111223 on February 20, 2014, 12:07:09 AM
I'm trying to connect directly (using PHP) to Electrum servers to receive a list of a transactions for an address or mpk in general.

What format do requests need to be sent to an electrum server in order to retrieve data?

(Not literate in python so not able to easily glean this from the source)


Title: Re: PHP connect to Electrum server
Post by: fbueller on March 29, 2014, 11:52:53 PM
I'm trying to connect directly (using PHP) to Electrum servers to receive a list of a transactions for an address or mpk in general.

What format do requests need to be sent to an electrum server in order to retrieve data?

(Not literate in python so not able to easily glean this from the source)

Did you ever have any luck with this? I was thinking of writing something similar a while ago but never got to it. If you made a start I can have a look?


Title: Re: PHP connect to Electrum server
Post by: Abdussamad on March 30, 2014, 02:01:59 AM
I'm trying to connect directly (using PHP) to Electrum servers to receive a list of a transactions for an address or mpk in general.

What format do requests need to be sent to an electrum server in order to retrieve data?

(Not literate in python so not able to easily glean this from the source)

Did you ever have any luck with this? I was thinking of writing something similar a while ago but never got to it. If you made a start I can have a look?

The newest version of electrum has support for all of this. Run electrum help to see. Some of hte commands:

getaddresshistory
getrawtransaction
decoderawtransaction
getaddressunspent


Title: Re: PHP connect to Electrum server
Post by: fbueller on March 30, 2014, 09:58:09 PM
This would mean firing up electrum each time. Connecting to a random electrum server to quickly poll for transactions could be quicker.


Title: Re: PHP connect to Electrum server
Post by: Abdussamad on March 31, 2014, 01:15:34 AM
This would mean firing up electrum each time. Connecting to a random electrum server to quickly poll for transactions could be quicker.

Electrum stays up for a few minutes in daemon mode now when you run it this way.