Author

Topic: Using Electrum script to monitor incoming transactions? (Read 522 times)

sr. member
Activity: 344
Merit: 250
Why don't use a php based solution for this? Electrum isn't designed to work like this, you can easily make a localserver and run a blocktrail server for your payments. It should be quite easy to code a program like this in php and mysql if you have used them before, Other than that, the only way i can think of is through macro recorders but that won't do the job perfectly. So my advice is get an api from blocktrail or any other bitcoin processor and let a script run in the background.

Could you point me at some starting point/examples?

Well you can start from the blocktrail api: https://www.blocktrail.com/api/docs/lang/php It has different examples and covers a whole lot of different subjects. I have a question for you. Are you a programmer or do you have some sort of programming knowledge? if you don't then the link above will not make much sense to you. A script which functions like your idea shouldn't cost more than $150 to make imo.

Programmer - yes, Python - no.
I thought of a script in Electrum console, not in command line, but...
I can easily arrange it via AutoIt or like, but it is... humiliating, I'd say Smiley There should be a direct solution.
I'll study your links, thanks.
legendary
Activity: 1512
Merit: 1218
Change is in your hands
Why don't use a php based solution for this? Electrum isn't designed to work like this, you can easily make a localserver and run a blocktrail server for your payments. It should be quite easy to code a program like this in php and mysql if you have used them before, Other than that, the only way i can think of is through macro recorders but that won't do the job perfectly. So my advice is get an api from blocktrail or any other bitcoin processor and let a script run in the background.

Could you point me at some starting point/examples?

Well you can start from the blocktrail api: https://www.blocktrail.com/api/docs/lang/php It has different examples and covers a whole lot of different subjects. I have a question for you. Are you a programmer or do you have some sort of programming knowledge? if you don't then the link above will not make much sense to you. A script which functions like your idea shouldn't cost more than $150 to make imo.
sr. member
Activity: 344
Merit: 250
Why don't use a php based solution for this? Electrum isn't designed to work like this, you can easily make a localserver and run a blocktrail server for your payments. It should be quite easy to code a program like this in php and mysql if you have used them before, Other than that, the only way i can think of is through macro recorders but that won't do the job perfectly. So my advice is get an api from blocktrail or any other bitcoin processor and let a script run in the background.

Could you point me at some starting point/examples?
legendary
Activity: 1512
Merit: 1218
Change is in your hands
Why don't use a php based solution for this? Electrum isn't designed to work like this, you can easily make a localserver and run a blocktrail server for your payments. It should be quite easy to code a program like this in php and mysql if you have used them before, Other than that, the only way i can think of is through macro recorders but that won't do the job perfectly. So my advice is get an api from blocktrail or any other bitcoin processor and let a script run in the background.
legendary
Activity: 3682
Merit: 1580
you should not split the payments up after every single transaction. that will cost way too much in fees. instead make periodic payouts to the authors say once a month.
HCP
legendary
Activity: 2086
Merit: 4361
I am fairly sure that the Electrum command line stuff is non-functional in Windows... ie.  ".\electrum.exe help" will not yield any output.

So, you're not going to be able to make it work with a script anyway...

Bitcoin Core or Electrum on Linux is looking like your best option... Although, maybe you can leverage APIs from the likes of BlockCypher etc: https://www.blockcypher.com/dev/bitcoin/
sr. member
Activity: 344
Merit: 250
Thanks, but bitcoin core is a bit too big. As for cron job - heh, I am under Windows Sad
I do realize that I can use tools to start the script by timer, but my question is, if it has built in observer mode (I even thought about while(1), but I am not sure how to do it on Python with low impact on performance).
HCP
legendary
Activity: 2086
Merit: 4361
There are definitely ways to do it with shell scripts... as there are people who run monitoring scripts on some of the "public" private keys (like the example ones on the Bitcoin wiki)... any deposit into that address is pretty much instantly forwarded to other addresses.

I'm not sure of the specifics tho... but I would think that you could probably setup a cron job that runs the script every X seconds (or minutes or whatever)... and your script would just need to check for new transactions on the appropriate address.

You might find that in this instance, using a Bitcoin Core full node might be a better option as bitcoind has some "notify" options available...
sr. member
Activity: 344
Merit: 250
Could anyone help: I have an address, that is receiving money, from time to time. Think online store.
I need to pay comission to authors of the e.book payment was for. Say, $1 incoming, $.3 to A, $.2 to B.
Can I run Electrum, with some script monitoring an address, and whenever money arrive, re-send them to list of addresses?
Or is console script something that runs once and terminates?
Thank you.
Jump to: