<p>Use walletnotify instead of polling. </p>

<p><a href="https://bitcoin.stackexchange.com/questions/12380/how-to-do-address-callbacks">how to do address callbacks?</a></p>

<p>It's basically a argument you can specify and Bitcoin will the specified program upon receiving a transaction (<strong>BOTH receives and sends from an address in wallet get notified</strong>). So you just setup a small script to run and point to it in <code>bitcoin.conf</code>.</p>

<p>Be sure to check for duplicates as walletnotify sends notifications for when a txn is first received (unconfirmed) and when it receives a confirmation.</p>

<p>Also <code>blocknotify</code> does the same thing as walletnotify but for blocks, may be useful for checking unconfirmed transactions.</p>

CC BY-SA 3.0
2014-01-29T20:12:38.570Z
2014-01-29T20:12:38.570Z
2017-04-13T12:47:33.660Z
John T
<p>I have a bitcoind running on a server behind the www box which I poll every minute for new transactions and save new data into a table. </p>

<p>Something strange is happening sometimes. If i send 1 btc from my wallet to an address on the bitcoind server, it gets through just fine and shows up right away in the log when downloading transactions via RPC.</p>

<p>If however I send from an exchange, it does not show up (at least not for a day or two). I've noticed that these exchanges add another address and amount to the same txid, could that be the cause? </p>

<p>Is there a workaround for this?</p>

<p>TIA</p>

CC BY-SA 3.0
2014-01-25T03:26:56.907Z
Should you be polling for new transactions? http://bitcoin.stackexchange.com/questions/12380/how-to-do-address-callbacks
John T
CC BY-SA 3.0
2014-01-25T12:31:01.600Z
Probably not, the only reason for doing this is that I keep btcoind separate from everything else on a different server with no access to my databases or anything else (for security reasons)... so RPC was the most viable option. But I'll try using that notification thing. Although if someone hacks this bitcoind thing they will be able to inject transactions into my database.
Nick M
CC BY-SA 3.0
2014-01-25T22:08:12.297Z
Check the btc hashes when processing em to avoid any security problems. But you can still get ruined if your bitcoind gets "hacked".
John T
CC BY-SA 3.0
2014-01-29T17:12:52.760Z
Had to drop all the old code and use walletnotify. if someone else goes for this, remember to check for duplicates as you can get several hits from the notification thing for each transaction. jtorba if you post your comment as answer I can click the green thing
Nick M
<bitcoind><json-rpc><linux>
Transactions not showing up in bitcoind log?
Nick M
# Transactions not showing up in bitcoind log?

(Asked by: username_0 on 2014-01-24)

I have a bitcoind running on a server behind the www box which I poll every minute for new transactions and save new data into a table.

Something strange is happening sometimes. If i send 1 btc from my wallet to an address on the bitcoind server, it gets through just fine and shows up right away in the log when downloading transactions via RPC.

If however I send from an exchange, it does not show up (at least not for a day or two). I've noticed that these exchanges add another address and amount to the same txid, could that be the cause?

Is there a workaround for this?

TIA

**Tags:** bitcoind, json-rpc, linux

> **Comments:**
> **username_1**: Should you be polling for new transactions? http://bitcoin.stackexchange.com/questions/12380/how-to-do-address-callbacks  
> **username_0**: Probably not, the only reason for doing this is that I keep btcoind separate from everything else on a different server with no access to my databases or anything else (for security reasons)... so RPC was the most viable option. But I'll try using that notification thing. Although if someone hacks this bitcoind thing they will be able to inject transactions into my database.  
> **username_1**: Check the btc hashes when processing em to avoid any security problems. But you can still get ruined if your bitcoind gets "hacked".  
> **username_0**: Had to drop all the old code and use walletnotify. if someone else goes for this, remember to check for duplicates as you can get several hits from the notification thing for each transaction. jtorba if you post your comment as answer I can click the green thing  

---

## 1 answers

### Answer by username_1 on 2014-01-29. Score: 0 | Accepted answer

Use walletnotify instead of polling.

[how to do address callbacks?](https://bitcoin.stackexchange.com/questions/12380/how-to-do-address-callbacks)

It's basically a argument you can specify and Bitcoin will the specified program upon receiving a transaction (**BOTH receives and sends from an address in wallet get notified**). So you just setup a small script to run and point to it in `bitcoin.conf`.

Be sure to check for duplicates as walletnotify sends notifications for when a txn is first received (unconfirmed) and when it receives a confirmation.

Also `blocknotify` does the same thing as walletnotify but for blocks, may be useful for checking unconfirmed transactions.


---

