bitcoin-cli get all tx hashes for watch-only address does bitcoin-cli have any functionality to get all tx hashes for a given address (ie the txs that either send or receive funds from the given address). listtransactions sounds like it should do what i want, but when i run it like so then i get no results:
# pick a random address to watch from blockchain.info:
$ addr=1GkktBuJ6Pr51WEJe5ZzyNvMYaMDFjwyDk
# create a watch-only account for this address, with the account name
# being the address itself, for convenience:
$ time bitcoin-cli importaddress $addr &quot;$addr&quot; true
real    41m59.505s
user    0m0.004s
sys 0m0.004s
$ bitcoin-cli listtransactions &quot;$addr&quot; 100 0 true
[
]
$ bitcoin-cli getinfo
{
    &quot;version&quot; : 100200,
    &quot;protocolversion&quot; : 70002,
    &quot;walletversion&quot; : 60000,
    &quot;balance&quot; : 0.00000000,
    &quot;blocks&quot; : 384809,
    &quot;timeoffset&quot; : 0,
    &quot;connections&quot; : 8,
    &quot;proxy&quot; : &quot;&quot;,
    &quot;difficulty&quot; : 65848255179.70261383,
    &quot;testnet&quot; : false,
    &quot;keypoololdest&quot; : 1381701523,
    &quot;keypoolsize&quot; : 101,
    &quot;paytxfee&quot; : 0.00000000,
    &quot;relayfee&quot; : 0.00001000,
    &quot;errors&quot; : &quot;&quot;
}

as you can see, it takes 42 minutes to scan the blockchain for this watch-only address, so its not something i want to do often. and its only producing an empty list, whereas blockchain.info shows there are 6 transactions.
why is this not working? is this not the intended functionality of bitcoin-cli listtransactions?
update
listtransactions is supposed to display transactions from watch-only addresses:
$ bitcoin-cli help listtransactions
listtransactions ( &quot;account&quot; count from includeWatchonly)

Returns up to 'count' most recent transactions skipping the first 'from' transactions for account 'account'.

Arguments:
1. &quot;account&quot;    (string, optional) The account name. If not included, it will list all transactions for all accounts.
                                     If &quot;&quot; is set, it will list transactions for the default account.
2. count          (numeric, optional, default=10) The number of transactions to return
3. from           (numeric, optional, default=0) The number of transactions to skip
4. includeWatchonly (bool, optional, default=false) Include transactions to watchonly addresses (see 'importaddress')
...
...
...
Seeing as this question remains unanswered after a few months...

You will need to enable txindex = 1 in your bitcoin.conf per @Jannes' suggestion. If you want to scan your downloaded blockchain for another wallet's address transaction history, then you have to build the entire blockchain index on your machine.

Whether it's a watch-only address or not should be irrelevant.

What are pros and cons of txindex option?

Get non-wallet transactions using bitcoin rpc (gettransaction)


UPDATE

I think I may have solved your problem

This is my Bitcoin info

$ bitcoin-cli getinfo
{
    "version" : 110200,
    "protocolversion" : 70002,
    "walletversion" : 60000,
    "balance" : 0.00000000,
    "blocks" : 353776,
    "timeoffset" : -1,
    "connections" : 55,
    "proxy" : "",
    "difficulty" : 47610564513.47126007,
    "testnet" : false,
    "keypoololdest" : 1449210293,
    "keypoolsize" : 101,
    "paytxfee" : 0.00000000,
    "relayfee" : 0.00005000,
    "errors" : ""
}


My blockchain isn't quite as up-to-date as yours, so I gathered this transaction (within block 353776) and used the Bitcoin address of 1CTVqQSSVTjun32gRxmhJHhVYzzXpR894z from that transaction for my example.

# Import address WITHOUT rescan; we'll do this later
bitcoin-cli importaddress 1CTVqQSSVTjun32gRxmhJHhVYzzXpR894z "Index Test" false

# Stop Bitcoin
$ bitcoin-cli stop

# Verify Bitcoin is stopped, then run:
$ bitcoind -rescan

# Wait for rescan... mine took 15-20 minutes

# Once 'bitcoin-cli getinfo' returns valid info, run:
$ bitcoin-cli listtransactions "Index Test" 10 0 true

# Result:

[
    {
        "involvesWatchonly" : true,
        "account" : "Index Test",
        "address" : "1CTVqQSSVTjun32gRxmhJHhVYzzXpR894z",
        "category" : "receive",
        "amount" : 3.50000000,
        "vout" : 0,
        "confirmations" : 22539,
        "blockhash" : "00000000000000000548d8ef9a7d14c75b7b18ae5b792d520f44cc5ddd25adfe",
        "blockindex" : 536,
        "blocktime" : 1416848183,
        "txid" : "1db7b0703f441d4cea63a298131f8e766b557329f44c30898847d0fc23573606",
        "walletconflicts" : [
        ],
        "time" : 1452652576,
        "timereceived" : 1453438387
    },
    {
        "involvesWatchonly" : true,
        "account" : "Index Test",
        "address" : "1CTVqQSSVTjun32gRxmhJHhVYzzXpR894z",
        "category" : "receive",
        "amount" : 1.89990000,
        "vout" : 1,
        "confirmations" : 19031,
        "blockhash" : "0000000000000000134345f88fb68550d2102d392be6e1635eaa6fb50c37a2cc",
        "blockindex" : 15,
        "blocktime" : 1418994502,
        "txid" : "4cc761b286c23dab5dd07c260726d79e4baee88778a402e36c82a6b9e6ac757f",
        "walletconflicts" : [
        ],
        "time" : 1452652576,
        "timereceived" : 1453438430
    },
    ...
    snip
    ...
    {
        "involvesWatchonly" : true,
        "account" : "Index Test",
        "address" : "1CTVqQSSVTjun32gRxmhJHhVYzzXpR894z",
        "category" : "receive",
        "amount" : 13.63000000,
        "vout" : 0,
        "confirmations" : 211,
        "blockhash" : "0000000000000000021df02390f30985f34d871e4cc93c4e349cd3b23574bf76",
        "blockindex" : 1,
        "blocktime" : 1430041109,
        "txid" : "64540e42ec96118d11168d954641dd5390f4a46ba795c7b7588d38141e66117a",
        "walletconflicts" : [
        ],
        "time" : 1452652576,
        "timereceived" : 1453438694
    }
]


As you can see, the last transaction to show in the output is the one I grabbed from block 353776, with all of the correct details as displayed on blockchain.info, indicating a successful transaction listing for the imported address (account containing the address, actually).

As for why your rescan didn't work when you initially imported the address, I can't really say. Perhaps a more seasoned Bitcoin user could shed some light on that. 

At this point, I recommend you stop your Bitcoin daemon and run bitcoind -rescan and wait for it to do its magic. Afterwards try your listtransactions again. I'm interested in finding out if it works for you.

Keep in mind that attempting to import a Bitcoin address that already exists within your wallet will not initiate a rescan, even if specified to do so on the command line. --- https://bitcoin.org/en/developer-reference#importaddress