<p>According to documentation, there are several optional parameters you can provide  in order to retrieve list of transactions for account(s).</p>

<p>Function:</p>

<pre><code>listtransactions [account] [count=10] [skip=0] [include_watch_only]
</code></pre>

<ol>
<li><p><code>[account]</code> (string) leave <code>""</code> for default account and <code>"*"</code> for all accounts, default <code>""</code></p></li>
<li><p><code>[count]</code> (int) number of recent tx to return, default is <code>10</code></p></li>
<li><p><code>[skip]</code> (int) number of recent tx not to return, default is <code>0</code></p></li>
<li><p><code>[include_watch_only]</code> (bool) include watch-only addresses, default is <code>false</code></p></li>
</ol>

<p>I suggest to try the call with all 4 parameters: </p>

<pre><code>$bitcoin-&gt;listtransactions("*", 10, 0, false);
</code></pre>

<p>I am not PHP expert but the output you get might be indication of missing parameters.</p>

CC BY-SA 3.0
2015-02-01T00:13:47.423Z
None of those parameters are required - but passing in the first parameter like that tells bitcoin that you want all transactions from the account named `count = 5, offset = 0`.
Nick ODell
CC BY-SA 3.0
2015-02-01T00:00:08.690Z
2015-02-01T00:06:19.280Z
2015-02-01T00:06:19.280Z
Marek
<p>In PHP I run </p>

<pre><code>$bitcoin-&gt;listtransactions("count = 5, offset = 0");
</code></pre>

<p>In the hope of getting 5 transactions only, but I get the response</p>

<pre><code>bool(false)
</code></pre>

<p>When I run $bitcoin->listtransactions(); alone, it works fine.</p>

<p>What am I doing wrong?</p>

CC BY-SA 3.0
2015-01-31T21:41:37.220Z
Please don't offer money for solving your problem - it's fine to give people money after the fact, but not to advertise it in advance. http://meta.stackexchange.com/questions/25615/offering-actual-money-as-a-bounty
Nick ODell
<json-rpc><php>
listtransactions via RPC returns false in PHP
Bob Puccini
# listtransactions via RPC returns false in PHP

(Asked by: username_0 on 2015-01-31)

In PHP I run

```
$bitcoin->listtransactions("count = 5, offset = 0");

```

In the hope of getting 5 transactions only, but I get the response

```
bool(false)

```

When I run $bitcoin->listtransactions(); alone, it works fine.

What am I doing wrong?

**Tags:** json-rpc, php

> **Comments:**
> **username_1**: Please don't offer money for solving your problem - it's fine to give people money after the fact, but not to advertise it in advance. http://meta.stackexchange.com/questions/25615/offering-actual-money-as-a-bounty  

---

## 1 answers

### Answer by username_2 on 2015-02-01. Score: 1

According to documentation, there are several optional parameters you can provide in order to retrieve list of transactions for account(s).

Function:

```
listtransactions [account] [count=10] [skip=0] [include_watch_only]

```

1. `[account]` (string) leave `""` for default account and `"*"` for all accounts, default `""`
2. `[count]` (int) number of recent tx to return, default is `10`
3. `[skip]` (int) number of recent tx not to return, default is `0`
4. `[include_watch_only]` (bool) include watch-only addresses, default is `false`

I suggest to try the call with all 4 parameters:

```
$bitcoin->listtransactions("*", 10, 0, false);

```

I am not PHP expert but the output you get might be indication of missing parameters.

> **Comments:**
> **username_1**: None of those parameters are required - but passing in the first parameter like that tells bitcoin that you want all transactions from the account named `count = 5, offset = 0`.  

---

