0

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?

1

1 Answer 1

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.

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.
    – Nick ODell
    Feb 1, 2015 at 0:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.